Tutorial by Examples: ect

Please note that this example uses OpenCV 3.1. import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Point; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.imgcodecs.Imgcodecs; import org.opencv.imgproc.Imgproc; import org.opencv.o...
This example introduces the VideoCapture class, where we use it to take an image from a webcam and save it to an image. import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Point; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.imgc...
This example by Daniel Baggio was taken directly from this StackExchange answer, but has been reposted for visibility. This class takes an Mat object and returns the BufferedImage object used by the javax.swing libraries. This can be used by a Graphics object to draw the image. private BufferedIma...
This example uses Dice and the black spots on the dice (the pips) as our object. As the example is quite long, first explaining some key concepts is critical to understanding the example. Understanding the first example, "Getting a static image, detecting items on it, and outputting the result...
Ionic Platform: Build, push, deploy, and scale your Ionic apps, the easy way. Title Description: The Ionic Platform is a cloud platform for managing and scaling cross-platform mobile apps. Integrated services enable you and your team to build, deploy, and grow your apps efficiently. Docume...
The Constructor Dependency Injection requires parameters in the constructor to inject dependencies. So you have to pass the values when you create a new object. public class Example { private readonly ILogging _logging; public Example(ILogging logging) { this._logging = l...
show collections or show tables or db.getCollectionNames()
Imports System.Data.OleDb Private WithEvents _connection As OleDbConnection Private _connectionString As String = "myConnectionString" Public ReadOnly Property Connection As OleDbConnection Get If _connection Is Nothing Then _co...
After including oclazyload.js in your index file, declare ocLazyLoad as a dependency in app.js //Make sure you put the correct dependency! it is spelled different than the service! angular.module('app', [ 'oc.lazyLoad', 'ui-router' ])
The following syntax allows you to specify dependencies in your module.js instead of explicit specification when using the service //lazy_module.js angular.module('lazy', [ 'alreadyLoadedDependency1', 'alreadyLoadedDependency2', ... [ 'path/to/lazily/loaded/dependency.js', 'path/to/l...
<div oc-lazy-load="['path/to/lazy/loaded/directive.js', 'path/to/lazy/loaded/directive.html']"> <!-- myDirective available here --> <my-directive></my-directive> </div>
Make sure to have mongodb running first! mongod --dbpath data/ package.json "dependencies": { "mongoose": "^4.5.5", } server.js (ECMA 6) import mongoose from 'mongoose'; mongoose.connect('mongodb://localhost:27017/stackoverflow-example'); const db = mon...
michael@who-cares:~$ The symbol ~ after the who-cares: is the current directory. ~ actually means the person's home directory. In this case, that's /home/michael. michael@who-cares:~$ cd Downloads michael@who-cares:~/Downloads$ Looks for Downloads in the current directory, then makes that th...
Ionic Platform: Build, push, deploy, and scale your Ionic apps, the easy way. Title Description: The Ionic Platform is a cloud platform for managing and scaling cross-platform mobile apps. Integrated services enable you and your team to build, deploy, and grow your apps efficiently. Docume...
HttpClient httpClient = new StdHttpClient.Builder(). url("http://yourcouchdbhost:5984"). username("admin"). password("password"). build(); CouchDbInstance dbInstance = new StdCouchDbInstance(httpClient);
Given you have a valid CouchDbInstance instance, you connect to a database within CouchDB in the following manner CouchDbConnector connector = dbInstance.createConnector("databaseName", true);
If you want to detect missings with df=pd.DataFrame({'col':[1,np.nan]}) df==np.nan you will get the following result: col 0 False 1 False This is because comparing missing value to anything results in a False - instead of this you should use df=pd.DataFrame({'col':[1,np.nan]}) ...
Below is and HTML page <html> <head> <title>Select Example by Index value</title> </head> <body> <select name="Travel"><option value="0" selected> Please select</option> <option value="1">Car</option&...
By default, the url property is not defined. Calling fetch() (while using the default Backbone.sync) will result in a GET request to the results of url. var Users = Backbone.Collection.extend({ url: '/api/users', // or url: function () { return '/api/users' } }); va...
Dependency resolver is used to avoid tightly-coupled classes, improve flexibility and make testing easy. You can create your own dependency injector (not recomended) or use one of well-written and tested dependency injectors. In this example I am going to use Ninject. Step one: Create dependency re...

Page 66 of 99