Tutorial by Examples: all

In case of problems, enable the internal logger. C# example: // set internal log level InternalLogger.LogLevel = LogLevel.Trace; // enable one of the targets: file, console, logwriter: // enable internal logging to a file (absolute or relative path. Don't use layout renderers) InternalL...
First, install the morgan Middleware in your project npm install --save morgan
Add the following code to your app.js file: var express = require('express') var morgan = require('morgan') var app = express() app.use(morgan('combined')) app.get('/', function (req, res) { res.send('hello, world!') }) Now when you access your website you will see in the console y...
To understand this example, it is recommended to have a brief idea on Bellman-Ford single source shortest path algorithm which can be found here In Bellman-Ford algorithm, to find out the shortest path, we need to relax all the edges of the graph. This process is repeated at most (V-1) times, where...
This would be a basic setup in wich we will send all the log messages to the console and to a log file. Let's start with the libraries. Will use maven for that: <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifact...
Floyd-Warshall's algorithm is for finding shortest paths in a weighted graph with positive or negative edge weights. A single execution of the algorithm will find the lengths (summed weights) of the shortest paths between all pair of vertices. With a little variation, it can print the shortest path ...
Detailed instructions on getting iOS 10 set up or installed.
Detailed instructions on getting actionscript set up or installed.
No Java variable represents an object. String foo; // NOT AN OBJECT Neither does any Java array contain objects. String bar[] = new String[100]; // No member is an object. If you mistakenly think of variables as objects, the actual behavior of the Java language will surprise you. For...
Castle enables to register components also via XML Registration. //To install from the app/web.config container.Install(Configuration.FromAppConfig()); //To install from an xml file Configuration.FromXmlFile("relative_path_to_file.xml"); Read Castle's documentation for "What ...
Detailed instructions on getting networking set up or installed.
Catching exceptions in Kotlin looks very similar to Java try { doSomething() } catch(e: MyException) { handle(e) } finally { cleanup() } You can also catch multiple exceptions try { doSomething() } catch(e: FileSystemException) { handle(e) } catch(e: Network...
For performance reasons, or due to the existence of mature C libraries, you may want to call C code from a Haskell program. Here is a simple example of how you can pass data to a C library and get an answer back. foo.c: #include <inttypes.h> int32_t foo(int32_t a) { return a+1; } F...
Inside a Project configuration, you can Create build configuration: Manually Provide a Name and a Description. The Build Configuration ID is generated from the ProjectName, and the Build Configuration Name's. Once your configuraion is Saved, you can specify a Version Control Settings. This will ...
Detailed instructions on getting doxygen set up or installed.
Detailed instructions on getting pagination set up or installed.
Depending on your target machine, you need to choose a supported ROS Version (or vice-versa). Although ROS installation is well documented in the ROS wiki, It might be confusing to find them. So, here's a table of the ROS Version, target platforms & architecture and the links for the appropriate...
Consider the following Java classes: class Foo { private Bar bar; public void foo() { bar.baz(); } } As can be seen, the class Foo needs to call the method baz on an instance of another class Bar for its method foo to work successfully. Bar is said to be a dependency for Foo sin...
The same examples as shown above with XML configuration can be re-written with Java configuration as follows. Constructor injection @Configuration class AppConfig { @Bean public Bar bar() { return new Bar(); } @Bean public Foo foo() { return new Foo(bar()); } } Property in...
If you're creating an image, decoding an image, or resizing an image to fit the large notification image area, you can get the correct pixel dimensions like so: Resources resources = context.getResources(); int width = resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_width)...

Page 76 of 113