<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[小石头 on the road]]></title><description><![CDATA[学如逆水行舟]]></description><link>https://blog.youkuaiyun.com/shenchen8274</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; shenchen8274]]></copyright><item><title><![CDATA[docker-compose部署mongodb集群]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/119759866</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/119759866</guid><author>shenchen8274</author><pubDate>Tue, 17 Aug 2021 16:35:01 +0800</pubDate><description><![CDATA[docker-compose部署mongodb集群

创建keyfile


#!/bin/bash

DATA_PATH=./data
PWD='jdit.com'

function check_directory() {
  if [ ! -d "${DATA_PATH}" ]; then
    echo "directory: ${DATA_PATH} not exists."
  fi
}

function generate_keyfile() {
  mkdir -p "${DATA_PAT]]></description><category></category></item><item><title><![CDATA[python遍历excel表]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/103122636</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/103122636</guid><author>shenchen8274</author><pubDate>Mon, 18 Nov 2019 14:57:54 +0800</pubDate><description><![CDATA[from openpyxl import load_workbook

def printXLSXInfo(self, xlsxFile):
    wb = load_workbook(filename=xlsxFile)
    errCounter = 0
    for x in wb:
      sheet_ranges = wb[x.title]
      for val in ...]]></description><category></category></item><item><title><![CDATA[neo4j数据库全量备份]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/103075952</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/103075952</guid><author>shenchen8274</author><pubDate>Thu, 14 Nov 2019 22:06:14 +0800</pubDate><description><![CDATA[neo4j的全量备份比较简单，找到databases目录，打包graph.db目录即可


$ tar -czf graph.db.tar.gz graph.db

恢复时同样进入到databases目录，删掉之前的graph.db目录，恢复新的数据即可


$ rm -rf graph.db
$ tar -xf graph.db.tar.gz


...]]></description><category></category></item><item><title><![CDATA[python返回多个值的技巧]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/103072415</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/103072415</guid><author>shenchen8274</author><pubDate>Thu, 14 Nov 2019 18:14:07 +0800</pubDate><description><![CDATA[在python中函数返回多个值，主要是利用元组，即return a,b。但有时我们还会想返回一个值来表示该函数是否出错，以及错误是什么？那该怎么处理呢？这里可以借鉴node.js中的思想，即元组的第一个值总是表示错误码，没有错误则返回None。示例如下：


def getJPG(jpgFile):
  result = None
  try:
    text = textract.proc...]]></description><category></category></item><item><title><![CDATA[python 身份证号码有效性验证]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/103070002</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/103070002</guid><author>shenchen8274</author><pubDate>Thu, 14 Nov 2019 16:37:57 +0800</pubDate><description><![CDATA[先声明以下代码不是全部原创，网上找了前辈的一些代码，经过自己的部分加工，有了如下的身份证有效性验证代码：


#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import re

Errors = ['验证通过!', '身份证号码位数不对!', '身份证号码出生日期超出范围或含有非法字符!', '身份证号码校验错误!', '身份证地区非法!', '身...]]></description><category></category></item><item><title><![CDATA[Ubuntu12.04 DNS设置重启后丢失解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8662767</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8662767</guid><author>shenchen8274</author><pubDate>Tue, 12 Mar 2013 11:14:28 +0800</pubDate><description><![CDATA[#sudo vi /etc/network/interfaces 

dns-nameservers 192.168.58.11

#sudo /etc/init.d/networking restart
补充：DNS最好设置在/etc/resolv.conf文件中]]></description><category></category></item><item><title><![CDATA[Can't exec "libtoolize" on Ubuntu]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8647475</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8647475</guid><author>shenchen8274</author><pubDate>Thu, 07 Mar 2013 17:14:12 +0800</pubDate><description><![CDATA[sudo apt-get install aptitude
sudo aptitude install libtool]]></description><category></category></item><item><title><![CDATA[VMWare easy 模式安装Ubuntu 12.04时，停在installing vmware tools，please wait界面，解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8643321</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8643321</guid><author>shenchen8274</author><pubDate>Wed, 06 Mar 2013 17:28:00 +0800</pubDate><description><![CDATA[sudo
 mv /etc/issue.backup /etc/issue


sudo
 mv /etc/rc.local.backup /etc/rc.local


sudo
 mv /opt/vmware-tools-installer/lightdm.conf /etc/init


Then reboot.]]></description><category></category></item><item><title><![CDATA[Linux mount 2T 分区方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8638538</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8638538</guid><author>shenchen8274</author><pubDate>Tue, 05 Mar 2013 16:27:42 +0800</pubDate><description><![CDATA[parted /dev/sdb    将sdb选为要处理的设备
parted>mklabel gpt               将MBR磁盘格式化为GPT
parted>mkpart primary 0% 100%   整个磁盘划分为一个分区
parted>print                     打印当前分区信息
parted>quit

mkfs.ext4 /dev/sdb1
mo]]></description><category></category></item><item><title><![CDATA[svn tree conflicts 解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8613553</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8613553</guid><author>shenchen8274</author><pubDate>Tue, 26 Feb 2013 14:21:27 +0800</pubDate><description><![CDATA[svn resolve --accept working -R XXX。
其中XXX为提示冲突的目录。]]></description><category></category></item><item><title><![CDATA[piwigo简体中文2.4.6安装时出现“服务器连接正常，但是无法连接到数据库”解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8492428</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8492428</guid><author>shenchen8274</author><pubDate>Fri, 11 Jan 2013 10:13:41 +0800</pubDate><description><![CDATA[使用phpadmin创建一个安装时让你填的同名数据库，解决问题。]]></description><category></category></item><item><title><![CDATA[ubuntu svn commit 提示：generic failure，解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8479499</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8479499</guid><author>shenchen8274</author><pubDate>Tue, 08 Jan 2013 09:22:48 +0800</pubDate><description><![CDATA[Try:
~$ hostname
ubuntu


Edit file /etc/hosts
127.0.0.1 ubuntu]]></description><category></category></item><item><title><![CDATA[java插入mysql数据库，遇到中文会出现乱码的解决方案]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8331560</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8331560</guid><author>shenchen8274</author><pubDate>Wed, 19 Dec 2012 14:04:37 +0800</pubDate><description><![CDATA[String url="jdbc:mysql://"+this.host+":"+this.port+"/"+this.dbName+"?user="+this.userName+"&password="+this.password+"&characterEncoding=utf-8";]]></description><category></category></item><item><title><![CDATA[使用数据库自增特性生成全局唯一id]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8270284</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8270284</guid><author>shenchen8274</author><pubDate>Fri, 07 Dec 2012 17:17:23 +0800</pubDate><description><![CDATA[为此增加了一个专门用来生成ID的数据库，这个库中的表结构都很简单，只有一个自增字段id。 当我们要插入新的评论时，我们先在ID库的photo_comments表里插入一条空的记录，以获得一个唯一的评论ID。 当然这些逻辑都已经封装在我们的框架里了，对于开发人员是透明的。
 为什么不用其它方案呢，比如一些支持incr操作的Key-Value数据库。我们还是比较放心把数据放在MySQL里。 另外，我]]></description><category></category></item><item><title><![CDATA[使用hash进行简单的服务器均衡方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/8188726</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/8188726</guid><author>shenchen8274</author><pubDate>Thu, 15 Nov 2012 21:46:57 +0800</pubDate><description><![CDATA[//按照Key值，获取一个服务器ID
intgetServerId(char*key, intserverTotal){
  intc, hash = 0;
  while(c = *key++) {
  hash+= c;
  }
  returnhash % serverTotal;
}
//服务器列表
node[0] => 192.168.0.1:11211
node[1]]></description><category></category></item><item><title><![CDATA[Joomla!中文语言包安装]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/7929476</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/7929476</guid><author>shenchen8274</author><pubDate>Fri, 31 Aug 2012 15:23:35 +0800</pubDate><description><![CDATA[到http://joomlacode.org/gf/project/jtranslation1_6/frs/?action=FrsReleaseBrowse&frs_package_id=5695下载最新的简体中文语言安装包进入扩展管理，上传下载好的安装包(Upload & Install)进入语言管理，将网站前台和后台的默认语言都设为zh-CN大功告成]]></description><category></category></item><item><title><![CDATA[Win7 Chrome 137 错误 解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/7885186</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/7885186</guid><author>shenchen8274</author><pubDate>Mon, 20 Aug 2012 10:10:43 +0800</pubDate><description><![CDATA[1.单击“开始”，运行中输入cmd。


2.然后输入命令 netsh winsock reset。


3.重启计算机。]]></description><category></category></item><item><title><![CDATA[Linux下Eclipse编译时，报recompile with -fPIC错误，解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/7822822</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/7822822</guid><author>shenchen8274</author><pubDate>Thu, 02 Aug 2012 14:35:52 +0800</pubDate><description><![CDATA[今天编译一个包含有sqlite3.c的工程时报告
relocation R_X86_64_32 against `‘。rodata' can not be used when making a shared object; recompile with -fPIC
错误。解决方法是：右键Eclipse工程，propertise->c/c++ build->settings->GCC C Com]]></description><category></category></item><item><title><![CDATA[Linux中文件转码方法(enconv)]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/7822743</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/7822743</guid><author>shenchen8274</author><pubDate>Thu, 02 Aug 2012 14:15:26 +0800</pubDate><description><![CDATA[从windows中拷贝到Linux下，很多中文不能识别，是由于文件编码问题引起的。将拷贝过去的文件转换为UTF-8编码后，就能显示了。
enconv -L zh_CN -x UTF-8 *]]></description><category></category></item><item><title><![CDATA[虚拟机里Linux下误删文件的解决方法]]></title><link>https://blog.youkuaiyun.com/shenchen8274/article/details/7817632</link><guid>https://blog.youkuaiyun.com/shenchen8274/article/details/7817632</guid><author>shenchen8274</author><pubDate>Wed, 01 Aug 2012 11:29:45 +0800</pubDate><description><![CDATA[一次不小心的操作后，导致一个比较重要的CPP文件被误删除了。于是寻找各种恢复工具。TestDisk，photorec，试了个遍，没找到想要的。
最终解决方法是：
1、将虚拟机里的linux系统做个dd镜像
2、镜像拷贝到windows里
3、winhex打开dd镜像，搜索文件中的某个关键词，找到后，导出，解决。
由于Linux是ext4的分区，Encase和SafeAnalyzer都不支]]></description><category></category></item></channel></rss>