有这样一个需求,要求在mysql存储过程中使用到事务,而且执行的是动态的sql语句
代码如下:
BEGIN
DECLARE in_data TEXT;
/** 标记是否出错 */
DECLARE errno INT DEFAULT '0';
/** 如果出现sql异常,则将t_error设置为1后继续执行后面的操作 */
DECLARE CONTIN...
分类:
数据库 时间:
2014-05-10 09:50:37
阅读次数:
541
【题目】
原文:
1.3 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An
extra copy of...
分类:
其他好文 时间:
2014-05-07 08:48:12
阅读次数:
372
http://linuxtv.org/downloads/v4l-dvb-apis/io.html
第三节:输入和输出
V4L2 API定义了一些不同的方法来从设备读取或写入,所有需要与应用程序交换数据的驱动最少必须支持其中之一。
在打开一个V4L2设备后会自动选择使用经典的I/O方法read()和write(),当驱动不支持写或读时会失败。
其他的方法必须通过协商。应用程序通...
分类:
其他好文 时间:
2014-05-07 05:13:15
阅读次数:
417
原文:
Write code to reverse a C-Style String. (C-String means that “abcd” is represented as five characters, including the null character.)
译文:
写代码翻转一个C风格的字符串。(C风格的意思是"abcd"需要用5个字符来表示,包含末尾的 结束字符)...
分类:
其他好文 时间:
2014-05-07 05:12:34
阅读次数:
265
ubuntu 14.04 VSFTPD 匿名FTP服务器 配置文件
可以提供上传,下载,修改,等操作
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to mak...
分类:
其他好文 时间:
2014-05-07 04:26:57
阅读次数:
488
CareerCup
目录
Chapter 1 | Arrays and Strings
1.1 Implement an algorithm to determine if a string has all unique characters. What if you can not use additional data structures?
1.2 Write co...
分类:
其他好文 时间:
2014-05-07 04:25:44
阅读次数:
320
最近在学scala语言,scala代码如下:
import scala.collection.JavaConversions._
object Solution {
def solution(A: Array[Int]): Int = {
// write your code in Scala 2.10
// sort
scala.uti...
分类:
其他好文 时间:
2014-05-07 04:20:38
阅读次数:
352
代码中的两个按钮处理事件,分别进行了文本的读写操作。
1)文件写操作
首先调用Activity的openFileOutPut()方法获得文本文件的输出流,第一个参数为文本文件的名字,第二个为文件的打开方式
接着调用Outputstream对象的write()方法将Textview中获得文本信息写入outputstream对象,最后调用close()方法完成写入操作。
2)文件读操作
首先调用Activity的openFileInPut()方法获得文本文件的输入流,
接着...
分类:
移动开发 时间:
2014-05-07 03:15:13
阅读次数:
464
一、基础
1、说明:创建数据库?CREATE DATABASE database-name?
2、说明:删除数据库?drop database dbname?
3、说明:备份sql server?
--- 创建 备份数据的 device?
USE master?EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwin...
分类:
数据库 时间:
2014-05-06 18:57:44
阅读次数:
506
你估计已经习惯了之前的2003远程桌面没有背景图下面我们做下更改变换下视觉先来看下效果其实很简单,需要更改下注册表。操作步骤:1、运行regedit,找到HKEY_USERS\.DEFAULT\ControlPanel\Desktop2、设置背景图片的具体路径Wallpaper的值默认是为空的,修改值为背景图片路径。如..
分类:
其他好文 时间:
2014-05-06 16:55:21
阅读次数:
604