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"; | |
let getErrorRank = err => { | |
let rankCounter = 0; | |
let ranks = new Array(8).fill().map((item, i) => 1 / Math.pow(10, i)).slice(1); | |
for (let i = 0; i < ranks.length; i++) { | |
if (err < ranks[i]) { | |
rankCounter++; | |
} else { |
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
function isSheetExist(sheetName) { | |
return SpreadsheetApp.getActiveSpreadsheet().getSheetByName(sheetName) != null; | |
} | |
function formResponseFilter(e) { | |
if (!e) throw new Error("Please go the Run menu and choose Initialize"); | |
try { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var base = ss.getSheets()[0]; | |
var sheet = null; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<title>News</title> | |
<link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAAAAAAAAAAAAPvzoEf8+ajf8O2g/PXyo9z89qSF9eCKB/TfiQb89qSC9vKj2fDtoPj8+ajb+/OfRQAAAAAAAAAAAAAAAAAAAAD9+qjR4eGZ/9XVkf/X15L/+/ur//z1omf89aJn+/ur/9fXkv/V1ZH/4eGa//36qNAAAAAAAAAAAAAAAAD14owX9fSm/tXVkf/V1ZH/1dWR//Pzpf/896WA/PelgPPzpf/V1ZH/1dWR/9XVkf/19Kb+9eKMFgAAAAAAAAAA+/KfT+7uov/V1ZH/1dWR/9XVkf/29qj/+/KfUfvzn1L29qj/1dWR/9XVkf/V1ZH/7u6i//vyn04AAAAAAAAAAPz3pYPo6J7/1dWR/9XVkf/Z2ZT//vyr+fXijBH14owS/vyr+djYk//V1ZH/1dWR/+jonv/896WCAAAAAAAAAAD155G2xrta/9XVkf/V1ZH/49+T//35p7sAAAAAAAAAAP35qLzj35T/1dWR/9XVkf/Gu1v/9eiStQAAAADx1X0CyrRH6Ma/Zv/V1ZH/1dWR/8W6Wf/u3YN5AAAAAAAAAADv3oR5xbpZ/9XVkf/V1ZH/xr9l/8u1SOjx1X0C7dF4KrmoNv/U1I7/1dWR/9XVkf/QzHr/x7FCmwAAAAAAAAAAx7FCmtDMev/V1ZH/1dWR/9TUjv+5qDX/7dF4KeDHZnbDu1z/1dWR/9XVkf/V1ZH/2dmU/9XBWq0AAAAAAAA |
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 <iostream> | |
#include <cstdio> | |
#include <cstring> | |
#include <cmath> | |
using namespace std; | |
const int n = 4; | |
void lu(float[n][n], float[n][n], float[n][n], int n); |
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
git ls-files -co --exclude-standard | grep '\.java$' | xargs git add |
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
window.onload = function () { | |
// this simple machine prints "Hello" and stops | |
var instance = new Machine({ | |
// a finite, non-empty set of states | |
states : [0, 1, 2, 3, 5], | |
// a finite, non-empty set of the tape alphabet/symbols | |
alphabet : ['_', 'H', 'e', 'l', 'o'], | |
// the blank symbol (the only symbol allowed to occur on the | |
// tape infinitely often at any step during the computation) | |
blank : '_', |
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
import { Injectable } from 'angular2/core'; | |
import { Storage } from './storage'; | |
import { CurrentUser } from '../interfaces/common'; | |
@Injectable() | |
export class Authentication{ | |
private _storageService : Storage; | |
private _userKey : string = "CURRENT_USER"; | |
constructor(storageService : Storage){ |
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 beautify = require('js-beautify').js_beautify, | |
fs = require('fs'), | |
path = require('path'); | |
var walk = (dir, callback) => { | |
var results = []; | |
fs.readdir(dir, (err, list) => { | |
if (err) { | |
return callback(err); | |
} |
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
// AppRegistry.cs | |
using System; | |
using Microsoft.Win32; | |
namespace fountain_writer | |
{ | |
/// <summary> | |
/// Registry helper class | |
/// </summary> | |
public class AppRegistry |
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
/** | |
* @return base64 url of an image | |
*/ | |
export function pickImage(options: ImagePickerOptions = {}): Promise<string> { | |
interface ImagePath { | |
name: string; | |
dir: string; | |
path: string; | |
}; |