Tutorial by Examples: er

A Property procedure is a series of statement that retrieves or modifies a custom property on a module. There are three types of property accessors: A Get procedure that returns the value of a property. A Let procedure that assigns a (non-Object) value to an object. A Set procedure that assign...
Another useful feature is accessing your custom object collections as arrays in PHP. There are two interfaces available in PHP (>=5.0.0) core to support this: ArrayAccess and Iterator. The former allows you to access your custom objects as array. ArrayAccess Assume we have a user class and a da...
Bootstrap requires a containing element to wrap site contents and house our grid system. You may choose one of two containers to use in your projects. Use .container class for a responsive fixed width container. <div class="container"> ... </div> Use .container-fluid c...
//Create Connection $conn = sqlsrv_connect($dbServer, $connectionInfo); $query = "SELECT * FROM [table]"; $stmt = sqlsrv_query($conn, $query); Note: the use of square brackets [] is to escape the word table as it is a reserved word. These work in the same way as backticks ` do in ...
$conn = sqlsrv_connect($dbServer, $connectionInfo); $query = "SELECT * FROM [users] WHERE [name] = ? AND [password] = ?"; $params = array("joebloggs", "pa55w0rd"); $stmt = sqlsrv_query($conn, $query, $params); If you plan on using the same query statement more...
There are 3 main ways to fetch results from a query: sqlsrv_fetch_array() sqlsrv_fetch_array() retrieves the next row as an array. $stmt = sqlsrv_query($conn, $query); while($row = sqlsrv_fetch_array($stmt)) { echo $row[0]; $var = $row["name"]; //... } sqlsrv_fetch...
When a query goes wrong, it is important to fetch the error message(s) returned by the driver to identify the cause of the problem. The syntax is: sqlsrv_errors([int $errorsOrWarnings]); This returns an array with: KeyDescriptionSQLSTATEThe state that the SQL Server / OBDC Driver is incodeThe S...
Create this class : public class InputFilterMinMax implements InputFilter { private int min, max; public InputFilterMinMax(int min, int max) { this.min = min; this.max = max; } public InputFilterMinMax(String min, String max) { this.min = Integer...
When first introduced, AsyncTasks were executed serially on a single background thread. Starting with DONUT, this was changed to a pool of threads allowing multiple tasks to operate in parallel. Starting with HONEYCOMB, tasks are executed on a single thread to avoid common application errors caused ...
if(A_TimeIdlePhysical > 60000) { ; 60,000 milliseconds WinClose, ahk_class Chrome_WidgetWin_1 MsgBox, Google Chrome was closed due to user inactivity. } This check could be done periodically, e.g. using SetTimer.
This example inserts/sends the current day of the week's full name (e.g. Sunday) whenever Ctrl + Alt + D is pressed: ^!d::Send, %A_DDDD%
You can use the following code for going back and forward. if (!function_exists('codepoint_encode')) { function codepoint_encode($str) { return substr(json_encode($str), 1, -1); } } if (!function_exists('codepoint_decode')) { function codepoint_decode($str) { re...
You can use the following code for going back and forward. if (!function_exists('mb_internal_encoding')) { function mb_internal_encoding($encoding = NULL) { return ($from_encoding === NULL) ? iconv_get_encoding() : iconv_set_encoding($encoding); } } if (!function_exists('mb_c...
When localizing different types of resources are required, each of which has its own home in the android project structure. Following are the different directories that we can place under the \res directory. The resource types placed in each of these directories are explained in the table below: D...
Each resource directory under the res folder (listed in the example above) can have different variations of the contained resources in similarly named directory suffixed with different qualifier-values for each configuration-type. Example of variations of `` directory with different qualifier value...
C and C++ are well known as high-performance languages - largely due to the heavy amount of code customization, allowing a user to specify performance by choice of structure. When optimizing it is important to benchmark relevant code and completely understand how the code will be used. Common opti...
Optimizing by using the right data structures at the right time can change the time-complexity of the code. // This variant of stableUnique contains a complexity of N log(N) // N > number of elements in v // log(N) > insert complexity of std::set std::vector<std::string> stableUnique...
When storing JSON documents in SQL Server, We need to be able to efficiently filter and sort query results on properties of the JSON documents. CREATE TABLE JsonTable ( id int identity primary key, jsonInfo nvarchar(max), CONSTRAINT [Content should be formatted as JSON] CHECK...
This worked for me to move from Ubuntu 12.04 (Jenkins ver. 1.628) to Ubuntu 16.04 (Jenkins ver. 1.651.2). I first installed Jenkins from the repositories. Stop both Jenkins servers Copy JENKINS_HOME (e.g. /var/lib/jenkins) from the old server to the new one. From a console in the new serve...
Standard You don't need to create the variable, but it's a good practice as you can use that variable with clearInterval to stop the currently running interval. var int = setInterval("doSomething()", 5000 ); /* 5 seconds */ var int = setInterval(doSomething, 5000 ); /* same thing, no qu...

Page 192 of 417