Tutorial by Examples

In case of big data sets, the call of grepl("fox", test_sentences) does not perform well. Big data sets are e.g. crawled websites or million of Tweets, etc. The first acceleration is the usage of the perl = TRUE option. Even faster is the option fixed = TRUE. A complete example would be: ...
This example shows how to make an interactive presentation transition with "real-world" physics similar to iOS's notifications screen. To start with, we need a presenting view controller that the shade will appear over. This view controller will also act as our UIViewControllerTransitio...
The scatter function has two undocumented properties 'jitter' and 'jitterAmount' that allow to jitter the data on the x-axis only. This dates back to Matlab 7.1 (2005), and possibly earlier. To enable this feature set the 'jitter' property to 'on' and set the 'jitterAmount' property to the desired ...
The old-school method for running another script from batch is to echo the script into another location, and then run it. This method can be represented like this: @echo off rem VBS below echo your vbs > TempVBS.vbs echo other vbs>>TempVBS.vbs rem End of VBS cscript //nolog...
Processing provides method triangle() to draw a triangle. This code draws a white triangle on black background. void setup() { size(500, 500); background(0); fill(255); noStroke(); } void draw() { triangle(250, 225, 225, 275, 275, 275); }
Another convenient solution for cross compilation is the usage of gox: https://github.com/mitchellh/gox Installation The installation is done very easily by executing go get github.com/mitchellh/gox. The resulting executable gets placed at Go's binary directory, e.g. /golang/bin or ~/golang/bin. E...
In order to load data from a MongoDB database into an R dataframe, use the library MongoLite: # Use MongoLite library: #install.packages("mongolite") library(jsonlite) library(mongolite) # Connect to the database and the desired collection as root: db <- mongo(collection = &quo...
Methods used: .DriveExists(strDrive) returns (True/False) .FileExists(strFile) returns (True/False) .FolderExists(strFolder) returns (True/False) The following code checks for the existence of a file using the "FileExists" method of a file system object. For checking the existence of...
Methods used: .DeleteFolder(FileSpec, Force (True/False)) .CreateFolder(Path) .DeleteFile(FileSpec, Force (True/False)) The following example illustrates the Deletion and creation of a folder using the methods "DeleteFolder" and "CreateFolder". Code: Dim strFolderPath, ob...
Methods Used: .CopyFile(Source, Dest [,Overwrite (True/False)] .CopyFolder(Source, Dest [,Overwrite (True/False)] The following code illustrates the use of CopyFile method to copy a file to a new location. The same thing can be achieved for the folders by using the CopyFolder method. Code: Di...
Methods Used: .MoveFile(Source, Dest) .MoveFolder(Source, Dest) The following code illustrates the use of MoveFile method to Move a file to a new location. The same thing can be achieved for the folders by using the MoveFolder method. Code: Dim objFso, strSourcePath, strDestPath strSourcePat...
Methods used: .GetFolder(strPath) - Returns an object referring to the path We can set an object reference to a folder using the getFolder method and perform different operations on them. Code: Dim strFolderPath, objFso, objFolder strFolderPath = "C:\Users\GS\Desktop\LogsFolder" Se...
Methods Used: .GetFile(strPath) - Returns an object referring to a file. We can set an object reference to a file using the getFile method and perform different operations on them. Code: Dim strFilePath, objFso, objFile strFilePath = "C:\Users\GS\Desktop\LogsFolder\file.txt" Set ob...
As you would know, Hadoop can be run in the local environment in 3 different modes : Local Mode Pseudo Distributed Mode Fully Distributed Mode (Cluster) Typically you will be running your local hadoop setup in Pseudo Distributed Mode to leverage HDFS and Map Reduce(MR). However you cannot de...
As java provide two different commands to compile and run Java code. Same as Kotlin also provide you different commands. javac to compile java files. java to run java files. Same as kotlinc to compile kotlin files kotlin to run kotlin files.
This example shows how to customize the UIDynamicItem protocol to map position changes of a view being dynamically animated to bounds changes to create a UIButton that expands and contracts in a elastic fashion. To start we need to create a new protocol that implements UIDynamicItem but that also...
Redis-py provides the execute_command method to directly invoke Redis operations. This functionality can be used to access any modules that may not have a supported interface in the redis-py client. For example, you can use the execute_command to list all of the modules loaded into a Redis server:...
EQ checks if two values have the same address of memory: in other words, it checks if the two values are are actually the same, identical object. So, it is can be considered the identity test, and should be applied only to structures: conses, arrays, structures, objects, typically to see if you ...
These three operators implement structural equivalence, that is they check if different, complex objects have equivalent structure with equivalent component. EQUAL behaves like EQL for non-structured data, while for structures built by conses (lists and trees), and the two special types of arrays, ...
Numeric values can compared with = and the other numeric comparison operators (/=, <, <=, >, >=) that ignore the difference in the physical representation of the different types of numbers, and perform the comparison of the corresponding mathematical values. For instance: (= 42 42) T ;...

Page 1261 of 1336