设计模式的意义在于:面向业务内容、业务数据结构和系统架构,高内聚低耦合、优雅的将平面逻辑立体化。 1 package designPattern; 2 /** 3 * 单例模式 4 */ 5 public class A1_SingletonTest { 6 7 public stat...
分类:
其他 时间:
2015-04-09 23:35:48
收藏:
0 评论:
0 赞:
0 阅读:
230
今天看代码,想到去年发生的HashMap发生的CPU使用率100%的事件,转载下当时看的三个比较不错的博客(非常推荐)参考:http://coolshell.cn/articles/9606.html http://github.thinkingbar.com/hashmap-analysis/.....
分类:
其他 时间:
2015-04-09 23:34:28
收藏:
0 评论:
0 赞:
0 阅读:
306
1 请说明下面各种情况的执行结果,并注明产生对应结果的理由。function doSomething() { alert(this); } ①element.onclick=doSomething,点击element元素后。②element.onclick=function(){doSo...
分类:
其他 时间:
2015-04-09 23:34:08
收藏:
0 评论:
0 赞:
0 阅读:
210
一、元字符 限定符 描述 模式 . 匹配出换行符以外的任意字符 \d*\.\d \w 匹配字母数字或下划线或者汉字或者下划线 ...
分类:
其他 时间:
2015-04-09 23:33:38
收藏:
0 评论:
0 赞:
0 阅读:
207
Doing Homework题目抽象:给出n个task的name,deadline,need。 每个任务的罚时penalty=finish-deadline; task不可以同时做。问按怎样的顺序做使得penalty最小。同时输出顺序。如果有多个满足条...
分类:
其他 时间:
2015-04-09 23:33:18
收藏:
0 评论:
0 赞:
0 阅读:
233
-- 1.Hello world print( "--------------1--------------")print("Hello world");-- 2. function definefunction add(a,b) return a + bendprint( "-------...
分类:
其他 时间:
2015-04-09 23:33:08
收藏:
0 评论:
0 赞:
0 阅读:
304
设计模式的意义在于:面向业务内容、业务数据结构和系统架构,高内聚低耦合、优雅的将平面逻辑立体化。 1 package designPattern; 2 3 /** 4 * 简单工厂模式 5 * @author Administrator 6 */ 7 public class A2_Simp...
分类:
其他 时间:
2015-04-09 23:32:08
收藏:
0 评论:
0 赞:
0 阅读:
256
What is Text Classification?Text classification typically involves assigning a document to a category by automated or human means. LingPipe provides a...
分类:
其他 时间:
2015-04-09 23:31:19
收藏:
0 评论:
0 赞:
0 阅读:
321
线段树,TLE,各种。唉。。。。我真是笨死了。。。。我用的线段树是记录左右区间最长连续棵数的。。。反正TLE#include #include #include #include using namespace std;const int N=50050;struct Q{ int val,inde...
分类:
其他 时间:
2015-04-09 23:30:58
收藏:
0 评论:
0 赞:
0 阅读:
265
今天看代码,想到去年发生的HashMap发生的CPU使用率100%的事件,转载下当时看的三个比较不错的博客(非常推荐)参考:http://coolshell.cn/articles/9606.html http://github.thinkingbar.com/hashmap-analysis/.....
分类:
其他 时间:
2015-04-09 23:30:18
收藏:
0 评论:
0 赞:
0 阅读:
174
import java.awt.GridLayout;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import javax.swing.JButton;import...
分类:
其他 时间:
2015-04-09 23:29:18
收藏:
0 评论:
0 赞:
0 阅读:
309
一些小问题,避免出现低级错误。1、strcmp(s1,s2): 字符串指针不见'\0'不回头,这个常在与单个字符作比较时写着写着就忘了.char* p_ch1="this is an example!";char* p_ch2="h";printf("%d ",strcmp(p_ch1+1,p_ch...
分类:
其他 时间:
2015-04-09 23:29:08
收藏:
0 评论:
0 赞:
0 阅读:
250
跟OpenCV相关的:http://opencv.org/2012年7月4日随着opencv2.4.2版本的发布,opencv更改了其最新的官方网站地址。http://www.opencvchina.com/好像12年才有这个论坛的,比较新。里面有针对《learning opencv》这本书的视频讲...
分类:
其他 时间:
2015-04-09 23:28:58
收藏:
0 评论:
0 赞:
0 阅读:
358
DP/KMP/矩阵乘法 好神的题啊……跪了跪了 $n\leq 10^9$是什么鬼……我们还是先不要考虑这个鬼畜的玩意了>_> 用类似数位DP的思路,我们可以想到一个DP方程:$f[i][j]$表示前 i 位数字,它的最后 j 位与不吉利串匹配的方案数,显然有$ans=\sum_{i=0}^x ...
分类:
其他 时间:
2015-04-09 23:28:28
收藏:
0 评论:
0 赞:
0 阅读:
200
EF中在使用linq就行查询select时不能直接使用自动映射生成的类,需要在单独声明一个类或者使用匿名类在查询完成后再转为对应的对象。 1 public partial class WebForm1 : System.Web.UI.Page 2 { 3 protecte...
分类:
其他 时间:
2015-04-09 23:28:18
收藏:
0 评论:
0 赞:
0 阅读:
325
package cc.newnews.view;import android.content.Context;import android.util.AttributeSet;import android.view.GestureDetector;import android.view.Gestur...
分类:
其他 时间:
2015-04-09 23:27:58
收藏:
0 评论:
0 赞:
0 阅读:
229
1、进制换算 X进制转换为十进制 按权求和 十进制转换为X进制 连除倒取余2、基本数据类型3、常量 变量 常量:程序运行期间不能被改变的值 变量:变量代表一个存储区域;存储区域的值就是变量的值,变量的值可以在运行期间改变。4、运算符 4.1 ++ --运算 b = a++;等价...
分类:
其他 时间:
2015-04-09 23:27:48
收藏:
0 评论:
0 赞:
0 阅读:
172
题意:提供一个无符号32位整型uint32_t变量,返回其二进制形式的1的个数。思路:取出一位,就右移1位,挤掉它,循环32次,逐个判断。没难度就不解释了,可能有更好解法,等待第2次思考。 1 class Solution { 2 public: 3 int hammingWeight(ui...
分类:
其他 时间:
2015-04-09 23:27:28
收藏:
0 评论:
0 赞:
0 阅读:
196
原题地址一开始没搞懂题目是想干什么,于是写了一个扫一遍的代码,A了,如下:代码: 1 #include 2 3 using namespace std; 4 5 int main() { 6 int N, K, a; 7 bool found = false; 8 int lt =...
分类:
其他 时间:
2015-04-09 23:26:58
收藏:
0 评论:
0 赞:
1 阅读:
363
隐语义模型:物品 表示为长度为k的向量q(每个分量都表示 物品具有某个特征的程度)用户兴趣 表示为长度为k的向量p(每个分量都表示 用户对某个特征的喜好程度)用户u对物品i的兴趣可以表示为 其损失函数定义为- 使用随机梯度下降,获得参数p,q负样本生成:对于只有正反馈信息(用户收藏了,关注了...
分类:
其他 时间:
2015-04-09 23:26:48
收藏:
0 评论:
0 赞:
0 阅读:
321