Adicionando o repositório:
$ sudo add-apt-repository ppa:webupd8team/javaCaso esse comando não seja encontrado:
$ sudo apt-get install software-properties-common python-software-properties| import sublime, sublime_plugin, datetime | |
| class InsertTimeCommand(sublime_plugin.TextCommand): | |
| def run(self, edit): | |
| date_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') | |
| for r in self.view.sel(): | |
| self.view.replace(edit, r, date_time) |
| jQuery.fn.disable = function(){ | |
| return this.each(function(){ | |
| if(typeof this.disabled != "undefined") this.disabled=true | |
| }); | |
| } |
| <?php | |
| function is_json($string) | |
| { | |
| json_decode($string); | |
| return (json_last_error() == JSON_ERROR_NONE); | |
| } |
| <?php | |
| function validate_email($email) { | |
| if (filter_var($email, FILTER_VALIDATE_EMAIL)) | |
| return true; | |
| return false; | |
| } | |
| var_dump(validate_email("me@example.com")); |
| { | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", | |
| "font_size": 10, | |
| "caret_style": "wide", | |
| "highlight_line": true, | |
| "line_padding_bottom": 1, | |
| "line_padding_top": 1, | |
| "fade_fold_buttons": false, | |
| "ignored_packages": | |
| [ |
| git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
Adicionando o repositório:
$ sudo add-apt-repository ppa:webupd8team/javaCaso esse comando não seja encontrado:
$ sudo apt-get install software-properties-common python-software-properties| syntax on | |
| set background=dark | |
| set colorcolumn=120 | |
| set encoding=utf-8 | |
| set expandtab | |
| set hidden | |
| set laststatus=2 | |
| set listchars=eol:⏎,tab:>-,trail:⌀,extends:>,precedes:<,conceal:-,nbsp:. | |
| set nolist | |
| set number |
| package main | |
| import "fmt" | |
| func ReadParams(size int) (params []int) { | |
| var param int | |
| for i := 0; i < size; i++ { | |
| _,err := fmt.Scanf("%d", ¶m) | |
| if err == nil { | |
| params = append(params, param) |
| package main | |
| import "fmt" | |
| type person struct { | |
| age int | |
| } | |
| func (p person) NewPerson(initialAge int) person { | |
| //Add some more code to run some checks on initialAge | |
| if initialAge <= 0 { |