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
/*- | |
* #%L | |
* Demo Fingerprint Authentication Activity | |
* %% | |
* Copyright (C) 2019 Headspin Inc. | |
* %% | |
* #L% | |
*/ | |
package com.nextunicorn.app; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 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 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 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 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 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
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 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
(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 |
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
Guess | Quotient | Average | |
---|---|---|---|
1 | 2/1 = 2 | (2 + 1)/2 = 1.5 | |
1.5 | 2/1.5 = 1.3333 | 1.3333 + 1.5/2 = 1.4167 | |
1.4167 | 2/1.4167 = 1.4118 | (1.4167 + 1.4118)/2 = 1.4142 | |
1.4142 | ... | ... |
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
module State = struct | |
type t = int | |
let inc (n: t) = Transformer.inc n | |
end | |
;; | |
module Transformer = struct | |
let inc (n: State.t) = n + 1 | |
end | |
;; |
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
let transpose A = | |
let new_mat = Array.make_matrix (Array.length A.(0)) (Array.length A) 0 | |
in | |
for y = 0 to (Array.length A) - 1 do | |
for x = 0 to (Array.length A) - 1 do | |
new_mat.(y).(x) <- A.(x).(y) | |
done | |
done; | |
new_mat | |
in |