- Inheirt stack for using in code. It's not object
- To add string to stack, use
void push(string in)
- To remove and get latest element from stack, use
string pop()
- To check stack with number 'in', use
string peek(int in)
- To empry stack, use
void empty()
- To flush stack to stdout, use
void flush()
Construct it as object
Run it with .show_all()
This file contains 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
//You can also change type of this function to any other (if you need) | |
class ClassMisc { | |
public static string[] str_arr_cmb(string[] a, string[] b){ | |
string[] output = {}; | |
int cnt = 0; | |
foreach(string i in a){ | |
output += a[cnt]; | |
cnt++; |
This file contains 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
=begin | |
# Unobfuscated code: | |
s="-^v><*$-".each_char.take 8;loop{print " #{s.sample}_#{s.sample} ";sleep 0.1;print "\r"} | |
=end | |
# Obfuscated code: | |
eval( "" + | |
"\u0064\u003D\u0022\u0030" + | |
"\u0030\u0037\u0033\u0030" + | |
"\u0030\u0033\u0044\u0030" + |
This file contains 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
#!/usr/bin/env python3 | |
# Requires `cleverbot` and `flask` pip packages | |
# To send message, send POST request with msg=<message> | |
# You'll receive answer in response body | |
from cleverbot import Cleverbot | |
from flask import Flask, redirect, url_for, request | |
app = Flask(__name__) | |
cb = Cleverbot() |
This file contains 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
require "date" | |
dt = DateTime.now | |
base = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a | |
blen = base.length | |
passlen = ARGV[0] | |
if passlen == "-" | |
passlen = gets |
This file contains 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
module.exports = (obj, ...args) => { | |
return new Promise((res, rej) => { | |
try { | |
res(new obj(...args)); | |
} catch (e) { | |
rej(e); | |
} | |
}); | |
} |
This file contains 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
#pragma once | |
#include <functional> | |
#include <memory> | |
#include <mutex> | |
template<class T> | |
class room { | |
public: | |
typedef std::shared_ptr<T> ptr; |
This file contains 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
--[[ | |
The MIT License (MIT) | |
Copyright (c) 2018 Nickolay Ilyushin | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains 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
// same code as in quill part, but in C++ | |
{ | |
int i = 0 | |
contfunc = [&] () { i++; } | |
while (i < 10) { | |
std::cout << i << std::endl; | |
contfunc(); | |
} | |
std::cout << "Done counting" << std::endl; | |
} |
OlderNewer