This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
- Introduction
- Installing Node.js
- Installing MySQL
- Setting-up the project
// ES7, async/await | |
function sleep(ms = 0) { | |
return new Promise(r => setTimeout(r, ms)); | |
} | |
(async () => { | |
console.log('a'); | |
await sleep(1000); | |
console.log('b'); | |
})() |
function lbPick (a){ | |
var str = ''; | |
a.forEach(function(field){ | |
str+='&filter[fields]['+field+']=1'; | |
}); | |
return str; | |
} | |
function lbGetPage(page){ | |
var str = '&filter[limit]=50&filter[skip]=' + ((page-1) * 50); |
function duckCount(){ | |
function Count(args,pos,count){ | |
if(pos<args.length) return Count(args,pos+1,count + Object.prototype.hasOwnProperty.call(args[pos], "quack") ? 1 : 0) | |
else return count | |
} | |
return Count(arguments,0,0); | |
} | |
module.exports = duckCount |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
This tutorial uses the "Sample hapi.js REST API" project.
Take a look at: https://github.com/agendor/sample-hapi-rest-api/
##Topics
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
<!-- include jQuery --> | |
<script> | |
$('form').find('input:text').val( function(i, val) { | |
return $(this).attr('name'); | |
}); | |
$('form').find('select').each( function(a) { | |
$(this).find('option').each( function(b) { | |
if ( $(this).val() !== '' ) { | |
$(this).parent().val( $(this).val() ); |
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |