有时我们用数据库存储文件,需要用到二进制字段,下面列常用方法。 1.写二进制数据 sqlite3 *
db; int result; char **errmsg =NULL; result = sqlite3_open("test.db", &db );
if( result != SQLITE_O...
分类:
数据库 时间:
2014-05-14 02:45:00
阅读次数:
371
Pat1018代码
题目描述:
There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to an...
分类:
其他好文 时间:
2014-05-13 23:27:04
阅读次数:
582
一: 新建文件夹和文件:
Mongo安装在F:\DataBase\MongoDB_2.6, 在此目录下新建文件夹:
F:\DataBase\MongoDB_2.6\data\db
F:\DataBase\MongoDB_2.6\data\log
F:\DataBase\MongoDB_2.6\data\log\MongoDB.log
二: 创建数据库
跳到 F:\D...
分类:
数据库 时间:
2014-05-13 14:19:45
阅读次数:
421
Pat1016代码
题目描述:
A long-distance telephone company charges its customers by the following rules:
Making a long-distance call costs a certain amount per minute, depending on the time of day w...
分类:
其他好文 时间:
2014-05-13 06:45:05
阅读次数:
460
在linux管理中,硬盘管理是很重要的一部分。包括阵列,分区,逻辑卷等操作,在对硬盘操作前,需要充分的了解硬盘的信息。常用的硬盘查询有以下几种:1.df查看文件系统空间使用情况;linux-lszd-db:~#dfFilesystem1K-blocksUsedAvailableUse%Mountedon/dev/sda68092624963761509..
分类:
系统相关 时间:
2014-05-13 03:09:29
阅读次数:
468
#!/usr/bin/envpython#coding:utf8importos,sysimportmd5,tabfrommysql_co.my_dbimportset_mysqlfromssh_co.ssh_connectimportsshdfromssh_co.cfg.configimportssh_message,item_pathfromfileimportfindfiledefmy_mysql():db_file={}my_connect=set_mysql()f_file=findfile.mai..
分类:
编程语言 时间:
2014-05-13 01:44:22
阅读次数:
449
一、数据库的概述1、什么是数据库DB,DataBase数据库:依照某种数据模型进行组织并存放到存储器的数据集合DBMS,DataBaseManagementSystem数据库管理系统:用来操纵和管理数据库的大型服务软件DBS,DataBaseSystem数据系统:即DB+DBMS,指带有数据库并整合了数据库管理软件的计..
分类:
数据库 时间:
2014-05-13 00:48:46
阅读次数:
549
用户授权及撤销1、用户授权默认情况下,只允许数据库管理员root用户从服务器登录。若从其他客户端登录,必须做用户授权。授权库mysql,主要表:User:记录用户信息(登录名,密码,客户端地址,权限信息)db:记录授权库的信息tables_priv:记录授权的表信息columns_priv:记录..
分类:
其他好文 时间:
2014-05-13 00:46:45
阅读次数:
552
该文章主要回答三个问题: leveldb 怎么管理因compact带来的文件变化?
当db关闭后重新打开时,如何恢复状态? 如何解决版本销毁文件变化和已经获取过的迭代器的冲突? 每次leveldb后台进行compact时,
会造成sst文件的变化。levedb利用version来管理了这...
分类:
数据库 时间:
2014-05-12 22:04:30
阅读次数:
554
原题地址:http://oj.leetcode.com/problems/binary-tree-zigzag-level-order-traversal/题意:Given
a binary tree, return thezigzag level ordertraversal of its nod...
分类:
编程语言 时间:
2014-05-12 22:02:26
阅读次数:
480