Tutorial by Examples: a

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...
The most popular operating system for the Raspberry Pi is a Debian based Raspbian. It is officially supported by the Raspberry Pi Foundation. Raspbian can be downloaded from official Raspberry Pi site in one of two variants: With desktop environment Lite- Minimal image Starting September 20...
It is possible to create own Linux distribution using Yocto Project. For Raspberry Pi- there is a specific layer meta-raspberrypi that needs to be used to create an image.
Detailed instructions on getting plone set up or installed.
In computer programming an iterator is an object that enables a programmer to traverse a container, particularly lists. Wikipedia struct Turtle { let name: String } struct Turtles { let turtles: [Turtle] } struct TurtlesIterator: IteratorProtocol { private var current = 0 p...
JUnit defines quite some assertEquals methods at least one for each primitive type and one for Objects is available. These methods are by default not directly available to call and should be called like this: Assert.assertEquals. But because these methods are used so often people almost always use a...
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(...
To leverage distributed cache, you'll have to reference one of the available implementations : Redis Sql server For instance you'll register Redis implemention as follows : public void ConfigureServices(IServiceCollection services) { services.AddDistributedRedisCache(options => ...
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...
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...
In this example we will describe what happens when you scaffold a new project. First thing, the following dependencies will be added to you project (currently project.json file) : "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", "Microsoft.Extensions.Co...
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...
You can also source configuration from an in memory object such as a Dictionary<string,string> .AddInMemoryCollection(new Dictionary<string, string> { ["akey"] = "a value" }) This can reveal helpful in integration/unit testing scenarios.
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...
Download the desired version of WordPress from www.wordpress.org to your local computer and unzip the file. Also keep a backup of your current version... just in case. Connect to your website with your favorite FTP client (FileZilla is popular and easy, but any FTP client will be fine)...
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...

Page 890 of 1099