#include
template
class Splay_Tree
{
public:
Splay_Tree();
bool find(const T& val);
void insert(const T& val);
void del(const T& val);
private:
typedef struct tagNODE
{
T data;
struct tag...
分类:
其他好文 时间:
2014-09-17 13:40:32
阅读次数:
219
//avl_tree.h
#include
using std::stack;
template
class AVL_TREE
{
public:
AVL_TREE(){
nil = new AVL_NODE(0, -1, NULL, NULL);
tree_root = nil;
}
bool find(const T &val) const;
void insert(co...
分类:
其他好文 时间:
2014-09-16 23:44:51
阅读次数:
272
1.Input a.validatebox 定义: 赋值:$("#APPLYDEPTNAME").val('1212'), 取值:$("#APPLYDEPTNAME").val()b.ComboBox定义: 城市: ...
分类:
Web程序 时间:
2014-09-16 12:29:50
阅读次数:
262
1 #include 2 #include 3 #include 4 using namespace std; 5 int n; 6 int dp[1005],val[1005]; 7 8 int main() 9 {10 while( scanf("%d",&n) && n ){...
分类:
其他好文 时间:
2014-09-16 01:31:49
阅读次数:
221
1. 让接口被正确使用最重要的方法是:保持与内置类型的一致性。方法1:外覆类型(wrapper types)例如在需要年月日时,使用struct day {explicit day(int d) : val(d) { }private: int val;};方法2:函数替代对象class month...
分类:
编程语言 时间:
2014-09-15 22:29:49
阅读次数:
334
西安网络赛C题。先对大数据离散化,dp优化
#include //G++
#include
#include
#include
#include
#include
#include
#include
using namespace std;
const int maxn=51234;
struct kind
{
int id;
int val;
};
int vis...
分类:
其他好文 时间:
2014-09-15 19:30:59
阅读次数:
168
1 radio的使用 性别: 男 女 $(function(){ $("#sex input[type='radio'] ").click(function(){ alert($(this).val()); }); });2 optionList timeList = ne...
分类:
其他好文 时间:
2014-09-15 19:06:09
阅读次数:
115
简单类和无参方法:1 class Counter {2 private var value = 0; //必须初始化字段3 def increment() = value += 1 //方法默认是公有的4 def current = value5 }使用:1 val counter1 =...
分类:
其他好文 时间:
2014-09-15 17:16:29
阅读次数:
161
最近遇到了如下的问题,当用户选择一个文件的时候,将标题自动设置为文件名
参考了很多方法后,最后兼容各个浏览器的代码如下:
function getFileName(obj){
var fileName="";
if(typeof(fileName) != "undefined")
{
fileName = $(obj).val().split("\\")....
分类:
Web程序 时间:
2014-09-15 16:00:59
阅读次数:
213
Map构造Map不可变:val map = Map("sa" -> 1, "s" -> 2)map("sa") = 3 // errorval emptyMap = newscala.collection.immutable.HashMap[String, Int]可变:val map2 = sca...
分类:
其他好文 时间:
2014-09-15 14:07:08
阅读次数:
252