Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \
describe('Electron renderer process', function() { | |
describe('document object', function() { | |
it('is an Document object', function() { | |
expect(window.document).to.be.an.instanceof(Document); | |
}); | |
}); | |
}); |
#!/bin/bash | |
value=$(dialog --rangebox 'Gamma' 10 72 -10 10 0 2>&1 >/dev/tty) | |
[[ $? -ne 0 ]] && exit 1 | |
gamma=$(python -c "print(10 ** ($value / 10))") | |
xgamma -gamma $gamma | |
xgamma 2>&1 | cut -f 10 -d' ' |
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <vector> | |
#include <cstdio> | |
constexpr std::chrono::milliseconds operator""_tick(unsigned long long int tick) { | |
return std::chrono::milliseconds(tick * 200); | |
} |
<style> | |
.popup { | |
position: relative; | |
left: 32px; | |
right: 32px; | |
bottom: 32px; | |
background-color: #333; | |
color: white; | |
position: fixed; | |
padding: 16px; |
#!/bin/sh | |
print_primes() { | |
for i in `seq 6 $1`; do | |
test=$(echo $i | factor | awk 'NF==2{print $2}') | |
if [ -n "$test" ]; then | |
echo $i | |
fi | |
done | |
} |
function waitForKintone(success, error, timeout) { | |
const startAt = new Date().getTime(); | |
function recursive() { | |
if (window.hasOwnProperty('kintone')) { | |
console.log("has kintone"); | |
func(); | |
} else if (new Date().getTime() - startAt > timeout) { | |
console.log("not has kintone"); | |
error(); |
String synchronizedHeavyMethod(Duration timeout) throws TimeoutException { | |
Instant deadline = Instant.now().plus(timeout); | |
while (Instant.now().isBefore(deadline)) { | |
// doSomething() resutrns nullable String | |
String result = doSomething(); | |
if (Objects.isNull(result)) { | |
continue; | |
} | |
return result; | |
} |
April 2017 | |
Su Mo Tu We Th Fr Sa | |
1 | |
2 3 4 5 6 7 8 | |
9 10 11 12 13 14 15 | |
16 17 18 19 20 21 22 | |
23 24 25 26 27 28 29 | |
30 |
var page = require('webpage').create(); | |
page.open('http://www.tamagoya.co.jp/menu_list.html', function() { | |
var rect = page.evaluate(function() { | |
var menuDate = Array.prototype.find.call( | |
document.querySelectorAll('.menutitle_date'), | |
(e) => e.textContent.includes("26") ); | |
var menuTitle = menu_date.parentElement; | |
var menuList = menuTitle.nextElementSibling | |
var menuBottom = menuList.nextElementSibling |