码迷,mamicode.com
首页 >  
搜索关键字:tasks and back stack    ( 26134个结果
Android actionBar
今天做公司项目的时候用到了一个新的东东, getActionBar().setDisplayHomeAsUpEnabled(true); 这个神奇的东东是使得actionBar上面会出现一个向左的小箭头。 按下它就相当于back,对应的事件是ActionBar.DISPLAY_HOME_AS_UP. 以前做项目为省劲总是在2.0上混,这个东西是在4.0以后默认为false。 ...
分类:移动开发   时间:2014-08-02 05:14:22    阅读次数:191
LeetCode "Permutations"
Lexicographicallyalgorithms:1. Iterate array from back to front, and find the first decreasing point: 1,2,4,3 -- 42. Iterate array from back to front,...
分类:其他好文   时间:2014-08-02 05:11:02    阅读次数:199
hdu 4609 3-idiots 【FFT快(gui)速傅立叶变换】
FFT实现起来挺复杂的,开始用vector,结果发现空间超了,换成数组还是超,删掉了几个后又超时了 sin cos 函数调用次数太多了,改成乘法,还是超时 最后把FFT里的除法运算和模运算优化了一下,终于过了,排的老后面 坑,3843MS,一看时间最少的只有671MS,我都怀疑这是不是同一个算法。。为毛差距这么大 #pragma comment(linker, "/STACK:1024...
分类:其他好文   时间:2014-08-01 23:18:12    阅读次数:333
vector内存分配
vector,map这些容器还是在堆上分配的内存,在析构时是释放空间vector在提高性能可以先reserve在push_back()reserve:决定capacity,但没有真正的分配内存,我感觉只是告诉操作系统预留一段空间,但没有真正的分配resize:真正的分配了,可以通过下标访问
分类:其他好文   时间:2014-08-01 23:00:12    阅读次数:263
并行活动
今天在工作中用到了并行,于是就总结了一下关于并行的方法使用,也为自己做个备忘。命名空间:System.Threading.Tasks;重要的类:Parallel;重要的方法:3个;[其他都是重载]一.Invoke方法:任务已生成;用法一:注意:1.都是指单独的任务或活动;【不要相互调用】 2.需要事...
分类:其他好文   时间:2014-08-01 18:59:02    阅读次数:210
超级简单版多态计算器
个人笔记学习黑马四期一、编写一个操作父类using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace 多态计算器{ .....
分类:其他好文   时间:2014-08-01 15:48:21    阅读次数:239
HDU 1022 Train Problem I (数据结构 —— 栈)
Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is t...
分类:其他好文   时间:2014-08-01 13:40:31    阅读次数:267
【algorithm】尾递归
尾递归和一般的递归不同在对内存的占用,普通递归创建stack累积而后计算收缩,尾递归只会占用恒量的内存(和迭代一样)。SICP中描述了一个内存占用曲线,用以上答案中的Python代码为例(普通递归):def recsum(x): if x == 1: return x else: r...
分类:其他好文   时间:2014-08-01 12:47:31    阅读次数:353
HDU-3502-Huson's Adventure Island(BFS+状压DP)
Problem Description A few days ago, Tom was tired of all the PC-games, so he went back to some old FC-games. "Hudson's Adventure Island" was his favorite which he had played thousands of times. But t...
分类:其他好文   时间:2014-08-01 10:53:21    阅读次数:300
重载运算符
========================================运算符重载-------------------------------------------------------------------------Vector.csusingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Threading.Tasks; namespaceConso..
分类:其他好文   时间:2014-08-01 00:13:21    阅读次数:260
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!