Tutorial by Examples

SELECT date_trunc('week', <>) AS "Week" , count(*) FROM <> GROUP BY 1 ORDER BY 1;
COPY products(is_public, title, discount) TO 'D:\csv_backup\products_db.csv' DELIMITER ',' CSV HEADER; COPY categories(name) TO 'D:\csv_backup\categories_db.csv' DELIMITER ',' CSV HEADER;
COPY products TO 'D:\csv_backup\products_db.csv' DELIMITER ',' CSV HEADER; COPY categories TO 'D:\csv_backup\categories_db.csv' DELIMITER ',' CSV HEADER;
import matplotlib.pyplot as plt import numpy as np # generate 101 x and y values between -10 and 10 x = np.linspace(-10, 10, 101) y = np.linspace(-10, 10, 101) # make X and Y matrices representing x and y values of 2d plane X, Y = np.meshgrid(x, y) # compute z value of a point as a fun...
import matplotlib.pyplot as plt import numpy as np # generate 101 x and y values between -10 and 10 x = np.linspace(-10, 10, 101) y = np.linspace(-10, 10, 101) # make X and Y matrices representing x and y values of 2d plane X, Y = np.meshgrid(x, y) # compute z value of a point as a fun...
Problem situation Warehouse administrator has a sheet ("Record") where every logistics movement performed by the facility is stored, he may filter as needed, although, this is very time consuming and he would like to improve the process in order to calculate inquiries faster, for example:...
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 ...
The Iris flower data set is a widely used data set for demonstration purposes. We will load it, inspect it and slightly modify it for later use. import java.io.File; import java.net.URL; import weka.core.Instances; import weka.core.converters.ArffSaver; import weka.core.converters.CSVLoader; i...
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...
In order to build a good classifier we will often need to get an idea of how the data is structered in feature space. Weka offers a visualisation module that can help. Some dimensions already seperate the classes quite well. Petal-width orders the concept quite neatly, when compared to petal-widt...
Trees can build models that work on independent features and on second order effects. So they might be good candidates for this domain. Trees are rules that are chaind together, a rule splits instances that arrive at a rule in subgroups, that pass to the rules under the rule. Tree Learners generate...
Requirements: Supported Browsers: IE9+ Chrome Firefox Safari 5+ Opera Android 4 AngularJS 1.4.0+ Getting Started Download the source files from ui-grid github and include them in your project including the dependencies: <link rel="styleSheet" href="release/ui-gr...
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...
#!/usr/bin/python input_list = [10,1,2,11] for i in range(len(input_list)): for j in range(i): if int(input_list[j]) > int(input_list[j+1]): input_list[j],input_list[j+1] = input_list[j+1],input_list[j] print input_list
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; /**...

Page 1086 of 1336