首页 > 其他
salt sls 状态管理批量管理文件包|服务
[root@Mail-Verify-01salt]#cattop.slsbase:‘*‘:-servers[root@Mail-Verify-01f_source]#salt‘CMM-182.91‘state.highstateCMM-182.91:----------ID:apacheFunction:pkg.installedName:httpdResult:TrueComment:Packagehttpdisalreadyinstalled.Started:00:06:06.450717Duration..
分类:其他   时间:2015-03-19 06:29:01    收藏:0  评论:0  赞:0  阅读:308
配置DHCP中继代理并在server 2008上创建DHCP服务器详细过程
在虚拟机server2008上面创建DHCP服务,使宿主机通过中继代理的方式自动获得IP地址。拓扑结构如下所示:首先配置R1的IP地址,需要注意的是配置DHCP中继转发是在不包含DHCP服务器的VLAN上配置实现的。在SW1上面配置trunk链路,创建VLAN并把相应的接口加入到VLAN中。OK上面GNS3拓..
分类:其他   时间:2015-03-19 06:28:42    收藏:0  评论:0  赞:0  阅读:669
Codeforces Round #296 (Div. 2) A B C D
A:模拟辗转相除法时记录答案 B:3种情况:能减少2,能减少1,不能减少分别考虑清楚 C:利用一个set和一个multiset,把行列分开考虑,利用set自带的排序和查询,每次把相应的块拿出来分成两块插入回去,然后行列分别取最大相乘的作为这次询问的答案 D:一个区间覆盖问题的变形,注意公式的话,很容易发现其实x,w对应的就是一个[x - w, x + w]的区间,然后求最多不重合区间即可 ...
分类:其他   时间:2015-03-19 06:26:11    收藏:0  评论:0  赞:0  阅读:555
浅解ARC中的 __bridge、__bridge_retained和__bridge_transfer
在对 __bridge 相关的关键字讲解前,首先了解以下内容 Core Foundation 是一组C语言接口,它与Foundation为相同功能提供接口,只是Foundation框架提供的是Objective-C接口。 文章来源:http://www.outflush.com/2015/03/introduction-of-arc-bridge-type-transfer/...
分类:其他   时间:2015-03-19 06:25:11    收藏:0  评论:0  赞:0  阅读:328
LeetCode Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.思路分析:这题比较简单,关于树的题目通常都可以用递归解决,这题也不例外,递归解法的思...
分类:其他   时间:2015-03-19 06:23:31    收藏:0  评论:0  赞:0  阅读:301
LeetCode Same Tree
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.思路分析:判断两个树是否相同,基本也...
分类:其他   时间:2015-03-19 06:23:21    收藏:0  评论:0  赞:0  阅读:273
LeetCode – Refresh – Convert Sorted Array to Binary Search Tree
It is kind of binary search. Since this is a sorted array, we can treat it as inorder traversal. And we can define the root node for the Tree.So find ...
分类:其他   时间:2015-03-19 06:19:31    收藏:0  评论:0  赞:0  阅读:287
LeetCode – Refresh – Clone Graph
1. Use BFS to search the graph.2. Create a hashtable to record the one to one mapping. 1 /** 2 * Definition for undirected graph. 3 * struct Undirec.....
分类:其他   时间:2015-03-19 06:19:11    收藏:0  评论:0  赞:0  阅读:202
LeetCode – Refresh – Container With Most Water
The minimum height controls the volumns. So let two runner at two ends start to scan the array. 1 class Solution { 2 public: 3 int maxArea(vector ...
分类:其他   时间:2015-03-19 06:18:51    收藏:0  评论:0  赞:0  阅读:316
LeetCode – Refresh – Construct Binary Tree from Inorder and Postorder Traversal
For this problem just need to know the structure of two traversal.1. It is hard to find the root node in the inorder traversal but it is easy in posto...
分类:其他   时间:2015-03-19 06:18:41    收藏:0  评论:0  赞:0  阅读:217
LeetCode – Refresh – Combination Sum II
The different between I and II is that:1. For II, each number only can be chosen ONCE.2. The a number, in the array, encountered more than twice will ...
分类:其他   时间:2015-03-19 06:18:31    收藏:0  评论:0  赞:0  阅读:244
关于TOP (n) WITH TIES的运用
1 SELECT TOP (5) orderid, orderdate, custid, empid2 FROM Sales.Orders3 ORDER BY orderdate DESC, orderid DESC;4 5 SELECT TOP (5) WITH TIES orderid, ord...
分类:其他   时间:2015-03-19 06:18:21    收藏:0  评论:0  赞:0  阅读:311
LeetCode – Refresh – Convert Sorted List to Binary Search Tree
Similar to the sorted array. But we have to remember, the position of node not depends on the index. So we need do two more things:1. Ensure the point...
分类:其他   时间:2015-03-19 06:18:11    收藏:0  评论:0  赞:0  阅读:272
LeetCode – Refresh – Combinations
Same algorithm with combination. Input as the (1..n), constraint is that the length of each combine should be k. 1 class Solution { 2 public: 3 vo...
分类:其他   时间:2015-03-19 06:17:41    收藏:0  评论:0  赞:0  阅读:243
HackerRank - Knapsack
Very good problem to learn knapsack (complete knapsack in this case).My brutal-force solution in Python got AC too, which surprised me a bit. Here is ...
分类:其他   时间:2015-03-19 06:17:31    收藏:0  评论:0  赞:0  阅读:536
LeetCode – Refresh – Compare Version Numbers
Two notes:1. I dont know whether C++ has a good split function for STL as the JAVA. Need to figure it out.2. At the beginning, I tried to set tmp1 = t...
分类:其他   时间:2015-03-19 06:17:21    收藏:0  评论:0  赞:0  阅读:227
LeetCode – Refresh – Construct Binary Tree from Inorder and Preorder Traversal
Only different with preorder and postorder is that the root start from the beginning for preorder. 1 /** 2 * Definition for binary tree 3 * struct T.....
分类:其他   时间:2015-03-19 06:17:11    收藏:0  评论:0  赞:0  阅读:190
LeetCode – Refresh – Combination Sum
This is a classical combination question. 1 class Solution { 2 public: 3 void getComb(vector > &result, const vector &num, vector current, int sum...
分类:其他   时间:2015-03-19 06:16:51    收藏:0  评论:0  赞:0  阅读:249
getopt例子
(本例基于win7 + python3.4)import getopt, sys'''getopt 模块专门用来处理命令行参数函数getopt(args, shortopts, longopts = [])参数 args 一般是sys.argv[1:] shortopts ...
分类:其他   时间:2015-03-19 06:16:41    收藏:0  评论:0  赞:0  阅读:277
tomcat7.0设置多域名指向同IP不同项目
核心配置: www.yitechan.com.cn www.yitechan.com 附上源文件 文件名:tomcat多域名同IP 链接: http://pan.baidu.com/s/1gdw5OI3 密码: texe
分类:其他   时间:2015-03-19 06:16:21    收藏:0  评论:0  赞:0  阅读:376
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!