让/etc/profile文件修改后立即生效来源: ChinaUnix博客 日期: 2009.06.11 14:15 (共有条评论) 我要评论 方法1:让/etc/profile文件修改后立即生效 ,可以使用如下命令:# . /etc/profile注意: . 和 /etc/profile 有空.....
分类:
其他好文 时间:
2015-08-26 17:20:17
阅读次数:
201
1首先介绍如何写menu,若想在activity里添加menu按钮时,在activity里覆写下面2个方法:public boolean onCreateOptionsMenu(Menu menu)和public boolean onOptionsItemSelected(MenuItem item...
分类:
其他好文 时间:
2015-08-26 17:20:09
阅读次数:
158
1.抽象类抽象方法:抽象方法只有声明,没有具体实现,用关键字abstract修饰。1 abstract void f();如果一个类含有抽象方法,则称这个类为抽象类(抽象类不一定必须含有抽象方法)。抽象类无具体实现的方法,所以不能用抽象类创建对象。抽象类是为了继承而存在。对于一个父类,如果它的某个方...
分类:
其他好文 时间:
2015-08-26 17:18:35
阅读次数:
147
- (void)initUserInterface{ UILabel *label = [[UILabel alloc]init]; label.numberOfLines = 0; // 需要把显示行数设置成无限制 label.font = [UIFont systemFontO...
分类:
其他好文 时间:
2015-08-26 17:20:35
阅读次数:
298
#include #include int main(void){ char s[]="123456789"; char d[]="123"; strcpy(d,s); printf("%s,%s",d,s); return 0;}结果:123456789,56789解析:在内存中分配如下...
分类:
其他好文 时间:
2015-08-26 17:19:18
阅读次数:
160
function detect(ua){ var os = this.os = {}, browser = this.browser = {}, webkit = ua.match(/WebKit\/([\d.]+)/), android = ua.match(/(An...
分类:
其他好文 时间:
2015-08-26 17:17:07
阅读次数:
136
题意:已知x+y=A x*y=B 求X^n+Y^n.思路:设f(i)为X^n+Y^n 则f(n)=A*f(n-1)-B*f(n-2) 然后矩阵快速幂.在矩阵乘法过程中有负数 在取余之前要先加上MOD.#include #include #include #include #include #incl...
分类:
其他好文 时间:
2015-08-26 17:17:30
阅读次数:
123
/*ID: modengd1PROG: milk2LANG: C++*/#include #include #include struct node{ int time; int O; node(int t,int o) { time=t; O=o...
分类:
其他好文 时间:
2015-08-26 17:16:53
阅读次数:
138
经过几天的学习,工作需要新的项目是用rails完成的,目的是为了部署的方便。写的过程还好,但是在部署的时候很痛苦,经过2天的摸索终于部署成功,现在把它记录下来希望可以有所帮助,也希望看到这篇文章的人可以多多指正。 第一次部署的尝试,直接进入项目所在目录,然后执行 rails server 启动...
分类:
其他好文 时间:
2015-08-26 17:16:51
阅读次数:
167
xz是一种压缩文件格式,采用LZMA SDK压缩,目标文件较gzip压缩文件(.gz或·tgz)小30%,较·bz2小15%。Linux内核和python源代码都有采用这种压缩方式,那么如何对其进行解压呢?如今tar命令已经可以完成解压,可以使用tar -xJvf linux-4.1.2.tar.x...
分类:
其他好文 时间:
2015-08-26 17:17:09
阅读次数:
151
对于声明一个类实例化后,用实例化的对象调用属性时的内存解析:Animal a1=new Animal();//类的实例化,实例化出一个a1对象a1.name="花花";a1.age=3;Animal a2=new Animal();Animal a3=a1;//相当于把a1的首地址赋值给a3,其实a...
分类:
其他好文 时间:
2015-08-26 17:16:54
阅读次数:
127
- (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event { if(![m_textView isExclusiveTouch]) { [m_textView resignFirstResponder]; } self...
分类:
其他好文 时间:
2015-08-26 17:16:05
阅读次数:
190
研究死锁,或者观察sp_lock,有时候最恼人的莫过于你看到下面研究成果的key lock,但是却不知道究竟是哪个page 哪个row被lock住了:Exec sp_lock:就说上面的key (9dd27be994c0) 吧,能不能知道这个key,究竟是对应于那个table,那个data page...
分类:
其他好文 时间:
2015-08-26 17:17:50
阅读次数:
145
Intent intent = new Intent(CardInfoActivity.this, CardRechargeListActivity.class); intent.putExtra("action", "consumption"); intent.putExtra("car...
分类:
其他好文 时间:
2015-08-26 17:17:15
阅读次数:
91
题目:Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space fo...
分类:
其他好文 时间:
2015-08-26 17:15:29
阅读次数:
114
在 IIS 7.0 中,对于使用 Url 路由 访问页面的 ASP.NET 应用程序,IIS可能会不能出 Url 是对 ASP.NET 的请求。 会显示404啊,403啊之类的错误代码(因为路径不存在,或者不允许查看目录)。 网上一般的解决方案比较“粗暴”,直接设置 runAllManagedMod...
分类:
其他好文 时间:
2015-08-26 17:14:37
阅读次数:
2828