码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
linux下执行strlwr函数出错:ld returned 1 exit status
执行strlwr函数时报错。源程序例如以下:#include#includevoid main(){ char s[10]={"CHINA"}; printf("%s\n",strlwr(s)); return 0;}报错内容例如以下:eg6527a.c: In function ‘main’:eg...
分类:系统相关   时间:2016-01-11 19:59:53    阅读次数:174
javaEE之------添加JavaScript中自己写的函数
在写js中,我们已经能遇到这样的问题,我们需要将得到的字符串进行修剪,如把String 的空格去掉,我们希望调用trim,但是里面是没有的。所以我需要添加这样的函数 简单的使用一下trim。 我们在js中这样写就可以:采用正则表达式的方法 String.prototype.trim=function(){ var p = /^\s*/; var str = this.replace(...
分类:编程语言   时间:2016-01-11 18:25:21    阅读次数:143
获取前台页面传值
function Request(strName) { var strHref = window.document.location.href; var intPos = strHref.indexOf("?"); var strRight = strHr...
分类:其他好文   时间:2016-01-11 17:59:40    阅读次数:149
关于angular 自定义directive
关于angular 自定义directive的小结首先我们创建一个名为"expander"的自定义directive指令:angular.module("myApp",[]).directive("expander",function(){ return{ //directive的一些属...
分类:其他好文   时间:2016-01-11 17:47:49    阅读次数:136
js 得到当前季度
1 Date.prototype.getQuarter = function() { 2 var month = this.getMonth(); 3 if(month < 3) { 4 return '第一季度'; 5 }...
分类:Web程序   时间:2016-01-11 16:30:47    阅读次数:2331
javascript工厂模式、单例模式
//工厂模式function createObject(name,age){ var obj = new Object(); obj.name = name; obj.age = age; obj.fun = function(){ return this.na...
分类:编程语言   时间:2016-01-11 15:16:29    阅读次数:217
LeetCode 100 Same Tree(相同树判断)(二叉树、递归、栈和队列、深搜和宽搜)
翻译给定两个二叉树,写一个函数检查他们是否相等。两个二叉树如果结构上相同并且有相同的值,那么就认定他们是相等的。原文Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ident...
分类:其他好文   时间:2016-01-11 14:07:08    阅读次数:135
PHP的自定义函数(非源生自带)
这是一些自定义封装的函数类,调用起来很方便,以后会有更多的封装函数更新!// 弹框跳转function alert($msg,$url=''){ echo "";}//获取单条数据function getONE($sql){ $sql = mysql_query($sql); $list...
分类:Web程序   时间:2016-01-11 13:57:53    阅读次数:225
javascript学习笔记
---恢复内容开始---局部变量:使用关键字 var 命名变量,只能在定义它的函数里使用!全局变量:在任何地方都能用!定义在函数之外!闭包:子函数可以使用父函数的局部变量! function a () { var b =2; function c () { alert(b...
分类:编程语言   时间:2016-01-11 13:46:11    阅读次数:149
JavaScript中关键字搜索自能提示
//计时器隔0.5秒自动判断 setInterval(function () { document.getElementById('txt').onchange(); }, 500); if (true) { } ...
分类:编程语言   时间:2016-01-11 13:42:36    阅读次数:156
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!