Tutorial by Examples: er

In case you need different settings for your various applications, there is (as of Flink 1.2) no easy way to do that. If you use the one-yarn-cluster-per-job mode of flink (i.e. you launch your scripts with: flink run -m yarn-cluster ...), here is a workaround : create a conf directory somewhe...
There are a variety of ways to validate parameter entry, in PowerShell. Instead of writing code within functions or scripts to validate parameter values, these ParameterAttributes will throw if invalid values are passed. ValidateSet Sometimes we need to restrict the possible values that a paramet...
// Fetches the value of $_GET['id'] and returns 0 if it does not exist. $id = $_GET['id'] ?? 0; // This is equivalent to: $id = isset($_GET['id']) ? $_GET['id'] : 0; // Coalescing can be chained: this will return the first defined value out of // $_GET['id'], $_POST['id'], and 0. $id = $_GE...
Sometimes you want to switch off all previously registered listeners. //Adding a normal click handler $(document).on("click",function(){ console.log("Document Clicked 1") }); //Adding another click handler $(document).on("click",function(){ console.log(&q...
Note: The Redis project does not officially support Windows. However, the Microsoft Open Tech group develops and maintains this Windows port targeting Win64. Official redis.io/download You can choose to download different versions or the latest version of Redis github.com/MSOpenTech/redis/release...
Generic example in a form of $a <=> $b matrix. 0 <=> 1; // -1 (left operand less than right, right is greater) 0 <=> 0; // 0 (operands are equal) 1 <=> 0; // 1 (left operand greater than right, left is greater) 1 <=> 1; // 0 (operands are equal) ╔═══════╦════╦═...
$array = [1, 0, 5, 9, 3, 7, 6, 8, 4, 2]; usort($array, function (int $a, int $b): int { return $a <=> $b; }); print_r($array); Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8...
<!doctype html> <html> <head> <title>Page Title</title> <meta charset="UTF-8"> <meta name="viewport" content="initial-scale=1.0"> <script src="vue.js"></script> <style> ...
To add a component with a selector [prefix]-user-list, run: $ ng g c user-list installing component create src/app/user-list/user-list.component.css create src/app/user-list/user-list.component.html create src/app/user-list/user-list.component.spec.ts create src/app/use...
To add a directive with a selector [prefix]Highlight, run: $ ng g d highlight installing directive create src/app/highlight.directive.spec.ts create src/app/highlight.directive.ts update src/app/app.module.ts To prevent prefix usage add --prefix false or -p false flag ...
To add a service with a name UserService, run: $ ng g s user installing service create src/app/user.service.spec.ts create src/app/user.service.ts To prevent .spec files creation add --spec false or -sp false flag $ ng g s user --spec false installing service ...
To add a pipe with a name searchByName, run: $ ng g p search-by-name installing pipe create src/app/search-by-name.pipe.spec.ts create src/app/search-by-name.pipe.ts update src/app/app.module.ts To prevent .spec files creation add --spec false or -sp false flag $ ng ...
To add a module called GuestModule, run: $ ng g m guest installing module create src/app/guest/guest.module.ts To enable .spec files creation add --spec or -sp flag $ ng g m guest --spec installing module create src/app/guest/guest.module.spec.ts create src/app/...
Instead of defining URL endpoints for each data resource, in GraphQL you define a single endpoint that accepts GraphQL queries. Unlike traditional database query languages, GraphQL Query Language (GQL) is a projection of data returned by a root level query. The GraphQL schema will define the data mo...
Let's go through the problem first. Have a look on the code below: public class BankAccount { public BankAccount() {} public string AccountNumber { get; set; } public decimal AccountBalance { get; set; } public decimal CalculateInterest() { // Co...
Ordered broadcasts are used when you need to specify a priority for broadcast listeners. In this example firstReceiver will receive broadcast always before than a secondReceiver: final int highPriority = 2; final int lowPriority = 1; final String action = "action"; // intent filter ...
To understand Dependency Inversion Principle (DIP) we need to clear concept about Inversion Of Control(IOC) and Dependency Injection(DI). So here we discuss all about the terms with Dependency Inversion Principle (DIP). Inversion Of Control(IOC) : The control or logic which is not the part of t...
Introduction SRP can be defined as “a class handles only one responsibility”. This is a very short definition for something influential on to the other principles of S.O.L.I.D. I believe that if we get this right, it will have a positive knock-on effect on the upcoming principles, so let’s get star...
Here we give an example of ISP violation and then refactor that violation. Without talking unnecessary things let's jump into the code. ISP violation : public interface IMessage{ IList<string> ToAddress {get; set;} IList<string> BccAddresses {get; set;} string MessageBody {get; s...
All documents from students collection. > db.students.find().pretty(); { "_id" : ObjectId("58f29a694117d1b7af126dca"), "studentNo" : 1, "firstName" : "Prosen", "lastName" : "Ghosh", "age" ...

Page 382 of 417