This file contains hidden or 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
/* | |
DateTime now = DateTime.Now.AddHours(-10); | |
Console.WriteLine("now=" + now.ToSnsTime()); | |
*/ | |
using System; | |
namespace DateTimeToSns_sample | |
{ | |
public static class Lib | |
{ |
This file contains hidden or 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
using System; | |
using System.Threading.Tasks; | |
namespace TaskYieldSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var list = new int[] { 1, 2, 3, 4, 5 }; |
This file contains hidden or 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
using System; | |
namespace NanoSecSample | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
long sec = 45; | |
int nano = 760000000; |
This file contains hidden or 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
foreach(int i in Power(2, 8)) | |
{ | |
Console.Write("{0} ", i); | |
} | |
} |
This file contains hidden or 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var x = new MyClass(); | |
x.Go(3, 1000); | |
} | |
} | |
public class MyClass |
This file contains hidden or 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 static dynamic GetDynamic(string sql, string connectionString) | |
{ | |
dynamic x; | |
using (SqlConnection cn = new SqlConnection(connectionString)) | |
{ | |
cn.Open(); | |
using (SqlCommand cmd = new SqlCommand(sql, cn)) | |
{ | |
using (SqlDataReader reader = cmd.ExecuteReader()) |
This file contains hidden or 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
fetch('https://mywebsite.com/mydata.json'); | |
fetch('https://mywebsite.com/endpoint/', { | |
method: 'POST', | |
headers: { | |
Accept: 'application/json', | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify({ | |
firstParam: 'yourValue', |