I hereby claim:
- I am skymanone on github.
- I am skymanone (https://keybase.io/skymanone) on keybase.
- I have a public key ASDDIDF6BZHdJ3MtWXs88tZXGGSyrJXaGG4X1qwA86Y3Wgo
To claim this, I am signing this object:
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
import telebot | |
import os | |
from telebot import types | |
from flask import Flask, request | |
# если в окуржении есть переменная HEROKU, значит получаем токен из переменной окружения | |
if 'HEROKU' in list(os.environ.keys()): | |
TOKEN = str(os.environ.get('TOKEN')) | |
# иначе импортируем его из скрытого в файлы в папке проекта | |
else: |
using System; | |
namespace codewars10._06 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//set up the field as an array from the example test case | |
int[,] field = new int[10, 10] |
func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { | |
let task: Task = tasks[indexPath.row] | |
let action: UIContextualAction = UIContextualAction(style: .destructive, title: "Finish", handler: { | |
(action, view, completionHandler) in | |
self.tasks.remove(at: indexPath.row) | |
tableView.deleteRows(at: [indexPath], with: .fade) | |
completionHandler(true) | |
}) |
{ | |
//just copy paste in .vscode/tasks.json | |
//run by pressing cmd+shift+p | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "build", | |
"group": "build", | |
"command": "msbuild", | |
"type": "process", |
using System; | |
using System.Threading; | |
namespace threadTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
//Let's create a dedicated thread to demmonstarte that the whole process can be done inside another thread |
I hereby claim:
To claim this, I am signing this object:
//alias a complex type for cleaner code | |
pub type Link = Option<Box<Node>>; | |
#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] | |
pub struct Node { | |
value: i8, | |
left_node: Link, | |
right_node: Link, | |
} | |
impl Node { |
//! In Module 1, we discussed Block ciphers like AES. Block ciphers have a fixed length input. | |
//! Real wold data that we wish to encrypt _may_ be exactly the right length, but is probably not. | |
//! When your data is too short, you can simply pad it up to the correct length. | |
//! When your data is too long, you have some options. | |
//! | |
//! In this exercise, we will explore a few of the common ways that large pieces of data can be broken | |
//! up and combined in order to encrypt it with a fixed-length block cipher. | |
//! | |
//! WARNING: ECB MODE IS NOT SECURE. | |
//! Seriously, ECB is NOT secure. Don't use it irl. We are implementing it here to understand _why_ it |
use parity_scale_codec::{ Encode, Decode}; | |
use sp_core::{H256, H512, Pair}; | |
type Salt = u8; | |
const SALT: Salt = 5u8; | |
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone)] | |
pub struct BasicExtrinsic { | |
operation: Operation, |