自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

  • 博客(180)
  • 资源 (1)
  • 收藏
  • 关注

原创 Python多进程共享全局变量

解决Python多进程变量共享问题

2022-10-12 10:45:57 4378

原创 Linux下只允许用户远程scp

本文将介绍在Linux环境下,让用户不能远程登录 只能使用scp命令

2022-09-30 15:44:13 384 1

转载 Scrapy入门教程

创建项目在开始爬取之前,您必须创建一个新的Scrapy项目。进入您打算存储代码的目录中,运行下列命令:scrapy startproject tutorial该命令将会创建包含下列内容的 tutorial 目录:tutorial/ scrapy.cfg tutorial/ __init__.py items.

2015-05-17 11:53:23 158

原创 mysql load data local infile

MySQL中执行Load Data命令,load data local infile '/home/lizhuo/Work/db/device.txt' into table device;出现如下错误:ERROR 1148 (42000): The used command is not allowed with this MySQL version启动时加入--loca

2015-05-15 11:41:28 388

转载 PIL安装记录,freetype搞得蛋疼

PIL是python理想的图片处理module,但是想要良好的支持各种图片,还需要检查一下几步,否则会提示:IOError: decoder jpeg not available之类的。我的环境:Linux mint 11 amd64 / Python2.7第一步:安装zlib pngfreetype   jpeg install zlib (ubuntu

2015-05-13 18:43:40 227

转载 简简单单储存过程——循环一个select结果集

简简单单储存过程——循环一个select结果集MySQLSSHSQL  摘要:本文主要讲解了存储过程的创建、调用、以及游标的使用,相信掌握了游标      会对你有不错的帮助,有不足之处还请指教 导航: 一、存储过程的创建及调用            二 、游标的使用            三、  示例            四、补充 说明:    

2015-05-13 09:35:17 650

转载 Meteor开发框架

Web开发者看过来,Meteor开发框架为你带来下一代高品质实时Web App开发的新模式自1996年至今,网站的工作方式普遍是由服务器端向浏览器传送整个渲染好的 HTML 文件,下载和刷新需要较长的等待时间。在2012年的今天它迎来了新曙光,这套古老的模式将可能一去不复返了。简单说,新的模式是服务器和浏览器初始化之后只进行纯数据的对话,由浏览器决定怎样渲染它来生成 HTML,远程会话变成了本

2015-05-12 20:12:05 277

转载 使用 Meteor 轻松开发实时网站

使用 Meteor 轻松开发实时网站快速实现几乎实时地响应用户交互的数据驱动应用程序由于 Web 无处不在,即便是很小的数据交付延迟都有可能刺激到用户。他们希望数据即时更新。不幸的是,Web 技术无法实现这种实时访问。尽管数据访问正快速标准化为一些对象关系映射 (Object-Relational Mapping, ORM) 模型,但实时通信没有任何类似的解决方案。本文将讨论 Me

2015-05-12 20:11:34 188

转载 使用 Meteor 快速开发 Web 应用程序

使用 Meteor 快速开发 Web 应用程序以破纪录的速度构建响应式 Web 应用程序,从概念到大规模部署借助 Meteor(一个新的 Web 应用程序创建平台),JvaScript 开发人员可轻松、快速地构建具有高度交互和响应的富客户端 Web 应用程序。Meteor 提出了一种新方式来思考 Web 应用程序设计和开发,旨在简化和大大缩短开发周期。Sing Li 抛开大肆的宣传

2015-05-12 19:56:52 420

转载 SELECT INTO 和 INSERT INTO SELECT 两种表复制语句

Insert是T-sql中常用语句,Insert INTO table(field1,field2,...) values(value1,value2,...)这种形式的在应用程序开发中必不可少。但我们在开发、测试过程中,经常会遇到需要表复制的情况,如将一个table1的数据的部分字段复制到table2中,或者将整个table1复制到table2中,这时候我们就要使用SELECT INTO 和 I

2015-05-12 11:29:39 85

转载 Open Source Alternative to MATLAB

MATLAB (matrix laboratory) is a numerical computing environment and fourth-generation programming language. Developed by MathWorks, MATLAB allows matrix manipulations, plotting of functions and data,

2015-05-10 16:09:30 357

转载 Where are mysql-admin and query-browser?

In terminal I run next commands:sudo apt-get install mysql-serversudo apt-get install mysql-adminsudo apt-get install mysql-query-browserWith first command - all ok. But for latest two comman

2015-05-10 11:29:18 91

转载 Python as a statistics workbench

Lots of people use a main tool like Excel or another spreadsheet, SPSS, Stata, or R for their statistics needs. They might turn to some specific package for very special needs, but a lot of things can

2015-05-09 09:59:44 103

转载 MySQL copy/duplicate database

Without local access to the server, is there any way to duplicate/clone a MySQL db (with content and without content) into another without usingmysqldump?I am currently using MySQL 4.0.

2015-05-07 15:48:43 130

转载 Cloud Foundry技术全貌及核心组件分析

历经一年多的发展,Cloud Foundry的架构设计和实现有了众多改进和优化。为了便于大家了解和深入研究首个开源PaaS平台——Cloud Foundry,《程序员》杂志携手Cloud Foundry社区开设了“深入Cloud Foundry”专栏,旨在从架构组成、核心模块功能、源代码分析等角度来全面剖析Cloud Foundry,同时会结合各行业的典型案例来讲解Cloud Foudry在具体应

2015-05-06 11:54:28 178 1

转载 在多台服务器上简单实现Redis的数据主从复制

Redis的主从复制功能非常强大,一个master可以拥有多个slave,而一个slave又可以拥有多个slave,如此下去,形成了强大的多级服务器集群架构。下面我演示下怎样在多台服务器上进行Redis数据主从复制。这里我假设有两台服务器,一台是Windows操作系统(局域网IP:192.168.3.82),一台是Linux操作系统(局域网IP:192.168.3.90),在两个操作系统都安装re

2015-05-05 10:02:18 120

转载 Python Web 框架 Django缓存层 - django-redis-cache

django-redis-cache 是一个开源项目,代码不多,主要功能是提供 Redis 作为 django 缓存层的功能。下面是其用法的简单介绍。使用方法:运行 setup.py 安装 django-redis-cache 扩展按如下方法修改django的设置Django 版本 CACHE_BACKEND = 'redis_cache.cache://:'Dja

2015-05-05 09:39:44 156

转载 用iptables 实现本地端口转发

场景假如你在用 resin 调试一个 Web 程序,需要频繁地重启 resin。这个 Web 程序需要开在 80 端口上,而 Linux 限制 1024 以下的端口必须有 root 权限才能开启。但是你又不愿意在调程序的时候总是开着一个 root 终端。在这种情况下,你可以把 resin 开在默认的 8080 端口上,然后使用 iptables 来实现和真的把服务开在 80 端口上一样的效果。

2015-05-03 18:33:26 158

转载 Setup git server

本文目的用户可以直接通过git命令checkin、chekout代码。通过使用ssh协议,用户不用输入密码,就可以访问git库。例如,为了达到多个用户直接运行git clone/pull/push命令同步git代码库。git clone git@192.168.0.100:~/simple.git软件安装apt-get install sshd git ssh服务器

2015-05-03 13:38:33 143

转载 MySQL 外键约束

-- 创建测试主表. ID 是主键.CREATE TABLE test_main (  id      INT,  value   VARCHAR(10),  PRIMARY KEY(id));-- 创建测试子表.CREATE TABLE test_sub (  id      INT,  main_id INT,  value   VARCHAR(

2015-04-22 10:55:44 87

转载 浅谈MySQL外键

像MySQL这样的关系型数据库管理系统,它们的基础是在数据库的表之间创建关系的能力。通过方便地在不同表中建立记录到记录的联系,RDBMS可以利用不同的方法分析数据,同时保持数据库以系统的方式、最小的冗余进行组织。简单描述:这些关系基本上依靠外键进行管理,在关系中所有表中具有相同含义的字段作为公共部分来连接不同表中的记录。外键可以是一对一的,一个表的记录只能与另一个表的一条记录连接,或者

2015-04-22 10:55:05 73

转载 Wifi Signal Strength Percentage to RSSI dBm

Wifi Signal Strength Percentage to RSSI dBmMicrosoft defines Wifi signal quality in their WLAN_ASSOCIATION_ATTRIBUTES structure as follows:wlanSignalQuality:A percentage value that represent

2015-04-17 17:27:29 363

转载 解决unicodedecodeerror ascii codec can’t decode byte 0xd7 in position 9 ordinal not in range(128)

在Windows平台下,安装python模块时,报如下错误:UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xd7 in position 9: ordinal not in range(128)解决方法:修改mimetypes.py文件,路径位于python的安装路径下的Lib\mimetypes.py文件。在im

2015-04-17 11:21:42 162

转载 Python BDD自动化测试框架初探

1. 什么是BDDBDD全称Behavior Driven Development,译作"行为驱动开发",是基于TDD (Test Driven Development 测试驱动开发)的软件开发过程和方法。BDD可以让项目成员(甚至是不懂编程的)使用自然语言来描述系统功能和场景,从而根据这些描述步骤进行系统自动化的测试。(详见附录4.1)2. 常用BDD框架介绍目前常用的BDD

2015-04-13 14:07:57 361

转载 Nginx + Gunicorn + Django 部署小记

这段时间在用Django开发一个论坛,打算做一个Cocoa开发者社区。这几天在学习如何部署,正好前段时间UCloud送了三个月主机,可以拿来练练手。VPS用的64位的Ubuntu 12.04,折腾两天总算走通了,赶忙记录下来...###apt-get服务器拿到手后第一件事就是更新apt-get,要换源什么的自己搜一大堆。之前因为系统不小心选成了Ubuntu 10.04了,遇到一大堆问题,后

2015-04-13 14:07:08 133

转载 MySQL新建用户,授权,删除用户,修改密码

首先要声明一下:一般情况下,修改MySQL密码,授权,是需要有mysql里的root权限的。注:本操作是在WIN命令提示符下,phpMyAdmin同样适用。    用户:phplamp  用户数据库:phplampDB1.新建用户。//登录MYSQL@>mysql -u root -p@>密码//创建用户mysql> insert into mysql.

2015-04-11 18:14:40 122

转载 使用国内镜像源来加速python pypi包的安装

pipy国内镜像目前有: http://pypi.douban.com/  豆瓣http://pypi.hustunique.com/  华中理工大学http://pypi.sdutlinux.org/  山东理工大学http://pypi.mirrors.ustc.edu.cn/  中国科学技术大学 对于pip这种在线安装的方式来说,很方便,但网络不稳定的话很要命。使

2015-04-09 17:12:22 96

转载 代码自动对齐工具

用source insight 编辑代码时,苦于source insight没有集成的代码格式化工具, GNU的astyle是一个免费的代码格式化工具,能够整理符合c/c++规范 。 我们可以将astyle.exe外挂到SourceInsight中。详细步骤如下: 1:从http://astyle.sourceforge.net 上下载AStyle_2.01_win

2015-04-08 20:10:09 1438

转载 代码自动对齐工具

用source insight 编辑代码时,苦于source insight没有集成的代码格式化工具, GNU的astyle是一个免费的代码格式化工具,能够整理符合c/c++规范 。 我们可以将astyle.exe外挂到SourceInsight中。详细步骤如下: 1:从http://astyle.sourceforge.net 上下载AStyle_2.01_win

2015-04-08 20:09:17 2500

转载 Is TightVNC Really More Tight Than Other VNC Clients?

When it comes to remotely connecting to a desktop PC or a server, most people quickly opt for installing aVNC server. It’s fast, easy to configure, and best of all it’s absolutely free. Once you’ve

2015-03-29 19:26:21 263

转载 Ubuntu上编译安装迅雷XwareDesktop

Ubuntu上编译安装说明本页介绍如何在Ubuntu 14.04及以上的系统上手动编译安装Xware Desktop。    由于迅雷官方没有发布64位版的xware,Xware Desktop的作者无法提供PPA。    如果你对本页的介绍感到繁琐和不方便,请到迅雷固件的官方论坛发帖反映。 要求迅雷提供64位版的xware程序。重要提示如果你要将打包好的文

2015-02-03 22:43:37 464

转载 Top 10 torrent clients for linux

Top 10 torrent clients for linuxTwo years ago I wrote an article about the best 5 torrent clients for linux. In the open-source world, two years means a lot of time. So, here it is an updated and en

2015-02-03 12:11:49 1462

原创 Problem of two linux OS using same swap partition

Problem:Installed fedora and debian on same disk using same swap partition these two days and found it took a long time for fedora to boot up.Got the following prompt from serial console:a sta

2015-02-02 11:25:31 121

转载 Capture the Browser or Tab Closed Event

I was working on a WordPress project which i need to clear thePHP session when the browser or browser tab is closed. AlthoughJavascript provides the window.onbeforeunload event but it will be tr

2015-01-22 09:51:13 196

转载 SimpleSAMLphp Service Provider QuickStart

This guide will describe how to configure simpleSAMLphp as a service provider (SP).1 Configuring the SPThe SP is configured by an entry in config/authsources.php.This is a minimal authsource

2015-01-20 21:20:04 198

转载 SimpleSAMLphp Identity Provider QuickStart

This guide will describe how to configure simpleSAMLphp as an identity provider (IdP).1 Enabling the Identity Provider functionalityThe first that must be done is to enable the identity provid

2015-01-20 20:02:10 302

转载 UNIX tools for exploring object files

The modern art of computer programming combines a special kind of human personality with a special set of tools to produce a rather ghostly product -- software -- that other human beings find useful.

2015-01-20 08:00:14 141

转载 disown Command Examples

I am a new Linux and Unix shell user. How do I Remove or delete jobs from current bash / ksh or POSIX based shell?Job control is nothing but the ability to stop/suspend the execution of processes

2015-01-19 23:26:59 169

转载 UNIX tools for exploring object files

The modern art of computer programming combines a special kind of human personality with a special set of tools to produce a rather ghostly product -- software -- that other human beings find useful.

2015-01-19 23:16:28 190

转载 What Powers Instagram

One of the questions we always get asked at meet-ups and conversations with other engineers is, “what’s your stack?” We thought it would be fun to give a sense of all the systems that power Instagram,

2015-01-19 23:07:56 125

MySQL数据库操作MFC封装类

MySQL数据库操作MFC封装类,增加了事务处理及回滚。在实际项目使用。CSQLConnection封装数据库的连接,CSQLResult封装记录集的操作。

2008-12-19

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除