Tutorial by Examples

There is a a deployment tool for linux on GitHub. While not perfect, it is linked to from the Qt wiki. It's based conceptually on the Qt Mac Deployment Tool and functions similarly by providing an AppImage. Given that a desktop file should be provided with an AppImage, linuxdeployqt can use that to...
The rule An e-commerce have a 20% off offer valid for entire month of July. How to apply the technique Using the Equivalence Partition technique we could divide this as Inside July Is outside July But we can do a little better with this case. We can use the boundaries of the partition to e...
The rule Another common case we usually find and where it is useful to apply this technique are progressive rates based on values. An e-commerce has an offer that is like: 10% off for orders above US$ 80.00 15% off for orders above US$ 150.00 25% off for orders above US$ 200.00 How to appl...
Data annotations are a way of adding more contextual information to classes or members of a class. There are three main categories of annotations: Validation Attributes: add validation criteria to data Display Attributes: specify how the data should be displayed to the user Modelling Attributes...
<!-- : Comment This works with both batch script and WSF. The closing tag(-->), only works in WSF. CodeSucessful in both batch and WSF?<!--: CommentTrue<!--: Comment -->False - The closing tag only works for WSF-->False
Once you have node.js installed on your system, you can just follow the procedure below to get a basic web server running with support for both HTTP and HTTPS! Step 1 : Build a Certificate Authority create the folder where you want to store your key & certificate : mkdir conf ...
Suppose we have an API which allows us to get object metadata in single request (getAllPets), and other request which have full data of single resource (getSinglePet). How we can query all of them in a single chain? public class PetsFetcher { static class PetRepository { List<Integer&g...
LibGDX is designed in a way that you can write the same code and deploy it on several different platforms. Yet, there are times when you want to get access to platform specific code. For an instance, if you have leaderboards and achievements in your game, you may want to use platform-specific tools ...
The AssetManager is a class that helps you manage your assets. First off, you need to create an instance: AssetManager am = new AssetManager(); After this is initialized, and before you render anything, you want to get the resources: am.load("badlogic.jpg", Texture.class);//Texture.c...
When you get started with Java or Android, you quickly learn that (0,0) is in the top-left corner. In LibGDX, however, (0,0) is by default in the bottom left corner. Using an Orthographic camera, you can get (0, 0) to be in the top-left corner. Though by default, (0, 0) is in the bottom-left corner...
ADDITIONAL_LOAD_PATHS ARGF ARGV ActionController ActionView ActiveRecord ArgumentError Array BasicSocket Benchmark Bignum Binding CGI CGIMethods CROSS_COMPILING Class ClassInheritableAttributes Comparable ConditionVariable Config Continuation DRb DRbIdConv DRbObject DRbUndu...
Using the DEL(alias for ERASE) command, one can remove files. @echo off del foo.ext This command will delete foo.ext from the current directory. One can also specify path and file, such as: del C:\Foo\Bar\Baz.ext But it is always ideal to put quotes (") around paths, see here for the r...
In this example, user BoeNoe showed how to use the command xcopy to copy files. There is also an extra command called copy. Here is a simple example: copy foo.ext bar.ext This copies foo.ext to bar.ext, and create bar.ext when it doesn't exist. We can also specify paths to the file, but it is a...
It is also possible to have an user upload csv's to your Shiny app. The code below shows a small example on how this can be achieved. It also includes a radioButton input so the user can interactively choose the separator to be used. library(shiny) library(DT) # Define UI ui <- shinyUI(flui...
function sum(numbers) { var total = 0; for (var i = numbers.length - 1; i >= 0; i--) { total += numbers[i]; } return total; } It's a procedural code with mutations (over total).
function sum(numbers) { if(numbers.length == 0) { return 0; } return numbers[0] + sum(numbers.slice(1)); } this is the recursive version. there's no mutation, but we are making a call stack as below which uses extra memory. sum([10, 5, 6, 7]);      10 + sum([5, 6, 7]); ...
function sum(numbers) { return tail_sum(numbers, 0); } function tail_sum(numbers, acc) { if(numbers.length == 0) { return acc; } return tail_sum(numbers.slice(1), acc + numbers[0]); } in the tail recursive version, function return value does not need to wait till...
Let's create a map and a closure to print hello def exMap = [:] def exClosure = { println "Hello" } Assign closure to a property in map exMap.closureProp = exClosure Calling closure exMap.closureProp.call() Output Hello Another Example - Lets create a class with ba...
<?php //Creating Connection to MySQL database using MySQLi $mysqli = mysqli_connect("IP ADDRESS OR DOAMIN", "username", "password", "database_name"); //Executing Query in the Database using MySQLi $result = mysqli_query($mysqli, "SELECT * FROM T...
Here's a simple example to demonstrate that how can we jump/open a specific screen based on the notification. For example, when a user clicks on the notification, the app should open and directly jump to notifications page instead of home page. 'use strict'; import React, { Component } from 'rea...

Page 1320 of 1336