Tutorial by Examples: e

ShortcutDescriptionCtrl + rsearch the history backwardsCtrl + pprevious command in historyCtrl + nnext command in historyCtrl + gquit history searching modeAlt + .use the last word of the previous commandrepeat to get the last word of the previous + 1 commandAlt + n Alt + .use the nth word of the pr...
ShortcutDescriptionCtrl + amove to the beginning of the lineCtrl + emove to the end of the lineCtrl + kKill the text from the current cursor position to the end of the line.Ctrl + uKill the text from the current cursor position to the beginning of the lineCtrl + wKill the word behind the current cur...
Converter between boolean and visibility. Get bool value on input and returns Visibility value. NOTE: This converter have already exists in System.Windows.Controls namespace. public sealed class BooleanToVisibilityConverter : IValueConverter { /// <summary> /// Convert bool or Nu...
Show how to create simple converter with parameter via property and then pass it in declaration. Convert bool value to Visibility. Allow invert result value by setting Inverted property to True. public class BooleanToVisibilityConverter : IValueConverter { public bool Inverted { get; set; } ...
Show how to create simple IMultiValueConverter converter and use MultiBinding in xaml. Get summ of all values passed by values array. public class AddConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { ...
Show how to create simple converter and use ConverterParameter to pass parameter to converter. Multiply value by coefficient passed in ConverterParameter. public class MultiplyConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo cult...
There are a few ways to determine the current shell echo $0 ps -p $$ echo $SHELL
To change the current bash run these commands export SHELL=/bin/bash exec /bin/bash to change the bash that opens on startup edit .profile and add those lines
package { import flash.events.TimerEvent; import flash.events.TimerEvent; import flash.utils.Timer; public class RandomTimer extends Timer { public var minimumDelay:Number; public var maximumDelay:Number; private var _count:uint = 0; privat...
If we want to get the x-cordinate of origin of the view, then we need to write like: view.frame.origin.x For width, we need to write: view.frame.size.width But if we add a simple extension to an UIView, we can get all the attributes very simply, like: view.x view.y view.width view.height...
This is very useful when setting indent of your code if condition1 if condition2 # some commands here endif endif move your cursor to the 2nd line, then >>, the code will indent to right. Now you can repeat your action by continue to 3rd line, then hit . twice, the result will be if ...
vim-pathogen is a runtimepath manager created by Tim Pope to make it easy to install plugins and runtime files in their own private directories. Installing Pathogen Put pathogen in ~/.vim/bundle (here with Git, but it's not mandatory): git clone https://github.com/tpope/vim-pathogen.git ...
String and char-like variables can be concatenated using ABAP CONCATENATE command. An extra variable for storing the results is required. Example: CONCATENATE var1 var2 var3 INTO result. "result now contains the values of var1, var2 & var3 stringed together without spaces Shorthand ...
The hooks feature can be globally enabled/disabled by setting the following item in the application/config/config.php file: $config['enable_hooks'] = TRUE;
Hooks are defined in the application/config/hooks.php file. Each hook is specified as an array with this prototype $hook['pre_controller'] = array( 'class' => 'MyClass', 'function' => 'Myfunction', 'filename' => 'Myclass.php', 'filepath' => 'h...
If you use the paste command from your terminal emulator program, Vim will interpret the stream of characters as if they were typed. That will cause all kind of undesirable effects, particularly bad indendation. To fix that, from command mode: :set paste Then move on to insert mode, with i, for...
$ IFS= read -r foo <<EOF > this is a \n line >EOF $ printf '%s\n' "$foo" this is a \n line
$ read -r foo <<EOF > this is a line >EOF $ printf '%s\n' "$foo" this is a line
Even if third-party libraries are good, a simple way to parse the JSON is provided by protocols You can imagine you have got an object Todo as struct Todo { let comment: String } Whenever you receive the JSON, you can handle the plain NSData as shown in the other example using NSJSONSeria...
Static variables and methods are not part of an instance, There will always be a single copy of that variable no matter how many objects you create of a particular class. For example you might want to have an immutable list of constants, it would be a good idea to keep it static and initialize it j...

Page 469 of 1191