-
Nginx应用简介
nginx的优势nginx与apache的异同nginx 和 apache一样,都是http服务器软件,在功能实现上都是采用模块化结构设计,都支持通用的语言接口,如php、perl、python等,同时还支持正向和反向代理、虚拟主机、URL重写、压缩传输、ssl加密传输等。它们之间最大的差别是apache的处理速度很慢,且占用很多内存资源,而nginx却恰恰相反:在功能实现上,apache的所有模块都支持动、静态编译,而nginx模块都是静态编译的,同时,apache对fcgi的支持不好,...…
-
Nginx配置文件简介
Nginx的全局配置下面这段内容是对Nginx的全局属性配置,代码如下:user nobody nobody;worker_processes 4;error_log logs/error.log notice;pid logs/nginx.pid;worker_rlimit_nofile 65535;events{ use epoll; worker_connections 65536;}上面这段代码中每个配置选项的含义解释如下: user是个主模块指令,指定Nginx worke...…
-
[LeetCode]Palindrome Number
Problem DescriptionPalindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinking of converting the integer to string, note the restriction ...…
-
[LeetCode]Two Sum
Problem DescriptionTwo SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the same element twice.Example:G...…
-
[LeetCode]Reverse Integer
Problem DescriptionReverse IntegerGiven a 32-bit signed integer, reverse digits of an integer.Example 1:Input: 123Output: 321Example 2:Input: -123Output: -321Example 3:Input: 120Output: 21Note:Assume we are dealing with an environment which could...…
-
Linux进程优先级
进程优先级和“nice”概念Linux进程调度和多任务现代计算机系统中既包含每次只能执行一个指令的低端处理器,也包含高性能超级计算机,这些超级计算机每台配备数百个CPU,每个CPU上具有多个核心,它们可以并行执行数以百计的指令。但是所有这些系统往往具有一个共同点:它们需要运行的进程数量总是超出了实际具有的核心数。通过使用称为时间片的技术,Linux(和其他操作系统)实际能够运行的进程数(和线程数)可以超出可用的实际处理单元数。操作系统进程调度程序将在单个核心上的进程之间快速切换,从而给用户...…
-
[LeetCode]Smallest Good Base
Problem DescriptionSmallest Good BaseFor an integer n, we call k>=2 a good base of n, if all digits of n base k are 1. Now given a string representing n, you should return the smallest good base of n in string format.Example 1:Input: “13” Outpu...…