首页 > 其他
Project Euler:Problem 32 Pandigital products
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital. The product 7254 is unusu...
分类:其他   时间:2015-06-03 11:56:40    收藏:0  评论:0  赞:0  阅读:184
如何判断服务器为虚拟机还是物理真机?
dmidecode |grep -A20 "Memory Device$"|sed -n -e'/Locator/p' -e '/Size/p'|grep -v "Bank Locator" 看内存分布 [真机]# dmidecode |grep -A20 "Memory Device$"|sed -n -e'/Locator/p' -e '/Size/p'|grep -v "Bank Loc...
分类:其他   时间:2015-06-03 11:55:58    收藏:0  评论:0  赞:0  阅读:252
AOJ 0033 ball+AOH 0118Property Distribution (DFS)
Description タナカ氏が HW アールの果樹園を残して亡くなりました。果樹園は東西南北方向に H×W の区画に分けられ、区画ごとにリンゴ、カキ、ミカンが植えられています。タナカ氏はこんな遺言を残していました。 果樹園は区画単位でできるだけ多くの血縁者に分けること。ただし、ある区画の東西南北どれかの方向にとなりあう区画に同じ種類の果物が植えられていた場合は、区画の境界が分からないの...
分类:其他   时间:2015-06-03 11:55:38    收藏:0  评论:0  赞:0  阅读:320
Druid数据源配置入门(超详细)
Druid是阿里开发的数据库连接池,据说比c3p0性能更好,支持下国产。下面就来学习下超简单的连接池配置: <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="clos...
分类:其他   时间:2015-06-03 11:55:18    收藏:0  评论:0  赞:0  阅读:348
leetcode 17 -- Letter Combinations of a Phone Number
Letter Combinations of a Phone Number 题目: Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho...
分类:其他   时间:2015-06-03 11:54:58    收藏:0  评论:0  赞:0  阅读:187
FreeMarker常用标签介绍
FreeMarker标签使用  一、FreeMarker模板文件主要有4个部分组成   1、文本,直接输出的部分   2、注释,即格式不会输出   3、插值(Interpolation):即${..}或者#{..}格式的部分,将使用数据模型中的部分替代输出   4、FTL指令:FreeMarker指令,和HTML标记类似,名字前加#予以区分,不会输出。      FTL指令规则  ...
分类:其他   时间:2015-06-03 11:54:48    收藏:0  评论:0  赞:0  阅读:150
设计模式之四:代理模式(Proxy)
代理模式: 为某个类提供了一个代理来控制访问它。 Provide a surrogate or placeholder for another object to control access to it.UML图: 主要包括: Subject(IMath):姑且称之为抽象的主题角色吧,这个类为代理类(Proxy)和真实的主题角色(RealSubject)定义了一个统一的接口,这样代理类(Pr...
分类:其他   时间:2015-06-03 11:54:29    收藏:0  评论:0  赞:0  阅读:167
HDU 1272 小希的迷宫
小希的迷宫 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 32186    Accepted Submission(s): 9944 Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Pr...
分类:其他   时间:2015-06-03 11:54:08    收藏:0  评论:0  赞:0  阅读:233
用户输入校对函数
表单处理,验证...
分类:其他   时间:2015-06-03 11:53:48    收藏:0  评论:0  赞:0  阅读:229
likely, unlikely的作用
在项目中看到了likely、unlikely宏的使用, 一直不是很清楚它们的作用,所以就深究下。likely表示被测试的表达式大多数情况下为true, unlikely则表示相反。 两个宏定义:#define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0)这两个宏经常在条件转移的...
分类:其他   时间:2015-06-03 11:53:38    收藏:0  评论:0  赞:0  阅读:314
Project Euler:Problem 34 Digit factorials
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum of the factorial of their digits. Note: as 1! = 1 and 2! = 2 are not sums they...
分类:其他   时间:2015-06-03 11:53:28    收藏:0  评论:0  赞:0  阅读:170
(Chrome42)Lodop页面总提示“未安装”或“请升级”的可能原因和解决办法
(Chrome42)Lodop页面总提示“未安装”或“请升级”的可能原因和解决办法...
分类:其他   时间:2015-06-03 11:53:08    收藏:0  评论:0  赞:0  阅读:408
Jump Game I , II
https://leetcode.com/problems/jump-game/ Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxi...
分类:其他   时间:2015-06-03 11:52:58    收藏:0  评论:0  赞:0  阅读:176
hdu 2082 找单词(母函数)
代码: #include using namespace std; int main() { int t; scanf("%d",&t); while(t--) { int a[27]; for(int i=1;i<=26;i++) scanf("%d",&a[i]); long long ...
分类:其他   时间:2015-06-03 11:52:48    收藏:0  评论:0  赞:0  阅读:221
类方法与实例方法的区别
1. +与- 2. 实例方法需要实例一个对象,通过这个对象来调用相应的实例方法;类方法直接通过类名调用 3. 类方法中可以直接调用类方法,不可以直接调用实例化方法,需要创建一个对象,通过对象调用相应地方法 实例化方法可以直接调用实例方法,也可以调用类方法 4. 类方法不可以使用实例变量,可以使用self,因为self不是实例变量 5. 在类方法中self相当于class,在实例...
分类:其他   时间:2015-06-03 11:52:28    收藏:0  评论:0  赞:0  阅读:81
大小端模式与网络字节序
一、为什么会出现大小端模式? 不同的cpu采用的大小端模式不一致。X86是小端模式。而KEIL C51则为大端模式。很多的ARM,DSP都为小端模式。有些ARM处理器还可以由硬件来选择是大端模式还是小端模式。 二、大小端模式的不同带来的问题是什么?如何解决? 如果存在数据网络传输,如果大小端模式不一致,如果不经过转换,必然会导致数据不致,出现错误。 解决方法:统一将网络上传输的...
分类:其他   时间:2015-06-03 11:51:58    收藏:0  评论:0  赞:0  阅读:193
dom4j解析xml
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.Iterator; import org.dom4j.Document; import org.dom4j.DocumentException; import org...
分类:其他   时间:2015-06-03 11:49:48    收藏:0  评论:0  赞:0  阅读:210
double类型向上取整 和向下取整
#include "stdafx.h" #include #include int main(int argc, char* argv[]) { double a = 77.001; double b = ceil(a); printf("b = %.3f\n",b); double c = 77.999; double d =...
分类:其他   时间:2015-06-03 11:49:18    收藏:0  评论:0  赞:0  阅读:246
程序员的修炼-从优秀到卓越札记:阅读之美
前言:培根这样说过,“读史使人明智,读诗使人聪慧,数学使人精密,哲理使人深刻,伦理学使人有修养,逻辑修辞使人善辩”。对于程序员来说,单纯的编码并不能使我们卓越,读一读那些优秀的书籍则会让我们更有成就。...
分类:其他   时间:2015-06-03 11:49:14    收藏:0  评论:0  赞:0  阅读:119
25 Killer Actions to Boost Your Self-Confidence
25 Killer Actions to Boost Your Self-Confidence
分类:其他   时间:2015-06-03 11:42:28    收藏:0  评论:0  赞:0  阅读:124
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!