Tutorial by Examples: al

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...
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 ....
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...
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...
Detailed instructions on getting shapeless set up or installed.
We can call an action result in another action result. public ActionResult Action1() { ViewData["OutputMessage"] = "Hello World"; return RedirectToAction("Action2","ControllerName"); //this will go to second action; } public ActionResult...
By creating multiple properties files for the different environments or use cases, its sometimes hard to manually change the active.profile value to the right one. But there is a way to set the active.profile in the application.properties file while building the application by using maven-profiles. ...
Detailed instructions on getting casperjs set up or installed.
Detailed instructions on getting google-project-tango set up or installed.
object CommonUtils { var anyname: String ="Hello" fun dispMsg(message: String) { println(message) } } From any other class, just invoke the variable and functions in this way: CommonUtils.anyname CommonUtils.dispMsg("like static call")
public class localInner1{ private int data=30;//instance variable void display(){ class Local{ void msg(){System.out.println(data);} } Local l=new Local(); l.msg(); } public static void main(String args[]){ localInner1 obj=new localInner1(); obj.di...
Naming When naming CSS variables, it contains only letters and dashes just like other CSS properties (eg: line-height, -moz-box-sizing) but it should start with double dashes (--) //These are Invalids variable names --123color: blue; --#color: red; --bg_color: yellow --$width: 100px; //Vali...
// sample token string taken from the New example tokenString := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJuYmYiOjE0NDQ0Nzg0MDB9.u1riaD1rW97opCoAuRCTy4w58Br-Zk-bh7vLiRIsrpU" // Parse takes the token string and a function for looking up the key. The latter is especially ...
In order to show an alert dialog containing a link which can be opened by clicking it, you can use the following code: AlertDialog.Builder builder1 = new AlertDialog.Builder(youractivity.this); builder1.setMessage(Html.fromHtml("your message,<a href=\"http://www.google.com\"&gt...
OpenCL Kernels can be either executed on the GPU or the CPU. This allows for fallback solutions, where the customer may have a very outdated system. The programmer can also choose to limit their functionality to either the CPU or GPU. To get started using OpenCL, you'll need a 'Context' and a 'Devi...
Detailed instructions on getting coded-ui-tests set up or installed.
Detailed instructions on getting Nokogiri set up or installed.
Lets build a kernel to generate a grayscale image. We will use image data which is defined using uints for each component and with order RGBA. __constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | C...

Page 256 of 269