Tutorial by Examples: er

var pipeline = {}; // (...) adding things in pipeline for(var key in pipeline) { fs.stat(pipeline[key].path, function(err, stats) { if (err) { // clear that one delete pipeline[key]; return; } // (...) pipeline[key].count++; }); } The problem i...
In the official reference document, it says: The main function of an inbound Channel Adapter is to execute a SQL SELECT query and turn the result set as a message. The message payload is the whole result set, expressed as a List, and the types of the items in the list depend on the row-mapping st...
In the Spring Integration Reference Docuement, it says: The outbound Channel Adapter is the inverse of the inbound: its role is to handle a message and use it to execute a SQL query. The message payload and headers are available by default as input parameters to the query... Java code p...
Print a 16-bit unsigned number in decimal The interrupt service Int 21/AH=02h is used to print the digits. The standard conversion from number to numeral is performed with the div instruction, the dividend is initially the highest power of ten fitting 16 bits (104) and it is reduced to lower power...
As you can see the layout of this gem is very catching and user friendly.
Plain Vanilla Filtering To filter any view, override its get_queryset method to return a filtered query set class HREmployees(generics.ListAPIView): def get_queryset(self): return Employee.objects.filter(department="Human Resources") All the API functions will then use t...
Avoid this Anti-Pattern var myDeferred = $q.defer(); $http(config).then(function(res) { myDeferred.resolve(res); }, function(error) { myDeferred.reject(error); }); return myDeferred.promise; There is no need to manufacture a promise with $q.defer as the $http service alread...
This example is filtered text from an IRB session. => require 'erb' => input = <<-HEREDOC <ul> <% (0..10).each do |i| %> <%# This is a comment %> <li><%= i %> is <%= i.even? ? 'even' : 'odd' %>.</li> <% end %> </ul> H...
byte incoming; String inBuffer; void setup() { Serial.begin(9600); // or whatever baud rate you would like } void loop(){ // setup as non-blocking code if(Serial.available() > 0) { incoming = Serial.read(); if(incoming == '\n') { // newline, car...
In OCaml, there are different arithmetic operators for floats and integers. Additionally, these operators can only be used on 2 floats or 2 integers. Here are invalid expressions in OCaml 1.0 + 2.0 1 + 2.0 1 +. 2 1 +. 2.0 The correct expression for each of these respectively are 1. +. 2. fl...
When you logged into Odoo application you will find an option to see who is the current logged in person in the top right corner. This user information have a dropdown button. Click on the dropdown, then you will find a list. In that list select about Odoo.com option. Clicking on that will open a Ab...
Main motive to develop this compound view is, below 5.0 devices does not support svg in drawable inside TextView/EditText. One more pros is, we can set height and width of drawableRight inside EditText. I have separated it from my project and created in separate module. Module Name : custom_edit_d...
<# .DESCRIPTION Writes the metric out in bosun external collector format which is compatible with scollector external scripts .PARAMETER metric Name of the metric (eg : my.metric) .PARAMETER type Type of metric (counter, gauge, etc) .PARAMETER unit ...
In this example we will ask the bitcoin network for the merkle block number 442603. In order to do this we need to send a filterload message and then we have to send a getdata message using the inventory type MSG_MERKLEBLOCK. The peers should reply with a merkleblock message for the requested bloc...
Consider a basic class containing an object with getters and setters in Java: public class CountHolder { private int count = 0; public int getCount() { return count; } public void setCount(int c) { count = c; } } We can't access the count variable because it's private. But we can ac...
library(dplyr) library(nycflights13) There are several verbs most commonly used in dplyr to modify datasets. select Select tailnum, type, model variables from the dataframe planes: select(planes, tailnum, type, model) ## # A tibble: 3,322 × 3 ## tailnum type mode...
Click on New Files --> Transformation once a new transformation is open, Click on views tab ,under views create two connections (source ) and (destination). source: table where data is available destination: table where you want to push your data. Once done. on the top bar you have tools -...
Helper functions are used in conjunction with select to identify variables to return. Unless otherwise noted, these functions expect a string as the first parameter match. Passing a vector or another object will generate an error. library(dplyr) library(nycflights13) starts_with starts_with al...
One needs the predicted probabilities in order to calculate the ROC-AUC (area under the curve) score. The cross_val_predict uses the predict methods of classifiers. In order to be able to get the ROC-AUC score, one can simply subclass the classifier, overriding the predict method, so that it would a...
There might be times where you have a data frame and you want to remove all the rows that might contain an NA value, for that the function complete.cases is the best option. We will use the first 6 rows of the airquality dataset to make an example since it already has NAs x <- head(airquality) ...

Page 331 of 417