随笔 - 390  文章 - 51  评论 - 166  阅读 - 199万
06 2013 档案
Git之分支创建策略
摘要:分支策略:git上始终保持两个分支,master分支与develop分支。master分支主要用于发布时使用,而develop分支主要用于开发使用。创建master的分支developgit checkout -b develop master切换到master分支git checkout master合并develop分支到mastergit merge --no-ff develop除了以上两个常驻分支外,我们还可以适当分支出三种分支:功能分支、预发布分支、修补分支,这三种分支使用完后也该删除,保持两个常驻分支。功能分支:该分支从develop中分支出来,开发完成后再合并入develop, 阅读全文
posted @ 2013-06-29 00:01 lee0oo0 阅读(10179) 评论(2) 推荐(2) 编辑
Git基本命令行操作
摘要:A. 新建Git仓库,创建新文件夹git init B. 添加文件到git索引git add --- 单个文件添加git add * --- 全部文件添加C. 提交到本地仓库git commit -m "代码提交描述"D. 提交到远端仓库git push origin master***master可以换成你想要推送的任何分支分支:1. 创建一个叫做"lee"的分支,并切换过去git checkout -b lee2. 切换回主分支git checkout master3. 把新建的分支删除git branch -d lee4. 再push分支到远端仓库 阅读全文
posted @ 2013-06-28 23:05 lee0oo0 阅读(11845) 评论(0) 推荐(0) 编辑
Andorid之使用GMail后台偷偷发送邮件(不要干坏事噢=。 =)
摘要:工具类:import java.util.Date;import java.util.Properties;import javax.activation.CommandMap;import javax.activation.DataHandler;import javax.activation.DataSource;import javax.activation.FileDataSource;import javax.activation.MailcapCommandMap;import javax.mail.BodyPart;import javax.mail.Multipart;impo 阅读全文
posted @ 2013-06-27 16:12 lee0oo0 阅读(921) 评论(0) 推荐(0) 编辑
Android之ListView和GridVIew加载图片
摘要:清除缓存:ImageLoader 对象 . clearCache();使用: ImageLoader loader = new ImageLoader(ApplicationContext context); loader . DisplayImage( url , ImageView );使用时候也导入这几个工具类,本方法来自github上面的开源项目:https://github.com/thest1/LazyListimport java.io.File;import android.content.Context;public class FileCache { p... 阅读全文
posted @ 2013-06-24 22:38 lee0oo0 阅读(3519) 评论(0) 推荐(1) 编辑
Android之开源中国客户端源码分析(一)
摘要:程序启动第一个界面类:net.oschina.app.AppStart功能描述:一张图片代码细节描述:一个透明度的动画效果,效果动画完成后自动启动新的Activity(Main)基本BaseActivity类,继承自Activity功能描述:分别在onCreate方法中添加Activity到栈 ; 在onDestroy方法中移除Activity代码细节描述: 提供了一个单例类AppManager,把创建的Activity放入到栈中进行管理,提供添加Activity , 移除当前Activity , 移除指定的Activity , 移除所有的Activity ,获得当前的Activity , 退 阅读全文
posted @ 2013-06-23 20:45 lee0oo0 阅读(6668) 评论(1) 推荐(0) 编辑
Andorid之Annotation框架初使用(七)
摘要:Save Instance State:程序保留Activity的实例状态 , 在onSaveInstanceState(Bundle)被系统调用的时候自动保存 ,onCreate(Bundle)被系统调用会重新修复。@EActivitypublic class MyActivity extends Activity { @InstanceState int someId; @InstanceState MySerializableBean bean;}设置没有Title:@NoTitlepublic class MyActivity extends Activity ... 阅读全文
posted @ 2013-06-22 21:36 lee0oo0 阅读(930) 评论(0) 推荐(0) 编辑
Andorid之Annotation框架初使用(六)
摘要:EVENT@Click :点击事件,只能有0个或1个参数,且参数为View @Click(R.id.myButton)void myButtonWasClicked() { [...]}@Clickvoid anotherButton() { [...]}@Clickvoid yetAnotherButton(View clickedView) { [...]}@LongClick@TouchAdapterViewEvents@ItemClick 必须有一个参数,如果这个参数是object类型,意味着adapter.getItem(position) ; 如果是int ,意味... 阅读全文
posted @ 2013-06-22 20:59 lee0oo0 阅读(1512) 评论(0) 推荐(0) 编辑
Andorid之Annotation框架初使用(五)
摘要:注入res文件夹的资源:@StringRes@EActivitypublic class MyActivity extends Activity { @StringRes(R.string.hello) String myHelloString; @StringRes String hello;}@ColorRes@EActivitypublic class MyActivity extends Activity { @ColorRes(R.color.backgroundColor) int someColor; @ColorRes int backgroundColor;}... 阅读全文
posted @ 2013-06-22 17:01 lee0oo0 阅读(618) 评论(0) 推荐(0) 编辑
Andorid之Annotation框架初使用(四)
摘要:代替繁琐的finViewById@EActivitypublic class MyActivity extends Activity { // Injects R.id.myEditText @ViewById EditText myEditText; @ViewById(R.id.myTextView) TextView textView;}指定需要在视图加载完成后才能执行的方法@AfterViews@EActivity(R.layout.main)public class MyActivity extends Activity { @ViewById TextView... 阅读全文
posted @ 2013-06-22 16:52 lee0oo0 阅读(910) 评论(0) 推荐(0) 编辑
Andorid之Annotation框架初使用(三)
摘要:线程使用:@Background这个是使用了cachedthread pool executor , 阻止开启过多的线程可以为@Background指定一个id,用于随时终止线程的操作(BackgroundExecutor.cancelAll())void myMethod() { someCancellableBackground("hello", 42); [...] boolean mayInterruptIfRunning = true; BackgroundExecutor.cancelAll("cancellable_task", mayIn 阅读全文
posted @ 2013-06-22 15:57 lee0oo0 阅读(911) 评论(1) 推荐(0) 编辑
Andorid之Annotation框架初使用(二)
摘要:Fragment:@EActivity(R.layout.fragments)public class MyFragmentActivity extends FragmentActivity { @FragmentById MyFragment myFragment; @FragmentById(R.id.myFragment) MyFragment myFragment2; @FragmentByTag MyFragment myFragmentTag; @FragmentByTag("myFragmentTag") MyFragment myFragmentTag2;. 阅读全文
posted @ 2013-06-22 15:44 lee0oo0 阅读(1075) 评论(0) 推荐(0) 编辑
Andorid之Annotation框架初使用(一)
摘要:1. 设置Activity的布局@EActivity(R.layout.main)public class MyActivity extends Activity {}注: 此时在AndroidManifest.xml 注册Activity需要: 2. 设置及使用Application设置:在AndroidManifest.xml也需要配置@EApplicationpublic class MyApplication extends Application {}使用:@EActivitypublic class MyActivity extends Activity { @App MyAp.. 阅读全文
posted @ 2013-06-22 15:20 lee0oo0 阅读(3565) 评论(0) 推荐(0) 编辑
配置Android-Annotation (github20大开源:http://www.eoeandroid.com/thread-278980-1-1.html)
摘要:1. 把androidannotations-X.X.X-api.jar 放在libs文件夹2. 把androidannotations-X.X.X.jar 放在文件夹compile-libs,1与2不能在同一目录3. 右键项目,选择Properties4. 确保java编译器是1.6或以上5. 前往java compiler 》Annotation Processing 选择 "enable annotation processing"6. 前往java compiler > Annotation Processing > Factory Path 添加JAR 阅读全文
posted @ 2013-06-16 20:17 lee0oo0 阅读(1164) 评论(0) 推荐(0) 编辑
Android Ant之打包项目,增加zipalign
摘要:通过更新项目,让项目自动生成build.xml文件。查看当前的已安装的sdk版本: android list target更新本项目,自动增加build.xml文件: android update project -n HttpTestDowns -t 11 -p /Users/Ari/Desktop/LEE/HttpTestDown-n对应的是项目名称-t就是我们之前查询的SDK版本对应的ID,大家根据自己的项目版本做出选择即可,我这个是android-8 所以用ID 1 .-p就是生成的路径以下深蓝色需要改动。。。命令后生成文件build.xml,自己创建一个名为custom_rule.. 阅读全文
posted @ 2013-06-13 12:31 lee0oo0 阅读(6683) 评论(1) 推荐(0) 编辑
Eclipse最常用10大快捷键
摘要:1. ctrl + shift +r 搜索当前项目的文件2. ctrl + o 搜索当前文件的变量与方法名3. ctrl + e 获得当前在打开栏打开的文件4. ctrl + 2 双击需要重构的变量或者其他,按下ctrl + 2 , 选择"r" , 这是直接在键盘敲新的名称,将会替换掉 java文件中所有的旧名称5. alt + shift + r 搜索Eclipse所有的项目文件6. alt + shift + l 打开Eclipse的快捷键列表7. ctrl + shift + enter 光标仍在当前行,后面的回车8. al... 阅读全文
posted @ 2013-06-12 19:12 lee0oo0 阅读(456) 评论(0) 推荐(0) 编辑
MAC之基本命令(持续更新)
摘要:把img.part1复制到test.jsp: cp img.part1 test.jpg打开文件:open test.jpg把地址的内容写到文件testapi-1.txtcurl "http://192.168.1.171:2018/api/get_list?si=1&row_count=2" -o testapi-1.txt命令行打开文件:more testapi-1.txt移除文件: rm (-i)是否移除询问移动文件: mv(-i)是否移动覆盖询问复制文件: cp列出当前路径文件信息: ls列出当前路径文件详细信息: ll查询命令行使用过的命令: histor 阅读全文
posted @ 2013-06-12 14:38 lee0oo0 阅读(319) 评论(0) 推荐(0) 编辑
MAC之curl命令
摘要:1)读取网页$ curl linuxidc.com2)保存网页$ curl http://www.linuxidc.com > page.html 或者 curl -o page.html http://www.linuxidc.com3)使用的proxy服务器及其端口:-x$ curl -x 123.45.67.89:1080 -o page.html http://www.linuxidc.com4)由于zzh/nick下的文件名都是001,002...,201,下载下来的文件重名,后面的把前面的文件都给覆盖掉了~~~没关系,我们还有更狠的!curl -o #2_#1.jpg htt 阅读全文
posted @ 2013-06-12 14:35 lee0oo0 阅读(9220) 评论(0) 推荐(0) 编辑
MAC之cat命令
摘要:cat主要有三大功能:1.一次显示整个文件。$ catfilename2.从键盘创建一个文件。$ cat>filename只能创建新文件,不能编辑已有文件.3.将几个文件合并为一个文件: $catfile1file2 > file参数:-n 或 --number 由 1 开始对所有输出的行数编号cat -n a.txt > b.txt-b 或 --number-nonblank 和 -n 相似,只不过对于空白行不编号cat -b a.txt b.txt >> c.txt-s 或 --squeeze-blank 当遇到有连续两行以上的空白行,就代换为一行的空白行-v 阅读全文
posted @ 2013-06-12 14:28 lee0oo0 阅读(10850) 评论(0) 推荐(1) 编辑
Mac下android_sdk配置环境变量
摘要:下面我将一下mac环境下的配置步骤:1.启动Terminal终端工具2.输入cd ~/ 进入当前用户的home目录3. 创建:touch .bash_profile4.打开并编辑:open .bash_profile5、在文件中写入以下内容:export PATH=${PATH}:/Users/sxpmg/Application/android-sdk-mac_x86/tools:/Users/sxpmg/Application/android-sdk-mac_x86/platform-tools其中:/Users/sxpmg/Application/android-sdk-mac_x86/t 阅读全文
posted @ 2013-06-10 22:45 lee0oo0 阅读(23281) 评论(1) 推荐(0) 编辑
Android之FileOutputStream与openFileOutput()的区别
摘要:转自:http://www.cnblogs.com/elleniou/archive/2012/05/17/2505630.htmlopenFileOutput()首先给大家介绍使用文件如何对数据进行存储,Activity提供了openFileOutput()方法可以用于把数据输出到文件中,具体的实现过程与在J2SE环境中保存数据到文件中是一样的。public void save() { try { FileOutputStream outStream=this.openFileOutput(“a.txt”,Context.MODE_WORLD_READABLE); outStream.wri 阅读全文
posted @ 2013-06-06 17:25 lee0oo0 阅读(3562) 评论(0) 推荐(0) 编辑
Android之使用Jsoup抓取网络数据
摘要:官方文档:http://www.open-open.com/jsoup/parsing-a-document.htm例子:OSchinatest.zip 阅读全文
posted @ 2013-06-04 13:59 lee0oo0 阅读(245) 评论(0) 推荐(0) 编辑
Android之使用微信开放api(四)---分享到微信圈
摘要:1. 检查是否支持微信 int wxSdkVersion = api.getWXAppSupportAPI(); if (wxSdkVersion >= TIMELINE_SUPPORTED_VERSION) ==》 true2. 发送回话或者发送到朋友圈,WXSceneTimeline(朋友圈);WXSceneSession(个人会话) SendMessageToWX.Req req = new SendMessageToWX.Req(); req.transaction = buildTransaction("text"); // transaction字段用于唯 阅读全文
posted @ 2013-06-04 12:57 lee0oo0 阅读(3354) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示