现在位置: 首页 > outcast发表的所有文章
  • 04月
  • 07日
综合 ⁄ 共 1147字 评论关闭
七月冒泡第二题。 #include <iostream> #include <cstdlib> #include <cstdio> #include <string> #include <cstring> #include <cmath> #include <vector> #include <queue> #include <algorithm> #include <map> using namespace std; const int maxn = 310; const int INF = 0x3f3f3f3f; int n; int W[maxn][maxn]; int Lx[maxn], Ly[maxn]; int Left[maxn]; bool S[maxn], T[maxn]; bool match(int i) { S[i] = 1; for(int j = 1; j <= n; j++) if(Lx......
阅读全文
  • 03月
  • 29日
综合 ⁄ 共 3236字 评论关闭
libiconv库是一个基于GNU协议的开源库,主要是解决多语言编码处理转换等应用问题。    怎样学习使用libiconv库?对于刚接触到人来说,这篇文章不妨去看一看,若已经用到过该库的人,在应用的过程中可能遇到一些问题,我们可以一起来探讨,我的联系方式是 cnangel@gmail.com 。     几个函数原型: iconv_t iconv_open(const char *tocode, const char *fromcode);size_t iconv(iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);int iconv_close(iconv_t cd);     其中:iconv_open是打开一个......
阅读全文
  • 03月
  • 17日
综合 ⁄ 共 62字 评论关闭
用低版本的wmp似乎经常遇到这个情况,上次解决了,这次又碰上竟然又忘了,又忙了半天,这记性... 直接升级wmp11就ok了。
阅读全文
  • 03月
  • 15日
综合 ⁄ 共 59字 评论关闭
http://www.blogjava.net/xylz/archive/2010/07/08/325587.html
阅读全文
  • 11月
  • 09日
编程语言 ⁄ 共 546字 评论关闭
编译正确代码: #include<stdio.h> #include <string.h> #include<iostream> using namespace std; class T{ public: T(string p) { ptext = p; } const char & operator [](int pos) const { return ptext[pos]; } string ptext; }; int main() { string s = "abcd"; T t(s); //t[0] = 't';//因为为const返回类型,所以不能赋值 printf("%s\n", s.c_str()); } 编译错误代码: #include<stdio.h> #include <string.h> #include<iostream> using namespace st......
阅读全文
  • 06月
  • 05日
综合 ⁄ 共 3871字 评论关闭
ThreadLocal并不是本地线程的意思,它压根就不是线程,而是线程局部变量,它的功能很简单,就是为每一个使用该变量的线程都提供一个变量值的副本,是java中一种比较特殊的线程绑定机制,每一个线程都可以独立的改变自己的副本,而不会和其他线程的副本冲突。 从线程的角度看,每个线程都保持一个对线程局部变量副本的隐式引用,只要线程是活动的,并且ThreadLocal实例是可访问的;在线程消失之后,其线程局部实例的所有副本都会被虚拟机所回收(除非存在对这些副本的其他引用)。 通过ThreadLocal存取的数据,总是与当前线程相关,也......
阅读全文
  • 05月
  • 28日
综合 ⁄ 共 1972字 评论关闭
总结:oracle与mysql 的使用比较总结:   用mysql与ORACLE有一段时间了,一直都没有做总结,今天有时间做些区别吧: 1.数据库的使用    在使用mysql一段时间以后,再次使用ORACLE时,首先想到的就是数据库名,在hibernate的 url 地址的设置中首先会牵涉到数据库名的使用, 在ORACLE中,每个用户下只会有一个数据库名,这个也是在ORACLE 10g安装中,用户自己设置的,如果用户在后期的使用中,偶尔忘记自己所 设置的数据库名,也可以在windows 中管理-服务中可以根据服务名字找到数据库的相应的名字(关于ORACLE此处查询数据库名,......
阅读全文
  • 05月
  • 16日
综合 ⁄ 共 1201字 评论关闭
先Copy一份文档给大家看: DateTime A date and time combination. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.  MySQL displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format, but allows you to assign values to DATETIME columns using either strings or numbers. TimeStamp A timestamp. The range is '1970-01-01 00:00:00' to partway through the year 2037.  A TIMESTAMP column is useful for recording the date and time of an INSERT or UPDATE operation.  The first TIMESTAMP ......
阅读全文
  • 05月
  • 12日
综合 ⁄ 共 1662字 评论关闭
zz http://p48376382.javaeye.com/blog/96899 1.velocity插件(需要jdk1.5) Veloeclipse http://propsorter.sourceforge.net/veloeclipse 2.PropertiesEditor 插件(eclipse3.2的版本不支持) Arbitrary input http://propedit.sourceforge.jp/eclipse/updates/ 3.JSEclipse (javascript插件) JSEclipse from Adobe Labs http://download.macromedia.com/pub/labs/jseclipse/autoinstall 插件安装的四种方法(参考了网上的文摘) 1. “帮助”->“软件更新”->“查找并安装”->“搜索要安装的新功能部件”->“新......
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 1533字 评论关闭
 如果你曾经写过shell 脚本,并且用中间文件来存放处理的中间结果,你很可能被目录里的垃圾困扰。你以20 个log_001.txt,log_002.txt 等开始,而你想要的只是名为log_sum.txt 的最终文件,而且你机器里塞满了一系列的log_001.tmp,log_001.tmp2等临时文件,至少我们的生活是这样的。为了保持你的目录的秩序,用完临时文件就要立即清除掉。为了帮助解决临时文件的管理问题,Python 提供了一个不错的小模块tempfile,它发布了两个函数:mktemp()和TemporaryFile()。前者返回你机器的临时文件目录(如Unix 里的/tmp 和Windows 的c:/tm......
阅读全文
  • 04月
  • 25日
综合 ⁄ 共 2527字 评论关闭
Lifting the Stone Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3670    Accepted Submission(s): 1517 Problem Description There are many secret openings in the floor which are covered by a big heavy stone. When the stone is lifted up, a special mechanism detects this and activates poisoned arrows that are shot near the opening. The only possibility is to lift the stone very slowly and carefully. The ACM team must connect a rope to......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 952字 评论关闭
前言:这是我在CSDN发的第一个问题,是我在学习JAVA时遇到的,其实在C中也是一样道理。 http://community.csdn.net/Expert/topic/5201/5201507.xml?temp=6.275576E-02“关于循环语句” 问题如下: 有下面程序:class T{public static void main(String args[]){for(float y=0;y!=1.2;y+=0.1){System.out.println(y);if(y>1.5) break;}}}该程序的输出结果如下:0.00.10.20.30.40.50.60.700000050.80000010.90000011.00000011.10000011.20000021.30000021.40000021.5000002修改后的程序如下:class T{public static void main(Stri......
阅读全文