码迷,mamicode.com
首页 > 2015年01月22日 > 全部分享
[LeetCode] Search Insert Position 二分搜索
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 or...
分类:其他好文   时间:2015-01-22 01:38:07    阅读次数:116
linux 学习笔记 wc命令
#wc 文件名.txt输出 4 13 65 文件名.txt -->4 行13个单词#wc -w 文件名.txt 统计单词数量#wc -l 文件名.txt 统计行数#wc -c 文件名.txt 显示文件byte数grep wang /etc/passwd |wc -d
分类:系统相关   时间:2015-01-22 01:41:09    阅读次数:185
hdu4553(线段树)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4553线段树功能:update:区间替换 query:询问满足条件的最左断点分析:poj3667的加强版,这里需要在每个区间内设置女神区间和屌丝区间,每次询问女神的时候,先看屌丝区间有无空位,有就插到屌丝...
分类:其他好文   时间:2015-01-22 01:39:52    阅读次数:136
hdu3974(线段树+dfs)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=3974题意:给定点的上下级关系,规定如果给i分配任务a,那么他的所有下属。都停下手上的工作,开始做a。操作 T x y 分配x任务y,C x询问x的当前任务;分析:dfs将每个节点以下的子孙节点重新编号映...
分类:其他好文   时间:2015-01-22 01:38:52    阅读次数:314
【笔记——Android】下载安卓sdk的方法
利用国内的镜像网点下载,这是东软的:AndroidAndroid SDK配置步骤启动 Android SDK Manager ,打开主界面,依次选择「Tools」、「Options...」,弹出『Android SDK Manager - Settings』窗口;在『Android SDK Mana...
分类:移动开发   时间:2015-01-22 01:40:10    阅读次数:152
Java文法(3)—— White Space
-------------------------------------------------------------------------------说明: White space is defined as the ASCII space character, horizontal tab...
分类:编程语言   时间:2015-01-22 01:39:13    阅读次数:224
iOS提交到appstore的新要求
本文转载至http://blog.csdn.net/kqygww/article/details/4127755564-bit and iOS 8 Requirements for New Apps新提交的iOS8 App,64位成为必选项, 2015年2月1号生效October 20, 2014S...
分类:移动开发   时间:2015-01-22 01:39:38    阅读次数:275
【随笔】使用mOnOwall封禁某一个ip
有时候,查看服务器日志时会发现某些人的恶意登录记录: 这时候,我们就要把这个ip封掉。 首先ping一下这个ip: 然后打开monowall路由页面,点击Firewall-->Rules: 点击下方的,添加一个规则,然后更改: Action ==> Block Proto...
分类:其他好文   时间:2015-01-22 01:36:48    阅读次数:169
Javascript构建对象重点(一)
//person类 var Person = { making:function (name,age) { this.name = name; this.age = age; ...
分类:编程语言   时间:2015-01-22 01:37:16    阅读次数:230
[LeetCode][Python]18: 4Sum
# -*- coding: utf8 -*-'''__author__ = 'dabay.wang@gmail.com'18: 4Sumhttps://oj.leetcode.com/problems/4sum/Given an array S of n integers, are there el...
分类:编程语言   时间:2015-01-22 01:37:23    阅读次数:239
[原创] CQ(clear quest)自动执行查询并将查询结果通过email发送的实现
负责的项目有时候会被项目经理找来催,原来又没有及时的去搜索CQ。。。 于是这两天自己实现了一下能自动执行CQ查询的脚本,同时还能降查询结果发送到我的邮箱。分享一下吧: 简单说明一下: 1)其实是两个比较独立的的功能拼凑到一块实现的, 一个功能是CQ的登陆和查询, 看函数logonDMS()...
分类:其他好文   时间:2015-01-22 01:38:45    阅读次数:163
算法模板——Trie树
实现功能——实现对于不同字符串以及之前出现过的字符串的识别,对于单个长度为L的字符串,复杂度为O(L);代码不难懂,直接上(在识别字符串方面,个人觉得其好处远远大于hash识别——1.理论上都是O(L) 2.哈希弄不好撞车撞一大串,尤其是哈希策略不太好的时候,而这个绝对不可能撞,严格的O(L) 3....
分类:编程语言   时间:2015-01-22 01:37:12    阅读次数:210
经典指针表达式程序 -- 简版find指令实现
#include #include #define MAXLINE 1000int getline(char *line, int max);/* find: print lines that match pattern from 1st arg */main(int argc, char *arg...
分类:其他好文   时间:2015-01-22 01:35:56    阅读次数:140
UNIX文件系统接口理解——简版ls -s实
#include #include #include "syscalls.h"#include /* flags for read and write */#include /* typedefs */#include /* structure returned by stat */#incl...
分类:其他好文   时间:2015-01-22 01:37:00    阅读次数:141
XMPP 登录界面搭配
1.拖入一个View视图到界面,再往视图上拖入button等。。拖入view视图的原因 ,可以方便屏幕适配。点击view 适配居中等2.设置按钮背景。把按钮Type类型设置成Custom3..
分类:其他好文   时间:2015-01-22 01:35:40    阅读次数:108
Codility MaxAbsSliceSum Solution
1.题目(HARD)A non-empty zero-indexed array A of N integers is given. A pair of integers (P, Q), such that 0 ≤ P ≤ Q < N, is called asliceof array A. The...
分类:其他好文   时间:2015-01-22 01:38:03    阅读次数:1345
linux学习笔记 ftp命令
ftpserver with sites et up for downloaing filessometimes provides an anonymous ftp account数据传输ftp 192.168.0.128name:(username)password:(user's passwor...
分类:系统相关   时间:2015-01-22 01:37:09    阅读次数:185
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!