Призы на DelphiCon 2021
Для привлечения внимания к бесплатной онлайн-конференции DelphiCon 2021 компания Embarcadero анонсировала розыгрыш призов и реферальную систему регистрации.
C#. Async / Await. Simple example
This is a simple example, we don’t wait for DoSmthAsync() in our calling main thread, just going further, when it is done, using its result
C#. Sync and Async simple examples
static void SyncExample() { // do smth before var fs = new FileStream(); // wait for this operation // do smth after } static
Algo. Buddy Strings
https://leetcode.com/problems/buddy-strings/
/* main idea is to search unmatched symbols, and it shoeld be only 2 of them to swap */ public class Solution { public
Algo. Add strings
https://leetcode.com/problems/add-strings/
public string AddStrings(string num1, string num2) { var needZeroes = num1.Length — num2.Length; // adding leading zeroes var absNeedZeroes = Math.Abs(needZeroes); if (needZeroes
Algo.Isomorphing strings
isomorphing strings on leetcode
public bool IsIsomorphic(string s, string t) { if (s.Length != t.Length) return false; var firstStringDict = new Dictionary<char,
Algo. IsPalindrome
https://leetcode.com/problems/valid-palindrome/
my decision below
static bool IsPalindrome(string s) { var alphaNum = GetAlphaNumFromString(s).ToLower(); if (alphaNum == «») return true; var reversed = ReverseString(alphaNum); Console.WriteLine(alphaNum);
Js. myPromiseAll
Promise.all is all or nothing, it returns promise if all incoming promises resolved
const myPromiseAll = (promises) => { return new Promise((resolve, reject) => {
Выпушен RAD Studio 11 Alexandria Patch 1
Компания Embarcadero выпустила первое обновление для RAD Studio, Delphi и C++Builder 11 Alexandria. Оно устраняет несколько важных проблем, относящихся к библиотеке VCL, IDE, поддержке Apple
C#.Rihter.Timer
simple example, task will be created periodically and will be handled in thread pool with Thread.QueueUserWorkItem
var timer = new Timer( (o) => {