Tutorial by Examples

Adding a icon to your tray-bar let tray = null; let mainWindow = null; let user = null; app.on('ready', () => { /** * Tray related code. */ const iconName = 'icon.png'; const iconPath = path.join(__dirname, iconName); tray = new Tray(iconPath); tray.setT...
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...
In Controller: $this->load->model('your_model'); $data['model'] = $this->your_model; In view: $model->your_method;
We need to use tag <ui:remove> and </ui:remove> between any JSF code that we want to comment it. <ui:remove> <h:outputLabel value="Yeah, I'm really commented" /> </ui:remove> Of course you need add this xmlns to your header html tag. Check this minim...
You must to add to web.xml a configuration tag like this: <context-param> <param-name>facelets.SKIP_COMMENTS</param-name> <param-value>true</param-value> </context-param> Now you can use normal HTML comments tag <!-- and --> <!-- <...
First lets create a vector called Vector1: set.seed(123) Vector1 <- rnorm(20) And add missing data to it: set.seed(123) Vector1[sample(1:length(Vector1), 5)] <- NA Now we can use the is.na function to subset the Vector Vector1 <- Vector1[!is.na(Vector1)] Now the resulting vect...
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) ...
the most common use case is to set pointer-events to none to prevent certain shapes or all of your drawing to capture mouse events, and to let the shapes underneath them to receive the events. If you hover over the area where the red circle overlaps the blue circle, the blue circle will still rece...
A constant expression is an expression that yields a primitive type or a String, and whose value can be evaluated at compile time to a literal. The expression must evaluate without throwing an exception, and it must be composed of only the following: Primitive and String literals. Type ca...
Setting pointer-events="fill" lets you receive mouse events on a shape even if its fill is set to none <svg viewBox="0 0 100 100"> <style> circle:hover{fill:green} </style> <circle class="target" cx="50" cy="5...
ll | grep ^- | awk -F"." '{print $2 "." $3}' | awk -F":" '{print $2}' | awk '{$1=""; print $0}' | cut -c2- | awk -F"." '{print "mkdir ""$1"";mv ""$1"."$2"" ""$1"""}' >...
In Apache Spark while doing shuffle operations like join and cogroup a lot of data gets transferred across network. Now, to control the number of partitions over which shuffle happens can be controlled by configurations given in Spark SQL. That configuration is as follows: spark.sql.shuffle.partiti...
Java expressions are evaluated following the following rules: Operands are evaluated from left to right. The operands of an operator are evaluated before the operator. Operators are evaluated according to operator precedence Argument lists are evaluated from left to right. Simple Example I...
git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA' \ --prune-empty --tag-name-filter cat -- --all Add your file with sensitive data to .gitignore to ensure that you don't accidentally commit it again. echo "YOUR-FILE-WITH-SE...
BFG Repo cleaner is an alternative to git filter-branch. It can be used to remove sensitive data or large files that were committed wrongly like binaries compiled from the source. It is written in Scala. Project website: BFG Repo Cleaner Requirements The Java Runtime Environment (Java 7 or above ...
Objects become eligible for garbage collection (GC) if they are no longer reachable by the main entry point(s) in a program. GC is usually not performed explicitly by the user, but to let the GC know an object is no longer needed a developer can: Dereference / assign null someFunction { var ...
When interfacing with C APIs, one might want to back off Swift reference counter. Doing so is achieved with unmanaged objects. If you need to supply a type-punned pointer to a C function, use toOpaque method of the Unmanaged structure to obtain a raw pointer, and fromOpaque to recover the original ...
; IF d0 == 10 GO TO ten, ELSE GO TO other CMP #10,d0 ; compare register contents to immediate value 10 ; instruction affects the zero flag BEQ ten ; branch if zero flag set other: ; do whatever needs to be done for d0 != 10 BRA ...
getFirstName() - returns the context user's first name. getLastName() - returns the context user's last name.

Page 1055 of 1336