Tutorial by Examples: o

If you have found your software in the ports tree, now its the time to build it. Simple build and install with manual configuration cd /usr/ports/www/apache24 make make install Simple build and install with automatic configuration cd /usr/ports/www/apache24 make BATCH=yes make install ...
If you want custom configuration from ports, you can configure it before building it make config. All ports configuration are stored in /var/db/ports/${CATEGORY_NAME}/options as makefile. Configuring www/apache24 cd /usr/ports/www/apache24 make config make make install This configuration wil...
A jail is simply a chroot with strong isolation. So, if you want to create jail, you simply need to create an alternative root and starting a new jail in it. Simple jail deployment from binaries # create our alternative root path JAILROOT="/path/to/my/jail" mkdir -p "${JAILROOT}&q...
FreeBSD jails can have fine grained networking configuration. By default, every jails use the same network configuration than host. Removing network support jail -c name="nonetwork" path="/path/to/your/jail" ip4=disable ip6=disable Allowing only IPv4 networking jail -c name...
Regular expression matching is a powerful tool (in Java, and in other contexts) but it does have some drawbacks. One of these that regular expressions tends to be rather expensive. Pattern and Matcher instances should be reused Consider the following example: /** * Test if all strings in a lis...
Three basic tools. nginx - free, open-source, high-performance HTTP server and reverse proxy, with high performance; gunicorn - 'Green Unicorn' is a Python WSGI HTTP Server for UNIX (needed to manage your server); supervisor - a client/server system that allows its users to monitor and control ...
The for comprehension is a compact way to run a block of code that depends on the successful result of multiple futures. With f1, f2, f3 three Future[String]'s that will contain the strings one, two, three respectively, val fCombined = for { s1 <- f1 s2 <- f2 ...
.iloc uses integers to read and write data to a DataFrame. First, let's create a DataFrame: df = pd.DataFrame({'one': [1, 2, 3, 4, 5], 'two': [6, 7, 8, 9, 10], }, index=['a', 'b', 'c', 'd', 'e']) This DataFrame looks like: one two a 1 6 b 2 ...
Command Structure is sqlcmd -S yourservername\instancename -d database_name -o outputfilename_withpath -Q "your select query" Switches are as follows -S for servername and instance name -d for source database -o for target outputfile (it will create output file) -Q fo...
' A "Hello, World!" program in Visual Basic. Module Hello Sub Main() MsgBox("Hello, World!") ' Display message on computer screen. End Sub End Module
For BLE slave devices to do any useful work, the GPIOs of the wireless MCU are almost always involved. For instance, to read temperature from an external sensor, the ADC functionality of GPIO pins may be required. TI's CC2640 MCU features a maximum of 31 GPIOs, given different packaging types. In t...
Cordova plugins are in simple words a layer on top of the respective native platform. Plugins provide an interface between to access the native platform.
Cordova Plugins provide a common interface to interact with the native code. Each plugin has an intermediary JavaScript file that provides access to platform specific features.
cordova plugin add <plugin-name> Example: cordova plugin add cordova-plugin-camera The plugin should be installed in the root directory of the project. Note: Before adding the plugin replace the platform specific www folder content with the outer www folder in the root directory. Th...
cordova-plugin-battery-status - used for monitoring device's battery status. cordova-plugin-camera - provides an API for taking pictures and for choosing images from the system's image library. cordova-plugin-contacts - provides access to the device contacts database. cordova-plug...
It crops the images in square shape. This cordova project uses two plugins: Cordova Camera Plugin -- https://github.com/apache/cordova-plugin-camera Cordova Crop Image Plugin -- https://github.com/jeduan/cordova-plugin-crop The Camera plugin is combined with the Crop Image Plugin by ...
Pygame has a module, pygame.draw, that contains functions which can draw shapes directly to a Surface. FunctionDescriptionpygame.draw.rectdraw a rectangle shapepygame.draw.polygondraw a shape with any number of sidespygame.draw.circledraw a circle around a pointpygame.draw.ellipsedraw a round shape...
You can always run JavaScript from inside itself, although this is strongly discouraged due to the security vulnerabilities it presents (see Remarks for details). To run JavaScript from inside JavaScript, simply use the below function: eval("var a = 'Hello, World!'");
You can set a variable to something with the eval() function by using something similar to the below code: var x = 10; var y = 20; var a = eval("x * y") + "<br>"; var b = eval("2 + 2") + "<br>"; var c = eval("x + 17") + "<br&...
This example implements a custom binding that toggles visibility (similar to the existing visible binding), but will utilize jQuery's fading API to animate the transition from visible to invisible. Custom binding definition: //Add a custom binding called "fadeVisible" by adding it as a p...

Page 732 of 1038