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
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) | |
}) |
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; | |
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] |
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 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: |
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
# 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 -> |
NewerOlder