Tutorial by Examples: e

You want to combine arrays into one. For example, you have fruits = ['Broccoli', 'Carrots'] spices = ['Thyme', 'Cinnamon'] and you want to combine them into ingredients = ['Broccoli', 'Carrots', 'Thyme', 'Cinnamon'] Method 1 - using .concat ingredients = fruits.concat spices Method 2 -...
Detailed instructions on getting windows-azure-storage set up or installed.
Make sure the following dependency is added to your app's build.gradle file under dependencies: compile 'com.android.support:support-core-ui:24.2.0' Then add the SwipeRefreshLayout in your layout: <android.support.v4.widget.SwipeRefreshLayout android:id="@+id/swipe_refresh_layo...
Multiline strings are allowed in CoffeeScript. Lines are joined by a single space unless they end with a backslash. Indentation is ignored. mobyDick = "Call me Ishmael. Some years ago -- never mind how long precisely -- having little or no money in my purse, and nothing particular to ...
Complete the Installation and setup part to connect your app to Firebase. This will create the project in Firebase. Add the dependency for Firebase Realtime Database to your module-level build.gradle file: compile 'com.google.firebase:firebase-database:10.2.1' Configure Firebase ...
While the if ()... else statement allows to define only one (default) behaviour which occurs when the condition within the if () is not met, chaining two or more if () ... else statements allow to define a couple more behaviours before going to the last else branch acting as a "default", i...
In .NET, the GC allocates objects when there are no references left to them. Therefore, while an object can still be reached from code (there is a strong reference to it), the GC will not allocate this object. This can become a problem if there are a lot of large objects. A weak reference is a ref...
Plenty has been written about Python's GIL. It can sometimes cause confusion when dealing with multi-threaded (not to be confused with multiprocess) applications. Here's an example: import math from threading import Thread def calc_fact(num): math.factorial(num) num = 600000 t = Threa...
In most object oriented languages, allocating memory for an object and initializing it is an atomic operation: // Both allocates memory and calls the constructor MyClass object = new MyClass(); In Objective-C, these are separate operations. The class methods alloc (and its historic sibling allo...
Use the following piece of code to set the badge number from within your application (suppose someNumber has been declared before): Objective-C [UIApplication sharedApplication].applicationIconBadgeNumber = someNumber; Swift UIApplication.shared.applicationIconBadgeNumber = someNumber In order ...
There's an installation guide for running a JIRA Server under Windows or Linux / Mac ( see Installing JIRA applications) For local testing there's an SDK, which starts a JIRA test instance and can be used to develop JIRA Plugins (see Set up the Atlassian Plugin SDK and Build a Project)
import React, { Component } from 'react' import { View, Text, AppRegistry } from 'react-native' class Example extends Component { render () { return ( <View> <Text> I'm a basic Component </Text> </View> ) } } AppRegistry.registe...
These components will have changing States. import React, { Component } from 'react' import { View, Text, AppRegistry } from 'react-native' class Example extends Component { constructor (props) { super(props) this.state = { name: "Sriraman" } } render ...
As the name implies, Stateless Components do not have any local state. They are also known as Dumb Components. Without any local state, these components do not need lifecycle methods or much of the boilerplate that comes with a stateful component. Class syntax is not required, you can simply do con...
Consider the following example: public final class Person { private final String firstName; private final String lastName; public Person(String firstName, String lastName) { this.firstName = (firstName == null) ? "" : firstName; this.lastName = (lastN...
ADD 1 TO cobol This modifies the variable cobol. Overflow silently ignored. ADD 1 TO cobol GIVING GnuCOBOL This doesn't modify cobol, the result of the ADD being stored in GnuCOBOL. Again, overflow of the storage allocation silently ignored (the field will stay at its old value on size erro...
[Header( "My variables" )] public string MyString; [HideInInspector] public string MyHiddenString; [Multiline( 5 )] public string MyMultilineString; [TextArea( 2, 8 )] public string MyTextArea; [Space( 15 )] public int MyInt; [Range( 2.5f, 12.5f )] public float MyFlo...
[DisallowMultipleComponent] [RequireComponent( typeof( Rigidbody ) )] public class AttributesExample : MonoBehaviour { [...] } [DisallowMultipleComponent] The DisallowMultipleComponent attribute prevents users adding multiple instances of this component to one GameObject. [Requi...
[ExecuteInEditMode] public class AttributesExample : MonoBehaviour { [RuntimeInitializeOnLoadMethod] private static void FooBar() { [...] } [RuntimeInitializeOnLoadMethod( RuntimeInitializeLoadType.BeforeSceneLoad )] private static void Foo() { ...
[AddComponentMenu( "Examples/Attribute Example" )] public class AttributesExample : MonoBehaviour { [ContextMenuItem( "My Field Action", "MyFieldContextAction" )] public string MyString; private void MyFieldContextAction() { [...] ...

Page 683 of 1191