Tutorial by Examples: c

Some applications may want to create so-called "Fire & Forget" tasks which can be periodically triggered and do not need to return any type of value returned upon completion of the assigned task (for example, purging old temp files, rotating logs, autosaving state). In this example, w...
3.3 Instancing can be done via modifications to how vertex attributes are provided to the vertex shader. This introduces a new way of accessing attribute arrays, allowing them to provide per-instance data that looks like a regular attribute. A single instance represents one object or group of vert...
Here are the steps to generate test skeleton for existing code: Open Eclipse, and choose the project you want to create test cases for In the Package Explorer, select the java class you want to generate the Junit test for Go to File -> New -> Junit Test Cases Change the Source folder to ...
ZeroR is a simple classifier. It doesn't operate per instance instead it operates on general distribution of the classes. It selects the class with the largest a priori probability. It is not a good classifier in the sense that it doesn't use any information in the candidate, but it is often used as...
It is often necessary to execute a long-running task and use the result of that task once it has completed. In this example, we will create two classes: One which implements the Callable<T> interface (where T is the type we wish to return), and one which contains a main() method. AsyncValueT...
The S in S.O.L.I.D stands for Single responsibility principle(SRP). Responsibility means in this context reasons to change, so the principle states that a class should only have one reason to change. Robert C. Martin stated it (during his lecture at Yale shool of management in 10 Sep 2014) as foll...
Step 1 - Include the uiGrid in your project <link rel="styleSheet" href="release/ui-grid.min.css"/> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script> <script src="/release/ui-grid.min.js">&l...
Eventloop in pseudo code An event loop is a loop that waits for events and then reacts to those events while true: wait for something to happen react to whatever happened Example of a single-threaded HTTP server with no event loop while true: socket = wait for the next TCP c...
Extend your class with Drawable and override these methods public class IconDrawable extends Drawable { /** * Paint for drawing the shape */ private Paint paint; /** * Icon drawable to be drawn to the center of the shape */ private Drawable icon; /**...
2009 3rd March : The project was named as "node" 1st October : First very early preview of npm, the Node package manager 8th November : Ryan Dahl's (Creator of Node.js) Original Node.js Talk at JSConf 2009 2010 Express: A Node.js web development framework Socket.io initial...
It is possible to create own Linux distribution using Yocto Project. For Raspberry Pi- there is a specific layer meta-raspberrypi that needs to be used to create an image.
Windows 10 IoT Core is available only for Raspberry Pi 2 and 3. It is important to note that this is not a full version of windows as one might expect, it is designed specifically for IoT (Internet of Things) applications. It will not run most standard windows applications, and does not have a start...
OSMC is a free and open source media player based on Linux.
Linux distribution with features required to run Kodi.
JUnit can also be used to test if a method throws a specific exception for a given input. In this example we will test if the following method really throws an exception if the Boolean format (input) is not recognized/unknown: public static boolean parseBoolean(@NonNull String raw) throws IllegalA...
JUnit defines quite some assertEquals methods at least one for each primitive type and one for Objects is available. These methods are by default not directly available to call and should be called like this: Assert.assertEquals. But because these methods are used so often people almost always use a...
Terminal Commands: rails g model Product name:string quantity:integer price:decimal{12,2} rake db:migrate Lates create controller. Terminal Commands: rails g controller Products Controller Code: class HistoriesController < ApplicationController def create file = Dir.glob(...
To leverage distributed cache, you'll have to reference one of the available implementations : Redis Sql server For instance you'll register Redis implemention as follows : public void ConfigureServices(IServiceCollection services) { services.AddDistributedRedisCache(options => ...
If we have a schema looking like: <field name="id" type="string" indexed="true" stored="true" required="true" /> <field name="name" type="string" indexed="true" stored="true" /> the solrj co...
Data mining is a wide topic, and the term is (unfortunately) very liberally thrown at any topic that involves data processing. Because of this this "documentation" should never have been created in the first place, because it overlaps with other topcis too much, and everything is better di...

Page 676 of 826