HTML语言: html5canvas综合
<!DOCTYPE html> <!--13.10.31 16:57-->
<html lang="zh">
<head>
<meta...
Python : How Smart cars to find the path of plan
# Grid format:
# 0 = Navigable space
# 1 = Occupied space
grid = [[0, 0, 1, 0, 0, 0],
[0, 0, 1, 0, 0, 0],
...
Batchfile语言: weeinst
atchfile语言: weeinst
!BAT wee install script for grub4dos by chenall http://chenall.net/post/grub4dos_instwee/
debug off
checkrange 20101230:-1 read 0x8278...
WordPress plugin Custom Smilies expression using the method code
PHP language : WordPress plugin Custom Smilies expression using the method code
<PHP? if ( function_exists ( cs_print_smilies )) { cs_print_smilies...
batch scp
#!/bin/sh
if [ $# -ne 1 ]
then
echo "usage: $0 directory";
exit;
fi
list=$(cat ips | xargs)
for ip in $list
do
scp -r $1 root@$ip:$1
do...
PHP Intercept robot
<?php
function getrobot() {
if(!defined('IS_ROBOT')) {
$kw_spiders = 'Bot|Crawl|Spider|slurp|sohu-search|lycos|robozilla';
...
C++ Recursive perfectionist array analysis
#include "stdafx.h"
#include <iostream>
#include <cmath>
using namespace std;
int a[3]={1,2,3,};
inline void display()
{
cout<<"交换中"<<endl;
...
C++ socket client side
#include<sys/socket.h> //for socket
#include<stdio.h>
#include<unistd.h> // for close
#include<stdlib.h>
#include<arpa/inet.h>
#include<netinet/in.h>
#include<pthread.h>...
C++ UDP Client
#include <iostream>
#include <string>
#include <cstring>
#include <errno.h>
#include <unistd.h>
#include <sys/socket.h>
#include...
Bulk text replaces + shell script to change the file name
Bash Language : batch text replace + shell script to change the file name
#! / Bin / bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # #...
With zeromq of PUB / SUB network model expansion python logging
import os, sys, types
import zmq, logging
import time
class ZMQPUBHandler(logging.Handler):
def __init__(self, host, port):
...
C Language : fork () function
# Include <unistd.h>
<stdio.h> # include
int main ( void ) { int i = 0 ; printf ( "i Son / PA ppid pid FPID \ N " ); / / ppid parent process...
Lianliankan core code
Sub FindPath(ByVal pre_row As Integer, ByVal pre_col As Integer, ByVal cur_row As Integer, ByVal cur_col As Integer)
Dim pre_left As Integer...
Python : Fast row with class methods to find "n-small" number
#coding=utf-8
#
# from: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/269554
# 代码描述:
# O(n) quicksort style algorithm for looking up...
C + + language : median filter
* # include < Algorithm >
using namespace STD ; IplImage * CDrawDlg :: MiddleProssing ( IplImage * img , IplImage * img1 ) { int i , J , k , t...
C Language : snprintf usage
<stdio.h> # Include
# include <stdlib.h>
/ *
int snprintf (char * restrict buf, size_t N, const char * restrict Format, ...);
Function Description:...
c refreshing exception handling
int Function ( void ) { int Err ; Err = operate1 ( ptr1 , "Sk...
Installation under CentOS Oracle 10g
# 挂载CentOS系统安装光盘
dvdFile="//FileServerIp/Share/CentOS-5.5-x86_64-bin-DVD.iso"
dvdDir="/mnt/CentOS_Final"
mount -t iso9660 -o loop "${dvdFile}" "${dvdDir}"
#...
Detection of browser and operating system JavaScript Advanced Programming
/ *
* detect browsers and operating systems
* Book: JavaScript Advanced Programming
* Author: Nicholas C. Zakas
* in the client browser detection is...
Under the current directory txt extension changed to doc
.. # Change the extension, for example, the current directory is changed to doc txt extension: ! # / bin / bash for f in * txt;. do mv "$...
Microsoft elegant black font xterm set methods
通过如下方法可以将Linux 下xterm 终端的字体改为微软雅黑:
修改~/.Xresources就可以了(没有就自己创建一个)
xterm*locale: true
xterm.utf8: true
xterm*utf8Title: true
xterm*faceName: Monaco:pixelsize=14
xterm*faceNameDoublesize:...
Monitor web server and an alarm is sent to the phone
#this script can monitor webserver and send message to fanfou and your mobile phone.
#notice:
#1.change you phone number.
#2.the program "sms"...
Python command line: input method does not require the transport can be entered
Coding = utf-8 # # From: Python-CN Group: http://groups.google.com/group/python-cn/browse_thread/thread/bb729a571cd3b091 # Q: # raw_input input...
Subscribe to:
Posts (Atom)