摘要: 在项目运行过程中,在手机上运行会出现闪退的现象, 报告错误代码如下:06-30 10:45:19.921: E/cocos2d-x assert(28033): E:/workspace/cocos2d-x-2.2.2/projects/****/proj.android/../../../coco... 阅读全文
posted @ 2014-06-30 11:47 zhang1107 阅读(4311) 评论(0) 推荐(0) 编辑
摘要: printf("%d",Abs(get(Y,M,D)-get(y,m,d)));int get(int y,int m,int d){ if(m<3){ --y; m+=12; } return 365*y+y/4 - y/100+y/400+(153*m - 457)/5+d - 306;}View Code 阅读全文
posted @ 2013-12-01 13:27 zhang1107 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4454#pragma comment (linker,"/stack:102400000,102400000")#include #include #include #include #include #include #include #include #include #include #include using namespace std;const int MM = 1111;#define inf 0x3f3f3f3f#define pi acos(-1.0)cons 阅读全文
posted @ 2013-10-28 13:00 zhang1107 阅读(277) 评论(0) 推荐(0) 编辑
摘要: import android.R.string;import android.location.GpsStatus.Listener;import android.net.Uri;import android.os.Bundle;import android.app.Activity;import android.text.Spannable;import android.text.SpannableStringBuilder;import android.text.style.ForegroundColorSpan;import android.util.Log;import android 阅读全文
posted @ 2013-06-08 16:01 zhang1107 阅读(310) 评论(0) 推荐(0) 编辑
摘要: 新建一个用于service的class,Superclass属性设置为Service-android.app, 命名为Pservice在其中复写方法,代码如下:@Override public void onCreate() { // TODO Auto-generated method stub Log.i(TAG, "EXampleService--->onCreate"); super.onCreate(); } @Override public void onDestroy() { // TODO Auto... 阅读全文
posted @ 2013-06-08 15:27 zhang1107 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 创建Source Folder用于打包test的包:New->Package新建一个包用于存放debug的class,在这个报下面New->class创建一个class对于class创建:New->JUnit Test Case, Superclass(browse)->androidTestCase选择测试的方法debug不是太会做, 以后做项目慢慢补充。 阅读全文
posted @ 2013-06-08 14:39 zhang1107 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Table.Layout属于一种表格布局:Table.Layout属于一种表格布局:android:stretchColumns="1" //自动填补空白android:shrinkColumns="2" //当一个button的内容超出一行的长度自动换行android:layout_column="2" //指定控件的列号android:layout_span="2" //合并两列一个例子:TableLayout类似与LinearLayout 的控件配置<TableLayout xmlns:android= 阅读全文
posted @ 2013-06-08 11:09 zhang1107 阅读(143) 评论(0) 推荐(0) 编辑
摘要: RelativeLayout的一个简单的列子:<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/txt01" android:layout_width="wrap_content" 阅读全文
posted @ 2013-06-08 00:08 zhang1107 阅读(149) 评论(0) 推荐(0) 编辑
摘要: AbsoluteLayout(不推荐使用): <TextView android:layout_x="10px" android:layout_y="10px" android:background="#00FF00" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello" /> View Code FrameLayo 阅读全文
posted @ 2013-06-07 23:50 zhang1107 阅读(339) 评论(0) 推荐(0) 编辑
摘要: <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" <!--垂直布局--> > <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayou 阅读全文
posted @ 2013-06-07 23:03 zhang1107 阅读(151) 评论(0) 推荐(0) 编辑