Tutorial by Examples: co

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...
$id = $request->cookies->get('PHPSESSID'); This will return the value of the 'PHPSESSID' cookie sent by the browser.
There are various types of inheritance and code reuse in Twig: Include The main goal is code reuse. Consider using header.html.twig & footer.html.twig inside base.html.twig as an example. header.html.twig <nav> <div>Homepage</div> <div>About</div> </...
The ternary operator (?:) Support for the extended ternary operator was added in Twig 1.12.0. {{ foo ? 'yes' : 'no' }} Evaluates: if foo echo yes else echo no {{ foo ?: 'no' }} or {{ foo ? foo : 'no' }} Evaluates: if foo echo it, else echo no {{ foo ? 'yes' }} or {{ f...
Detailed instructions on getting windows-installer set up or installed.
Prior to iOS 7 when you want to scan a QR code, we might need to rely on third party frameworks or libraries like zBar or zXing. But Apple introduced AVCaptureMetaDataOutput from iOS 7 for reading barcodes. To read QR code using AVFoundation we need to setup/create AVCaptureSession and use captureO...
in Startup.cs // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { // Add framework services. services.AddMvc(); var controllerActivator = new CompositionRoot(); services...
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...
Example of a TCA field configuration where you can select records from a table 'my_topfeatures' => array( 'label' => 'Select Topfeatures', 'config' => array( 'type' => 'group', 'internal_type' => 'db', 'size' => '4', ...
HTML <div class="countdown"></div> JS var duration = moment.duration({ 'minutes': 5, 'seconds': 00 }); var timestamp = new Date(0, 0, 0, 2, 10, 30); var interval = 1; var timer = setInterval(function() { timestamp = new Date(timestamp.getTi...
If we want to remove some database connection from the list of database connections. we need to use QSqlDatabase::removeDatabase(),however it's a static function and the way it work is a little wired. // WRONG WAY QSqlDatabase db = QSqlDatabase::database("sales"); QSqlQuery query(&...
If you want to comment part of your code, then comment blocks may be useful. Comment block starts with a %{ in a new line and ends with %} in another new line: a = 10; b = 3; %{ c = a*b; d = a-b; %} This allows you fo fold the sections that you commented to make the code more clean and comp...
Here's an example with the technique(hack) invented by the dostips forums' user Liviu: @echo off echo Printed by CMD.EXE cscript //nologo "%~f0?.wsf" //job:JS //job:VBS exit /b %errorlevel% ----END OF BATCH CODE--- <package> <job id="JS"> <script...
Explains how the Windows installer works, what MSI packages are, what merge modules are, how and why transforms can be used and finally commandline options for MSIEXEC. Describes the tools being provided by Microsoft (and 3rd party authoring tools such as InstallShield, Advanced Installer, Wise Pac...
<dependencies> <dependency> <groupId>{ejbModuleGroupId}</groupId> <artifactId>{ejbModuleArtifactId}</artifactId> <version>{ejbModuleVersion}</version> <type>ejb</type> </dependency> &...
The wasd-controls component controls an entity with the W, A, S and D or arrow keyboard keys. The wasd-controls component is commonly attached to an entity with the camera component. <a-entity camera look-controls wasd-controls></a-entity> For azerty keyboards, you could use Z, Q, S...
The look-controls component: Rotates the entity when we rotate a VR head-mounted display (HMD). Rotates the entity when we click-drag mouse. Rotates the entity when we touch-drag the touchscreen. The look-controls component is usually used alongside the camera component. <a-entity came...
A-Frame 0.x0.3 A-Frame provides an implementation for supporting multiple types of 6DoF controllers (Vive, Oculus Touch) via the hand-controls component. The hand-controls component is primarily for 6DoF controllers since it’s geared towards room scale interactions such as grabbing objects. The han...
A-Frame 0.x0.3 The tracked-controls component is A-Frame’s base controller component that provides the foundation for all of A-Frame’s controller components. The tracked-controls component: Grabs a Gamepad object from the Gamepad API given an ID or prefix. Applies pose (position and orien...
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 ( ...

Page 236 of 248