Tutorial by Examples: core

String#squish Returns a version of the given string without leading or trailing whitespace, and combines all consecutive whitespace in the interior to single spaces. Destructive version squish! operates directly on the string instance. Handles both ASCII and Unicode whitespace. %{ Multi-line ...
String#pluralize Returns of plural form of the string. Optionally takes a count parameter and returns singular form if count == 1. Also accepts a locale parameter for language-specific pluralization. 'post'.pluralize # => "posts" 'octopus'.pluralize # => &quot...
functions.php: function rm_init_js() { wp_enqueue_script( 'custom-ajax-script', get_template_directory_uri() . '/js/ajax.js', array( 'jquery', 'wp-util' ), '1.0', true ); // pass custom variables to JS wp_localize_script( 'custom-ajax-script', 'BEJS', array( 'action' => ...
page.xml <Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo"> <Repeater items="{{ myItems }}"> <Repeater.itemTemplate> <Label text="{{ title || 'Downloading...' }}" textWrap="true&quot...
page.xml <Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo"> <Repeater items="{{ myItems }}"> <Repeater.itemTemplate> <Label text="{{ title || 'Downloading...' }}" textWrap="true&quot...
page.xml <Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo"> <ListView items="{{ myItems }}" itemTap="listViewItemTap"> <ListView.itemTemplate> <Label text="{{ title || 'Downloading.....
Description This is a self-contained running example including/showcasing: minimum dependencies needed, Java Configuration, Bean declaration by annotation and Java Configuration, Dependency Injection by Constructor and by Property, and Pre/Post hooks. Dependencies These dependencies are needed in...
With AspNetCore you can develop the application on any platform including Mac,Linux,Window and Docker. Installation and SetUp Install visual Studio Code from here Add C# extesnion Install dot net core sdk. You can install from here Now you have all the tools available. To develop the applic...
Using core debugger Node.js provides a build in non graphical debugging utility. To start the build in the debugger, start the application with this command: node debug filename.js Consider the following simple Node.js application contained in the debugDemo.js 'use strict'; function addTwoN...
To get the raw value of a field on the Context Item: Sitecore.Context.Item["Field Name"]; To get the raw value of a field on a given item, item: item["Field Name"];
In the example project.json below, an assembly Microsoft.AspNet.Identity.EntityFramework was added which is mscorlib based. { "version": "1.0.0-*", "dependencies": { "Microsoft.AspNet.Identity.EntityFramework": "2.2.1", ...
Another popular error is the referring of packages which does not satisfy all framework on the global scope when multiple frameworks are targeted. { "version": "1.0.0-*", "dependencies": { "NETStandard.Library": "1.6.0", ...
Core Graphics context A Core Graphics context is a canvas which we can draw in it and set some properties like the line thickness. Making a context To make a context, we use the UIGraphicsBeginImageContextWithOptions() C function. Then, when we are done with drawing, we just call UIGraphicsEn...
So the GNU coreutils should be avaialable on all linux based systems (please correct me if I am wrong here). If you do not know what system you are using you may not be able to directly jump to one of the examples above, hence this may be your first port of call. `$ uname -a On my system this giv...
When publishing Sitecore item programmatically the developer should keep in mind that Sitecore could be configured for several publishing targets, as well that several languages could be defined for item. ID targetDatabaseFieldId = ID.Parse("{39ECFD90-55D2-49D8-B513-99D15573DE41}"); ...
Django is a full stack, feature rich web development framework. It bundles a lot of functionality together to provide a common, quick and productive experience for web developers. Django projects consist of common settings, and one or more applications. Each application is a set of functionality al...
A view is any piece of code that responds to a request and returns a response. Views normally return templates along with a dictionary (called the context) which usually contains data for placeholders in the template. In django projects, views are located in the views.py module of applications. Th...
In django, a template is simply a file that contains special tags which may be replaced by data from the view. The canonical template example would be: <strong>Hello {{ name }}, I am a template!</strong> Here, the string {{ name }} identifies a placeholder that may be replaced by a ...
In django, there is a url mapper which maps URLs to specific functions (views) which return responses. This strict separation between the file system layout and the URL layout allows great flexibility when writing applications. All url patterns are stored in one or more urls.py files, and there is ...
You can run Theano on multiple CPU cores with the OMP_NUM_THREADS=[number_of_cpu_cores] flag. Example: OMP_NUM_THREADS=4 python gpu_test.py The script theano/misc/check_blas.py outputs information regarding which BLAS is used: cd [theano_git_directory] OMP_NUM_THREADS=4 python theano/misc/ch...

Page 2 of 4