摘要: 命令介绍说明pwd打印出当前所在目录mkdir创建一个目录rmdir删除一个目录rm删除文件或目录 -r:删除目录时必须加上cp复制一个文件或目录 -r:复制目录时必须加上touch创建文件echo输出字符并追加到文件中 例:touch 1.txt echo 'test'>1.txtmv移动文... 阅读全文
posted @ 2014-11-13 10:31 sp5i5s 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 淘宝网API地址: http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=15850781443参数:tel:手机号码返回:JSON拍拍API地址:http://virtual.paipai.com/extinfo/GetMobilePro... 阅读全文
posted @ 2014-10-28 13:40 sp5i5s 阅读(2919) 评论(1) 推荐(0) 编辑
摘要: Install-Package EntityFramework -version 5.0.0.0 阅读全文
posted @ 2014-10-27 16:20 sp5i5s 阅读(490) 评论(0) 推荐(0) 编辑
摘要: 好久没有在博客园更新博客了,如今都换了新公司。前段时间写了关于EF迁移的文档,今天拿出来作为这个系列的一篇吧。一、Entity Framework 迁移命令(get-help EntityFramework)Enable-Migrations 启用迁移Add-Migration 为挂起的Model变... 阅读全文
posted @ 2014-10-13 16:55 sp5i5s 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 出处:http://www.cnblogs.com/awenhome/archive/2011/12/29/2305813.html布局: 在 android 中我们常用的布局方式有这么几种:1.LinearLayout ( 线性布局 ) :(里面只可以有一个控件,并且不能设计这个控件的位置,控件会放到左上角) 线性布局分为水平线性和垂直线性二者的属性分别为: android:orientation= " horizontal " android:orientation= "vertical" 。 2.RelativeLayout ( 相对布局 ) : 阅读全文
posted @ 2012-05-23 16:25 sp5i5s 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 显示网页: 1. Uri uri = Uri.parse("http://www.google.com"); 2. Intent it = new Intent(Intent.ACTION_VIEW,uri); 3. startActivity(it); 显示地图: 1. Uri uri = Uri.parse("geo:38.899533,-77.036476"); 2. Intent it = new Intent(Intent.Action_VIEW,uri); 3. startActivity(it); 路径规划: 1. Uri uri = Ur 阅读全文
posted @ 2012-05-22 22:25 sp5i5s 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Android activity属性android:allowTaskReparenting是否允许activity更换从属的任务,比如从短信息任务 切换到浏览器任务。android:alwaysRetainTaskState是否保留状态不变, 比如切换回home, 再从新打开, activity处于最后的状态android:clearTaskOnLanunch比如 P 是 activity, Q 是被P 触发的 activity, 然后返回Home, 从新启动 P, 是否显示 Qandroid:configChanges当配置list发生修改时,是否调用 onConfigurationCha 阅读全文
posted @ 2012-04-28 15:22 sp5i5s 阅读(557) 评论(0) 推荐(0) 编辑
摘要: 从源Activity 中传递数据//数据写入IntentIntent openWelcomeActivityIntent=new Intent();Bundle myBundelForName=new Bundle();myBundelForName.putString("Key_Name",inName.getText().toString());myBundelForName.putString("Key_Age",inAge.getText().toString());openWelcomeActivityIntent.putExtras(myBu 阅读全文
posted @ 2012-04-26 14:30 sp5i5s 阅读(136) 评论(0) 推荐(0) 编辑
摘要: BaseAdapter就Android应用程序中经常用到的基础数据适配器,它的主要用途是将一组数据传到像ListView、Spinner、Gallery及GridView等UI显示组件,它是继承自接口类Adapter,1、Adapter类简介1)、Adapter相关类结构如下图所示:自定义Adapter子类,就需要实现上面几个方法,其中最重要的是getView()方法,它是将获取数据后的View组件返回,如ListView中每一行里的TextView、Gallery中的每个ImageView。 2)、Adapter在Android应用程序中起着非常重要的作用,应用也非常广泛,它可看作是数据源和 阅读全文
posted @ 2012-04-23 13:04 sp5i5s 阅读(144) 评论(0) 推荐(0) 编辑
摘要: android项目中碰到需要替换tabHost默认样式的情况,需要达到下图的效果:为了做成这样的效果,花了些时间,这里做个笔记,给有需要的朋友。步骤一:新建一个xml布局文件,命名main.xml<?xml version="1.0" encoding="utf-8"?><TabHost xmlns:android="http://schemas.android.com/apk/res/android"android:id="@android:id/tabhost" android:layout_ 阅读全文
posted @ 2012-04-19 13:17 sp5i5s 阅读(306) 评论(0) 推荐(0) 编辑