Tutorial by Examples: ti

This tutorial assumes you already have a working OpenGL environment with all necessary libraries and headers available. #include <GL\glew.h> //Include GLEW for function-pointers etc. #include <GLFW\GLFW3.h> //Include GLFW for windows, context etc. //Impor...
File Structure: pom.xml src/test/java/PlayStoreAutomation.java Launch command: mvn test -Dtest=PlayStoreAutomation PlayStoreAutomation.java import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import io.appium.java_client.android.AndroidDriver; import i...
Before continuing, make sure you've read the Installation chapter and can access your new Symfony app in the browser. Suppose you want to create a page - /lucky/number - that generates a lucky (well, random) number and prints it. To do that, create a "Controller class" and a "con...
The documentation for docker events provides details, but when debugging it may be useful to launch a container and be notified immediately of any related event: docker run... & docker events --filter 'container=$(docker ps -lq)' In docker ps -lq, the l stands for last, and the q for quiet. Th...
If -unittest flag is passed to the D compiler, it will run all unittest blocks. Often it is useful to let the compiler generate a stubbed main function. Using the compile & run wrapper rdmd, testing your D program gets as easy as: rdmd -main -unittest yourcode.d Of course you can also split ...
In the scenario that a controller throws an exception, we can define exception handler methods to build and return specific responses. It is important to note that the defined exception handlers within the given controller will only apply to exceptions that occur within that controller. @Controller...
We're going to build an application that stores POJOs in a database. The application uses Spring Data JPA to store and retrieve data in a relational database. Its most compelling feature is the ability to create repository implementations automatically, at runtime, from a repository interface. Main...
Hash function h() is an arbitrary function which mapped data x ∈ X of arbitrary size to value y ∈ Y of fixed size: y = h(x). Good hash functions have follows restrictions: hash functions behave likes uniform distribution hash functions is deterministic. h(x) should always return the same v...
The replica set is a group of mongod instances that maintain the same data set. This example shows how to configure a replica set with three instances on the same server. Creating data folders mkdir /srv/mongodb/data/rs0-0 mkdir /srv/mongodb/data/rs0-1 mkdir /srv/mongodb/data/rs0-2 Starting ...
Defining the list of Ints trait IntList { ... } class Cons(val head: Int, val tail: IntList) extends IntList { ... } class Nil extends IntList { ... } but what if we need to define the list of Boolean, Double etc? Defining generic list trait List[T] { def isEmpty: Boolean def head:...
Usually the case when one wants to change a field type to another, for instance the original collection may have "numerical" or "date" fields saved as strings: { "name": "Alice", "salary": "57871", "dob": "198...
After you got the Location object from FusedAPI, you can easily acquire Address information from that object. private Address getCountryInfo(Location location) { Address address = null; Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault()); String errorMessage; Li...
Puppet provide official documention for both open-source and enterprise versions. you can find it here
System Requirements However, the Puppet master service is fairly resource intensive, and should be installed on a robust dedicated server. At a minimum, your Puppet master server should have two processor cores and at least 1 GB of RAM. To comfortably serve at least 1,000 nodes, it should have ...
If you are attempting to get an Angular2 site running on your Windows work computer at XYZ MegaCorp the chances are that you are having problems getting through the company proxy. There are (at least) two package managers that need to get through the proxy: NPM Typings For NPM you need to ad...
Complete the Installation and setup to connect your app to Firebase. This will create the project in Firebase. Add the dependency for Firebase Realtime Database to your module-level build.gradle file: compile 'com.google.firebase:firebase-database:9.2.1' Configure Firebase Databa...
@Configuration // @Lazy - For all Beans to load lazily public class AppConf { @Bean @Lazy public Demo demo() { return new Demo(); } }
Mongoose contains some built in functions that build on the standard find(). doc.find({'some.value':5},function(err,docs){ //returns array docs }); doc.findOne({'some.value':5},function(err,doc){ //returns document doc }); doc.findById(obj._id,function(err,doc){ //returns doc...
import { expect } from 'chai'; import { createStore } from 'redux'; describe('redux store test demonstration', () => { describe('testReducer', () => { it('should increment value on TEST_ACTION', () => { // define a test reducer with initial state: test: 0 const te...
HtmlHelper.Action() @Html.Action(actionName: "Index") output: The HTML rendered by an action method called Index() @Html.Action(actionName: "Index", routeValues: new {id = 1}) output: The HTML rendered by an action method called Index(int id) @(Html.Action("In...

Page 320 of 505