Tutorial by Examples

When you implement java.io.Serializable interface to make a class serializable, the compiler looks for a static final field named serialVersionUID of type long. If the class doesn't have this field declared explicitly then the compiler will create one such field and assign it with a value which come...
Converting an integer type to the corresponding promoted type is better than converting it to some other integer type. void f(int x); void f(short x); signed char c = 42; f(c); // calls f(int); promotion to int is better than conversion to short short s = 42; f(s); // calls f(short); exact mat...
To publish public repositories with a free npm account, you initially need to publish the module with access of public. One way to do this is to set the config for npm to read in packages.json as follows: "publishConfig": { "access": "public" }, you can also use...
Download the Atlassian conversion utility here. This utility requires Java, so please ensure that you have the Java Runtime Environment JRE installed on the machine you plan to do the conversion. Use the command java -jar svn-migration-scripts.jar verify to check if your machine is missing any of t...
The macro WITH-INPUT-FROM-STRING can be used to make a stream from a string. (with-input-from-string (str "Foobar") (loop for i from 0 for char = (read-char str nil nil) while char do (format t "~d: ~a~%" i char))) ; 0: F ; 1: o ; 2: o ; 3: b ;...
The macro WITH-OUTPUT-TO-STRING can be used to create a string output stream, and return the resulting string at the end. (with-output-to-string (str) (write-line "Foobar!" str) (write-string "Barfoo!" str)) ;=> "Foobar! ; Barfoo!" The same can be done ...
Gray streams are a non-standard extension that allows user defined streams. It provides classes and methods that the user can extend. You should check your implementations manual to see if it provides Gray streams. For a simple example, a character input stream that returns random characters could ...
A file can be opened for reading as a stream using WITH-OPEN-FILE macro. (with-open-file (file #P"test.file") (loop for i from 0 for line = (read-line file nil nil) while line do (format t "~d: ~a~%" i line))) ; 0: Foobar ; 1: Barfoo ; 2: Quuxbar...
A file can be opened for writing as a stream using WITH-OPEN-FILE macro. (with-open-file (file #P"test.file" :direction :output :if-exists :append :if-does-not-exist :create) (dolist (line '("Foobar" &q...
Installing Tcl 8.6.4 on Windows : The easiest way to get Tcl on a windows machine is to install the ActiveTcl distribution from ActiveState. Navigate to www.activestate.com and follow the links to download the Free Community Edition of ActiveTcl for Windows (choose 32/64 bit version app...

CSS

This binding will apply the supplied CSS class to the element. Static classes are applied when the given conditions are loosely-evaluated to true. Dynamic classes use the value of an observable or computed. page.html <p data-bind="css: { danger: isInDanger }">Checks external expres...
Method stopLoading() stops the current loading process of the webview. Swift webview.stopLoading() Objective-C [webview stopLoading];
Swift webview.reload() Objective-C [webview reload];
git show shows various Git objects. For commits: Shows the commit message and a diff of the changes introduced. CommandDescriptiongit showshows the previous commitgit show @~3shows the 3rd-from-last commit For trees and blobs: Shows the tree or blob. CommandDescriptiongit show @~3:shows the ...
Whatever you do to customize Vim, it should NEVER happen outside of $HOME: on Linux, BSD and Cygwin, $HOME is usually /home/username/, on Mac OS X, $HOME is /Users/username/, on Windows, $HOME is usually C:\Users\username\. The canonical location for your vimrc and your vim directory is at ...
There are three kinds of options: boolean options, string options, number options. To check the value of an option, use :set option? to check the value of an option, use :verbose set option? to also see where it was last set. Setting boolean options set booloption " Set boo...
Don't put comments after mappings, it will break things. Use :map <F6> to see what is mapped to <F6> and in which mode. Use :verbose map <F6> to also see where it was last mapped. :map and :map! are too generic. Use :n[nore]map for normal mode mappings, :i[nore]map for insert ...
Like most scripting languages, vimscript has variables. One can define a variable with the :let command: let variable = value and delete it with :unlet: unlet variable In Vim, variables can be scoped by prepending a single letter and a colon to their name. Plugin authors use that feature to...
Don't forget the bang to allow Vim to overwrite that command next time you reload your vimrc. Custom commands must start with an uppercase character. Examples command! MyCommand call SomeFunction() command! MyOtherCommand command | Command | command See :help user-commands.
Don't forget the bang to allow Vim to overwrite that function next time you reload the script where the function is defined. Custom functions must start either with an uppercase character (global functions), or with s: (script local functions), or they must be prefixed with the name associated to...

Page 392 of 1336