码迷,mamicode.com
首页 > 其他好文
Linked List Cycle
问题:判断链表是否有环。分析:利用快慢指针slow,fast slow指针每次走一步,fast指针每次走两步,倘若存在环,则slow和fast必定在某一时刻相遇。 由于fast指针走的比slow快所以循环的时候只需要判断fast和fast->next不为空,判断fast->next是因为...
分类:其他好文   时间:2014-07-31 12:25:26    阅读次数:236
CentOS6.4 安装JDK
1、下载JDK,这里用的是jdk-7u65-linux-x64.tar.gz,请到官网上下载。2、清除默认的JDK,yum remove java3、解压文件 tar -xzfjdk-7u65-linux-x64.tar.gz -C /usr/local/ mv jdk-1.7.6 jdk4、配.....
分类:其他好文   时间:2014-07-31 12:25:06    阅读次数:243
HDU 1513 Palindrome
题目就是给一个字符串问最少插入多少个字符能让原字符串变为回文字符串。算法:用原串的长度减去原串与翻转后的串的最大公共字串的长度,就是所求答案。 1 //#define LOCAL 2 #include 3 #include 4 #include 5 #include 6 using name...
分类:其他好文   时间:2014-07-31 12:24:36    阅读次数:220
将Excel中的数据读入到GridView控件中
使用Excel文件作为数据源,其实现的代码为:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("excel.xls") + "; Extended Properties=Excel 8.0;实例代码:private Da...
分类:其他好文   时间:2014-07-31 12:24:16    阅读次数:216
WPF中Listbox/ListView 横向展示/滑动内容的方法
...
分类:其他好文   时间:2014-07-31 12:23:46    阅读次数:947
GridVIew控件选中、编辑、取消、删除数据项
SqlConnection sqlcon;SqlCommand sqlcom;string strCon = "Data Source=(local);Database=db_04;Uid=sa;Pwd=sa";public void bind(){string sqlstr = "select *...
分类:其他好文   时间:2014-07-31 12:23:26    阅读次数:279
HDU 1754
第一题线段树,纪念一下 1 #include 2 #include 3 using namespace std; 4 int tree[800005]; 5 void build(int l,int r,int root){ 6 if(l==r){ 7 scanf("%...
分类:其他好文   时间:2014-07-31 12:23:06    阅读次数:208
使用CoreData [3]
使用CoreData [3]此篇幅介绍CoreData如何升级版本防止崩溃把你之前创建的实体文件全部删除掉,把沙盒中的数据库文件删除掉,实体只保持一个,然后重新创建出实体文件.- (BOOL)application:(UIApplication *)application didFinishLaun...
分类:其他好文   时间:2014-07-31 12:22:56    阅读次数:326
POJ 3926 Parade 单调队列优化DP
来源:http://poj.org/problem?id=3926题意:行n 2 #include 3 #include 4 using namespace std; 5 6 int n, m, k; 7 int a[120][10100], b[120][10100], dp[120][101.....
分类:其他好文   时间:2014-07-31 12:22:36    阅读次数:269
quartus II Warning 好的时序是设计出来的,不是约束出来的
Warning (15714): Some pins have incomplete I/O assignments. Refer to the I/O Assignment Warnings report for details解释:后续高级的芯片的 drive strength 和 slew r...
分类:其他好文   时间:2014-07-31 12:22:26    阅读次数:320
阿尔斯通被美国通用电气收购对中国影响几何?
法国装备制造业巨头阿尔斯通在日前的董事会上,决定将其能源部门出售给美国通用电气,总价为123.5亿欧元。通用电气发表声明称争取在2015年完成收购手续。此外,法国政府将购入阿尔斯通20%的股份。通用电气将与阿尔斯通成立合资公司,将阿尔斯通的可再生能源、核电站业务及两家公司的输电业务等转移至新公司.....
分类:其他好文   时间:2014-07-31 12:22:16    阅读次数:213
角色头上冒数字
/// /// Floating text./// the GUI Text Floating system/// using UnityEngine;using System.Collections;public class FloatingText : MonoBehaviour { pu...
分类:其他好文   时间:2014-07-31 12:21:46    阅读次数:210
VS05 VS08 VS10 工程之间的转换
VS05 VS08 VS10 工程之间的转换安装了VS2010后,用它打开以前的VS2005项目或VS2008项目,都会被强制转换为VS2010的项目,给没有装VS2010的电脑带来不能打开高版本项目的麻烦。用记事本打开解决方案文件(.sln):开头的两行VS2010Microsoft Visual...
分类:其他好文   时间:2014-07-31 12:21:16    阅读次数:160
安装 Couchbase 服务器
Couchbase 是 MemCache 的新版本,但是中文资料不多,这里将下载,安装的常用问题进行一下说明。
分类:其他好文   时间:2014-07-31 12:20:46    阅读次数:269
树标号
Apple Treehttp://poj.org/problem?id=3321 1 #include 2 #include 3 #define mt(a,b) memset(a,b,sizeof(a)) 4 #define lrrt int L,int R,int rt 5 #define ial...
分类:其他好文   时间:2014-07-31 12:20:36    阅读次数:251
document.body.scrollTop用法
网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offsetWidth(包括边线的宽);网页可见区域高: document.body.offsetHeight(...
分类:其他好文   时间:2014-07-31 12:20:16    阅读次数:205
poj 3744 Scout YYF I
题意:有 n个雷,分别在 a[0]...a[n-1],走一步概率为p,走两步概率为1-p,初始位置为1,问安全到达终点的概率。因为位置范围比较大【1, 100000000】,所以可以把 相邻的两个地雷之间的概率用矩阵快速幂计算[ a(i) a(i+1) ] *| 0 1-p |=[ a(i+1) a...
分类:其他好文   时间:2014-07-31 12:18:56    阅读次数:236
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!