I hereby claim:
- I am hafthor on github.
- I am hafthor (https://keybase.io/hafthor) on keybase.
- I have a public key whose fingerprint is 02E0 BCF1 DB0D 866C 348D 9414 BA7B 4402 329E 8B25
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| var luhnMap = ['0246813579','0123456789']; | |
| function luhnCheck(value) { | |
| value = value.replace(/\D/g, ''); | |
| return luhnDigit(value.slice(0, -1)) === value.slice(-1); | |
| } | |
| function luhnDigit(value) { | |
| return ('' + value.replace(/\D/g, '').split('').reverse().map(function(d, i) { | |
| return -luhnMap[i % 2][+d]; |
| function searchmap(separator) { | |
| var map = {}; | |
| (location.search || '') | |
| .split("&") | |
| .forEach(function(x) { | |
| var kv = x.split('='), k = kv[0], v = decodeURIComponent(x.substr(k + 1)); | |
| if (separator === undefined) | |
| if (map[k]) | |
| map[k] = [v]; | |
| else |
| // StringConcat.java | |
| public class StringConcat { | |
| public static void main(String[] args) { | |
| String abc = getA() + getB() + getC(); | |
| System.out.println(abc); | |
| } | |
| private static String getA() { | |
| return "ABC"; | |
| } |
| <%@ Page Language="VB" %> | |
| <!DOCTYPE html> | |
| <html> | |
| <head><title></title> | |
| <meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1" /> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
| <link rel="stylesheet" href="http://jquerymobile.com//test/css/themes/default/" /> | |
| <script src="http://jquerymobile.com//test/js/jquery.js"></script> | |
| <script src="http://jquerymobile.com//test/js/"></script> |
| Public Function CalculatePasswordHash(password As String, usernameOrId As String) As Byte() | |
| Static saltBytes = New Byte() {&HDE, &HAD, &HC0, &HDE} | |
| Static h As New SHA512CryptoServiceProvider | |
| Dim o(0 To h.HashSize \ 8 - 1) As Byte | |
| Dim usrBytes = UTF8Encoding.UTF8.GetBytes(usernameOrId) | |
| Dim pwdBytes = UTF8Encoding.UTF8.GetBytes(password) | |
| SyncLock h | |
| h.Initialize() | |
| h.TransformBlock(usrBytes, 0, usrBytes.Length, o, 0) | |
| h.TransformBlock(saltBytes, 0, saltBytes.Length, o, 0) |
| { | |
| "webroot": "wwwroot", | |
| "version": "1.0.0-*", | |
| "dependencies": { | |
| "Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8", | |
| "Microsoft.AspNet.Diagnostics": "1.0.0-beta8" | |
| }, | |
| "commands": { |
| public RethrowingCatch() { | |
| this.dependency = new Dependency(); | |
| try { | |
| this.dependency.SomeProperty = "Blah"; | |
| } catch (Exception) { | |
| dependency.Dispose(); | |
| throw; | |
| } | |
| } |
| console.log(expr('12+34*56')); | |
| function expr(s) { | |
| "use strict"; | |
| const ops = { | |
| '+': function(a,b) { return a+b; }, | |
| '-': function(a,b) { return a-b; }, | |
| '*': function(a,b) { return a*b; }, | |
| '/': function(a,b) { return a/b; } |