Tutorial by Examples: c

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
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 ...
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...
$ 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...
Instead of using the delegate pattern, that split the implementation in various part of the UIViewController class, you can even use closures to pass data back and forward. By assuming that you're using the UIStoryboardSegue, in the prepareForSegue method you can easily setup the new controller in ...
Check existing partitions on Schema SELECT * FROM user_tab_partitions;
Select data from a partition SELECT * FROM orders PARTITION(partition_name);
ALTER TABLE table_name TRUNCATE PARTITION partition_name;
ALTER TABLE table_name MOVE PARTITION partition_name TABLESPACE tablespace_name;
Using some setters, without setting all needed properties in the constructor(s) public final class Person { // example of a bad immutability private final String name; private final String surname; public Person(String name) { this.name = name; } public String ge...
When working with Azure using PowerShell there are 2 different ways you should be aware of and you will see a lot of the Microsoft documentation referring to both of them: "Classic mode (Service Management)" This is the old way of operating Azure and managing Azure. There is still some s...
When you have multiple subscriptions under your Azure account; it's important that you are selecting the one you wish to operate on (and use this as default); to avoid accidents happening to resources on the wrong subscription. Classic mode Set-AzureSubscription Select-AzureSubscription Resou...
The AND keyword is used to add more conditions to the query. NameAgeGenderSam18MJohn21MBob22MMary23F SELECT name FROM persons WHERE gender = 'M' AND age > 20; This will return: NameJohnBob using OR keyword SELECT name FROM persons WHERE gender = 'M' OR age < 20; This will return: n...
Magento custom module development is a core part of any Magento development or Magento project, because at any stage you may want to integrate your own functionality/module in your existing Magento project. The first thing developers should disable is the system cache. Otherwise developing will bec...
Create a new project with the Leiningen figwheel template: lein new figwheel hello-world Run Figwheel: cd hello-world lein figwheel After a moment it will start a development webserver and open the page in your browser. It also opens a Clojurescript REPL connected to the browser. Try enter...

Page 330 of 826