Function | MySQL / MariaDB | PostgreSQL | SQLite |
---|---|---|---|
substr | ✔️ | ✅ | ✔️ |
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
| 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 |
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
// 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 |
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
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'; |
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
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)); | |
} |
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
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 { |
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
testRpc.increaseTime = function(secondsToJump, cb) { | |
function send(method, params, callback) { | |
if (typeof params == "function") { | |
callback = params; | |
params = []; | |
} | |
provider.sendAsync({ | |
jsonrpc: "2.0", | |
method: method, |
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
'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); | |
} |
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
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(); | |
} |
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
n = int(input()) | |
f = map(int,raw_input().split()) | |
print "YES" if len(f)==len(set(f)) else "NO" |