The circle line of the Berland subway has n stations. We know the distances between all pairs of neighboring stations:
d1 is
the distance between the 1-st and the 2-nd
station;
d2 is
the d...
分类:
其他好文 时间:
2014-07-22 23:05:14
阅读次数:
302
fixed真的是一个很好的属性。特别是做弹层的时候。可惜的是“国内主流浏览器”IE6大大不支持。
一般的我们都会通过CSS中的表达式来解决这个问题。
.fixed {
position:absolute;
left:expression(eval(document.documentElement.scrollLeft));
top:expression(eval(document.doc...
分类:
其他好文 时间:
2014-07-22 23:03:15
阅读次数:
318
错误信息如下:
File "E:\work\pydev\pythodemo\src\code\string.py", line 1
SyntaxError: Non-ASCII character '\xe5' in file E:\work\pydev\pythodemo\src\code\string.py on line 1, but no encoding declared; see ...
分类:
编程语言 时间:
2014-05-01 22:00:23
阅读次数:
440
udp:
服务端客户端
tcp:
服务端客服端...
分类:
其他好文 时间:
2014-05-01 18:31:06
阅读次数:
357
1.使用QuerySting在页面间传递值
2.使用Session变量...
分类:
其他好文 时间:
2014-05-01 17:27:48
阅读次数:
331
代码如下
#include
#include
#include
using namespace std;
template
class Base
{
public:
Base(T name);
virtual void toString();
protected:
T id;
};
template
Base::Base(T n)
{
printf("B...
分类:
编程语言 时间:
2014-04-30 22:27:39
阅读次数:
450
在开发中,我们发出的基线版本经常会有一些bug需要修复,如果采用本地上库,然后再给用户新的版本,可能会费时费力,而如果给用户我们修改后的代码让用户一行一行合入本地,也显的比较落后,如果用户那边也使用git管理版本的话,我们可以用一个简单的方法来给用户发送修改,那就是使用git打pach包;
1、进入到git 目录下,使用 git diff 差异文件 > bugfix.pach ...
分类:
其他好文 时间:
2014-04-30 22:27:38
阅读次数:
332
上一篇文章是纯粹地实现了红黑树,但是在STL中,红黑树容器是需要迭代器实现的。故将上一篇文章改进后实现红黑树容器。
#ifndef ITERATOR_RB_TREE_H_INCLUDED
#define ITERATOR_RB_TREE_H_INCLUDED
#include"my_iterator_base.h"
/*
**
iterator_rb_tree.h
红黑树地泛型容器地迭代器
与...
分类:
其他好文 时间:
2014-04-29 13:45:21
阅读次数:
506
long long定义方式可以用于gcc/g++,不受平台限制,但不能用于VC6.0。__int64是Win32平台编译器64位长整型的定义方式,不能用于Linux。“%lld”用于Linux i386平台编译器,”%I64d”用于Win32平台编译器。cout只能用于C++编译,在VC6.0中,cout不支持64位长整型。...
分类:
其他好文 时间:
2014-04-29 13:35:21
阅读次数:
309
最近项目需求,需要在JTextPane上添加行号等信息,网上找了好久只找到JTextArea添加行号信息,copy网上的程序研究了下,发现自己改改就可以让JTextPane显示行号!
代码:
package com.cml.line;
import java.awt.Color;
import java.awt.FontMetrics;
import java.awt.Compo...
分类:
其他好文 时间:
2014-04-29 13:33:22
阅读次数:
266