现在位置: 首页 > belated发表的所有文章
  • 10月
  • 09日
移动开发 ⁄ 共 668字 评论关闭
1:cmd命令,cd到工程的根目录 假设工程根目录为e:/workspace/myproject 以下命令会在项目中生成 build.xml local.propertis两个目录 android update project -p . [-t android-18] -p 后面的 点 . 指的是当前目录 -t 是编译用的api编码。这里如果不存在-18的api会报错 Error: Target id 'android-18' is not valid. Use 'android.bat list targets' to ge t the target ids. 可以使用 android.bat list targets 查看目前支持的target 如果工程引用了第三方lib库工程。 注意是 lib-project android update lib-project -p ../l......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 1907字 评论关闭
题目链接~~> 做题感悟:先前看过一次,感觉做多了状态压缩之后,再做这题就很顺手了。 解题思路:  BFS  + 状态压缩               一个城市可以走多次,so ~ > 需要用状态压缩,开始用了优先队列但是后来发现不可以用,其中样例用优先队列就过不了,于是把标记数组改为记录达到某个城市达到某种 状态的最小花费,如果搜到某个状态花费比当前状态小,更新标记数组的花费,就继续搜下去,否则不向下搜,这样搜出所有的情况就可以了。(注意判断的时候要判断终点城市是否在状态里,开始有点脑残了判断是否所有城市都到达了)。......
阅读全文
  • 12月
  • 11日
综合 ⁄ 共 2475字 评论关闭
http://stackoverflow.com/questions/6720396/different-types-of-thread-safe-sets-in-java 1) The CopyOnWriteArraySet is a quite simple implementation - it basically has a list of elements in an array, and when changing the list, it copies the array. Iterations and other accesses which are running at this time continue with the old array, avoiding necessity of synchronization. The normally fast set operations (especially contains()) are quite slow here, as the arrays will be searched in ......
阅读全文
  • 09月
  • 23日
算法 ⁄ 共 884字 评论关闭
题目链接:http://poj.org/problem?id=2782 题目大意:  给出n袋长度不一定相同的垃圾,把它们全部装在长度不超过L的垃圾桶里;                     每个垃圾桶至多有两袋垃圾,并且垃圾的长度相加小于L;                     求最少用多少个垃圾桶可以装入全部垃圾; 解题思路:  每个垃圾桶最多只能有两袋垃圾,也就是说可以装是一袋或者两袋;                     先排序,然后分别从最小、最大两个极端开始枚举:                     如果相加小于或等于L,那么可以装下两袋垃圾,并且标记;                     最后把只......
阅读全文
  • 05月
  • 14日
综合 ⁄ 共 2134字 评论关闭
Struts入门            Web应用是目前被广泛使用的系统架构,而MVC模式逐渐成为实现Web应用的首选设计模式。在目前众多的     MVC框架中,struts2算是佼佼者。                 MVC就是模型-视图-控制器(Model-View-Controller) 1.sun公司在jsp的早期规范中制定了两种JSP开发模型,分别为:        模型1(Model1)和模型2(Model2)。 2.模型1:使用jsp+javabeans技术将页面显示和业务逻辑处理分开,jsp实现页面的显                    示,JavaBean对象用来承载数据和实现业务逻辑。 3.模型2:符合MVC架构模式,在该模型中,......
阅读全文
  • 04月
  • 11日
综合 ⁄ 共 4322字 评论关闭
众所周知,Linux在嵌入式系统中的应用已经非常普遍。为了进一步促进这方面的应用,在Linux 2.6中,引入了很多非常有利于嵌入式应用的功能。这些新功能包括实时性能的增强、更方便的移植性、对大容量内存的支持、支持微控制器和I/O系统的改进等。 嵌入式计算通常涉及到各种尺寸的计算机,其中包括从小型手持设备(比如手表、照相机)到包含成千上万个节点的分布式系统(比如通信交换机)。嵌入式系统可能简单得只需要一个小的微控制器,也可能使用的是大量的并行处理器和海量的内存。Linux 2.6的改进,则对这一系列需求提供了支持。 响......
阅读全文
  • 04月
  • 01日
综合 ⁄ 共 13字 评论关闭
 1.   2. 3. 4.   5.
阅读全文
  • 03月
  • 29日
综合 ⁄ 共 361字 评论关闭
    void CLogin::OnBnClickedOk() { // TODO: 在此添加控件通知处理程序代码 UpdateData(TRUE); if(m_Name.IsEmpty() || m_PassWord.IsEmpty()) { MessageBox(_T("用户名或密码不能为空")); return; } if(m_Name == _T("chu") && m_PassWord == _T("123")) { OnOK(); } else { MessageBox(_T("用户名或密码错误")); m_Name = _T(""); m_PassWord = _T(""); UpdateData(FALSE); return; } } void CLogin::OnBnClickedButtonExit() { // TODO: 在此添加控件通知处理程序代码 OnCancel(); }
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 571字 评论关闭
站点比较恶心,贴一个连接: http://www.owent.net/2013/07/ptmalloctcmalloc和jemalloc内存分配策略研究.html glibc内存管理ptmalloc源代码分析 http://rdc.taobao.com/blog/cs/?p=1015 tcmalloc http://gperftools.googlecode.com/svn/trunk/doc/tcmalloc.html Scalable memory allocation using jemalloc http://www.facebook.com/notes/facebook-engineering/scalable-memory-allocation-using-jemalloc/480222803919 A Scalable Concurrent malloc(3) Implementation for FreeBSDhttp://people.freebsd.org/~jasone/jemall......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 2826字 评论关闭
Problem Description John never knew he had a grand-uncle, until he received the notary’s letter. He learned that his late grand-uncle had gathered a lot of money, somewhere in South-America, and that John was the only inheritor. John did not need that much money for the moment. But he realized that it would be a good idea to store this capital in a safe place, and have it grow until he decided to retire. The bank convinced him that a certain kind of bond was interesting for him. This kind......
阅读全文
  • 01月
  • 20日
综合 ⁄ 共 2025字 评论关闭
题目链接:https://www.spoj.pl/problems/LCMSUM/ SPOJ Problem Set (classical) 5971. LCM Sum Problem code: LCMSUM Given n, calculate the sum LCM(1,n) + LCM(2,n) + .. + LCM(n,n), where LCM(i,n) denotes the Least Common Multiple of the integers i and n. Input The first line contains T the number of test cases. Each of the next T lines contain an integer n. Output Output T lines, one for each test case, containing the required sum. Example Sample Input : 3 1 2 5 Sample Output : 1 4 55 Const......
阅读全文
  • 01月
  • 09日
综合 ⁄ 共 1818字 评论关闭
回答一下Justyaoming所提出的问题,如果你还没有找到答案,希望该回复能够帮助你;如果你已解决了问题,希望你能对该回复做批评指正。由于回复比较长,因此重新开一个帖。 原帖请参照:http://www.nfcchina.org/forum.php?mod=viewthread&tid=68&extra=page%3D1 1.nfc 怎么选择操作模式的?——怎么在 PCD VCD NFC 模式中做出选择? 我知道  iso 15693中有说明但是不太懂啊。 如果周围检测到 RF场存在,就能直接认定并选择 NFC 模式? 如果没检测到RF场存在,又怎么在那3种模式中选择? 首先我觉得应该澄清一个概念......
阅读全文