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
<?php | |
/** | |
*Plugin Name: Wikipedia_Entry_Inserter | |
*Version: 0.1 | |
*Plugin URI: http://argcandargv.com | |
*Description: insert wikipedia entry with [wiki] and [/wiki] | |
*Author: Yu Jing | |
*Author URI: http://argcandargv.com/ | |
*/ |
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 <string.h> | |
#define LEN 110 | |
using namespace std; | |
char s[200]; // 输入串 | |
int k; // 输入参数 | |
int result[LEN] ; // 存放结果 | |
void M2AA(int a[], int b[], int b1, int c[],int c1) |
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
void storeIntoCSV(hashmap *phmap) | |
{ | |
pNode np; | |
int plen; | |
int i; | |
int j; | |
unsigned long count; | |
pAlist ap = getAuthorList(); | |
FILE *fp; | |
if((fp = fopen("CoAuthor.csv","w")) == 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
// 硬编码就不说什么了,不过真的环境中随意使用硬编码绝对是不可取的 | |
#define N 208 | |
// 命名规则习惯,你这儿说的是1个student,请不要加s | |
typedef struct | |
{ |
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
<?php | |
/** | |
*Plugin Name: Copyright | |
*Version: 0.1 | |
*Plugin URI: http://argcandargv.com | |
*Description: adding link for each single post at its first | |
*Author: Yu Jing | |
*Author URI: http://argcandargv.com/about | |
*/ |
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
/* The MIT License | |
Copyright (c) 2008, by Attractive Chaos <[email protected]> | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to |
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 <cstring> //memset | |
#include <sys/socket.h> | |
#include <netdb.h> //hostent | |
#include <arpa/inet.h> | |
#include <iostream> | |
#include <cstdio> | |
#include <string> | |
using namespace std; |
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
float f_sqrt(float x) | |
{ | |
float xhalf = 0.5f*x; | |
int i = *(int*)&x; // get bits for floating VALUE | |
i = 0x5f375a86- (i>>1); // gives initial guess y0 | |
x = *(float*)&i; // convert bits BACK to float | |
x = x*(1.5f-xhalf*x*x); // Newton step, repeating increases accuracy | |
x = x*(1.5f-xhalf*x*x); // Newton step, repeating increases accuracy | |
x = x*(1.5f-xhalf*x*x); // Newton step, repeating increases accuracy | |
return 1/x; |
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
package util; | |
import java.util.ArrayList; | |
import java.util.List; | |
public abstract class MinHeap<T> { | |
private int sizeLimit; | |
private int size; | |
private List<T> heap; |
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
#!/bin/sh | |
DIR_LIST=`cat filelist` | |
EXC_PATTERN=`cat exclude` | |
tar -czvf .bak.src.`date "+%Y%m%d%H%M%S"`.tar.gz $DIR_LIST | |
rsync -avh --progress --exclude=$EXC_PATTERN [email protected]:xdatacenter_load/ proj/ |
OlderNewer