Skip to content

Instantly share code, notes, and snippets.

View shwangdev's full-sized avatar
🎯
Focusing

王翔(Shawn Wang) shwangdev

🎯
Focusing
View GitHub Profile
#!/bin/bash
# Author Xiang Wang
# Date 10/13/2010
declare -a H_ARRAY
declare -a W_ARRAY
declare -a L_ARRAY
declare -a R_ARRAY
declare -a S_ARRAY
####### check Parameter
#include<stdio.h>
int gcd( long long int m , long long int n )
{
int t;
if ( m < n )
{
t = m;
m = n ;
n = t;
#include "utf8.h"
inline static unsigned short xml_encode_iso_8859_1(unsigned char);
inline static char xml_decode_iso_8859_1(unsigned short);
inline static unsigned short xml_encode_us_ascii(unsigned char);
inline static char xml_decode_us_ascii(unsigned short);
static void *emalloc(size_t size)
{
void *p = malloc(size);
@shwangdev
shwangdev / CreateDomainUser.vbs
Created October 16, 2011 09:59
CreateDomainUser.vbs
Dim objRoot, objDomain, objOU, objContainer
Dim strName
Dim intUser
Dim Password
Dim OUPrefix
Dim OU
Dim Inc
Inc = 1
OUPrefix = "TMMS"
strName =""
@shwangdev
shwangdev / BigInt.h
Created November 1, 2011 11:17
BigInt.cpp
#ifndef BIGINT_H
#define BIGINT_H
#define BASE unsigned char
#define BASE2 unsigned short
const int yet=sizeof(BASE)*8;
const BASE2 pz=1<<yet;
#include <deque>
#include <vector>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
class DividedByZeroException{};
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
const int SIZE = 10010;
struct node // the node of line tree
{
int i,j; // 区间范围
@shwangdev
shwangdev / valgrindrc
Last active September 28, 2015 04:07
--leak-check=full
--show-reachable=yes
--trace-children=yes
--track-fds=yes
--time-stamp=yes
--track-origins=yes
--dsymutil=yes
--smc-check=all
--read-var-info=yes
--show-emwarns=yes
#!/usr/bin/env python
import time
import threading
import urllib
import httplib2
import re
sum = 25000
concurrent = 1000
#!/usr/bin/env python
# Time-stamp: <2011-12-25 16:34:05 Sunday by devil>
# @version 1.0
# @author ahei
import httplib
import os.path
import urllib2