This file contains 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
var Firebase = require("firebase"); | |
var express = require("express"); | |
// Create HTTP Server | |
var app = express(); | |
var server = require("http").createServer(app); | |
// Attach Socket.io server | |
var io = require("socket.io")(server); | |
// Indicate port 3000 as host | |
var port = process.env.PORT || 3000; |
This file contains 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 ( | |
"encoding/json" | |
"fmt" | |
) | |
type Person struct { | |
Name string | |
Age int |
This file contains 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'; | |
class Node { | |
constructor(data) { | |
this.data = data; | |
this.left = undefined; | |
this.right = undefined; | |
} |
This file contains 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
/*- | |
* #%L | |
* Demo Fingerprint Authentication Activity | |
* %% | |
* Copyright (C) 2019 Headspin Inc. | |
* %% | |
* #L% | |
*/ | |
package com.nextunicorn.app; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
include <stdio.h> | |
include <stdlib.h> | |
include <unistd.h> | |
include <sys/wait.h> | |
int main(int argc, char *argv[]) | |
{ | |
printf("hello world (pid:%d)\n", (int) getpid()); | |
int rc = fork(); | |
// Fork failed, let's exit. |
This file contains 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 baseConfig = { | |
mode: "cors", | |
cache: "no-cache", | |
credentials: "same-origin", | |
headers: { | |
"Content-Type": "application/json; charset=utf-8", | |
}, | |
redirect: "follow", | |
referrer: "no-referrer", | |
}; |
This file contains 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 baseConfig = { | |
mode: "cors", | |
cache: "no-cache", | |
credentials: "same-origin", | |
headers: { | |
"Content-Type": "application/json; charset=utf-8", | |
}, | |
redirect: "follow", | |
referrer: "no-referrer", | |
}; |
This file contains 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
async function postLoginData(data) { | |
const loginUrl = `${apiBaseUrl}/login`; | |
let response = await fetch(loginUrl, { | |
method: "POST", | |
mode: "cors", | |
cache: "no-cache", | |
credentials: "same-origin", | |
headers: { | |
"Content-Type": "application/json; charset=utf-8", | |
}, |
This file contains 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
(define (square-of x) | |
(define (average x y) | |
(/ (+ x y) 2)) | |
(define (improve guess x) | |
(average guess (/ x guess))) | |
(define (good-enough? guess x) | |
(< (abs (- (square-of guess) x)) 0.001)) | |
(define (sqrt-iter guess x) | |
(if (good-enough? guess x) | |
guess |