Tutorial by Examples: al

@IBOutlet weak var title: UILabel! { didSet { label.textColor = UIColor.redColor() label.font = UIFont.systemFontOfSize(20) label.backgroundColor = UIColor.blueColor() } } It's also possible to both set a value and initialize it: private var loginButton = UIButton() { ...
This is similar in syntax to the example that initializes using positional constants, but requires the Then extension from https://github.com/devxoul/Then (attached below). let label = UILabel().then { $0.textAlignment = .Center $0.textColor = UIColor.blackColor( $0.text = "Hell...
//Swift let storyboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle()) //Objective-c UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
//Swift let initialScreen = storyboard.instantiateInitialViewController() //Objective-c UIViewController *initailScreen = [storyboard instantiateInitialViewController];
public class MyDataExporterToExcell { public static void Main() { GetAndExportExcelFacade facade = new GetAndExportExcelFacade(); facade.Execute(); } } public class GetAndExportExcelFacade { // All services below do something by themselves, determine l...
Headers may be used to declare globally used read-only resources, like string tables for example. Declare those in a separate header which gets included by any file ("Translation Unit") which wants to make use of them. It's handy to use the same header to declare a related enumeration to ...
You can provide help for OpenFileDialog, SaveFileDialog and ColorDialog. To do so set ShowHelp property of dialog to true and handle HelpRequest event for dialog: void openFileDialog1_HelpRequest(object sender, EventArgs e) { //Perform custom action Help.ShowHelp(this, "Http://examp...
The protected internal keyword marks field, methods, properties and nested classes for use inside the same assembly or derived classes in another assembly: Assembly 1 public class Foo { public string MyPublicProperty { get; set; } protected internal string MyProtectedInternalPropert...
SELECT * FROM Cars WHERE status IN ( 'Waiting', 'Working' ) This is semantically equivalent to SELECT * FROM Cars WHERE ( status = 'Waiting' OR status = 'Working' ) i.e. value IN ( <value list> ) is a shorthand for disjunction (logical OR).
Default behavior when cloning an object is to perform a shallow copy of the object's fields. In that case, both the original object and the cloned object, hold references to the same objects. This example shows that behavior. import java.util.List; public class Sheep implements Cloneable { ...
Before we download and install Composer, we need to make sure our server has all dependencies installed. First, update the package manager cache by running: sudo apt-get update Now, let's install the dependencies. We'll need curl in order to download Composer and php5-cli for installing and run...
Here we will simply use the installer. This is the easiest way to get Composer set up on your machine. Download and run Composer-Setup.exe. It will install the latest composer version and set up your PATH so that you can just call composer from any directory in your command line. Note: Close your...
ABAP offers three different operators for declaring string- or char-like-variables SymbolsInternal TypeLengthName'...'C1-255 Charstext field literals`...`CString0-255 Charstext string literals|...|CString0-255 Charstemplate literals Note that the length-range only applies to hard coded values. Int...
From Autohotkey Site Documentation Go to the AutoHotkey Homepage. Click Download, once downloaded run the executable. During installation of AutoHotkey, you will be asked to choose from UNICODE or ANSI. In short, you would probably want to choose UNICODE. It has support for non-English letters ...
The easiest way to use Processing is by downloading the Processing editor from the Processing download page. That comes as a zip file. Unzip that file anywhere, and you'll have a directory that contains an executable (on Windows, that's processing.exe). Running that executable opens up the Process...
VBA is compiled in run-time, which has a huge negative impact on it's performance, everything built-in will be faster, try to use them. As an example I'm comparing SUM and COUNTIF functions, but you can use if for anything you can solve with WorkSheetFunctions. A first attempt for those would be t...
Use Dojo from CDN Load Dojo through <script> tags in your HTML page pointing to Google CDN. Example: <script src="//ajax.googleapis.com/ajax/libs/dojo/1.11.2/dojo/dojo.js"></script> Install Dojo with Bower Type the following command in your project directory: bowe...
Mage::app()->getStores(); Returns an array of Mage_Core_Model_Store models.
Command line You can use cpan to install modules directly from the command line: cpan install DBI This would be followed by possibly many pages of output describing exactly what it is doing to install the module. Depending on the modules being installed, it may pause and ask you questions. Int...
In the logging configuration file of your choice set the logging of the following packages to the levels shown.: # log the sql statement org.hibernate.SQL=DEBUG # log the parameters org.hibernate.type=TRACE There will probably be some logger specific prefixes that are required. Log4j config:...

Page 93 of 269