oracle 微信公眾號,關于微信公眾號貼代碼的方法

db1bdc170128?from=singlemessage

微信公眾號碼上貼代碼一直一來都是個頭疼的問題。吐槽一句:要是后臺編輯器支持markdown就好了。

今天教大家用在線markdown排版工具,把代碼完美貼到微信公眾號上。

長話短說,今天用到的兩個工具:

首先,以一段代碼為例。假如我們現在要把下面JAVA代碼放到微信公眾號上。

public class OracleJdbcTest

{

String driverClass = "oracle.jdbc.driver.OracleDriver";

Connection con;

public void init(FileInputStream fs) throws ClassNotFoundException, SQLException, FileNotFoundException, IOException

{

Properties props = new Properties();

props.load(fs);

String url = props.getProperty("db.url");

String userName = props.getProperty("db.user");

String password = props.getProperty("db.password");

Class.forName(driverClass);

con=DriverManager.getConnection(url, userName, password);

}

public void fetch() throws SQLException, IOException

{

PreparedStatement ps = con.prepareStatement("select SYSDATE from dual");

ResultSet rs = ps.executeQuery();

while (rs.next())

{

// do the thing you do

}

rs.close();

ps.close();

}

public static void main(String[] args)

{

OracleJdbcTest test = new OracleJdbcTest();

test.init();

test.fetch();

}

}

按照以往的做法……截圖……截圖……截圖……當代碼量大的時候。可謂是勞神傷神。

好了,現在我們介紹一種新的辦法。隨便打開上面兩個網址中的一個。以 Md2All :http://md.aclickall.com/ 為例。打開以后是這樣子:

db1bdc170128?from=singlemessage

左邊部分可以編輯,我們直接Ctrl + A 全選然后清空(當然你有興趣也可以看完它)。這下簡潔多了。

db1bdc170128?from=singlemessage

然后我們剛剛要貼的代碼是java代碼,在左邊這樣輸入,記得在代碼塊前加點文字,至于原因,待會說。

db1bdc170128?from=singlemessage

要精確指定語言(如:java,cpp,css,xml,javascript,python,php,go,kotlin,lua,objectivec等等)時,在頭部直接指定,如:```javascript, 然后尾部再用```結束。

然后弄成下面的樣子

db1bdc170128?from=singlemessage

點擊右上角的復制

db1bdc170128?from=singlemessage

然后右鍵復制。到我們微信公眾號的后臺粘貼。

db1bdc170128?from=singlemessage

這樣就ok啦。。。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/541750.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/541750.shtml
英文地址,請注明出處:http://en.pswp.cn/news/541750.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

計算理論 形式語言與自動機_下推式自動機(PDA)| 計算理論

計算理論 形式語言與自動機Pushdown Automaton (PDA) is a kind of Automaton which comes under the theory of Computation that appoints stack. The word Pushdown stands due to the fact that the stack can be pushed down as operations can only work on the elements…

運維人員究竟如何提升價值,持續獲得高薪?

作者簡介:老男孩,北京老男孩IT教育創始人,17年IT經驗,資深Linux實戰專家,IT培訓界實戰派頂尖大師,國內將實戰心理學體系大量注入IT運維培訓領域的第一人,多本IT暢銷圖書作者,51CTO金…

Webservice soap wsdl區別之個人見解

Web Service實現業務訴求:Web Service是真正“辦事”的那個,提供一種辦事接口的統稱。WSDL提供“能辦的事的文檔說明”:對要提供的服務的一種描述格式。我想幫你的忙,但是我要告訴你我都能干什么,以及干這些事情需要的…

java uuid靜態方法_Java UUID nameUUIDFromBytes()方法及示例

java uuid靜態方法UUID類名UUIDFromBytes()方法 (UUID Class nameUUIDFromBytes() method) nameUUIDFromBytes() method is available in java.util package. java.util包中提供了nameUUIDFromBytes()方法 。 nameUUIDFromBytes() method is used to get a UUID constructed fr…

清空 linux 服務器,Linux服務器清理

Why?廢話不多說直接來圖,可以看出磁盤已經快要滿了未清之前What?可以看出mnt文件夾占用的最大,然后進入mnt目錄里通過命令,根據文件大小對該路徑下文件排序du -h --max-depth1我們服務器出現磁盤快滿了的原因是因為,服務器部署了多個tomcat…

Git中的AutoCRLF與SafeCRLF換行符問題

2019獨角獸企業重金招聘Python工程師標準>>> 原文:http://www.cnblogs.com/flying_bat/archive/2013/09/16/3324769.html 最近在使用GitHub,發現不時沒有修改過的文件要提交,對比發現文件全部修改,但找不到不一樣的地方…

stringwriter_Java StringWriter getBuffer()方法與示例

stringwriterStringWriter類的getBuffer()方法 (StringWriter Class getBuffer() method) getBuffer() method is available in java.io package. getBuffer()方法在java.io包中可用。 getBuffer() method is used to get the StringBuffer that holds the present buffer valu…

linux 下郵件服務器,Linux 下搭建Postfix郵件服務器

Linux 下搭建Postfix郵件服務器詳解:1、首先關閉sendmail服務service sendmail stop2、chkconfig sendmail off(關閉開機自啟動)3、修改DNS正解文件,使DNS能夠解析郵箱服務添加下面兩行mail.zhubf.com. IN A 172.17.17.2zhubf.com. IN M…

Java PipedInputStream close()方法與示例

PipedInputStream類close()方法 (PipedInputStream Class close() method) close() method is available in java.io package. close()方法在java.io包中可用。 close() method is used to close this PipedInputStream and free all system resources linked with this stream…

Coreseek Windows下安裝調試

由于項目需要全文檢索,后面就去網上查了下資料,找到了Sphinx【中文是獅身人面像】這個全文檢索引擎,聽說挺好用的,不過沒有中文分詞。后面又去找了一下,找到了Coreseek,一款中文全文檢索/搜索軟件。 一、Sp…

linux sudo命令全稱,linux sudo命令的概念與使用

1.sudo介紹本文引用地址:http://www.eepw.com.cn/article/201610/305498.htmsudo是linux下常用的允許普通用戶使用超級用戶權限的工具,允許系統管理員讓普通用戶執行一些或者全部的root命令,如halt,reboot,su等等。這樣…

java 方法 示例_Java語言環境getISOCountries()方法與示例

java 方法 示例區域設置類getISOCountries()方法 (Locale Class getISOCountries() method) getISOCountries() method is available in java.util package. getISOCountries()方法在java.util包中可用。 getISOCountries() method is used to return an array of string that …

android shape.xml 屬性詳解

轉載源:http://blog.csdn.net/harvic880925/article/details/41850723 一、簡單使用 剛開始,就先不講一堆標簽的意義及用法,先簡單看看shape標簽怎么用。 1、新建shape文件 首先在res/drawable文件夾下,新建一個文件,命名為&#…

linux檢查防火墻是否阻擋端口,淺析linux查看防火墻狀態和對外開放的端口狀態...

1.查看防火墻狀態查看防火墻狀態 systemctl status firewalld開啟防火墻 systemctl start firewalld關閉防火墻 systemctl stop firewalld開啟防火墻 service firewalld start若遇到無法開啟先用:systemctl unmask firewalld.service然后:systemctl star…

Java類class getClasses()方法及示例

類的類getClasses()方法 (Class class getClasses() method) getClasses() method is available in java.lang package. getClasses()方法在java.lang包中可用。 getClasses() method is used to return an array that contains Class objects denoting all the public classes…

linux內核計數函數,linux中的內核引用計數器

linux中的內核引用計數器文檔 /Documentation/kref.txt翻譯。krefs能讓你往你的對象中添加一個引用計數器。如果你有一些需要在多處被使用和傳遞的對象,而你并沒有給這些對象中添加引用計數器的話,你的代碼肯定會有某些缺陷,會出現一些問題。…

jQuery常用的全局方法源碼

下面常用方法的詳細使用請查看:http://www.cnblogs.com/moqiutao/p/4775725.html 1.$.noConflict()方法 語法:jQuery.noConflict(removeAll) removeAll:布爾值。指示是否允許徹底將 jQuery 變量還原。 源碼: var// Map over jQuer…

isinstance_Java類class isInstance()方法及示例

isinstance類class isInstance()方法 (Class class isInstance() method) isInstance() method is available in java.lang package. isInstance()方法在java.lang包中可用。 isInstance() method is used to check whether the given object is an instance with the object d…

Linux比較大文件內容,Linux系統最大文件打開數優化,解決Too many open files報錯

這是一個Linux系統常見的故障,網絡上也能輕易的找到解決辦法,我也只是在工作中遇到了這個問題,所以在博客記錄下,以備不時之需。一、報錯截圖:圖為resin的報錯日志,很明顯提示了Too many open files&#x…

java日歷類add方法_Java日歷computeFields()方法及示例

java日歷類add方法日歷類的computeFields()方法 (Calendar Class computeFields() method) computeFields() method is available in java.util package. 在java.util包中提供了validateFields()方法 。 computeFields() method is used to convert current ms(milliseconds) t…