1.提取字符串2.提取指定长度的字符串3.提取指定字符为止的字符串4.取仅包含指定字符集的字符串5.取到指定字符集为止的字符串#include
int main(){ char str[512]={0}; sscanf("123456","%s",str); printf("str...
分类:
其他好文 时间:
2014-05-12 17:15:19
阅读次数:
322
内容可以左右滑动,因为使用了ViewPager(我这里用了V4包)view_pager_main.xml activitypackage
com.example.actionBarTest.actionBarTabViewPager;import
android.app.ActionBar;impo...
分类:
移动开发 时间:
2014-05-12 16:08:41
阅读次数:
409
一.内存对齐的初步讲解内存对齐可以用一句话来概括:“数据项只能存储在地址是数据项大小的整数倍的内存位置上”例如int类型占用4个字节,地址只能在0,4,8等位置上。例1:#include
struct xx{ char b; int a; int c; char d;};int main(){ st...
分类:
其他好文 时间:
2014-05-10 19:52:54
阅读次数:
323
欧几里得算法求最大公约数算法思想:
求p和q的最大公约数,如果q=0,最大公约数就是p;否则,p除以q余数为r,p和q的最大公约数即q和r的最大公约数。 java实现代码: 1 public
class Demo0 { 2 public static void main(String[] ...
分类:
编程语言 时间:
2014-05-06 09:20:44
阅读次数:
434
Exception in thread "main"
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
[Ljava.lang.Integer; at com.bupt.acm.test.TestArrayList...
分类:
编程语言 时间:
2014-05-06 00:43:46
阅读次数:
509
从开机加电到实行main函数之前的过程分为三步,目的是实现从启动盘加载操作系统程序,完成实现main函数的准备工作启动BLOS,准备是模式下的中断向量表和中断服务程序从启动盘加载操作系统程序到内存。加载操作系统程序就是靠第一步实现的为实现32位的main函数做过度工作1.1启动blos,准备实模式下...
分类:
系统相关 时间:
2014-05-06 00:41:20
阅读次数:
375
题意:求素因子只有2 3 5 7的数zsd:5842
各种打表#include#includeusing namespace std;__int64 a[6000];int main(){ int n;
memset(a,0,sizeof(a)); __int64 c=300000...
分类:
其他好文 时间:
2014-05-06 00:17:41
阅读次数:
468
题意 :求最大子段和 并且输出起始位置#includeusing namespace std;int
main(){int N,n,a[100001],first,last; cin>>N; for(int i=1;i>n; for(int
j=1;j>a[j]; int max=-...
分类:
其他好文 时间:
2014-05-06 00:12:25
阅读次数:
301
#include #include #include int main(int argc,char
**argv){ FILE *fp_src,*fp_des; char buf[128]; int num; if(argc!=3) {
printf("t...
分类:
其他好文 时间:
2014-05-02 16:06:36
阅读次数:
562
public class cal{public static void main(String[]
args){calculator ca=new calculator();byte[] first=new byte[4];byte[] second=new
byte[4];System.out.p...
分类:
其他好文 时间:
2014-05-02 15:23:23
阅读次数:
395