Tutorial by Examples: st

It is often necessary to execute a long-running task and use the result of that task once it has completed. In this example, we will create two classes: One which implements the Callable<T> interface (where T is the type we wish to return), and one which contains a main() method. AsyncValueT...
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...
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.
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...
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 => ...
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...
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...
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...
Lets say you have a user schema, which contains name , contactNo, address, and friends. var UserSchema = new mongoose.Schema({ name : String, contactNo : Number, address : String, friends :[{ type: mongoose.Schema.Types.ObjectId, ref : User }] }); If y...
Fully configuration of Web deployment without Internet connection (offline) is harder to make because Web platform installer (UI) operates by querying packages list and content from an Internet location. Cleanup Make sure that C:\Program Files\IIS does not contain older version of Microsoft We...
Detailed instructions on getting dicom set up or installed.
You now need to register the Expander, in order for it to be used by the Razor View Engine. Just add this in the ConfigureServices of your Startup class. public void ConfigureServices(IServiceCollection services) { services.Configure<RazorViewEngineOptions>(options => { opti...

Page 298 of 369