Tutorial by Examples: o

Document Object Model Start by creating your tabs and panes in your Object Model... <template name="samplePage"> <div id="samplePage" class="page"> <ul class="nav nav-tabs"> <li id="firstPanelTab"><a href=&...
Dynamic Proxies do not really have much to do with Reflection but they are part of the API. It's basically a way to create a dynamic implementation of an interface. This could be helpful when creating mockup services. A Dynamic Proxy is an instance of an interface that is created with a so-called in...
Install Chrome by first considering which version to use, relevant if you are going to be doing Web Development: Google Chrome releases major versions about every 6 weeks and provides access to multiple versions of the product as they are being stabilized. This process is done in a series of channe...
Getting installed on Windows 10 is as easy as it's ever been, and despite (true) rumours flying around regarding Windows 10 being the last 'normal' version of Windows, it has and always will stay the same process. Installing a new version Get the windows image (Go straight to step 4 if you have ...
Virtually all Prolog systems implement tail call optimization (TCO). This means that predicate calls that are in a tail position can be executed in constant stack space if the predicate is deterministic. Tail recursion optimization (TRO) is a special case of tail call optimization.
As long as you have an internet connection, you can read images from an hyperlink I=imread('https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-logo.png');
In this example we illustrate how to take a double real-type 3D matrix from MATLAB, and pass it to a C double* array. The main objectives of this example are showing how to obtain data from MATLAB MEX arrays and to highlight some small details in matrix storage and handling. matrixIn.cpp #include...
To retreive the screens width and height in pixels, we can make use of the WindowManagers display metrics. // Get display metrics DisplayMetrics metrics = new DisplayMetrics(); context.getWindowManager().getDefaultDisplay().getMetrics(metrics); These DisplayMetrics hold a series of informatio...
Some applications that use Hibernate generate a huge amount of SQL when the application is started. Sometimes it's better to enable/disable the SQL log in specific points when debugging. To enable, just run this code in your IDE when you are debugging the aplication: org.apache.log4j.Logger.getLog...
Generally, if we want to remove an element from an array, we need to know it's index so that we can remove it easily using remove(at:) function. But what if we don't know the index but we know the value of element to be removed! So here is the simple extension to an array which will allow us to re...
# models fit1 <- lm(mpg ~ wt, data = mtcars) fit2 <- lm(mpg ~ wt+hp, data = mtcars) fit3 <- lm(mpg ~ wt+hp+cyl, data = mtcars) # export to html texreg::htmlreg(list(fit1,fit2,fit3),file='models.html') # export to doc texreg::htmlreg(list(fit1,fit2,fit3),file='models.doc') Th...
NOTE: This example is WIP, it will be updated with diagrams, images, more examples, etc. What is Phong? Phong is a very basic, but real looking light model for surfaces that has three parts: ambient, diffuse, and specular lighting. Ambient Lighting: Ambient lighting is the simplest of the t...
As of IntelliJ IDEA version 2016.2, and IdeaVim version 0.46, IntelliJ's native option for showing line numbers is ineffective. When clicking Show line numbers, the line numbers immediately show and disappear. This problem is caused by a bug in the IdeaVim plugin, which can be resolved by using the...
By default, some keystrokes that are useful in Vim contradict with the keystrokes of IntelliJ. For example, ^R in Vim is 'redo', but in IntelliJ it's the shortcut for Run To decide which program interprets the keystroke, go to Preferences -> Other Settings -> Vim Emulation and choose which k...
You can save the layout of your tabs and windows to standardize your work environment. The layouts menu can be found in the upper right corner of Unity Editor: Unity ships with 5 default layouts (2 by 3, 4 Split, Default, Tall, Wide) (marked with 1). In the picture above, aside from default layo...
PriorityQueue is a data structure. Like SortedSet, PriorityQueue sorts also its elements based on their priorities. The elements, which have a higher priority, comes first. The type of the PriorityQueue should implement comparable or comparator interface, whose methods decides the priorities of the ...
Uniform grid will place all it's children in a grid layout, each child in it's own cell. All the cells will have the same size. It can be thought to be a shorthand to a grid where all the row and column definitions are set to * Default rows and columns By default the UniformGrid will try to crea...
public class CustomTextView extends TextView { private float strokeWidth; private Integer strokeColor; private Paint.Join strokeJoin; private float strokeMiter; public CustomTextView(Context context) { super(context); init(null); } public ...
The following code makes the UI unresponsive for a short while after the button click, since too many Platform.runLater calls are used. (Try scrolling the ListView immediately after the button click.) @Override public void start(Stage primaryStage) { ObservableList<Integer> data = FXCol...
The java.util.LinkedList class, while implementing java.util.List is a general-purpose implementation of java.util.Queue interface too operating on a FIFO (First In, First Out) principle. In the example below, with offer() method, the elements are inserted into the LinkedList. This insertion operat...

Page 432 of 1038