Tutorial by Examples: n

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...
Step 1: Create events.xml file according to your requirement in frontend, Backend, or both YKM/Banner/etc/frontend/events.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation=&q...
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...
What are events? VBA is event-driven: VBA code runs in response to events raised by the host application or the host document - understanding events is fundamental to understanding VBA. APIs often expose objects that raise a number of events in response to various states. For example an Excel.Appl...
Using parameters passed by reference An event may define a ByRef parameter meant to be returned to the caller: Public Event BeforeSomething(ByRef cancel As Boolean) Public Event AfterSomething() Public Sub DoSomething() Dim cancel As Boolean RaiseEvent BeforeSomething(cancel) If...
CREATE TYPE MyComplexType as TABLE ( Id int, Name varchar(10) )
CREATE TYPE MyUniqueNamesType as TABLE ( FirstName varchar(10), LastName varchar(10), UNIQUE (FirstName,LastName) ) Note: constraints in user defined table types can not be named.
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...
#include <gtk/gtk.h> // callback function which is called when button is clicked static void on_button_clicked(GtkButton *btn, gpointer data) { // change button label when it's clicked gtk_button_set_label(btn, "Hello World"); } // callback function which is called ...
Interpolation means that Perl interpreter will substitute the values of variables for their name and some symbols (which are impossible or difficult to type in directly) for special sequences of characters (it is also known as escaping). The most important distinction is between single and double qu...
Perl interpolates variable names: my $name = 'Paul'; print "Hello, $name!\n"; # Hello, Paul! my @char = ('a', 'b', 'c'); print "$char[1]\n"; # b my %map = (a => 125, b => 1080, c => 11); print "$map{a}\n"; # 125 Arrays may be interpolated as a whol...
<link rel="stylesheet" href="http://openlayers.org/en/v3.17.1/css/ol.css" type="text/css"> <script src="http://openlayers.org/en/v3.17.1/build/ol.js"></script>
<html> <head> <title>Getting started</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.17.1/ol.css" type="text/css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.17.1/ol...

Page 597 of 1088