码迷,mamicode.com
首页 >  
搜索关键字:zigzag level order t    ( 24142个结果
ZigZag Conversion
题目: zigzag,就是锯齿状的数字顺序,其形式就是首尾行间断的比内部行少一个,就是下面的形式。 1     *     7                                        2    6     8     12 3    5    9      11 4     *   10 更好看点就是  1                      7 2  ...
分类:其他好文   时间:2014-05-19 22:43:12    阅读次数:373
规则引擎
写了个简单的规则引擎,普通情况够用了:比如2家公司有各自的利率计算规则,如下:在C#方面,没有写在C#的业务逻辑代码中,而是移到了外部规则文件中,如(ACompanyRatePolicy.r):rule "Level 1" when alreadyCostPrice >= 0 ...
分类:其他好文   时间:2014-05-19 22:32:33    阅读次数:350
SQL语句--分组的Top查询
代码SELECT A.*FROM( SELECT ROW_NUMBER() OVER(PARTITION BY Host ORDER BY Host,count(EntranceURL) DESC) AS ROW, Host, EntranceURL as PageURL ...
分类:数据库   时间:2014-05-19 09:12:59    阅读次数:338
android获得ImageView图片的等级
android获得ImageView图片的等级问题要实现的功能如下图,点击分享能显示选中与不选中状态,然后发送是根据状态来实现具体分享功能。在gridview中有5个子项,每个子元素都有两张图片A,B的level设置分别为0,1;点击图片使图片AB切换,前题是要能知道当前图片的等级。但这里只有设置等...
分类:移动开发   时间:2014-05-18 19:36:05    阅读次数:334
postgresql事务的操作二
参照网页: http://www.php100.com/manual/PostgreSQL8/sql-set-transaction.htmlshow transaction isolation level ; 查看事务隔离级别testdb=# show transaction isolation ...
分类:数据库   时间:2014-05-18 19:35:44    阅读次数:470
【Leetcode】Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all vali...
分类:其他好文   时间:2014-05-18 15:11:17    阅读次数:249
LeetCode: Remove Element [026]
【题目】 Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't matter what you leave beyond the new length. 【题意】 删除数组中指定的值。不关心在新数组的后面即数组尾部留下了什么值。 【思路】 思路同Remo...
分类:其他好文   时间:2014-05-18 14:53:56    阅读次数:208
LeetCode: Next Permutation [030]
【题目】 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). The replac...
分类:其他好文   时间:2014-05-18 09:54:53    阅读次数:242
关于“单例模式”的另外一种实现
传统单例模式的实现有懒汉、饿汉等模式,也有双锁机制(防止不必要的线程再度进入锁的临界区实例化单例模式的全局变量)。不过据说(未经考证)在VS中CPU开启“out-of-order execution”,仍然会导致出问题,原因在于: 我们假设a和b线程同时试图初始化单例模式的全局变量,a先进入方...
分类:其他好文   时间:2014-05-18 00:21:37    阅读次数:268
Mysql 高效随机生成N条记录
1 select *, rand() as random FROM yef_exercises where id not in(1) order by random limit 1 // Mysql
分类:数据库   时间:2014-05-17 18:58:42    阅读次数:370
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!