Tutorial by Examples: ect

It depends on kind of hosting that you have: If you have SSH console, then you can do it on hosting after step 2, if you haven't then do it locally: run command php app/console cache:clear --env=prod'. Suppose you have on you hosting folders youdomain/public_html, so in public_html m...
using CLI: $ opennlp SentenceDetector ./en-sent.bin < ./input.txt > output.txt using API: import static java.nio.file.Files.readAllBytes; import static java.nio.file.Paths.get; import java.io.IOException; import java.util.Objects; public class FileUtils { /** * Get file data as...
Guice is the default dependency injection (further DI) framework of Play. Other frameworks may be used as well, but using Guice makes development efforts easier, since Play takes care for things under the veil. Injection of Play API-s Starting from Play 2.5 several API-s, which were static in the ...
The per-directory context is a part of the static configuration file between <Directory> and </Directory> tags. The entire content of dynamic configuration files is within the per-directory context of the folder in which the .htaccess resides. RewriteRule's in per-directory context matc...
private static final String TAG = "IntentBitmapFetch"; private static final String COLON_SEPARATOR = ":"; private static final String IMAGE = "image"; @Nullable public Bitmap getBitmap(@NonNull Uri bitmapUri, int maxDimen) { InputStream is = context.getConten...
interface IService { void ProcessRequest(); } interface IRepository { IEnumerable<string> GetData(); } class HelloWorldRepository : IRepository { public IEnumerable<string> GetData() { return new[] { "Hello", "World" }; } ...
Here the steps required to create a Firebase project and to connect with an Android app. Add Firebase to your app Create a Firebase project in the Firebase console and click Create New Project. Click Add Firebase to your Android app and follow the setup steps. When prompted, enter yo...
The container creates a singleton bean and injects collaborators into it only once. This is not the desired behavior when a singleton bean has a prototype-scoped collaborator, since the prototype-scoped bean should be injected every time it is being accessed via accessor. There are several solution...
Here we will be creating a Groovy pipeline in Jenkins 2 to do the following steps : Verify every 5 minutes if new code has been commited to our project Checkout code from SCM repo Maven compile of our Java code Run our integration tests and publish the results Here are the steps we will : ...
After you obtained BluetoothDevice, you can communicate with it. This kind of communication performed by using socket input\output streams: Those are the basic steps for Bluetooth communication establishment: 1) Initialize socket: private BluetoothSocket _socket; //... public InitializeSock...
In this example you will learn how to use Microsoft Cognitive Services with Xamarin iOS mobile application. We will use Computer Vision API to detect what is in the picture. Once you create Xamarin.iOS project please add below NuGet package to the project: https://www.nuget.org/packages/Microsoft....
Directives can be decorated just like services and we can modify or replace any of it's functionality. Note that directive itself is accessed at position 0 in $delegate array and name parameter in decorator must include Directive suffix (case sensitive). So, if directive is called myDate, it can be...
From the NuGet Package Manager console: Install-Package CouchbaseNetClient
A common question among new Angular programmers - "What should be the structure of the project?". A good structure helps toward a scalable application development. When we start a project we have two choices, Sort By Type (left) and Sort By Feature (right). The second is better, especially...
public class DrawRectangle { public static void main(String[] args) { //Load native library System.loadLibrary(Core.NATIVE_LIBRARY_NAME); //image container object Mat goruntuDizisi=new Mat(); //Read image in file system goruntuDizisi=Imgcodecs.imread("C:\\i...
var httpRequest = new XMLHttpRequest(); httpRequest.onreadystatechange = getData; httpRequest.open('GET', 'https://url/to/some.file', true); httpRequest.send(); function getData(){ if (httpRequest.readyState === XMLHttpRequest.DONE) { alert(httpRequest.responseText); } ...
A generic schema useful to work with geo-objects like points, linestrings and polygons. Both Mongoose and MongoDB support Geojson. Example of usage in Node/Express: var mongoose = require('mongoose'); var Schema = mongoose.Schema; // Creates a GeoObject Schema. var myGeo= new Schema({ ...
Numpy provides a cross function for computing vector cross products. The cross product of vectors [1, 0, 0] and [0, 1, 0] is [0, 0, 1]. Numpy tells us: >>> a = np.array([1, 0, 0]) >>> b = np.array([0, 1, 0]) >>> np.cross(a, b) array([0, 0, 1]) as expected. While cr...
Animation to show how selection sort works The below example shows selection sort in Python def sort_selection(my_list): for pos_upper in xrange( len(my_list)-1, 0, -1): max_pos = 0 for i in xrange(1, pos_upper + 1): if(my_list[i] > my_list[max_pos]): max_po...
Assuming a abstract class: class ILogger { virtual ~ILogger() = default; virtual Log(const std::string&) = 0; }; Instead of void doJob(ILogger* logger) { if (logger) { logger->Log("[doJob]:Step 1"); } // ... if (logger) { logge...

Page 63 of 99