Tutorial by Examples

To run a script when multiple keys are pressed use the & between the keys. Numpad0 & Numpad1:: MsgBox You pressed 0 and 1 return
Navigation Shortcuts Go to class Ctrl+N Go to file Ctrl + Shift + N Navigate open tabs ALT + Left-Arrow; ALT + Right-Arrow Lookup recent files CTRL + E Go to line CTRL + G Navigate to last ed...
A model represents some data object in an application. For example you can have a model such as: Fruit, Car, Building, etc. in your application. Models are normally used by stores. Here is example how you would define a new model class. e.g. Ext.define('MyApp.model.Person', { extend: 'Ext.data...
Create your RecyclerView in your layout xml file: <android.support.v7.widget.RecyclerView android:id="@+id/recycleView" android:layout_width="match_parent" android:layout_height="match_parent" /> Create your Model...
When should I use it When the code inside an inline listener is too big and your method / class becomes ugly and hard to read You want to perform same action in various elements (view) of your app To achieve this you need to create a class implementing one of the listeners in the View API. ...
The NVIDIA installation guide ends with running the sample programs to verify your installation of the CUDA Toolkit, but doesn't explicitly state how. First check all the prerequisites. Check the default CUDA directory for the sample programs. If it is not present, it can be downloaded from the offi...
There are two ways to setup the Apache Flex SDK. You can use the provided Apache Flex SDK Installer, an Adobe AIR application that automates the process (on Windows or OS X/macOS). Or you can install it manually which obviously requires a greater comfort with your platform but provides more flexibi...
public class Sheep { private String name; private int weight; public Sheep(String name, int weight) { this.name = name; this.weight = weight; } public static Sheep newInstance(Sheep other); return new Sheep(other.name, other.wei...
The tf.py_func(func, inp, Tout) operator creates a TensorFlow operation that calls a Python function, func on a list of tensors inp. See the documentation for tf.py_func(func, inp, Tout). Warning: The tf.py_func() operation will only run on CPU. If you are using distributed TensorFlow, the tf.py_f...
The tf.py_func() operator enables you to run arbitrary Python code in the middle of a TensorFlow graph. It is particularly convenient for wrapping custom NumPy operators for which no equivalent TensorFlow operator (yet) exists. Adding tf.py_func() is an alternative to using sess.run() calls inside t...
Some LINQ methods return a query object. This object does not hold the results of the query; instead, it has all the information needed to generate those results: var list = new List<int>() {1, 2, 3, 4, 5}; var query = list.Select(x => { Console.Write($"{x} "); return ...
To show and hide a FloatingActionButton with the default animation, just call the methods show() and hide(). It's good practice to keep a FloatingActionButton in the Activity layout instead of putting it in a Fragment, this allows the default animations to work when showing and hiding. Here is an ...
String templates are a convenient way of mixing literal strings with values from variables: WRITE |Hello, { lv_name }, nice to meet you!|. It can also format things like dates. To use the logged on user's date format: WRITE |The order was completed on { lv_date DATE = USER } and can not be chan...
Suppose we have the following XAML snippet: <ListBox x:Name="MyListBox" /> Then in the code-behind for this XAML file, we write the following in the constructor: MyListBox.ItemsSource = new[] { 1, 2, 3, 4, 5 }; Running the application, we get a list of numbers we enter...
CREATE DATABASE LINK dblink_name CONNECT TO remote_username IDENTIFIED BY remote_password USING 'tns_service_name'; The remote DB will then be accessible in the following way: SELECT * FROM MY_TABLE@dblink_name; To test a database link connection without needing to know any of the objec...
In general, functions that operate on other functions, either by taking them as arguments or by returning them (or both), are called higher-order functions. A higher-order function is a function that can take another function as an argument. You are using higher-order functions when passing callbac...
:g/Hello/d Will delete every line containing the text "Hello". Important note: This is not the normal mode command d, this is the ex command :d. You can use the global command to apply normal mode keystrokes instead of ex commands by prepending normal or norm to the command. For exampl...
Modify your Gemfile to include the Devise gem: gem 'devise' Then update your gems with: $ bundle install Run the installers in your project: $ rails generate devise:install Then create your Devise model (e.g. User) with: $ rails generate devise User you'll need to set up the default ...
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController include OmniConcern %w[facebook twitter gplus linkedin].each do |meth| define_method(meth) do create end end end Note: In the part “%w[facebook twitter gplus linkedin]”, you should list ...
module OmniConcern extend ActiveSupport::Concern def create auth_params = request.env["omniauth.auth"] provider = AuthenticationProvider.get_provider_name(auth_params.try(:provider)).first authentication = provider.user_authentications.where(uid: auth_params.uid).first...

Page 516 of 1336