码迷,mamicode.com
首页 >  
搜索关键字:val    ( 23217个结果
Pow(x, n)
题目 Implement pow(x, n). 方法 注意Integer.MIN_VALUE值和Integer.MAX_VALUE值。 public double pow(double x, int n) { if (n == 0) { return 1; } if (n == Integer.MIN_VAL...
分类:其他好文   时间:2014-06-19 10:37:27    阅读次数:210
java hashcode的Delphi实现
程序使用java做后台服务,数据处理时使用了java的hashcode,Delphi程序也需要生成这个hashcode,为了一致,所以要在Delphi下实现和Java一样的算法。下面即Delphi版的hashCode:function hashCode(val: string): Integer;v...
分类:编程语言   时间:2014-06-16 09:30:51    阅读次数:303
文章截断显示方法
第一种方法:1000 ? DataBinder.Eval(Container.DataItem, "Detail").ToString().Substring(0, 1000) +"……" : DataBinder.Eval(Container.DataItem, "Detail").ToStrin...
分类:其他好文   时间:2014-06-16 08:22:45    阅读次数:337
poj1001(高精度)
ExponentiationTime Limit: 500MSMemory Limit: 10000KTotal Submissions: 132438Accepted: 32334DescriptionProblems involving the computation of exact val....
分类:其他好文   时间:2014-06-15 23:02:34    阅读次数:266
jQuery分别获取选中的复选框值
function jqchk(){ //jquery获取复选框值 var s=''; $('input[name="aihao"]:checked').each(function(){ s+=$(this).val()+','; });点击“提交”后,可以得到正确的选择值了,但是后面多一个,(英文逗...
分类:Web程序   时间:2014-06-14 23:22:50    阅读次数:259
限制表单Input的长度,当达到一定长度时不能再输入
html代码:标题0/18 js代码://该函数用于输出框,当输入值大于指定的最大值的时候,返回当长度等于Max的值 function getByteVal(val, max) { var returnValue = ''; var byteValLen = 0; for (var i...
分类:其他好文   时间:2014-06-14 20:27:20    阅读次数:301
jQuery分别获取选中的复选框值
原文:jQuery分别获取选中的复选框值function jqchk(){ //jquery获取复选框值 var s=''; $('input[name="aihao"]:checked').each(function(){ s+=$(this).val()+','; });点击“提交”后,可以得到...
分类:Web程序   时间:2014-06-14 18:06:44    阅读次数:290
jQuery获取表单各元素的值
radio值获取$("input[type='radio']:checked").val();2,设置指定的项为当前选中项$("input[type='radio']").eq(1).attr("checked",true);//设置第二项为选中项2.下面来看怎么取得FORM中的各种值等等;func...
分类:Web程序   时间:2014-06-14 16:15:40    阅读次数:209
c++实现二叉搜索树
自己实现了一下二叉搜索树的数据结构,记录一下: #include using namespace std; struct TreeNode{ int val; TreeNode *left; TreeNode *right; TreeNode(int value) { val=value; left=NULL; right=NULL; } }; clas...
分类:编程语言   时间:2014-06-14 13:36:40    阅读次数:265
C++学习笔记:不用sizeof判断int类型占用几个字节
#include #include char *change(int val, int base, char *retbuf){ static const char *str = "0123456789ABCDEF"; char *p; char buf[15]; p = b...
分类:编程语言   时间:2014-06-12 10:09:57    阅读次数:356
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!