一、自定义注解元注解: @interface注解: 定义注解接口@Target注解: 用于约束被描述的注解的使用范围,当被描述的注解超出使用范围则编译失败。如:ElementType.METHOD,ElementType.TYPE;@Retention 注解:用于约束被定义注解的作用范围,作用范围有...
分类:
编程语言 时间:
2015-11-12 20:15:45
阅读次数:
315
一:Search in Sorted Array二分查找,可有重复元素,返回target所在的位置,只需返回其中一个位置,代码中的查找范围为[low,high),左闭右开,否则容易照成死循环。代码:class Solution {public: int search(vector& nums,...
分类:
其他好文 时间:
2015-11-12 13:35:36
阅读次数:
326
题目: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 inserted in...
分类:
其他好文 时间:
2015-11-12 09:56:14
阅读次数:
288
Convenient method to find one item in an array, avoid writing and for + if:let arys = [1,,5,,6] ;let target = 6;let res = arys.find(item => item === t...
分类:
其他好文 时间:
2015-11-12 06:30:05
阅读次数:
171
如果你的IPTABLES基础知识还不了解,建议先去看看.开始配置我们来配置一个filter表的防火墙.(1)查看本机关于IPTABLES的设置情况[root@tp ~]# iptables -L -nChain INPUT (policy ACCEPT)target prot opt source ...
分类:
系统相关 时间:
2015-11-11 13:15:18
阅读次数:
418
计算单个pool 的PG Count公式 PoolPGCount=((TargetPGsPerOSD)?(OSDNumber)?(DataPercent) )/PoolSize 参数介绍 名称 说明 备注 Pool PG Count 单个Pool的PG数量 Target PGs Per OSD 每个OSD的PGs数量 a)如果未...
分类:
其他好文 时间:
2015-11-10 19:44:24
阅读次数:
336
1、格式 ln source_file_path target_file_path2、执行ln 命令的用户要对source_file_path有写权限,才可以创建软连接。3、souce_file这个文件对ln的执行者要是可达的,也就是说ln的执行者要对source_file的上层目录有x权限。例子:...
分类:
系统相关 时间:
2015-11-10 18:59:33
阅读次数:
214
Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated num...
分类:
其他好文 时间:
2015-11-10 15:47:45
阅读次数:
161
基本需要知道的 :unsigned : 没符号的signed : 有符号的int : 整型看看OC的定义 :1 #if __LP64__ || (TARGET_OS_EMBEDDED && !TARGET_OS_IPHONE) || TARGET_OS_WIN32 || NS_BUILD_32_LI...
分类:
其他好文 时间:
2015-11-09 20:33:09
阅读次数:
284
问题: 今天在MySQL数据库删除重复数据的时候遇到了一个问题。如下脚本:DELETE FROM tempA WHERE tid IN (SELECT MAX(tid) AS tid FROM tempA GROUP BY name,age) 会出现报错信息: You can't spec...
分类:
其他好文 时间:
2015-11-09 17:18:37
阅读次数:
275