Tutorial by Examples

WampServer is a Windows web development environment. It allows you to create web applications with Apache2, PHP and a MySQL database. Alongside, PhpMyAdmin allows you to manage easily your databases. WampServer is available for free (under GPML license) in two distinct versions : 32 and 64 bits. Wa...
String macros are syntactic sugar for certain macro invocations. The parser expands syntax like mymacro"my string" into @mymacro_str "my string" which then, like any other macro call, gets substituted with whatever expression the @mymacro_str macro returns. Base Julia com...
Julia Symbol literals must be legal identifiers. This works: julia> :cat :cat But this does not: julia> :2cat ERROR: MethodError: no method matching *(::Int64, ::Base.#cat) Closest candidates are: *(::Any, ::Any, ::Any, ::Any...) at operators.jl:288 *{T<:Union{Int128,Int16,Int...
Swift button.setImage(UIImage(named:"test-image"), forState: .normal) Objective C [self.button setImage:[UIImage imageNamed:@"test-image"] forState:UIControlStateNormal]; Multiple Control States You can also set an image for multiple UIControlStates, for example to set...
This is a continuation of the "main class" and "executable JAR" examples. Typical Java applications consist of an application-specific code, and various reusable library code that you have implemented or that has been implemented by third parties. The latter are commonly referr...
Search for a lemma when you know what its conclusion ought to be: Coq < SearchPattern (S _ <= _). le_n_S: forall n m : nat, n <= m -> S n <= S m You can also search on a partial conclusion (the conclusion and one or several last hypotheses). Coq < Require Import Arith. Coq &...
Consider this CSV data: #id,title,text 1,hello world,"This is a ""blog""." 2,second time,"My second entry." This data can be read with the following code: // r can be any io.Reader, including a file. csvReader := csv.NewReader(r) // Set comment char...
The Comprehensive TeX Archive Network (CTAN) is indeed that, the comprehensive repository of LaTeX packages. Most if not all quality packages (and more) are on there, and all the good ones include documentation. Enter the package name into the search bar. Select the package from the list...
If you use the TeX Live distribution you can use the command-line program texdoc. For instance, texdoc biblatex will open the documentation of package biblatex. Or if you are not command-line-savvy, the same can be found online at http://www.texdoc.net/
Depending on the service, you will either need to use Basic Authentication with a username and password or pass an apikey as a parameter in each request. Some services also support token authentication. GET using Tone Analyzer: curl -X GET \ -u "username":"password" \ -d &qu...
The quickest way to get started with Watson services is to use the Watson Developer Cloud SDKs. The following GitHub repositories contain installation instructions and basic usage examples: Android iOS Java Node.js Python Unity For example, here's how to make an AlchemyLanguage API call w...
Groups can be configured under Suite and/or Test element of testng.xml. All groups which are marked as included in tesng.xml will be considered for execution, excluded one will be ignored. If a @Test method has multiple groups and from those groups if any single groups is excluded in testng.xml that...
HTML: <div class="container"> <span>vertically centered</span> </div> CSS: .container{ height: 50px; /* set height */ line-height: 50px; /* set line-height equal to the height */ vertical-align: middle; /* works without this ...
How does an RDD gets partitioned? By default a partition is created for each HDFS partition, which by default is 64MB. Read more here. How to balance my data across partitions? First, take a look at the three ways one can repartition his data: Pass a second parameter, the desired min...
trait Speak { fn speak(&self) -> String { String::from("Hi.") } } The method will be called by default except if it's overwritten in the impl block. struct Human; struct Cat; impl Speak for Human {} impl Speak for Cat { fn speak(&self) -> S...
Detailed instructions on getting twitter-oauth set up or installed.
Swift Add this extension to UIImage : extension UIImage { func maskWithColor(color: UIColor) -> UIImage? { let maskImage = self.CGImage let width = self.size.width let height = self.size.height let bounds = CGRectMake(0, 0, width, height) ...
with q command we could simplify a lot of tedious work in vim. example 1. generate array sequence (1 to 20). STEP 1. press i to enter insert mode, input 1 1 STEP 2. Record following action: "append the last number to the next line, and increment the number" type esc to exit input...
import scala.reflect.runtime.universe._ val mirror = runtimeMirror(getClass.getClassLoader) val module = mirror.staticModule("org.data.TempClass")
ActiveRecord pattern was popularized by Rails. It's the default ORM there. Conventions Rails ActiveRecord is driven by conventions: class names are mapped to table names, field names are mapped to field names, foreign and primary keys should be named accordingly. These conventions can be overridde...

Page 809 of 1336