Tutorial by Examples: c

C++11 In the header file: // widget.h #include <memory> // std::unique_ptr #include <experimental/propagate_const> class Widget { public: Widget(); ~Widget(); void DoSomething(); private: // the pImpl idiom is named after the typ...
This query will return all COLUMNS and their associated TABLES for a given column name. It is designed to show you what tables (unknown) contain a specified column (known) SELECT c.name AS ColName, t.name AS TableName FROM sys.columns c JOIN sys.tables t ON c.object_id = t.o...
$this->helper('checkout/url')->getCartUrl(); OR Mage::helper('checkout/url')->getCartUrl();
$this->helper('checkout/url')->getCheckoutUrl(); OR Mage::helper('checkout/url')->getCheckoutUrl();
$this->helper('customer/data')->getAccountUrl(); OR Mage::helper('customer/data')->getAccountUrl();
The easiest way to get started with Gremlin is to install the Gremlin Console. The Gremlin Console is a REPL that allows immediate feedback on the results of Gremlin traversals. As a prerequisite, Java 8 is required for the Gremlin Console to run. Ensure that it is installed prior to moving forward...
You can redirect the debug output to a text file by adding a TextWriterTraceListener to the Debug.Listeners collection. public static void Main(string[] args) { TextWriterTraceListener myWriter = new TextWriterTraceListener(@"debug.txt"); Debug.Listeners.Add(myWriter); Deb...
return http://www.example.com/skin/frontend/{interface}/{theme}/images/my-image.jpg
At its simplest, proc.time() gives the total elapsed CPU time in seconds for the current process. Executing it in the console gives the following type of output: proc.time() # user system elapsed # 284.507 120.397 515029.305 This is particularly useful for benchmarking s...
return : http://www.example.com/my-product.html
PropertyPossible Valuesdisplaygrid / inline-grid The CSS Grid is defined as a display property. It applies to a parent element and its immediate children only. Consider the following markup: <section class="container"> <div class="item1">item1</div> &lt...
If you want to use your own templates (be it HTML, XML, JSON or any other format) for a TYPO3 extension using fluid templating, you can add additional template paths. An extensions template/partial/layout paths are usually set in TypoScript setup under the properties plugin.tx_<extensionkey>...
Mage::getSingleton('admin/session')->getUser();
Mage::helper('customer')->getCustomer(); or Mage::getSingleton('customer/session')->getCustomer();
Sometimes, it's not possible to list the number of parameters a function could need. Consider a sum function: func sum(_ a: Int, _ b: Int) -> Int { return a + b } This works fine for finding the sum of two numbers, but for finding the sum of three we'd have to write another function: f...
If you want to display to your users meaningful errors instead of simple "sorry, something went wrong", Rails has a nice utility for the purpose. Open the file app/controllers/application_controller.rb and you should find something like this: class ApplicationController < ActionContro...
/** * Parameters * * @param int $int * @param string $string * @param array $array * @param bool $bool */ function demo_param($int, $string, $array, $bool) { } /** * Parameters - Optional / Defaults * * @param int $int * @param string $string * @param ...
If you ever wanted to determine the html content to be printed on a page during run time then, rails has a very good solution for that. It has something called the content_for which allows us to pass a block to a rails view. Please check the below example, Declare content_for <div> <%=...
You can run tasks in series, by passing a second parameter to gulp.task(). This parameters is an array of tasks to be executed and completed before your task will run: var gulp = require('gulp'); gulp.task('one', function() { // compile sass css }); gulp.task('two', function() { // ...
Accessibility of symbols declared in a module can be controlled using private and public attributes and statement. Syntax of the statement form: !all symbols declared in the module are private by default private !all symbols declared in the module are public by default public !symbols in t...

Page 164 of 826