Tutorial by Examples: du

Similar to using an Object Declaration, you can define the main function of a Kotlin program using a Companion Object of a class. package my.program class App { companion object { @JvmStatic fun main(args: Array<String>) { println("Hello World") ...
TYPO3 Extbase extension development method came along with the release of TYPO3 4.3.0 in November 2009. Extbase is a PHP-based framework which supports developers in creating clean and easily maintainable TYPO3 extensions.The first real presentation of Extbase happened in April 2009 on the american ...
From ES5.1 onwards, you can use the native method Array.prototype.filter to loop through an array and leave only entries that pass a given callback function. In the following example, our callback checks if the given value occurs in the array. If it does, it is a duplicate and will not be copied to...
$this->helper('customer/data')->getForgotPasswordUrl(); OR Mage::helper('customer/data')->getForgotPasswordUrl();
return : http://www.example.com/my-product.html
/** * The first line in the build configuration applies the Android plugin for * Gradle to this build and makes the android {} block available to specify * Android-specific build options. */ apply plugin: 'com.android.application' /** * The android {} block is where you configure all...
import pandas as pd import numpy as np np.random.seed(0) rng = pd.date_range('2015-02-24', periods=10, freq='T') df = pd.DataFrame({'Val' : np.random.randn(len(rng))}, index=rng) print (df) Val 2015-02-24 00:00:00 1.764052 2015-02-24 00:01:00 0.400157 2015-02...
The extension 'realurl' provides complete transformation of URLs with GET parameter in the browser, like “index.php?id=123&type=0&L=1” into a virtual path, a so called “Speaking URL” like “home/about-us/index.html” and back again. The objective is that URLs shall be as human readable as poss...
Modules are documented elsewhere. Compilers often generate so-called module files: usually the file containing module my_module end module will result in a file named something like my_module.mod by the compiler. In such cases, for a module to be accessible by a program unit, that module file...
An external procedure is one which is defined outside another program unit, or by a means other than Fortran. The function contained in a file like integer function f() implicit none end function f is an external function. For external procedures, their existence may be declared by using a...
Steps to Create component: Create a folder named components in your project root folder Create your component inside components folder e.g.: MyComponent.php namespace app\components; use Yii; use yii\base\Component; use yii\base\InvalidConfigException; class MyComponent ...
Using ActiveCell or ActiveSheet can be source of mistakes if (for any reason) the code is executed in the wrong place. ActiveCell.Value = "Hello" 'will place "Hello" in the cell that is currently selected Cells(1, 1).Value = "Hello" 'will always place "Hello&...
So you've uploaded your files to a folder say /backend/web/uploads/ and you want these uploads to be visible on the frontend too. The easiest option is to create a symlink in the frontend that links to the backend: ln -s /path/to/backend/web/uploads/ /path/to/frontend/web/uploads In your views y...
For performance reasons you should minimize the number of fields you are requesting from the API. You can use the select property to do so. This example fetches the name property of all accounts: $.ajax({ url: Xrm.Page.context.getClientUrl() + '/api/data/v8.0/accounts?$select=name', head...
A single case discriminated union is like any other discriminated union except that it only has one case. // Define single-case discriminated union type. type OrderId = OrderId of int // Construct OrderId type. let order = OrderId 123 // Deconstruct using pattern matching. // Parentheses used...
It is not possible to use eval or exec to execute code from untrusted user securely. Even ast.literal_eval is prone to crashes in the parser. It is sometimes possible to guard against malicious code execution, but it doesn't exclude the possibility of outright crashes in the parser or the tokenizer....
An erlang module is a file with couple of functions grouped together. This file usually has .erl extension. A "Hello World" module with name hello.erl is shown below -module(hello). -export([hello_world/0]). hello_world() -> io:format("Hello, World!~n", []). In the...
An operator can be used to manipulate the flow of objects from Observable to Subscriber. Observable<Integer> integerObservable = Observable.just(1, 2, 3); // creating a simple Integer observable Subscriber<String> mSubscriber = new Subscriber<String>() { @Override publi...
Backpressure is when in an Observable processing pipeline, some asynchronous stages can't process the values fast enough and need a way to tell the upstream producer to slow down. The classic case of the need for backpressure is when the producer is a hot source: PublishSubject<Integer> sour...
As well as allowing module entities to have access control (being public or private) modules entities may also have the protect attribute. A public protected entity may be use associated, but the used entity is subject to restrictions on its use. module mod integer, public, protected :: i=1 en...

Page 9 of 47