显示操作进度的对话框
1、使用上一篇创建的同一项目,在activity_main.xml文件中添加一个Button:
<Button
android:id="@+id/btn_dialog3"
android:layout_width="fill_parent"
android:layout_height="wrap_cont...
分类:
移动开发 时间:
2014-05-07 11:30:28
阅读次数:
434
#include using namespace std;#define Max(a, b)((a
> b)? a : b)int count = 9;int nMax = Max(count++, ++count);int main(){
cout<<count<<endl; cout<<...
分类:
其他好文 时间:
2014-05-07 11:07:48
阅读次数:
242
用栈实现括号匹配其实是一个很简单的问题,思路在代码注释里面写的很清楚了,只是接口设置的好像不太好。
如果在main里面设置的str不是动态分布的,在linux下就会出错,不知道windows会不会出问题。
kuohao.cpp
#include
#include "stack.cpp"
using namespace std;
//仅用于检测(),{},[],其他的符号原理都是一样的
bo...
分类:
其他好文 时间:
2014-05-07 02:39:17
阅读次数:
247
一、进程:进程就是一个正在执行的程序。二、线程:线程是进程执行的一条线索或路径。进程中至少有一个线程存在。三、多线程:顾名思义,一个进程中的多个线程。
线程的开始:当要运行一个程序时,JVM首先会找到main函数,然后从main函数开始执行(也就是说,程序是从main函数开始运行的), 此时,程序就...
分类:
编程语言 时间:
2014-05-07 01:19:40
阅读次数:
403
程序运行先显示一个对话框,确定进入主程序1.新建Qt工程,类MyWidget,基类QWidget2.新建设计师界面类MyDialog,基类QDialog3.-----main.cpp-----
1 #include "mywidget.h" 2 #include "mydialog.h" 3 #in...
分类:
编程语言 时间:
2014-05-07 01:13:35
阅读次数:
378
#include #include #include using namespace
std;int main(){ int n;cin>>n; while(n--){ stack s; string
str;cin>>str; for(int ...
分类:
其他好文 时间:
2014-05-07 00:19:41
阅读次数:
356
如果selector无法实现点击切换图片的效果,你是否查看了xml文件的item标签中,把正常的图片标签放在最后?你是否把main.xml中的android:background="@drawable/item的xml文件名字”?详情请看。。。...
分类:
其他好文 时间:
2014-05-06 23:38:48
阅读次数:
382
前面文章:使用cgi c 写了一个helloworld
这次 主要使用CGI c语言 获取form表单的数据
1 login.c
aries@ubuntu:/usr/lib/cgi-bin$ cat login.c
#include
#include
#include
int main(){
int i,len=0;
char poststr...
分类:
编程语言 时间:
2014-05-06 22:57:48
阅读次数:
592
本章关注单进程运行环境:启动&终止、参数传递和内存布局等。
进程启动终止
如图所示:
启动:内核通过exec函数执行程序,在main函数运行之前,会调用启动例程(start-up routine),取得命令行参数和环境变量。可以把启动例程理解为exit(main(argc,argv))。终止:五种正常终止方式(从main方法返回/exit/_exit/最后一个线程返回/最...
分类:
其他好文 时间:
2014-05-06 22:03:53
阅读次数:
514
1,有几位数字
#include
int main_2_1_digit(){
int n;
while(scanf("%d",&n)){
int count = 0;
if(n==0)
count = 1;
while(n){
count++;
n/=10;
}
printf("%d\n",count);
}
return 0;
}
...
分类:
其他好文 时间:
2014-05-06 21:20:19
阅读次数:
374