Tutorial by Examples: c

Determine the number of PRF rounds to use for a specific delay on the current platform. Several parameters are defaulted to representative values that should not materially affect the round count. password Sample password. salt Sample salt. msec Targeted duration we want to achieve f...
SVN FreeBSD project use SVN as default SCM. Source could be download with svnlite software. Get Current cd /usr/src svnlite checkout https://svn.freebsd.org/base/head . Get Releases cd /usr/src svnlite checkout https://web.freebsd.org/base/release/11.0.0 . Tarball (http & ftp) You c...
Go to the directory with the source code: cd freebsdsrc Go to the directory with the kernel's configuration code: # If your system is 32-bit. cd sys/i386/conf/ # If your system is 64-bit. cd sys/amd64/conf/ Get a copy of the GENERIC kernel (let's call it MODEDKERNEL). It will ...
Let's configure the destination directory for the root filesystem of your new FreeBSD (for example /usr/home/beastie/MODEDKERNEL). Add the following lines to /etc/src.conf to set it up: .if ${KERNCONF} == "MODEDKERNEL" DESTDIR?=/usr/home/beastie/MODEDKERNEL MODULES_OVERRID...
The preserveAspectRatio attribute has an optional parameter: meet | slice. The default behavior is meet which stretches the content in both the x and y dimension until it fills either the width or height of the viewBox. The alternative - slice preserves the aspect ratio of the content but scales up ...
identification division. program-id. deleting. environment division. configuration section. input-output section. file-control. select optional indexed-file assign to "indexed-file.dat" status is indexing-status organization is ind...
What happens when we execute python -m SimpleHTTPServer 9000? To answer this question we should understand the construct of SimpleHTTPServer (https://hg.python.org/cpython/file/2.7/Lib/SimpleHTTPServer.py) and BaseHTTPServer(https://hg.python.org/cpython/file/2.7/Lib/BaseHTTPServer.py). Firstly, P...
// Default UINavigationBar appearance throughout the app [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor], NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-CondensedBold...
Spring is a vast framework, so the Spring framework has been divided in several modules which makes spring lightweight. Some important modules are: Spring Core Spring AOP Spring JDBC Spring Transaction Spring ORM Spring MVC All the modules of Spring are independent of each other except S...
Keychain.h #import <Foundation/Foundation.h> typedef void (^KeychainOperationBlock)(BOOL successfulOperation, NSData *data, OSStatus status); @interface Keychain : NSObject -(id) initWithService:(NSString *) service_ withGroup:(NSString*)group_; -(void)insertKey:(NSString *)key with...
Tested with A.S. v1.4.1 but should work with newer versions too. Create a new Android Studio project using the project wizard (Menu:/File/New Project): Call it "cvtest1" Form factor: API 19, Android 4.4 (KitKat) Blank Activity named MainActivity You should have a cvtest1 dire...
To show contents of an RDD, it have to be printed: myRDD.foreach(println) To limit number of rows printed: myRDD.take(num_of_rows).foreach(println)
keyword search cd /usr/ports make search key=apache name search cd /usr/ports make search name=apache24 Using fresports Official FreeBSD ports website (http://freshports.org/) give you a nice way to find ports and all information concerning it.
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...
Manual packaging You can make your own package based on ports. cd /usr/ports/www/apache24 make package BATCH=yes This command will store your package in /usr/ports/packages/All. Using poudriere poudriere is currently the official package builder for FreeBSD. Installing poudriere pkg instal...
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...

Page 592 of 826