Skip to content

Instantly share code, notes, and snippets.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
ALTER PROCEDURE [dbo].getNpiD
@lname nvarchar(40) = null,
@fname nvarchar(40) = null,
@npi bigint = null,
@State nvarchar(40) = null
AS
DECLARE @sql nvarchar(MAX),
@paramlist nvarchar(4000)
SELECT @sql = 'SELECT * FROM NPI3 npi
@slofurno
slofurno / gist:c0f04641374623cc2e48
Last active August 29, 2015 14:17
image slideshow
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="image.aspx.cs" Inherits="WebApplication1.image" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
.picture-box{
height:100%;
@slofurno
slofurno / tabs.java
Created April 5, 2015 19:16
w2w gist
package com.github.slofurno.myapplication;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
@slofurno
slofurno / ziparchive.cs
Last active August 29, 2015 14:19
ziparchive
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication5
{
# Blender v2.64 (sub 0) OBJ File: ''
# www.blender.org
o Mesh63_Component_17_8_Model
v -43.885899 11.667700 2.246782
v -43.930401 11.667700 2.118952
v -44.101398 11.667700 1.628182
v -44.158001 11.667700 1.465672
v -44.851002 11.667700 1.707122
v -44.578899 11.667700 2.488232
v -43.930401 12.161100 2.118952
@slofurno
slofurno / json.cs
Created May 6, 2015 20:53
append json
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using Jil;
namespace ConsoleApplication8
{
@slofurno
slofurno / sl.c
Created September 24, 2015 02:05
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
unsigned char rndtable[256] = {
0, 8, 109, 220, 222, 241, 149, 107, 75, 248, 254, 140, 16, 66 ,
74, 21, 211, 47, 80, 242, 154, 27, 205, 128, 161, 89, 77, 36 ,
95, 110, 85, 48, 212, 140, 211, 249, 22, 79, 200, 50, 28, 188 ,
52, 140, 202, 120, 68, 145, 62, 70, 184, 190, 91, 197, 152, 224 ,
149, 104, 25, 178, 252, 182, 202, 182, 141, 197, 4, 81, 181, 242 ,
@slofurno
slofurno / utc.cs
Last active October 12, 2015 19:26
get ms since utc epoch, compatible with js Date
var GetUtcMs = ((Func<Func<DateTime, long>>)(() =>
{
var _utczero = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
return x => (long)((x.ToUniversalTime() - _utczero).TotalMilliseconds);
}))();
@slofurno
slofurno / comb.js
Last active November 1, 2015 03:55
var numbers = ["13", "01", "02", "24", "14", "12", "25"].map(x=>[].slice.call(x)).map(x=>x.concat(x.slice().reverse())).map(x=>x.join("")).map(x=>[x.substr(0,2),x.substr(-2)]);
var perm = function(arr){
if (arr.length===1){
return [arr];
}
var results = [];