Array type includes the type and the length. So [2]int
is different from [3]int
.
Type binding (~ type alias)
type IntSlice []int
a := IntSlice{1, 2}
However, IntSlice
is different from []int
. []int
is the underlying type of IntSlice
.
import java.io.OutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.PrintWriter; | |
import java.util.StringTokenizer; | |
import java.io.IOException; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.io.InputStream; |
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
// Place your key bindings in this file to overwrite the defaults | |
[ | |
/** | |
* Group: Editing | |
* Prefix: ctrl+e | |
*/ | |
// Section: new bindings | |
{ | |
"key": "ctrl+e ctrl+f", | |
"command": "editor.action.format", |
{ | |
// Configure glob patterns for excluding files and folders. | |
"files.exclude": { | |
"**/.git": true, | |
"**/.DS_Store": true, | |
"**/*.cs.meta": true, | |
"**/node_modules": true | |
}, | |
"workbench.editor.showTabs": false, | |
"editor.renderIndentGuides": true, |
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with | |
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This | |
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise. | |
var gulp = require('gulp'), | |
spawn = require('child_process').spawn, | |
node; | |
/** | |
* $ gulp server | |
* description: launch the server. If there's a server already running, kill it. |
/// As of Dart 2.5, `enum` can still only support very simple use case. | |
/// To have a "rich enum" with custom value type and methods, we need | |
/// to use static class member. This is an example implementation. | |
void main() { | |
final s1 = 'done', s2 = 'waiting'; | |
final done = Enum.parse(Status.values, s1); | |
final waiting = Enum.parse(Status.values, s2); | |
print(done); |
(kMDItemContentCreationDate >= $time.today(-30)) && ((kMDItemContentTypeTree = public.content) || (kMDItemContentTypeTree = "com.microsoft.*"cdw) || (kMDItemContentTypeTree = public.archive)) |