上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页
摘要: 在Linux操作系统下搭建Nginx服务器,很多时候会出现不同的错误,在此我们在搭建过程中出现的错误进行一些总结: 主要问题有: 1、防火墙问题 2、缺少gc++ 3、缺少pcre、zlib库 解决办法: yum -y install gcc gc-c++ autoconf automake yum 阅读全文
posted @ 2016-02-29 11:25 北京流浪儿 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 1、 user nobody; worker_processes 4;//一般是CPU的核心数 events{ worker_connections 1024; } http{ upstream mypro { server 182.13.32.12; server 213.11.23.24; } 阅读全文
posted @ 2016-02-26 18:19 北京流浪儿 阅读(1840) 评论(0) 推荐(0) 编辑
摘要: 1、每个人都要能够领取到红包; 2、每个人领取到的红包金额总和=总金额; 3、每个人领取到的红包金额不等,但也不能差的太离谱,不然就没趣味; 4、算法一定要简单,不然对不起腾讯这个招牌; header("Content-Type: text/html;charset=utf-8");//输出不乱码, 阅读全文
posted @ 2016-02-15 15:58 北京流浪儿 阅读(651) 评论(1) 推荐(0) 编辑
摘要: title: Python正则表达式中的re.Sdate: 2014-12-21 09:55:54categories: [Python]tags: [正则表达式,python]--- 在Python的正则表达式中,有一个参数为re.S。它表示多行匹配。看如下代码: import re a = '' 阅读全文
posted @ 2016-01-29 16:00 北京流浪儿 阅读(358) 评论(0) 推荐(0) 编辑
摘要: hive字符串分割函数split(str, regex) - Splits str around occurances that match regexTime taken: 0.769 seconds, Fetched: 1 row(s)返回值为一个数组a.基本用法:例1:split('a,b,c... 阅读全文
posted @ 2016-01-19 12:53 北京流浪儿 阅读(17630) 评论(0) 推荐(0) 编辑
摘要: 一、Python对象要理解这个,首先要理解Python对象:python对象具有三个特性:身份、类型、值。三特性在对象创建时被赋值。只有值可以改变,其他只读。类型本身也是对象。二、Null与None是Python的特殊类型,Null对象或者是None Type,它只有一个值None.它不支持任何运算... 阅读全文
posted @ 2016-01-08 11:35 北京流浪儿 阅读(1664) 评论(0) 推荐(0) 编辑
摘要: #encoding:utf-8import math#向上取整print "math.ceil---"print "math.ceil(2.3) => ", math.ceil(2.3)print "math.ceil(2.6) => ", math.ceil(2.6)#向下取整print "\nm... 阅读全文
posted @ 2015-10-17 08:35 北京流浪儿 阅读(452) 评论(0) 推荐(0) 编辑
摘要: #!/bin/sh#Today=`date +%Y%m%d` YEAR=`echo $1|cut -c 1-4`MONTH=`echo $1|cut -c 5-6`DAY=`echo $1|cut -c 7-8`TIME=$YEAR-$MONTH-$DAY#echo `date -d "$TIME... 阅读全文
posted @ 2015-09-23 18:45 北京流浪儿 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 很多时候,我们在mysql中创建了索引,但是某些查询还是很慢,根本就没有使用到索引!一般来说,可能是某些字段没有创建索引,或者是组合索引中字段的顺序与查询语句中字段的顺序不符。看下面的例子:假设有一张订单表(orders),包含order_id和product_id二个字段。一共有31条数据。符合下... 阅读全文
posted @ 2015-09-22 17:51 北京流浪儿 阅读(485) 评论(0) 推荐(0) 编辑
摘要: 1 #coding=utf-8 2 import sys 3 import MySQLdb 4 5 class TransferMoney(object): 6 def __init__(self,conn): 7 self.conn = conn 8 9 #检... 阅读全文
posted @ 2015-08-30 22:01 北京流浪儿 阅读(5383) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 29 下一页