c++

  1. #include <iostream>
  2. int main(int argc, char *argv[]) {
  3. /* An annoying "Hello World" example */
  4. for (auto i = 0; i < 0xFFFF; i++)
  5. cout << "Hello, World!" << endl;
  6. char c = '\n';
  7. unordered_map <string, vector<string> > m;
  8. m["key"] = "\\\\"; // this is an error
  9. return -2e3 + 12l;
  10. }

c#

  1. using System.IO.Compression;
  2. #pragma warning disable 414, 3021
  3. namespace MyApplication
  4. {
  5. [Obsolete("...")]
  6. class Program : IInterface
  7. {
  8. public static List<int> JustDoIt(int count)
  9. {
  10. Console.WriteLine($"Hello {Name}!");
  11. return new List<int>(new int[] { 1, 2, 3 })
  12. }
  13. }
  14. }

css

  1. @font-face {
  2. font-family: Chunkfive; src: url('Chunkfive.otf');
  3. }
  4. body, .usertext {
  5. color: #F0F0F0; background: #600;
  6. font-family: Chunkfive, sans;
  7. }
  8. @import url(print.css);
  9. @media print {
  10. a[href^=http]::after {
  11. content: attr(href)
  12. }
  13. }

http

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

ini

  1. ; boilerplate
  2. [package]
  3. name = "some_name"
  4. authors = ["Author"]
  5. description = "This is \
  6. a description"
  7. [[lib]]
  8. name = ${NAME}
  9. default = True
  10. auto = no
  11. counter = 1_000

js

  1. function $initHighlight(block, cls) {
  2. try {
  3. if (cls.search(/\bno\-highlight\b/) != -1)
  4. return process(block, true, 0x0F) +
  5. ` class="${cls}"`;
  6. } catch (e) {
  7. /* handle exception */
  8. }
  9. for (var i = 0 / 2; i < classes.length; i++) {
  10. if (checkCondition(classes[i]) === undefined)
  11. console.log('undefined');
  12. }
  13. }
  14. export $initHighlight;

json

  1. [
  2. {
  3. "title": "apples",
  4. "count": [12000, 20000],
  5. "description": {"text": "...", "sensitive": false}
  6. },
  7. {
  8. "title": "oranges",
  9. "count": [17500, null],
  10. "description": {"text": "...", "sensitive": false}
  11. }
  12. ]

nginx

  1. user www www;
  2. worker_processes 2;
  3. pid /var/run/nginx.pid;
  4. error_log /var/log/nginx.error_log debug | info | notice | warn | error | crit;
  5. events {
  6. connections 2000;
  7. use kqueue | rtsig | epoll | /dev/poll | select | poll;
  8. }
  9. http {
  10. log_format main '$remote_addr - $remote_user [$time_local] '
  11. '"$request" $status $bytes_sent '
  12. '"$http_referer" "$http_user_agent" '
  13. '"$gzip_ratio"';
  14. send_timeout 3m;
  15. client_header_buffer_size 1k;
  16. gzip on;
  17. gzip_min_length 1100;
  18. #lingering_time 30;
  19. server {
  20. server_name one.example.com www.one.example.com;
  21. access_log /var/log/nginx.access_log main;
  22. rewrite (.*) /index.php?page=$1 break;
  23. location / {
  24. proxy_pass http://127.0.0.1/;
  25. proxy_redirect off;
  26. proxy_set_header Host $host;
  27. proxy_set_header X-Real-IP $remote_addr;
  28. charset koi8-r;
  29. }
  30. location /api/ {
  31. fastcgi_pass 127.0.0.1:9000;
  32. }
  33. location ~* \.(jpg|jpeg|gif)$ {
  34. root /spool/www;
  35. }
  36. }
  37. }

python

  1. @requires_authorization
  2. def somefunc(param1='', param2=0):
  3. r'''A docstring'''
  4. if param1 > param2: # interesting
  5. print 'Gre\'ater'
  6. return (param2 - param1 + 1 + 0b10l) or None
  7. class SomeClass:
  8. pass
  9. >>> message = '''interpreter
  10. ... prompt'''

txt

  1. @requires_authorization
  2. def somefunc(param1='', param2=0):
  3. r'''A docstring'''
  4. if param1 > param2: # interesting
  5. print 'Gre\'ater'
  6. return (param2 - param1 + 1 + 0b10l) or None
  7. class SomeClass:
  8. pass
  9. >>> message = '''interpreter
  10. ... 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. P4769 [NOI2018]冒泡排序(dp)

    传送门 日常膜拜shadowice巨巨的题解 //minamoto #include<bits/stdc++.h> #define R register #define ll long l ...

  2. 微信小程序采坑之上拉触底加载更多和下拉刷新

    小程序中加载更多数据一般都是触底刷新 有自带的函数: onReachBottom: function (){} 但是在使用时触发完全没有反应,后来尝试给外层加了一个高度,解决问题 仔细想想也是,没有设 ...

  3. PAT甲级——1102 Invert a Binary Tree (层序遍历+中序遍历)

    本文同步发布在CSDN:https://blog.csdn.net/weixin_44385565/article/details/90577042 1102 Invert a Binary Tree ...

  4. ES6新特性使用小结(五)

    十二.class 与 extends ①.类的基本定义和生成实例 { class Parent{ constructor(name='Lain'){ //定义构造函数 this.name = name ...

  5. beanshell解析json(从简单到复杂)

    使用beanshell 解析单层Json: Json 数据如下: { "status":200, "code": 0, "message": ...

  6. 056 Merge Intervals 合并区间

    给出一个区间的集合, 请合并所有重叠的区间.示例:给出 [1,3],[2,6],[8,10],[15,18],返回 [1,6],[8,10],[15,18].详见:https://leetcode.c ...

  7. c#基础_ArrayList

    list.AddRange(new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }); //list.AddRange(list); //list.Clear();清空所有元素 ...

  8. [转]Todd.log - a place to keep my thoughts on programming 分布式架构中的幂等性

    Todd.log - a place to keep my thoughts on programming 理解HTTP幂等性 基于HTTP协议的Web API是时下最为流行的一种分布式服务提供方式. ...

  9. vuejs 组件 移动端push 没有渲染页面

    this.idcards.push(arr) 这个无效 就知道了 vuejs有个跟push相同的方法 console.log(this.list.push.toString()) 这个push是个同名 ...

  10. Wrinkles should merely indicate where smiles have been.

    Wrinkles should merely indicate where smiles have been. 皱纹应该只是微笑留下的印记.