Tutorial by Examples: l

You need to include the Pagination.php in your page/s. require_once 'Paginator.php'; $Paginator = new Paginator('mysql:host=localhost;dbname=ng_app', 'root', '000000'); $Paginator->setItemLimitPerPage(4); $Paginator->setTable('comments'); $Paginator->createPages(); // this will creat...
This example shows how you might handle users interacting with modals on a 1-1 basis. //client side function modals(socket) { this.sendModalOpen = (modalIdentifier) => { socket.emit('openedModal', { modal: modalIdentifier }); }; this.closeModa...
Normally when rails environment is run by typing. This just runs the default environment which is usually development rails s The specific environment can be selected by using the flag -e for example: rails s -e test Which will run the test environment. The default environment can be change...
Detailed instructions on getting loadrunner set up or installed.
InputBox, userinput This will store what the user types into the input box in the variable named userinput
CREATE TABLE Table1 ( id INT UNSIGNED NOT NULL, created_on DATE NOT NULL, PRIMARY KEY (id) ) CREATE TABLE Table2 ( id INT UNSIGNED NOT NULL, personName VARCHAR(255) NOT NULL, PRIMARY KEY (id) ) CREATE TABLE Table3 ( id INT UNSIGNED NOT NULL, accountName VA...
Detailed instructions on getting genetic-algorithm set up or installed.
Our TCP echo back server will be a separate thread. It's simple as its a start. It will just echo back whatever you send it but in capitalised form. public class CAPECHOServer extends Thread{ // This class implements server sockets. A server socket waits for requests to come // in ove...
To get all the server variables run this query either in the SQL window of your preferred interface (PHPMyAdmin or other) or in the MySQL CLI interface SHOW VARIABLES; You can specify if you want the session variables or the global variables as follows: Session variables: SHOW SESSION VARIABLE...
To get the database server status run this query in either the SQL window of your preferred interface (PHPMyAdmin or other) or on the MySQL CLI interface. SHOW STATUS; You can specify whether you wish to receive the SESSION or GLOBAL status of your sever like so: Session status: SHOW SESSION S...
public class JSEngine { /* * Note Nashorn is only available for Java-8 onwards * You can use rhino from ScriptEngineManager.getEngineByName("js"); */ ScriptEngine engine; ScriptContext context; public Bindings scope; // Initialize t...
class Person { constructor(firstname, lastname) { this._firstname = firstname; this._lastname = lastname; } get firstname() { return this._firstname; } set firstname(name) { this._firstname = name; } get lastname() { return this._lastname; } ...
Google Test is a C++ testing framework maintained by Google. It requires building the gtest library and linking it to your testing framework when building a test case file. Minimal Example // main.cpp #include <gtest/gtest.h> #include <iostream> // Google Test test cases are cre...
Processlist This will show all active & sleeping queries in that order then by how long. SELECT * FROM information_schema.PROCESSLIST ORDER BY INFO DESC, TIME DESC; This is a bit more detail on time-frames as it is in seconds by default SELECT ID, USER, HOST, DB, COMMAND, TIME as time_second...
If you want to notify other clients/users throughout the application ,you not need to worry about the connection because signalr new connection is created every time you visit other pages in the web app. we can leverage the users feature of signalr to achieve the same. see the example below: Here...
This example just illustrates how this keyword can be used. int a = 10; // Assume that type of variable 'a' is not known here, or it may // be changed by programmer (from int to long long, for example). // Hence we declare another variable, 'b' of the same type using // decltype keyword. de...
Let's say we have vector: std::vector<int> intVector; And we want to declare an iterator for this vector. An obvious idea is to use auto. However, it may be needed just declare an iterator variable (and not to assign it to anything). We would do: vector<int>::iterator iter; Howev...
program ForLoopWithContinueAndBreaks; {$APPTYPE CONSOLE} var var i : integer; begin for i := 1 to 10 do begin if i = 2 then continue; (* Skip this turn *) if i = 8 then break; (* Break the loop *) WriteLn( i ); end; WriteLn('Finish.'); end. Outpu...
program repeat_test; {$APPTYPE CONSOLE} var s : string; begin WriteLn( 'Type a words to echo. Enter an empty string to exit.' ); repeat ReadLn( s ); WriteLn( s ); until s = ''; end. This short example print on console Type a words to echo. Enter an empty string to exit....
To influence property lookup, the get handler must be used. In this example, we modify property lookup so that not only the value, but also the type of that value is returned. We use Reflect to ease this. let handler = { get(target, property) { if (!Reflect.has(target, property)) { ...

Page 801 of 861