live writer 代码高亮测试
live writer下没有找到满意的代码高亮插件,昨天试剩下两个,对比一下。
第一个插件为 syntaxt heighter,第二个为code snippet,后来补充了一个叫insert code的,
结论是,正好是我介绍顺序,表现依次不如前面,而且支持的语法也是syntaxt最多,以后就用这个吧,
只不过这个插件在live writer里面没有好的预览,但是实际效果很棒,推荐。
1,xml/html
<Directory "${path}/www/pie/sns"> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory> <VirtualHost 127.0.0.3:80> ServerName "u.dxpie.com" DocumentRoot "${path}/www/pie/sns" </VirtualHost>
1: <Directory "${path}/www/pie/sns">
2: Options Indexes FollowSymLinks
3: AllowOverride All
4: Order deny,allow
5: Allow from all
6: </Directory>
7: <VirtualHost 127.0.0.3:80>
8: ServerName "u.dxpie.com"
9: DocumentRoot "${path}/www/pie/sns"
10: </VirtualHost>
2,c#
//根據前置序號找到行索引 private int getPreSeqRowIndex(string pre_seq) { int rowIndex = -1; for (int i = 0; i < gridList.Rows.Count; i++) { string job_seq = ((Label)gridList.Rows[i].FindControl("txtjob_seq")).Text; if (job_seq == pre_seq) { rowIndex = i; break; } } return rowIndex; }
1: //根據前置序號找到行索引
2: private int getPreSeqRowIndex(string pre_seq)
3: {
4: int rowIndex = -1;
5: for (int i = 0; i < gridList.Rows.Count; i++)
6: {
7: string job_seq = ((Label)gridList.Rows[i].FindControl("txtjob_seq")).Text;
8: if (job_seq == pre_seq)
9: {
10: rowIndex = i;
11: break;
12: }
13: }
14: return rowIndex;
15: }
3,js
suycCalendar.prototype.MonthClick = function(n) { if((this.month + n) < 0) { this.month = 11 ; -- this.year ; } else if((this.month + n) >= 12) { this.month = 0 ; ++ this.year ; } else { this.month = this.month + n ; } this.writeString(this.buildString()) ; }
1: suycCalendar.prototype.MonthClick = function(n)
2: {
3: if((this.month + n) < 0)
4: {
5: this.month = 11 ;
6: -- this.year ;
7: }
8: else if((this.month + n) >= 12)
9: {
10: this.month = 0 ;
11: ++ this.year ;
12: }
13: else
14: {
15: this.month = this.month + n ;
16: }
17:
18: this.writeString(this.buildString()) ;
19: }
4,php
case 'register': $tp->show('register'); break; case 'savereg': $tp->show('register'); break; case 'regshop': //最新入驻商家 $shop=$db->SelectS('select company,id from '.table('company').' order by id desc limit 0,10'); $tp->assign("shops",$shop); $tp->show('regshop_jump'); break; case 'regbendi': //最新入驻商家 $shop=$db->SelectS('select company,id from '.table('company').' order by id desc limit 0,10'); $tp->assign("shops",$shop); $tp->show('regshop');
1: case 'register':
2: $tp->show('register');
3: break;
4: case 'savereg':
5: $tp->show('register');
6: break;
7: case 'regshop':
8: //最新入驻商家
9: $shop=$db->SelectS('select company,id from '.table('company').' order by id desc limit 0,10');
10: $tp->assign("shops",$shop);
11: $tp->show('regshop_jump');
12: break;
13: case 'regbendi':
14: //最新入驻商家
15: $shop=$db->SelectS('select company,id from '.table('company').' order by id desc limit 0,10');
16: $tp->assign("shops",$shop);
17: $tp->show('regshop');
5,python
import MySQLdb conn=MySQLdb.connect(host="127.0.0.1",user="root",passwd="mysql",db="demo",charset="utf8") cursor=conn.cursor() name = "jacky2" age=33 sql = "insert into users(name,age) values(%s,%s)" param = (name,age) p2=[('aaaa','11'),('bbbb','22'),('cccc',33),('dddd',None)] p2.append(('eeee',25)) param2=tuple(p2)
第二个插件没有找到python….晕
补充最后一个插件的一些效果
1: //根據前置序號找到行索引
2: private int getPreSeqRowIndex(string pre_seq)
3: {
4: int rowIndex = -1;
5: for (int i = 0; i < gridList.Rows.Count; i++)
6: {
7: string job_seq = ((Label)gridList.Rows[i].FindControl("txtjob_seq")).Text;
8: if (job_seq == pre_seq)
9: {
10: rowIndex = i;
11: break;
12: }
13: }
14: return rowIndex;
15: }
1: suycCalendar.prototype.MonthClick = function(n)
2: {
3: if((this.month + n) < 0)
4: {
5: this.month = 11 ;
6: -- this.year ;
7: }
8: else if((this.month + n) >= 12)
9: {
10: this.month = 0 ;
11: ++ this.year ;
12: }
13: else
14: {
15: this.month = this.month + n ;
16: }
17:
18: this.writeString(this.buildString()) ;
19: }
<Directory "${path}/www/pie/sns">
Options Indexes FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<VirtualHost 127.0.0.3:80>
ServerName "u.dxpie.com"
DocumentRoot "${path}/www/pie/sns"
</VirtualHost>