Tutorial by Examples: n

Classes can implement more than one interface, as opposed to inheriting from more than one class (Multiple Inheritance) which isn't possible for Delphi classes. To achieve this, the name of all interfaces must be added comma-separated behind the base class. Of course, the implementing class must al...
Interfaces can inherit from each other, exactly like classes do, too. An implementing class thus has to implement functions of the interface and all base interfaces. This way, however, the compiler doesn't know that the implenting class also implements the base interface, it only knows of the interf...
Since the declaration of variables in interfaces isn't possible, the "fast" way of defining properites (property Value: TObject read FValue write FValue;) can't be used. Instead, the Getter and setter (each only if needed) have to be declared in the interface, too. IInterface = interface(...
Get a list of all jobs in the current session: Get-Job Waiting on a job to finish before getting the result: $job | Wait-job | Receive-Job Timeout a job if it runs too long (10 seconds in this example) $job | Wait-job -Timeout 10 Stopping a job (completes all tasks that are pending in t...
When using the DllImport attribute you have to know the correct dll and method name at compile time. If you want to be more flexible and decide at runtime which dll and methods to load, you can use the Windows API methods LoadLibrary(), GetProcAddress() and FreeLibrary(). This can be helpful if the ...
A Syntax Tree is an immutable data structure representing the program as a tree of names, commands and marks (as previously configured in the editor.) For example, assume a Microsoft.CodeAnalysis.Compilation instance named compilation has been configured. There are multiple ways to list the names o...
The outline-style property is used to set the style of the outline of an element. p { border: 1px solid black; outline-color:blue; line-height:30px; } .p1{ outline-style: dotted; } .p2{ outline-style: dashed; } .p3{ outline-style: solid; } .p4{ outline-style: double; }...
Name-based virtual hosting on Apache is described on the Apache website as such: With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address. Therefore, more than...
This command will save the open file with sudo rights :w !sudo tee % >/dev/null You can also map w!! to write out a file as root :cnoremap w!! w !sudo tee % >/dev/null
A mixin is just a module that can be added (mixed in) to a class. one way to do it is with the extend method. The extend method adds methods of the mixin as class methods. module SomeMixin def foo puts "foo!" end end class Bar extend SomeMixin def baz puts "...
Add this to your $MYVIMRC: " Source vim configuration file whenever it is saved if has ('autocmd') " Remain compatible with earlier versions augroup Reload_Vimrc " Group name. Always use a unique name! autocmd! " Clear any preexisting autoc...
:autocmd BufWritePost * if &diff | diffupdate | endif
Get NSData from Hexadecimal String + (NSData *)dataFromHexString:(NSString *)string { string = [string lowercaseString]; NSMutableData *data= [NSMutableData new]; unsigned char whole_byte; char byte_chars[3] = {'\0','\0','\0'}; int i = 0; int length = (int) string.len...
An SSH key has two pieces, the public key and the private key. The private key: Is usually in a file named id_rsa, but it can be given any name. CANNOT BE REGENERATED IF LOST!!!! Do not lose this file! If you lose it, you will not be able to get back into your instance. (StackOverflow is li...
A Semantic Model offers a deeper level of interpretation and insight of code compare to a syntax tree. Where syntax trees can tell the names of variables, semantic models also give the type and all references. Syntax trees notice method calls, but semantic models give references to the precise locat...
Create a file named '.jshintrc' in the root of your app, where package.json is. *Note on windows: create a file named "jshintrc.txt". Then rename it to ".jshintrc." (notice the dot at the end). This is a configuration file. It can for example tell jshint to ignore certain varia...
RxSwift offers many ways to create an Observable, let's take a look: import RxSwift let intObservale = Observable.just(123) // Observable<Int> let stringObservale = Observable.just("RxSwift") // Observable<String> let doubleObservale = Observable.just(3.14) // Observable&...
After the subscription was created, it is important to manage its correct deallocation. The docs told us that If a sequence terminates in finite time, not calling dispose or not using addDisposableTo(disposeBag) won't cause any permanent resource leaks. However, those resources will be used unti...

int

Denotes a signed integer type with "the natural size suggested by the architecture of the execution environment", whose range includes at least -32767 to +32767, inclusive. int x = 2; int y = 3; int z = x + y; Can be combined with unsigned, short, long, and long long (q.v.) in order...
You can restart ubuntu from command line. Below is example of restarting ubuntu immediately. sudo reboot You need to have sudo privilege in order to use this command. Another commands with same results are sudo shutdown -r now and sudo init 6.

Page 544 of 1088