hdu 1250 Hat's Fibonacci 高精度数,类似万进制...
分类:
其他好文 时间:
2014-05-01 18:26:27
阅读次数:
351
按照之前转载的文章,自己先实现了下,表示还是很多坑:
#include "stdio.h"
#include
#include
#include
#include
using namespace std;
int neigor[][2] ={
{-1, -1}, {0, -1}, {1, -1}, {1, 0}, {1, 1}, {0, 1}, {-1, 1}, {-1, 0}
}...
分类:
其他好文 时间:
2014-05-01 18:03:27
阅读次数:
320
为了节省以后的时间,今天封装了操作sql语句的一个类,在此保存起来,方面以后使用。
这个类的文件名:SqlTool.class.php
主要有dql和dml两个函数
看下面的源码“
<?php
class SqlTool{
private $conn;
private $username="root";
private $password="12...
分类:
数据库 时间:
2014-05-01 18:00:57
阅读次数:
432
Upstart是一个基于事件的替代在引导过程中处理任务和服务的启动、停止、监督整个系统运行的/sbin/init守护进程的一个程序。
在Unix和Linux系统上的“初始化”或“系统初始化”过程中有进程ID(PID)为“1”。也就是说,它是启动在系统引导时(忽略的initrd/ initramfs)装载的第一道工序。根据官方说法,Upstart是一个替代传统的Unix的“System V”的“init”制度的“INIT”。Upstart提供与传统的“初始化”系统相同的功能,但超越了原有的许多方面。
在系...
分类:
其他好文 时间:
2014-05-01 17:22:23
阅读次数:
292
题目:寻找最长上升自序列。
代码:
#include
#include
#include
#include
using namespace std;
struct node
{
int w,s; //重量,速度
int num; //编号
int t; //用来记录当前编号...
分类:
其他好文 时间:
2014-05-01 17:17:32
阅读次数:
285
一、正则表达式的使用
cd /usr/share/dict
1、找出words文件下所有以a开头t结尾的单词
egrep "^a.*t$" words
2、匹配以abcde开头,以at结尾的单词
egrep "\" words
3、以大写字母开头,以t结尾
egrep "^[[:upper:]]t$" words
二、管道的使用
egrep "^a.*t$" words|wc -...
分类:
系统相关 时间:
2014-04-30 22:32:38
阅读次数:
372
TreeSet.add()方法一细节
最近在一次使用TreeSet.add()方法中遇到了一个很迷惑的问题:往一个TreeSet集合中添加几个对象的时候发现有些没有添加进去,一开始是怀疑hashcode与equals的问题,因为Set集合是不允许添加两个相同对象的,但经查检确认没有问题,几经测试发现是传入的Comporator对象引起的(即使用的是TreeSet(Comparator<...
分类:
其他好文 时间:
2014-04-30 22:17:38
阅读次数:
366
参考博客:http://blog.kuoe0.tw/posts/2014/01/31/install-gnu-gcc-on-os-x-and-use-the-header-bits-stdcplusplus-h-and-policy-based-data-structure
做CF看见别人用这个函数,然后就能直接用vector,set,string那些函数了,摸不着头脑,感觉特神奇就百度了一下,...
分类:
编程语言 时间:
2014-04-29 13:32:22
阅读次数:
433
1.修改/boot/grub/grub.cfg的权限
2打开grub.cfg这个文件,vim grub.cfg,找到下图当中的 set timeout=-1
.
将"set timeout=-1" 修改为"set timeout=0"
这一方法将解决---意外关机后界面将停留在grub的问题...
分类:
其他好文 时间:
2014-04-29 13:25:20
阅读次数:
282
jdbc驱动到官网下载,放在jdk的相关目录下面,或者jar文件加入到工程下面
package test_mysql;
import java.sql.*;
import java.util.Set;
public class testjdbc {
public static Connection getConnection() throws ClassNotFoundException, S...
分类:
数据库 时间:
2014-04-29 13:22:20
阅读次数:
428