Tutorial by Examples

For those that are using UI to branch click Right Mouse on repository then Tortoise Git -> Create Branch... New window will open -> Give branch a name -> Tick the box Switch to new branch (Chances are you want to start working with it after branching). -> Click OK and you should be do...
In order to execute a block of code over an over again, loops comes into the picture. The for loop is to be used when a block of code is to executed a fixed number of times. For example, in order to fill an array of size n with the user inputs, we need to execute scanf() for n times. C99 #include...
If we have a Model as following, from django.db import models from django.contrib.auth.models import User class UserModuleProfile(models.Model): user = models.OneToOneField(User) expired = models.DateTimeField() admin = models.BooleanField(default=False) employee_id = models...
The Just-In-Time (JIT) compiler is a component of the Java™ Runtime Environment that improves the performance of Java applications at run time. Java programs consists of classes, which contain platform-neutral bytecodes that can be interpreted by a JVM on many different computer architectures...
To view an browse Vaadin add-ons in the Directory, you must be registered to vaadin.com. After the initial discovery of artifact details, e.g. for download and usage, registration is not required. Also, the usage of add-ons in a Maven project is not IDE-specific and the same instructions apply. Fro...
Partial classes provide a clean way to separate core logic of your scripts from platform specific methods. Partial classes and methods are marked with the keyword partial. This signals the compiler to leave the class "open" and look in other files for the rest of the implementation. // E...
CoffeeScript provides a basic class structure that allows you to name your class, set the superclass, assign prototypal properties, and define the constructor, in a single assignable expression. Small example below: class Animal constructor: (@name) -> move: (meters) -> alert @n...
If you feel the need to extend an object's prototype, :: gives you quick access to an it so you can add methods to it and later use this method on all instances of that method. String::dasherize = -> this.replace /_/g, "-" The above example will give you the ability to use the da...
flatMap is similar to map. The difference is described by the javadoc as follows: This method is similar to map(Function), but the provided mapper is one whose result is already an Optional, and if invoked, flatMap does not wrap it with an additional Optional. In other words, when you chain a...
TL; DR: CoffeeScript switch statements use when for each case and else for the default case. They use then for one-line cases and commas for multiple cases with a single outcome. They intentionally disallow fallthrough and so don't need an explicit break (since it's always there implicitly). A switc...
The & operator is the parent selector. When used in or as a selector, it is replaced with the full parent selectors (entire sequence of selectors right upto to the topmost level of a nested block) in the final CSS output. It is useful when creating nested rules that require using the parent sel...
Less allows the usage of the parent selector (&) anywhere in a complex selector and thus allows changing styles when the current element is within another element which gives it a different context: For example, in the below code the parent selector is placed at the end and thus it actually be...
In Less you can write much more simple CSS rules and also keep them well formatted, so instead of writing this code: CSS .item { border: 1px solid; padding: 4px; } .item .content, .item .image { float: left; } .item .content { font-size: 12px; } .item .image { width: 300px; }...
The @import statement allows you to insert CSS/Less code from another file into your own CSS/Less file. .foo { background: #900; } @import "my-other-css-file.css"; @import "my-other-less-file.less";
Import the class, which contains the method to be tested. Perform the operation with dummy data. Now compare the result of operation with expected result. - (void)testReverseString{ NSString *originalString = @"hi_my_name_is_siddharth"; NSString *reversedString = [self.someObject ...
- (void)testDoSomethingThatTakesSomeTime{ XCTestExpectation *completionExpectation = [self expectationWithDescription:@"Long method"]; [self.someObject doSomethingThatTakesSomeTimesWithCompletionBlock:^(NSString *result) { XCTAssertEqualObjects(@"result", result, @"Re...
1. For Synchronous methods : - (void)testPerformanceReverseString { NSString *originalString = @"hi_my_name_is_siddharth"; [self measureBlock:^{ [self.someObject reverseString:originalString]; }]; } 2. For Asynchronous methods : - (void)testPerformanceOfAsynch...
Run all tests by choosing Product > Test. Click the Test Navigator icon to view the status and results of the tests. You can add a test target to a project (or add a class to a test) by clicking the Add (plus) button in the bottom-left corner of the test navigator. To view the source code for a ...
Make sure that include unit test case box is checked when creating a new project as shown below:
You want to add a signature to a PDF in a way that a standard conform PDF viewer (e.g. Adobe Reader) will recognize, display, and validate as an integrated PDF signature. In that case you cannot simply externally create a signature covering the original PDF as is and expect to now have to merely so...

Page 710 of 1336