写在前面的话:上一篇写了如何理解T-SQL中Merge语句,基本把Merge语句要讲的给讲了,在文章的后面,抛出了几个结,当时没有想明白怎么去用文字表达,这一篇就来解答一下这几个结,又是一篇“天马行空”的文字,大家凑合看吧。===正文开始=== 先看下面表一(Student_Target)和表二(....
分类:
数据库 时间:
2015-01-18 10:28:50
阅读次数:
212
The problem:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were in...
分类:
其他好文 时间:
2015-01-18 07:06:14
阅读次数:
293
iptables本身没有TRACKtarget,以至于你不能指定需要被conntrack模块处理的数据包白名单,比如我想实现:除了来源IP是192.168.10.0/16网段的需要被track之外,其它的都不要track。当然,你可以通过下面的配置实现我的需求:iptables-traw-APREROUTING!-s192.168.10.0/16-jNOTRA..
分类:
其他好文 时间:
2015-01-17 19:39:23
阅读次数:
155
只要有符合规则数据包到达,LED灯就XY一下,这个效果怎么实现?我有很多的办法,比较绕的就是:使用LOG target发内核日志,rsyslogd截获,redirect到filter,调用shell操作LED灯。虽然很绕,但是UNIX上不都是提倡这么玩的吗?最为直接的办法是什么?我觉得应该是写一个事件target,只要匹配就通过netlink把这个数据包报告给user space,有了这个事件ta...
分类:
其他好文 时间:
2015-01-17 16:37:41
阅读次数:
212
iptables本身没有TRACK target,以至于你不能指定需要被conntrack模块处理的数据包白名单,比如我想实现:除了来源IP是192.168.10.0/16网段的需要被track之外,其它的都不要track。 当然,你可以通过下面的配置实现我的需求:iptables -t raw -A PREROUTING ! -s 192.168.10.0/16 -j NOTRACK...
分类:
其他好文 时间:
2015-01-17 16:37:05
阅读次数:
189
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.
Note:
Elements in...
分类:
编程语言 时间:
2015-01-17 13:59:19
阅读次数:
171
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly...
分类:
编程语言 时间:
2015-01-17 12:43:35
阅读次数:
193
1 题目Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the t...
分类:
其他好文 时间:
2015-01-17 11:07:27
阅读次数:
171
k-sum问题都可以有2-sum引申出来解决,但是时间复杂度为O(n^k-1)。应该要用哈希解决才好的,之后再看看
class Solution{
private:
vector > ans;
public:
vector >fourSum(vector &num, int target){
sort(num.begin(),num.end());
ans.clear()...
分类:
其他好文 时间:
2015-01-16 23:50:32
阅读次数:
336
简介为view设置动画效果;使用方法(1)设置中心点位置://设置中心点为view的原点,左上
ViewHelper.setPivotX(view,0);
ViewHelper.setPivotY(view,0);
//设置中心点为中间点
ViewHelper.setPivotX(view,target.getWidth()/2f);
ViewHelper.setPivotY(view,target.getHeight(..
分类:
移动开发 时间:
2015-01-16 19:23:53
阅读次数:
219