Tutorial by Examples: v

public class ExampleActivity extends Activity { private final static String EXAMPLE_ARG = "example_arg"; private int mArg; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layou...
The first step is to import Platform from the 'react-native' package like so: import { Platform } from 'react-native' After you've done that, you can go ahead and access the OS type through Platform.OS allowing you to use it in conditional statements like const styles = StyleSheet.create({ h...
To initialize react-native init MyAwesomeProject To initialize with a specific version of React Native react-native init --version="0.36.0" MyAwesomeProject To Run for Android cd MyAwesomeProject react-native run-android To Run for iOS cd MyAwesomeProject react-native run-io...
$ react-native start On latest version of React Native, no need to run the packager. It will run automatically. By default this starts the server at port 8081. To specify which port the server is on $ react-native start --port PORTNUMBER
There are two main approaches to creating a thread in Java. In essence, creating a thread is as easy as writing the code that will be executed in it. The two approaches differ in where you define that code. In Java, a thread is represented by an object - an instance of java.lang.Thread or its subcl...
Given a String containing the name of a class, it's Class object can be accessed using Class.forName: Class clazz = null; try { clazz = Class.forName("java.lang.Integer"); } catch (ClassNotFoundException ex) { throw new IllegalStateException(ex); } Java SE 1.2 It can be s...
Constants in Go may be typed or untyped. For instance, given the following string literal: "bar" one might say that the type of the literal is string, however, this is not semantically correct. Instead, literals are Untyped string constants. It is a string (more correctly, its default ...
If you have only just popped it and the terminal is still open, you will still have the hash value printed by git stash pop on screen: $ git stash pop [...] Dropped refs/stash@{0} (2ca03e22256be97f9e40f08e6d6773c7d41dbfd1) (Note that git stash drop also produces the same line.) Otherwise, you...
Analysis of Variance (aov) is used to determine if the means of two or more groups differ significantly from each other. Responses are assumed to be independent of each other, Normally distributed (within each group), and the within-group variances are assumed equal. In order to complete the analys...
In some cases you might want to add an additional description to an enum value, for instance when the enum value itself is less readable than what you might want to display to the user. In such cases you can use the System.ComponentModel.DescriptionAttribute class. For example: public enum Possibl...
Detecting the current state of the network connection and responding to any changes that might occur, can be done by using one of several plugins. This example is about the cordova-plugin-network-information plugin. Add the plugin to the project: cordova plugin add cordova-plugin-network-informati...
HTTP requests are widely used repeatedly across every web app, so it is wise to write a method for each common request, and then use it in multiple places throughout the app. Create a httpRequestsService.js httpRequestsService.js appName.service('httpRequestsService', function($q, $http){ ...
If you want to keep on-premises copy of the Gradle and let the Wrapper use it in the builds, you can set the distributionUrl pointing to your copy on the wrapper task: task wrapper(type: Wrapper) { gradleVersion = '2.0' distributionUrl = "http\://server/dadada/gradle-${gradleVersion}...
There are many different variants of the ARM architecture and implementations that have evolved over time. The notation can be confusing. For instance, arm7 and armv7, are completely different. The first is a CPU implementation; the second is a CPU architecture. The architecture, also called a f...
server { server_name example.com; return 301 $scheme://example.net$request_uri; }
1.8 Run: $ git mv old/path/to/module new/path/to/module 1.8 Edit .gitmodules and change the path of the submodule appropriately, and put it in the index with git add .gitmodules. If needed, create the parent directory of the new location of the submodule (mkdir -p new/path/to). M...
You can quickly switch to the previous branch using git checkout -
Canvas is the simplest of panels. It places items at the specified Top/Left coordinates. <Canvas> <TextBlock Canvas.Top="50" Canvas.Left="50" Text="This is located at 50, 50"/> <TextBlock Canvas.Top="100" Canv...
Dim aList As New List(Of String) aList.Add("Hello") aList.Add("Delete Me!") aList.Add("World") 'Remove the item from the list at index 1 aList.RemoveAt(1) 'Remove a range of items from a list, starting at index 0, for a count of 1) 'This will remove index 0, ...
Dim aList as New List(Of String) aList.Add("Hello, World") aList.Add("Test") Dim output As String = aList(0) output: Hello, World If you do not know the index of the item or only know part of the string then use the Find or FindAll method Dim aList as New List(Of S...

Page 101 of 296