Python

@requires_authorization
def somefunc(param1='', param2=0):
r'''A docstring'''
if param1 > param2: # interesting
print 'Gre\'ater'
return (param2 - param1 + 1 + 0b10l) or None class SomeClass:
pass
# note
>>> message = '''interpreter
... prompt'''

SQL

BEGIN;
CREATE TABLE "topic" (
-- This is the greatest table of all time
"id" serial NOT NULL PRIMARY KEY,
"forum_id" integer NOT NULL,
"subject" varchar(255) NOT NULL -- Because nobody likes an empty subject
);
ALTER TABLE "topic" ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id") REFERENCES "forum" ("id");
-- Initials
insert into "topic" ("forum_id", "subject") values (2, 'D''artagnian'); /*
-- this line lacks ; at the end to allow people to be sloppy and omit it in one-liners
*/
COMMIT

Ruby

class A < B; def self.create(object = User) object end end
class Zebra; def inspect; "X#{2 + self.object_id}" end end module ABC::DEF
include Comparable # @param test
# @return [String] nothing
def foo(test)
Thread.new do |blockvar|
ABC::DEF.reverse(:a_symbol, :'a symbol', :<=>, 'test' + ?\012)
answer = valid?4 && valid?CONST && ?A && ?A.ord
end.join
end def [](index) self[index] end
def ==(other) other == self end
end class Car < ActiveRecord::Base
has_many :wheels, class_name: 'Wheel', foreign_key: 'car_id'
scope :available, -> { where(available: true) }
end hash = {1 => 'one', 2 => 'two'} 2.0.0p0 :001 > ['some']
=> ["some"]

HTML, XML

<?xml version="1.0"?>
<response value="ok" xml:lang="en">
<text>Ok</text>
<comment html_allowed="true"/>
<ns1:description><![CDATA[
CDATA is <not> magical.
]]></ns1:description>
<a></a> <a/>
</response> <!DOCTYPE html>
<title>Title</title> <style>body {width: 500px;}</style> <script type="application/javascript">
function $init() {return true;}
</script> <body>
<p checked class="title" id='title'>Title</p>
<!-- here goes the rest of the page -->
</body>

Syntax highlighting in fenced code blocks的更多相关文章

  1. [VSCode] Adding Custom Syntax Highlighting to a Theme in VSCode

    VSCode Themes are a quick way to update the color scheme and syntax highlighting of your code, but y ...

  2. code::blocks的快捷键汇总

      编辑部分: Ctrl + A:全选 Ctrl + C:复制 Ctrl + X: 剪切 Ctrl + V:粘贴 Ctrl + Z:撤销 Ctrl + S:保存 Ctrl + Y / Ctrl + S ...

  3. code blocks 快捷键

    设置快捷键可以在setting-Editor-keyboard shortcuts里设置 ==日常编辑== • 按住Ctrl滚滚轮,代码的字体会随你心意变大变小.• 在编辑区按住右键可拖动代码,省去拉 ...

  4. Code::Blocks 配置

    需要另外下载安装GCC编译器 配置主题皮肤: 先替换' default.conf ' (需要关闭code::blocks) Settings>Editor>(左栏)Syntax highl ...

  5. Code::Blocks代码自动提示设置及常用快捷键

    Code::Blocks代码自动提示设置及常用快捷键(适用windows和linux) 1)以下需要设置的地方均在Settings->Editor...弹出的对话框中. 2)不少命令都可针对当前 ...

  6. Code::Blocks项目配置基础

    File 菜单 New :新建( Empty file/file . class . project . build target ) . Recent projects/files :近期打开的项目 ...

  7. PGI Compiler for OpenACC Output Syntax Highlighting

    PGI Compiler for OpenACC Output Syntax Highlighting When use the PGI compiler to compile codes with ...

  8. How to turn on syntax highlighting in osx

    put follow code in ~/.vimrc set ai " auto indenting set history=100 " keep 100 lines of hi ...

  9. 从Script到Code Blocks、Code Behind到MVC、MVP、MVVM

    刚过去的周五(3-14)例行地主持了技术会议,主题正好是<UI层的设计模式——从Script.Code Behind到MVC.MVP.MVVM>,是前一天晚上才定的,中午花了半小时准备了下 ...

随机推荐

  1. MyBatis - MyBatis Generator 生成的example 如何使用 and or 简单混合查询

    简单介绍: Criteria,包含一个Cretiron的集合,每一个Criteria对象内包含的Cretiron之间是由AND连接的,是逻辑与的关系. oredCriteria,Example内有一个 ...

  2. jQuery基础知识准备

    一. 代码风格在jQuery程序中,不管是页面元素的选择.内置的功能函数,都是美元符号"$"来起始的.而这个"$"就是jQuery当中最重要且独有的对象:jQu ...

  3. https

    http://www.cnblogs.com/bugly/p/5075909.html# http://www.cnblogs.com/peijian708/archive/2011/05/07/20 ...

  4. Useful links

    Better JavaScript with ES6 Pt.IPopular Features pt.II A Deep Dive into Classes pt.III Cool Collectio ...

  5. Leetcode jump Game

    Given an array of non-negative integers, you are initially positioned at the first index of the arra ...

  6. style

    设计的默认单位为px; 为了简化设计,都是以750px为基本单位设计的,如果屏幕大小不同,它会根据屏幕大小自动缩放. 它的样式选择和CSS非常类似,但是和CSS选择器不同的是,它只支持单级选择,不支持 ...

  7. 使用 yum 安装 virtualbox 虚拟机

    我的环境是centos7,所以也可以说是在centos7下使用yum安装virtualbox,不过对于其他的LINUX发行版方法都一样. 下面的操作都是在命令行中进行的. 1.首先需要配置yum的源. ...

  8. doT.js详细介绍

    doT.js详细介绍   doT.js特点是快,小,无依赖其他插件. 官网:http://olado.github.iodoT.js详细使用介绍 使用方法:{{= }} for interpolati ...

  9. phpcms无刷新分页

    控制器添加一个函数: 添加一个静态页面ajax_message.html,在页面中添加如下代码: 在要分页的页面(我的是"show"页面)中添加如上图代码: phpcms无刷新分页 ...

  10. JavaScript如何使用this

    学习this的使用必须牢记以下两点 1.this是一个只能在函数内部使用的关键字 2.this指向调用函数的那个对象 下面我们来具体讨论一下this的具体使用方法 第一种:通过函数调用的方式----- ...