This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void cpp_uwp::json_test::Button_Click_1(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) | |
{ | |
using namespace Windows::Web::Http; | |
using namespace Windows::Storage::Streams; | |
ActivityIndicator1->IsActive = true; | |
IHttpClient^ NetHttp1 = ref new HttpClient(); | |
concurrency::create_task(NetHttp1->GetAsync(ref new Uri("https://うあーるえる"))).then([this](IHttpResponseMessage^ res) { | |
concurrency::create_task(res->Content->ReadAsBufferAsync()).then([this](IBuffer^ buf) { | |
std::function<Platform::String ^ (std::string)> Utf8ToPlatformString{ [](std::string stin) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// JSON analysis using UWP's JsonObject | |
// | |
void cpp_uwp::json_test::Button_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) | |
{ | |
using namespace Windows::Data::Json; | |
std::function<void(JsonObject^)> hhge{ [this](JsonObject^ json1) { | |
std::wstringstream lout; | |
std::function<void(IJsonValue^, Platform::String^)> foo{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
2018.07.24 | |
PowerShell 色文字(#000000)からRGB分けてint変換 | |
セキュリティがかかっている場合はSet-ExecutionPolicy RemoteSigned https://go.microsoft.com/fwlink/?LinkID=135170 を管理者モードで試す | |
PowerShellで rgb.ps1を実行した後、 > str_to_rgb -color "#00ff00" | |
#> | |
function global:str_to_rgb() | |
{ | |
Param([string]$color) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ラムダ式で渡すための宣言 | |
public delegate void Proc<in T>(T arg1); | |
//ラムダ引数で渡す関数 | |
private void Lambda_test(Proc<int> f) | |
{ | |
for (int i = 0; i < 100; ++i) | |
{ | |
f(i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async void Button_ClickAsync(object sender, RoutedEventArgs e) | |
{ | |
p1.IsEnabled = true; | |
p1.IsIndeterminate = true; | |
t1.Text = "5000数えた後時間表示"; | |
await Task.Run(async () => | |
{ | |
//何か重たい処理 | |
for (int i = 0; i < 5000; ++i) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#// | |
#// 休日かどうかを判定 | |
#// | |
function DateToHolidayBool( $date_str ) | |
{ | |
$date = strtotime( $date_str ); | |
if( isWeekend( $date ) ){ return true; } // 土日判定 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit uIOSUtils; | |
interface | |
uses | |
System.UITypes; | |
procedure SetStatusBarColor(const iColor: TAlphaColor); | |
implementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lua_function_string(s) | |
return "るあ " .. s; | |
end | |
function lua_function_int(i) | |
return 5050 + i; | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NSTextView 文字に色を付けてAppendする。 | |
//Xcode6.3 MacOS | |
-(void)Append2:(NSString*)value1 lov:(NSTextView *)lov color:(NSColor*)cl | |
{ | |
//dispatch_asyncブロック渡しする為? | |
dispatch_async( | |
//dispatch_get_main_queueメインのキューで処理 | |
dispatch_get_main_queue(), ^{//^マークはブロック型(クロージャー)と言う事らしいです。 | |
//↓attributeの入れ物を作る。 | |
NSDictionary *satt = @{ NSForegroundColorAttributeName : cl}; |