Good Haskell source to read and learn from [closed]

What I recommend. Read code by people from different grad schools in the 1990s Oxford style Glasgow style or (this) Chalmers style (or this) York style Portland style or OGI style (or this) Utrecht style Yale style Special case: CMU/Elliott Read code by the old masters certain people (incomplete list) Marlow; Paterson; Peyton Jones; Gill; … Read more

Declaring multiple variables in JavaScript

The first way is easier to maintain. Each declaration is a single statement on a single line, so you can easily add, remove, and reorder the declarations. With the second way, it is annoying to remove the first or last declaration because they start from the var keyword and finish with the semicolon respectively. Every … Read more

Vim 80 column layout concerns

As of vim 7.3, you can use set colorcolumn=80 (set cc=80 for short). Since earlier versions do not support this, my .vimrc uses instead: if exists(‘+colorcolumn’) set colorcolumn=80 else au BufWinEnter * let w:m2=matchadd(‘ErrorMsg’, ‘\%>80v.\+’, -1) endif See also the online documentation on the colorcolumn option.

#pragma once vs include guards? [duplicate]

I don’t think it will make a significant difference in compile time but #pragma once is very well supported across compilers but not actually part of the standard. The preprocessor may be a little faster with it as it is more simple to understand your exact intent. #pragma once is less prone to making mistakes … Read more

Why do most fields (class members) in Android tutorial start with `m`?

This notation comes from AOSP (Android Open Source Project) Code Style Guidelines for Contributors: Follow Field Naming Conventions Non-public, non-static field names start with m. Static field names start with s. Other fields start with a lower case letter. Public static final fields (constants) are ALL_CAPS_WITH_UNDERSCORES. Note that the linked style guide is for code … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)