Tutorial by Examples: st

Pseudo-elements are often used to change the look of lists (mostly for unordered lists, ul). The first step is to remove the default list bullets: ul { list-style-type: none; } Then you add the custom styling. In this example, we will create gradient boxes for bullets. li:before { conte...
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...
JasperReports Library JasperReports is a open source Java based reporting tool. The JasperReports Library can be downloaded from the Jaspersoft Community for the latest release. In recent releases the third-party jars in the lib folder are not distributed, they need to be download from public r...
Windows Phone 8.1 SDK requires Visual Studio. Either check "SDK" when installing Visual Studio or install the SDK directly here.
To change view in your application you can use setState - this will re-render your component and any of its child components. setState performs a shallow merge between the new and previous state, and triggers a re-render of the component. setState takes either a key-value object or a function that...
You should initialize state inside the constructor function of your component like this: export default class MyComponent extends Component { constructor(props) { super(props); this.state = { myInteger: 0 } } render() { return ( <View> ...
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...
The static storage class serves different purposes, depending on the location of the declaration in the file: To confine the identifier to that translation unit only (scope=file). /* No other translation unit can use this variable. */ static int i; /* Same; static is attached to the functi...
Hints to the compiler that access to an object should be as fast as possible. Whether the compiler actually uses the hint is implementation-defined; it may simply treat it as equivalent to auto. The only property that is definitively different for all objects that are declared with register is that...
$ 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
You can use the System.IO.File.ReadAllText function to read the entire contents of a file into a string. string text = System.IO.File.ReadAllText(@"C:\MyFolder\MyTextFile.txt"); You can also read a file as an array of lines using the System.IO.File.ReadAllLines function: string[] line...
The System.IO.StreamWriter class: Implements a TextWriter for writing characters to a stream in a particular encoding. Using the WriteLine method, you can write content line-by-line to a file. Notice the use of the using keyword which makes sure the StreamWriter object is disposed as soon as ...
You can use the System.IO.File.WriteAllText function to write a string to a file. string text = "String that will be stored in the file"; System.IO.File.WriteAllText(@"C:\MyFolder\OutputFile.txt", text); You can also use the System.IO.File.WriteAllLines function which receiv...
The System.String class supports a number of methods to convert between uppercase and lowercase characters in a string. System.String.ToLowerInvariant is used to return a String object converted to lowercase. System.String.ToUpperInvariant is used to return a String object converted to upper...
Detailed instructions on getting windows-phone set up or installed.
There are two functions that can be used to obtain a readable representation of an object. repr(x) calls x.__repr__(): a representation of x. eval will usually convert the result of this function back to the original object. str(x) calls x.__str__(): a human-readable string that describes the obje...
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...
To ensure that our collection can be iterated using iterator or for-each loop, we have to take care of following steps: The stuff we want to iterate upon has to be Iterable and expose iterator(). Design a java.util.Iterator by overriding hasNext(), next() and remove(). I have added a simple ...
A simple example: CL-USER> (defun make-apply-twice (fun) "return a new function that applies twice the function`fun' to its argument" (lambda (x) (funcall fun (funcall fun x)))) MAKE-APPLY-TWICE CL-USER> (funcall (make-apply-twice #'1+) 3) 5 ...
Angular 2 offers two different types of pipes - stateless and stateful. Pipes are stateless by default. However, we can implement stateful pipes by setting the pure property to false. As you can see in the parameter section, you can specify a name and declare whether the pipe should be pure or not, ...

Page 131 of 369