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
| #include <iostream> | |
| using namespace std; | |
| char getVerChar(char target) | |
| { | |
| if (target >= 97 && target <= 122) | |
| { | |
| return target - 32; | |
| } |
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
| // Parse string initData from telegram. | |
| var data = HttpUtility.ParseQueryString(initData); | |
| // Put data in a alphabetically sorted dict. | |
| var dataDict = new SortedDictionary<string, string>( | |
| data.AllKeys.ToDictionary(x => x!, x => data[x]!), | |
| StringComparer.Ordinal); | |
| // Constant key to genrate secret key. | |
| var constantKey = "WebAppData"; |
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
| Imports System.Threading | |
| Imports Telegram.Bot | |
| Imports Telegram.Bot.Extensions.Polling | |
| Imports Telegram.Bot.Types | |
| Imports Telegram.Bot.Types.Enums | |
| Module Program | |
| Sub Main() | |
| Dim bot = New TelegramBotClient("BOT_TOKEN") |
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
| import os | |
| import textwrap | |
| class Generator: | |
| def __init__(self, file_name): | |
| self.filename, self.file_extension = os.path.splitext(file_name) | |
| if not self.file_extension: | |
| self.file_extension = '.py' | |
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.Collections.Generic; | |
| using System.Threading.Tasks; | |
| using Telegram.Bot; | |
| using Telegram.Bot.Types; | |
| namespace RateLimiter | |
| { | |
| class Program | |
| { |
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.Collections.Generic; | |
| using System.Threading.Tasks; | |
| using Telegram.Attributes; | |
| using Telegram.Attributes.Filters; | |
| using Telegram.Bot; | |
| using Telegram.Bot.Types; | |
| using Telegram.Filters; | |
| using Telegram.Handlers; | |
| namespace TestPackage |
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
| def getClock(second: int): | |
| Second = 0 | |
| Minute = 0 | |
| Hours = 0 | |
| Day = 0 | |
| Month = 0 | |
| Year = 0 | |
| while(second > 0): | |
| if(second < 60): |
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 Clock: | |
| _Second : int = 0 | |
| _Minutes : int = 0 | |
| _Hours : int = 0 | |
| def FillMe(self, totalSeconds: int): | |
| if(totalSeconds >= 60): | |
| if(totalSeconds >= 3600): | |
| self._Hours = totalSeconds//3600 | |
| hoursRemaning = totalSeconds%3600 |
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.Collections.Concurrent; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Telegram.Bot; | |
| using Telegram.Bot.Types; | |
| using Telegram.Bot.Types.Enums; | |
| using Telegram.Bot.Types.ReplyMarkups; |
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
| from typing import List | |
| from enum import Enum, auto | |
| class RotationDir(Enum): | |
| X_ROTATE = auto() | |
| Y_ROTATE = auto() | |
| Z_ROTATE = auto() | |
| class Rotation: |
NewerOlder