摘要: 基础 # 初始化仓库 git init # 从工作区添加到暂存区 git add 1.c # 查看当前状态 git status # 暂存区提交到仓库 git commit -m 'add 1.c' # 与远程仓库建立联系 git remote add origin https://git.codi 阅读全文
posted @ 2016-06-22 07:47 Younger 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 批量替换表中某属性值 阅读全文
posted @ 2016-06-03 13:32 Younger 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 方法1.多行控制(css3).text { width: 100%; word-break: break-all; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; ... 阅读全文
posted @ 2015-11-17 05:42 Younger 阅读(442) 评论(0) 推荐(0) 编辑
摘要: function readDeviceOrientation() { if (Math.abs(window.orientation) === 90) { // Landscape alert... 阅读全文
posted @ 2015-09-25 08:01 Younger 阅读(929) 评论(0) 推荐(0) 编辑
摘要: location / { if (!-e $request_filename) { rewrite ^/(.*\.(js|ico|gif|jpg|png|css|bmp|html|xls)$) /$1 last; rewrite ^/(\?\?.*\.(js|css... 阅读全文
posted @ 2014-11-28 19:06 Younger 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 下载http://smarty.net;解压 -> 将 libs 文件夹重命名 smartyLibs -> 放置在自己服务器的 usr/local/lib/ 中 (/usr/local/lib/smartyLibs);在网站目录,如 site_A 中 创建 4 个必须文件夹 templates、te... 阅读全文
posted @ 2014-11-24 15:49 Younger 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: 1、Vim打开Nginx配置文件vim /usr/local/nginx/conf/nginx.conf2、找到如下一段,进行修改gzip on;gzip_min_length 1k;gzip_buffers 4 16k;#gzip_http_version 1.0;gzip_comp_level ... 阅读全文
posted @ 2014-11-23 16:25 Younger 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 宋体: SimSun黑体: SimHei华文细黑: STHeiti Light [STXihei]华文黑体: STHeiti微软雅黑: Microsoft YaHei微软正黑体: Microsoft JhengHei新宋体: NSimSun新细明体: PMingLiU仿宋: FangSong楷体: ... 阅读全文
posted @ 2014-11-21 16:36 Younger 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 获取 多选项的value/*获取checkbox的全部选中项使用方法:FUNC_getCheckeds($('tr td').find('input[type=checkbox]'));*/function FUNC_getCheckeds(_target){ var _checkedArr... 阅读全文
posted @ 2014-11-14 11:40 Younger 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1.yum 安装 nginxrpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpmyum info nginxyum install niginxservi... 阅读全文
posted @ 2014-07-29 16:01 Younger 阅读(303) 评论(0) 推荐(0) 编辑
摘要: MYSQL (create database site_a;)创建数据库site_a后的操作:为您的 MySQL 数据库创建用户和密码CREATE USER 'wordpress-user'@'localhost' IDENTIFIED BY 'your_strong_password';对您之前创... 阅读全文
posted @ 2014-06-17 15:58 Younger 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Nginx支持伪静态(在 nginx.conf 中 修改如下)参考链接location / { index index.html index.php; if (-d $request_filename){ rewrite ^/(.*)([^/... 阅读全文
posted @ 2014-05-19 14:07 Younger 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 批量替换表中的字符/*update 表名 set 字段名=replace(字段名,'原来的内容','替换后的内容')*/update wp_msong_posts set post_content=replace(post_content,'id="c_names"','class="c_names... 阅读全文
posted @ 2014-05-11 14:47 Younger 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 获取最后一个字符str = "1234567";last = str.replace(/^(.*[n])*.*(.|n)$/g, "$2");console.log(last);-->"7"1~500之间的整数/^([1-4]\d{0,2}|500)$/匹配 ][aa] ][bb]str.match... 阅读全文
posted @ 2014-03-04 15:26 Younger 阅读(188) 评论(1) 推荐(1) 编辑
摘要: /*firefox*/@-moz-document url-prefix(){.mainNews div.l ul{padding-bottom:12px}}/*ie6*/{_padding:2px;}/*ie7*/{*padding:4px;}/*ie10*/@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { /* IE10-specific styles go here */}/*参考连接:http://www.css88.com/archives/5273*/.a{ /* 1. */ ... 阅读全文
posted @ 2013-12-25 23:05 Younger 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 禁止input自动完成下拉//ie:autocomplete="off" //ff:disableautocomplete 阅读全文
posted @ 2013-12-24 13:29 Younger 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1,root 切换sudo su2,安装brewcurl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local注意:要使用root身份在 /usr 下建立 local 目录使用brew可以安装其他命令行,如 brew install wget / brew install nodejs / ...3,批量删除某个后缀名的所有文件rm -rf `find . -name '*.modd'` 阅读全文
posted @ 2013-12-05 09:50 Younger 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 用 标签包起来,里面的所有文字会原样显示出来12输出:12 阅读全文
posted @ 2013-10-17 10:24 Younger 阅读(5116) 评论(0) 推荐(0) 编辑
摘要: if () {} else {} ——使用三元操作符/省略大括号{}if(foo){ funcA();}else{ funcB();}foo?funcA():funcB();if(!foo){ funcA();}else{ funcB();}foo?funcB():funcA();if(foo){ return funcA();}else{ return funcB();}return foo?funcA():funcB();if(foo){ return funcA()}else{ funcB()}{if(foo)return funcA();... 阅读全文
posted @ 2013-09-10 17:14 Younger 阅读(3305) 评论(0) 推荐(0) 编辑
摘要: 实时监听输入框值变化首先创建Jquery.fn扩展jQuery.fn.extend({ inputChange: function(callback){ if($.support.leadingWhitespace){ //if($.browser.msie){ this.bind('propertychange', function(e){ if(e.originalEvent.propertyName == 'value'){ $(this).keyup(); ... 阅读全文
posted @ 2013-08-23 14:25 Younger 阅读(241) 评论(0) 推荐(0) 编辑