Skip to content

Instantly share code, notes, and snippets.

View sbannikov's full-sized avatar
💻
Trying to write a game

Sergey Bannikov sbannikov

💻
Trying to write a game
View GitHub Profile
@qwertie
qwertie / DateTimePicker.xaml
Last active June 5, 2023 18:31
C# DateTimePicker for WPF
<UserControl x:Class="DTPicker.DateTimePicker"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:DTPicker"
xmlns:wpftc="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"
mc:Ignorable="d"><!--Uses Calendar in WPFToolkit.dll,
see http://wpf.codeplex.com/releases/view/40535-->
<UserControl.Resources>
const v1 = `https://${process.env.RIC_HOST}/api/v1`;
const login = process.env.RIC_USER;
const password = process.env.RIC_PASS;
async function getToken() {
const resp = await fetch(`${v1}/auth/token`, {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ login, password })
});
@MarmaladeKnight
MarmaladeKnight / #1 Task
Created February 13, 2021 15:00
#1 Task
//JS
function preparePhrase(phrase) {
return phrase.toLocaleLowerCase()
.replace(/[^0-9а-яa-z]/gi, "");
}
function isPalendrome(phrase) {
const preparedPhrase = preparePhrase(phrase);