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
@shwangdev
shwangdev / Makefile
Created June 23, 2011 05:29
Makefile
C++ = g++
ifndef os
os = LINUX
endif
SRC= $(shell ls *.cpp)
OBJS= $(SRC:%.cpp=%.o)
DIR = $(shell pwd)
Target=test
all: $(Target)
#include<stdio.h>
int gcd( long long int m , long long int n )
{
int t;
if ( m < n )
{
t = m;
m = n ;
n = t;
@shwangdev
shwangdev / build.xml
Created August 16, 2011 10:52
ant build sample
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE project>
<project name="income" default="usage" basedir=".">
<property name="project-name" value="income"/>
<property name="build" value="build"/>
<property name="lib" value="/usr/share/java/"/>
<property name="src" value="income/"/>
#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