code
stringlengths
4
1.01M
language
stringclasses
2 values
import std.stdio: readln, writeln; import std.string: chomp; import std.conv: to; void main() { int n = readln.chomp.to!int; writeln(n/2 + n%2); }
D
import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv, std.functional, std.math, std.numeric, std.range, std.stdio, std.string, std.random, std.typecons, std.container; ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000; alias sread = () => readln.chomp(); alias lread(T = long) = (...
D
//prewritten code: https://github.com/antma/algo import std.algorithm; import std.array; import std.conv; import std.math; import std.range; import std.stdio; import std.string; import std.traits; import std.typecons; final class InputReader { private: ubyte[] p, buffer; bool eof; bool rawRead () { if (eof...
D
import std.stdio, std.string, std.array, std.conv, std.algorithm.iteration, std.functional; char[54][54] NS; char[54][54] MS; void main() { auto nm = readln.split.to!(int[]); auto n = nm[0]; auto m = nm[1]; foreach (i; 0..n) { auto line = readln; foreach (j, c; line) NS[i]...
D
import std.stdio, std.math, std.algorithm, std.array, std.string, std.conv, std.container, std.range; T[] Reads(T)() { return readln.split.to!(T[]); } alias reads = Reads!int; void scan(Args...)(ref Args args) { string[] ss = readln.split; foreach (i, ref arg ; args) arg = ss[i].parse!int; } void main() { ...
D
import std.stdio, std.conv, std.functional, std.string; import std.algorithm, std.array, std.container, std.range, std.typecons; import std.numeric, std.math, std.random; import core.bitop; string FMT_F = "%.10f"; static string[] s_rd; T RD(T = long)() { while(!s_rd.length) s_rd = readln.chomp.split; string res = s_r...
D
import std.stdio, std.conv, std.functional, std.string; import std.algorithm, std.array, std.container, std.range, std.typecons; import std.numeric, std.math, std.random; import core.bitop; string FMT_F = "%.10f"; static string[] s_rd; T RD(T = long)() { while(!s_rd.length) s_rd = readln.chomp.split; string res = s_r...
D
void main() { auto N = ri; auto S = rs; ulong res = ulong.max; auto A = new int[](N); // i番目含め左から今までのWの個数 A[0] = S[0] == 'W'; foreach(i; 1..N) A[i] = S[i] == 'W' ? A[i-1]+1 : A[i-1]; // i番目含め左から今までのEの個数 // C[i] = (i+1) - A[i]; // 下二行はどちらも同じ結果をもつ //auto C = iota(1, N+1).map!(a => a - A[a-1]).array; // aut...
D
import std.stdio, std.conv, std.functional, std.string; import std.algorithm, std.array, std.container, std.range, std.typecons; import std.bigint, std.numeric, std.math, std.random; import core.bitop; string FMT_F = "%.10f"; static File _f; void file_io(string fn) { _f = File(fn, "r"); } static string[] s_rd; T _RD(...
D
import std.stdio, std.conv, std.string, std.algorithm, std.math, std.array, std.container, std.typecons; void main() { string s = readln.chomp; foreach(c;s) write("x"); writeln(); }
D
import std.conv, std.functional, std.range, std.stdio, std.string; import std.algorithm, std.array, std.bigint, std.bitmanip, std.complex, std.container, std.math, std.mathspecial, std.numeric, std.regex, std.typecons; import core.bitop; class EOFException : Throwable { this() { super("EOF"); } } string[] tokens; stri...
D
void main() { import std.stdio, std.string, std.conv; auto rd = readln.split.to!(int[]); int N = rd[0], Y = rd[1]; foreach (x ; 0 .. N + 1) { foreach (y ; 0 .. N + 1 - x) { int z = N - x - y; if (10000*x + 5000*y + 1000*z == Y) { writeln(x, ' ', y, ' ',...
D
import std.stdio; import std.conv; import std.string; import std.typecons; import std.algorithm; import std.array; import std.range; import std.math; import std.regex : regex; import std.container; import std.bigint; void main() { auto s = readln.chomp.array; foreach (i;iota(0, s.length, 2)) write(s[i]); writel...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric; void main() { auto N = readln.chomp.to!int; auto js = new int[](N); foreach (a; readln.split.to!(int[])) ++js[a-1]; foreach (j; js) writeln(j); }
D
void main() { int n = readln.chomp.to!int; bool ok; foreach (i; 0 .. 26) { foreach (j; 0 .. 15) { if (4 * i + 7 * j == n) ok = true; } } writeln(ok ? "Yes" : "No"); } import std.stdio; import std.string; import std.array; import std.conv; import std.algorithm; import std...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric; void main() { auto N = readln.chomp.to!int; auto S = readln.chomp.to!(wchar[]); int cost; foreach_reverse (c; S[1..$]) { if (c == 'E') ++cost; } auto min_cost = cost; for (int p =...
D
import std.stdio, std.string, std.array, std.algorithm, std.conv, std.typecons, std.numeric, std.math; void main() { for (;;) { auto wh = readln.split.to!(int[]); auto W = wh[0]; auto H = wh[1]; if (W == 0 && H == 0) return; auto MAP = new char[][](2*H-1, 2*W-1); fo...
D
import std; alias sread = () => readln.chomp(); alias lread = () => readln.chomp.to!long(); alias aryread(T = long) = () => readln.split.to!(T[]); //aryread!string(); //auto PS = new Tuple!(long,string)[](M); //x[]=1;でlong[]全要素1に初期化 void main() { string a; string b; string c; scan(a, b, c); // writ...
D
import std.stdio; import std.string; import std.conv; void main() { auto a = to!long( split(readln())[0] ) ; writeln(a/3); }
D
import std.stdio, std.string, std.conv; import std.range, std.algorithm, std.array, std.typecons, std.container; import std.math, std.numeric, core.bitop; enum inf3 = 1_001_001_001; enum inf6 = 1_001_001_001_001_001_001L; enum mod = 1_000_000_007L; void main() { int n; scan(n); string a, b, c; scan(a...
D
import std.algorithm; import std.array; import std.container; import std.conv; import std.range; import std.stdio; import std.string; void main() { auto n = readln.chomp.to!int; auto s = readln.chomp.split.map!(to!int).array; auto q = readln.chomp.to!int; auto t = readln.chomp.split.map!(to!int).array; auto...
D
import std.stdio, std.string, std.conv; import std.range, std.algorithm, std.array, std.typecons, std.container; import std.math, std.numeric, core.bitop; enum inf = 1_001_001_001; enum inf6 = 1_001_001_001_001_001_001L; enum mod = 1_000_000_007L; void main() { int H, W; scan(H, W); auto b = new bool[][...
D
import std.stdio; import std.string; import std.conv; import std.algorithm; import std.math; immutable limitList = 100000; void main() { int input; bool[] listNumbers = new bool[](limitList); int[] listPrimeNumbers; //List of prime numbers. listNumbers.fill(true); listNumbers[0..2] = false; ...
D
import std.stdio, std.string, std.conv; import std.range, std.algorithm, std.array, std.typecons, std.container; import std.math, std.numeric, core.bitop; enum inf3 = 1_001_001_001; enum inf6 = 1_001_001_001_001_001_001L; enum mod = 1_000_000_007L; void main() { long a, b, c, x, y; scan(a, b, c, x, y); l...
D
void main() { auto N = rs; auto S = N.map!(a => a.to!int - '0').sum; if(N.to!int%S==0) "Yes".writeln; else "No".writeln; } // =================================== import std.stdio; import std.string; import std.conv; import std.algorithm; import std.range; import std.traits; import std.math; import std.container; ...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric, core.bitop; void main() { auto N = readln.chomp.to!int; uint[] ss; foreach (_; 0..N) { uint s; foreach (i, f; readln.split) if (f == "1") s |= (1<<i); ss ~= s; } long[][] p...
D
import std.stdio, std.conv, std.string, std.algorithm, std.range; void main() { auto input = readln.split.to!(int[]); auto A = input[0]; auto B = input[1]; auto N = 1; auto count=0; while(N < B) { N--; N+=A; count++; } count.writeln; }
D
import std.stdio, std.algorithm, std.conv, std.array, std.string; void main() { auto s = readln.chomp; auto cnt = 0; char last = s[0]; foreach (c; s[1..$]) { if (c != last) { ++cnt; last = c; } } writeln(cnt); }
D
import std.stdio, std.string, std.range, std.conv, std.array, std.algorithm, std.math, std.typecons, std.functional; void main() { struct Query { long p, q; } auto tmp = readln.split.to!(long[]); const N = tmp[0], M = tmp[1], Q = tmp[2]; auto count = new long[][](N+1,N+1); foreach (i; 0..M) { ...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric; void main() { auto ab = readln.split.to!(int[]); auto A = ab[0]; auto B = ab[1]; foreach (n; 1..20000) { if ((n*0.08).to!int == A && (n*0.1).to!int == B) { writeln(n); ...
D
import std.stdio; import std.string; import std.array; // split import std.conv; // to void main() { string n = chomp(readln()); string m = chomp(readln()); if(n[0] == m[2] && n[1] == m[1] && n[2] == m[0]){ writeln("YES"); } else { writeln("NO"); } }
D
import std.stdio, std.string, std.conv, std.algorithm; void main() { int[] buf = readln.chomp.split.to!(int[]); int a = buf[0], b = buf[1], x = buf[2]; if (a == x || a < x && a + b >= x) { writeln("YES"); } else { writeln("NO"); } }
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric; void main() { auto abq = readln.split.to!(int[]); auto A = abq[0]; auto B = abq[1]; auto Q = abq[2]; long[] ss = [long.min/5], ts = [long.min/5]; foreach (_; 0..A) ss ~= readln.chomp.to!long; ...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math, std.typecons, std.numeric, std.container, std.range; void main() { auto nd = readln.split.to!(int[]); auto N = nd[0]; long D = nd[1]; int c; foreach (_; 0..N) { auto xy = readln.split.to!(long[]); if (xy[0]^...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string; long P = 10^^9+7; void main() { auto nm = readln.split.to!(long[]); auto n = nm[0] > nm[1] ? nm[0] : nm[1]; auto m = n == nm[0] ? nm[1] : nm[0]; if (n == m || n == m+1) { long x = 1; foreach (i; 2..n+1) x = (x*i)%P; ...
D
import std.conv, std.functional, std.range, std.stdio, std.string; import std.algorithm, std.array, std.bigint, std.complex, std.container, std.math, std.numeric, std.regex, std.typecons; import core.bitop; class EOFException : Throwable { this() { super("EOF"); } } string[] tokens; string readToken() { for (; tokens....
D
import std.algorithm; import std.array; import std.conv; import std.math; import std.range; import std.stdio; import std.string; import std.typecons; T read(T)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readint = read!int; alias readints = reads!int; /// double で計算しても AC はと...
D
import std.stdio, std.string, std.conv; import std.range, std.algorithm, std.array, std.typecons, std.container; import std.math, std.numeric, core.bitop; void main() { int n, k; scan(n, k); writeln(1 + (n - k + k - 2) / (k - 1)); } void scan(T...)(ref T args) { ...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string, std.math; int[3][3] CS; void main() { foreach (i; 0..3) CS[i][] = readln.split.to!(int[])[]; foreach (a1; 0..201) { if (a1 > CS[0][0] || a1 > CS[0][1] || a1 > CS[0][2]) continue; auto b1 = CS[0][0] - a1; if (b1...
D
// import chie template :) {{{ static if (__VERSION__ < 2090) { import std.stdio, std.algorithm, std.array, std.string, std.math, std.conv, std.range, std.container, std.bigint, std.ascii, std.typecons, std.format, std.bitmanip, std.numeric; } else { import std; } // }}} // nep.scanner {{{ class Scanner { ...
D
import std.stdio, std.string, std.conv; import std.algorithm, std.array; immutable MOD = 1_000_000_007; auto solve(string s_) { auto NC = s_.split.map!(to!int); immutable N=NC[0], C=NC[1]; immutable A = readln.split.map!(to!long).array(); immutable B = readln.split.map!(to!long).array(); immutabl...
D
import std.stdio, std.conv, std.string, std.array, std.range, std.algorithm, std.container; import std.math, std.random, std.bigint, std.datetime, std.format; void main(string[] args){ if(args.length > 1) if(args[1] == "-debug") DEBUG = 1; solve(); } void log()(){ writeln(""); } void log(T, A ...)(T t, lazy A a){ if(DE...
D
import std.stdio; import std.string; import std.conv; import std.algorithm; import std.array; void main(){ auto N = readln.chomp.to!int; writeln(N*(N+1)/2); }
D
import std.stdio, std.string, std.conv; import std.range, std.algorithm, std.array, std.typecons, std.container; import std.math, std.numeric, core.bitop; enum inf = 1_001_001_001; enum infl = 1_001_001_001_001_001_001L; enum mod = 1_000_000_007L; void main() { int n; scan(n); int a, b; scan(a, b); ...
D
import std.stdio; import std.conv; import std.string; import std.typecons; import std.algorithm; import std.array; import std.range; import std.math; import std.regex : regex; import std.container; import std.bigint; import std.ascii; void main() { auto n = readln.chomp.to!int; auto a = new long[](n); auto b =...
D
import std.stdio, std.algorithm, std.conv, std.array, std.string; void main() { auto abcd = readln.split.to!(int[]); auto a = abcd[0]; auto b = abcd[1]; auto c = abcd[2]; auto d = abcd[3]; if (b <= c || d <= a) { writeln(0); } else if (a <= c) { writeln(b < d ? b - c : d - ...
D
import std.stdio, std.string, std.conv; import std.range, std.algorithm, std.array, std.typecons, std.container; import std.math, std.numeric, core.bitop; enum inf = 1_001_001_001; enum inf6 = 1_001_001_001_001_001_001L; enum mod = 1_000_000_007L; void main() { long N; scan(N); auto ans = N^^3; write...
D
void main() { long[] tmp = readln.split.to!(long[]); long n = tmp[0], m = tmp[1]; long scc = min(n, m/2); scc += (m - 2 * scc) / 4; scc.writeln; } import std.stdio; import std.string; import std.array; import std.conv; import std.algorithm; import std.range; import std.math; import std.numeric; i...
D
import std.algorithm, std.container, std.conv, std.math, std.range, std.typecons, std.stdio, std.string; auto rdsp(){return readln.splitter;} void pick(R,T)(ref R r,ref T t){t=r.front.to!T;r.popFront;} void readV(T...)(ref T t){auto r=rdsp;foreach(ref v;t)pick(r,v);} void main() { int a, b, c; readV(a, b, c); wri...
D
import std.stdio; import std.string; import std.conv; import std.algorithm; import std.math; import std.array; import std.range; import std.regex; void main(){ auto a=readln.chomp.to!int; if(a<1200)writeln("ABC"); else if(a>=1200&&a<2800)writeln("ARC"); else writeln("AGC"); }
D
import std.stdio; import std.conv; import std.string; import std.typecons; import std.algorithm; import std.array; import std.range; import std.math; import std.regex : regex; import std.container; void main() { foreach (line; stdin.byLine) { auto str = line.chomp; if (str.length == 1) break; auto aScore = str[...
D
import std.stdio; import std.range; import std.array; import std.string; import std.conv; import std.typecons; import std.algorithm; import std.container; import std.typecons; import std.random; import std.csv; import std.regex; import std.math; import core.time; import std.ascii; import std.digest.sha; import std.outb...
D
import std.stdio; import std.string; import std.conv; import std.algorithm.searching; void main(){ auto str = readln.chomp; if(str.canFind("a") && str.canFind("b") && str.canFind("c")){ "Yes".writeln; }else{ "No".writeln; } }
D
void main() { (48 - ri).writeln; } // =================================== import std.stdio; import std.string; import std.conv; import std.algorithm; import std.range; import std.traits; import std.math; import std.bigint; import std.numeric; import std.conv; import std.typecons; import std.uni; import std.ascii; im...
D
'use strict'; var clear = require('es5-ext/array/#/clear') , eIndexOf = require('es5-ext/array/#/e-index-of') , setPrototypeOf = require('es5-ext/object/set-prototype-of') , callable = require('es5-ext/object/valid-callable') , d = require('d') , ee = require('ev...
Java
'use strict'; const TYPE = Symbol.for('type'); class Data { constructor(options) { // File details this.filepath = options.filepath; // Type this[TYPE] = 'data'; // Data Object.assign(this, options.data); } } module.exports = Data;
Java
package sodium // #cgo pkg-config: libsodium // #include <stdlib.h> // #include <sodium.h> import "C" func RuntimeHasNeon() bool { return C.sodium_runtime_has_neon() != 0 } func RuntimeHasSse2() bool { return C.sodium_runtime_has_sse2() != 0 } func RuntimeHasSse3() bool { return C.sodium_runtime_has_sse3() != 0 ...
Java
function collectWithWildcard(test) { test.expect(4); var api_server = new Test_ApiServer(function handler(request, callback) { var url = request.url; switch (url) { case '/accounts?username=chariz*': let account = new Model_Account({ username: 'charizard' }); return void callback(null, [ ...
Java
<?php interface Container { /** * Checks if a $x exists. * * @param unknown $x * * @return boolean */ function contains($x); }
Java
/* * Read and write JSON. * * Copyright (c) 2014 Marko Kreen * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "A...
Java
angular.module('appTesting').service("LoginLocalStorage", function () { "use strict"; var STORE_NAME = "login"; var setUser = function setUser(user) { localStorage.setItem(STORE_NAME, JSON.stringify(user)); } var getUser = function getUser() { var storedTasks = localStorage.getIte...
Java
/* Copyright information is at end of file */ #include "xmlrpc_config.h" #include <stddef.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include "stdargx.h" #include "xmlrpc-c/base.h" #include "xmlrpc-c/base_int.h" #include "xmlrpc-c/string_int.h" static void getString(xmlrpc_env *const envP, ...
Java
// flow-typed signature: d37503430b92ad584be6e2c6f8d1fc08 // flow-typed version: <<STUB>>/ua-parser-js_v1.0.2/flow_v0.171.0 /** * This is an autogenerated libdef stub for: * * 'ua-parser-js' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with ...
Java
/* ISC license. */ #include <bearssl.h> #include <s6-networking/sbearssl.h> int sbearssl_skey_to (sbearssl_skey const *l, br_skey *k, char *s) { switch (l->type) { case BR_KEYTYPE_RSA : sbearssl_rsa_skey_to(&l->data.rsa, &k->data.rsa, s) ; break ; case BR_KEYTYPE_EC : sbearssl_ec_skey_to...
Java
/* * The MIT License * Copyright (c) 2012 Matias Meno <m@tias.me> */ @-webkit-keyframes passing-through { 0% { opacity: 0; -webkit-transform: translateY(40px); -moz-transform: translateY(40px); -ms-transform: translateY(40px); -o-transform: translateY(40px); trans...
Java
/* eslint-disable no-console */ const buildData = require('./build_data'); const buildSrc = require('./build_src'); const buildCSS = require('./build_css'); let _currBuild = null; // if called directly, do the thing. buildAll(); function buildAll() { if (_currBuild) return _currBuild; return _currBuild = P...
Java
// // RCWorkspaceCache.h // // Created by Mark Lilback on 12/12/11. // Copyright (c) 2011 . All rights reserved. // #import "_RCWorkspaceCache.h" @interface RCWorkspaceCache : _RCWorkspaceCache //if multiple values are to be set, it best to get properties, set them, and then call setProperties //each call to setPr...
Java
function LetterProps(o, sw, sc, fc, m, p) { this.o = o; this.sw = sw; this.sc = sc; this.fc = fc; this.m = m; this.p = p; this._mdf = { o: true, sw: !!sw, sc: !!sc, fc: !!fc, m: true, p: true, }; } LetterProps.prototype.update = function (o, sw, sc, fc, m, p) { ...
Java
/*! * DASSL solver library description */ #include "libinfo.h" extern void _start() { _library_ident("DAE solver library"); _library_task("interfaces to generic IVP solver"); _library_task("operations on data for included solvers"); _library_task("DASSL solver backend"); _library_task("RADAU solver backend")...
Java
/* * WARNING: do not edit! * Generated by util/mkbuildinf.pl * * Copyright 2014-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the s...
Java
System.register(["angular2/test_lib", "angular2/src/test_lib/test_bed", "angular2/src/core/annotations_impl/annotations", "angular2/src/core/annotations_impl/view", "angular2/src/core/compiler/dynamic_component_loader", "angular2/src/core/compiler/element_ref", "angular2/src/directives/if", "angular2/src/render/dom/dir...
Java
--- name: Dreadnought type: AV speed: 15cm armour: 3+ cc: 4+ ff: 4+ special_rules: - walker notes: | Armed with either a Missile Launcher and Twin Lascannon, or an Assault Cannon and Power Fist. weapons: - id: missile-launcher multiplier: 0–1 - id: twin-lascannon multiplier: 0–1 - id: ...
Java
/* * DISTRHO Plugin Framework (DPF) * Copyright (C) 2012-2014 Filipe Coelho <falktx@falktx.com> * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this * permission notice appear in all copies. ...
Java
// The following are instance methods and variables var Note = Class.create({ initialize: function(id, is_new, raw_body) { if (Note.debug) { console.debug("Note#initialize (id=%d)", id) } this.id = id this.is_new = is_new this.document_observers = []; // Cache the elements this.ele...
Java
// Copyright (c) 2021 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package indexers import ( "context" "fmt" "sync" "sync/atomic" "github.com/decred/dcrd/blockchain/v4/internal/progresslog" "github.com/decred/dcrd/database/v3" "github...
Java
@echo off CLS %header% echo. if not exist "Programme\HackMii Installer" mkdir "Programme\HackMii Installer" echo Downloade den HackMii Installer... start /min/wait Support\wget -c -l1 -r -nd --retr-symlinks -t10 -T30 --random-wait --reject "*.html" --reject "%2A" --reject "get.php@file=hackmii_installer_v1.0*" "http:...
Java
# Limit rozbieżności **Ostrzeżenie! Ustawienie granicy rozbieżności nie powinno być zmieniane.** Zwiększenie granicy rozbieżności może spowodować znaczny spadek wydajności. Limit rozbieżności określa ilość adresów, które portfel wygeneruje i przeprowadzi prognozy, aby określić wykorzystanie. Domyślnie, limit rozbieżn...
Java
enum asmop { ASNOP = 0, ASSTB, ASSTH, ASSTW, ASSTL, ASSTM, ASSTS, ASSTD, ASLDSB, ASLDUB, ASLDSH, ASLDUH, ASLDSW, ASLDUW, ASLDL, ASLDS, ASLDD, ASADDW, ASSUBW, ASMULW, ASMODW, ASUMODW, ASDIVW, ASUDIVW, ASSHLW, ASSHRW, ASUSHRW, ASLTW, ASULTW, ASGTW, ASUGTW, ASLEW, ASULEW, ASGEW, ASUGEW...
Java
// Copyright (c) 2013-2015 The btcsuite developers // Copyright (c) 2015 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package wire_test import ( "bytes" "io" "reflect" "testing" "time" "github.com/davecgh/go-spew/spew" "github.com/de...
Java
describe('dJSON', function () { 'use strict'; var chai = require('chai'); var expect = chai.expect; var dJSON = require('../lib/dJSON'); var path = 'x.y["q.{r}"].z'; var obj; beforeEach(function () { obj = { x: { y: { 'q.{r}': { z: 635 }, q: {...
Java
/* * 94 shifted lines of 72 ASCII characters. */ static const char *characters[] = { "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefgh", "\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghi", "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`...
Java
#include <stdarg.h> #include <stddef.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <sys/endian.h> #include <sysexits.h> #include <mpg123.h> #include "audio.h" #include "mp3.h" struct mp3 { mpg123_handle *h; int fd; int first; int rate; int chann...
Java
package main import ( "testing" ) func TestParseHdbSignatureRow(t *testing.T) { signature := new(signature) sample := "e11c2aff804ca144a3e49c42d6ac5783:1006:Exploit.CVE_2012_0779" sig := parseHdbSignatureRow(sample, signature) if sig.Size != 1006 { t.Fatal("Error parsing HDB or HSB signature length") } if ...
Java
/* * Copyright 2005-2019 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/lice...
Java
/** * The MIT License Copyright (c) 2015 Teal Cube Games * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modi...
Java
-- Section: Internal Functions -- Group: Low-level event handling \i functions/pgq.batch_event_sql.sql \i functions/pgq.batch_event_tables.sql \i functions/pgq.event_retry_raw.sql \i functions/pgq.find_tick_helper.sql -- \i functions/pgq.insert_event_raw.sql \i lowlevel/pgq_lowlevel.sql -- Group: Ticker \i functio...
Java
#AtaK ##The Atari 2600 Compiler Kit AtaK, pronounced attack, is a collection of programs built to aid in the development of Atari 2600 programs. ##Programs(Planned/Developing): * AtaR(ah-tar), The **Ata**ri 2600 Assemble**r** * AtaC(attack), The **Ata**ri 2600 **C** Compiler ##Universal Features: * Programmed ...
Java
/* Copyright (c) 2016, 2021 Dennis Wölfing * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR D...
Java
from django import forms from django.core.exceptions import ValidationError from django.core.validators import validate_slug from django.db import models from django.utils import simplejson as json from django.utils.text import capfirst from django.utils.translation import ugettext_lazy as _ from philo.forms.fields im...
Java
# gulp boilerplate run `npm start` then open another termianl run `gulp watch` ,change some files for browser-syn ## Gulp tasks * gulp * gulp prod
Java
/*- * builtin.c * This file is part of libmetha * * Copyright (c) 2008, Emil Romanus <emil.romanus@gmail.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear...
Java
/* Copyright (c) 2019, 2022 Dennis Wölfing * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR D...
Java
<?php /** * Time Controller * * @package Argentum * @author Argentum Team * @copyright (c) 2008 Argentum Team * @license http://www.argentuminvoice.com/license.txt */ class Time_Controller extends Website_Controller { /** * Creates a new time block on a ticket */ public function add($ticket_id) { ...
Java
var fusepm = require('./fusepm'); module.exports = fixunoproj; function fixunoproj () { var fn = fusepm.local_unoproj("."); fusepm.read_unoproj(fn).then(function (obj) { var inc = []; if (obj.Includes) { var re = /\//; for (var i=0; i<obj.Includes.length;i++) { if (obj.Includes[i] === '*') { inc....
Java
import mod437 from './mod437'; var value=mod437+1; export default value;
Java
<!DOCTYPE html> <html> <head> <title>Hello World!</title> <script src="lib/js/angular.min.js"></script> <script src="lib/js/angular-route.min.js"></script> <script src="lib/js/angular-animate.min.js"></script> <script src="lib/js/angular-aria.min.js"></script> <scrip...
Java
const defaults = { base_css: true, // the base dark theme css inline_youtube: true, // makes youtube videos play inline the chat collapse_onebox: true, // can collapse collapse_onebox_default: false, // default option for collapse pause_youtube_on_collapse: true, // default option for pausing yo...
Java
'use strict'; const expect = require('expect.js'); const http = require('http'); const express = require('express'); const linkCheck = require('../'); describe('link-check', function () { this.timeout(2500);//increase timeout to enable 429 retry tests let baseUrl; let laterCustomRetryCounter; befor...
Java
--- layout: post title: More Office Interop in PowerShell --- As part of our team's workflow we create various data files and then generate tracking issues that we then import into our issue tracking system. We have a semi-automated process to do this which works fairly well but for some older issues we had imported ...
Java
/* Copyright (c) 2018 Dennis Wölfing * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI...
Java