Tutorial by Examples: l

Extend your class with Drawable and override these methods public class IconDrawable extends Drawable { /** * Paint for drawing the shape */ private Paint paint; /** * Icon drawable to be drawn to the center of the shape */ private Drawable icon; /**...
The hooks are all stored in the hooks sub directory of the Git directory. In most projects, that’s .git/hooks. To enable a hook script, put a file in the hooks subdirectory of your .git directory that is named appropriately (without any extension) and is executable.
Detailed instructions on getting stored-procedures set up or installed.
Let's say we have a String parameter and we want to split it by comma my_param="foo,bar,bash" To split this string by comma we can use; IFS=',' read -r -a array <<< "$my_param" Here, IFS is a special variable called Internal field separator which defines the char...
Linux distribution with features required to run Kodi.
Detailed instructions on getting plone set up or installed.
Terminal Commands: rails g model Product name:string quantity:integer price:decimal{12,2} rake db:migrate Lates create controller. Terminal Commands: rails g controller Products Controller Code: class HistoriesController < ApplicationController def create file = Dir.glob(...
private final String COLLECTION_NAME = "myCollection"; private final String ZOOKEPER_CLIENT_TIMEOUT_MS = "1000000" private Map<String, String> getShardLeaders(CloudSolrServer cloudSolrServer) throws InterruptedException, KeeperException { Map<String, Stri...
If we have a schema looking like: <field name="id" type="string" indexed="true" stored="true" required="true" /> <field name="name" type="string" indexed="true" stored="true" /> the solrj co...
If you added successfully documents to Solr using the previous example, you'll be now able to retrieve them in this way: package com.stackoverflow.solrj.example; import java.io.IOException; import java.util.Iterator; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.cli...
Data mining is a wide topic, and the term is (unfortunately) very liberally thrown at any topic that involves data processing. Because of this this "documentation" should never have been created in the first place, because it overlaps with other topcis too much, and everything is better di...
You can source configuration from environment variables by calling .AddEnvironmentVariables() on you ConfigurationBuilder. It will load environment variables prefixed with APPSETTING_ It will then use colon : as the key path separator. This means that : following environement settings : APPSETTI...
When dealing with large configuration sets of value, it might become quite unhandy to load them one buy one. Option model which comes with asp.net offers a convenient way to map a section to a dotnet poco: For instance, one might hydrate StorageOptions directly from a configuration section b addin...
public String getHighlightedText(final QueryResponse queryResponse, final String fieldName, final String docId) { String highlightedText = ""; Map<String, Map<String, List<String>>> highlights = queryResponse.getHighlighting(); if (highlights!=null &&am...
To use OpenGL ES in your application you must add this to the manifest: <uses-feature android:glEsVersion="0x00020000" android:required="true"/> Create your extended GLSurfaceView: import static android.opengl.GLES20.*; // To use all OpenGL ES 2.0 methods and constants...
In order to be able to directly deploy web project changes to an Web Server, the following steps must be followed. If target server has Internet access, the process is quite simple, as Microsoft has a Web Platform package to do almost everything that is needed. Cleanup Make sure that C:\Progra...
While good software design often maximizes code reusability, sometimes it can be useful to define asynchronous tasks inline in your code via Lambda expressions to maximize code readability. In this example, we will create a single class which contains a main() method. Inside this method, we will us...
import com.couchbase.client.core.endpoint.SSLEngineFactory import com.couchbase.client.java.env.DefaultCouchbaseEnvironment import com.couchbase.client.java.CouchbaseCluster object CouchbaseConnection extends App { //Create default environment object. //Set the keystone file path(downlo...
This example creates a simple window with a button and a line-edit in a layout. It also shows how to connect a signal to a slot, so that clicking the button adds some text to the line-edit. import sys from PyQt5.QtWidgets import QApplication, QWidget if __name__ == '__main__': app ...
Detailed instructions on getting pyqt4 set up or installed. Windows Link Mac Link Linux Link If you want to install the version specific to your system python version and you system configuration(32-bit or 64-bit) then go to this link and download and install the package. You can install the...

Page 693 of 861