老规矩,Talk is cheap, show me your code.#-*-coding:utf-8-*-from math import logdef calcShannonEnt(datsSet): #长度 numEntries = len(dataSet) #字典统计 ...
分类:
其他好文 时间:
2014-10-04 14:58:46
阅读次数:
218
void show_bits(int n){ int i = 0; for(i=0;i(反码)->(反码+1)负数的原码:(补码-1)->最高位符号位别动其余均转反码
分类:
编程语言 时间:
2014-10-04 14:05:06
阅读次数:
311
http://acm.hnu.cn/online/?action=problem&type=show&id=13028&courseid=0题意:国际象棋里rooks里的规则(跟象棋没什么区别吧……)。在N*N的棋盘里放置几个'X',如果两个rook之间有'X'就不会互相攻击,问棋盘里最多能放置几个...
分类:
其他好文 时间:
2014-10-03 14:40:44
阅读次数:
229
题目质量差评!为什么不给数据范围!A.乘积最大3题目:http://dev.luogu.org/problem/show?pid=2172题解:sb题,均值定理。代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include...
分类:
其他好文 时间:
2014-10-02 15:01:33
阅读次数:
271
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2014-10-02 01:43:12
阅读次数:
140
我们做了一个十分简洁的手机浏览器,让web app像native app那样运行,并且支持PhoneGap API,both iOS and Android。体验地址:http://t.cn/RhuFdwx phonegap
api支持演示:http://v.youku.com/v_show/id_XNzk0ODU4NzIw.html
当然我们也提供开发者平台(http://deve...
分类:
移动开发 时间:
2014-10-01 23:21:27
阅读次数:
237
A.小Z的可恶路障题目:http://www.luogu.org/problem/show?pid=U126题解:暴力也可以过吧。我为了保险先求了一次最短路,然后枚举这条最短路上的所有边。。。代码: 1 #include 2 #include 3 #include 4 #include 5 #inc...
分类:
其他好文 时间:
2014-10-01 20:40:01
阅读次数:
154
1. create indexdb.students.ensureIndex({class:1,student_name:1})http://docs.mongodb.org/manual/tutorial/create-an-index/2. show all indexes in current...
分类:
数据库 时间:
2014-10-01 13:13:11
阅读次数:
187
本文仅用作备忘,无实际指导意义,逻辑略混乱。1、命令show parameter name;SQL> show parameter name;NAME TYPE VALUE-------------------------...
分类:
数据库 时间:
2014-09-30 13:09:09
阅读次数:
220
很久以前就希望真正的使用的一款linux系统,转了很大一圈,最后多种原因考虑(主要是自己的技术限制)还是选择了ubuntu.首先来show下目前在用的桌面。下面分几点来分别记录下常用的设置项,1,输入法对于一个拥有强烈爱国热情的我来说(英语不好也占了很大的部分,哈哈~),中..
分类:
其他好文 时间:
2014-09-30 04:44:02
阅读次数:
152