user=> (< [-8] 0)
ClassCastException clojure.lang.PersistentVector cannot be cast to java.lang.Number
>>> [-8] < 0
#include <cstdint> | |
#include <climits> | |
#include <cassert> | |
#include <iostream> | |
using namespace std; | |
#define show_type_range(t, min, max)\ | |
cout << #t << " (" << sizeof(t) << " bytes): " << min << ".." << max << '\n'; |
// Polyfill because Safari's HTMLCollections are not iterable | |
if (typeof HTMLCollection.prototype[Symbol.iterator] !== 'function') { | |
HTMLCollection.prototype[Symbol.iterator] = function () { | |
let i = 0; | |
return { | |
next: () => ({done: i >= this.length, value: this.item(i++)}) | |
} | |
}; | |
} |
const program = ` | |
def f(x): | |
y = 0 | |
while x < y: | |
if p: | |
x = 3 | |
else: | |
for x in range(10): |
She's feeling under the weather so will work from home today, with a laptop and cup of tea
Sy gevoel onder die weer so sal werk van die huis af vandag, met 'n skootrekenaar en koppie tee
वह मौसम के अंतर्गत महसूस किया तो एक लैपटॉप और एक कप चाय के साथ आज घर से काम करेंगे
show dbs | |
use hello | |
db.people.insert({name: "Abdul", age: 22, likes: ["skiing", "hiking"]}) | |
db.people.insert({name: "Barbara", age: 20, country: "UK"}) | |
db.people.insert({name: "Chi", age: 40, country: "CN", | |
job: {title: "welder", salary: {currency: "EUR", amount: 50000}}}) |
[ | |
{ | |
"text": "2 * (42 - 1) / 9", | |
"startRule": "Exp", | |
"shouldMatch": true | |
}, | |
{ | |
"text": "1+2*3", | |
"startRule": "Exp", | |
"shouldMatch": true |
# Makes an enum class whose instances are all constants with uppercase names, | |
# but whose case of string representations are customizable. For example, | |
# Color = make_enum_class('red', 'amber', 'green') returns the class Color | |
# with members Color::RED, Color::AMBER, and Color::GREEN. The to_s methods | |
# produce 'red', 'green', and 'blue', respectively. To get the instance | |
# from the string, use, for example, Color.from_string('blue'), which will | |
# return Color.BLUE. | |
def make_enum_class(*constants) | |
cap = ->(s){s.upcase.gsub(/ /, '_')} |
class Pager { | |
private int offset; | |
private int limit; | |
private Pager() {} | |
public static Pager withOffset(int offset) {return new Pager().offset(offset);} | |
public Pager offset(int offset) {this.offset = offset; return this;} | |
public int offset() {return this.offset;} |