The following command backs up the 'Users' database to 'D:\DB_Backup' file. Its better to not give an extension.
BACKUP DATABASE Users TO DISK = 'D:\DB_Backup'
Define the function using the vararg keyword.
fun printNumbers(vararg numbers: Int) {
for (number in numbers) {
println(number)
}
}
Now you can pass as many parameters (of the correct type) into the function as you want.
printNumbers(0, 1) // Prints "0&qu...
import curses
import traceback
try:
# -- Initialize --
stdscr = curses.initscr() # initialize curses screen
curses.noecho() # turn off auto echoing of keypress on to screen
curses.cbreak() # enter break mode where pressing Enter key
...
BEGIN TRY -- start error handling
BEGIN TRANSACTION; -- from here on transactions (modifictions) are not final
-- start your statement(s)
select 42/0 as ANSWER -- simple SQL Query with an error
-- end your statement(s)
COMMIT TRANSACTION; -- finalize all transa...
Method 1:
proc sql;
create table foo like sashelp.class;
quit;
Method 2:
proc sql;
create table bar as
select * from sashelp.class (obs=0);
quit;
Method 1 should be the preferred option
By default, all the controllers you generate with Symfony's built-in generate:controller command will make use of Symfony annotations for routing:
namespace AppBundle\Controller;
// You have to add a use statement for the annotation
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
...
The simple use-case is to refer to a single icon in its normal size:
<i class="fa fa-camera-retro"></i> (View result in this fiddle.)
Create an empty tag (it is recommended to use <i> used for that) and assign class "fa" and the class corresponding to the desi...
Font icons are usually placed inside a <i> tag. Ionic has default css styles for the icons for easy use. The most basic example of use:
<i class="icon ion-home"></i>
In this example I define two custom function.
1 - countryFilter function get's the country short code as input and return the country full name.
2 - _countPrinterTasks is used to calculate the no of tasks assigned to a particular user.
<?php
namespace DashboardBundle\Twig\Extension;
use ...
R-markdown code chunks
R-markdown is a markdown file with embedded blocks of R code called chunks. There are two types of R code chunks: inline and block.
Inline chunks are added using the following syntax:
`r 2*2`
They are evaluated and inserted their output answer in place.
Block chunks hav...
Preemptive basic authentication is the practice of sending http basic authentication credentials (username and password) before a server replies with a 401 response asking for them. This can save a request round trip when consuming REST apis which are known to require basic authentication.
As descr...
Using HttpClient as RestTemplate's underlying implementation to create HTTP requests allows for automatic handling of basic authentication requests (an http 401 response) when interacting with APIs. This example shows how to configure a RestTemplate to achieve this.
// The credentials are stored he...
<?php
//Create a new SQLite3 object from a database file on the server.
$database = new SQLite3('mysqlitedb.db');
//Query the database with SQL
$results = $database->query('SELECT bar FROM foo');
//Iterate through all of the results, var_dumping them onto the page
while ($row = $resu...
Possessive quantifiers are another class of quantifiers in many regex flavours that allow backtracking to, effectively, be disabled for a given token. This can help improve performance, as well as preventing matches in certain cases.
The class of possessive quantifiers can be distinguished from laz...