Tutorial by Examples: er

Install the world sudo make installworld KERNCONF=MODEDKERNEL Estimated time on Hasee Q540S: 5 minutes. Install the kernel sudo make installkernel KERNCONF=MODEDKERNEL Estimated time on Hasee Q540S: a few seconds.
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 ...
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...
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...
You can push tasks or data to the firebase realtime database and run a worker which listens to the firebase queue to run some background processess Setup firebase Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google project a...
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 ...
When invoking a def, parameters may be assigned explicitly by name. Doing so means they needn't be correctly ordered. For example, define printUs() as: // print out the three arguments in order. def printUs(one: String, two: String, three: String) = println(s"$one, $two, $three") ...
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 ...
index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *"/> ...
CELERY Installation - pip install django-celery Add Basic project structure. - src/ - bin/celery_worker_start # will be explained later on - logs/celery_worker.log - stack/__init __.py - stack/celery.py - stack/settings.py - stack/urls.py - manage.py ...
Create a script to start celery worker. Insert your script within your app. For example: stack/bin/celery_worker_start #!/bin/bash NAME="StackOverflow Project - celery_worker_start" PROJECT_DIR=/home/stackoverflow/apps/proj/proj/ ENV_DIR=/home/stackoverflow/apps/proj/env/...
You can extend C++ with named operators that are "quoted" by standard C++ operators. First we start with a dozen-line library: namespace named_operator { template<class D>struct make_operator{constexpr make_operator(){}}; template<class T, char, class O> struct half_a...
In C, there are two unary operators - '++' and '--' that are very common source of confusion. The operator ++ is called the increment operator and the operator -- is called the decrement operator. Both of them can be used used in either prefix form or postfix form. The syntax for prefix form for ++ ...
CREATE CERTIFICATE My_New_Cert FROM FILE = 'D:\Temp\CertTest\certificateDER.cer' GO Create the certificate SELECT EncryptByCert(Cert_ID('My_New_Cert'), 'This text will get encrypted') encryption_test Usually, you would encrypt with a symmetric key, that key would get encrypted by the asym...
A common pattern in other languages is having a function that produces a "stream" of objects, and being able to use loop-code to loop over it. We can model this in C++ as template<class T> struct generator_iterator { using difference_type=std::ptrdiff_t; using value_type=T; ...
By definition: Services are basically constructor functions. They use ‘this’ keyword. Factories are simple functions hence return an object. Under the hood: Factories internally calls provider function. Services internally calls Factory function. Debate: Factories can run code before we retur...
Latest Cordova version: Cordova 6.1.0 - https://cordova.apache.org/news/2016/03/23/tools-release.html Cordova 6.0.0 - https://cordova.apache.org/news/2016/01/28/tools-release.html Latest Android platform and iOS plaatform Cordova Android 5.2.2 - https://cordova.apache.org/announcements/2...
Deferred execution enables combining different operations to build the final query, before evaluating the values: var list = new List<int>() {1,1,2,3,5,8}; var query = list.Select(x => x + 1); If we execute the query at this point: foreach (var x in query) { Console.Write($"...
With deferred execution, if the data to be queried is changed, the query object uses the data at the time of execution, not at the time of definition. var data = new List<int>() {2, 4, 6, 8}; var query = data.Select(x => x * x); If we execute the query at this point with an immediate m...

Page 300 of 417