Tutorial by Examples: er

In Tcl itself, a string consisting of a single word does not need to be quoted. In the language of expression strings that expr evaluates, all operands must have an identifiable type. Numeric operands are written without any decoration: expr {455682 / 1.96e4} So are boolean constants: expr {tr...
Navigation controller can be embed in each tabs using storyboard it self. It can be like in the screenshot added. To add a Navigation Controller to a View Controller connecting from Tab Bar Controller, here are the flow Select the view controller for which we need to add navigation controller. H...
The tr method returns a copy of a string where the characters of the first argument are replaced by the characters of the second argument. "string".tr('r', 'l') # => "stling" To replace only the first occurrence of a pattern with with another expression use the sub method ...
We can use org.apache.commons.lang3.RandomUtils to generate random numbers using a single line. int x = RandomUtils.nextInt(1, 1000); The method nextInt(int startInclusive, int endExclusive) takes a range. Apart from int, we can generate random long, double, float and bytes using this class. R...
One Button Swift class ViewController: UIViewController { @IBAction func showAlertButtonTapped(sender: UIButton) { // create the alert let alert = UIAlertController(title: "My Title", message: "This is my message.", preferredStyle: UIAlertCo...
Front matter tells Jekyll to parse a file. You add predefined variables, which are YAML sets, to the front matter. Then, you can use Liquid tags in your files to access the front matter. Front matter is indicated with two triple-dashed lines. You must place the variables between the two triple-dash...
When using clustered index, the rows of the table are sorted by the column to which the clustered index is applied. Therefore, there can be only one clustered index on the table because you can't order the table by two different columns. Generally, it is best to use clustered index when performing ...
Nonclustered indexes are stored separately from the table. Each index in this structure contains a pointer to the row in the table which it represents. This pointers are called a row locators. The structure of the row locator depends on whether the data pages are stored in a heap or a clustered tab...
Below code showcases multiple Producer/Consumer program. Both Producer and Consumer threads share same global queue. import java.util.concurrent.*; import java.util.Random; public class ProducerConsumerWithES { public static void main(String args[]) { BlockingQueue<Integer> ...
Config a remote for my fork $ cd my_local_repo $ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git # Specify a new remote upstream repository that will be synced with the fork $ git remote -v # Verify the new upstream repository specified for my f...
Go to the GitHub website Open your repository Click Settings Under GitHub Pages, click "Launch Automatic Page Generator" Follow the instructions
Run the following command, replacing username with the username, to clone all of the GitHub repositories for that user to the current directory. curl "https://api.github.com/users/username/repos?page=1&per_page=100" | grep -e 'git_url*' | cut -d \" -f 4 | xargs -L1 git clone T...
From highest to lowest, this is the precedence table for Ruby. High precedence operations happen before low precedence operations. ╔═══════════════════════╦════════════════════════════════════════╦═════════╗ ║ Operators ║ Operations ║ Method? ║ ╠═══════════...
If a class raises a large the number of events, the storage cost of one field per delegate may not be acceptable. The .NET Framework provides event properties for these cases. This way you can use another data structure like EventHandlerList to store event delegates: public class SampleClass { ...
OperatorDescription==true if the two values are equal.!=true if the two values are not equal.<true if the value of the operand on the left is less than the value on the right.>true if the value of the operand on the left is greater than the value on the right.>=true if the value of the oper...
Placing date_default_timezone_set('Asia/Kolkata'); on config.php above base URL also works. PHP List of Supported Time Zones application/config.php <?php defined('BASEPATH') OR exit('No direct script access allowed'); date_default_timezone_set('Asia/Kolkata'); Another way I have found...
Html has beginnerProgram mostly for learning purposes. beginnerProgram is not capable of handling Subscriptions or running Commands. It is only capable of handling user input from DOM Events. It only requires a view to render the model and an update function to handle state changes. Example Con...
This will create a timer to call the doSomething method on self in 5.0 seconds. [NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(doSomething) userInfo:nil repeats:NO]; Setting the repeats parameter to false/NO indicates that we...
[timer invalidate]; timer = nil; This will stop the timer from firing. Must be called from the thread the timer was created in, see Apple's notes: You must send this message from the thread on which the timer was installed. If you send this message from another thread, the input source associ...
[timer fire]; Calling the fire method causes an NSTimer to perform the task it would have usually performed on a schedule. In a non-repeating timer, this will automatically invalidate the timer. That is, calling fire before the time interval is up will result in only one invocation. In a repeat...

Page 160 of 417