文件IO操作相关系统编程这里主要说两套IO操作接口,分别是:POSIX标准read|write接口,函数定义在#include<unistd.h>ISOC标准fread|fwrite接口,函数定义在#include<stdio.h>有书上说POSIX标准与ISOC标准的区别在于文件读写是否带缓冲区,我则不是很认同,因此POSI..
分类:
系统相关 时间:
2014-05-27 03:59:28
阅读次数:
481
Sneak Preview: The 14 Leading Java Tools &
Technologies for 2014 :Junit , Jenkinds, Git, Hibernate, Java7, Maven, Nexus,
MongoDB, FindBugs, Tomcat, Ja...
分类:
编程语言 时间:
2014-05-23 08:33:03
阅读次数:
277
【题目】
原文:
2.1 Write code to remove duplicates from an unsorted linked list.
FOLLOW UP
How would you solve this problem if a temporary buffer is not allowed?
译文:
从一个未排序的链表中移除重复的项
...
分类:
其他好文 时间:
2014-05-22 12:04:13
阅读次数:
196
int socketpair(int domain, int type, int protocol, int sockfd[2]); //创建未命名的全双工管道
domain只能为AF_UNIX,也就是限制在本地使用
type可以是SOCK_STREAM或SOCK_DGRAM,SOCK_STREAM相当于创建了双向流管道,管道的每一端都可以write或read,并且两端的数据流...
分类:
其他好文 时间:
2014-05-22 08:47:02
阅读次数:
241
MongoDB的日志增长的很快,/var所在的空间马上就占满了,即便换到另一个磁盘分区保存日志,日志还是增长的很快,磁盘眼看要告磬。有一个好办法,就是使用旋转日志。MongoDB的旋转日志有点怪,Linux下mongd服务接受一个kill -SGIUSR1命令后就立刻将当前日志文件重命名为带日期的文件,然后创建新的日志文件。不想一般的旋转日志,可以配置旋转策略。不过没关系,经过测试,发送该命令时不...
分类:
数据库 时间:
2014-05-22 07:47:22
阅读次数:
427
上一篇我们讲了MongoDB 的命令入门初探,本篇blog将基于上一篇blog所建立的数据库和表完成一个简单的Java MongoDB CRUD Example,利用Java连接MongoDB数据库,并实现创建数据库、获取表、遍历表中的对象、对表中对象进行CRUD操作等例程。
1、下载MongoDB Java 支持驱动包
【gitHub下载地址】https://github.com/mon...
分类:
数据库 时间:
2014-05-22 06:53:47
阅读次数:
401
此架构由8台PC 、2台防火墙、2台24口三层交换机组成,注意点:1)Load
Balance:Haprxoy+keepalived
实现高可用。2)web:Nginx+php-fpm3)DB:mysql5主从+Mongodb副本+Memcached4)IMG:Varnish+Nginx+NFS网卡...
分类:
其他好文 时间:
2014-05-21 22:50:12
阅读次数:
305
【题目】
Write a program to solve a Sudoku puzzle by filling the empty cells.
Empty cells are indicated by the character '.'.
You may assume that there will be only one unique solution.
A sudoku puzzle...
...and its solution numbers marked in red.
...
分类:
其他好文 时间:
2014-05-20 17:07:34
阅读次数:
335
Problem Description
As we know, Big Number is always troublesome. But it's really important in our ACM. And today, your task is to write a program to calculate A mod B.
To make the problem easie...
分类:
其他好文 时间:
2014-05-20 14:42:07
阅读次数:
324
戳我去解题Given two binary trees, write a function to
check if they are equal or not.Two binary trees are considered equal if they are
structurally identic...
分类:
其他好文 时间:
2014-05-20 10:09:37
阅读次数:
201