首先下载mysql的jdbc驱动。然后新建一个Datamanager类:public class
MysqlManager extends DataManager { static private final MysqlManager MYSQL = new
MysqlManager(...
分类:
数据库 时间:
2014-07-22 22:59:14
阅读次数:
326
//字符串全排列package com.demo.acm;public class
AllSortChar { public static void allSort(char[] buf,int start,int end){
if(start==end){ ...
分类:
其他好文 时间:
2014-05-02 19:43:21
阅读次数:
256
重操旧业,再温Java,写了个大整数相乘先回顾回顾基本知识。算法、效率什么的都没怎么考虑,就纯粹实现功能而已。先上代码: 1 package
com.tacyeh.common; 2 3 public class MyMath { 4 5 public static String Big...
分类:
编程语言 时间:
2014-05-02 13:02:39
阅读次数:
396
界面很简单//玩家类using System;using
System.Collections.Generic;using System.Linq;using System.Text;using
System.Threading.Tasks;namespace 猜拳游戏{ /// //...
分类:
其他好文 时间:
2014-05-02 12:04:15
阅读次数:
292
HTML中META属性详解meta是html语言head区的一个辅助性标签。几乎所有的网页里,我们可以看到类似下面这段的html代码:
<head> <meta http-equiv= "content-Type " content= "text/html; charset=gb2312
">...
分类:
Web程序 时间:
2014-05-02 12:02:03
阅读次数:
314
在C++控制台应用程序中可以控制控制台输出的字体颜色和 接受任意按键退出#ifndef
CONSOLE_UTILS_H#define CONSOLE_UTILS_H#include #include #include //default text
colors can be found in win...
分类:
编程语言 时间:
2014-05-02 00:23:19
阅读次数:
450
1
什么是递归:实现某些功能不用递归可能要几十行代码,用递归可能几行就搞定了,而且代码清晰简洁。一直以为递归也就是自己调用自己,有一个出口条件,让他停止递归,退出函数,其实的特点并非就这些。递归还有一个非常重要的特点:先进后出,跟栈类似,先递进去的后递出来。由于递归一直在自己调用自己,有时候我们很难...
分类:
其他好文 时间:
2014-05-01 22:32:03
阅读次数:
570
public function index(){
header('Content-Type:text/html;charset=utf-8 ');
$M = M("Constant");
$count = $M->where($where)->count();
import("ORG.Util.Page"); // 导入分页类
...
分类:
Web程序 时间:
2014-04-30 22:27:39
阅读次数:
343
1、选择合适的数据类型
为列选择最小化的数据类型
如果一列中的文本长度不一,使用VARCHAR而不是CHAR
不存储Unicode不要使用NVARCHAR或者NCHAR
如果一行的长度不超过8000,使用VARCHAR而不是TEXT
对于仅存数字的列要使用数字类型而不要用字符类型
不要使用字符串类型存储日期数据。
2、谨慎使用触发器
保持触发器内的代码最小化
可能的情况下尽量用其...
分类:
数据库 时间:
2014-04-30 22:24:38
阅读次数:
334
dispatch_once的实现分析
dispatch_once可以保证代码被执行一次
+(NSDateFormatter*)getDBDateFormat
{
static NSDateFormatter* format;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
format = [[LKDateFormatter alloc]init];
format.dateF...
分类:
其他好文 时间:
2014-04-30 22:12:40
阅读次数:
336