Tutorial by Examples: am

Simple extract of index.html: <div class="sign-in"> {% if user %} [Passing the url we have the opportunity to logout the user] <a href="{{ url|safe }}">LOG OUT</a> [You can include here operations for user authenticated] ...
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....
Now that we know the basics of Selenium, we can make our own project. For this example, we'll be making a program, which finds the Newest questions on stack-overflow. We start easy, lets open stack-overflow. public static void main(String[] args) throws InterruptedException { System.setProper...
This is a very simple image processing and computer vision Python exercise series, designed to introduce these topics with little practicals. I am sorry in advance for any rookie mistakes, it is still under development. In this series, I will be limiting digital images we can use to PNG files for t...
`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...
Public: public val name = "Avijit" Private: private val name = "Avijit" Protected: protected val name = "Avijit" Internal: internal val name = "Avijit"
Purpose of the project: Download particular file based on message id sent as a request from client to server. File will be created on server and transmitted to client. Here, I haven't share the whole code but shown what is necessary as the purpose is to demonstrate the changes required for migratio...
import nltk from nltk.tokenize import sent_tokenize, word_tokenize text = 'We saw the yellow dog' word = word_tokenize(text) tag1 = nltk.pos_tag(word) print(tag1)
Configuration file contains sections, each section contains keys and values. configparser module can be used to read and write config files. Creating the configuration file:- import configparser config = configparser.ConfigParser() config['settings']={'resolution':'320x240', ...
A model (see: Model-View-Controller pattern) in Grails is represented by a so-called Domain Class. Domain classes can define both the persistence and presentation of information in grails. Domain classes can also contain validations. To manage a fleet of cars in your Grails application you could de...
Create a console application. Install EntityFramework nuget package by running Install-Package EntityFramework in "Package Manager Console" Add your connection string in app.config file , It's important to include providerName="System.Data.SqlClient" in your connection. Cre...
This example shows how to create a custom presentation transition that is driven by a composite UIDynamicBehavior. We can start by creating a presenting view controller that will present a modal. Swift class PresentingViewController: UIViewController { lazy var button: UIButton = { ...
If you have a multidimensional array like this: [ ['foo', 'bar'], ['fizz', 'buzz'], ] And you want to change it to an associative array like this: [ 'foo' => 'bar', 'fizz' => 'buzz', ] You can use this code: $multidimensionalArray = [ ['foo', 'bar'], ...
This example shows how to make an interactive presentation transition with "real-world" physics similar to iOS's notifications screen. To start with, we need a presenting view controller that the shade will appear over. This view controller will also act as our UIViewControllerTransitio...
This example shows how to customize the UIDynamicItem protocol to map position changes of a view being dynamically animated to bounds changes to create a UIButton that expands and contracts in a elastic fashion. To start we need to create a new protocol that implements UIDynamicItem but that also...
AFRAME.registerComponent (name, definition) Register an A-Frame component. We must register components before we use them anywhere in . Meaning from an HTML file, components should come in order before . {string} name - Component name. The component’s public API as represented through an HTML at...
Property types primarily define how the schema parses incoming data from the DOM for each property. The parsed data will then be available via the data property on the component's prototype. Below are A-Frame's built-in property types: Property TypeDescriptionDefault ValuearrayParses comma-separ...
We place assets within <a-assets>, and we place <a-assets> within <a-scene>. Assets include: <a-asset-item> - Miscellaneous assets such as 3D models and materials <audio> - Sound files <img> - Image textures <video> - Video textures The scene won't...
As an introductory example, to define a 5-meter orbit on an entity about the Y-axis that takes 10 seconds, we can offset the position and animate the rotation. This animation starts with the initial rotation about the Y-axis of 0 degrees, and goes around 360 degrees. It’s defined with a duration of ...
<a-scene> <a-assets> <a-mixin id="red" material="color: red"></a-mixin> <a-mixin id="blue" material="color: blue"></a-mixin> <a-mixin id="cube" geometry="primitive: box"></a-mix...

Page 120 of 129