Tutorial by Examples: al

This example shows how to render text along an arc. It includes how you can add functionality to the CanvasRenderingContext2D by extending its prototype. This examples is derived from the stackoverflow answer Circular Text. Example rendering Example code The example adds 3 new text renderi...
All modern JavaScript JIT compilers trying to optimize code based on expected object structures. Some tip from mdn. Fortunately, the objects and properties are often "predictable", and in such cases their underlying structure can also be predictable. JITs can rely on this to make pred...
C++17 Whenever a case is ended in a switch, the code of the next case will get executed. This last one can be prevented by using the ´break` statement. As this so-called fallthrough behavior can introduce bugs when not intended, several compilers and static analyzers give a warning on this. From ...
1 Tag Name Represents a tag name available in the DOM. For example $('p') selects all paragraphs <p> in the document. 2 Tag ID Represents a tag available with the given ID in the DOM. For example $('#some-id') selects the single element in the document that has an ID of some-id. 3 ...
Thread-local storage can be created using the thread_local keyword. A variable declared with the thread_local specifier is said to have thread storage duration. Each thread in a program has its own copy of each thread-local variable. A thread-local variable with function (local) scope will be in...
Detailed instructions on getting kettle set up or installed.
First, add the HTML File to your Project (If you are asked to choose options for adding the file, select Copy items if needed) The following line of code loads the content of the HTML file into the webView webView.loadRequest(NSURLRequest(URL: NSURL(fileURLWithPath: NSBundle.mainBundle().pathForRe...
Python3 - sudo pip3 install tornado Python2 - sudo pip install tornado Packages which will are optional but recommended to install alongside Tornado : concurrent.futures pycurl pycares Twisted monotonic or monotime
The Collections class provides a way to make a list unmodifiable: List<String> ls = new ArrayList<String>(); List<String> unmodifiableList = Collections.unmodifiableList(ls); If you want an unmodifiable list with one item you can use: List<String> unmodifiableList = Col...
Starting with Java 8, you can use lambda expressions & predicates. Example: Use a lambda expressions & a predicate to get a certain value from a list. In this example every person will be printed out with the fact if they are 18 and older or not. Person Class: public class Person { p...
A class written within a method called method local inner class. In that case the scope of the inner class is restricted within the method. A method-local inner class can be instantiated only within the method where the inner class is defined. The example of using method local inner class: public...
A DataFrame can be created from a list of dictionaries. Keys are used as column names. import pandas as pd L = [{'Name': 'John', 'Last Name': 'Smith'}, {'Name': 'Mary', 'Last Name': 'Wood'}] pd.DataFrame(L) # Output: Last Name Name # 0 Smith John # 1 Wood Mary Missin...
Shall the property value's assignment be executed before or after the class' constructor? public class TestClass { public int TestProperty { get; set; } = 2; public TestClass() { if (TestProperty == 1) { Console.WriteLine("Shall this be e...
CREATE TYPE MyUniqueNamesType as TABLE ( FirstName varchar(10), LastName varchar(10), CreateDate datetime default GETDATE() PRIMARY KEY (FirstName,LastName) )
This example finds an array of approximately evenly spaced points along a cubic Bezier curve. It decomposes Path segments created with context.bezierCurveTo into points along that curve. // Return: an array of approximately evenly spaced points along a cubic Bezier curve // // Attribution: Stack...
This example finds an array of approximately evenly spaced points along a quadratic curve. It decomposes Path segments created with context.quadraticCurveTo into points along that curve. // Return: an array of approximately evenly spaced points along a Quadratic curve // // Attribution: Stackove...
This example finds an array of approximately evenly spaced points along a line. It decomposes Path segments created with context.lineTo into points along that line. // Return: an array of approximately evenly spaced points along a line // // pxTolerance: approximate spacing allowed between point...
This example finds an array of approximately evenly spaced points along an entire Path. It decomposes all Path segments created with context.lineTo, context.quadraticCurveTo and/or context.bezierCurveTo into points along that Path. Usage // Path related variables var A={x:50,y:100}; var B={x:12...
Sonarqube uses database for storing its results and analysis. You can install MySQL for example and run it using mysql -u root -p and then run the following queries to set up the database tables. CREATE DATABASE sonar CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE USER 'sonar' IDENTIFIED BY 's...

Page 142 of 269