代码改变世界

Android Alertdialog之多选对话框

2014-02-21 19:30 by kingshow, 1845 阅读, 0 推荐, 收藏, 编辑
摘要:Android UI各种各样,下面是自己学习时写的多选对话框的实例。也在网上看了很多实例,但很多实例都没有将选择后的值显示出来,或者选择后,当用户取消选择时,以前选择的值还在的情况很多。下面是实例不会有这样的问题。 Android中的对话框形式有四种,分别是一般对话框形式,列表对话框形式,单选按钮对话框,多选按钮对话框,这里主要是针对多选对框框的介绍。一、创建alertdialog工程,如图二、activity_main.xml中代码 View Code 三、MainActivity中的代码package com.bruce.alertdialog;import android... 阅读全文

8 Types Of Friends You Need To Have in Your Life

2014-02-21 12:27 by kingshow, 401 阅读, 0 推荐, 收藏, 编辑
摘要:8 Types Of Friends You Need To Have in Your Life一生中应该有的8种类型的朋友Did you know that people without friends are more likely to die an early death? 你知道吗?没有朋友的人往往死的早。 It’s true. Just ask science. 这是真的。不信,可以向科学求证。 To up your chances of living a long, happy life, having a bunch of fair-weather buddies won’t 阅读全文

Android ContentProvider 内容提供者

2014-02-20 17:05 by kingshow, 488 阅读, 0 推荐, 收藏, 编辑
摘要:ContentProvider 内容提供者,是Android四大组件之一。一、简述 可以理解为一个特殊的存储数据的类型,它提供了一套标准的接口来获取和操作数据。可以把数据封装到ContentProvider 中,从而是这些数据可以被其他的应用程序所共享。搭建起了所有应用程序之间数据交换的桥梁!1. 内容提供者可以将应用中的数据对外进行共享 2.内容提供者将数据的访问方式统一,不必针对不同数据类型采取不同的访问策略 3.内容提供者将数据封装,只暴露出我们希望提供给其他程序的数据 4.内容提供者中数据更改可被监听二、创建内容提供者 定义类继承ContentProvider,根据需要重写内部方... 阅读全文

10 signs you’re dating the wrong person

2014-02-20 08:34 by kingshow, 294 阅读, 0 推荐, 收藏, 编辑
摘要:10 signs you’re dating the wrong person10个迹象表明TA不是你的真心人 Do you have any exes who were so awful you can’t help wondering, “What the hell was I thinking?” Join the club. If you’d like to make sure you’re with Mr. or Ms. Right, watch out for these 10 signs you’re dating the wrong person. 有没有某位前任糟糕到让你忍. 阅读全文

SQLite增删改查(利用系统API)

2014-02-19 16:19 by kingshow, 244 阅读, 0 推荐, 收藏, 编辑
摘要:在SQLite增删改查(自己写SQL语句)中介绍了通过自己写SQL语句来实现增删改查。下面是利用系统API来实现。一、在上一篇中工程中直接增加PersonService2,PersonDao2和MyTest2类。如图二、PersonService2详细代码package com.bruce.db_test.service;import java.util.List;import java.util.Map;import android.content.ContentValues;public interface PersonService2 { public boolean inser... 阅读全文

15 things to talk about in a healthy relationship

2014-02-19 08:24 by kingshow, 214 阅读, 0 推荐, 收藏, 编辑
摘要:15 things to talk about in a healthy relationship男女交往中可以谈论的15个话题 1. Your Daily Activities 1. 你的日常活动 All of your conversations don’t have to be earth shattering. Spend time talking about your day-to-day activities. Discuss what time you woke up, what you ate for lunch, or what you discussed with a co 阅读全文

SQLite增删改查(自己写SQL语句)

2014-02-18 14:14 by kingshow, 1069 阅读, 0 推荐, 收藏, 编辑
摘要:在http://www.cnblogs.com/kingshow123/p/sqlitecreate.html中,实现了数据库的创建和升级。没有增加向数据库中添加、删除、修改和查询Data的代码,这里用一种方式实现这些功能。一、在先前的工程中增加PersonService接口和PersonDao类。看下图:二、PersonService接口代码package com.bruce.db_test.service;import java.util.List;import java.util.Map;public interface PersonService { public boolea... 阅读全文

Why you have so few friends?

2014-02-18 11:46 by kingshow, 333 阅读, 0 推荐, 收藏, 编辑
摘要:Why you have so few friends?十个原因告诉你:为什么你的朋友那么少1. You Complain A Lot 你总是抱怨 If you’re constantly complaining about your job, lack of money, or unfair life, people won’t care to spend a lot of time with you. Complaining gets old fast. Try to develop a more positive attitude and look for more interestin 阅读全文

android数据库SQLite简单测试

2014-02-14 14:43 by kingshow, 1740 阅读, 0 推荐, 收藏, 编辑
摘要:SQLite是文本型的数据库,这里是简单的数据库创建和数据库升级。上班闲得无聊,突然想起昨天有人问android数据库的创建和升级,所以简单记录一下,高手没有必要看这个博文 O(∩_∩)O~一、首先看一下整个工程目录二、创建android工程名db_test,打开AndroidManifest.xml文件,添加单元测试点击instrumentation->add,然后再右边Name行处,点击Browser,添加InstrumentationTestRunner;在Target package行处,点击Browser添加自己应用包名(这里是com.bruce.db_test) 注意:在完成 阅读全文

C语言 stringcpy,stringcat,stringcmp实现

2014-02-14 08:22 by kingshow, 4834 阅读, 0 推荐, 收藏, 编辑
摘要:复习复习C语言,O(∩_∩)O~#include#include//实现从源字符串string到目的字符串str的复制函数char* stringCpy(char* str,const char* string){ char* s=str; while(*string) { *s++=*string++; } *s='\0'; //返回目的字符串的首地址 return str;}//函数将字符串string链接到字符串str的尾部char* stringCat(char* str,const char* string){ char... 阅读全文
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 26 下一页