码迷,mamicode.com
首页 > 其他好文
分支语句横向对比
VERILOG:case(a) 1'b0: begin end 1'b1: begin endendcaseif() begin endelse begin if() begin end else begin en...
分类:其他好文   时间:2014-07-20 21:34:35    阅读次数:222
主动学习
在当今技术和文化环境下,学习能力可能是成功的最重要因素。它决定了你是“大获全胜”还是“勉强通过” 学习是什么,不是什么? 对于程序员来说,技术本身并不重要,持续学习才是最重要的。 事实上,我们往往误解了教育的真正含义 教育,来自于拉丁文educare,字面意思是“被引出”,即引导出某样东西,而通常....
分类:其他好文   时间:2014-07-21 09:13:07    阅读次数:205
【leetcode刷题笔记】Best Time to Buy and Sell Stock III
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-07-20 21:33:36    阅读次数:204
LeetCode:Plus One
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:其他好文   时间:2014-07-21 09:14:10    阅读次数:168
【leetcode刷题笔记】Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-07-20 21:32:55    阅读次数:250
图的全局最小割的Stoer-Wagner算法及例题
Stoer-Wagner算法基本思想:如果能求出图中某两个顶点之间的最小割,更新答案后合并这两个顶点继续求最小割,到最后就得到答案。算法步骤:-------------------------------------------------------------------------------...
分类:其他好文   时间:2014-07-20 21:32:41    阅读次数:211
LeetCode:Longest Common Prefix
题目链接 Write a function to find the longest common prefix string amongst an array of strings. 题目的意思说的不是很清楚,开始理解成了求任意两个字符串的前缀中的最长者。但是本题的意思是求所有字符串的最长公共前缀,...
分类:其他好文   时间:2014-07-21 09:14:25    阅读次数:225
UITextView 点return 隐藏键盘
iOS开发中,发现UITextView没有想UITextField中textFieldShouldReturn:这样的方法,那么要实现UITextView return键隐藏键盘,可以通过判断输入的字符是不是回车符来实现。首先,声明要实现UITextView 的delegate。@interface...
分类:其他好文   时间:2014-07-20 21:31:57    阅读次数:224
float浮动
float 属性介绍:HTML页面的标准文档流(默认布局)是:从上到下,从左到右,遇块(块级元素)换行。给元素的float属性赋值后,就是脱离文档流,进行左右浮动,紧贴着父元素(默认为body文本区域)的左右边框。css 浮动,就是一个元素浮动之后,飘到了上空,原本他是存在于二维平面中,现在脱离平面...
分类:其他好文   时间:2014-07-21 09:14:47    阅读次数:212
【不定期更新】noip复习(或许有误请指正)
一、基本算法2.二分查找void find(int l,int r){ if (l>r || a[l]>x || a[r]> 1; if (a[mid] == x){ if (mid a[mid]) find(mid+1, r); else find(l, mid-...
分类:其他好文   时间:2014-07-21 09:15:15    阅读次数:227
KMP算法详解(转自中学生OI写的。。ORZ!)
KMP算法详解如果机房马上要关门了,或者你急着要和MM约会,请直接跳到第六个自然段。我们这里说的KMP不是拿来放电影的(虽然我很喜欢这个软件),而是一种算法。KMP算法是拿来处理字符串匹配的。换句话说,给你两个字符串,你需要回答,B串是否是A串的子串(A串是否包含B串)。比如,字符串A="I'm m...
分类:其他好文   时间:2014-07-21 09:15:30    阅读次数:464
POJ 1515 Street Directions --一道连通题的双连通和强连通两种解法
题意:将一个无向图中的双向边改成单向边使图强连通,问最多能改多少条边,输出改造后的图。分析:1.双连通做法:双连通图转强连通图的算法:对双连通图进行dfs,在搜索的过程中就能按照搜索的方向给所有边定向,其中桥不能改造,只能保留双向边。代码:#include #include #include #in...
分类:其他好文   时间:2014-07-20 21:29:01    阅读次数:234
cocoa中的NSPredicate介绍
在COCOA中的NSPredicate表示的就是一种判断。一种条件的构建。我们可以先通过NSPredicate中的predicateWithFormat方法来生成一个NSPredicate对象表示一个条件,然后在别的对象中通过evaluateWithObject方法来进行判断,返回一个布尔值。...
分类:其他好文   时间:2014-07-20 21:29:58    阅读次数:207
杭电acm 2095 find your present (2)
#includeusing namespacestd;intmain(){ intn,x,y; while(cin>>n,n) { cin>>x; while(--n) { cin>>y; x=x^y; } cout<<x<<"\n"; } return0;}
分类:其他好文   时间:2014-07-20 21:30:54    阅读次数:230
djang1.6.5 signal的特别处理
旧版本 新版本def my_handler(sender)def my_handler(sender, **kwargs)my_signal = object()my_signal = django.dispatch.Signal()dispatcher.connect(my_handler, m....
分类:其他好文   时间:2014-07-21 09:16:13    阅读次数:199
Dll注入方法-钩子
HHOOK SetWindowsHookEx(int idHook,HOOKPROC lpfn, HINSTANCE hMod, DWORD dwThreadId);idHook: 钩子类型lpfn:钩子过程的指针 ,也即拦截到指定系统消息后的预处理过程,定义在DLL中hMod:应用程序实...
分类:其他好文   时间:2014-07-21 09:16:55    阅读次数:289
ImageView和onTouchListener实现,点击查看图片细节
这是来自疯狂android讲义上的例子,其实没啥意思。就是用监听器获取到手指的坐标,然后根据这个坐标开始绘制一个图片。(这里的绘制方式有些问题,所以凑合看看吧。)首先,还是布局文件(两个ImageView) MainActivity.javapackag...
分类:其他好文   时间:2014-07-21 09:17:54    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!