上一页 1 ··· 191 192 193 194 195 196 197 198 199 ··· 300 下一页
2013年8月20日

hdu 4687 Boke and Tsukkomi

摘要: Dancing link twice.Find the maximum combination numbers in the first time.Enumerate each node, dancing.If the new result is not optimaze, then push it into ans.#include #include #include #include #include #include using namespace std;const int M = 200;// exactstruct dancing {#define dfor(c, a, b) fo 阅读全文
posted @ 2013-08-20 21:34 you Richer 阅读(221) 评论(0) 推荐(0)

UVA 839 (13.08.20)

摘要: Not so Mobile Before being an ubiquous communications gadget, a mobile wasjust a structure made of strings and wires suspending colourfullthings. This kind of mobile is usually found hanging over cradlesof small babies. The figure illustrates a simple mobile. It is just a wire,sus... 阅读全文
posted @ 2013-08-20 21:32 you Richer 阅读(166) 评论(0) 推荐(0)

多校 4686 Arc of Dream hdu 矩阵解

摘要: 构造矩阵如下:Ai*bi AX*BX AX*BY AY*BX AY*BY 0 a(i-1)*b(i-1)Ai 0 AX 0 AY 0 a(i-1)Bi 0 0 BX BY 0 b(i-1)1 0 0 0 1 0 1Sum(i) AX*BX AX*BY AY*BX ... 阅读全文
posted @ 2013-08-20 21:30 you Richer 阅读(185) 评论(0) 推荐(0)

关于wind7重新安装系统后,连接mysql的问题

摘要: 系统重装对于我们来说,可以说是家常便饭了。但重装系统之后 ,又要装很多的应用软件是会很烦的。特别是重装一些数据库软件,时间长不说,搞不好数据丢失了会让人抓狂。今天我简单介绍一个不用重装mysql的方法。首先在安装mysql的时候不要把它安装到系统盘中,这样以后系统重装后也不用重装mysql,这一点很重要。那么系统重装后该怎么做呢?请往下看。1.打开cmd,把目录指向你安装mysql的bin目录下,在控制台中输入mysqld-nt.exe -install回车 上面这个命令是把sqml注册为服务,如果成功的话,就会显示:Service successfully installed 2.... 阅读全文
posted @ 2013-08-20 21:28 you Richer 阅读(157) 评论(0) 推荐(0)

hadoop学习之ZooKeeper

摘要: 1. 什么是ZooKeeper?ZooKeeper是一组工具,用来配置和支持分布式调度。它能处理分布式应用的“部分失败”问题。 什么是部分失败?部分失败是分布式处理系统的固有特征,即发送者无法知道接收者是否收到消息,它出现的可能性有 网络传输出现问题、接收进程已经死掉等。 ZooKeeper是Hadoop的分布式协调服务,ZooKeeper是Hadoop生态系统的一部分,但又远不止如此,它能支持更多类似的分布式平台和系统,如Jubatus,Cassender等等。而且HBase明确指出至少需要一个ZooKeeper实例的支持。 2. ZooKeeper有什么特征?其核心是一个精简的文件系统;其 阅读全文
posted @ 2013-08-20 21:25 you Richer 阅读(513) 评论(0) 推荐(0)

viewDidLoad、viewDidUnload、viewWillAppear、viewDidAppear、viewWillDisappear 和 -viewDidDisappear的区别和使用

摘要: 首先看一下官方解释:- (void)loadView; // This is where subclasses should create their custom view hierarchy if they aren't using a nib. Should never be called directly.- (void)viewDidUnload NS_DEPRECATED_IOS(3_0,6_0); // Called after the view controller's view is released and set to nil. For example, 阅读全文
posted @ 2013-08-20 21:23 you Richer 阅读(499) 评论(0) 推荐(0)

python处理中文字符

摘要: 1.在py文件中使用中文字符unicode.py文件内容如下所示:# -*- coding:utf-8 -*-str_ch = '我们women'uni_ch = u'我们women'print "type:", type(str_ch), "content:", str_ch, repr(str_ch)print "type:", type(uni_ch), "content:", uni_ch, repr(uni_ch) 需要在文件第一行输入以下内容:“# -*- coding: 阅读全文
posted @ 2013-08-20 21:21 you Richer 阅读(717) 评论(0) 推荐(0)

linux配置本地tomcat应用80端口转发

摘要: 场景:本地部署tomcat到8080端口,并期望本地访问80端口来访问本地tomcat。结论:使用linux下的iptables工具实现端口转发功能。具体为现取得root权限执行iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-port 8080目前在重启前均生效。要想永久生效,需要继续执行(ubuntu环境):iptables-save > /etc/iptables.rules新建一个bash脚本#!/bin/bashiptables-restore mangle prerouting 阅读全文
posted @ 2013-08-20 21:18 you Richer 阅读(511) 评论(0) 推荐(0)

基于JVM规范的并发编程解决方案

摘要: 在并发的世界里,选择合适的状态处理方法将对并发性和正确性起到决定性的影响。这方面可选的方法有:共享可变性、隔离可变性以及完全不可变性。 对于并发问题来说最好的解决方法是从根本上消灭它而不是花很多时间解决它。要做到这一点其实很简单,只要消除可变状态就可以了,即我们要围绕不可变性或至少是隔离可变性来设计应用程序。 下面是两种较新的基于JVM虚拟机开发语言Clojure,Scala,Groovy等的解决方案 1.软件事务内存STM(Software Transaction Memory) STM是针对共享可变性问题的一次大胆尝试,其核心思路是将可变实体从不可变状态值中分离出来。STM是... 阅读全文
posted @ 2013-08-20 21:16 you Richer 阅读(243) 评论(0) 推荐(0)

poj 3211 Washing Clothes(背包)

摘要: 很不错的01背包!!!不过有点疑问!!!(注释)#include #include#include using namespace std; #define max(a,b) a>b?a:b struct node { char cl[50]; int a; }aa[200]; int cmp(node a,node b) { return strcmp(a.cl,b.cl)>0; } int main() { int n,m,i,j,q,w,bb[50000],ans,sum,b[50000]; char str[50]; whil... 阅读全文
posted @ 2013-08-20 21:14 you Richer 阅读(130) 评论(0) 推荐(0)
上一页 1 ··· 191 192 193 194 195 196 197 198 199 ··· 300 下一页