Say I want to check if a value v
is either null
or undefined
in
JavaScript. I might use this conditional:
if (!v) { ... } // 🙅♀️ wrong!
class Sliceable: | |
def __init__(self, iterable): | |
self.it = iterable | |
def __getitem__(self, index): | |
if isinstance(index, int): | |
return self.it[int] | |
start = 0 if index.start is None else index.start | |
stop = inf if index.stop is None else index.stop |
@book{CW, | |
title = {{nēhiýawēwin} : {itwēwina} / {Cree} : Words}, | |
editor = {Arok Wolvengrey}, | |
year = 2001, | |
publisher = {Canadian Plains Research Center}, | |
address = {Regina, Saskatchewan} | |
} | |
@book{MD, | |
title = {{Maskwacîs} Dictionary of {Cree} Words / Nehiyaw Pîkiskweninisa}, |
/** | |
* Defining an interval on integer and floating point number lines. | |
* | |
* Compile with: | |
* | |
* $ c++ -std=c++11 interval.cc -o interval | |
* | |
* Run tests: | |
* | |
* $ ./interval |
export const enum WordBreakProperty { | |
/* 0 */ Other, | |
/* 1 */ LF, | |
/* 2 */ Newline, | |
/* 3 */ CR, | |
/* 4 */ WSegSpace, | |
/* 5 */ Double_Quote, | |
/* 6 */ Single_Quote, | |
/* 7 */ MidNum, | |
/* 8 */ MidNumLet, |
/*! | |
* Copyright (c) 2020 Eddie Antonio Santos | |
* | |
* This Source Code Form is subject to the terms of the Mozilla Public License, | |
* v. 2.0. If a copy of the MPL was not distributed with this file, You can | |
* obtain one at http://mozilla.org/MPL/2.0/. | |
*/ | |
/** | |
* Simplifies interaction with <template> tags: |
#!/usr/bin/env python3 | |
# -*- coding: UTF-8 -*- | |
from cree_sro_syllabics import sro2syllabics | |
consonants = 'ptkcmnsy' | |
finals = ('h', 'hk', 'r', 'l', 'w') | |
vowels_circumflex = 'êioaîôâ' | |
vowels_macron = 'ēioaīōā' |
Object.defineProperty(Set.prototype, 'addAll', { | |
enumerable: false, | |
configurable: false, | |
value: function (iterable) { | |
for (let item of iterable) { | |
this.add(item); | |
} | |
return this; | |
} | |
}); |
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{javascript}[2017/04/13] | |
% Defines a Listings definition for JavaScript (ECMAscript 2016). | |
\RequirePackage{listings} | |
\lstdefinelanguage{JavaScript}{% | |
keywords={const, let, typeof, instanceof, new, true, false, catch, function, return, null, undefined, catch, switch, var, if, in, while, for, do, else, case, break}, | |
keywordstyle=\bfseries, |