现在位置: 首页 > aster发表的所有文章
  • 07月
  • 30日
综合 ⁄ 共 9528字 评论关闭
1 概述 Makefile由五个部分组成: Makefile:根目录Makefile,它读取.config文件,并负责创建vmlinux(内核镜像)和modules(模块文件)。 .config:内核配置文件(一般由make menuconfig生成)。 arch/$(ARCH)/Makefile:目标处理器的Makefile。 scripts/Makefile.*:所有kbuild Makefile的规则,它们包含了定义/规则等。 kbuild Makefiles:每个子目录都有kbuild Makefile,它们负责生成built-in或模块化目标。(注意:kbuild Makefile是指使用kbuild结构的Makefile,内核中的大多数Makefile都是kbuild Makefile。) 2 kbuil......
阅读全文
  • 06月
  • 07日
编程语言 ⁄ 共 5575字 评论关闭
Like the idea of working on large scale problems? We’re hiring talented engineers, and would love to chat with you – check it out!     Note: Concurrency, as defined in this article, is the same as it is for The C10k problem: concurrent clients (or sockets). At Urban Airship we recently published a blog post about scaling beyond 500,000 concurrent socket connections. Hitting these numbers was not a trivial exercise so we’re going to share what we’ve come across during our testing. This gu......
阅读全文
  • 04月
  • 16日
综合 ⁄ 共 1681字 评论关闭
(1)Install Tomcat7 in Ubuntu: It is very easy to install tomcat7 in ubuntu. Just refer to[1],  (1)type the command: sudo apt-get install tomcat7,  (2) check the website http://localhost:8080/ In my version it is showed like this: (2) If you have already use the JavaEE eclipse, you can skip this step. Otherwise you need to install the JavaEE plugin[3] and JSTServer Adapters[4](if you ignore the JST Server Adapter you will not see the tomcat server). (3)Create tomcat7 server in ......
阅读全文
  • 05月
  • 16日
综合 ⁄ 共 1052字 评论关闭
变量赋值,一般的和比较特殊的:# Simple casea=23      echo $a b=$a echo $b [root@rong2 ~]# a=`echo Hello!`-bash: !`: event not found注意,如果在命令扩展结构中使用一个(!)的话,在命令行中将不能工作,因为这触发了 Bash的"历史机制". a=`ls -l`            #  把ls -l 的结果给 a echo $a           #  别忘了,这么引用的话,ls 的结果中的所有空白部分都没(包括换行) echo "$a"         # 这么引用就正常了,保留了空白 使用$(...)机制进行的变量赋值(除去使用``来赋值的另外一种新方法). 事实上这两种方法都是 命令替换的......
阅读全文
  • 04月
  • 13日
综合 ⁄ 共 2162字 评论关闭
Candy  Total Accepted: 14466 Total Submissions: 78095My Submissions There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must have at least one candy. Children with a higher rating get more candies than their neighbors. What is the minimum candies you must give? class Solution { public: int candy(vector<int> &ratings) { int n=ratings.size()......
阅读全文
  • 04月
  • 05日
综合 ⁄ 共 603字 评论关闭
有些时候我们需要漂亮的字体,比如说微软雅黑,但是系统却不自带,这个时候我们就需要自己把字库文件加入到系统当中来是用。简单的方法如下: c#版本:       //声明使用的API         [DllImport("coredll", EntryPoint = "AddFontResource")]         private extern static  int AddFontResource([In, MarshalAs(UnmanagedType.LPWStr)]string fontSource);   //加载字体                 int installFont = AddFontResource(@"/NAND/MSYH.ttf");                 if (installFont != 0)                 {                    ......
阅读全文
  • 02月
  • 13日
综合 ⁄ 共 2074字 评论关闭
>>>>>>>>iOS中的多线程有以下几个办法 1.performSelector(InBackground or MainThread) 这个方法比较方便,但是问题在于参数传递只能支持一个对象(传多个参数,我是将其打包在一个NSDictionary里面) 2.NSOperationQueue 这个方法稍微复杂,提供了每个任务的封装(NSOperation)。可以继承NSOperation之后,在main函数中写一些同步执行的代码,然后放到一个Queue之中,Queue自动管理Operation的执行和调度(在UI线程以外)。对于异步执行的代码,需要重载NSOperation的好几个函数才能正常工作(告诉Queu......
阅读全文
  • 01月
  • 29日
综合 ⁄ 共 2316字 评论关闭
进阶篇    一、该版本中使用了Pooled Actor机制,而不是actor-id。  **解释:就是说通过Pooled Actor可以将一个任务一次分配给一组(多个)参与者,     注意这和之前不一样,之前是针对同一个任务,然后产生多个任务实例对象,     然后每个实例对象对应一个任务的参与者,其实还是相当于一个任务对应了一个参与者;     现在说的使用Pooled Actor是将一个任务的一个任务实例对象分配给一组参与者。      **运行原理:     当把一个任务的一个任务实例对象分配给一组参与者之后,     那么该组参与者的每个成员登陆系统后,都可以看......
阅读全文
  • 01月
  • 24日
综合 ⁄ 共 1029字 评论关闭
1.关闭oracle所有的服务 windows的服务管理器(Windows+R,然后输入services.msc快速打开任务管理器)中关闭(如果您没有打开过oracle任务,那就直接跳过吧!) 2.删除oracle在注册表中的信息 windows+R,然后输入regedit 打开注册表。 (1)删除Oracle在Windows中注册的各种服务 打开路径: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ ,删除该路径下的所有以oracle开始的服务名称。 (2)删除Oracle注册的安装信息 打开路径:HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE ,删除该oracle目录。 (3)删除oracle注......
阅读全文
  • 01月
  • 08日
综合 ⁄ 共 89字 评论关闭
NSNumber *aNumber = [NSNumber numberWithInteger:11];NSInteger anInteger = [aNumber integerValue];
阅读全文
  • 12月
  • 15日
综合 ⁄ 共 719字 评论关闭
1.  test if a key exists in a dict. The lame version: dct.has_key(key) The Python way: key in dct 2. test if a key NOT exist in a dict. Do this you must not: not key in dict More confortable way: key not in dict 3.  use dict to count something  The mediocre way: if key not in dct: dct[key] = 0 dct[key] = dct[key] + 1 Awesome way: dct[key] = dct.get(key, 0) + 1 More Awesome: >>> from collections import Counter >>> d = [1, 1, 1, 2, 2, 3, 1,......
阅读全文
  • 12月
  • 06日
综合 ⁄ 共 1935字 评论关闭
你的软件架构设计的再优雅,也并不希望除了你之外的人接触到你的源码。如果说把你的代码比作苍老师的话,那么你如果你并不希望除你之外的人看到代码,那么你一定希望有一款工具能让你的代码由苍老师变成凤姐,让人望而却步。Proguard无疑是你一个非常好的选择。Progurad是一款非常常用的java混淆程序。除了本身提供的功能外,它也作为开源软件被大家津津乐道。但是网络上并没有针对Proguard源码分析的博客或者文章。今天我就将带大家开启我们的Proguard源码分析之旅。刚开始不得不吐槽一下,Proguard的源码写的比较难以阅读,或者这是我第......
阅读全文