Tutorial by Examples: a

Like other value types, GUID also has a nullable type which can take null value. Declaration : Guid? myGuidVar = null; This is particularly useful when retrieving data from the data base when there is a possibility that value from a table is NULL.
JavaScript: Vue.component('props-component', { template: '#props-component-template', // array of all props props: ['myprop', 'calcprop'] }); new Vue({ el: '#app' }); HTML: <div id="app"> <template id="props-component-template"> ...
JavaScript: const MainPage = { template: '#mainpage-template' } const Page1 = { template: '#page1-template' } const Page2 = { template: '#page2-template' } const Page3 = { template: '#page3-template' } const router = new VueRouter({ mode: 'hash', routes: [{ path: ...
const foop = { get value() {}, set value(v) {} }; it('can spy on getter', () => { spyOnProperty(foop, 'value', 'get').and.returnValue(1); expect(foop.value).toBe(1); }); it('and on setters', () => { const spiez = spyOnProperty(foop, 'value', 'set'); foop.v...
import java.sql.*; class Rsmd { public static void main(String args[]) { try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:xe", ...
This is an Example which print rectangle and fill color in the rectangle. https://i.stack.imgur.com/dlC5v.jpg Most methods of the Graphics class can be divided into two basic groups: Draw and fill methods, enabling you to render basic shapes, text, and images Attributes setting methods, whic...
import javax.swing.*; import java.awt.*; public class MyPanel extends JPanel { @Override public void paintComponent(Graphics g){ // clear the previous painting super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; g2.setColor(Co...
Dim rng As New Random() This declares an instance of the Random class called rng. In this case, the current time at the point where the object is created is used to calculate the seed. This is the most common usage, but has its own problems as we shall see later in the remarks Instead of allowin...
The following example declares a new instance of the Random class and then uses the method .Next to generate the next number in the sequence of pseudo-random numbers. Dim rnd As New Random Dim x As Integer x = rnd.Next The last line above will generate the next pseudo-random number and assign ...
MySQL Workbench is available for all major operating systems -Windows, Linux, Mac- You can find the version for you operating system from here. For windows: It uses the msi (Windows installer) to install packages. You only need to right click install and it starts. For Linux: There are multiple ....
#include <windows.h> static Windows::Foundation::DateTime GetCurrentDateTime() { // Get the current system time SYSTEMTIME st; GetSystemTime(&st); // Convert it to something DateTime will understand FILETIME ft; SystemTimeToFileTime(&st, &ft); ...
LinearLayout is a view group that aligns all children in a single direction, vertically or horizontally. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width=&q...
Detailed instructions on getting oracle12c set up or installed.
Jenkins: The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project. Sonar Qube: SonarQube provides the capability to not only show health of an application but also to highlight issues newly introduced. Apache Ant: A...
A clean way to handle booleans is using an inline conditional with the a ? b : c ternary operator, which is part of Swift's Basic Operations. The inline conditional is made up of 3 components: question ? answerIfTrue : answerIfFalse where question is a boolean that is evaluated and answerIfTrue...
Blender's viewport is a dynamic, changeable interface composed of many different windows. With the program running by default, the viewport is composed of 5 different windows. Windows can be identified by looking for their small square indicator icons either in the top or bottom-left corner. They ma...
While eval may not be needed for a pop like function, it is however required whenever you use getopt: Consider the following function that accepts -h as an option: f() { local __me__="${FUNCNAME[0]}" local argv="$(getopt -o 'h' -n $__me__ -- "$@")" e...
Suppose there is a peak of normally (gaussian) distributed data (mean: 3.0, standard deviation: 0.3) in an exponentially decaying background. This distribution can be fitted with curve_fit within a few steps: 1.) Import the required libraries. 2.) Define the fit function that is to be fitted to th...
The volatile keyword tells the compiler that the value of the variable may change at any time as a result of external conditions, not only as a result of program control flow. The compiler will not optimize anything that has to do with the volatile variable. volatile int foo; /* Different ways to ...
The function EventEmitter.eventNames() will return an array containing the names of the events currently subscribed to. const EventEmitter = require("events"); class MyEmitter extends EventEmitter{} var emitter = new MyEmitter(); emitter .on("message", function(){ //list...

Page 1043 of 1099