上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 46 下一页
摘要: 对sqlite数据库进行增删改查常用的有两种方法。 事务: 执行多条sql语句,要么同时执行成功,要么同时执行失败,不能有的成功,有的失败 第一种: 1.创建一个帮助类的对象,调用getReadableDatabase方法,返回一个SqliteDatebase对象 2.使用SqliteDatebas 阅读全文
posted @ 2017-08-15 20:16 starry_sky 阅读(865) 评论(0) 推荐(0) 编辑
摘要: 在Android下用的数据库是:sqlite,嵌入式 轻量级的 创建sqlite数据库一般是去继承SQLiteOpenHelper类。 官方文档是这样的: 由于是一个抽象类就必须用一个类去继承它,里面有两个抽象方法onCreate和onUpgrade必须去实现。 onCreate方法:是数据库第一次 阅读全文
posted @ 2017-08-15 19:29 starry_sky 阅读(545) 评论(0) 推荐(0) 编辑
摘要: There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roads. Theon a 阅读全文
posted @ 2017-08-13 11:18 starry_sky 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 小C的倍数问题 Problem Description 根据小学数学的知识,我们知道一个正整数x是3的倍数的条件是x每一位加起来的和是3的倍数。反之,如果一个数每一位加起来是3的倍数,则这个数肯定是3的倍数。现在给定进制P,求有多少个B满足P进制下,一个正整数是B的倍数的充分必要条件是每一位加起来的 阅读全文
posted @ 2017-08-13 09:20 starry_sky 阅读(735) 评论(0) 推荐(0) 编辑
摘要: 今天突然想写下关于在大一期间的一些事情,好方便以后回忆吧。 在填志愿的报考“网络工程”这个专业的时候,都是稀里糊涂的就报了。一开始第一专业是“软件工程”,第二专业时“计算机科学与技术”,第三专业才是“网络工程”。在填的时候听都没听过,只听过前两个,然后。。。就把网络工程改成第一专业了。可能是当时在百 阅读全文
posted @ 2017-08-12 13:13 starry_sky 阅读(401) 评论(0) 推荐(0) 编辑
摘要: It's well known that the best way to distract from something is to do one's favourite thing. Job is such a thing for Leha. So the hacker began to work 阅读全文
posted @ 2017-08-11 21:48 starry_sky 阅读(181) 评论(0) 推荐(0) 编辑
摘要: Erelong Leha was bored by calculating of the greatest common divisor of two factorials. Therefore he decided to solve some crosswords. It's well known 阅读全文
posted @ 2017-08-11 12:25 starry_sky 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 之前在Ubuntu下安装QQ时费了好久也只安装个国际版的QQ,今天无意间看到一个安装winqq的方法,可以安装新版QQ。 原地址http://www.jianshu.com/p/1150aa5a6cec 下面是效果展示: 话不多说,进入正题。 首先要安装win: sudo add-apt-repos 阅读全文
posted @ 2017-08-10 16:17 starry_sky 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 在Android中xml的生成有两种,其一是手工写入,其二是用XmlSerializer对象来生成。 比如要生成下面这中。 先创建一个SmsBean.java 类用来封装信息。 1 package cn.starry.xml.bean; 2 3 public class SmsBean { 4 pu 阅读全文
posted @ 2017-08-09 21:07 starry_sky 阅读(674) 评论(0) 推荐(0) 编辑
摘要: Pocket Cube Problem Description The Pocket Cube, also known as the Mini Cube or the Ice Cube, is the 2 × 2 × 2 equivalence of a Rubik’s Cube.The cube 阅读全文
posted @ 2017-08-09 19:33 starry_sky 阅读(305) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 46 下一页