Tutorial by Examples

Dynamic Time Warping(DTW) is an algorithm for measuring similarity between two temporal sequences which may vary in speed. For instance, similarities in walking could be detected using DTW, even if one person was walking faster than the other, or if there were accelerations and decelerations during ...
quickSort :: Ord a => [a] -> [a] quickSort [] = [] quickSort (x:xs) = quickSort [ y | y <- xs, y <= x ] ++ [x] ++ quickSort [ z | z <- xs, z > x ]
The below image shows the working of a quick sort. Below example shows the working program for quick sort in python: def quickSort(alist): quickSortHelper(alist,0,len(alist)-1) def quickSortHelper(alist,first,last): if first<last: splitpoint = partition(alist,first,last) ...
Few of the eclipse classic versions don't come pre-installed with marketplace, this maybe installed using the following steps: Goto Help → Install new Software Add new Repository(site specified below) General Purpose Tools → Marketplace Client Click Finish and you are done. Marketplace upda...
Before getting started on Processing for Android, make sure you have Processing installed. Open Processing Click on Add Mode... located in the top right of the window: Search for "android" in the Contribution Manager and choose the option that has the author "The Processing Fou...
Launch standalone player activity Intent standAlonePlayerIntent = YouTubeStandalonePlayer.createVideoIntent((Activity) context, Config.YOUTUBE_API_KEY, // which you have created in step 3 videoId, // video which is to be played 100, //The time,...
public class CustomYouTubeActivity extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener, YouTubePlayer.PlayerStateChangeListener { private YouTubePlayerView mPlayerView; private YouTubePlayer mYouTubePlayer; private String mVideoId = "B08iLAtS3AQ"; ...
task = Task.async(fn -> expensive_computation end) do_something_else result = Task.await(task)
crawled_site = ["http://www.google.com", "http://www.stackoverflow.com"] |> Enum.map(fn site -> Task.async(fn -> crawl(site) end) end) |> Enum.map(&Task.await/1)
The binder gives you an opportunity to inspect what types are being loaded in your application domain Create a class inherited from SerializationBinder class MyBinder : SerializationBinder { public override Type BindToType(string assemblyName, string typeName) { if (typeName.Eq...
To be able to use the P3D renderer you must specify it in the size() function size(200, 200, P3D); Now, there are three axes: x, y and z. Now you can proceed in drawing in 3D.
One of the most interesting Number Patterns is Pascal's Triangle. The Name "Pascal's Triangle" named after Blaise Pascal, a famous French Mathematician and Philosopher. In Mathematics, Pascal's Triangle is a triangular array of binomial coefficients.The rows of Pascal's triangle are conve...
public class PascalsTriangle { static void PascalTriangle(int n) { for (int line = 1; line <= n; line++) { int c = 1; for (int i = 1; i <= line; i++) { Console.WriteLine(c); c = c * (line - i)...
Routes in Laravel are case-sensitive. It means that a route like Route::get('login', ...); will match a GET request to /login but will not match a GET request to /Login. In order to make your routes case-insensitive, you need to create a new validator class that will match requested URLs agains...
Here's how to translate objects in P3D: size(200, 200, P3D); //Starting P3D renderer fill(255, 0, 0, 150); //transparent red rect(10, 10, 100, 100); //first rectangle fill(0, 0, 255, 150); //transparent blue translate(50, 50, 50); //translate x, y and z by 50 pixels rect(0, 0, 100, 100); //sec...
For full documentation, run the command: godoc -http=:<port-number> For a tour of Go (highly recommended for beginners in the language): go tool tour The two commands above will start web-servers with documentation similar to what is found online here and here respectively. For quick ...
Most of the time a TabLayout is used together with a ViewPager, in order to get the swipe functionality that comes with it. It is possible to use a TabLayout without a ViewPager by using a TabLayout.OnTabSelectedListener. First, add a TabLayout to your activity's XML file: <android.support.des...
// Assuming N/search is imported as `s` var mySalesOrderSearch = s.create({ type: 'salesorder' // Use the summary property of a Column to perform grouping/summarizing columns: [{ name: 'salesrep', summary: s.Summary.GROUP },{ name: 'internalid', ...
There are three functions for 3D rotation: rotateX(angle), rotateY(angle) and rotateZ(angle) for rotation in their respective axes where angle is in radians. size(200, 200, P3D); //Starting P3D renderer fill(255, 0, 0, 150); //transparent red translate(width/2, height/2);//translate to centre, ie...
A DataGridView is a control in .NET UI design, which consists of rows and columns used to arrange data. Often there is need to depict data either from a spreadsheet or database on a UI design in an application. When this data is to be shown grouped by its properties, we choose a DataGridView. In C...

Page 1003 of 1336