- 博客(342)
- 收藏
- 关注
原创 417 error for post big data solution
HTTP/1.1 协议里设计 100 (Continue) HTTP 状态码的的目的是,在客户端发送 Request Message 之前,HTTP/1.1 协议允许客户端先判定服务器是否愿意接受客户端发来的消息主体(基于 Request Headers)。 即, Client 和 Server 在 Post (较大)数据之前,允许双方“握手”,如果匹配上了,Cl...
2016-12-29 15:45:59
275
原创 Replace of HTML tag
$str=preg_replace("/\s+/", " ", $str); //过滤多余回车$str=preg_replace("/<[ ]+/si","<",$str); //过滤<__("<"号后面带空格) $str=preg_replace("/<\!--.*?-->/si",&q
2016-11-16 10:06:00
329
原创 Jenkins automatically build when SVN submit
#!/bin/bashfunction svn_commit(){ local ret echo "$svn_msg"|grep 'v1.1.1' &> /dev/null ret=$? if [ $ret -ne 0 ] then echo "提...
2016-11-12 11:49:19
255
原创 how to user static block in Magento
Static Block是Magento提供的非常实用的一种Block类型。通过Static Block,可以让不懂代码的店铺管理员轻易修改网站中的一些动态内容,而不需要修改Magento的核心代码。Magento Static Block的创建相当简单,通过后台CMS->Static Block即可查看或新建Static Block。建立完毕之后,可以在任意的Magento页面添...
2016-11-04 09:33:23
198
原创 How to add new header of Magento page
第一步: 找到 /app/design/frontend/default/default/template/page/html 复制header.phtml为另外一个文件,例如header2.html 第二步: /app/design/frontend/default/default/layout 修改page.xml 你可以直接复制与header有关的Block并且把命题替换成上一步中...
2016-11-04 09:25:29
181
原创 How to show all APIs in Magento
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/htm
2016-09-05 16:25:28
136
原创 Solution of managing magento and other plateform data
现在用Magento来建国内B2C网站的越来越多了,而淘宝是国内电子商务界的老大,这也就带来一种现象就是,使用Magento做独立B2C运营的公司,必然也会在淘宝上开个店。这就带来了一个很现实的问题,如何统一去管理淘宝店和独立官网的数据,比如订单,比如产品数据、库存等。这里分享我所知道的三种方案第一种,开发独立的第三方订单处理系统,通过淘宝api抓淘宝订单,通过Magento的api抓Mage...
2016-08-31 15:02:55
130
原创 how to invoke API using magento
$_SOAP = new SoapClient('http://192.168.1.25/magento/index.php/api/soap/?wsdl'); $sessionId = $_SOAP->login('patrick', '123456'); $orderList = $_SOAP->call($sessionId, 'sal...
2016-08-31 14:54:55
119
原创 Difference of PMP,IPMP,ITPMP,CPMP
现在国外国内项目管理方面的认证还挺多,很多朋友弄不清楚他们之前的区别,下文是关于所有项目经理认证考试和认证体系,现在专门进行一次讲解,希望大家能选取合适自己的认证考试:1.认证主管部门: 认证的主体不同。ipmp和pmp是国际认证体系,ITPMP和cpmp是中国的。权威指数(个人意见)PMP>IPMP>CPMP ,ITPMP。CPMP是劳动职业的认定,而ITPMP是专业行业...
2016-08-31 14:43:10
370
原创 yum upgrade PHP version
yum是CentOS系统自带的用于方便地添加/删除/更新RPM包的工具,它能自动解决包的倚赖性问题。 用yum更新PHP,只需用一条命令就可以搞定: #yum update php 但问题来了,使用此命令后,系统告诉我,没有发现可更新的包。而当前的PHP版本只是5.2.1,PHP官方已经更新到5.2.6了。 经过一番询问,才知道原来CentOS系统的源里PHP仍旧是5.2.1,需要额外的源才能...
2016-08-15 13:17:26
257
原创 PHP export text into Excel can't see normal style as former
function change_excel_br($str){ $new_str =""; if($str){ $p_new_lines = array("\r\n", "\n", "\r","\r\n", "<pre>","</pre>","<br&a
2016-06-14 10:40:11
162
原创 Frontend Basic Rule
通用约定文件与目录命名一律小写, 必须是英文单词或产品名称的拼音, 多个单词用连字符(-)连接. 只能出现英文字母、数字和连字符, 严禁出现中文.该命名规范适用于 html, css, js, swf, php, xml, png, gif, jpg, ico 等前端维护的所有文件类型和相关目录.js 和 css 压缩文件, 统一以 -min 结尾, 比如源码文件为 kissy...
2016-05-06 13:29:58
172
原创 Thinking in PHP
今天也是被突如其来的灵感激发,写一篇PHP相关的感触,也是作为两年多PHP程序员的感触吧。谈到PHP无非就是一些很诙谐的事情,也把被玩坏的PHP这个作为本篇文章的标题。好吧,到这也让今天的文章有些喜感。说了这么多,被玩坏的PHP究竟是什么样呢? 1、PHP是前端语言,JAVA是后台语言。我觉得有几点原因。一是PHP可能比较简单,简单程度和前端语言相似。PHP非常的灵活,便捷。你可能需要的 他都...
2016-04-22 14:20:30
214
原创 How to do scrum in project?
抽空学习了下敏捷开发,觉得跟自己的一些想法不谋而合,如果一个团队能实施scrum,那效率一定非常高,非常适合移动开发,Android,IOS,WM等小team开发一个app。希望对大家也有帮助, 前期可能会觉得有点别扭,但是坚持下来,效果会非常不一样。你会发现,效果高很多,而且规范。 产品backlog是Scrum的核心,也是一切的起源。从根本上说,它就是一个需求...
2016-04-01 16:14:07
246
原创 sonar control code quality
http://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+ScannerSonar 概述Sonar 是一个用于代码质量管理的开放平台。通过插件机制,Sonar 可以集成不同的测试工具,代码分析工具,以及持续集成工具。与 持续集成工具(例如 Hudson/Jenkins 等)不同,Sonar 并不是简单地把不同的代码...
2016-04-01 15:00:44
182
原创 10 ablities of managment
管理者除了专业技能突出之外还需必备十大软技能。1. 突发情况处理能力在工作中,你可能有来自四面八方的突发情况。来自外部的因素可以是:客户是否满意你的产品、服务等,内部:你的团队成员是否会按照你的方向走——特别是在 项目的实施过程中,只要有“人”的存在必然会出现一些分歧等,可最终你需要能够带领团队或者和团队成员一起达到某种程度上的团队一致性,以确保最终实现项 目。2. 谈判技巧一名...
2016-04-01 14:46:45
151
原创 敏捷开发
敏捷开发的解释:“敏捷开发以用户的需求进化为核心,采用迭代、循序渐进的方法进行软件开发。在敏捷开发中,软件项目在构 建初期被切分成多个子项目,各个子项目的成果都经过测试,具备可视、可集成和可运行使用的特征。换言之,就是把一个大项目分为多个相互联系,但也可独立运 行的小项目,并分别完成,在此过程中软件一直处于可使用状态。” 敏捷建模的价值观:沟通,简单,反馈,勇气,谦逊。简单总结一下,敏捷...
2016-03-30 13:26:55
299
原创 summary of useful webservice
常用WEB SERVICE 天气预报Web Service ,数据来源于中国气象局Endpoint : http://www.webxml.com.cn/WebServices/WeatherWebService.asmxDisco : http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?discoWSDL : http...
2016-01-13 15:25:16
167
原创 Replace current src and add the host name using Regx in PHP
<?php $content = ' <img alt="" src="/a.jpg/" /> <img alt="" src="b.jpg" /> <img alt="" src="test.php" /> &
2015-12-11 14:46:49
125
原创 Git Tag Branch
//git setting git help loggit config --global user.name "patrick"git config --global user.email ""git initgit add .查看当前分支的历史状态git show HEAD比较两个版本git diff HEAD VersionID回退版本git reset --hard HEAD^ 回到制定版...
2015-07-20 16:04:40
123
原创 Apache prefork configuration and explaination
(一)prefork模式下(其他模式下不适用),apache需要优化的主要参数: ServerLimit 3000 StartServers 750 MinSpareServers 5 MaxSpareServers 100 MaxClients 3000 MaxRequestsPerChild 10000 首先来看看apache各个参数的意义(引号里引用的是官方文档的描述): (1)Ser...
2015-04-16 14:57:44
94
原创 Apache Optimization
Multi-Processing Module (MPM) implements a hybrid multi-process multi-threaded server。(多进程、多线程)大致有:prefork MPM、worker MPM、BeOS MPM、NetWare MPM、OS/2 MPM、WinNT MPM。 linux及windows下都可以使用命令:“ht...
2015-03-27 16:31:05
117
原创 how to remove speical file in linux
ls -il get the inode idfind ./ -inum inode id -exec rm -rf {} \;
2015-03-11 15:04:45
114
原创 how to replace a file string using sed in linux
1. 已有的命令 格式: sed -i "s/查找字段/替换字段/g" `grep 查找字段 -rl 路径` linux sed 批量替换多个文件中的字符串: (此命令很强大) sed -i "s/oldstring/newstring/g" `grep oldstring -rl yourdir` 解释一下: -i 表示 i...
2015-03-11 14:50:57
239
原创 JS Reg Rules
http://www.jb51.net/article/25313.htm<script> var str_jira = "XXXX-X"; var str_jira_grca = "GRCA-X"; var str_jira_1 = "AAAA-1111w"; var str_jira_grca_1 = "GRCA-111a"; var strP...
2015-01-13 10:15:30
154
原创 how to track where invoke the defined function
var_dump(debug_backtrace());var_dump(debug_print_backtrace());
2015-01-09 09:44:43
108
原创 How to pass varaible from shell to PHP correctly
Sometimes, if you want to want to pass the whole "sentence" whcih with blank from shell script to another script which need to deal with the passed value, you will find that, the words has been expl...
2014-09-29 09:34:39
129
原创 C-Shell “Variable syntax” problem
“Varible syntax” problem cause the shell can't return the value properly. #!/bin/cshset php_path = '/usr/bin/php'$php_path test.php $argvexit $? when you run this shellsystem("test >...
2014-09-16 10:46:25
253
原创 PHP get user infomation from window AD
<?php error_reporting(0); $errorMessage = false; $server = 'ldap://192.168.0.11'; $dn = 'dc=next.com';//'CN=Users,DC=next.com,DC=com'; $bind_user = 'patrick@next.com'; $bind_pass = 't...
2014-09-02 13:38:09
216
原创 some problem of bash shell.
character \015 (carrage return) perl -pi.bak -e "s/\r//g;" fileencode.pl After run this command, the issue will be fixed And also find another problem, if you pass one parameters from ...
2014-09-01 14:56:46
105
原创 Baidu Nice Slider
<!DOCTYPE html><html lang="zh"> <head> <title>极速智能搜索</title> <meta charset="utf-8"> <link href="http://s1.bdstatic.com/r/www/s
2014-08-22 13:22:10
118
原创 PHP CSV Writer
<?php/** * Simple class to properly output CSV data to clients. PHP 5 has a built * in method to do the same for writing to files (fputcsv()), but many times * going right to the client i...
2014-08-15 15:25:55
156
原创 wget can't upload file through HTTPS
When using wget with https, if you get the following error:Could not seed PRNG; consider using --random-file.Disabling SSL due to encountered errors. It means that the udev daemon may be...
2014-08-06 16:23:48
743
原创 how to install git under XP and WIN7
http://www.jeremyskinner.co.uk/2010/07/31/hosting-a-git-server-under-apache-on-windows/http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/
2014-08-02 18:58:13
128
原创 how to count chinese character
<?php$cityname="上海"$pa = '/[\x{4e00}-\x{9fa5}]/siu';preg_match_all($pa, $cityname, $r);$count = count($r[0]);// can't set one wordecho $count;
2014-08-02 12:34:42
145
原创 how to deal with MYSQL DATE
suppose you use timestamp, but you need to get the date SELECT DISTINCT DATE( `LoginDate` ) FROM loginlog SELECT DISTINCT left( `LoginDate` , 10 ) AS LDate FROM loginlog SE...
2014-07-10 13:41:59
95
原创 URL
URL中一些字符的特殊含义,基本编码规则:1、空格换成加号(+) 2、正斜杠(/)分隔目录和子目录 3、问号(?)分隔URL和查询 4、百分号(%)制定特殊字符 5、#号指定书签 6、&号分隔参数转义字符的原因:如果你的表单使用get方法提交,并且提交的参数中有“&”等特殊符的话,如果不做处理,在service端就会将&后面的作为另外一个参数来看待。例如表单的...
2014-07-08 15:21:44
130
原创 how to develop couse using SCORM 1.2
1)运行SCORM APIAdapter。2)调用API初始化函数。3)加载课件SCO初始化数据。4)获取Data Model中的用户ID和用户姓名。5)获取Data Model中cmi.core.lesson_status值,即当前用户对当前SCO的学习状态,包括passed (通过) completed (已完成) browsed (浏览) incomplete (非完成) ...
2014-07-07 11:26:13
163
原创 linux shell useful command
Linux系统通过shell提供了大量方便的工具,如:awk、grep、sort、more、less、tail等等,方便程序员或者从事数据分析的人员对一些小文件的快速分析,掌握好这些工具,可以极大地提高简单数据分析的效率。 工具/原料Linux系统 一、awk常用技巧和方法1文件每行按第二列去重并打印第二列不同的值及出现...
2014-06-18 10:54:32
161
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人