Tutorial by Examples: is

You can add bounding distances on top of culling point radius. They are in a manner additional trigger conditions outside the culling points' main radius, like "close", "far" or "very far". cullingGroup.SetBoundingDistances(new float[] { 0f, 10f, 100f}); Bounding ...
Visitor pattern allows you to add new operations or methods to a set of classes without modifying the structure of those classes. This pattern is especially useful when you want to centralise a particular operation on an object without extending the object Or without modifying the object. UML diag...
If you want to make internal classes or functions of an assembly accessable from another assembly you declare this by InternalsVisibleTo and the assembly name that is allowed to access. In this example code in the assembly MyAssembly.UnitTests is allowed to call internal elements from MyAssembly. ...
Some problems can occur if the .git folder has wrong permission. Fixing this problem by setting the owner of the complete .git folder. Sometimes it happen that another user pull and change the rights of the .git folder or files. To fix the problem: chown -R youruser:yourgroup .git/
for k in `git branch -a | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k --`\\t"$k";done | sort
Shortcode is a small piece of code that can be added into the WordPress editor and will output something different once the page is published or previewed. Frequently, shortcodes are added to the theme functions.php file, but that's not a good practice as shortcodes are expected to keep working aft...
To list all configured remote repositories, use git remote. It shows the short name (aliases) of each remote handle that you have configured. $ git remote premium premiumPro origin To show more detailed information, the --verbose or -v flag can be used. The output will include the URL and th...
Given below is a simple example to train a Caffe model on the Iris data set in Python, using PyCaffe. It also gives the predicted outputs given some user-defined inputs. iris_tuto.py import subprocess import platform import copy from sklearn.datasets import load_iris import sklearn.metrics ...
You can create your own queue using dispatch_queue_create Objective-C dispatch_queue_t queue = dispatch_queue_create("com.example.myqueue", DISPATCH_QUEUE_SERIAL); Swift // Before Swift 3 let queue = dispatch_queue_create("com.example.myqueue", DISPATCH_QUEUE_SERIAL) // ...
CALayer property animations are enabled by default. When this is undesirable, they can be disabled as follows. Swift CATransaction.begin() CATransaction.setDisableActions(true) // change layer properties that you don't want to animate CATransaction.commit() Objective-C [CATransaction be...
scrollViewDidEndDecelerating: this tells the delegate that the scroll view has ended decelerating the scrolling movement. Objective C: - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { [self stoppedScrolling]; } - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView w...
This example portrays the most simple ALV creation using the cl_salv_table class and no additional formatting options. Additional formatting options would be included after the TRY ENDTRY block and before the alv->display( ) method call. All subsequent examples using the ABAP Objects approach to...
By default, when an ALV is displayed, the title at the top is just the program name. This method allows the user to set a title of up to 70 characters. The following example shows how a dynamic title can be set that displays the number of records displayed. alv->get_display_settings( )->set_l...
In Groovy, the inject() method is one of the cumulative methods that allows us to add (or inject) new functionality into any object that implements the inject() method. In the case of a Collection, we can apply a closure to a collection of objects uniformly and then collate the results into a single...
// initialize a LinkedList of integers LinkedList list = new LinkedList<int>(); // add some numbers to our list. list.AddLast(3); list.AddLast(5); list.AddLast(8); // the list currently is 3, 5, 8 list.AddFirst(2); // the list now is 2, 3, 5, 8 list.RemoveFirst(); // the list...
A StringBuilder represents a series of characters, which unlike a normal string, are mutable. Often times there is a need to modify strings that we've already made, but the standard string object is not mutable. This means that each time a string is modified, a new string object needs to be created,...
Laravel's events allows to implement the Observer pattern. This can be used to send a welcome email to a user whenever they register on your application. New events and listeners can be generated using the artisan command line utility after registering the event and their particular listener in App...
In Sinatra, routing is how your app responds to requests, by the path of the request (e.g. /welcome) and by the HTTP verb used (e.g. GET or POST). The way a request is written is as follows: <http-verb> <path> do <code block to execute when this route is requested> end He...
Here is a simple JsonArray which you would like to convert to a Java ArrayList: { "list": [ "Test_String_1", "Test_String_2" ] } Now pass the JsonArray 'list' to the following method which returns a corresponding...
Sometimes in a development or testing environment, the SSL certificate chain might not have been fully established (yet). To continue developing and testing, you can turn off SSL verification programmatically by installing an "all-trusting" trust manager: try { // Create a trust mana...

Page 51 of 109