package local
// Default is the translations dir.
const (
DefaultDir = "translations" // 默认: $(RootFS)/translations
DefaultEnv = "GODOC_LOCAL_ROOT" // 优先取环境变量, 支持多个目录
)
// Init initialize the translations environment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void HandleRpcs() { | |
new CallData(&service_, cq_.get()); | |
void* tag; | |
bool ok; | |
while (true) { | |
switch (cq_->AsyncNext(&tag, &ok, gpr_inf_past) { | |
case TIMEOUT: | |
doSomethingElseForALittleWhile(); | |
continue; | |
case SHUTDOWN: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<NotepadPlus> | |
<UserLang name="rust" ext="rs" udlVersion="2.1"> | |
<Settings> | |
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments">00// 00/// 01 02 03/* 03/** 03/*! 04*/</Keywords> | |
<Keywords name="Numbers, prefix1"></Keywords> | |
<Keywords name="Numbers, prefix2">0x 0b</Keywords> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2015 <chaishushan{AT}gmail.com>. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// +build ingore | |
package main | |
import ( | |
"flag" |
// golang/go#10597 // test
func TestDecodeInvalidDataType(t *testing.T) {
b, err := ioutil.ReadFile("../testdata/bw-uncompressed.tiff")
if err != nil {
t.Fatal(err)
}
<!-- This is a comment. -->
[comment]: <> (This is a comment, it will not be included)
[comment]: <> (in the output file unless you use it in)
[comment]: <> (a reference style link.)
[//]: <> (This is also a comment.)
作为一个Gopher, 当然是首选 Tab
缩进.
对于C++来说, 有些不理想的编码风格导致会出现缩进不是Tab整数倍的情形:
https://code.google.com/p/protobuf/source/browse/trunk/src/google/protobuf/descriptor.cc#518
// Find symbols. These return a null Symbol (symbol.IsNull() is true)
// if not found.
inline Symbol FindNestedSymbol(const void* parent,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (C) 1999 Lucent Technologies */ | |
/* Excerpted from 'The Practice of Programming' */ | |
/* by Brian W. Kernighan and Rob Pike */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "eprintf.h" | |
#include <stdarg.h> | |
#include <string.h> | |
#include <errno.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (C) 1999 Lucent Technologies */ | |
/* Excerpted from 'The Practice of Programming' */ | |
/* by Brian W. Kernighan and Rob Pike */ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "eprintf.h" | |
int grep(char*, FILE*, char*); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://play.golang.org/p/068n_JHmQU | |
package main | |
import ( | |
"fmt" | |
"image" | |
"reflect" | |
) |