Tutorial by Examples: al

Typically, reduction is performed on global or shared array. However, when the reduction is performed on a very small scale, as a part of a bigger CUDA kernel, it can be performed with a single warp. When that happens, on Keppler or higher architectures (CC>=3.0), it is possible to use warp-shu...
Go to Extensions > Modules > Filter. If not installed select Install. Click Edit & then Enabled from option & then Save module.
With this line we will install all the necessary packages in one step, and the last update: pacman -Syu apache php php-apache mariadb HTTP Edit /etc/httpd/conf/httpd.conf Change ServerAdmin [email protected] as you need. The folder of the WEB Pages by default is ServerRoot "/etc/httpd&q...
Django is a full stack framework for web development. It powers some of the most popular websites on the Internet. To install the framework; use the pip tool: pip install django If you are installing this on OSX or Linux, the above command may result in a permission error; to avoid this error, ...
/* SD card datalogger This example shows how to log data from three analog sensors to an SD card using the SD library. The circuit: * analog sensors on analog ins 0, 1, and 2 * SD card attached to SPI bus as follows: ** MOSI - pin 11 ** MISO - pin 12 ** CLK - pin 13 ** CS - ...
ggplot(iris[iris$Species == "setosa",],aes(Sepal.Width)) + geom_density() Here, we are subsetting the dataframe before passing it to ggplot. It is a very useful tool derived from the data frame data structure. To make the code more readable, one can also use dplyr's filter: libr...
To install openshift follow installation steps on https://install.openshift.com
Pretext: These are detailed instructions on how to set up a Raspberry Pi with the Raspbian operating system. These instructions are somewhat Windows specific. Some installation steps may apply to other operating systems as well, but keep the former in mind. Contents Requirements Choosing an ...
A thing to look out for when using the toString method in Kotlin is the handling of null in combination with the String?. For example you want to get text from an EditText in Android. You would have a piece of code like: // Incorrect: val text = view.textField?.text.toString() ?: "" ...
You can use the following instructions to install Theano and configure the GPU (assume a freshly installed Ubuntu 14.04): # Install Theano sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git sudo pip install Theano # Install Nvidia drivers, ...
Assuming you have already set up an app in Android Studio, add a ListView to a layout (or skip if that's already done): <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/...
Modal is a temporary UI that is displayed on top of your current page. This is often used for login, signup, editing existing options and selecting options. Let us look in to a simple example with modals used. To begin with we are creating an ionic blank project. Let us create a simple modal displa...
We now know how to create a modal. But what if we want to pass some data from modal to our home page. To do so, let us look into an example with modal as Register page passing parameters to parent page. Register.html <ion-header> <ion-toolbar> <ion-title> Login ...
Passing parameters to a modal is similar to how we pass values to a NavController. To do so, we are altering our list in home.html to open a modal when clicking a list item and passing the required parameters as a second argument to the create method. Home.html <ion-list> <ion-item ...
class my_model(models.Model): _name = "my.model" name = fields.Char('Name') @api.multi def foo_manipulate_records_1(self): """ function returns list of tuples (id,name) """ return [(i.id,i.name) for i in self] @...
You can add a method to any class in Ruby, whether it's a builtin or not. The calling object is referenced using self. class Fixnum def plus_one self + 1 end def plus(num) self + num end def concat_one self.to_s + '1' end end 1.plus_one # => 2 3.plus(5) ...
Objective: Use SignalR for notification between Web API, and TypeScript/JavaScript based Web App, where Web API and the Web App is hosted in different domain. Enabling SignalR and CORS on Web API: Create a standard Web API project, and install the following NuGet packages: Microsoft.Owin.Cors ...
One of the best uses for markup extensions is for easier usage of IValueConverter. In the sample below BoolToVisibilityConverter is a value converter but since it's instance independent it can be used without the normal hasles of a value converter with the help of markup extension. In XAML just use...
This is how the Asset Catalog in Xamarin Studio looks like, As shown in above picture there are 5 types of assets you can create within the catalog. I will cover only image set, because its the simplest one. When you create a new image set. You will get options like this To add images to the...
A path through every vertex exactly once is the same as ordering the vertex in some way. Thus, to calculate the minimum cost of travelling through every vertex exactly once, we can brute force every single one of the N! permutations of the numbers from 1 to N. Psuedocode minimum = INF for all per...

Page 177 of 269