首页 > 其他
Stack_Queue 固定容量的栈组SetOfStacks @CareerCup
原文: Imagine a (literal) stack of plates. If the stack gets too high, it might topple. Therefore, in real life, we would likely start a new stack when the previous stack exceeds some threshold. Impl...
分类:其他   时间:2014-03-03 04:37:57    收藏:0  评论:0  赞:0  阅读:578
Stack_Queue 两个栈实现一个队列 @CareerCup
原文: Implement a MyQueue class which implements a queue using two stacks. 译文: 使用两个栈实现一个队列MyQueue。 思路: 建两个栈,stackNewest和stackOldest。要始终保持:stackNewest的栈顶总是存放着最新的元素,stackOldest的栈顶总是存放...
分类:其他   时间:2014-03-03 02:39:30    收藏:0  评论:0  赞:0  阅读:497
Stack_Queue 把栈排序 Sort a stack @CareerCup
原文: Write a program to sort a stack in ascending order. You should not make any assumptions about how the stack is implemented. The following are the only functions that should be used to write thi...
分类:其他   时间:2014-03-03 03:11:52    收藏:0  评论:0  赞:0  阅读:497
Implement strStr() -- LeetCode
原题链接: http://oj.leetcode.com/problems/implement-strstr/  这是算法中比较经典的问题,判断一个字符串是否是另一个字符串的子串。这个题目最经典的算法应该是KMP算法,不熟悉的朋友可以参见Knuth–Morris–Pratt algorithm。KMP算法是最优的线性算法,复杂度已经达到这个问题的下限。但是KMP算法比较复杂,很难在面试的短时...
分类:其他   时间:2014-03-03 05:10:09    收藏:0  评论:0  赞:0  阅读:497
Stack_Queue 猫狗队列问题 Cat dog queue @CareerCup
An animal shelter holds only dogs and cats, and operates ona strictly “first in, first out” basis. People must adopt either the “oldest”(based on arrival time) of all animals at the shelter, or they...
分类:其他   时间:2014-03-03 04:08:47    收藏:0  评论:0  赞:0  阅读:422
《高效学习OpenGL》 之 纹理坐标的自动生成 glTexGen()
用于自动生成纹理坐标的函数: void glTexGeni (GLenum coord, GLenum pname, GLint param); //参数coord必须是GL_S、GL_T、GL_R或GL_Q //pname参数为GL_TEXTURE_GEN_MODE、GL_OBJECT_PLANE或GL_EYE_PLANE, //如果是GL_TEXTURE_GEN_...
分类:其他   时间:2014-03-03 02:42:32    收藏:0  评论:0  赞:0  阅读:1168
Search Insert Position -- LeetCode
原题链接: http://oj.leetcode.com/problems/search-insert-position/  这道题比较简单,就是二分查找。思路就是每次取中间,如果等于目标即返回,否则根据大小关系切去一半。因此算法复杂度是O(logn),空间复杂度O(1)。代码如下:  public int searchInsert(int[] A, int target) { if(...
分类:其他   时间:2014-03-03 03:05:48    收藏:0  评论:0  赞:0  阅读:429
"RDLC"报表-参数传递及主从报表
今天继续学习RDLC报表的“参数传递”及“主从报表”一、先创建DataSet,如下图:二、创建一个报表rptDEPT.rdlc,显示部门T_DPET的数据三、嵌入Default.aspx中,写在Default.aspx.cs中写些基本代码+ View Code?1234567891011121314...
分类:其他   时间:2014-03-03 02:11:56    收藏:0  评论:0  赞:0  阅读:904
iOS 详细解释@property和@synthesize关键字
/** @property和@synthesize关键字是针对成员变量以及get/set方法而言的 从Xcode4.4以后@property已经独揽了@synthesize的功能主要有三个作用: (1)生成了成员变量get/set方法的声明 (2)生成了私有的带下划线的的成员变量因此子类不可以直接访...
分类:其他   时间:2014-03-03 02:08:53    收藏:0  评论:0  赞:0  阅读:427
使用XML与远程服务器进行交互
最近在做的一个项目其中的一部分是与远程服务器进行交互,确定身份验证的合法性,于是编写了SendRequest方法此方法发送给远程服务器XML请求,服务器经过处理后,返回XML回应,由此方法接收到后进行返回。 1 protected string SendRequest(string strXML) ...
分类:其他   时间:2014-03-03 02:04:16    收藏:0  评论:0  赞:0  阅读:559
Get file name without extension.
Ref:How to get file name without the extension?Normally,there are two ways to implements this:use the library or the regular expression.here I use the...
分类:其他   时间:2014-03-03 02:02:41    收藏:0  评论:0  赞:0  阅读:576
(functiong(){})() 和 (function(){}())有细微差别,()是强制运算符,第一种写法强制返回函数本身,然后调用;第二种写法是强制返回函数执行的结果
(functiong(){})() 和 (function(){}())有细微差别,()是强制运算符,第一种写法强制返回函数本身,然后调用;第二种写法是强制返回函数执行的结果
分类:其他   时间:2014-03-03 01:59:39    收藏:0  评论:0  赞:0  阅读:666
Arcengine实现创建网络数据集札记(三)
arcengine创建网络数据集
分类:其他   时间:2014-03-03 01:56:33    收藏:0  评论:0  赞:0  阅读:843
JVM学习总结一——内存模型
JVM是java知识体系的基石之一,任何一个java程序的运行,都要借助于他。或许对于我这种初级程序员而言,工作中很少有必要刻意去关注JVM,然而如果能对这块知识有所了解,就能够更清晰的明白程序的运行机制,从而写出更为健壮的代码,也能更好的理解java中很多处理方式的原因。以下是个人读书后整理的知识...
分类:其他   时间:2014-03-03 01:55:03    收藏:0  评论:0  赞:0  阅读:601
java simple check whether a file or directory.
Ref:check whether a file or directoryFirst, make sure the path exists by using:new File(path).exists();Then check whether it a directory using:1 new F...
分类:其他   时间:2014-03-03 01:48:54    收藏:0  评论:0  赞:0  阅读:585
LLVM language 参考手册(译)(6)
模块级内联汇编(Module-Level Inline Assembly)模块包含“module-level inline assembly”块,这与GCC中的“file scope inline asm”块的相同的。这些块将被LLVM内部链接并当作一个单独的单元,但如果希望的话,它们在.ll 文件...
分类:其他   时间:2014-03-03 01:50:26    收藏:0  评论:0  赞:0  阅读:707
Arcengine实现创建网络数据集札记(二)
arcengine创建网络数据集
分类:其他   时间:2014-03-03 01:47:23    收藏:0  评论:0  赞:0  阅读:618
CentOS 之 安装中文输入法ibus
安装中文输入法ibus及相关的系统设置
分类:其他   时间:2014-03-03 01:44:19    收藏:0  评论:0  赞:0  阅读:650
wp推送通知
下载源码还有一种方式,更新瓷片方式1、 /// /// 定时更新磁贴 /// public class ShellUpdate { ShellTileSchedule schedule; public void CreateShell(string remoteUri, UpdateRecurren...
分类:其他   时间:2014-03-03 01:39:43    收藏:0  评论:0  赞:0  阅读:577
Linear Regression(线性回归)(一)—LMS algorithm
本文是机器学习系列的第一篇,内容主要包括:(1)线性回归问题的引入和定义;(2)LMS更新规则;(3)批处理梯度下降法和随机梯度下降法。
分类:其他   时间:2014-03-03 01:36:39    收藏:0  评论:0  赞:0  阅读:1065
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!