码迷,mamicode.com
首页 > 其他好文
ajax 简单学习
客户端代码function login(type) { $.ajax({ type: "post", url: "logindo.aspx", data: { user: $("#name").val(),//对应的值 ...
分类:其他好文   时间:2014-06-21 07:36:58    阅读次数:172
Leetcode:Longest Palindromic Substring 最长回文子串
Longest Palindromic Substring:Given a stringS, find the longest palindromic substring inS.You may assume that the maximum length ofSis 1000, and there...
分类:其他好文   时间:2014-06-21 07:36:18    阅读次数:227
设计模式总结(2)
设计模式总结(2)======================================================decorator pattern装饰者和被装饰者有相同的 超类型;可以用一个或多个 装饰者来 包装 一个对象;既然装饰者和被装饰者对象有相同的超类型,所以在任何需要原始对象...
分类:其他好文   时间:2014-06-21 07:38:48    阅读次数:143
一个数组中找到满足和为sum的两个数
如果考虑hashmap直接O(n)的速度, 如果不行,就先排序,两头指针很好推理,关键是 a[beg] +a[end]>sum,意思就是说a[end]太大了,最小的数的都不满足,所以排除a[end] 绝知此事要躬行 #include#includeusing namespace std; bool ...
分类:其他好文   时间:2014-06-21 07:38:14    阅读次数:187
query和prototype库冲突的解决方法
我们在使用 jQuery 的过程中我们会频繁使用 $ 符号,$是JQuery的别名,所有使用$的地方也都可以使用JQuery来替换,例如 如$('#msg')等同于JQuery('#msg')的写法。在页面中同时引入另一个js类库,并且该类库也是用了 $ 符号时,$ 代表的变量将被覆盖。例如 pro...
分类:其他好文   时间:2014-06-21 07:40:57    阅读次数:203
文件流FileStream
FileStream对象表示在磁盘或网络路径上指向文件的流使用FileStream类对文件系统上的文件进行读取、写入、打开和关闭操作FileStream对输入输出进行缓冲,从而提高性能为什么不用File.ReadAllText()? 好处之一就是:对于大文件来说,FileStream可以对文件采取分...
分类:其他好文   时间:2014-06-21 07:41:38    阅读次数:128
好玩的Prim算法
这段时间学算法,用JS实现了一个Prim,用于在连通图中找出最小树,具体内容、代码解析周末会不上,现在先把源码献上: 1 2 3 4 5 最小树生成算法 6 7 8 15 16 17 18 19 20 233...
分类:其他好文   时间:2014-06-21 07:42:23    阅读次数:219
LeetCode:Divide Two Integers
题目链接 Divide two integers without using multiplication, division and mod operator. 最直观的方法是,用被除数逐个的减去除数,直到被除数小于0。这样做会超时。 本文地址 那么如果每次不仅仅减去1个除数,计算速度就会增加,但...
分类:其他好文   时间:2014-06-21 07:44:52    阅读次数:221
vxworks启动
分类:其他好文   时间:2014-06-21 07:48:26    阅读次数:163
在IE浏览器中执行OpenFlashChart的reload方法时无法刷新的解决方法
在IE浏览器下使用OpenFlashChart技术实现图表展示,在刷新图表时会遇到“无法获取属性reload的值: 对象为 null 或未定义”的问题,本文给出了该问题的解决方法。
分类:其他好文   时间:2014-06-21 07:49:42    阅读次数:344
lucene 建立CRUD操作
IndexSearcher indexSearcher = new IndexSearcher(LuceneUtils.getDirectory()); // 指定所用的索引库这句会引发线程安全问题,在全剧终 IndexSearcher只能有一个对象才可以,所以在ArticleDocumentUti...
分类:其他好文   时间:2014-06-21 07:54:27    阅读次数:214
Ag (the_silver_searcher) 安装使用
## if (I am a Programmer || I have a strong sense of time) I use ag___##1. 安装命令行ag(代码中行首的“\\”是多余的)```bash\#!/usr/bin/env bash\#Author Leslie Guan\#ma....
分类:其他好文   时间:2014-06-21 07:55:03    阅读次数:241
[LeetCode] Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists./** * Def...
分类:其他好文   时间:2014-06-21 07:55:42    阅读次数:197
USACO月赛—JAN12 Silver
题目描述After several years of record milk production, Farmer John now operates an entire network of N farms (1 = B_2 >= B_3), then FJ wants to make B_1 a...
分类:其他好文   时间:2014-06-21 07:57:04    阅读次数:355
HDU 1238
好吧,这题直接搜索就可以了,不过要按照长度最短的来搜,很容易想得到。记得ACM比赛上有这道题,呃。。不过,直接搜。。呵呵了,真不敢想。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 char s...
分类:其他好文   时间:2014-06-21 07:57:45    阅读次数:148
又一批新问卷
福建农林大学植保专业教学实习实施情况调查问卷[2011级创新班]创 新班同学们: 你们好!教学实习即永春实习作为我院实践教学的重要载体,一直受到我院领导和老师们的重视。为了更好的做好教学实习工作,学院特地成立了教学实习调研小 组,旨在了解教学实习的实施情况。课题小组为此专门设计了一份关于教学实习的问...
分类:其他好文   时间:2014-06-21 07:59:15    阅读次数:132
mac隐藏或者显示所有隐藏文件
显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true 隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false 或...
分类:其他好文   时间:2014-06-21 07:59:52    阅读次数:160
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!