Tutorial by Examples: dc

Objective-C //Displays the country pickerView with black background and white text [self. countryPicker setValue:[UIColor whiteColor] forKey:@"textColor"]; [self. countryPicker setValue:[UIColor blackColor] forKey:@"backgroundColor"]; Swift let color1 = UIColor(colorLitera...
This is a porting of set up sourced from DigitalOcean's tutorial of How To Serve Flask Applications with uWSGI and Nginx on Ubuntu 14.04 and some useful git resources for nginx servers. Flask Application This tutorial assume you use Ubuntu. locate var/www/ folder. Create your web app folder m...
'Note: I use this method to extract non-html data in extracted GET telnet results 'This example effectively grabs every other vehicle that have start and finish 'characters, which in this case is "/". 'Resulting in an array like this: 'extractedData(0) = "/Jeep" 'extractedD...
To externalise a distributed systems configuration Spring Cloud Config provides server and client-side support needed for externalising and centralising your configuration. To get started quickly you could use Spring Initializr to bootstrap your server. Add the Config Server dependency to automatic...
To get started quickly you could use Spring Initializr to bootstrap your client. Add the Config Client to automatically generate a project with the needed dependencies. Or you could add the dependency manually to an existing Spring Cloud application. <dependency> <groupId>org.spri...
The most important part of your RMD file is the YAML header. For writing an academic paper, I suggest to use PDF output, numbered sections and a table of content (toc). --- title: "Writing an academic paper in R" author: "Author" date: "Date" output: pdf_documen...
app.module.ts Add these into your app.module.ts file to use reactive forms import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AppComponent } from './app.comp...
This small example shows how you can lose backward compatibility in your programs if you do not take care in advance about this. And ways to get more control of serialization process At first, we will write an example of the first version of the program: Version 1 [Serializable] class Data { ...
When adding custom fields to a Lucene index you can add new fields into the index using the following configuration: <configuration ref="contentSearch/indexConfigurations/defaultLuceneIndexConfiguration"> <indexAllfields>false</indexAllfields> <fieldNames hint=...
/** * Runs user-specified code when the given javascript object is garbage collected */ template<class CALLBACK_FUNCTION> void global_set_weak(v8::Isolate * isolate, const v8::Local<v8::Object> & javascript_object, CALLBACK_FUNCTION function) { struct SetWeakCallbackData{...
Avoid calling methods using strings that can accept methods. This approach will make use of reflection that can slow down your game especially when used in the update function. Examples: //Avoid StartCoroutine with method name this.StartCoroutine("SampleCoroutine"); //Ins...
MSDN-GetObject Function Returns a reference to an object provided by an ActiveX component. Use the GetObject function when there is a current instance of the object or if you want to create the object with a file already loaded. If there is no current instance, and you don't want the object ...
To run macros and maintain the security Office applications provide against malicious code, it is necessary to digitally sign the VBAProject.OTM from the VBA editor > Tools > Digital Signature. Office comes with a utility to create a self-signed digital certificate that you can employ on th...
Lists as arguments are just another variable: def func(myList): for item in myList: print(item) and can be passed in the function call itself: func([1,2,3,5,7]) 1 2 3 5 7 Or as a variable: aList = ['a','b','c','d'] func(aList) a b c d
Before starting gulp we need to install node.js and npm. Then install gulp-sacc $ npm i gulp-sass --save-dev // i = install Gulp Head var gulp = require('gulp'); // Requires the gulp-sass plugin var sass = require('gulp-sass'); Gulp Body gulp.task('sass', function(){ return gulp.src('...
Installing Gulp and His Tasks $ npm install gulp --save-dev $ npm install gulp-sass --save-dev $ npm install gulp-uglify --save-dev $ npm install gulp-imagemin --save-dev Determining Folder Structure In this structure, we will use the app folder for development purposes, while the dist folde...
A broadcast join copies the small data to the worker nodes which leads to a highly efficient and super-fast join. When we are joining two datasets and one of the datasets is much smaller than the other (e.g when the small dataset can fit into memory), then we should use a Broadcast Hash Join. The f...
The only way if your components does not have a parent-child relationship (or are related but too further such as a grand grand grand son) is to have some kind of a signal that one component subscribes to, and the other writes into. Those are the 2 basic operations of any event system: subscribe/li...
Here's an example of a React component with a "managed" input field. Whenever the value of the input field changes, an event handler is called which updates the state of the component with the new value of the input field. The call to setState in the event handler will trigger a call to ...
Problem ConcurrentDictionary shines when it comes to instantly returning of existing keys from cache, mostly lock free, and contending on a granular level. But what if the object creation is really expensive, outweighing the cost of context switching, and some cache misses occur? If the same key ...

Page 21 of 28