Tutorial by Examples: bac

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...
Add button Login as facebook account to your login view: Edit site/login.php in views folder, add theses line to content of page login: <?= yii\authclient\widgets\AuthChoice::widget([ 'baseAuthUrl' => ['site/auth'], 'popupMode' => false, ]) ?> Above, we set that aut...
We need to create a container to mount the volume. Then archive it and download the archive to our host. Let's create first a data volume with some data: docker volume create --name=data echo "Hello World" | docker run -i --rm=true -v data:/data ubuntu:trusty tee /data/hello.txt Let...
If you want to match a backslash in your regular expression, you'll have to escape it. Backslash is an escape character in regular expressions. You can use '\\' to refer to a single backslash in a regular expression. However, backslash is also an escape character in Java literal strings. To make a...
It is common to use a background Thread for doing network operations or long running tasks, and then update the UI with the results when needed. This poses a problem, as only the main thread can update the UI. The solution is to use the runOnUiThread() method, as it allows you to initiate code exe...
Often when using a callback you want access to a specific context. function SomeClass(msg, elem) { this.msg = msg; elem.addEventListener('click', function() { console.log(this.msg); // <= will fail because "this" is undefined }); } var s = new SomeClass("hello&q...
task = Task.async(fn -> expensive_computation end) do_something_else result = Task.await(task)
Firebase provides backend as a service, as applciation developer you do not have an option to have backend code. This example shows how using firebase queue, create backend which will operate on the top of firebase database and serve as a backend for your frontend application. Before getting into ...
Many widgets include events which can fire callback functions when the user interacts with the widget. For example when a button is pressed, a checkbox checked, or a dropdown chosen you can fire a function. The exact flag which is associated with these event depends on the widget, but a typical cal...
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 { ...
Let's create very simple video player using QtMultimedia module of Qt 5. In .pro file of your application you will need the following lines: QT += multimedia multimediawidgets Note that multimediawidgets is necessary for usage of QVideoWidget. #include <QtMultimedia/QMediaPlayer> #inclu...
To add a background-image rule via the CSSOM, first get a reference to the rules of the first stylesheet: var stylesheet = document.styleSheets[0].cssRules; Then, get a reference to the end of the stylesheet: var end = stylesheet.length - 1; Finally, insert a background-image rule for the bo...
First of all, Ensure that the user which will be running this call has the Change backup settings and control backup process privilege. # # TC Backup Launcher # Script to launch a backup on the TeamCity Server # Param( [Parameter(Mandatory=$true)][string]$username, [Parameter(Mandato...
18.0 By default, any function specified in a -callback directive in a behaviour module must be exported by a module that implements that behaviour. Otherwise, you'll get a compiler warning. Sometimes, you want a callback function to be optional: the behaviour would use it if present and exported,...
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background.png"]];
//fill column A with solid red color from hex worksheet.Column(1).Style.Fill.PatternType = ExcelFillStyle.Solid; worksheet.Column(1).Style.Fill.BackgroundColor.SetColor(ColorTranslator.FromHtml("#FF0000")); //fill row 4 with striped orange background worksheet.Row(4).Style.Fill.Patte...
// Takes a callback and executes it with the read value def readFile(path: String)(callback: Try[String] => Unit): Unit = ??? readFile(path) { _.flatMap { file1 => readFile(path2) { _.foreach { file2 => processFiles(file1, file2) }} }} The function argument to readFile is...
When HTTP requests arrive faster than your application can process them, they can form a large backlog on a number of routers. When the backlog on a particular router passes a threshold, the router determines that your application isn’t keeping up with its incoming request volume. You’ll see an H11 ...
We will create a simple "Hello World!" app with Angular2 2.4.1 (@NgModule change) with a node.js (expressjs) backend. Prerequisites Node.js v4.x.x or higher npm v3.x.x or higher or yarn Then run npm install -g typescript or yarn global add typescriptto install typescript globally ...
COPY products TO 'D:\csv_backup\products_db.csv' DELIMITER ',' CSV HEADER; COPY categories TO 'D:\csv_backup\categories_db.csv' DELIMITER ',' CSV HEADER;

Page 9 of 12