a ^ b
ответ:
{
"nextStep": "email-code" | "totp-code" | "done",
"token": "xxx" | null, // auth token, session id или что у вас используется
"state": "xxx", // unique id для stateful приложений, либо нечто зашифрованное для распределенных stateless
}
var nums = new[] { 100, 3, 102, 7, 1, 9, 12 };
var max = default(int?);
var min = default(int?);
var avg = 0.0;
var avgCount = 0;
foreach (var number in nums)
{
if (min == null)
{
min = number;
}
else if (max == null)
{
max = number;
if (max < min)
{
max = min;
min = number;
}
}
else if (number < min)
{
avg = ((avg * avgCount) + min.Value) / ++avgCount;
min = number;
}
else if (number > max)
{
avg = ((avg * avgCount) + max.Value) / ++avgCount;
max = number;
}
else
{
avg = ((avg * avgCount) + number) / ++avgCount;
}
}
new Func<bool>( () => true );
new Func<bool>( () => { return true; } );
(Func<bool>)() => true;
(Func<bool>)() => { return true; };
new Func<bool>(BoolFunc);
new Func<bool>( delegate () { return true; } );
private bool BoolFunc() {
return true;
}
<Target Name="Repack" AfterTargets="BuiltProjectOutputGroup">
<GetFrameworkPath>
<Output TaskParameter="Path" PropertyName="FrameworkPath" />
</GetFrameworkPath>
<ItemGroup>
<NetPlatformFolders Include="$(NuGetPackageFolders.Split(';'))"></NetPlatformFolders>
</ItemGroup>
<ItemGroup>
<AllowDup Include="System.%2A" />
<AllowDup Include="JetBrains.%2A" />
</ItemGroup>
<ItemGroup>
<RapackTarget Include="$(TargetDir)MyDll1.dll" />
<RapackTarget Include="$(TargetDir)MuDll2.dll" />
</ItemGroup>
<PropertyGroup>
<ILRepack Condition="'$(ILRepack)' == ''">$(NuGetPackageRoot)ilrepack\2.1.0-beta1\tools\ILRepack.exe</ILRepack>
<ILRepackTargetPlatform Condition="'$(TargetFramework)' == 'net45'">v4,$(FrameworkPath)</ILRepackTargetPlatform>
<ILRepackTargetPlatform Condition="'$(TargetFramework)' == 'netstandard1.3' or '$(TargetFramework)' == 'netcoreapp2.0' or '$(TargetFramework)' == 'netstandard2.0'">v4</ILRepackTargetPlatform>
<IlRepackLibs Condition="'$(TargetFramework)' == 'netstandard2.0'">@(NetPlatformFolders->'"/lib:%(FullPath)\netstandard.library\2.0.0\build\netstandard2.0\ref"', ' ')</IlRepackLibs>
<IlRepackLibs Condition="'$(TargetFramework)' == 'netcoreapp2.0'">@(NetPlatformFolders->'"/lib:%(FullPath)\microsoft.netcore.app\2.0.0\ref\netcoreapp2.0"', ' ')</IlRepackLibs>
<IlRepackAllowDup>@(AllowDup->'"/allowdup:%(Identity)"', ' ')</IlRepackAllowDup>
<IlRepackTargets>@(RapackTarget->'"%(Identity)"', ' ')</IlRepackTargets>
</PropertyGroup>
<Exec Command="$(mono) "$(ILRepack)" /target:exe "/targetplatform:$(ILRepackTargetPlatform)" /union /parallel /internalize "/lib:$(TargetDir.TrimEnd('\'))" $(IlRepackLibs) $(IlRepackAllowDup) "/out:$(TargetPath)" "$(TargetPath)" $(IlRepackTargets)" WorkingDirectory="$(SolutionDir)" />
<Delete Files="@(RapackTarget);" />
</Target>
#if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN || UNITY_WP8
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
#else
var appData = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
#endif
using(var writer = File.CreateText(Path.Combine(appData , "mysave.json")) {
var serializer = new JsonSerializer();
serializer.Serialize(writer, myData)
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
public bool onlyOneVariable(params string[] values) => values.Count(char.IsLetter) == 1;
from num1 in new[] { '0', '1', '2', 'X' }
from num2 in new[] { '0', '1', '2', 'X' }
from op1 in new[] { '-', '+', '*' }
where onlyOneVariable(num1, num2)
select $"{num1} {op1} {num2}";
%userprofile%
шаблончики (ссылки на переменные окружения) заполняет за вас explorer/cmd.exe и другой прикладной софт. В C# придётся их самому найти в строке (возможно Regex) и заменить на Environment.GetEnvironmentVariable. <![CDATA[
// на
<![CDATA[
]]>
// на
]]>