Google C++ Style Guidenot required to end with Interface. Operator Overloading Overload operators judiciously. Do not create user-defined literals. C++ permits user code to declare overloaded versions of the built-in operators . MSVC offers #pragma pack() and __declspec(align()). • Use the LL or ULL suffixes as needed to create 64-bit constants. For exam- ple: int64_t my_value = 0x123456789LL; uint64_t my_mask = 3ULL << 48; std::vectorlookup_table = ...; std::vector indices = ...; // Captures `lookup_table` by reference, sorts `indices` by the value // of the associated element in `lookup_table`. std::sort(indices 0 码力 | 83 页 | 238.71 KB | 1 年前3
Google Python Style Guidelooks this way: . You may toggle all summaries with the big arrow button: Toggle all summaries Table of Contents Python Language Rules Lint Imports Packages Exceptions Global variables Nested/Local/Inner Definition: List comprehensions and generator expressions provide a concise and efficient way to create lists and iterators without resorting to the use of map(), filter(), or lambda. Pros: Simple list fetch_bigtable_rows(big_table, keys, other_silly_variable=None): """Fetches rows from a Bigtable. Retrieves rows pertaining to the given keys from the Table instance represented by big_table. Silly things may0 码力 | 30 页 | 94.81 KB | 1 年前3
Google's R Style Guideplace one after a comma. GOOD: tab.prior <- table(df[df$days.from.opt < 0, "campaign.id"]) total <- sum(x[, 1]) total <- sum(x[1, ]) BAD: tab.prior <- table(df[df$days.from.opt<0, "campaign.id"]) # Needs tab.prior <- table(df[df$days.from.opt < 0,"campaign.id"]) # Needs a space after the comma tab.prior<- table(df[df$days.from.opt < 0, "campaign.id"]) # Needs a space before <- tab.prior<-table(df[df$days space. Short comments can be placed after code preceded by two spaces, #, and then one space. # Create histogram of frequency of campaigns by pct budget spent. hist(df$pct.spent, breaks = "scott", # method0 码力 | 8 页 | 47.42 KB | 1 年前3
02 Scientific Reading and Writing - Introduction to Scientific Writing WS2021/22Reputation of website, authors, etc Recap: Give Credit Cite broadly, give credit to inspiring ideas, create connections Honestly acknowledge limitations of your approach Scientific Reading 8 706.015 Introduction meaning-carrying words Names: capitalize, e.g., Bayesian, Euclidean References like Figure 1, Table 2, Section 3, Chapter 4, Equation 5 are names as well Scientific Writing Figure~\ref{fig:exp1} previous papers) #2 Figure Plagiarism (Bad Idea) Never copy figures from other papers, web, etc Create all figures yourself, even for surveys (can be based on ideas of existing papers) Exceptions0 码力 | 26 页 | 613.57 KB | 1 年前3
Google Java Style Guideconsecutive fields (having no other code between them) is optional. Such blank lines are used as needed to create logical groupings of fields. • Exception: Blank lines between enum constants are covered in Sec- to read. It is not reasonable to assume that every reader has the entire Java operator precedence table memorized. 4.8 Specific constructs 4.8.1 Enum classes After each comma that follows an enum constant0 码力 | 19 页 | 84.76 KB | 1 年前3
01 Structure of Scientific Papers - Introduction to Scientific Writing WS2021/22PVLDB submission: 12 pages (+ more figures, experiments, etc) Solid, Reproducible Experiments Create, use, and share dedicated benchmarks / datasets Avoid weak baselines, start early w/ baseline comparisons Section n-1 Throughout the paper Give Credit Cite broadly, give credit to inspiring ideas, create connections Honestly acknowledge limitations of your approach Structure of Scientific Papers0 码力 | 36 页 | 1.12 MB | 1 年前3
03 Experiments, Reproducibility, and Projects - Introduction to Scientific Writing WS2021/22problem: “All code and data was on the student’s laptop and the student left / the laptop crashed.” Create value for others (compare, reuse, understand, extend) EU Projects: Mandatory proposal section &0 码力 | 31 页 | 1.38 MB | 1 年前3
共 7 条
- 1













