上一页 1 ··· 8 9 10 11 12 13 14 下一页
摘要: 1.strlen2.strcmp3.strcasecmp4.strspn(str1,str2) //返回str1中含有str2的一部分5.strcspn(str1,str2) //返回str1中包含str2中没有的部分6.strtolower7.strtoupper8.ucfirst9.ucwor... 阅读全文
posted @ 2011-11-06 13:50 rorshach 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 一、创建数组1.$arrayname[]2.array3.list4.range(min,max) //range(1,10),range('a','z')二.验证数组is_array($arr)三.增加和删除数组元素1.$arrname[]2.array_push($array,$val1,$v... 阅读全文
posted @ 2011-11-06 12:46 rorshach 阅读(142) 评论(0) 推荐(0) 编辑
摘要: set sql_safe_updates=1设置该变量后,不使用where条件将无法删除或更新数据 阅读全文
posted @ 2011-10-31 23:35 rorshach 阅读(279) 评论(0) 推荐(0) 编辑
摘要: mysql -uroot -proot -H c:/data.html;mysql -uroot -proot -X c:/data.xml;在sql.sql中写入批处理命令,既可导出xml或html数据 阅读全文
posted @ 2011-10-31 23:32 rorshach 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-10-08 23:27 rorshach 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-10-06 10:11 rorshach 阅读(107) 评论(0) 推荐(0) 编辑
摘要: ';echo htmlspecialchars(file_get_contents($path));echo '';exit;}}list_addlink($path);/**+--------------------------------------------*列出路径下所有文件或文件夹,并... 阅读全文
posted @ 2011-10-06 09:43 rorshach 阅读(156) 评论(0) 推荐(0) 编辑
摘要: ";}}}closedir($f);rmdir($file);echo "目录{$file}删除成功!";}else if(is_file($file)){echo "文件{$file}删除成功!";unlink($file);}}else{die('文件或目录不存在');}}?> 阅读全文
posted @ 2011-10-05 22:43 rorshach 阅读(415) 评论(0) 推荐(0) 编辑
摘要: http://www.99juhui.com/phpunit/index_cn.html#automating-tests 阅读全文
posted @ 2011-09-26 18:43 rorshach 阅读(91) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2011-09-20 14:08 rorshach 阅读(107) 评论(0) 推荐(0) 编辑
摘要: 1.在linux系统中使用which mysqld确定msyql的配置文件所在2.配置设置都是小写的,使用下划线或破折号分割单词3.在32位的linux操作系统上,单个进程使用的内存是2.5G-2.7G,系统函数库不能一次分配2G大小的内存,所以mysql的任何配置都应该小于2G4.最重要的缓存:... 阅读全文
posted @ 2011-09-10 18:37 rorshach 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1、char和varcharchar是定长的,如果声明了一个char长度为(200)的字段,row数据为“hello”,则余下的位数由空格补齐2.MySQL中可以使用timestamp和datetime来保存日期。datetime表现格式为:YYYYMMDDHHMMSStimestamp表现格式为... 阅读全文
posted @ 2011-09-10 18:36 rorshach 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 1、explain将explain关键字加在sql语句前,将会列出详细的性能信息。a、table:指明表名b、type:连接类型,从最好到最差依次是:system,const,eq_ref,ref,range,index,ALL,possiable_keyc、key:显示mysql实际决定使用的键... 阅读全文
posted @ 2011-09-07 17:53 rorshach 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Lazy Load 是一个用 JavaScript 编写的 jQuery 插件. 它可以延迟加载长页面中的图片. 在浏览器可视区域外的图片不会被载入, 直到用户将页面滚动到它们所在的位置. 这与图片预加载的处理方式正好是相反的. 在包含很多大图片长页面中延迟加载图片可以加快页面加载速度. 浏览器将... 阅读全文
posted @ 2011-09-01 22:15 rorshach 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 一、注册MapApishttp://code.google.com/intl/zh-CN/android/maps-api-signup.html二、查询经度纬度或地址http://code.google.com/intl/zh-CN/apis/maps/documentation/geocodi... 阅读全文
posted @ 2011-08-29 23:15 rorshach 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 三、Frame-byFrame动画Activity代码:publicclass AnimationFrameByFrameActivityextends Activity {private ImageViewimg=null;private Buttonbtn=null;@Overridepubl... 阅读全文
posted @ 2011-08-29 23:14 rorshach 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 二、Animation事件监听publicclass AnimationListenerDemoActivityextends Activity {private Buttonadd=null;private Buttondel=null;private ViewGroupviewGroup=nu... 阅读全文
posted @ 2011-08-29 23:14 rorshach 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 一、利用res文件夹下的anim文件下的xml创建:Activity代码:publicclass Animations2Activityextends Activity {private Buttonbtn1=null;private ImageViewimg=null;@Overridepubl... 阅读全文
posted @ 2011-08-29 23:13 rorshach 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 一、Animation在Activity中设置动画效果:package org.demo.animations1;import android.app.Activity;import android.os.Bundle;import android.view.View;import android... 阅读全文
posted @ 2011-08-29 23:12 rorshach 阅读(160) 评论(0) 推荐(0) 编辑
摘要: AppWIdget代码地址:http://filer.blogbus.com/6436157/resource_6436157_1314631113d.doc 阅读全文
posted @ 2011-08-29 23:12 rorshach 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 一、RatingBarActivity代码publicclass RatingBarDemoActivityextends Activity {private RatingBarrb=null;/** Called when the activity is first created. */@Ov... 阅读全文
posted @ 2011-08-29 23:08 rorshach 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 一、ProgressBar控件:布局文件代码:Activity代码:btn1.setOnClickListener(new OnClickListener() {publicvoid onClick(View v) {//TODO Auto-generated method stubif(i==0... 阅读全文
posted @ 2011-08-29 23:07 rorshach 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 一、ExpandableListActivity代码:public class ExpandableListActivityDemoActivity extends ExpandableListActivity {/** Called when the activity is first crea... 阅读全文
posted @ 2011-08-29 23:07 rorshach 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 一、AutoCompleteTextMain.xmlActivity代码setContentView(R.layout.main);actv1=(AutoCompleteTextView)findViewById(R.id.actv1);String[] list={"hi","home","he... 阅读全文
posted @ 2011-08-29 23:07 rorshach 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 一、Datapickeractivity示例代码:publicclass DatePickerDIalogDemoActivityextends Activity {private Buttonbtn1=null;private TextViewtv1=null;@Overridepublicvo... 阅读全文
posted @ 2011-08-29 23:06 rorshach 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 一、spinner控件Activity代码:publicvoid onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.main);Spinner sp1=nu... 阅读全文
posted @ 2011-08-29 23:05 rorshach 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Activity类:publicclass ServiceUIextends Activity {private mServiceUIReceivermReceiver =null;private TextViewtv_msg =null;private ProgressDialogmProgre... 阅读全文
posted @ 2011-08-29 23:05 rorshach 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Mainfest代码清单:一、使用Service和Broadcast更新UI界面Service类:publicclass ServiceUIServiceextends Service{publicstaticfinal StringSERVICEUI_SERVICE ="com.cmd100.s... 阅读全文
posted @ 2011-08-29 23:04 rorshach 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 一、Service简单示例:Service类:publicclass DummyServiceextends Service {@Overridepublic IBinder onBind(Intent arg0) {//TODO Auto-generated method stubreturnn... 阅读全文
posted @ 2011-08-29 23:03 rorshach 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 一、广播机制广播类:publicclass MyReveiverextends BroadcastReceiver {//等待接收广播@Overridepublicvoid onReceive(Context context, Intent intent) {//TODO Auto-generat... 阅读全文
posted @ 2011-08-29 23:02 rorshach 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 一、解析json准备工作:导入gson的jar包下载地址:http://code.google.com/p/google-gson/二、解析1、使用JsonReader示例代码如下://json数据为json="[{\"name\":\"guoxu\",\"age\":25},{\"name\":... 阅读全文
posted @ 2011-08-29 23:02 rorshach 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 一、使用SAX解析xml文件新建一个类,继承之DefaultHandler:示例代码如下:package org.demo.saxxml;import org.xml.sax.Attributes;import org.xml.sax.SAXException;import org.xml.sax... 阅读全文
posted @ 2011-08-29 23:01 rorshach 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 一、操作SD卡SD卡文件存储在SDCARD目录下。对于android版本在1.5以下的,无需声明用户权限。1.5以上的需要声明用户权限:使用以下方法获得SD卡路径:Environment.getExternalStorageDirectory()此方法获得的将是一个文件夹的路径。二、文件下载:部分... 阅读全文
posted @ 2011-08-29 23:00 rorshach 阅读(124) 评论(0) 推荐(0) 编辑
摘要: //插入数据 btn3=(Button)findViewById(R.id.btn3);btn3.setOnClickListener(new OnClickListener(){publicvoid onClick(View v) {//建立数据对象ContentValues values=ne... 阅读全文
posted @ 2011-08-29 23:00 rorshach 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 对应的Activity代码:publicclass SqLiteDemoActivityextends Activity {private Buttonbtn1=null;private Buttonbtn2=null;private Buttonbtn3=null;private Buttonb... 阅读全文
posted @ 2011-08-29 22:59 rorshach 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 一、cmd下sqlite常用命令$adb shell //进入adb模式下$ls //列出当前目录下文件和文件夹$ls –l //列出详细状况进入data->data下文件夹,找到以包名为名的文件夹,进入,进入databases文件夹就可以看到该应用对应的数据库了。$sqlite3 //查看相应版... 阅读全文
posted @ 2011-08-29 22:58 rorshach 阅读(144) 评论(0) 推荐(0) 编辑
摘要: head.xml布局文件代码:Item布局文件代码:Activity中的监听器代码:@Overrideprotectedvoid onListItemClick(ListView l, View v,int position,long id) {//TODO Auto-generated meth... 阅读全文
posted @ 2011-08-29 22:57 rorshach 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 一、ListView控件Activity的main.xml布局文件代码:Activity代码(activity需要继承ListActivity):super.onCreate(savedInstanceState);setContentView(R.layout.main);mItems=new ... 阅读全文
posted @ 2011-08-29 22:57 rorshach 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 一、HandlerActivity代码:package org.demo.handler;import android.app.Activity;import android.os.Bundle;import android.os.Handler;import android.os.Message... 阅读全文
posted @ 2011-08-29 22:57 rorshach 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 一、CheckBox控件布局文件代码:Activity代码://设置监听器read=(CheckBox)findViewById(R.id.read);read.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListene... 阅读全文
posted @ 2011-08-29 22:56 rorshach 阅读(184) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 下一页