Tutorial by Examples

<mvc:View controllerName="sap.m.sample.ListCounter.List" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"> <List headerText="Fruits" items="{path:'products>/Products', sorter:{path:'Name'}, filter:{path:'Type', o...
import AVFoundation class QRScannerViewController: UIViewController, AVCaptureMetadataOutputObjectsDelegate { func viewDidLoad() { self.initCaptureSession() } private func initCaptureSession() { let captureDevice = AVCaptureDevice .defa...
Use the quotestar register to copy/paste between Vim and system clipboard "*yy copies the current line into the system clipboard "*p pastes the content of the system clipboard into Vim
Method Overriding and Overloading are two forms of polymorphism supported by Java. Method Overloading Method overloading (also known as static Polymorphism) is a way you can have two (or more) methods (functions) with same name in a single class. Yes its as simple as that. public class Shape{ ...
Dynamic Time Warping(DTW) is an algorithm for measuring similarity between two temporal sequences which may vary in speed. For instance, similarities in walking could be detected using DTW, even if one person was walking faster than the other, or if there were accelerations and decelerations during ...
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 ...
One of the most important implementations of Dynamic Programming is finding out the Longest Common Subsequence. Let's define some of the basic terminologies first. Subsequence: A subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the orde...
Weighted Job Scheduling Algorithm can also be denoted as Weighted Activity Selection Algorithm. The problem is, given certain jobs with their start time and end time, and a profit you make when you finish the job, what is the maximum profit you can make given no two jobs can be executed in parallel...
Detailed instructions on getting azure-documentdb set up or installed.
Suppose you are asked, given the total weight you can carry on your knapsack and some items with their weight and values, how can you take those items in such a way that the sum of their values are maximum, but the sum of their weights don't exceed the total weight you can carry? The 0-1 indicates e...
The mellium.im/xmpp/jid package implements operations on JIDs. To split a JID string into its component parts the SplitString function may be used: lp, dp, rp, err := SplitString("[email protected]") No validation is performed by the function and the parts are not guaranteed to be vali...
#include <gtk/gtk.h> static void destroy(GtkWidget *widget, gpointer data) { gtk_main_quit(); } int main(int argc, char *argv[]) { gtk_init(&argc, &argv); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Window"); g_...
The DirectX SDK is included within the Windows SDK, in all versions past Windows SDK v8. Normally, the Windows SDK is installed with Visual Studio (any version past Visual Studio 2012), however, it can be installed separately. Previously, the DirectX SDK was available as a separate installation, the...
In general, we tend to back up the DB with the pgAdmin client. The following is a sh script used to save the database (under linux) in two formats: SQL file: for a possible resume of data on any version of PostgreSQL. Dump file: for a higher version than the current version. #!/bin/sh...
Problem ConcurrentDictionary shines when it comes to instantly returning of existing keys from cache, mostly lock free, and contending on a granular level. But what if the object creation is really expensive, outweighing the cost of context switching, and some cache misses occur? If the same key ...
To list the dependency tree: gem dependency To list which gems depend on a specific gem (bundler for example) gem dependency bundler --reverse-dependencies
int x, y; bool ready = false; void init() { x = 2; y = 3; ready = true; } void use() { if (ready) std::cout << x + y; } One thread calls the init() function while another thread (or signal handler) calls the use() function. One might expect that the use() function ...
The example above can also be implemented with fences and relaxed atomic operations: int x, y; std::atomic<bool> ready{false}; void init() { x = 2; y = 3; atomic_thread_fence(std::memory_order_release); ready.store(true, std::memory_order_relaxed); } void use() { if (re...
One of the best features of async/await syntax is that standard try-catch coding style is possible, just like you were writing synchronous code. const myFunc = async (req, res) => { try { const result = await somePromise(); } catch (err) { // handle errors here } }); Here'...

Page 1035 of 1336