Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant...
分类:
其他好文 时间:
2014-10-26 14:25:50
阅读次数:
177
Sort a linked list inO(nlogn) time using constant space complexity.链表排序。要达到nlogn的时间复杂度,能想到归并排序与快速排序。这里采用归并排序: 1 /** 2 * Definition for singly-linked ....
分类:
其他好文 时间:
2014-10-26 10:17:34
阅读次数:
186
JDBCDemo.java:
package com.itheima.jdbc;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import com.itheima.pool.MyPool;
pub...
分类:
数据库 时间:
2014-10-25 21:35:24
阅读次数:
227
关闭 PHP 提示的方法搜索php.ini:error_reporting = E_ALL改为:error_reporting = E_ALL & ~E_NOTICE还有个不是办法的办法就是在每个文件头上加error_reporting(0);虽然不好弄但是可以解决问题。这个比较好用。
分类:
Web程序 时间:
2014-10-24 14:34:48
阅读次数:
149
我们知道, SQL 在执行前, 先要进行解析, 解析后, 生成很多执行计划, 从中进行比较.1. 快速解析也就是我们常说的, 比如利用绑定变量等, SQL 的执行计划直接可以利用 shared pool 中的内容.tkprof sys=no sort=prsela,exeela,fchela发现解....
分类:
其他好文 时间:
2014-10-23 10:40:10
阅读次数:
208
在之前的版本,调整Innodb_Buffer_Pool_size大小必须重启mysql进程才可以生效,如今在MySQL5.7里,可以直接动态设置,方便了很多。这个功能应用的场景:一、机器增加内存,DBA粗心大意忘记调大Innodb_Buffer_Pool_size了二、工作交接,新来的DBA发现前任DBA设置的Innodb_Buffer..
分类:
数据库 时间:
2014-10-23 07:03:20
阅读次数:
273
1. 基本介绍
/dev/random和/dev/urandom是Linux系统中提供的随机伪设备,这两个设备的任务,是提供永不为空的随机字节数据流。很多解密程序与安全应用程序(如SSH Keys,SSL Keys等)需要它们提供的随机数据流。
这两个设备的差异在于:/dev/random的random pool依赖于系统中断,因此在系统的中断数不足时,/dev/random设备...
分类:
其他好文 时间:
2014-10-23 00:02:07
阅读次数:
152
linux系统校正时间cp /etc/localtime /etc/localtime.bakcp /usr/share/zoneinfo/Asia/Shanghai /etc/localtimentpdate pool.ntp.orghwclock --systohc通过ntp服务,自动获取网络时...
分类:
系统相关 时间:
2014-10-22 18:05:54
阅读次数:
209
ngx_palloc.h/* * NGX_MAX_ALLOC_FROM_POOL should be (ngx_pagesize - 1), i.e. 4095 on x86. * On Windows NT it decreases a number of locked pages in a ke...
分类:
其他好文 时间:
2014-10-22 17:58:17
阅读次数:
171
DHCP一.实验目的学习配置DHCP服务器二.实验拓扑三.实验步骤1.为服务器配置DHCP相关配置2.让客户端自动获取四.实验内容DHCPserver<H3C>system-view[H3C]sysnameZJDHCP[ZJDHCP]dhcpenable[ZJDHCP]dhcpserverip-pool1[ZJDHCP-dhcp-pool-1]network1.1.1.10mask255.255.25..
分类:
其他好文 时间:
2014-10-22 16:06:33
阅读次数:
170