Tutorial by Examples: ect

Create a new Xamarin Forms app using PCL File -> New Solution -> Multiplatform App -> Xamarin Forms -> Forms App; Name the project as EffectsDemo Under the iOS project, add a new Effect class that inherits from PlatformEffect class and overrides the methods OnAttached, OnDetached and ...
Creating a project in scala is very similar to creating one in java. Here is what the entry class should look like: package com.example.myplugin; //{$TopLevelDomain}.{$Domain}.{$PluginName} import org.bukkit.plugin.java.JavaPlugin import org.bukkit.command.CommandSender import org.bukkit.comma...
$model = Mage::getModel('catalog/product')->getCollection() Filter based on store: $mode->addStoreFilter($storeId) Filter based on product type: $mode->addAttributeToFilter('type_id', 'configurable') $mode->addAttributeToFilter('type_id', 'simple') Filter based on status: $m...
$rootId = Mage::app()->getStore($storeId)->getRootCategoryId(); $categories = Mage::getModel('catalog/category')->getCollection() ->addAttributeToSelect('*') ->addFieldToFilter('path', array('like'=> "1/$rootId/%")) ->addAttributeToFilter('level', 2...
The Entity Framework library comes only with an SQL Server provider. To use SQLite will require additional dependencies and configuration. All required dependencies are available on NuGet. Install SQLite Managed Libraries All of the mananged depedencies can be installed using the NuGet Package Man...
To create a new project ng new [project-name] which initializes git.Install packages for tooling via npm. It creates the project successfully. cd [project-name] and execute either npm start or ng serve It'll run the server in the given default port. Application will refresh according to the chan...
Let's assume you have a ListView wich is supposed to display every User object listed under the Users Property of the ViewModel where Properties of the User object can get updated programatically. <ListView ItemsSource="{Binding Path=Users}" > <ListView.ItemTemplate> ...
Sometimes you may want to have some login to determine where the user gets redirected to after submitting a form. Form Requests give a variety of ways. By default there are 3 variables declared in the Request $redirect, $redirectRoute and $redirectAction. On top of those 3 variables you can overr...
When you're ready to upload your project to the phonegap-build service, zip the content of the www folder and upload the zip file to the phonegap-build service. It is recommended to only zip the content of the www folder, and not the www folder itself. However, this is just a recommendation and zip...
This is an official MATLAB example Consider the following code: month = [1;1;2;3;8;1;3;4;9;11;9;12;3;4;11]; temperature = [57;61;60;62;45;59;64;66;40;56;38;65;61;64;55]; maxTemp = accumarray(month,temperature,[],@max); The image below demonstrates the computation process done by accumarray in...
An example project (Git repo) that can be used as a starting point for doing some 3D rendering. The code for setting up OpenGL and the shaders is quite long and tedious so it wont fit well under this example format. Later pieces of it can be shown in separate examples detailing what exactly is going...
Below is a single hidden layer Multilayer Perceptron (MLP) using nested scoping of variables. def weight_variable(shape): return tf.get_variable(name="weights", shape=shape, initializer=tf.zeros_initializer(dtype=tf.float32)) def bias_variable(shape): ...
<http:listener-config name="HTTP_Listener_Configuration" host="localhost" port="${http.port}" doc:name="HTTP Listener Configuration"/> <db:mysql-config name="MySQL_Configuration" host="${db.host}" port="${db.port}"...
Usually output of a command goes to the terminal. Using the concept of Output redirection, the output of a command can be redirected to a file. So insted of displaying the output to the terminal it can be send to a file. '>' character is used for output redirection. $ pwd > file1 $ cat file...
The commands normally take their input from the standard input device keyboard. Using Input redirection concept, we can have their input redirected from a file. To redirect standard input from a file instead of the keyboard, the '<' character is used. $ cat file1 monday tuesday wednsday th...
Copying files copy copies the source file in the first argument to the destination in the second argument. The resolved destination needs to be in a directory that is already created. if (copy('test.txt', 'dest.txt')) { echo 'File has been copied successfully'; } else { echo 'Failed to ...
Another example: a Weapon that shoots out Bullets. The Weapon acts as an object pool for the Bullets it creates. public class Weapon : MonoBehaviour { // The Bullet prefab that the Weapon will create public Bullet bulletPrefab; // This List is our object pool, which starts...
@interface NSString : NSObject (NSObject is a base class of NSString class). You can use below methods for allocation of string class: - (instancetype)init + (instancetype)new + (instancetype)alloc For Copy any object : - (id)copy; - (id)mutableCopy; For compare objects : - (BOOL...
Calling C code from Go package main /* // Everything in comments above the import "C" is C code and will be compiles with the GCC. // Make sure you have a GCC installed. int addInC(int a, int b) { return a + b; } */ import "C" import "fmt" func ma...

Page 87 of 99