Tutorial by Examples: c

We usually don’t want to test everything in the scene for intersections (e.g., for collisions or for clicks). Selective intersections are good for performance to limit the number of entities to test for intersection since intersection testing is an operation that will run over 60 times per second. ...
Similar to aggregation methods also by the find() method you have the possibility to limit, skip, sort and count the results. Let say we have following collection: db.test.insertMany([ {name:"Any", age:"21", status:"busy"}, {name:"Tony", age:"...
In your build.gradle you need to add the below dependencies: debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' In your Application class yo...
If you have: infix fun <T> T?.shouldBe(expected: T?) = assertEquals(expected, this) you can write the following DSL-like code in your tests: @Test fun test() { 100.plusOne() shouldBe 101 }
For Swift 3.1: In the first example one can see how you would intercept the user interacting with a textfield while writing. Similarly, there are methods in the UITextFieldDelegate that are called when a user has started and ended his interaction with a TextField. To be able to access these method...
How we can use jenkins in our SalesForce product development. What are the tools plugins are available for Jenkins Integration How to solve CI configuration issue.....etc
A common problem might be trying to iterate over Array which has no values in it. For example: Dim myArray() As Integer For i = 0 To UBound(myArray) 'Will result in a "Subscript Out of Range" error To avoid this issue, and to check if an Array contains elements, use this oneliner: If...
The source is available for download from GitHub. Alternatively, you can install using npm: $ npm install --save async As well as using Bower: $ bower install async Example: var async = require("async"); async.parallel([ function(callback) { ... }, function(callback) { .....
Thankfully, libraries like Async.js exist to try and curb the problem. Async adds a thin layer of functions on top of your code, but can greatly reduce the complexity by avoiding callback nesting. Many helper methods exist in Async that can be used in different situations, like series, parallel, wa...
This example shows how to have a view track a pan gesture and depart in a physics-based manner. Swift class ViewController: UIViewController { // Adjust to change speed of view from flick let magnitudeMultiplier: CGFloat = 0.0008 lazy var dynamicAnimator: UIDynamicAnimator ...
This example shows how to achieve an effect similar to FaceTime were a view is attracted to point once it enters a particular region, in this case two regions a top and bottom. Swift class ViewController: UIViewController { lazy var dynamicAnimator: UIDynamicAnimator = { let ...
Example shows how to trigger an impact haptic using UIImpactFeedbackGenerator after a button press. Swift class ViewController: UIViewController { lazy var button: UIButton = { let button = UIButton() button.translatesAutoresizingMaskIntoConstraints = false se...
First, ensure you log in, and add the access_token to your request header. In this example, we're going to do some basic operations to access records. These use the Accounts module as an example, but other standard and custom modules (i.e. Leads, Contacts, Opportunities) behave in the same way. Cr...
4.4 Defaults [Beginning omitted: <<3.14>> isn't even legal syntax.] The default Size depends on the type. For integer it is 8. For float it is 64. For binary it is the actual size of the specified binary: 1> Bin = << 17/integer, 3.2/float, <<97, 98, 99>>/binary...
Except main @conditional annotation there are set of similar annotation to be used for different cases. Class conditions The @ConditionalOnClass and @ConditionalOnMissingClass annotations allows configuration to be included based on the presence or absence of specific classes. E.g. when OObjectDa...
A model (see: Model-View-Controller pattern) in Grails is represented by a so-called Domain Class. Domain classes can define both the persistence and presentation of information in grails. Domain classes can also contain validations. To manage a fleet of cars in your Grails application you could de...
Create a console application. Install EntityFramework nuget package by running Install-Package EntityFramework in "Package Manager Console" Add your connection string in app.config file , It's important to include providerName="System.Data.SqlClient" in your connection. Cre...
First, determine the source file for this particular driver. Found it at drivers/usb/serial/ftdi_sio.c. ./scripts/get_maintainer.pl drivers/usb/serial/ftdi_sio.c And the results: Johan Hovold <[email protected]> (maintainer:USB SERIAL SUBSYSTEM) Greg Kroah-Hartman <gregkh@linuxfounda...
This example shows how to create a custom presentation transition that is driven by a composite UIDynamicBehavior. We can start by creating a presenting view controller that will present a modal. Swift class PresentingViewController: UIViewController { lazy var button: UIButton = { ...
Create a file (e.g. hello_world.py) in a text editor or a python editor if you have one installed (pick one if you don't - SublimeText, Eclipse, NetBeans, SciTe... there's many!) hwld = 'Hello world' print(hwld) Note that python variables do not need to be explicitly declared; the declaration h...

Page 779 of 826