This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var oracledb = require('oracledb'); | |
var Promise = require('bluebird'); | |
var _ = require('lodash'); | |
var EventEmitter = require('events'); | |
var util = require('util'); | |
var async = require('async'); | |
var NodeDBConnection = require('./NodeDBConnection'); | |
var log ; | |
function validateConfig(config) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Networking | |
https://loopj.com/android-async-http/ | |
https://github.com/koush/ion | |
https://github.com/square/okhttp | |
https://github.com/square/retrofit | |
## Images: | |
https://github.com/bumptech/glide | |
https://github.com/koush/ion | |
http://square.github.io/picasso/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Testing | |
https://www.sitespeed.io/ | |
https://docs.cypress.io | |
## Guideline | |
https://github.com/airbnb/javascript/tree/master/react | |
## Performace | |
https://building.calibreapp.com/debugging-react-performance-with-react-16-and-chrome-devtools-c90698a522ad | |
https://www.keycdn.com/blog/react-performance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fake read file function | |
* @param {*} name : name of file to read | |
* @param {data} cb : content of the file | |
*/ | |
const readFile = (type, name, cb) => { | |
const time = Math.floor(Math.random() * 10 * 1000); | |
const fn = cb.bind(null, `{ type: ${type}, name: ${name}, data: "${name + '_' + time}ms"}`); | |
console.log(`fetching file: ${name} of ${type} in ${time}ms...`) | |
setTimeout(fn, time) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COMMAND=$1 | |
RESET="\033[0m" | |
BOLD="\033[1m" | |
YELLOW="\033[38;5;11m" | |
echo "running in $COMMAND shell mode" | |
while read -r -p "$(echo -e $BOLD$YELLOW"$COMMAND>"$RESET)" | |
do | |
if [ "$REPLY" == "quit" ]; then | |
echo "Quiting $COMMAND shell" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM gradle:latest | |
# FROM openjdk:8-jre-alpine | |
USER root | |
# RUN apk --no-cache add curl | |
ENV SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" \ | |
ANDROID_HOME="/usr/local/android-sdk" \ | |
ANDROID_VERSION=28 \ | |
ANDROID_BUILD_TOOLS_VERSION=29.0.2 | |
# Download Android SDK | |
RUN mkdir "$ANDROID_HOME" .android \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const http = require("http"); | |
const fs = require("fs"); | |
function main() { | |
const server = http.createServer((req, res) => { | |
// console.time("START:NODE"); | |
fs.createReadStream("./test1.txt") | |
.pipe(res) | |
// .on("finish", () => { | |
// console.timeEnd("START:NODE"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"net/http" | |
"os" | |
) | |
func check(e error) { | |
if e != nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For | |
function howMany(selectObject) { | |
let numberSelected = 0; | |
for (let i = 0; i < selectObject.options.length; i++) { | |
if (selectObject.options[i].selected) { | |
numberSelected++; | |
} | |
} | |
return numberSelected; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function labeledLoop() { | |
let x = 0; | |
let z = 0; | |
outer: while (true) { | |
console.log("Outer loops: " + x); | |
x += 1; | |
z = 1; | |
while (true) { | |
console.log("Inner loops: " + z); | |
z += 1; |