String replace all:
var str="<>";
str=str.replace(/\'/g,"’");//替换半角单引号为全角单引号
str=str.replace(/\"/g,"”");//替换半角双引号为全角双引号
str=str.replace(/</g,"《").replace(/>/g,"》");
Default conten-type is:
application/json;charset=UTF-8
Need to change it and the data you sent with it:
How can I make angular.js post data as form data instead of a request payload?
AngularJS - Communication Between Controllers & Directive - jsFiddle -
虽然感觉特别搓,但直接按egghead里service方法写,通过input.value的方法改变model值时two way binding竟然不生效,又不会用$watch,最后还是这招解决了。
javascript - check all extensions from a multiple upload file input - Stack Overflow
How to change the Content of a <textarea> with Javascript - Stack Overflow -
For all the downvoters and non-believers.
skeumorphic and flat(Barcelona)
Remove index.php in the URL for Codeigniter:
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /selfcontrol/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#Uncomment one of the following rewrite rules.
#Some servers require the ? after index.php, some don't
#RewriteRule ^(.*)$ index.php?/$1 [NC,L,QSA]
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 index.php
</IfModule>
From: FTP中传输模式:BIN与ASC的差别
.htaccess要用ASCII传。