strcmp()所在头文件:string.h功能:比较俩个字符串一般形式:strcmp(字符串1,字符串2)说明:当S1S2时,返回正数return result,result>0俩个字符串自左向右逐个字符比较(按ASCII值大小相比较)知道出现不同的字符或遇“\0“为止如”a“>"A"”A“<"B...
分类:
其他好文 时间:
2014-07-16 22:59:02
阅读次数:
155
1.工厂模式#encoding=utf-8__author__ = 'kevinlu1010@qq.com'class ADD(): def getResult(self,*args): return args[0]+args[1]class SUB(): def getR...
分类:
编程语言 时间:
2014-07-16 22:56:35
阅读次数:
213
--[[ local function onTouch(event, x, y) print(event, x, y) if event == "began" then return true -- 在 bega...
分类:
其他好文 时间:
2014-07-16 22:54:47
阅读次数:
193
在JavaScript中全局变量经常会引起命名冲突,甚至有时侯重写变量也不是按照你想像中的顺序来的,可以看看下面的例子:var sayHello = function(){ return 'Hello var';};function sayHello(name){ return 'Hello fun...
分类:
编程语言 时间:
2014-07-16 22:52:29
阅读次数:
230
1. oncontextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键
return(false)>no 可用于Table
2. "return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. o...
分类:
Web程序 时间:
2014-07-11 00:04:07
阅读次数:
405
#include
#include
#include
#include
#include
using namespace std;
#define point Point
const double eps = 1e-8;
const double PI = acos(-1.0);
double ABS(double x){return x>0?x:-x;}
int sgn(double x){...
分类:
其他好文 时间:
2014-07-10 23:54:16
阅读次数:
253
无标题文档
window.onload=function()
{
var aInput=document.getElementsByTagName("input");
var oT=aInput[0];
//去掉左空格:
function trimL(str)
{
var reg=/^\s+/;
return str.replace(reg,'')...
分类:
其他好文 时间:
2014-07-10 22:27:41
阅读次数:
329
java
public boolean isNumeric(String str){
Pattern pattern = Pattern.compile("^-?[0-9]+\\.?[0-9]+");
Matcher isNum = pattern.matcher(str);
if( !isNum.matches() ){
return fals...
分类:
数据库 时间:
2014-07-10 20:33:27
阅读次数:
255
用户注册 - 当当网
$(function(){
$('#imageCode').click(function(){
$('#imgVcode').attr('src','/dangdang/user/image.action?dt='+new Date().getTime());
return false;
});
$('...
分类:
其他好文 时间:
2014-07-10 20:30:14
阅读次数:
137
题目:
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
java代码:
{CSDN:CODE:422957}...
分类:
其他好文 时间:
2014-07-10 17:26:26
阅读次数:
136