1、注意:在同步之前一定要进行授权操作给从服务器grant all slave on *.* touser@192.168.1.2identified by 'pass'查看binlogshow master status;清除binlogreset master;2、一般主服务器进行 增、删、改,...
分类:
数据库 时间:
2015-05-22 00:15:11
阅读次数:
159
#!/bin/sh#File:/data/backup/dhdatabak.sh#Writeby:sandy#LastModify:2013-09-11#DatabaseinfoDB_NAME="osite"DB_USER="user"DB_PASS="pwd"#OthersvarsBCK_DIR="/data/backup/dhdata"DATE=`date"+%Y%m%d-%H_%M"`DAYS=30LOGFILE=/data/backup/logs/dhbackup.log#TODOmysqldump-..
分类:
数据库 时间:
2015-05-20 15:02:51
阅读次数:
393
Reverse a linked list from position m to n. Do it in-place and in one-pass. For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->...
分类:
编程语言 时间:
2015-05-20 11:10:04
阅读次数:
280
题意:
给一些平行于x轴的墙,求最少去掉多少墙使得x轴上每点穿过不超过k面墙。
分析:
一开始还以为是重复覆盖问题(取最少的行使每列至少一个1),其实这题是可以用贪心解的(类似取最多的行使每列至多k个1)。
代码:
//poj 1230
//sep9
#include
using namespace std;
const int maxN=128;
int n,max_k,maxx,m...
分类:
其他好文 时间:
2015-05-19 19:06:58
阅读次数:
93
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2015-05-18 16:08:31
阅读次数:
139
ReverseLinkedListIITotalAccepted:39279TotalSubmissions:150148MySubmissionsQuestionSolutionReversealinkedlistfrompositionmton.Doitin-placeandinone-pass.Forexample:Given1->2->3->4->5->NULL,m=2andn=4,return1->4->3->2->5->NULL.Note..
分类:
其他好文 时间:
2015-05-17 18:53:58
阅读次数:
96
方法一:public void uploadFile(){ String name=URLEncoder.encode(text1.getText().toString(),"utf-8"); String pass=URLEncoder.encode(t...
分类:
移动开发 时间:
2015-05-16 21:47:34
阅读次数:
147
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:
Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:
Given m, n satisfy the following co...
分类:
其他好文 时间:
2015-05-16 18:26:43
阅读次数:
99
前言前面讲到只是爬取了title和url,那么怎么爬取文章,其实原理是一样的。过程保存文章内容的Item我们在item.py中添加一项,如下:class CsdnArticleItem(Item):
title = Field()
article = Field()
pass我们保存文章的题目和内容。分析文章的链接csdn是怎么来保存一篇文章的,我们来看一个url:
htt...
分类:
其他好文 时间:
2015-05-16 16:39:53
阅读次数:
138
一、安装系统
虚拟软件 : VMware workstation 10
系统: Centos 6.4 32bit
Master IP : 192.168.56.131
Slave IP : 192.168.56.132
User & pass: hadoop
注:一台充当master(namenode),一台充当slave(datanode)。这是最小...
分类:
其他好文 时间:
2015-05-15 19:57:42
阅读次数:
128