Problem DescriptionYaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n.At first, the d...
分类:
其他好文 时间:
2015-03-12 10:59:10
阅读次数:
201
打开编辑: vi /etc/sysconfig/iptables重启防火墙:service iptables restart# Firewall configuration written by system-config-firewall# Manual customization of this...
分类:
系统相关 时间:
2015-03-10 15:22:19
阅读次数:
202
Linux下安装了MySQL,不能从其它机器访问 帐号已经授权从任意主机进行访问vi /etc/sysconfig/iptables在后面添加-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEP...
分类:
数据库 时间:
2015-03-09 18:48:43
阅读次数:
122
问题
在iOS/Mac中我们有许多方式去持久化存储数据:NSUserDefault、Key chain、C语言文件接口、NSFileHandle、基础框架中的write方法、归档等等。在实际应用中,我们经常需要将这些数据按一定格式转换为对象,并且进行一定的筛选等操作然后再使用,显得不是很方便。Apple给我们提供了Core Data框架,可以直接按对象的方式操作数据,让这些变得非常简单。
...
分类:
其他好文 时间:
2015-03-09 17:35:28
阅读次数:
189
Centos升级到7之后,发现无法使用iptables控制Linuxs的端口,google之后发现Centos 7使用firewalld代替了原来的iptables。下面记录如何使用firewalld开放Linux端口:
开启端口
firewall-cmd --zone=public --add-port=80/tcp --permanent
命令含义:
...
分类:
其他好文 时间:
2015-03-09 17:33:42
阅读次数:
184
维护一个服务器其中重要的一步就是管理好端口的开放与关闭,以避免因为服务一直运行着,而外部恶意攻击利用这些服务所占用的端口。
首先是能够查看iptables的情况:
sudo iptables -L
会列出每一条规则,标有ACCEPT的规则是指这条规则指示的通信可以成功,标有DROP的规则是指阻断所表示的通信。要注意,在系统运行中,会从开始到结束一条一条去匹配规则,所以最后...
分类:
系统相关 时间:
2015-03-09 14:29:23
阅读次数:
158
1.java的垃圾回收过程使用根搜索算法(GC Roots Tracing)判定对象是否存活的。这个算法的基本思路就是通过一系列的名为“GC Roots”的对象作为起始点,从这些节点开始向下搜索,搜索所走过的路径称为引用链(Reference Chain),当一个对象到GC Roots没有任何引用链...
分类:
编程语言 时间:
2015-03-09 00:17:25
阅读次数:
309
CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样。所以可以按如下方便配置防火墙。 1. 关闭firewall: $?sudo?systemctl?stop?firewalld.service??????????????...
分类:
其他好文 时间:
2015-03-08 17:26:31
阅读次数:
300
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.
Starting from one root supplier, everyone on ...
分类:
其他好文 时间:
2015-03-08 17:15:36
阅读次数:
130
#include#include#includeusing namespace std;const int MAX=100010;int DEPest=0;int root=-1,N;double P,r,sum=0;vector child[MAX]; //child[父亲][孩子]...
分类:
其他好文 时间:
2015-03-08 15:26:07
阅读次数:
138