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
Dim cd = From i In {"ィ", "ィー", "イー", "ー", "イ"} | |
From a In {"ア", "ァ", "ワ", "ヮ"} | |
From o In {"ー", ""} | |
From sa In {"サ", "シャ"} | |
Select "シ" & i & "ク" & a & o & sa & "ー" |
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
// 現時刻の status id | |
var currentId = Convert.ToInt64( | |
DateTime.UtcNow.Subtract( | |
new DateTime(1970, 1, 1).AddMilliseconds(1288834974657) | |
).TotalMilliseconds | |
) << 22; | |
// 10 minutes 分のミリ秒 | |
var offset = Convert.ToInt64( | |
TimeSpan.FromMinutes(10).TotalMilliseconds) << 22; |
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 class Friend | |
{ | |
[JsonPropertyName("n")] | |
public string Name { get; set; } | |
[JsonPropertyName("s")] | |
public int ShoeSize { get; set; } | |
} |
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
@code | |
{ | |
public class Friend | |
{ | |
public string Name { get; set; } | |
public int ShoeSize { get; set; } | |
} | |
private async Task GetFriends() | |
{ |
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
var db = new Dexie("friend_database"); | |
db.version(1).stores({ | |
friends: 'name,shoeSize' | |
}); | |
window.putFriend = (friend) => | |
db.friends.put(friend); | |
window.getFriends = () => | |
db.friends.toArray(); |
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
<script src="_framework/blazor.webassembly.js"></script> | |
<script src="https://unpkg.com/dexie@latest/dist/dexie.js"></script> | |
<script src="js/db.js"></script> |
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
publish/** binary |
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
{ | |
"routes": [ | |
{ | |
"route": "/*", | |
"serve": "/index.html", | |
"statusCode": 200 | |
} | |
] | |
} |
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
var path = @"日本語の姓.txt"; | |
var names = File.ReadAllLines(path).Where(x => x.Trim() != "").ToList(); | |
var filteredNames = names | |
.Select(x => Regex.Replace(x, @"\(.+\)", "").Replace(" ", "")) | |
.Where(x => x.All(y => charHashSet.Contains(y))) | |
.ToList(); | |
Console.WriteLine($"{filteredNames.Count}件"); | |
Console.WriteLine(string.Join(",", filteredNames)); |
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
static void Main(string[] args) | |
{ | |
var lines = File.ReadAllLines(@"ナンバープレート一覧.csv", Encoding.UTF8).ToList(); | |
var places = lines.Skip(1).Select(x => x.Split(',')[2]); | |
var chars = new List<char>(); | |
var charHashSet = new HashSet<char>(); | |
foreach (var name in places) | |
{ | |
chars.AddRange(name.ToCharArray()); |
NewerOlder