首页 > 2015年04月14日 > 全部分享
C++中动态申请数组
动态申请一维数组 申请使用new,释放使用delete[] 可以通过数组名[下标]和*(数组名+下标)的方式访问数组int main() { int number = 10; int *array = new int[number]; //数组初始化 for (int i = 0; i < number; ++i) { array[i] =...
分类:编程语言   时间:2015-04-14 21:39:53    收藏:0  评论:0  赞:0  阅读:363
LeetCode --- 96. Unique Binary Search Trees
题目链接:Unique Binary Search Trees Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 ...
分类:其他   时间:2015-04-14 21:39:44    收藏:0  评论:0  赞:0  阅读:134
UIWebView全部API学习。
最生僻的API做了下划线以及粗体的标注。百度上查了全是拷贝的同一份代码,而且只有代码没有解释,很是鄙视。 //1. UIWebViewNavigationType枚举定义了页面中用户行为的分类 typedef NS_ENUM(NSInteger, UIWebViewNavigationType) {     UIWebViewNavigationTypeLinkClicked,//用户触...
分类:Windows开发   时间:2015-04-14 21:39:34    收藏:0  评论:0  赞:0  阅读:533
LeetCode --- 97. Interleaving String
题目链接:Interleaving String Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = "aabcc", s2 = "dbbca", When s3 = "aadbbcbcac", return true. When ...
分类:其他   时间:2015-04-14 21:39:25    收藏:0  评论:0  赞:0  阅读:230
LeetCode --- 98. Validate Binary Search Tree
题目链接:Validate Binary Search Tree Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with ...
分类:其他   时间:2015-04-14 21:39:04    收藏:0  评论:0  赞:0  阅读:204
VC与JavaScript交互(二)
最近关于vc++里面通过IDispatch的Invoke来实现和js的交互做点了tp,并且对以前不了解的“直接读取js变量值”和“传递多个参数”的部分重新实现了下。 1,调用js的函数,并传递多个参数 CComQIPtr pDoc = m_browser.get_Document(); if (pDoc) { CComQIPtr spDisp; HRESULT hr = pDoc-...
分类:编程语言   时间:2015-04-14 21:38:54    收藏:0  评论:0  赞:0  阅读:237
LeetCode --- 99. Recover Binary Search Tree
题目链接:Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty stra...
分类:其他   时间:2015-04-14 21:38:44    收藏:0  评论:0  赞:0  阅读:196
ZOJ File Searching(字符串)
ZOJ File Searching(字符串)...
分类:其他   时间:2015-04-14 21:38:34    收藏:0  评论:0  赞:0  阅读:302
LeetCode --- 100. Same Tree
题目链接: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 identical and the nodes have the same value....
分类:其他   时间:2015-04-14 21:38:24    收藏:0  评论:0  赞:0  阅读:179
Could not create pool connection. The DBMS driver exception was: Io 异常: Broken pipe
现场同事反馈:中间件weblogic连不上数据库Oracle,发回日志可以看到:     Caused by: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Io 异常: B...
分类:数据库技术   时间:2015-04-14 21:38:14    收藏:0  评论:0  赞:0  阅读:481
poj 3254 Corn Fields 状压dp入门
// poj3254 状压dp入门 // dp[i][S]表示前i行第i行状态为S时放牧的情况 // S为十进制的二进制数形式如5为101表示第一列和第三列放牧的方法数 // 首先dp[0][S]合法的话就是1 // 状态转移方程为dp[i][S] = sigma(dp[i-1][V])(S与V是合法状态) // 最后的结果就是dp[n][S](S为所有的合法状态) // // 刚开始十分傻x的...
分类:其他   时间:2015-04-14 21:38:04    收藏:0  评论:0  赞:0  阅读:171
word里删除附页
在word表格里,我们要复制文字,首先要点击“添加附页”也就是表格下面的“+”号,如图(1)所示:      图(1)点击表格底部的”+”号,以添加附页   如果要删除附页,则要选中表格后面的最后一页,按Del键删除即可,如图(2)所示:      图(2)选中底部带有”+”号表格,按Del键即可删除附页...
分类:其他   时间:2015-04-14 21:37:53    收藏:0  评论:0  赞:0  阅读:699
Android Bitmap在不加载图片的前提获取宽高
Android Bitmap在不加载图片的前提获取宽高...
分类:移动平台   时间:2015-04-14 21:37:44    收藏:0  评论:0  赞:0  阅读:170
蓝桥杯省赛编程大题——骰子问题
作为第二道编程大题,难度也没有想象中那么难。只怪我当时没有认真的静下心来仔细的理解题目意思。连样例都没有看懂,高数课闲来无事,便静下来认真想了一下。   大致的题目意思是给你n个骰子,让你堆起来,并且告诉你有一些面是不能靠在一起的。问你总共有多少总方案数。(骰子规定1和4相对,2和5相对,3和6相对)   输入n m 表示骰子的个数和不能靠在一起的个数。 输入m行,每行两个数a b 表示...
分类:其他   时间:2015-04-14 21:37:33    收藏:0  评论:0  赞:0  阅读:286
leetcode || 88、Merge Sorted Array
problem: Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold addit...
分类:其他   时间:2015-04-14 21:37:23    收藏:0  评论:0  赞:0  阅读:197
GOF23设计模式之命令模式(Command)的理解与实现
?? 命令模式Command      命令模式:将一个请求封装为一个对象,从而使我们可用不同的请求对客户进行参数化;对请求排毒或者记录请求日志,以及支持可撤销的操作。也称之为:动作Action模式,事务Transaction模式   结构:      Command抽象命令类      ConcreteCommand具体命令类 ...
分类:其他   时间:2015-04-14 21:37:14    收藏:0  评论:0  赞:0  阅读:105
Android OOM以及GC的一些建议
Android OOM以及GC的一些建议...
分类:移动平台   时间:2015-04-14 21:37:04    收藏:0  评论:0  赞:0  阅读:252
python深入学习--decorator强大的装饰器
python深入学习--decorator强大的装饰器...
分类:编程语言   时间:2015-04-14 21:36:54    收藏:0  评论:0  赞:0  阅读:345
题目1127:简单密码
题目描述: Julius Caesar曾经使用过一种很简单的密码。 对于明文中的每个字符,将它用它字母表中后5位对应的字符来代替,这样就得到了密文。 比如字符A用F来代替。如下是密文和明文中字符的对应关系。 密文 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 明文 V W X Y Z A B C D E F G H I J ...
分类:其他   时间:2015-04-14 21:36:44    收藏:0  评论:0  赞:0  阅读:177
POJ 3671 Dining Cows (DP)
题目大意:给你一串只有1,2的数字,让你改变最少的次数,让这个序列变成非递减的。 思路:动态规划,判断分界点,开一个dp[30010][2]的数组,其中dp[i][j]表示把第i个数改成j最少要花多少次 那么状态转移方程就列出来了: 令a=1 j!=a[i] 0 j==a[i] 那么dp[i][1]=dp[i-1][1]+a; dp[i][2]=min(dp[i-1][1],dp[i-...
分类:其他   时间:2015-04-14 21:36:34    收藏:0  评论:0  赞:0  阅读:168
1801条   上一页 1 ... 9 10 11 12 13 ... 91 下一页
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!