prettyprint换行、添加行号、预处理需要高亮显示的代码

需要的文件有:jquery,prettify 需要编写wordpress插件,其主要的代码如下: function prettyCode($text){ // pretty codea // 1 2 3 4 5 // (<(pre|code)[\W]?class="prettyprint(.*?)>)(.*?)(<\/(pre|code)>) $pattern = '/(<(pre|code)[\W]?class="prettyprint(.*?)>)(.*?)(<\/(pre|code)>)/s'; if(preg_match_all($pattern,$text,$out,PREG_PATTERN_ORDER)){ for($i=0; $i<count($out[0]); $i++){ $match_old=$out[4][$i]; $match_content=str_replace("<","<",$match_old); $text=str_replace($match_old, $match_content, $text); } $text.=' <...  more

Android SDK2.1等开发资源地址

If you are already using the Android SDK and would like to update to the latest tools or platforms, please use the Android SDK and AVD Manager to get the components, rather than downloading a new SDK package. Platform Package Size MD5 Checksum Windows android-sdk_r05-windows.zip 23449838 bytes cc2c51a24e2f876e0fa652e182ef5840 Mac OS X (intel) android-sdk_r05-mac_86.zip 19871714 bytes 6fcfeed0e1c36624c926551637eb3308 Linux (i386) android-sdk_r05-linux_86.tgz 16208523 bytes 1d695d6a31310406f5d49092a1bd9850 Platform Package Size MD5 Checksum Windows android-ndk-r3-windows.zip ...  more

Android更新太奇妙了

今天升级android的sdk,极为费劲,android机器人被河蟹夹了,唉,没有办法还找的代理,才勉强把更新包下下来,然后执行老报错,提示我什么tools目录无法改名为tools\ToolPackage.old01,本来以为是杀毒软件的问题,关了之后还那样,最后我拿出了绝招,他不能改,我给改,我把tools目录备了个份,然后把tools\ToolPackage.new01目录拷贝一个改名为tools,重新启动SDK Setup,呵呵,居然更新成功。 Android的开发者的网站是打不开的,通过一个日本的vpn勉强连上,不过速度巨慢,几k每秒,没有办法。找到下载地址,用下载软件慢慢的下吧。   more