export npm_config_target=1.2.3
export npm_config_arch=x64 export npm_config_target_arch=x64
export npm_config_disturl=https://atom.io/download/atom-shell
export npm_config_runtime=electron
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "time" | |
| "flag" | |
| ) | |
| func getRandomStrings(str_len int) string { |
| import Html exposing (..) | |
| -- union type for clipboard state | |
| type ClipboardState = Active | Inactive | Other String | |
| main = | |
| text (toString report) | |
| -- type anotation for reportState function |
| //in the route | |
| route.post('/api/user', (req, res, next) => { | |
| UserModel.insert(req.signUpData, (err, NewUser) => { | |
| if(err) { | |
| //i can do this | |
| const NoUserError = new Error(); | |
| noUserError.code = 1111; | |
| next(NoUserError) | |
| //or this if i have mapped mongo's native duplicate_key constrain error in the mapper |
| 'use strict'; | |
| const _ = require('lodash'); | |
| const errors = [ | |
| { | |
| code: 404, | |
| httpStatus: 404, | |
| errorTemplate: '${resourceName} resource not found' | |
| }, | |
| { |
| object UnifiedTypes extends App { | |
| val set = new scala.collection.mutable.LinkedHashSet[Any] | |
| set += "This is a string" // add a string | |
| set += 732 // add a number | |
| set += 'c' // add a character | |
| set += true // add a boolean value | |
| set += main _ // add the main function | |
| val iter: Iterator[Any] = set.iterator | |
| while (iter.hasNext) { | |
| println(iter.next.toString()) |
| function Harvester(options){ | |
| const socket = new net.Socket(); | |
| socket.connect({port:options.port, host:options.host}, ()=>{ | |
| socket.write(`+node|${options.node}\r\n`); | |
| }); | |
| socket.on('connect', (socket) => console.log('Connected to Log Harvester!')); | |
| socket.on('data', (data) => console.log('Message from Logio Server: ', data)); | |
| socket.on('error', (error) => console.log('Error from Logio Server: ', error.message)); | |
| socket.on('close', (error) => { | |
| console.log(!error ? 'Client connection closed' : 'Client connection closed with Error'); |
| pkt-line = data-pkt / flush-pkt | |
| data-pkt = pkt-len pkt-payload | |
| pkt-len = 4*(HEXDIG) | |
| pkt-payload = (pkt-len - 4)*(OCTET) | |
| flush-pkt = "0000" |
| HTTP transfer protocols | |
| ======================= | |
| Git supports two HTTP based transfer protocols. A "dumb" protocol | |
| which requires only a standard HTTP server on the server end of the | |
| connection, and a "smart" protocol which requires a Git aware CGI | |
| (or server module). This document describes both protocols. | |
| As a design feature smart clients can automatically upgrade "dumb" | |
| protocol URLs to smart URLs. This permits all users to have the |
export npm_config_target=1.2.3
export npm_config_arch=x64 export npm_config_target_arch=x64
export npm_config_disturl=https://atom.io/download/atom-shell
export npm_config_runtime=electron
| I am trying to retrieve something from localstorage but would use that to decide what is served, | |
| so until that happens execution cannot continue. | |
| I feel I am doing something wrong as the getKey property of the LocalStorage retunrs a promise | |
| import { Component, ViewChild } from '@angular/core'; | |
| import { ionicBootstrap, Platform, Nav, LocalStorage , Storage } from 'ionic-angular'; | |
| import { StatusBar, Splashscreen, Push } from 'ionic-native'; |