Tutorial by Examples: e

When building a custom release track, it's common to keep packages in the /packages directory as git submodules. The following command allows you to fetch all of the latest commits for the submodules in your /packages directory at the same time. git submodule foreach git pull origin master
Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class. The Logcat output can be displayed within Android Studio's Android Monitor or with adb command line. In And...
The following example creates a Bootstrap Drop-Down menu, using only Blaze and no JQuery. Document Object Model <nav class="nav navbar-nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="drop...
Alerts and errors are nearly the simplest of all Meteor component patterns. They're so simple, in fact, that they barely register as a pattern in of themselves. Instead of adding FlashAlert modules or patterns, all you really need to do is style a Handlebar template appropriate, add a helper, and wi...
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 ...
For efficiency, Prolog code is typically compiled to abstract machine code before it is run. Many different abstract machine architectures and variants have been proposed for efficient execution of Prolog programs. These include: WAM, the Warren Abstract Machine TOAM, an abstract machine used i...
All widely used Prolog interpreters use argument indexing to efficiently select suitable clauses. Users can typically rely on at least first argument indexing, meaning that clauses can be efficiently told apart by the functor and arity of the outermost term of the first argument. In calls where tha...
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');
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...
To get the screens density, we also can make use of the Windowmanagers DisplayMetrics. This is a quick example: // Get density in dpi DisplayMetrics metrics = new DisplayMetrics(); context.getWindowManager().getDefaultDisplay().getMetrics(metrics); int densityInDpi = metrics.densityDpi;
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...
Type switches can also be used to get a variable that matches the type of the case: func convint(v interface{}) (int,error) { switch u := v.(type) { case int: return u, nil case float64: return int(u), nil case string: return strconv(u) default: ...
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...

Page 503 of 1191