码迷,mamicode.com
首页 >  
搜索关键字:val    ( 23217个结果
case的两种写法
case 表达式 when case1 then value1,case 2 then value2,...else endcase 1 when 2 then 3 when 1 then 4 else 5 end如果要再这个基础上加条件的话,只能在他外面嵌套一个case了应为这个case的表达式已...
分类:其他好文   时间:2014-06-13 07:01:31    阅读次数:280
QT中字符串QString类型的转换
把QString转换为 double类型方法1.QString str="123.45";double val=str.toDouble(); //val=123.45方法2.很适合科学计数法形式转换bool ok;double d;d=QString("1234.56e-02").toDouble...
分类:其他好文   时间:2014-06-13 06:43:40    阅读次数:199
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
回文距离求解
基于上面一篇博文的代码设计求的某个数的回文距离,所谓回文距离就是给定一个数,求这个数离与他最近的那个回文数的距离,例如123的回文距离为2,因为离123最近的回文数为121,所以123的回文距离为2,代码如下: #include #include #include using namespace std; bool fun(int); void main() { int val,val...
分类:其他好文   时间:2014-06-11 06:43:53    阅读次数:234
JS 获取 本周、本月、本季度、本年、上月、上周、上季度、去年
……case "本月": $("#startDate").val(dateRangeUtil.getCurrentMonth()[0].Format("yyyy-MM-dd")); $("#endDate").val(dateRangeUtil.getCurrentMonth()[1]....
分类:Web程序   时间:2014-06-10 20:19:14    阅读次数:456
【Leedcode】Insertion Sort List
Sort a linked list using insertion sort. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *nex...
分类:其他好文   时间:2014-06-10 12:14:19    阅读次数:253
Binary Tree Preorder Traversal
第一次看到accept,心里有点小开心/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode...
分类:其他好文   时间:2014-06-10 11:53:41    阅读次数:241
mysql-myibatis-整理
==================================== insert ==========================================语句1insert into ecshop_new.ecs_users(reg_time,mobile_phone,is_val...
分类:数据库   时间:2014-06-09 17:32:03    阅读次数:489
LeetCode --- Balanced Binary Tree
题目链接题意: 给定一棵二叉树, 判断是否为平衡二叉树, 这里的平衡二叉树指的是:每个结点的左右子树的深度之差不超过1。附上代码: 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * ...
分类:其他好文   时间:2014-06-08 18:58:35    阅读次数:194
LeetCode --- Minimum Depth of Binary Tree
题目链接求二叉树最小深度,最小深度指的是:从根节点走到最近的叶子结点的最短长度附上代码: 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6...
分类:其他好文   时间:2014-06-08 18:43:48    阅读次数:220
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!