Tutorial by Examples

String html = "<!DOCTYPE html>" + "<html>" + "<head>" + "<title>Hello world!</title>" + "</head>" + "<body>" + ...
When you make a label and set its text to be more than a single line that it can display, it will be truncated and you will see only one line of text ending with three dots (...). This is because a property called numberOfLines is set to 1, and therefore only one line will be displayed. It is a comm...
UIButtons can be initialized in a frame: Swift let button = UIButton(frame: CGRect(x: x, y: y, width: width, height: height) Objective C UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(x, y, width, height)]; A specific type of UIButton can be created like this: Swift let but...
Swift button.setTitle(titleString, forState: controlState) Objective C [button setTitle:(NSString *) forState:(UIControlState)]; To set the default title to "Hello, World!" Swift button.setTitle("Hello, World!", forState: .normal) Objective C [button setTitle:@&quot...
//Swift button.setTitleColor(color, forControlState: controlState) //Objective-C [button setTitleColor:(nullable UIColor *) forState:(UIControlState)]; To set the title color to blue //Swift button.setTitleColor(.blue, for: .normal) //Objective-C [button setTitleColor:[UIColor blueColo...
Swift //Align contents to the left of the frame button.contentHorizontalAlignment = .left //Align contents to the right of the frame button.contentHorizontalAlignment = .right //Align contents to the center of the frame button.contentHorizontalAlignment = .center //Make contents fill th...
The underlying title label, if one exists, can be fetched using Swift var label: UILabel? = button.titleLabel Objective C UILabel *label = button.titleLabel; This can be used to set the font of the title label, for example Swift button.titleLabel?.font = UIFont.boldSystemFontOfSize(12) ...
This page describes how to use the Meteor command-line tool (for example, when downloading packages, deploying your app, etc) behind a proxy server. Like a lot of other command-line software, the Meteor tool reads the proxy configuration from the HTTP_PROXY and HTTPS_PROXY environment variables (th...
You can use the nil coalescing operator to unwrap a value if it is non-nil, otherwise provide a different value: func fallbackIfNil(str: String?) -> String { return str ?? "Fallback String" } print(fallbackIfNil("Hi")) // Prints "Hi" print(fallbackIfNil(nil)...
If you don't want to add Unix commands to your PATH on Windows, you can download a standalone SSH client like PuTTY. Download PuTTY here, then follow the instructions below to get a build machine. Call meteor admin get-machine <os-architecture> --json Copy and save the private key from the...
The easiest way to get up and running is to install Git for Windows from this download page, and select "Use Git and optional Unix tools from the Windows Command Prompt" as in the screenshot below. After this, meteor admin get-machine <os-architecture> will work exactly as it does...
The Autocomplete widgets provides suggestions while you type into the field. <script> $(document).ready(function() { var tags = ["ask","always", "all", "alright", "one", "foo", "blackberry", "tweet","...
The datepicker is used to show an interactive date selector which is tied to a standard form input field. It makes selecting of date for input tasks very easy and also it is also highly configurable. Any input field can be bound with jquery-ui datepicker by the input field's selector (id,class etc....
Dialog is a window which is overlay positioned within the viewport. <script> $(function() { $( "#dialog" ).dialog(); }); </script> <div id="dialog" title="Basic dialog"> <p>This is the default dialog which is useful for displayin...
Enable draggable functionality on any DOM element. <script> $(function() { $( "#draggable" ).draggable(); }); </script> <div id="draggable" class="ui-widget-content"> <p>Drag me around</p> </div>
To get the physical size of the screen (including window chrome and menubar/launcher): var width = window.screen.width, height = window.screen.height;
To get the “available” area of the screen (i.e. not including any bars on the edges of the screen, but including window chrome and other windows: var availableArea = { pos: { x: window.screen.availLeft, y: window.screen.availTop }, size: { width: window.scr...
To determine the color and pixel depths of the screen: var pixelDepth = window.screen.pixelDepth, colorDepth = window.screen.colorDepth;
<?php echo get_bloginfo( 'name' ); ?> or <?php echo get_bloginfo(); ?> Output Matt Mullenweg Based on these sample settings
<?php echo get_bloginfo( 'description' ); ?> Output Just another WordPress site Based on these sample settings

Page 63 of 1336