Tutorial by Examples

Suppose we have a file cat -n lorem_ipsum.txt 1 Lorem Ipsum is simply dummy text of the printing and typesetting industry. 2 Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen...
Follow this steps for adding splash screen into WPF application in Visual Studio: Create or get any image and add it to your project (e.g. inside Images folder): Open properties window for this image (View → Properties Window) and change Build Action setting to SplashScreen value: R...
If your application is lightweight and simple, it will launch very fast, and with similar speed will appear and disappear splash screen. As soon as splash screen disappearing after Application.Startup method completed, you can simulate application launch delay by following this steps: Open App.x...
AWK often used for manipulating entire files containing a list of strings. Let's say file awk_test_file.txt contains: First String Second String Third String To convert all the strings to lower case execute: awk '{ print tolower($0) }' awk_test_file.txt This will result: first string se...
General overview The background-size property enables one to control the scaling of the background-image. It takes up to two values, which determine the scale/size of the resulting image in vertical and and horizontal direction. If the property is missing, its deemed auto in both width and height....
Using The Terminal The examples in this document assume that you are using a POSIX-compliant (such as bash, sh, zsh, ksh) shell. Large portions of GNU/Linux functionality are achieved using the terminal. Most distributions of Linux include terminal emulators that allow users to interact with a...
# This comment occupies a whole line - some item # This comment succeeds content of a line - http://example.com/#nocomment - "This # does not introduce a comment." - | This is a block scalar. A # inside it does not introduce a comment. # unless it is less indented than th...
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...
ShortcutDescriptionCtrl + cStop the current jobCtrl + zSuspend the current job (send a SIGTSTP signal)
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 ...

Page 530 of 1336