Android Sqlite数据库执行插入查询更新删除的操作对比
下面是在Android4.0上,利用Sqlite数据库的insert,query,update,delete函数以及execSql,rawQuery函数执行插入,查询,更新,删除操作花费时间的对比结果。
是在执行相同的动作,记录条数也一样的情况下的对比,多次验证的结果是:
(1)如果批量执行的记录数在1000条,则Android SqliteDatabase提供的insert,query,update,delete函数和直接写SQL文的execSql,rawQuery的效率差不多,几乎一样。所以使用哪种放到都可以,不会影响到执行效率。
(2)如果批量执行的记录数在10万条,则会存在差别。在某台手机上SqliteDatabase提供的insert执行插入操作耗时45秒,要比execSql插入35秒慢10秒左右。
可见在数据库大的情况下,还是有差别的。execSql省去了拼接sql语句的步骤,要比SqliteDatabase提供的insert,query,update,delete等函数效率高。当数据库越大,差别也越大。
下面是验证代码:
- public class MainActivity extends Activity {
- private static final String TAG = "MainActivity";
- private DBHelper mDbHelper = null;
- private static TextView mTvInfo;
- private static ProgressDialog mDialog = null;
- private static Handler mHandler = new Handler() {
- @Override
- public void handleMessage(Message msg) {
- // TODO Auto-generated method stub
- if(mDialog != null) {
- mDialog.dismiss();
- mDialog = null;
- }
- if (msg.what == 0) {
- Bundle b = msg.getData();
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("insert插入1000条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- } else if (msg.what == 1) {
- Bundle b = msg.getData();
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("execSql插入1000条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- } else if (msg.what == 10) {
- Bundle b = msg.getData();
- int count = b.getInt("count");
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("query查询");
- builder.append(count).append("条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- } else if (msg.what == 11) {
- Bundle b = msg.getData();
- int count = b.getInt("count");
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("rawQuery查询");
- builder.append(count).append("条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- } else if (msg.what == 20) {
- Bundle b = msg.getData();
- int count = b.getInt("count");
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("update更新");
- builder.append(count).append("条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- } else if (msg.what == 21) {
- Bundle b = msg.getData();
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("execSql更新1000条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- } else if (msg.what == 30) {
- Bundle b = msg.getData();
- int count = b.getInt("count");
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("delete删除");
- builder.append(count).append("条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- } else if (msg.what == 31) {
- Bundle b = msg.getData();
- int seconds = b.getInt("seconds");
- int ms = b.getInt("ms");
- StringBuilder builder = new StringBuilder("execSql删除1000条记录花费时间:");
- if (seconds > 0) {
- builder.append(seconds).append("s ");
- }
- builder.append(ms).append("ms");
- String strLines[] = mTvInfo.getText().toString().split("\n");
- // 最多显示8条信息
- for (int i = 0; i < strLines.length; i++) {
- builder.append('\n').append(strLines[i]);
- if (i == 6) {
- break; // 加上原来最多7条信息,共显示8条信息
- }
- }
- mTvInfo.setText(builder.toString());
- }
- }
- };
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- Button btnCreateDb = (Button)findViewById(R.id.btnCreateDb);
- btnCreateDb.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- mDbHelper = new DBHelper(MainActivity.this, "test", null, 1);
- }
- });
- // insert插入
- Button btnInsert = (Button)findViewById(R.id.btnInsert);
- btnInsert.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "insert插入", "正在插入1000条记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- // 利用事物批量插入数据以提高效率
- ContentValues values = new ContentValues();
- long startms = System.currentTimeMillis();
- db.beginTransaction();
- for (int i = 0; i < 1000; i++) {
- values.put("name", new String("张三") + i);
- values.put("birthday", "2012-12-08");
- values.put("gender", i%2);
- db.insert("student", null, values);
- }
- db.setTransactionSuccessful();
- db.endTransaction();
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- Message msg = new Message();
- msg.what = 0;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- } else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- // execSQL插入
- Button btnExecSqlInsert = (Button)findViewById(R.id.btnExecSqlInsert);
- btnExecSqlInsert.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "execSQL插入", "正在插入1000条记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- // 利用事物批量插入数据以提高效率
- long startms = System.currentTimeMillis();
- db.beginTransaction();
- for (int i = 0; i < 1000; i++) {
- db.execSQL("INSERT INTO student(name, birthday, gender) values(?, ?, ?)" ,
- new Object[]{new String("李四" + i), "2012-12-08", i%2});
- }
- db.setTransactionSuccessful();
- db.endTransaction();
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- Message msg = new Message();
- msg.what = 1;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- }else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- // query查询
- Button btnQuery = (Button)findViewById(R.id.btnQuery);
- btnQuery.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "query查询", "正在查询记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- Log.d(TAG, "query Start:" + getDate());
- long startms = System.currentTimeMillis();
- // 查询所有记录
- Cursor c = db.query("student", null, null, null, null, null, new String("id ASC LIMIT 0,1000"));
- Log.d(TAG, "query End:" + getDate());
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- if (c != null) {
- Message msg = new Message();
- msg.what = 10;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- b.putInt("count", c.getCount());
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- c.close();
- }
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- }else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- // rawQuery查询
- Button btnRawQuery = (Button)findViewById(R.id.btnRawQuery);
- btnRawQuery.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "rawQuery查询", "正在查询记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- Log.d(TAG, "rawQuery Start:" + getDate());
- long startms = System.currentTimeMillis();
- // 查询所有记录
- Cursor c = db.rawQuery("SELECT * FROM student ORDER BY id ASC LIMIT 0,1000", null);
- Log.d(TAG, "rawQuery End:" + getDate());
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- if (c != null) {
- Message msg = new Message();
- msg.what = 11;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- b.putInt("count", c.getCount());
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- c.close();
- }
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- } else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- // update更新
- Button btnUpdate = (Button)findViewById(R.id.btnUpdate);
- btnUpdate.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "update更新", "正在更新1000条记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- ContentValues values = new ContentValues();
- long startms = System.currentTimeMillis();
- values.put("name", new String("王五"));
- values.put("birthday", "2012-12-09");
- values.put("gender", 0);
- int count = db.update("student", values, new String("id IN (SELECT id FROM student ORDER BY id ASC LIMIT 0,1000)"), null);
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- Message msg = new Message();
- msg.what = 20;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- b.putInt("count", count);
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- } else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- // execSQL更新
- Button btnExecSqlUpdate = (Button)findViewById(R.id.btnExecSqlUpdate);
- btnExecSqlUpdate.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "execSQL更新", "正在更新1000条记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- long startms = System.currentTimeMillis();
- db.execSQL("UPDATE student SET name = ?, birthday = ?, gender = ? WHERE id IN (SELECT id FROM student ORDER BY id ASC LIMIT 0,1000)" ,
- new Object[]{new String("马六"), "2012-12-10", 1});
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- Message msg = new Message();
- msg.what = 21;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- }else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- // delete删除
- Button btnDelete = (Button)findViewById(R.id.btnDelete);
- btnDelete.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "delete删除", "正在删除1000条记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- long startms = System.currentTimeMillis();
- int count = db.delete("student", new String("id IN (SELECT id FROM student ORDER BY id ASC LIMIT 0,1000)"), null);
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- Message msg = new Message();
- msg.what = 30;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- b.putInt("count", count);
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- } else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- // execSQL删除
- Button btnExecSqlDelete = (Button)findViewById(R.id.btnExecSqlDelete);
- btnExecSqlDelete.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View arg0) {
- // TODO Auto-generated method stub
- if (mDbHelper != null) {
- mDialog = ProgressDialog.show(MainActivity.this, "execSQL删除", "正在删除1000条记录,请稍等……", true);
- new Thread() { // 开启线程执行防止阻塞
- @Override
- public void run() {
- SQLiteDatabase db = mDbHelper.getWritableDatabase();
- try {
- long startms = System.currentTimeMillis();
- db.execSQL("DELETE FROM student WHERE id IN (SELECT id FROM student ORDER BY id ASC LIMIT 0,1000)");
- long endms = System.currentTimeMillis();
- int seconds = (int)((endms - startms)/1000);
- int ms = (int)((endms - startms)%1000);
- Message msg = new Message();
- msg.what = 31;
- // 使用bundle对象来传递数据
- Bundle b = new Bundle();
- if(seconds > 0) {
- b.putInt("seconds", seconds);
- }
- b.putInt("ms", ms);
- msg.setData(b);
- mHandler.sendMessage(msg);
- } catch(Exception e) {
- e.printStackTrace();
- } finally {
- db.close(); // 关闭数据库
- }
- }
- }.start();
- }else {
- Toast.makeText(MainActivity.this, "请先创建数据库!", Toast.LENGTH_SHORT).show();
- }
- }
- });
- mTvInfo = (TextView)findViewById(R.id.tvInfo);
- }
- @Override
- public boolean onCreateOptionsMenu(Menu menu) {
- getMenuInflater().inflate(R.menu.activity_main, menu);
- return true;
- }
- /**
- * 获取系统时间
- * @return
- */
- public static String getDate(){
- Calendar ca = Calendar.getInstance();
- int year = ca.get(Calendar.YEAR); // 获取年份
- int month = ca.get(Calendar.MONTH); // 获取月份
- int day = ca.get(Calendar.DATE); // 获取日
- int minute = ca.get(Calendar.MINUTE); // 分
- int hour = ca.get(Calendar.HOUR); // 小时
- int second = ca.get(Calendar.SECOND); // 秒
- int millisecond = ca.get(Calendar.MILLISECOND); // 毫秒
- String date = year + "/" + (month + 1 )+ "/" + day + " "+ hour + ":" + minute + ":" + second + ":" + millisecond;
- return date;
- }
- }
执行效果图:

版权声明:本文为博主原创文章,未经博主允许不得转载。
Android Sqlite数据库执行插入查询更新删除的操作对比的更多相关文章
- 42.QT-QSqlQuery类操作SQLite数据库(创建、查询、删除、修改)详解
Qt 提供了 QtSql 模块来提供平台独立的基于 SQL 的数据库操作.这里我们所说的“平台 独立”,既包括操作系统平台,也包括各个数据库平台,Qt支持以下几种数据库: QT自带SQLITE数据库, ...
- MongoDB中的映射,限制记录和记录拼排序 文档的插入查询更新删除操作
映射 在 MongoDB 中,映射(Projection)指的是只选择文档中的必要数据,而非全部数据.如果文档有 5 个字段,而你只需要显示 3 个,则只需选择 3 个字段即可. find() 方法 ...
- PHP5: mysqli 插入, 查询, 更新和删除 Insert Update Delete Using mysqli (CRUD)
原文: PHP5: mysqli 插入, 查询, 更新和删除 Insert Update Delete Using mysqli (CRUD) PHP 5 及以上版本建议使用以下方式连接 MySQL ...
- php+mysqli实现批量执行插入、更新及删除数据的方法
本文实例讲述了php+mysqli实现批量执行插入.更新及删除数据的方法.分享给大家供大家参考.具体如下: mysqli批量执行插入/更新/删除数据,函数为 multi_query(). 下面的代码只 ...
- Android Sqlite 数据库版本更新
Android Sqlite 数据库版本更新 http://87426628.blog.163.com/blog/static/6069361820131069485844/ 1.自己写一个类继承 ...
- Android SQLite 数据库 增删改查操作
Android SQLite 数据库 增删改查操作 转载▼ 一.使用嵌入式关系型SQLite数据库存储数据 在Android平台上,集成了一个嵌入式关系型数据库--SQLite,SQLite3支持NU ...
- Android SQLite 数据库详细介绍
Android SQLite 数据库详细介绍 我们在编写数据库应用软件时,需要考虑这样的问题:因为我们开发的软件可能会安装在很多用户的手机上,如果应用使用到了SQLite数据库,我们必须在用户初次使用 ...
- TODO:MongoDB的查询更新删除总结
TODO:MongoDB的查询更新删除总结 常用查询,条件操作符查询,< .<=.>.>=.!= 对应 MongoDB的查询操作符是$lt.$lte.$gt.$gte.$ne ...
- 图解IntelliJ IDEA 13版本对Android SQLite数据库的支持
IntelliJ IDEA 13版本的重要构建之一是支持Android程序开发.当然对Android SQLite数据库的支持也就成为了Android开发者对IntelliJ IDEA 13版本的绝对 ...
随机推荐
- 将HDC保存为BMP文件
HDC在MSDN中的全称为:The handle of device context.通常,我们都是用来做相应的显示操作. 熟悉WIN32的朋友对于其应该不会陌生,经常采用GetDC,G ...
- SQL 表连接,内联、外联、全连
内连接,join 或 inner join 两个表中符合条件的集合 外连接,left join 或 right join 以left左边或right右边的表为数据集合行,根据条件,另一侧没有的数 ...
- android-改进<<仿QQ>>框架源代码
该文章主要改动于CSDN某大神的一篇文章,本人认为这篇文章的面向对象非常透彻,以下分享例如以下可学习的几点: Android应用经典主界面框架之中的一个:仿QQ (使用Fragment, 附源代码) ...
- SeekBar 样式设置
1 SeekBar简介 SeekBar是进度条.我们使用进度条时,可以使用系统默认的进度条:也可以自定义进度条的图片和滑块图片等. 2 SeekBar示例 创建一个activity,包含2个SeekB ...
- 为什么 Flask 有那么多的好评?
著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处.作者:松鼠奥利奥链接:http://www.zhihu.com/question/28902969/answer/42530571来 ...
- Ural 1086 - Cryptography
While preparing this problem set the jury has run into the following problem: it was necessary to se ...
- SDRAM 控制器的解析
本篇博文非原创,是整理了网上的各家之言与一体,为自己以后方便查询所用.如有冒犯请告之. 1.Precharge与Refresh的区别? plj:两者都是对存储单元的电容进行充电.回写.但差异在于: P ...
- OKR 方法 学习笔记
最近公司兴起了对OKR这个词的讨论,并且听到时总会伴随提到KPI,提到绩效考核.那OKR到底是什么呢?与KPI的区别在哪里?与绩效考核有什么关系?它与我们现在推行的敏捷开发有啥关系呢?因此,就到网上查 ...
- 使用线程新建WPF窗体(公用进度条窗体)
使用线程新建窗体 项目中需要一个公用的进度条窗体.大家知道在wpf中,有两个线程,一个是UI线程,另一个是监听线程(一直监听用户的输入).如果我们后台有阻塞UI线程的计算存在,那么界面上的比如进度条什 ...
- Ubuntu 12.04 (10) Personal Environment - @staticor
Chinese Input ================= I use Wubu, so Fcitx, sudo add-apt-repository ppa:fcitx-team/nightly ...