Skip to content

Instantly share code, notes, and snippets.

| Task | Time required | Assigned to | Current Status | Finished |
|----------------|---------------|---------------|----------------|-----------|
| Calendar Cache | > 5 hours | | in progress | - [x] ok?
| Object Cache | > 5 hours | | in progress | [x] item1<br/>[ ] item2
| Object Cache | > 5 hours | | in progress | <ul><li>- [x] item1</li><li>- [ ] item2</li></ul>
| Object Cache | > 5 hours | | in progress | <ul><li>[x] item1</li><li>[ ] item2</li></ul>
- [x] works
- [x] works too
Function MySQL / MariaDB PostgreSQL SQLite
substr ✔️ ✔️
// Implement an EventManager class
//
// There should be three methods on this class:
//
// 1. subscribe(eventType: string, listener: Function)
// 2. unsubscribe(eventType: string, listener: Function)
// 3. publish(eventType: string, data: any)
//
// You can use either ES5 or ES6 notation
const getTag = (text, [lastParsedTag, lastParsedText] = [null, null]) => {
if (text.length === 0) return null;
const listItem = text[0] === '-';
if (listItem) return 'li';
const hashes = text.match(/^#+/);
if (hashes) return `h${Math.min(6, hashes[0].length)}`;
if (lastParsedTag === 'p' || lastParsedTag === 'li') return 'continued';
@danielyaa5
danielyaa5 / scrapeSteem.js
Created September 26, 2017 05:39
Steemit Scraper
const util = require('util');
const request = require('request-promise');
const cheerio = require('cheerio');
const imageDataURI = require('image-data-uri')
const _ = require('lodash');
function getImgUris(urls) {
return Promise.all(urls.map(imageDataURI.encodeFromURL));
}
uint private accept_payment;
function accept(string buyer_email) external payable {
accept_payment = msg.value;
buyer = msg.sender;
buyer_contact_information = buyer_email;
_setConversionRate();
_changeState(ContractStates.Accepting);
}
function cancelAccept() external onlyBuyer {
testRpc.increaseTime = function(secondsToJump, cb) {
function send(method, params, callback) {
if (typeof params == "function") {
callback = params;
params = [];
}
provider.sendAsync({
jsonrpc: "2.0",
method: method,
'use strict';
const read = require('read')
const CryptoJS = require("crypto-js");
const handleReadErr = err => console.log(`Problem reading input.%n ${err}`);
const handleDecryptError = err => {
console.log(`Failed to decrypt text, probably the incorrect pwd.`);
if (err) console.log(err);
}
read({ prompt: 'Paste encrypted passwords file:'}, (err, encryptedText) => {
let decryptedText;
try {
decryptedText = decrypt(encryptedText, pwd);
} catch (e) {
return handleDecryptError(e);
} finally {
if (!decryptedText) return handleDecryptError();
}
n = int(input())
f = map(int,raw_input().split())
print "YES" if len(f)==len(set(f)) else "NO"