Tutorial by Examples: l

var arr = [1, 2, 3, 4]; Method 1 Creates a new array and overwrites the existing array reference with a new one. arr = []; Care must be taken as this does not remove any items from the original array. The array may have been closed over when passed to a function. The array will remain in mem...
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')->getLoginUrl(); OR Mage::helper('customer/data')->getLoginUrl();
$this->helper('customer/data')->getLogoutUrl(); OR Mage::helper('customer/data')->getLogoutUrl();
$this->helper('customer/data')->getForgotPasswordUrl(); OR Mage::helper('customer/data')->getForgotPasswordUrl();
$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...
Detailed instructions on getting titan set up or installed.
Writes to the trace listeners in the Listeners collection when the application is compiled in debug configuration. public static void Main(string[] args) { Debug.WriteLine("Hello"); } In Visual Studio or Xamarin Studio this will appear in the Application Output window. This is d...
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...
One package for line profiling is lineprof which is written and maintained by Hadley Wickham. Here is a quick demonstration of how it works with auto.arima in the forecast package: library(lineprof) library(forecast) l <- lineprof(auto.arima(AirPassengers)) shine(l) This will provide you...
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 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...
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> <%=...
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...
The border-style property sets the style of an element's border. This property can have from one to four values (for every side of the element one value.) Examples: border-style: dotted; border-style: dotted solid double dashed; border-style can also have the values none and hidden. They ...
It is possible to limit the tests executed by manage.py test by specifying which modules should be discovered by the test runner: # Run only tests for the app names "app1" $ python manage.py test app1 # If you split the tests file into a module with several tests files for an app $ p...

Page 166 of 861