Tutorial by Examples: st

Imagine that you need sort records by lowest value of either one of two columns. Some databases could use a non-aggregated MIN() or LEAST() function for this (... ORDER BY MIN(Date1, Date2)), but in standard SQL, you have to use a CASE expression. The CASE expression in the query below looks at th...
Lets say we want to build a paginated list of products, where the number of the page is passed as a query string parameter. For instance, to fetch the 3rd page, you'd go to: http://example.com/products?page=3 The raw HTTP request would look something like this: GET /products?page=3 HTTP/1.1 Ho...
PHP exposes a number of so-called global variables which contain information about the HTTP request, such as $_POST, $_GET, $_FILES, $_SESSION, etc. The Request class contains a static createFromGlobals() method in order to instantiate a request object based on these variables: use Symfony\Componen...
To get the contents of a form that is submitted with method="post", use the post property: $name = $request->request->get('name');
Installation or Setup Slim framework Install Composer Open cmd Go to Root directory of your Project Folder and Run Following Command. composer require slim/slim "^3.0" Now you will have vendor directory in your project Next Create Index.php in root folder and add following co...
use \Psr\Http\Message\ServerRequestInterface as Request; use \Psr\Http\Message\ResponseInterface as Response; require 'vendor/autoload.php'; $app = new \Slim\App; $app->get('/employee/view', function ($req, $res) { $con = new mysqli('localhost','USERNAME','PASSWORD','DATABASE'); ...
Using the command git tag lists out all available tags: $ git tag <output follows> v0.1 v1.3 Note: the tags are output in an alphabetical order. One may also search for available tags: $ git tag -l "v1.8.5*" <output follows> v1.8.5 v1.8.5-rc0 v1.8.5-rc1 v1.8.5...
You can use django rest framework permission classes to check request headers and authenticate user requests Define your secret_key on project settings API_KEY_SECRET = 'secret_value' note: a good practice is to use environment variables to store this secret value. Define a permission ...
Detailed instructions on getting windows-installer set up or installed.
One of the features in SugarCRM 7.x is being able to easily add and extend custom endpoints to accomplish what you require. In this example, we'll create a couple of custom endpoints to return some data about the request. This custom file is being placed in custom/clients/base/api/DescriptionAPI.p...
Both are used to define error handling for a website, but different software refers to different config elements. customErrors are a legacy (backwards compatable) element, used by Visual Studio Development Server (aka. VSDS or Cassini). httpErrors are the new element which is only used by IIS7. T...
A quick way to test your xpath is in your browser developer tool console. Format is $x('//insert xpath here') $ - specifies it is a selector. x - specifies it is using xpaths Example: $x("//button[text() ='Submit']") When this command is entered it will return all occurrences...
In Kotlin, if, try and others are expressions (so they do return a value) rather than (void) statements. So, for example, Kotlin does not have Java's ternary Elvis Operator, but you can write something like this: val i = if (someBoolean) 33 else 42 Even more unfamiliar, but equally expressive, ...
You can dynamically fork a flow in multiple subflows using groupBy. The continuing stages are applied to each subflow until you merge them back using mergeSubstreams. val sumByKey: Flow[(String, Int), Int, NotUsed] = Flow[(String, Int)]. groupBy(Int.maxValue, _._1). //forks the flow ...
An Array Data Structure is used to store similar objects (or data values) in a contiguous block of memory. Array Data Structure has fixed size, which determines the number of data values that can be stored in it. Array : The C++ Way In C++ Programming Language, we can declare a static arr...
If necessary, change to your project directory cd MyAwesomeProject 1- Add accounts packages: meteor add accounts-base accounts-password react-meteor-data 2- Add the routes to login and signup pages in imports/startup/Routes.jsx The render() method will be as follows: render() { return ( ...
These are loops in which their loop body contains no other loops (the innermost loop in case of nested). In order to have loop coverage, testers should exercise the tests given below. Test 1 :Design a test in which loop body shouldn’t execute at all (i.e. zero iterations) Test 2 :Design a test in...
A nested loop is a loop within a loop. The outer loop changes only after the inner loop is completely finished / interrupted. In this case, test cases should be designed in such a way that Start at the innermost loop. Set all the outer loops to their minimum values. Perform Simple loop testing o...
Two loops are concatenated if it’s possible to reach one after exiting the other on same path from entrance to exit. Sometimes these two loops are independent to each other. In those cases we can apply the design techniques specified as part of single loop testing. But if the iteration values in on...
Ubuntu # sudo apt-get update # sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc Windows Recommended The normal and recommended way to install VLC on a Windows operating system is via the installer package.(Download Link)

Page 349 of 369