自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(262)
  • 收藏
  • 关注

转载 守护进程

原文链接:http://blog.csdn.net/lianghe_work/article/details/47659889目录(?)[+]什么是守护进程?守护进程(Daemon Process),也就是通常说的 Daemon 进程(精灵进程),是 Linux 中的后台服务进程。它是一个生存期较长的进程,通常独立于控制终端并且周期性地执行某种任务或等待处理

2017-09-30 14:44:06 479

转载 glog

原文链接:http://www.cnblogs.com/tianyajuanke/archive/2013/02/22/2921850.html一、安装配置1、简介  google 出的一个C++轻量级日志库,支持以下功能:◆ 参数设置,以命令行参数的方式设置标志参数来控制日志记录行为;◆ 严重性分级,根据日志严重性分级记录日志;◆ 可有条件地记录日志信

2017-07-28 16:24:58 784

转载 C++11:深入理解右值引用,move语义和完美转发

原文链接:http://blog.csdn.net/booirror/article/details/45057689乍看起来,move语义使得你可以用廉价的move赋值替代昂贵的copy赋值,完美转发使得你可以将传来的任意参数转发给 其他函数,而右值引用使得move语义和完美转发成为可能。然而,慢慢地你发现这不那么简单,你发现std::move并没有move任何东西,完美转发也并不完

2017-06-06 17:17:02 1588

原创 [leetcode] 398. Random Pick Index

Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array.Note:The array size c

2017-06-06 16:12:34 488

转载 C++ function、bind以及lamda表达式

原文地址:http://blog.csdn.net/augusdi/article/details/11771699本文是C++0x系列的第四篇,主要是内容是C++0x中新增的lambda表达式, function对象和bind机制。之所以把这三块放在一起讲,是因为这三块之间有着非常密切的关系,通过对比学习,加深对这部分内容的理解。在开始之间,首先要讲一个概念,closure(闭包),这个

2017-05-23 16:23:04 487

原创 [leetcode] 406. Queue Reconstruction by Height

Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front of t

2017-05-23 10:59:40 417

原创 [leetcode] 583. Delete Operation for Two Strings

Given two words word1 and word2, find the minimum number of steps required to make word1 and word2 the same, where in each step you can delete one character in either string.Example 1:Input: "

2017-05-19 16:49:37 660

原创 [leetcode] 582. Kill Process

Given n processes, each process has a unique PID (process id) and its PPID (parent process id).Each process only has one parent process, but may have one or more children processes. This is just l

2017-05-16 16:35:00 2182

原创 [leetcode] 500. Keyboard Row

Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.Example 1:Input: ["Hello", "Alaska", "Da

2017-05-12 15:53:57 382

转载 TCP连接探测中的Keepalive和心跳包

原文链接:http://blog.csdn.net/aa2650/article/details/170278451. TCP保活的必要性1) 很多防火墙等对于空闲socket自动关闭2) 对于非正常断开, 服务器并不能检测到. 为了回收资源, 必须提供一种检测机制.2. 导致TCP断连的因素如果网络正常, socket也通过close操作来进行

2017-05-12 11:29:52 403

转载 浅谈tcp_nodelay的作用

今天在用nginx作web缓存的时候,发现在http里加入这样个参数,能有效的提高数据的实时响应性,那就是tcp_nodelay.下面我们来说说tcp_nodelay的原理:       TCP_NODELAY和TCP_CORK基本上控制了包的“Nagle化”,这里我们主要讲TCP_NODELAY.Nagle化在这里的含义是采用Nagle算法把较小的包组装为更大的帧。JohnNagle是Nag

2017-05-12 11:20:23 1037

原创 [leetcode] 87. Scramble String

Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation of s1 = "great": great / \ gr

2017-05-11 16:49:57 389

原创 [leetcode] 390. Elimination Game

There is a list of sorted integers from 1 to n. Starting from left to right, remove the first number and every other number afterward until you reach the end of the list.Repeat the previous step a

2017-05-05 10:27:01 440

原创 [leetcode] 560. Subarray Sum Equals K

Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k.Example 1:Input:nums = [1,1,1], k = 2Output: 2Note:

2017-05-03 10:34:51 4564

原创 [leetcode] 557. Reverse Words in a String III

Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:Input: "Let's take LeetCode contes

2017-04-21 15:30:12 622

转载 GCC常用参数详解

原文链接:http://www.cnblogs.com/zhangsir6/articles/2956798.html简介gcc and g++现在是gnu中最主要和最流行的c & c++编译器 .gcc/g++在执行编译工作的时候,总共需要以下几步:1.预处理,生成.i的文件[预处理器cpp]2.将预处理后的文件不转换成汇编语言,生成文件.s[编译器egcs]3.有汇编变

2017-04-21 09:53:11 534

原创 [leetcode] 330. Patching Array

Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n]inclusive can be formed by the sum of some elements in the array. Ret

2017-04-19 16:46:41 393

原创 [leetcode] 556. Next Greater Element III

Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such positive 32-bit

2017-04-13 17:05:02 1349

原创 [leetcode] 554. Brick Wall

There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. The bricks have the same height but different width. You want to draw a vertical line from the top to the

2017-04-10 17:09:07 1985

原创 [leetcode] 389. Find the Difference

Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was

2017-04-07 15:16:07 370

原创 [leetcode] 525. Contiguous Array

Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1.Example 1:Input: [0,1]Output: 2Explanation: [0, 1] is the longest contiguous subarray with

2017-04-06 10:45:48 512

原创 [leetcode] 537. Complex Number Multiplication

Given two strings representing two complex numbers.You need to return a string representing their multiplication. Note i2 = -1 according to the definition.Example 1:Input: "1+1i", "1+1i"O

2017-03-29 16:10:58 1302

原创 [leetcode] 523. Continuous Subarray Sum

Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of k, that is, sums up t

2017-03-27 16:47:17 2353

原创 [leetcode] 538. Convert BST to Greater Tree

Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all keys greater than the original key in BST.Exam

2017-03-21 16:52:21 434

原创 [leetcode] 543. Diameter of Binary Tree

Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of thelongest path between any two nodes in a tree. This path may or may no

2017-03-20 11:14:59 449

原创 [leetcode] 517. Super Washing Machines

You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty.For each move, you could choose any m (1 ≤ m ≤ n) washing machines, and pass one dress of

2017-03-16 17:01:08 5564 2

原创 [leetcode] 539. Minimum Time Difference

Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list.Example 1:Input: ["23:59","00:00"]Output: 1

2017-03-13 16:26:14 548

原创 [leetcode] 495. Teemo Attacking

In LLP world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poisoning tim

2017-03-09 15:48:29 316

原创 [leetcode] 529. Minesweeper

Let's play the minesweeper game (Wikipedia, online game)!You are given a 2D char matrix representing the game board. 'M' represents an unrevealed mine, 'E' represents an unrevealed empty squar

2017-03-07 16:22:38 787

原创 [leetcode] 520. Detect Capital

Given a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:All letters in t

2017-03-02 11:10:26 544

原创 [leetcode] 530. Minimum Absolute Difference in BST

Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes.Example:Input: 1 \ 3 / 2Output:1Explanation:

2017-03-01 16:19:38 2327

原创 [leetcode] 513. Find Bottom Left Tree Value

Given a binary tree, find the leftmost value in the last row of the tree.Example 1:Input: 2 / \ 1 3Output:1Example 2: Input: 1 / \ 2 3

2017-02-27 17:06:27 453

原创 [leetcode] 508. Most Frequent Subtree Sum

Given the root of a tree, you are asked to find the most frequent subtree sum. The subtree sum of a node is defined as the sum of all the node values formed by the subtree rooted at that node (includi

2017-02-07 16:28:33 1096

原创 [leetcode] 481. Magical String

A magical string S consists of only '1' and '2' and obeys the following rules:The string S is magical because concatenating the number of contiguous occurrences of characters '1' and '2' generates

2017-01-13 17:19:19 710

原创 [leetcode] 482. License Key Formatting

Now you are given a string S, which represents a software license key which we would like to format. The string S is composed of alphanumerical characters and dashes. The dashes split the alphanumeric

2017-01-12 18:07:08 1629

原创 [leetcode] 448. Find All Numbers Disappeared in an Array

Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.

2017-01-06 17:00:26 429

原创 [leetcode] 452. Minimum Number of Arrows to Burst Balloons

There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided input is the start and end coordinates of the horizontal diameter. Since it's horizontal, y-coordin

2017-01-05 16:04:10 443

原创 [leetcode] 473. Matchsticks to Square

Remember the story of Little Match Girl? By now, you know exactly what matchsticks the little match girl has, please find out a way you can make one square by using up all those matchsticks. You shoul

2016-12-29 18:10:13 1234

原创 [leetcode] 451. Sort Characters By Frequency

Given a string, sort it in decreasing order based on the frequency of characters.Example 1:Input:"tree"Output:"eert"Explanation:'e' appears twice while 'r' and 't' both appear once.So 'e

2016-12-26 18:27:47 324

原创 [leetcode] 477. Total Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Now your job is to find the total Hamming distance between all pairs of the giv

2016-12-20 17:43:58 318

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除