CSDN的blog贴代码的 (高亮和折叠还有行号)

1.Windows Live Writer的设置
  1. 安装Windows Live Writer的插件的SyntaxHighlighter。
  2. 更新博客的风格。 你可以更新菜单中的“博客”的风格 - “编辑博客设置...” 和“编辑”选项卡。
2. 如何插入代码
  1. 您可以从侧边栏或菜单栏插入代码。
  2. image 

效果如果下:

1   public   static   ArrayList < HashMap < String,   Object > >   formatContent(String[][]   goods) {
2          
3           ArrayList < HashMap < String,   Object > >   list   =   new   ArrayList < HashMap < String,   Object > > ();
4           HashMap < String,   Object > map   =   new   HashMap < String,   Object > ();
5          
6          
7           for   ( int   i   =   0 ;   i   <   goods . length ;   i + + )   {
8              
9               /* operation   转int */
10             
11              int   operation   =   Integer . parseInt(goods[i][ 0 ]);
12              map . put( " OPERATION " ,   operation);
13             
14              /* tob_code   去空格 */
15                  String   tob_code   =   new   String(goods[i][ 1 ] . replaceAll( " //s+$ " ,   " " ));            
16                  System . out . println( " tob_code:   "   +   tob_code);
17                  map . put( " TOB_CODE " ,   tob_code);
18                 
19                  /* tobname   去空格 */
20                  String   tobname   =   new   String(goods[i][ 2 ] . replaceAll( " //s+$ " ,   " " ));            
21                  System . out . println( " tobname:   "   +   tobname);      
22                  map . put( " TOBNAME " ,   tobname);
23                 
24                  /* simplecode   去空格 */
25                  String   simplecode   =   new   String(goods[i][ 3 ] . replaceAll( " //s+$ " ,   " " ));            
26                  System . out . println( " simplecode:   "   +   simplecode);
27                  map . put( " SIMPLECODE " ,   simplecode);
28                 
29                  /* shortcode   去空格 */
30                  String   shortcode   =   new   String(goods[i][ 4 ] . replaceAll( " //s+$ " ,   " " ));            
31                  System . out . println( " shortcode:   "   +   shortcode);
32                  map . put( " SHORTCODE " ,   shortcode);
33                 
34                 
35                  /* manufacture   去空格 */
36                  String   manufacture   =   new   String(goods[i][ 5 ] . replaceAll( " //s+$ " ,   " " ));            
37                  System . out . println( " manufacture:   "   +   manufacture);
38                  map . put( " MANUFACTURE " ,   manufacture);
39                 
40                  /* unitid */
41                  String   unitid   =   new   String(goods[i][ 6 ] . replaceAll( " //s+$ " ,   " " ));            
42                  System . out . println( " unitid:   "   +   unitid);
43                  map . put( " UNITID " ,   unitid);
44                 
45                  /* unitcode */
46                  String   unitcode   =   new   String(goods[i][ 7 ] . replaceAll( " //s+$ " ,   " " ));            
47                  System . out . println( " unitcode:   "   +   unitcode);
48                  map . put( " UNITCODE " ,   unitcode);
49                 
50                  /* bigunitid */
51                  String   bigunitid   =   new   String(goods[i][ 8 ] . replaceAll( " //s+$ " ,   " " ));            
52                  System . out . println( " bigunitid:   "   +   bigunitid);
53                  map . put( " BIGUNITID " ,   bigunitid);
54                 
55                  /* bigcode */
56                  String   bigcode   =   new   String(goods[i][ 9 ] . replaceAll( " //s+$ " ,   " " ));            
57                  System . out . println( " bigcode:   "   +   bigcode);
58                  map . put( " BIGCODE " ,   bigcode);
59                  /* bigscale     int */
60               
61                  int   bigscale   =   Integer . parseInt(goods[i][ 10 ]);
62                  System . out . println( " bigscale:   "   +   bigscale);
63                  map . put( " BIGSCALE " ,   bigscale);
64                 
65              /*   smalunitid   */
66                  String   smalunitid   =   new   String(goods[i][ 11 ] . replaceAll( " //s+$ " ,   " " ));            
67                  System . out . println( " smalunitid:   "   +   smalunitid);
68                  map . put( " SMALUNITID " ,   smalunitid);
69 
70              /*   smalcode   */
71                  String   smalcode   =   new   String(goods[i][ 12 ] . replaceAll( " //s+$ " ,   " " ));            
72                  System . out . println( " smalcode:   "   +   smalcode);
73                  map . put( " SMALCODE " ,   smalcode);
74 
75              /*   smalscale   转int   */
76                 
77                  int   smalscale   =   Integer . parseInt(goods[i][ 13 ]);
78                  System . out . println( " smalscale:   "   +   smalscale);
79                  map . put( " SMALSCALE " ,   smalscale);
80 
81              /*   inprice   转int */
82                         
83                  int   inprice   =   Integer . parseInt(goods[i][ 14 ]);
84                  System . out . println( " inprice:   "   +   inprice);
85                  map . put( " INPRICE " ,   inprice);
86 
87              /*   outprice   转int */                                
88                  int   outprice   =   Integer . parseInt(goods[i][ 15 ]);
89                  System . out . println( " outprice:   "   +   outprice);
90                  map . put( " OUTPRICE " ,   outprice);
91                 
92              /*   orderunitid   转int */      
93                  int   orderunitid   =   Integer . parseInt(goods[i][ 16 ]);
94                  System . out . println( " orderunitid:   "   +   orderunitid);
95                  map . put( " ORDERUNITID " ,   orderunitid);
96              /*   aclass   */
97                  String   aclass   =   new   String(goods[i][ 17 ] . replaceAll( " //s+$ " ,   " " ));            
98                  System . out . println( " aclass:   "   +   aclass);
99                  map . put( " ACLASS " ,   aclass);
100
101             /*   logo   */
102                 String   logo   =   new   String(goods[i][ 18 ] . replaceAll( " //s+$ " ,   " " ));            
103                 System . out . println( " logo:   "   +   logo);
104                 map . put( " LOGO " ,   logo);
105
106             /*   salespromotion   */
107                 String   salespromotion   =   new   String(goods[i][ 19 ] . replaceAll( " //s+$ " ,   " " ));            
108                 System . out . println( " salespromotion:   "   +   salespromotion);
109                 map . put( " SALESPROMOTION " ,   salespromotion);
110
111             /*   type   转int */    
112                 int   type   =   Integer . parseInt(goods[i][ 20 ]);
113                 System . out . println( " type:   "   +   type);
114                 map . put( " TYPE " ,   type);
115                
116                 list . add(map);
117            
118         }
119        
120    
121        
122        
123        
124        
125         return   list;
126        
127         // HashMap
128     }

 

开源项目:

image

 

 

Project Description

SyntaxHighlighter for Windows Live Writer is a plugin that inserts code with tags for SyntaxHighlighter. This plugin includes resource of ja-JP(Japan language).

Screenshots

Windows Live Writer.png
Insert window:
Code.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值