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. python-django框架中使用FastDFS分布式文件系统

    一.安装FastDFS 1-1:执行docker命令安装 # 安装tracker docker run -dti --network=host --name tracker -v /var/fdfs/ ...

  2. JVM 内存分析

    简述JVM垃圾回收机制 垃圾回收机制时Java提供的自动释放内存空间的机制. 垃圾回收机制时JVM自导的一个线程,用于回收没有被引用的对象. JVM有一个运行时的数据区来管理内存.其主要包括五大部分: ...

  3. applicationContext中普通数据源不用jndi数据源

    applicationContext.xml <?xml version="1.0" encoding="UTF-8"?> <beans xm ...

  4. PartTime_一些网站

    1. http://www.sxsoft.com/ 貌似 搜搜"破解",无符合条件的结果 http://www.taskcity.com/ "智城",貌似 符合 ...

  5. linux yum 安装

    ################## http://rpm.pbone.net/ 下载下来的包放到本地yum源中,然后在这个目录下面重新生成依赖关系就可以使用yum包来完成安装了 tt 1. 生成依赖 ...

  6. 《java学习三》并发编程 -------线程池原理剖析

    阻塞队列与非阻塞队 阻塞队列与普通队列的区别在于,当队列是空的时,从队列中获取元素的操作将会被阻塞,或者当队列是满时,往队列里添加元素的操作会被阻塞.试图从空的阻塞队列中获取元素的线程将会被阻塞,直到 ...

  7. 事务的隔离级别和mysql事务隔离级别修改

    A事务做了操作 没有提交 对B事务来说 就等于没做 获取的都是之前的数据 但是 在A事务中查询的话 查到的都是操作之后的数据 没有提交的数据只有自己看得到,并没有update到数据库. 查看InnoD ...

  8. Mvc异常处理器

    using System; using System.Text; using EMS.Domains.Core; using System.Web.Mvc; using Json.Net; using ...

  9. nodejs 实践:express 最佳实践(八) egg.js 框架的优缺点

    nodejs 实践:express 最佳实践(八) egg.js 框架的优缺点 优点 所有的 web开发的点都考虑到了 agent 很有特色 文件夹规划到位 扩展能力优秀 缺点 最大的问题在于: 使用 ...

  10. vue-cli 该如何正确打包iconfont?

    其实这种问题应该问google的: got wrong bootstrap font path after building · Issue #166 · vuejs-templates/webpac ...