c++

#include <iostream>

int main(int argc, char *argv[]) {

  /* An annoying "Hello World" example */
for (auto i = 0; i < 0xFFFF; i++)
cout << "Hello, World!" << endl; char c = '\n';
unordered_map <string, vector<string> > m;
m["key"] = "\\\\"; // this is an error return -2e3 + 12l;
}

c#

using System.IO.Compression;

#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 })
}
}
}

css

@font-face {
font-family: Chunkfive; src: url('Chunkfive.otf');
} body, .usertext {
color: #F0F0F0; background: #600;
font-family: Chunkfive, sans;
} @import url(print.css);
@media print {
a[href^=http]::after {
content: attr(href)
}
}

http

POST /task?id=1 HTTP/1.1
Host: example.org
Content-Type: application/json; charset=utf-8
Content-Length: 137 {
"status": "ok",
"extended": true,
"results": [
{"value": 0, "type": "int64"},
{"value": 1.0e+3, "type": "decimal"}
]
}

ini

; boilerplate
[package]
name = "some_name"
authors = ["Author"]
description = "This is \
a description" [[lib]]
name = ${NAME}
default = True
auto = no
counter = 1_000

js

function $initHighlight(block, cls) {
try {
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.length; i++) {
if (checkCondition(classes[i]) === undefined)
console.log('undefined');
}
} export $initHighlight;

json

[
{
"title": "apples",
"count": [12000, 20000],
"description": {"text": "...", "sensitive": false}
},
{
"title": "oranges",
"count": [17500, null],
"description": {"text": "...", "sensitive": false}
}
]

nginx

user  www www;
worker_processes 2;
pid /var/run/nginx.pid;
error_log /var/log/nginx.error_log debug | info | notice | warn | error | crit; events {
connections 2000;
use kqueue | rtsig | epoll | /dev/poll | select | poll;
} http {
log_format main '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"'; send_timeout 3m;
client_header_buffer_size 1k; gzip on;
gzip_min_length 1100; #lingering_time 30; server {
server_name one.example.com www.one.example.com;
access_log /var/log/nginx.access_log main; rewrite (.*) /index.php?page=$1 break; location / {
proxy_pass http://127.0.0.1/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
charset koi8-r;
} location /api/ {
fastcgi_pass 127.0.0.1:9000;
} location ~* \.(jpg|jpeg|gif)$ {
root /spool/www;
}
}
}

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 >>> message = '''interpreter
... prompt'''

txt

@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 >>> message = '''interpreter
... prompt'''

测试 code style的更多相关文章

  1. Javascript Code Style Guide

    本指南采用的Airbnb发布的基于ES5的JavaScript Code Style. ES5 英文版:https://github.com/airbnb/javascript/tree/es5-de ...

  2. 与你相遇好幸运,The Moe Node.js Code Style Guide

    The Moe Node.js Code Style Guide  By 一个最萌的开发者 @2016.9.21 >>代码是人来阅读的,格式规范的代码是对编程人员最好的礼物 :) > ...

  3. Eclipse setting Java code style and codetemplate

    1.open the eclipse tool window First click the Window menu,then check the children's menu which name ...

  4. Java Code Style

    近期困惑于团队成员代码风格迥异,代码质量不可控,作为一名老司机,忧患于后期服务的可维护性,多次一对一的代码Review,耗时耗力不说,效果也不明显.痛定思痛,多次反思之后得出结论:无规矩不成方圆,可靠 ...

  5. 【Idea】idea code style配置eclipse code formatter

    在eclipse中有自动配置code style的功能 ,但是idea上却没有,这个时候需要自己手工配置 1. 在idea中找到Preference->Plugins->Browse re ...

  6. checkstyle.xml Code Style for Eclipse

    1. Code Templates [下载 Code Templates] 打开 Eclipse -> Window -> Preferences -> Java -> Cod ...

  7. _rqy's Code Style for OI

    _rqy's Code Style for OI Inspired by Menci's Code Style for OI 本文介绍_rqy的OI中的代码规范.其来源主要为_rqy的长期积累及参考G ...

  8. 在IntelliJ IDEA中配置Google Java Code Style及代码格式化快捷键

    google-java-format plugin should intercept the “Reformat Code” action in IDEA (Ctrl+Alt+L) and apply ...

  9. intelij IDEA设置goole code style风格

    1.安装google-java-format 插件      file ->Setings... ->pligins     输入上诉插件安装 2.下载IntelliJ Java Goog ...

随机推荐

  1. MySQL 之 LOAD DATA INFILE 快速导入数据

    SELECT INTO OUTFILE > help select; Name: 'SELECT' Description: Syntax: SELECT [ALL | DISTINCT | D ...

  2. IT兄弟连 JavaWeb教程 使用Servlet实现在页面中显示随机数

    在com.xdl.servlet包下定义RandomServlet类并HttpServlet类,在该类中生成随机数并发送给客户端.RandomServlet类详细代码如下: package com.x ...

  3. 源码构建Apollo以及改造

    1. 下载release版本 本次构建的是1.4.0的版本 2. 初始化数据库信息 数据库表信息 2.1 修改注册中心配置 初始化数据库表后,需要修改 ApolloConfigDB.ServerCon ...

  4. Java 环境问题汇总

    准备java环境时,需要设置JAVA_HOME 和 Path , CLASSPATH 环境变量,它们可以是用户变量,也可以是系统变量. 注意: 系统变量的路径排在用户变量之前. 其中,Windows操 ...

  5. JavaScript进阶 - 第6章 事件响应,让网页交互

    6-1什么是事件 JavaScript 创建动态页面.事件是可以被 JavaScript 侦测到的行为. 网页中的每个元素都可以产生某些可以触发 JavaScript 函数或程序的事件. 比如说,当用 ...

  6. [USACO07JAN]平衡的阵容Balanced Lineup

    [USACO07JAN]平衡的阵容Balanced Lineup 题目描述 For the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) a ...

  7. P4869 罪犯分组

    思路: 明显的dp,虽然我想到了二进制模拟,想到了转移,但还是先看了题解,原来真是这样,,,,不是第三题吗? 用f[i]表示,对于前i个罪犯最少需要分几组. 对于每个状态用二进制表示,第i位上1,0表 ...

  8. Php—AJAX跨域问题

    <?php /** * ajax proxy * ajax跨域解决办法 * @author  suconghou <suconghou@126.com> * @version v1. ...

  9. [转] java实现https请求

    package com.lichmama.test.util; import java.io.ByteArrayOutputStream; import java.io.IOException; im ...

  10. html学习笔记-DOM

    html学习笔记-DOM Table of Contents 1. 什么是 DOM? 2. DOM 节点 3. DOM 方法 4. DOM 属性 5. DOM 访问 6. DOM 修改 7. DOM ...