Tutorial by Examples: an

Md2Collapse : Collapse is a directive, it's allow the user to toggle visiblity of the section. Examples A collapse would have the following markup. <div [collapse]="isCollapsed"> Lorum Ipsum Content </div> Md2Accordion : Accordion it's allow the user to toggle vis...
This example shows you different ways to execute 'commands' for Minecraft from code: EntityPlayerSP player = Minecraft.getMinecraft().player; player.sendChatMessage("/Command here"); to send a command in SinglePlayer
Function using promises: function myAsyncFunction() { return aFunctionThatReturnsAPromise() // doSomething is a sync function .then(result => doSomething(result)) .catch(handleError); } So here is when Async/Await enter in action in order to get clean...
This covers how you can create a basic 2D game using SurfaceView. First, we need an activity: public class GameLauncher extends AppCompatActivity { private Game game; @Override public void onCreate(Bundle sis){ super.onCreate(sis); game = new Game(GameLauncher....
`To calculate 1D convolution by hand, you slide your kernel over the input, calculate the element-wise multiplications and sum them up. The easiest way is for padding=0, stride=1 So if your input = [1, 0, 2, 3, 0, 1, 1] and kernel = [2, 1, 3] the result of the convolution is [8, 11, 7, 9, 4], whic...
Now we will apply a strided convolution to our previously described padded example and calculate the convolution where p = 1, s = 2 Previously when we used strides = 1, our slided window moved by 1 position, with strides = s it moves by s positions (you need to calculate s^2 elements less. But in...
What Are Notification Channels? Notification channels enable us app developers to group our notifications into groups—channels—with the user having the ability to modify notification settings for the entire channel at once. For example, for each channel, users can completely block all notifications...
Once you are connected to a Gatt Server, you're going to be interacting with it by writing and reading from the server's characteristics. To do this, first you have to discover what services are available on this server and which characteristics are avaiable in each service: @Override public voi...
The installation is quite simple as there are seperate installers for MacOS and Windows machines available here. Currently two versions are for download: one beta and one stable. Setup will start after you downloaded the program and you´ll need to login with your GitHub credentials. That is really ...
You can select a branch at the upper left. When you selected the right branch you need to press the sync button (upper right) which does now the same as git checkout BRANCHNAME. In the older version you are able to view 2 different branches at once and compare the pushes. Furthermore you could vi...
Pull (Sync) Like in the command line you need to pull the current state of the repository once in a while. In GitHub Desktop this process is called by the sync Button at the top right corner. Push When you made local changes and want to push them you make a commit by writing something into the su...
The text field calls different delegate methods (only if delegates are set)One of delegate method called by textfield is *- (BOOL)textFieldShouldReturn:(UITextField )textField This method is called whenever users taps the return button.By using this method, we can implement any custom behaviour. ...
Install the dependencies: pip install jinja2 Install a framework: pip install flask Create the following structure ├── run.py └── templates Put a file template.html in the templates directory. The file can contain a jinja 2 variable named my_string. <!DOCTYPE html> <html lang=&qu...
Each section can can contain JavaScript and Stylesheets, these two languages are used within liquid tags: {% javascript %}{% endjavascript %} & {% stylesheet %}{% endstylesheet %}. When placing code inside of these two tags, Shopify compiles each piece into shopify_compiled.js & shopify_com...
Create a new C# script in Unity and replace it's contents with the following using UnityEngine; using System.Collections; public static class UnityAndroidPlugin { }
Create a new Java class in Android Studio and replace it's contents with the following package com.axs.unityandroidplugin; import android.util.Log; import android.widget.Toast; import android.app.ActivityManager; import android.content.Context; public class UnityAndroidNative { } ...
Create a new C# script in Unity and paste these contents using UnityEngine; using System.Collections; public class UnityAndroidPluginGUI : MonoBehaviour { void OnGUI () { } }
This section will contain some of the most advanced examples realized using Multithreading. Advanced printer (logger) A thread that prints everything is received and modifies the output according to the terminal width. The nice part is that also the "already written" output is modified w...
The raycaster has an origin, where its ray starts, and a direction, where the ray goes. The origin of the raycaster is at the raycaster entity’s position. We can change the origin of the raycaster by setting the position component of the raycaster entity (or parent entities of the raycaster entity)...
Angular 2 wrapper library for Dropzone. npm install angular2-dropzone-wrapper --save-dev Load the module for your app-module import { DropzoneModule } from 'angular2-dropzone-wrapper'; import { DropzoneConfigInterface } from 'angular2-dropzone-wrapper'; const DROPZONE_CONFIG: DropzoneCon...

Page 288 of 307