E2:29.39FSH:4.34惩戒骑属性重铸PR

百度拇指医生
&&&普通咨询
您的网络环境存在异常,
请输入验证码
验证码输入错误,请重新输入贝多芬:弦乐四重奏全集 - 歌单 - 网易云音乐
贝多芬:弦乐四重奏全集
四重奏是由两架小提琴、一架中提琴和一架大提琴构成的演奏组合,也是室内乐最具典型意义的、最完美的形式。四重奏有着最纯净优美的和声和无比和谐的音色。无怪乎有人说聆赏四重奏,才是欣赏西方古典音乐的...
四重奏是由两架小提琴、一架中提琴和一架大提琴构成的演奏组合,也是室内乐最具典型意义的、最完美的形式。四重奏有着最纯净优美的和声和无比和谐的音色。无怪乎有人说聆赏四重奏,才是欣赏西方古典音乐的极致。四重奏作品的演奏者需要具备独奏家的技巧,更要具有极强的、相互细微照应的能力。弦乐四重奏的形式从海顿时代得以创立,发展到贝多芬时从内容和表达都有了质的飞跃。可以说贝多芬的弦乐四重奏是他最有内涵深度的音乐。贝多芬一生创作了十六首弦乐四重奏,划分为早期、中期和晚期三部份。柴可夫斯基曾说过他喜欢贝多芬的早期和中期的弦乐四重奏,而根本上厌恶晚期的那五首,因为后者“剩下一片混沌,包围着难以穿越的迷雾”。老柴此论大家见仁见智,但至少它点明这十六首作品实则贯通了贝多芬一生的思维道路。这个版本是由Quartetto Italiano演奏的.相对于众多四重奏乐团的风格.他们保持着古典流派的清新演出,创造出无比优美和透明的音色.这个版本以音色、技巧及默契方面的炉火纯青而得到乐迷的喜爱,尤其是整首乐曲的平衡性与結构的紧密度相当出色,企鵝评鉴就认为此套录音演奏是「经得起时间的考验的]。
贝多芬的十六首四重奏可以分早期、中期和晚期三部分。写于1800年的六首通常称为早期四重奏,其实这作品18号的六首不论从作品的成熟或者从音乐史家对贝多芬年代的划分都应属于第二个时期的。这一年除了《第三钢琴协奏曲》外他全都在写四重奏。自1806年至1810年称为中期的五首,它们是作品59号的三首(献给俄国公使拉祖莫夫斯基),作品74号《竖琴》和95号《庄严》,这些作品与他的第五、六、七、八交响曲是同时期的。晚期的四重奏是名符其实的晚期作品了。从1823年写完《第九交响曲》后,在年的两年里,直至他逝世前几个月,他写下了最后的五部弦乐四重奏。可以说,晚期生活遭受极大痛苦的贝多芬是以弦乐四重奏作为他最喜爱的,表达丰富感情的唯一形式。这就是令人时而生畏感到不易听懂又难以演奏的作品127,130,131,132,135和称为《大赋格》的作品133号。
播放:1216次
喜欢这个歌单的人
网易云音乐多端下载
同步歌单,随时畅听320k好音乐
网易公司版权所有(C)杭州乐读科技有限公司运营:highlight.js demo
Language categories
1C:Enterprise (v7, v8)
#ЗагрузитьИзФайла ext_module.txt // директива 7.7
#Если Клиент ИЛИ НаКлиенте Тогда // инструкции препроцессора
&НаКлиентеНаСервереБезКонтекста // директивы компиляции
Функция ТолстыйКлиентОбычноеПриложение(Знач Параметр1 = Неопределено, // комментарий
Параметр2 = &&, ПараметрN = 123.45, ПарамNN) Экспорт // еще комментарий
Попытка
Результат_Булевы_Значения = Новый Структура(&П1, П2&, Истина, Ложь, NULL, Неопределено);
Перейти ~МеткаGOTO; // комментарий
РезультатТаблицаДат = Новый ТаблицаЗначений;
РезультатТаблицаДат.Колонки.Добавить(&Колонка1&,
Новый ОписаниеТипов(&Дата&, , ,
Новый КвалификаторыДаты(ЧастиДаты.ДатаВремя));
НС = РезультатТаблицаДат.Добавить(); НС[&Колонка1&] = '00');
Исключение
ОписаниеОшибки = ОписаниеОшибки(); // встроенная функция
Масс = Новый Массив; // встроенный тип
Для Каждого Значение Из Масс Цикл
Сообщить(Значение + Символы.ПС + &
|продолжение строки&); // продолжение многострочной строки
Продолжить; Прервать;
КонецЦикла;
СправочникСсылка
= Справочники.Языки.НайтиПоНаименованию(&ru&); // встроенные типы
СправочникОбъект
= СправочникСсылка.ПолучитьОбъект();
ПеречислениеСсылка = Перечисления.ВидыМодификацииДанных.Изменен;
ВызватьИсключение ОписаниеОшибки;
КонецПопытки;
~МеткаGOTO: // еще комментарий
ВД = ВидДвиженияБухгалтерии.Дебет;
КонецФункции // ТолстыйКлиентОбычноеПриложение()
#КонецЕсли
Augmented Backus-Naur Form
; line comment
[optional] *(group1 / group2 / SP) CRLF ; trailing comment
%x41-4D / %d78-90
*1DIGIT / 2*HEXDIG / 3*4OCTET
/ sensitive
/ insensitive
%x68.65.6C.6C.6F
&string literal&
%s&case-sensitive string&
insensitive =
%i&case-insensitive string&
Access log
20.164.151.111 - - [20/Aug/:18 -0400] &GET /mywebpage/index.php HTTP/1.1& 403 772 &-& &Mozilla/5.0 (M Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1&
ActionScript
package org.example.dummy {
import org.dummy.*;
/*define package inline interface*/
public interface IFooBarzable {
public function foo(... pairs):A
public class FooBar implements IFooBarzable {
static private var cnt:uint = 0;
private var bar:S
//constructor
public function TestBar(bar:String):void {
public function foo(... pairs):Array {
pairs.push(bar);
package body Sqlite.Simple is
Foo : int := int'S
Bar : int := long'S
Error_Message_C : chars_ptr := Sqlite_Errstr (Error);
Error_Message : String := Null_Ignore_Value (Error_Message_C);
Named : for Index in Foo..Bar loop
Put (&Hi[]{}&);
end loop N
end Sqlite.S
# rewrite`s rules for wordpress pretty url
LoadModule rewrite_module
modules/mod_rewrite.so
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [NC,L]
ExpiresActive On
ExpiresByType application/x-javascript
&access plus 1 days&
Order Deny,Allow
Allow from All
&Location /maps/&
RewriteMap map txt:map.txt
RewriteMap lower int:tolower
RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC]
RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND
RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
&/Location&
AppleScript
repeat 5 times
if foo is greater than bar then
display dialog &Hello there&
end repeat
(* comment (*nested comment*) *)
on do_something(s, y)
return {s + pi, y mod 4}
end do_something
do shell script &/bin/echo 'hello'&
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH);
// turn the LED on (HIGH is the voltage level)
delay(1000);
// wait for a second
digitalWrite(led, LOW);
// turn the LED off by making the voltage LOW
delay(1000);
// wait for a second
ARM Assembly
.global connect
r3, #2 s-&sin_family = AF_INET
r3, =server_ s-&sin_port = server_port
r3, [sp, #2]
r3, =server_ s-&sin_addr = server_addr
r3, [sp, #4]
r3, #0 bzero(&s-&sin_zero)
r3, [sp, #8]
r3, [sp, #12]
r1, const struct sockaddr *addr = sp
r7, =connect_call
sp, sp, #16
{r0} pop sockfd
{fp, ip, lr}
socket_call:
connect_call:
/* all addresses are network byte-order (big-endian) */
server_addr:
.long 0x0100007 localhost
server_port:
.hword 0x0b1a
Hello, World!
============
Author Name, &author@domain.foo&
you can write text http://example.com[with links], optionally
using an explicit link:http://example.com[link prefix].
* single quotes around a phrase place 'emphasis'
** alternatively, you can put underlines around a phrase to add _emphasis_
* astericks around a phrase make the text *bold*
* pluses around a phrase make it +monospaced+
* `smart' quotes using a leading backtick and trailing single quote
** use two of each for double ``smart'' quotes
- escape characters are supported
- you can escape a quote inside emphasized text like 'here\'s johnny!'
term:: definition
another term:: another definition
// this is just a comment
Let's make a break.
'''
we'll be right with you
after this brief interruption.
== We're back!
Want to see a image::images/tiger.png[Tiger]?
.Nested highlighting
&this_is inline=&xml&&&/this_is&
asciidoc is so powerful.
another quote:
[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes]
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
Getting Literal
---------------
want to get literal? prefix a line with a space.
I'll join that party, too.
. one thing (yeah!)
. two thing `i can write code`, and `more` wipee!
NOTE: AsciiDoc is quite cool, you should try it.
package com.aspectj.
import org.aspectj.lang.annotation.AdviceN
privileged public aspect LoggingAspect percflowbelow(ajia.services.*){
private pointcut getResult() : call(* *(..) throws SQLException) && args(Account, .., int);
@AdviceName(&CheckValidEmail&)
before (Customer hu) : getResult(hu){
System.out.println(&Your mail address is valid!&);
Object around() throws InsufficientBalanceException: getResult() && call(Customer.new(String,String,int,int,int)){
return proceed();
public Cache getCache() {
return this.
pointcut beanPropertyChange(BeanSupport bean, Object newValue): execution(void BeanSupport+.set*(*)) && args(newValue) && this(bean);
declare parents: banking.entities.* implements BeanS
declare warning : call(void TestSoftening.perform()): &Please ensure you are not calling this from an AWT thread&;
private String Identifiable.
public void Identifiable.setId(String id) {
AutoHotkey
; hotkeys and hotstrings
#a::WinSet, AlwaysOnTop, Toggle, A
MsgBox, Percent sign (`%) need to be escaped.
Run &C:\Program Files\some\program.exe&
Gosub, label1
::btw::by the way
#Numpad8::Send {Volume_Up}
#Numpad5::Send {Volume_Mute}
#Numpad2::Send {Volume_Down}
if (Clipboard = &&)
MsgBox, , Clipboard, Empty!
StringReplace, temp, Clipboard, old, new, All
MsgBox, , Clipboard, %temp%
#NoTrayIcon
#AutoIt3Wrapper_Run_Tidy=Y
#include &Misc.au3&
_Singleton(@ScriptName) ; Allow only one instance
example(0, 10)
Func example($min, $max)
For $i = $min To $max
If Mod($i, 2) == 0 Then
MsgBox(64, &Message&, $i & ' is even number!')
MsgBox(64, &Message&, $i & ' is odd number!')
EndF==&example
AVR Assembler
Block Copy Routines
;* Version:
.include &8515def.inc&
RESETreset handle
flashsize=r16size of block to be copied
flash2ram:
get constant
Y+,r0store in SRAM and increment Y-pointer
ZL,1increment Z-pointer
flash2if not end of table, loop more
ramtemp =r1temporary storage register
ramsize =r16size of block to be copied
POPService
= &/inet/tcp/0/emailhost/pop3&
RS = ORS = &\r\n&
print &user name&
|& POPService
POPService
|& getline
print &pass password&
|& POPService
POPService
|& getline
print &retr 1&
|& POPService
POPService
|& getline
if ($1 != &+OK&) exit
print &quit&
|& POPService
RS = &\r\n\\.\r\n&
POPService |& getline
close(POPService)
class ExchRateLoadBatch extends RunBaseBatch {
#define.CurrentVersion(5)
#localmacro.CurrentList
currencies,
public boolean unpack(container packedClass) {
= runbase::getVersion(packedClass);
switch (version) {
case #CurrentVersion:
[version, #CurrentList] = packedC
#!/bin/bash
###### CONFIG
ACCEPTED_HOSTS=&/root/.hag_accepted.conf&
BE_VERBOSE=false
if [ &$UID& -ne 0 ]
echo &Superuser rights required&
genApacheConf(){
echo -e &# Host ${HOME_DIR}$1/$2 :&
20 FOR I = 0 TO 15
22 FOR J = 0 TO 7
30 COLOR I,J
40 PRINT & ** &;
46 COLOR I,0
47 GOSUB 100
60 COLOR 15,0
100 FOR T = 65 TO 90
101 PRINT CHR$(T);
102 NEXT T
103 RETURN
200 REM Data types test
201 TOTAL# = 3.30#
'Double precision variable
202 BALANCE! = 3!
'Single precision variable
203 B2! = 12e5
'120000
204 ITEMS% = 10
'Integer variable
205 HEXTEST = &H12DB 'Hex value
Backus–Naur Form
::= &rule& | &rule& &syntax&
::= &opt-whitespace& &&& &rule-name& &&& &opt-whitespace& &::=& &opt-whitespace& &expression& &line-end&
&opt-whitespace& ::= & & &opt-whitespace& | &&
&expression&
::= &list& | &list& &opt-whitespace& &|& &opt-whitespace& &expression&
&line-end&
::= &opt-whitespace& &EOL& | &line-end& &line-end&
::= &term& | &term& &opt-whitespace& &list&
::= &literal& | &&& &rule-name& &&&
::= '&' &text& '&' | &'& &text& &'&
++++++++++
[ 3*10 and 10*10
-&+++&++++++++++&&
[ filling cells
-&++&&++&++&+&++&&++&++&++&++&++&++&++&++&++&++&++[&/]&[&]&[&]&&
+++++++++&&
[ rough codes correction loop
-&&&+&+&+&+++&+&+&+&+&+&+&+&+&+&+&+&+&+&+[&]&
more accurate сodes correction
--&+++++++&------&++++++&++&+++++++++&++++++++++&++++++++&---&++++++++++&------&++++++&
++&+++++++++++&++++++++++++&------&+++
rewind and output
OBJECT Codeunit 11 Gen. Jnl.-Check Line
OBJECT-PROPERTIES
Date=09-09-14;
Time=12:00:00;
Version List=NAVW18.00;
PROPERTIES
TableNo=81;
Permissions=TableData 252=
OnRun=BEGIN
GLSetup.GET;
RunCheck(Rec);
Text000@1000 : TextConst 'ENU=can only be a closing date for G/L entries';
Text001@1001 : TextConst 'ENU=is not within your range of allowed posting dates';
PROCEDURE ErrorIfPositiveAmt@2(GenJnlLine@1000 : Record 81);
IF GenJnlLine.Amount & 0 THEN
GenJnlLine.FIELDERROR(Amount,Text008);
LOCAL PROCEDURE CheckGenJnlLineDocType@7(GenJnlLine@1001 : Record 81);
Cap’n Proto
@0xdbb9ad1f14bf0b36;
# unique file ID, generated by `capnp id`
struct Person {
name @0 :T
birthdate @3 :D
email @1 :T
phones @2 :List(PhoneNumber);
struct PhoneNumber {
number @0 :T
type @1 :T
enum Type {
mobile @0;
struct Date {
year @0 :Int16;
month @1 :UInt8;
day @2 :UInt8;
flags @3 :List(Bool) = [ true, false, false, true ];
interface Node {
isDirectory @0 () -& (result :Bool);
interface Directory extends(Node) {
list @0 () -& (list: List(Entry));
struct Entry {
name @0 :T
node @1 :N
create @1 (name :Text) -& (file :File);
mkdir @2 (name :Text) -& (directory :Directory)
open @3 (name :Text) -& (node :Node);
delete @4 (name :Text);
link @5 (name :Text, node :Node);
interface File extends(Node) {
size @0 () -& (size: UInt64);
read @1 (startAt :UInt64 = 0, amount :UInt64 = 0xffffffffffffffff)
-& (data: Data);
# Default params = read entire file.
write @2 (startAt :UInt64, data :Data);
truncate @3 (size :UInt64);
shared void run() {
print(&Hello, `` process.arguments.first else &World& ``!&);
class Counter(count=0) {
variable I
shared Integer currentValue =&
shared void increment() =& count++;
module fsieve
import StdC // RWS
import StdInt, StdReal
NrOfPrimes :== 3000
primes :: [Int]
primes = pr where pr = [5 : sieve 7 4 pr]
sieve :: Int !Int [Int] -& [Int]
sieve g i prs
| isPrime prs g (toInt (sqrt (toReal g))) = [g : sieve` g i prs]
| otherwise
= sieve (g + i) (6 - i) prs
sieve` :: Int Int [Int] -& [Int]
sieve` g i prs = sieve (g + i) (6 - i) prs
isPrime :: [Int] !Int Int -& Bool
isPrime [f:r] pr bd
| pr rem f==0 =
| otherwise
isPrime r pr bd
select :: [x] Int -& x
select [f:r] 1 = f
select [f:r] n = select r (n - 1)
Start :: Int
Start = select [2, 3 : primes] NrOfPrimes
Clojure REPL
user=& (defn f [x y]
#'user/f
user=& (f 5 7)
user=& nil
(def ^:dynamic chunk-size 17)
(defn next-chunk [rdr]
(let [buf (char-array chunk-size)
s (.read rdr buf)]
(when (pos? s)
(java.nio.CharBuffer/wrap buf 0 s))))
(defn chunk-seq [rdr]
(when-let [chunk (next-chunk rdr)]
(cons chunk (lazy-seq (chunk-seq rdr)))))
cmake_minimum_required(VERSION 2.8.8)
project(cmake_example)
# Show message on Linux platform
if (${CMAKE_SYSTEM_NAME} MATCHES Linux)
message(&Good choice, bro!&)
# Tell CMake to run moc when necessary:
set(CMAKE_AUTOMOC ON)
# As moc files are generated in the binary dir,
# tell CMake to always look for includes there:
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Widgets finds its own dependencies.
find_package(Qt5Widgets REQUIRED)
add_executable(myproject main.cpp mainwindow.cpp)
qt5_use_modules(myproject Widgets)
CoffeeScript
grade = (student, period=(if b? then 7 else 6)) -&
if student.excellentWork
else if student.okayStuff
if student.triedHard then &B& else &B-&
class Animal extends Being
constructor: (@name) -&
move: (meters) -&
alert @name + & moved #{meters}m.&
Inductive seq : nat -& Set :=
| niln : seq 0
| consn : forall n : nat, nat -& seq n -& seq (S n).
Fixpoint length (n : nat) (s : seq n) {struct s} : nat :=
match s with
| niln =& 0
| consn i _ s' =& S (length i s')
Theorem length_corr : forall (n : nat) (s : seq n), length n s = n.
intros n s.
(* reasoning by induction over s. Then, we have two new goals
corresponding on the case analysis about s (either it is
niln or some consn *)
induction s.
(* We are in the case where s is void. We can reduce the
term: length 0 niln *)
(* We obtain the goal 0 = 0. *)
(* now, we treat the case s = consn n e s with induction
hypothesis IHs *)
(* The induction hypothesis has type length n s = n.
So we can use it to perform some rewriting in the goal: *)
rewrite IHs.
(* Now the goal is the trivial equality: S n = S n *)
(* Now all sub cases are closed, we perform the ultimate
step: typing the term built using tactics and save it as
a witness of the theorem. *)
Caché Object Script
#dim test as %Library.Integer
SET test = 123.099
set ^global = %request.Content
Write &Current date &&&, $ztimestamp, &&&, result: &, test + ^global = 125.099
do ##class(Cinema.Utils).AddShow(&test&) // class method call
do ##super() ; another one-line comment
d:(^global = 2) ..thisClassMethod(1, 2, &test&)
* Sub-languages support:
&sql( SELECT * FROM Cinema.Film WHERE Length & 2 )
&js&for (var i = 0; i & String(&test&).split(&&).length); ++i) {
console.log(i);
&html&&!DOCTYPE html&
&head& &meta name=&test&/& &/head&
&body&Test&/body&
quit $$$OK
#include &iostream&
int main(int argc, char *argv[]) {
/* An annoying &Hello World& example */
for (auto i = 0; i & 0xFFFF; i++)
cout && &Hello, World!& &&
char c = '\n';
unordered_map &string, vector&string& &
m[&key&] = &\\\\&; // this is an error
return -2e3 + 12l;
node webui
node : node1
rsc_template web-server apache \
params port=8000 \
op monitor interval=10s
# Never use this STONITH agent in production!
primitive development-stonith stonith:null \
params hostlist=&webui node1 node2 node3&
primitive proxy systemd:haproxy \
op monitor interval=10s
primitive proxy-vip IPaddr2 \
params ip=10.13.37.20
primitive srv1 @web-server
primitive srv2 @web-server
primitive test1 Dummy
primitive test2 IPaddr2 \
params ip=10.13.37.99
primitive vip1 IPaddr2 \
params ip=10.13.37.21 \
op monitor interval=20s
primitive vip2 IPaddr2 \
params ip=10.13.37.22 \
op monitor interval=20s
group g-proxy proxy-vip proxy
group g-serv1 vip1 srv1
group g-serv2 vip2 srv2
# Never put the two web servers on the same node
colocation co-serv -inf: g-serv1 g-serv2
# Never put any web server or haproxy on webui
location l-avoid-webui { g-proxy g-serv1 g-serv2 } -inf: webui
# Prever to spread groups across nodes
location l-proxy g-proxy 200: node1
location l-serv1 g-serv1 200: node2
location l-serv2 g-serv2 200: node3
property cib-bootstrap-options: \
stonith-enabled=true \
no-quorum-policy=ignore \
placement-strategy=balanced \
have-watchdog=false \
dc-version=&1.1.13-1.1.13+git88b9& \
cluster-infrastructure=corosync \
cluster-name=hacluster
rsc_defaults rsc-options: \
resource-stickiness=1 \
migration-threshold=3
op_defaults op-options: \
timeout=600 \
record-pending=true
class Person
def initialize(@name : String)
puts &Hi, I'm #{@name}&
class Employee & Person
employee = Employee.new &John&
employee.greet
# =& &Hi, I'm John&
employee.is_a?(Person) # =& true
@[Link(&m&)]
# In C: double cos(double x)
fun cos(value : Float64) : Float64
C.cos(1.5_f64) # =& 0.0707372
s = uninitialized String
s = &&-'STR'
\hello\world
\hello\world
using System.IO.C
#pragma warning disable 414, 3021
namespace MyApplication
[Obsolete(&...&)]
class Program : IInterface
public static List&int& JustDoIt(int count)
Console.WriteLine($&Hello {Name}!&);
return new List&int&(new int[] { 1, 2, 3 })
Content-Security-Policy:
default-src 'self';
style-src 'self' css.example.
img-src *.example.
script-src 'unsafe-eval' 'self' js.example.com 'nonce-Nc3n83cnSAd3wc3Sasdfn939hc3'
@font-face {
font-family: C src: url('Chunkfive.otf');
body, .usertext {
color: #F0F0F0; background: #600;
font-family: Chunkfive,
@import url(print.css);
@media print {
a[href^=http]::after {
content: attr(href)
#!/usr/bin/rdmd
// Computes average line length for standard input.
import std.
this is a /+ nesting +/ comment
enum COMPILED_ON = __TIMESTAMP__;
// special token
enum character = '(C)';
enum copy_valid = '&';
enum backslash_escaped = '\\';
// string literals
enum str = `hello &world&!`;
enum multiline = r&lorem
// wysiwyg string, no escapes here allowed
enum multiline2 = &sit
\&adipiscing\&
enum hex = x&66 6f 6f&;
// same as &foo&
// float literals
enum f = [3.14f, .1, 1., 1e100, 0xc0de.01p+100];
static if (something == true) {
import std.
void main() pure nothrow @safe {
ulong lines = 0;
double sumLength = 0;
foreach ( stdin.byLine()) {
sumLength += line.
writeln(&Average line length: &,
lines ? sumLength / lines : 0);
import 'dart:html';
part 'app2.dart';
* Class description and [link](http://dartlang.org/).
@Awesome('it works!')
class SomeClass&S extends Iterable& extends BaseClass&S& implements Comparable {
factory SomeClass(num param);
SomeClass._internal(int q) : super() {
assert(q != 1);
double z = 0.0;
/// **Sum** function
int sum(int a, int b) =& a +
ElementList els() =& querySelectorAll('.dart');
String str = ' (${'parameter' + 'zxc'})';
String str = & (${true ? 2 + 2 / 2 : null})&;
String str = r'\nraw\';
String str = r&\nraw\&;
var str = '''
Something ${2+3}
''';
var str = r&&&
Something ${2+3}
checkVersion() async {
var version = await lookUpVersion();
TList = Class(TObject)
Procedure I // Suxx
Procedure CopyFile(InFileName, var OutFileName: String);
BufSize = 4096; (* Huh? *)
InFile, OutFile: TS
Buffer: Array[1..BufSize] Of B
ReadBufSize: I
InFile := N
OutFile := N
InFile := TFileStream.Create(InFileName, fmOpenRead);
OutFile := TFileStream.Create(OutFileName, fmCreate);
ReadBufSize := InFile.Read(Buffer, BufSize);
OutFile.Write(Buffer, ReadBufSize);
Until ReadBufSize&&BufS
Log('File ''' + InFileName + ''' copied'#13#10);
E{CopyFile}
Index: languages/ini.js
===================================================================
--- languages/ini.js
(revision 199)
+++ languages/ini.js
(revision 200)
@@ -1,8 +1,7 @@
hljs.LANGUAGES.ini =
case_insensitive: true,
defaultMode:
defaultMode: {
contains: ['comment', 'title', 'setting'],
illegal: '[^\\s]'
*** /path/to/original timestamp
--- /path/to/new
***************
*** 1,3 ****
--- 1,9 ----
+ This is an important
+ notice! It should
+ therefore be located at
+ the beginning of this
+ document!
! compress the size of the
! changes.
It is important to spell
{% if articles|length %}
{% for article in articles %}
{% custom %}
{# Striped table #}
&tr class=&{% cycle odd,even %}&&
&td&{{ article|default:&Hi... & }}&/td&
&td {% if article.today %}class=&today&{% endif %}&
Published on {{ article.date }}
{% endfor %}
{% endif %}
DNS Zone file
$ORIGIN example.com. designates the start of this zone file in the namespace
$TTL 1 default expiration time of all resource records without their own TTL value
example.com.
ns.example.com. username.example.com. (
1d 2h 4w 1h )
example.com.
ns ns.example.com is a nameserver for example.com
example.com.
ns.somewhere.example. ; ns.somewhere.example is a backup nameserver for example.com
example.com.
10 mail.example.com. mail.example.com is the mailserver for example.com
20 mail2.example.com. ; equivalent to above line, &@& represents zone origin
50 mail3 equivalent to above line, but using a relative host name
example.com.
192.0.2.1 IPv4 address for example.com
2001:db8:10::1 IPv6 address for example.com
192.0.2.2 IPv4 address for ns.example.com
2001:db8:10::2 IPv6 address for ns.example.com
CNAME example.com. www.example.com is an alias for example.com
CNAME ww wwwtest.example.com is another alias for www.example.com
192.0.2.3 IPv4 address for mail.example.com
192.0.2.4 IPv4 address for mail2.example.com
192.0.2.5 IPv4 address for mail3.example.com
Dockerfile
# Example instructions from https://docs.docker.com/reference/builder/
FROM ubuntu:14.04
MAINTAINER
ENV foo /bar
WORKDIR ${foo}
# WORKDIR /bar
ADD . $foo
# ADD . /bar
COPY \$foo /quux # COPY $foo /quux
RUN apt-get update && apt-get install -y software-properties-common\
zsh curl wget git htop\
unzip vim telnet
RUN [&/bin/bash&, &-c&, &echo hello ${USER}&]
CMD [&executable&,&param1&,&param2&]
CMD command param1 param2
EXPOSE 1337
ENV myName=&John Doe& myDog=Rex\ The\ Dog \
myCat=fluffy
ENV myName John Doe
ENV myDog Rex The Dog
ENV myCat fluffy
ADD hom* /mydir/
# adds all files starting with &hom&
ADD hom?.txt /mydir/
# ? is replaced with any single character
COPY hom* /mydir/
# adds all files starting with &hom&
COPY hom?.txt /mydir/
# ? is replaced with any single character
COPY --from=foo / .
ENTRYPOINT [&executable&, &param1&, &param2&]
ENTRYPOINT command param1 param2
VOLUME [&/data&]
USER daemon
LABEL com.example.label-with-value=&foo&
LABEL version=&1.0&
LABEL description=&This text illustrates \
that label-values can span multiple lines.&
WORKDIR /path/to/workdir
ONBUILD ADD . /app/src
STOPSIGNAL SIGKILL
HEALTHCHECK --retries=3 cat /health
SHELL [&/bin/bash&, &-c&]
ping 192.168.0.1
@rem ping 192.168.0.1
net stop sharedaccess
del %tmp% /f /s /q
del %temp% /f /s /q
ipconfig /flushdns
taskkill /F /IM JAVA.EXE /T
cd Photoshop/Adobe Photoshop CS3/AMT/
if exist application.sif (
ren application.sif _application.sif
ren _application.sif application.sif
taskkill /F /IM proquota.exe /T
sfc /SCANNOW
set path = test
xcopy %1\*.* %2
# Create client connection policies
dsconfig create-client-connection-policy \
--policy-name &Restrictive Client Connection Policy& \
--set &description:Restrictive Client Connection Policy& \
--set enabled:true --set evaluation-order-index:1000 \
--set &connection-criteria:User.0 Connection Criteria& \
--set maximum-concurrent-connections:2 \
--set &maximum-connection-duration:1 s& \
--set &maximum-idle-connection-duration:1 s& \
--set maximum-operation-count-per-connection:1000
create-client-connection-policy \
--policy-name &Another Client Connection Policy& \
--set enabled:true --set evaluation-order-index:100 \
--set 'connection-criteria:User.1 Connection Criteria' \
--reset maximum-concurrent-connections
# Configure global ACIs
dsconfig set-access-control-handler-prop \
--add global-aci:'(target=&ldap:///cn=config&)(targetattr=&*&)(version 3.0; acl &Allow access to the config tree by cn=admin,c=us&; allow(all) groupdn=&ldap:///cn=directory administrators,ou=groups,c=us&;)' \
--add global-aci:'(target=&ldap:///cn=monitor&)(targetattr=&*&)(version 3.0; acl &Allow access to the monitor tree by cn=admin,c=us&; allow(all) groupdn=&ldap:///cn=directory administrators,ou=groups,c=us&;)' \
--remove global-aci:'(target=&ldap:///cn=alerts&)(targetattr=&*&)(version 3.0; acl &Allow access to the alerts tree by cn=admin,c=us&; allow(all) groupdn=&ldap:///cn=directory administrators,ou=groups,c=us&;)'
# Delete error logger
dsconfig delete-log-publisher --publisher-name &File-Based Error Logger&
Device Tree
Copyright (C) 2011 - 2014 Xilinx
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* GNU General Public License for more details.
/include/ &skeleton.dtsi&
compatible = &xlnx,zynq-7000&;
compatible = &arm,cortex-a9-pmu&;
interrupts = &0 5 4&, &0 6 4&;
interrupt-parent = &&intc&;
reg = & 0xfx0 &;
regulator_vccpint: fixedregulator@0 {
compatible = &regulator-fixed&;
regulator-name = &VCCPINT&;
regulator-min-microvolt = &1000000&;
regulator-max-microvolt = &1000000&;
regulator-boot-
regulator-always-
amba: amba {
compatible = &simple-bus&;
#address-cells = &1&;
#size-cells = &1&;
interrupt-parent = &&intc&;
adc: adc@f8007100 {
compatible = &xlnx,zynq-xadc-1.00.a&;
reg = &0xfx20&;
interrupts = &0 7 4&;
interrupt-parent = &&intc&;
clocks = &&clkc 12&;
i2c0: i2c@e0004000 {
compatible = &cdns,i2c-r1p10&;
status = &disabled&;
clocks = &&clkc 38&;
interrupt-parent = &&intc&;
interrupts = &0 25 4&;
reg = &0xex1000&;
#address-cells = &1&;
#size-cells = &0&;
L2: cache-controller@f8f02000 {
compatible = &arm,pl310-cache&;
reg = &0xF8F0&;
interrupts = &0 2 4&;
arm,data-latency = &3 2 2&;
arm,tag-latency = &2 2 2&;
cache-level = &2&;
&h3&Hours&/h3&
&li {hello}&{firstName}&/li&{~n}
Extended Backus-Naur Form
(* line comment *)
[optional] , symbol , { letters } , ( digit | symbol ) ;
? something unnecessary ? ; (* trailing comment *)
'!' | '@' | '#' | '$' | '%' | '&' | '*' ;
&0& | &1& | &2& | &3& | &4& | &5& | &6& | &7& | &8& | &9& ;
&A& | &B& | &C& | &D& | &E& | &F& | &G&
| &H& | &I& | &J& | &K& | &L& | &M& | &N&
| &O& | &P& | &Q& | &R& | &S& | &T& | &U&
| &V& | &W& | &X& | &Y& | &Z& ;
defrecord Person, first_name: nil, last_name: &Dudington& do
def name record do # huh ?
&#{record.first_name} #{record.last_name}&
defrecord User, name: &José&, age: 25
guy = Person.new first_name: &Guy&
defmodule ListServer do
@moduledoc &&&
This module provides an easy to use ListServer, useful for keeping
lists of things.
use GenServer.Behaviour
alias Foo.Bar
### Public API
Starts and links a new ListServer, returning {:ok, pid}
## Example
iex& {:ok, pid} = ListServer.start_link
def start_link do
:gen_server.start_link({:local, :list}, __MODULE__, [], [])
### GenServer API
def init(list) do
{:ok, list}
# Clear the list
def handle_cast :clear, list do
{:noreply, []}
{:ok, pid} = ListServer.start_link
pid &- {:foo, &bar&}
greeter = fn(x) -& IO.puts &hey #{x}& end
greeter.(&Bob&)
import Html exposing (div, button, text)
import Html.App exposing (beginnerProgram)
import Html.Events exposing (onClick)
= Increment
beginnerProgram
{ model = 0, view = view
, update = \Increment model -& model + 1 }
view model =
div [] [ div [] [ text (toString model) ]
, button [ onClick Increment ] [ text &+& ] ]
ERB (Embedded Ruby)
&%# this is a comment %&
&% @posts.each do |post| %&
&p&&%= link_to post.title, post %&&/p&
&%- available_things = things.select(&:available?) -%&
&%%- x = 1 + 2 -%%&
&%% value = 'real string #{@value}' %%&
&%%= available_things.inspect %%&
Erlang REPL
1& Str = &abcd&.
2& L = test:length(Str).
3& Descriptor = {L, list_to_atom(Str)}.
Descriptor = {4,abcd}
Str = &abcd&
Descriptor = {4,abcd}
Str = &abcd&
8& {L, _} = Descriptor.
10& 2#101.
11& 1.85e+3.
-module(ssh_cli).
-behaviour(ssh_channel).
-include(&ssh.hrl&).
%% backwards compatibility
-export([listen/1, listen/2, listen/3, listen/4, stop/1]).
if L =/= [] -&
% If L is not empty
sum(L) / count(L);
-record(state, {
-spec foo(integer()) -& integer().
foo(X) -& 1 + X.
test(Foo)-&Foo.
init([Shell, Exec]) -&
{ok, #state{shell = Shell, exec = Exec}};
init([Shell]) -&
false = not true,
io:format(&Hello, \&~p!~n&, [atom_to_list('World')]),
{ok, #state{shell = Shell}}.
concat([Single]) -& S
concat(RList) -&
EpsilonFree = lists:filter(
fun (Element) -&
case Element of
epsilon -&
case EpsilonFree of
[Single] -& S
Other -& {concat, Other}
union_dot_union({union, _}=U1, {union, _}=U2) -&
union(lists:flatten(
lists:map(
fun (X1) -&
lists:map(
fun (X2) -&
concat([X1, X2])
union_to_list(U2)
union_to_list(U1)
=IF(C10 &= 275.5, &Unprofitable&, &Profitable&)
8=FIX.4.2SOH9=0SOH35=8SOH49=SENDERTESTSOH56=TARGETTESTSOH34=SOH52=:30:08.137SOH1=ABC12345SOH11=2012abc1234SOH14=100SOH17=SOH20=0SOH30=NYSESOH31=108.20SOH32=100SOH38=100SOH39=2SOH40=1SOH47=ASOH54=5SOH55=BRKSOH59=2SOH60=:30:08.000SOH65=BSOH76=BROKERSOH84=0SOH100=NYSESOH111=100SOH150=2SOH151=0SOH167=CSSOH377=NSOH10000=SampleCustomTagSOH10=123SOH
8=FIX.4.29=035=849=SENDERTEST56=TARGETTEST34=52=:30:08.1371=ABC2abc17==030=NYSE31=108.2032=10038=10039=240=147=A54=555=BRK59=260=:30:08.00065=B76=BROKER84=0100=NYSE111=100150=2151=0167=CS377=N10000=SampleCustomTag10=123
* An example of Flix for syntax highlighting.
// Here is a namespace.
namespace a.b.c {
// Here are some literals.
def b: Bool = true
def c: Char = 'a'
def f: Float = 1.23
def i: Int = 42
def s: Str = &string&
// Here are some relations.
rel LitStm(r: Str, c: Int)
rel AddStm(r: Str, x: Str, y: Str)
rel DivStm(r: Str, x: Str, y: Str)
// Here is a lattice.
lat LocalVar(k: Str, v: Constant)
// Here is an index.
index LitStm{{r}, {r, c}}
// Here is an enum.
enum Constant {
case Cst(Int),
// Here is a function.
def leq(e1: Constant, e2: Constant): Bool = match (e1, e2) with {
case (Constant.Bot, _)
case (Constant.Cst(n1), Constant.Cst(n2))
=& n1 == n2
case (_, Constant.Top)
// Here are some rules.
LocalVar(r, alpha(c)) :- LitStm(r, c).
LocalVar(r, sum(v1, v2)) :- AddStm(r, x, y),
LocalVar(x, v1),
LocalVar(y, v2).
subroutine test_sub(k)
implicit none
!===============================
This is a test subroutine
!===============================
integer, intent(in)
double precision, allocatable :: a(:)
integer, parameter
:: nmax=10
allocate (a(nmax))
do i=1,nmax
a(i) = dble(i)*5.d0
print *, 'Hello world'
write (*,*) a(:)
end subroutine test_sub
open System
// Single line comment...
multiline comment.
let checkList alist =
match alist with
| [a] -& 1
| [a; b] -& 2
| [a; c] -& 3
| _ -& failwith &List is too big!&
let text = &Some text...&
let text2 = @&A &&verbatim&& string...&
let catalog = &&&
Some &long& string...
let rec fib x = if x &= 2 then 1 else fib(x-1) + fib(x-2)
let fibs =
Async.Parallel [ for i in 0..40 -& async { return fib(i) } ]
|& Async.RunSynchronously
type Sprocket(gears) =
member this.Gears : int = gears
[&AbstractClass&]
type Animal =
abstract Speak : unit -& unit
type Widget =
| RedWidget
| GreenWidget
type Point = {X: Y:}
[&Measure&]
let minutte = 60&s&
type DefaultMailbox&'a&() =
let mutable inbox = ConcurrentQueue&'a&()
let awaitMsg = new AutoResetEvent(false)
canning plants
/ SEATTLE, SAN-DIEGO /
/ NEW-YORK, CHICAGO, TOPEKA / ;
PARAMETERS
capacity of plant i in cases
demand at market j in cases
TABLE D(I,J)
distance in thousands of miles
freight in dollars per case per thousand miles
PARAMETER C(I,J)
transport cost in thousands
C(I,J) = F * D(I,J) / 1000 ;
shipment quantities in cases
total transportation costs in t
POSITIVE VARIABLE X ;
define objective function
observe supply limit at plant i
SUM((I,J), C(I,J)*X(I,J)) ;
SUPPLY(I) ..
SUM(J, X(I,J))
DEMAND(J) ..
SUM(I, X(I,J))
MODEL TRANSPORT /ALL/ ;
SOLVE TRANSPORT USING LP MINIMIZING Z ;
// This is a test
#include pv.sdf
proc (1) = calc(local__row, fin);
if local__
nr = local__
k = colsf(fin);
nr = floor(minc(maxbytes/(k*8*3.5)|maxvec/(k+1)));
s = &{% test string %}&;
fn twopi=pi*2;
/* Takes in multiple numbers.
Output sum */
keyword add(str);
local tok,
do until str $== &&;
{ tok, str } = token(str);
sum = sum + stof(tok);
print &Sum is: &
G-code (ISO 6983)
O003 (DIAMOND SQUARE)
N2 G54 G90 G49 G80
N3 M6 T1 (1.ENDMILL)
N4 M3 S1800
N5 G0 X-.6 Y2.050
N7 G1 Z-.3 F50.
N8 G41 D1 Y1.45
N9 G1 X0 F20.
N10 G2 J-1.45
(CUTTER COMP CANCEL)
N11 G1 Z-.2 F50.
N12 Y-.990
N14 G0 X-.6 Y1.590
N15 G0 Z.1
N16 M5 G49 G28 G91 Z0
N17 CALL O9456
N18 #500=0.004
N19 #503=[#500+#501]
N20 VC45=0.0006
VS4=0.0007
N21 G90 G10 L20 P3 X5.Y4. Z6.567
N22 G0 X5000
N23 IF [#1 LT 0.370] GOTO 49
N24 X-0.678 Y+.990
N25 G84.3 X-0.1
N26 #4=#5*COS[45]
N27 #4=#5*SIN[45]
N28 VZOFZ=652.9658
# language: en
Feature: Addition
In order to avoid silly mistakes
As a math idiot
I want to be told the sum of two numbers
@this_is_a_tag
Scenario Outline: Add two numbers
* I have a calculator
Given I have entered &input_1& into the calculator
And I have entered &input_2& into the calculator
When I press &button&
Then the result should be &output& on the screen
And I have a string like
multiline text
| input_1 | input_2 | button | output |
// vertex shader
#version 150
out vec3 ex_C
void main(void) {
gl_Position = vec4(in_Position.x, in_Position.y, 0.0, 1.0);
ex_Color = in_C
// geometry shader
#version 150
layout(triangles)
layout(triangle_strip, max_vertices = 3)
void main() {
for(int i = 0; i & gl_in.length(); i++) {
gl_Position = gl_in[i].gl_P
EmitVertex();
EndPrimitive();
// fragment shader
#version 150
out vec4 gl_FragC
void main(void) {
gl_FragColor = vec4(ex_Color, 1.0);
package main
import &fmt&
func main() {
ch := make(chan float64)
ch &- 1.0e10
// magic number
x, ok := &- ch
defer fmt.Println(`exitting now\`)
go println(len(&hello world!&))
module hello
function dyno = -& DynamicObject()
struct human = { name }
@annotated
function main = |args| {
println(&hello&)
let john = human(&John Doe&)
apply plugin: 'android'
compileSdkVersion 19
buildToolsVersion &19.1&
defaultConfig {
minSdkVersion 15
targetSdkVersion 19
versionCode 5
versionName &0.4.4&
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
signingConfigs {
buildTypes {
// runProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.release
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.example:example-lib:1.0.0'
def propFile = file('../signing.properties')
if( propFile.canRead() ) {
def Properties p = new Properties()
p.load(new FileInputStream(propFile))
if( p!=null
p.containsKey(&STORE_FILE&)
p.containsKey('STORE_PASSWORD')
p.containsKey('KEY_ALIAS')
p.containsKey('KEY_PASSWORD')
println &RELEASE_BUILD: Signing...&
android.signingConfigs.release.storeFile = file( p['STORE_FILE'] )
android.signingConfigs.release.storePassword = p['STORE_PASSWORD']
android.signingConfigs.release.keyAlias = p['KEY_ALIAS']
android.signingConfigs.release.keyPassword = p['KEY_PASSWORD']
println &RELEASE_BUILD: Required properties in signing.properties are missing&
android.buildTypes.release.signingConfig = null
println &RELEASE_BUILD: signing.properties not found&
android.buildTypes.release.signingProperties = null
#!/usr/bin/env groovy
package model
import groovy.transform.CompileStatic
import java.util.List as MyList
trait Distributable {
void distribute(String version) {}
@CompileStatic
class Distribution implements Distributable {
double number =
def otherNumber = 3 / 4
boolean archivable = condition ?: true
def ternary = a ? b : c
String name = &Guillaume&
Closure description = null
List&DownloadPackage& packages = []
String regex = ~/.*foo.*/
String multi = '''
multi line string
''' + &&&
now with double quotes and ${gstring}
even with dollar slashy strings
* description method
* @param cl the closure
void description(Closure cl) { this.description = cl }
void version(String name, Closure versionSpec) {
def closure = { println &hi& } as Runnable
MyList ml = [1, 2, [a: 1, b:2,c :3]]
for (ch in &name&) {}
// single line comment
DownloadPackage pkg = new DownloadPackage(version: name)
check that: true
def clone = versionSpec.rehydrate(pkg, pkg, pkg)
now clone() in a multiline comment
packages.add(pkg)
assert 4 / 2 == 2
%h1.jumbo{:id=&&a&, :style=&'font-weight: normal', :title=&title} highlight.js
/html comment
-# ignore this line
%ul(style='margin: 0')
-items.each do |i|
= variable
=variable2
~ variable3
~variable4
The current year is #{DataTime.now.year}.
Handlebars
&div class=&entry&&
{{!-- only show if author exists --}}
{{#if author}}
&h1&{{firstName}} {{lastName}}&/h1&
{-# LANGUAGE TypeSynonymInstances #-}
module Network.UDP
( DataPacket(..)
, openBoundUDPPort
, openListeningUDPPort
, pingUDPPort
, sendUDPPacketTo
, recvUDPPacket
, recvUDPPacketFrom
import qualified Data.ByteString as Strict (ByteString, concat, singleton)
import qualified Data.ByteString.Lazy as Lazy (ByteString, toChunks, fromChunks)
import Data.ByteString.Char8 (pack, unpack)
import Network.Socket hiding (sendTo, recv, recvFrom)
import Network.Socket.ByteString (sendTo, recv, recvFrom)
-- Type class for converting StringLike types to and from strict ByteStrings
class DataPacket a where
toStrictBS :: a -& Strict.ByteString
fromStrictBS :: Strict.ByteString -& a
instance DataPacket Strict.ByteString where
toStrictBS = id
{-# INLINE toStrictBS #-}
fromStrictBS = id
{-# INLINE fromStrictBS #-}
openBoundUDPPort :: String -& Int -& IO Socket
openBoundUDPPort uri port = do
s &- getUDPSocket
bindAddr &- inet_addr uri
let a = SockAddrInet (toEnum port) bindAddr
bindSocket s a
pingUDPPort :: Socket -& SockAddr -& IO ()
pingUDPPort s a = sendTo s (Strict.singleton 0) a && return ()
package my.
import js.B
#elseif sys
using Main.IntE
extern class Math {
static var PI(default,null) : F
static function floor(v:Float):I
* Abstract forwarding
abstract MyAbstract(Int) from Int to Int {
inline function new(i:Int) {
@:op(A * B)
public function multiply(rhs:MyAbstract) {
return this *
// an enum
enum Color {
Rgb(r:Int, g:Int, b:Int);
class Gen&T& {
public function new(v:T) {
public var x(get, set):T;
private inline function get_x():T
private inline function set_x(x:T):T
return v =
class Main extends BaseClass implements SomeFunctionality {
var callback:Void-&Void =
var myArray:Array&Float& = new Array&Float&();
var arr = [4,8,0,3,9,1,5,2,6,7];
public function new(x) {
public static function main() {
trace('What\'s up?');
trace('Hi, ${name}!');
// switch statements!
var c:Color = Color.G
var x:Int = switch(c) {
case Red: 0;
case Green: 1;
case Blue: 2;
case Rgb(r, g, b): 3;
case _: -1;
for(i in 0...3) {
trace(&Hey-o!&);
} while(false);
var done:Bool =
while(!done) {
var H:Int = cast new MyAbstract(42);
var h:Int = cast(new MyAbstract(31), Int);
throw &error&;
catch(err:String) {
trace(err);
var map = new haxe.ds.IntMap&String&();
var f = map.set.bind(_, &12&);
function nothing():Void
trace(&nothing!&);
private inline function func(a:Int, b:Float, ?c:String, d:Bool=false):Dynamic {
override function quicksort( lo : Int, hi : Int ) : Void {
var p = buf[(lo+hi)&&1];
while( i &= j ) {
while( arr[i] & p ) i++;
while( arr[j] & p ) j--;
if( i &= j ) {
var t = buf[i];
buf[i++] = buf[j];
buf[j--] =
if( lo & j ) quicksort( lo, j );
if( i & hi ) quicksort( i, hi );
#include &foo.hsp&
// line comment
message = &Hello, World!&
message2 = {&Multi
mes message
input num : button &sqrt&, *label
block comment
if(num &= 0) {
dialog &sqrt(& + num + &) = & + sqrt(num)
dialog &error&, 1
&div class=&entry&&
{{!-- only output this author names if an author exists --}}
{{#if author}}
{{#playwright-wrapper playwright=author action=(mut author) as |playwright|}}
&h1&{{playwright.firstName}} {{playwright.lastName}}&/h1&
{{/playwright-wrapper}}
POST /task?id=1 HTTP/1.1
Host: example.org
Content-Type: application/ charset=utf-8
Content-Length: 137
&status&: &ok&,
&extended&: true,
&results&: [
{&value&: 0, &type&: &int64&},
{&value&: 1.0e+3, &type&: &decimal&}
#!/usr/bin/env hy
(import os.path)
(import hy.compiler)
(import hy.core)
;; absolute path for Hy core
(setv *core-path* (os.path.dirname hy.core.--file--))
(defn collect-macros [collected-names opened-file]
(while True
(let [data (read opened-file)]
(if (and (in (first data)
'(defmacro defmacro/g! defn))
(not (.startswith (second data) &_&)))
(.add collected-names (second data))))
(except [e EOFError] (break)))))
(defmacro core-file [filename]
`(open (os.path.join *core-path* ~filename)))
(defmacro contrib-file [filename]
`(open (os.path.join *core-path* &..& &contrib& ~filename)))
(defn collect-core-names []
(doto (set)
(.update hy.core.language.*exports*)
(.update hy.core.shadow.*exports*)
(collect-macros (core-file &macros.hy&))
(collect-macros (core-file &bootstrap.hy&))))
; boilerplate
name = &some_name&
authors = [&Author&]
description = &This is \
a description&
name = ${NAME}
default = True
counter = 1_000
BEGIN_PROVIDER [ integer(bit_kind), psi_det_sorted_bit, (N_int,2,psi_det_size) ]
&BEGIN_PROVIDER [ double precision, psi_coef_sorted_bit, (psi_det_size,N_states) ]
implicit none
! Determinants on which we apply &i|H|psi& for perturbation.
! They are sorted by determinants interpreted as integers. Useful
! to accelerate the search of a random determinant in the wave
! function.
integer :: i,j,k
integer, allocatable ::
integer*8, allocatable :: bit_tmp(:)
integer*8, external :: det_search_key
allocate ( iorder(N_det), bit_tmp(N_det) )
do i=1,N_det
iorder(i) = i
!DIR$ FORCEINLINE
bit_tmp(i) = det_search_key(psi_det(1,1,i),N_int)
call isort(bit_tmp,iorder,N_det)
!DIR$ IVDEP
do i=1,N_det
do j=1,N_int
psi_det_sorted_bit(j,1,i) = psi_det(j,1,iorder(i))
psi_det_sorted_bit(j,2,i) = psi_det(j,2,iorder(i))
do k=1,N_states
psi_coef_sorted_bit(i,k) = psi_coef(iorder(i),k)
deallocate(iorder, bit_tmp)
END_PROVIDER
* @author John Smith &john.&
package l2f.gameserver.
public abstract class L2Char extends L2Object {
public static final Short ERROR = 0x0001;
public void moveTo(int x, int y, int z) {
log(&Should not be called&);
if (1 & 5) { // wtf!?
JavaScript
function $initHighlight(block, cls) {
if (cls.search(/\bno\-highlight\b/) != -1)
return process(block, true, 0x0F) +
` class=&${cls}&`;
} catch (e) {
/* handle exception */
for (var i = 0 / 2; i & classes. i++) {
if (checkCondition(classes[i]) === undefined)
console.log('undefined');
jms-queue add --queue-address=myQueue --entries=queue/myQueue
deploy /path/to/file.war
/system-property=prop1:add(value=value1)
/extension=org.jboss.as.modcluster:add
./foo=bar:remove
/subsystem=security/security-domain=demo-realm/authentication=classic:add
/subsystem=security/security-domain=demo-realm/authentication=classic/login-module=UsersRoles:add( \
code=UsersRoles, \
flag=required, \
module-options=
usersProperties=auth/demo-users.properties, \
rolesProperties =auth/demo-roles.properties,
hashAlgorithm= MD5, \
hashCharset=&UTF-8&
&title&: &apples&,
&count&: [1],
&description&: {&text&: &...&, &sensitive&: false}
&title&: &oranges&,
&count&: [17500, null],
&description&: {&text&: &...&, &sensitive&: false}
Julia REPL
julia& function foo(x) x + 1 end
foo (generic function with 1 method)
julia& foo(42)
julia& foo(42) === 43.
Here we match all three lines of code:
julia& function foo(x::Float64)
foo (generic function with 2 methods)
julia& for x in Any[1, 2, 3.4]
println(&foo($x) = $(foo(x))&)
foo(1) = 2
foo(2) = 3
foo(3.4) = 38.6
... unless it is not properly indented:
julia& function foo(x)
Ordinary Julia code does not get highlighted:
Pkg.add(&Combinatorics&)
abstract type Foo end
# Old-style definitions
immutable Point{T&:AbstractFloat}
index::Int
abstract A
type B &: A end
typealias P Point{Float16}
# New-style definitions
struct Plus
f::typeof(+)
mutable struct Mut
mutable::A
# mutable should not be highlighted (not followed by struct)
primitive::B
# primitive should not be highlighted (not followed by type)
primitive type Prim 8 end
abstract type Abstr end
### Modules
importall Z
export a, b, c
end # module
baremodule Bare
### New in 0.6
# where, infix isa, UnionAll
function F{T}(x::T) where T
for i in x
i isa UnionAll && return
### Miscellaneous
function method0(x, y::I version::VersionNumber=v&0.1.2&)
@assert π & e
変数 = &variable&
if s * 100_000 ≥ 5.2e+10 && true || x === nothing
s = 1. + .5im
elseif 1 ∈ [1, 2, 3]
println(&s is $s and 変数 is $変数&)
x = [1 2 3; 4 5 6]
@show x'
local var = rand(10)
global g = 44
var[5:end-1]
opt = &-la&
run(`ls $opt`)
ccall(:lib, (Ptr{Void},), Ref{C_NULL})
throw(ArgumentError(&wat&))
warn(&god save the queen&)
'\u2200' != 'T'
return 5s / 2
import kotlin.lang.test
fun xxx() : Int {
return 888
public fun main(args : Array&String&) {
&?LassoScript
/* Lasso 8 */
local('query' = 'SELECT * FROM `'+var:'table'+'` WHERE `id` & 10
ORDER BY `Name` LIMIT 30');
Inline: -Username=$DBuser, -Password=$DBpass, -Database=$DBname, -sql=#
var(&class1.name& = (found_count != 0 ? &subtotal& | &nonefound&),
&total_amount& = found_count || &No results&);
output: &&tr&&loop_count&&/tr&&;
?&&div class=&[$class1.name]&&[$total_amount]&/div&
/* Lasso 9 */ ?&
[noprocess] causes [delimiters] to be &?=skipped?& until the next [/noprocess]
define strings.combine(value::string, ...other)::string =& {
local(result = #value-&append(#other-&asString&trim))
return set(#result, not #other, \givenBlock)
/**! descriptive text */
define person =& type {
parent entity
data name::string, protected nickname, birthdate :: date
data private ssn = null
private showAge() =& frozen { return ..age }
protected fullName() =& `&` + .nickname + `&` + .'name'
public ssnListed::boolean =& .ssn() ? true | false
define person-&name=(value) =& {
.'name' = #value
return self-&'name'
define bytes-&+(rhs::bytes) =& bytes(self)-&append(#rhs)&
] &!-- an HTML comment &?=disables delimiters?& as well --&
[no_square_brackets] disables [square brackets] for the rest of the file
// query expression
with n in array((:-12, 0xABCD, 3.14159e14), (:NaN, -infinity, .57721))
let swapped = pair(#n-&\second, #n-&first)
group #swapped by #n-&first into t
let key = #t-&key
order by #key
select pair(#key, #1)
#n-&upperCase
# Example LDAP user
dn: uid=user.0,ou=People,dc=example,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
givenName: Morris
cn: Morris Day
initials: MD
employeeNumber: 0
uid: user.0
mail: user.
userPassword: password
telephoneNumber: +1 042 100 3866
homePhone: +1 039 680 4135
pager: +1 284 199 0966
mobile: +1 793 707 0251
street: 90280 Spruce Street
l: Minneapolis
postalCode: 50401
postalAddress: Morris Day$90280 Spruce Street$Minneapolis, MN
description: This is the description for Morris Day.
#empty(friends) {
Try adding some friends!
} ##loop(friends, &friend&) {
&li& #(friend.name) &/li&
#someTag(parameter.list, goes, &here&) {
This is an optional body here
#index(friends, &0&) {
Hello, #(self)!
} ##else() {
Nobody's there!
&li& Hello &/li&
@import &fruits&;
@rhythm: 1.5
@media screen and (min-resolution: 2dppx) {
body {font-size: 125%}
section & .foo + #bar:hover [href*=&less&] {
@rhythm 0 0 @
calc(5% + 20px);
background: #f00ba7 url(http://placehold.alpha-centauri/42.png) no-
background-image: linear-gradient(-135deg, wheat, fuchsia) !
background-blend-mode:
@font-face {
font-family: /* ? */ 'Omega';
src: url('../fonts/omega-webfont.woff?v=2.0.2');
.icon-baz::before {
font-family: &Omega&, Alpha, sans-
rgba(98, 76 /* or 54 */, 231, .75);
#!/usr/bin/env csi
(defun prompt-for-cd ()
(prompt-read &Title& 1.53 1 2/4 1.7 1.7e0 2.9E-4 +42 -7 #b001 #b001/100 #o777 #O777 #xabc55 #c(0 -5.6))
(prompt-read &Artist& &rest)
(or (parse-integer (prompt-read &Rating&) :junk-allowed t) 0)
(if x (format t &yes&) (format t &no& nil) ;and here comment
; second line comment
'(+ 1 2)
(defvar *lines*) list of all lines
(position-if-not #'sys::whitespacep line :start beg))
(quote (privet 1 2 3))
'(hello world)
(1 2 34 5)
(:use &aaaa&)
(let ((x 10) (y 20))
(print (+ x y))
global gControllerHandlers, gData
local sTest
put &blog,index& into gControllerHandlers
command blog
-- simple comment
put &Hello World!& into sTest
# ANOTHER COMMENT
put &form,url,asset& into tHelpers
rigLoadHelper tHelpers
block comment!*/
function myFunction
if the secs &
put &Welcome to the future!&
return &something&
end myFunction
--| END OF blog.lc
--| Location: ./system/application/controllers/blog.lc
----------------------------------------------------------------------
LiveScript
# take the first n objects from a list
take = (n, [x, ...xs]:list) --&
| empty list =& []
| otherwise
=& [x] ++ take n - 1, xs
take 2, [1, 2, 3, 4, 5]
# Curried functions
take-three = take 3
take-three [6, 7, 8, 9, 10]
# Function composition
last-three = reverse && take-three && reverse
last-three [1 to 8]
# List comprehensions and piping
name: 'george'
name: 'mike'
name: 'donald'
[{id:id1, name, age}
for {id:id1, name} in t1
for {id:id2, age} in t2
where id1 is id2]
|& sort-by \id
|& JSON.stringify
; ModuleID = 'test.c'
target datalayout = &e-m:e-i64:64-f80:128-n8:16:32:64-S128&
target triple = &x86_64-unknown-linux-gnu&
%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
%struct.what = type { i8, i16 }
@.str = private unnamed_addr constant [6 x i8] c&foo()\00&, align 1
@e_long = common global i64 0, align 8
@g_double = common global double 0., align 8
@.str.1 = private unnamed_addr constant [7 x i8] c&oooooh\00&, align 1
@func_ptr = common global i32 (...)* null, align 8
@.str.2 = private unnamed_addr constant [8 x i8] c&success\00&, align 1
@.str.3 = private unnamed_addr constant [9 x i8] c&FizzBuzz\00&, align 1
@.str.4 = private unnamed_addr constant [5 x i8] c&Fizz\00&, align 1
@.str.5 = private unnamed_addr constant [5 x i8] c&Buzz\00&, align 1
@.str.6 = private unnamed_addr constant [4 x i8] c&%zd\00&, align 1
@.str.7 = private unnamed_addr constant [2 x i8] c&\0A\00&, align 1
@.str.8 = private unnamed_addr constant [12 x i8] c&%d, %c, %d\0A\00&, align 1
@.str.9 = private unnamed_addr constant [11 x i8] c&need args!\00&, align 1
@stderr = external global %struct._IO_FILE*, align 8
; Function Attrs: nounwind uwtable
define i32 @foo() #0 {
%1 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0))
declare i32 @puts(i8*) #1
; Function Attrs: nounwind uwtable
define i32 @main(i32 %argc, i8** %argv) #0 {
%1 = alloca i32, align 4
%2 = alloca i32, align 4
%3 = alloca i8**, align 8
%b_char = alloca i8, align 1
%d_int = alloca i32, align 4
%cp_char_ptr = alloca i8*, align 8
%X = alloca %struct.what, align 2
%i = alloca i64, align 8
store i32 0, i32* %1, align 4
store i32 %argc, i32* %2, align 4
store i8** %argv, i8*** %3, align 8
%4 = load i8**, i8*** %3, align 8
%5 = load i32, i32* %2, align 4
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %11
; &label&:7
preds = %0
%8 = getelementptr inbounds %struct.what, %struct.what* %X, i32 0, i32 0
store i8 1, i8* %8, align 2
store i8 49, i8* %b_char, align 1
%9 = getelementptr inbounds %struct.what, %struct.what* %X, i32 0, i32 1
store i16 128, i16* %9, align 2
store i32 65536, i32* %d_int, align 4
store i64 , i64* @e_long, align 8
store double 1., double* @g_double, align 8
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8** %cp_char_ptr, align 8
store i32 (...)* bitcast (i32 ()* @foo to i32 (...)*), i32 (...)** @func_ptr, align 8
%10 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i32 0, i32 0))
store i32 10, i32* %1, align 4
br label %66
; &label&:11
preds = %0
%12 = load i32, i32* %2, align 4
%13 = icmp eq i32 %12, 2
br i1 %13, label %14, label %63
; &label&:14
preds = %11
store i64 0, i64* %i, align 8
br label %15
; &label&:15
preds = %43, %14
%16 = load i64, i64* %i, align 8
%17 = icmp ult i64 %16, 100
br i1 %17, label %18, label %46
; &label&:18
preds = %15
%19 = load i64, i64* %i, align 8
%20 = urem i64 %19, 15
%21 = icmp ne i64 %20, 0
br i1 %21, label %24, label %22
; &label&:22
preds = %18
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i32 0, i32 0))
br label %41
; &label&:24
preds = %18
%25 = load i64, i64* %i, align 8
%26 = urem i64 %25, 3
%27 = icmp ne i64 %26, 0
br i1 %27, label %30, label %28
; &label&:28
preds = %24
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0))
br label %40
; &label&:30
preds = %24
%31 = load i64, i64* %i, align 8
%32 = urem i64 %31, 5
%33 = icmp ne i64 %32, 0
br i1 %33, label %36, label %34
; &label&:34
preds = %30
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0))
br label %39
; &label&:36
preds = %30
%37 = load i64, i64* %i, align 8
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i64 %37)
br label %39
; &label&:39
preds = %36, %34
br label %40
; &label&:40
preds = %39, %28
br label %41
; &label&:41
preds = %40, %22
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0))
br label %43
; &label&:43
preds = %41
%44 = load i64, i64* %i, align 8
%45 = add i64 %44, 1
store i64 %45, i64* %i, align 8
br label %15
; &label&:46
preds = %15
%47 = getelementptr inbounds %struct.what, %struct.what* %X, i32 0, i32 0
store i8 1, i8* %47, align 2
store i8 49, i8* %b_char, align 1
%48 = getelementptr inbounds %struct.what, %struct.what* %X, i32 0, i32 1
store i16 128, i16* %48, align 2
store i32 65536, i32* %d_int, align 4
store i64 , i64* @e_long, align 8
store double 1., double* @g_double, align 8
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i8** %cp_char_ptr, align 8
store i32 (...)* bitcast (i32 ()* @foo to i32 (...)*), i32 (...)** @func_ptr, align 8
%49 = getelementptr inbounds %struct.what, %struct.what* %X, i32 0, i32 0
%50 = load i8, i8* %49, align 2
%51 = trunc i8 %50 to i1
%52 = zext i1 %51 to i32
%53 = load i8, i8* %b_char, align 1
%54 = sext i8 %53 to i32
%55 = getelementptr inbounds %struct.what, %struct.what* %X, i32 0, i32 1
%56 = load i16, i16* %55, align 2
%57 = sext i16 %56 to i32
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i32 0, i32 0), i32 %52, i32 %54, i32 %57)
%59 = getelementptr inbounds %struct.what, %struct.what* %X, i32 0, i32 0
%60 = load i8, i8* %59, align 2
%61 = trunc i8 %60 to i1
%62 = zext i1 %61 to i32
store i32 %62, i32* %1, align 4
br label %66
; &label&:63
preds = %11
%64 = load %struct._IO_FILE*, %struct._IO_FILE** @stderr, align 8
%65 = call i32 @fputs(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i32 0, i32 0), %struct._IO_FILE* %64)
store i32 -1, i32* %1, align 4
br label %66
; &label&:66
preds = %63, %46, %7
%67 = load i32, i32* %1, align 4
ret i32 %67
declare i32 @printf(i8*, ...) #1
declare i32 @fputs(i8*, %struct._IO_FILE*) #1
attributes #0 = { nounwind uwtable &disable-tail-calls&=&false& &less-precise-fpmad&=&false& &no-frame-pointer-elim&=&true& &no-frame-pointer-elim-non-leaf& &no-infs-fp-math&=&false& &no-nans-fp-math&=&false& &stack-protector-buffer-size&=&8& &target-cpu&=&x86-64& &target-features&=&+fxsr,+mmx,+sse,+sse2& &unsafe-fp-math&=&false& &use-soft-float&=&false& }
attributes #1 = { &disable-tail-calls&=&false& &less-precise-fpmad&=&false& &no-frame-pointer-elim&=&true& &no-frame-pointer-elim-non-leaf& &no-infs-fp-math&=&false& &no-nans-fp-math&=&false& &stack-protector-buffer-size&=&8& &target-cpu&=&x86-64& &target-features&=&+fxsr,+mmx,+sse,+sse2& &unsafe-fp-math&=&false& &use-soft-float&=&false& }
!llvm.ident = !{!0}
!0 = !{!&clang version 3.8.0 (tags/RELEASE_380/final)&}
Linden Scripting Language
state_entry()
llSay(PUBLIC_CHANNEL, &Hello, Avatar!&);
touch_start(integer num_detected)
llSay(PUBLIC_CHANNEL, &Touched.&);
Simple signal/slot implementation
local signal_mt = {
__index = {
register = table.insert
function signal_mt.__index:emit(... --[[ Comment in params ]])
for _, slot in ipairs(self) do
slot(self, ...)
local function create_signal()
return setmetatable({}, signal_mt)
-- Signal test
local signal = create_signal()
signal:register(function(signal, ...)
print(...)
signal:emit('Answer to Life, the Universe, and Everything:', 42)
--[==[ [=[ [[
multi-line ]=]
comment ]==]
[==[ Nested
[=[ multi-line
]] ]=] ]==]
# Makefile
?= $(BUILDDIR)/extras
.PHONY: main clean
@echo &Building main facility...&
build_main $(BUILDDIR)
rm -rf $(BUILDDIR)/*
# hello world
you can write text [with links](http://example.com) inline or [link references][1].
* one _thing_ has *em*phasis
* two __things__ are **bold**
[1]: http://example.com
hello world
===========
&this_is inline=&xml&&&/this_is&
& markdown is so cool
so are code segments
1. one thing (yeah!)
2. two thing `i can write code`, and `more` wipee!
Mathematica
(* ::Package:: *)
(* Mathematica Package *)
BeginPackage[&SomePkg`&]
Begin[&`Private`&]
SomeFn[ns_List] := Fold[Function[{x, y}, x + y], 0, Map[# * 2 &, ns]];
Print[$ActivationKey];
End[] (* End Private Context *)
EndPackage[]
n = 20; % number of points
points = [random('unid', 100, n, 1), random('unid', 100, n, 1)];
len = zeros(1, n - 1);
points = sortrows(points);
%% Initial set of points
plot(points(:,1),points(:,2));
for i = 1: n-1
len(i) = points(i + 1, 1) - points(i, 1);
while(max(len) & 2 * min(len))
[d, i] = max(len);
k = on_margin(points, i, d, -1);
m = on_margin(points, i + 1, d, 1);
xm = 0; ym = 0;
%% New point
if(i == 1 || i + 1 == n)
xm = mean(points([i,i+1],1))
ym = mean(points([i,i+1],2))
[xm, ym] = dlg1(points([k, i, i + 1, m], 1), ...
points([k, i, i + 1, m], 2))
points = [ points(1:i, :); [xm, ym]; points(i + 1:end, :)];
This is a block comment. Please ignore me.
function [net] = get_fit_network(inputs, targets)
% Create Network
numHiddenNeurons = 20;
% Adjust as desired
net = newfit(inputs,targets,numHiddenNeurons);
net.trainParam.goal = 0.01;
net.trainParam.epochs = 1000;
% Train and Apply Network
[net,tr] = train(net,inputs,targets);
foo_matrix = [1, 2, 3; 4, 5, 6]''';
foo_cell = {1, 2, 3; 4, 5, 6}''.'.';
cell2flatten = {1,2,3,4,5};
flattenedcell = cat(1, cell2flatten{:});
/* Maxima computer algebra system */
/* symbolic constants */
[true, false, unknown, inf, minf, ind,
und, %e, %i, %pi, %phi, %gamma];
/* programming keywords */
if a then b el
for x:1 thru 10 step 2 do print(x);
for z:-2 while z & 0 do print(z);
for m:0 unless m & 10 do print(m);
for x in [1, 2, 3] do print(x);
/* built-in variables */
[_, __, %, %%, linel, simp, dispflag,
stringdisp, lispdisp, %edispflag];
/* built-in functions */
[sin, cosh, exp, atan2, sqrt, log, struve_h,
sublist_indices, read_array];
/* user-defined symbols */
[foo, ?bar, baz%, quux_mumble_blurf];
/* symbols using Unicode characters */
[?, Щ, щ, ?, ЩЩЩ, ????щ];
/* numbers */
ibase : 18 $
[0, ., 0abcdefgh];
reset (ibase) $
[.5e+0, 12.34B56];
/* strings */
s1 : &\&now\& is&;
s2 : &the 'time' for all good men&;
print (s1, s2, &to come to the aid&,
&of their country&);
/* expressions */
foo (x, y, z) :=
if x & 1 + y
then z - x*y
elseif y &= 100!
then x/(y + z)^2
else z - y . x .
proc string[] getSelectedLights()
string $selectedLights[];
string $select[] = `ls -sl -dag -leaf`;
for ( $shape in $select )
// Determine if this is a light.
string $class[] = getClassification( `nodeType $shape` );
if ( ( `size $class` ) & 0 && ( &light& == $class[0] ) )
$selectedLights[ `size $selectedLights` ] = $
// Result is an array of all lights included in
// current selection list.
return $selectedL
% &Hello World& in Mercury.
:- module hello.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
io.write_string(&Hello, world\n&, !IO).
:- pred filter(pred(T), list(T), list(T), list(T) ).
:- mode filter(in(pred(in) is semidet), in, out, out ) is det.
filter(_, [], [], []).
filter(P, [X | Xs], Ys, Zs) :-
filter(P, Xs, Ys0, Zs0),
Ys = [X | Ys0],
Zs = [X | Zs0]
MIPS Assembly
.global AckermannFunc
# Preconditions:
1st parameter ($a0) m
2nd parameter ($a1) n
# Postconditions:
result in ($v0) = value of A(m,n)
AckermannFunc:
$s0, 4($sp)
$ra, 0($sp)
# move the parameter registers to temporary
- no, only when nec.
$a0, $zero, LABEL_ELSE_IF
$v0, $a1, 1
# jump to LABEL_DONE
j LABEL_DONE
::: ## Lambda calculus
vocabularies LAMBDA,
NAT_1, XBOOLE_0, SUBSET_1, FINSEQ_1, XXREAL_0, CARD_1,
ARYTM_1, ARYTM_3, TARSKI, RELAT_1, ORDINAL4, FUNCOP_1;
reserve D for DecoratedTree,
p,q,r for FinSequence of NAT,
definition
attr D is LambdaTerm-like means
(dom D qua Tree) is finite &
for r st r in dom D holds
r is FinSequence of {0,1} &
r^&*0*& in dom D implies D.r = 0;
registration
cluster LambdaTerm-like for DecoratedTree of NAT;
definition
mode LambdaTerm is LambdaTerm-like DecoratedTree of NAT;
::: Then we extend this ordinary one-step beta reduction, that is,
any subterm is also allowed to reduce.
definition
pred M beta N means
M|p beta_shallow N|p &
for q st not p is_a_prefix_of q holds
[r,x] in M iff [r,x] in N;
theorem Th4:
ProperPrefixes (v^&*x*&) = ProperPrefixes v \/ {v}
thus ProperPrefixes (v^&*x*&) c= ProperPrefixes v \/ {v}
assume y in ProperPrefixes (v^&*x*&);
then consider v1 such that
A1: y = v1 and
A2: v1 is_a_proper_prefix_of v^&*x*& by TREES_1:def 2;
v1 is_a_prefix_of v & v1 && v or v1 = v by A2,TREES_1:9;
v1 is_a_proper_prefix_of v or v1 in {v} by TARSKI:def 1,XBOOLE_0:def 8;
y in ProperPrefixes v or y in {v} by A1,TREES_1:def 2;
hence thesis by XBOOLE_0:def 3;
assume y in Proper

我要回帖

更多关于 wow 4.34 的文章

 

随机推荐