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
/** | |
* 取得目前作用中的工作表名稱 | |
* | |
* 使用方式: | |
* 在 Google Sheets 的儲存格中輸入公式 =GetCurrentSheetName() | |
* 就會顯示當前工作表的名稱。 | |
* 此為 Chatgpt輔助生成的註解 | |
*/ |
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
window.addEventListener('pageshow', function (event) { | |
HoldOn.close(); | |
}); | |
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
private static Task _TelegramBotClient_OnMessage(Telegram.Bot.Types.Message message, Telegram.Bot.Types.Enums.UpdateType type) | |
{ | |
if (message.Text==null) | |
{ | |
return Task.FromResult<object>(null); | |
} | |
if (message.Text.ToLower().StartsWith("/")) | |
{ |
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
private static Task _TelegramBotClient_OnUpdate(Telegram.Bot.Types.Update update) | |
{ | |
if (update.CallbackQuery != null) | |
{ | |
Console.WriteLine(update.CallbackQuery.From.Id + ":" + update.CallbackQuery.Data); | |
var sentMessage = _TelegramBotClient.SendMessage( |
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
static TelegramBotClient _TelegramBotClient; | |
static CancellationTokenSource cts = new CancellationTokenSource(); | |
public static void InitTelegramBotClient() | |
{ | |
_TelegramBotClient = new TelegramBotClient("1234567890:AAD98dMandhVhEW4jDEu-LTm6fX9MYL9PKU4",httpClient:default,cts.Token); | |
_TelegramBotClient.OnMessage += _TelegramBotClient_OnMessage; | |
} |
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
static TelegramBotClient _TelegramBotClient; | |
static CancellationTokenSource cts = new CancellationTokenSource(); | |
public static void InitTelegramBotClient() | |
{ | |
_TelegramBotClient = new TelegramBotClient("1234567890:AAD98dMandhVhEW4jDEu-LTm6fX9MYL9PKU4",httpClient:default,cts.Token); | |
_TelegramBotClient.OnMessage += _TelegramBotClient_OnMessage; |
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
var filePath = AppDomain.CurrentDomain.BaseDirectory + "oooo.jpg"; | |
UploadImageToIPFS(filePath); | |
static void UploadImageToIPFS(string filePath) | |
{ | |
var client = new RestClient("https://app.img2ipfs.org/api/v0/add"); |
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
var filePath = AppDomain.CurrentDomain.BaseDirectory + "oig.jpg"; | |
//user key from https://vgy.me/account/details | |
var response=UploadImageVgyMe(filePath, "user_key"); | |
Console.WriteLine("Image path:" + response.image); | |
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
static readonly string[] EarthlyBranches = { "子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申", "酉", "戌", "亥" }; | |
static readonly string[] Zodiacs = { "鼠", "牛", "虎", "兔", "龍", "蛇", "馬", "羊", "猴", "雞", "狗", "豬" }; | |
static readonly int[] SixClashIndex = { 6, 7, 8, 9, 10, 11, 0, 1, 2, 3, 4, 5 }; | |
public static void CalculateZodiacClash(DateTime date) | |
{ | |
int earthlyIndex = GetEarthlyBranchIndex(date); | |
string earthlyBranch = EarthlyBranches[earthlyIndex]; |
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
//有被標示 | |
var txid1RiskStatus = IsRiskTransaction("ecc4bad962d2bb4ac74694ff8bea53eec1358312afdfaba54a484f47ba68e5a4"); | |
Console.WriteLine("ecc4bad962d2bb4ac74694ff8bea53eec1358312afdfaba54a484f47ba68e5a4 is risk :" + txid1RiskStatus); | |
//沒有被標示 | |
var txid2RiskStatus = IsRiskTransaction("74cc8723d0c5c3933d8bf4d521be5a9b9c5d581d3d0f42fa8e9d3baae9187188"); |
NewerOlder