D&D Reader

Another app for players of Dungeons & Dragons has been announced, called D&D Reader. Basically it is a kind of e-book reader only for D&D rulebooks and adventures. Instead of bringing a backpack full of books to your game, you bring a single tablet with all the information on it. And to some extent it is searchable, which isn’t the case for paper books.

Now a few years ago I would have said that this is a brilliant idea, exactly what I needed. But since then I spent $280 to get access to all D&D books in digital form on D&D Beyond. As long as I have internet access, that gives me the same functionality: Able to read any D&D book on my tablet and search it. But the new D&D reader app is from a different company. So, you guessed it, if I wanted to use that app as well, I would need to pay *again* for all those books. Which would be the third time, since I already own the books in paper format and on D&D Beyond. Just to have offline access. No thanks!

Wizards of the Coast really need to rethink their strategy on this one. In this time and age it is a great idea to have content available in different ways, paper, online, and offline digital. But a full collection of D&D books is already expensive to buy once. The paper books should include a coupon for all digital versions. I was already exaggerating by buying the books twice, but who on earth is going to go for a third version at full price?

Wondering what comes next

The liberal world order has been defined as standing for “greater individual freedom, greater choice, support for democratic forms of government, a fundamental faith in free-market capitalism and private enterprise, a belief in constitutional forms of government with divided powers, an independent judiciary, separation of church and state, a strong support for free trade and an aversion to protectionism, among other things”. Obviously there is a lot to like about these values. Most economists believe that this system is the one that is best suited to the creation of wealth. However the predominance of the liberal world order in the last 30 years has also demonstrated that while the system is good for the creation of wealth overall, it isn’t all that good in the distribution of that wealth. That not only leads to a lot of opposition, but is also somewhat self-defeating in the long run: Concentrated wealth is less good at further powering the economy than distributed wealth.

In the USA and a lot of other places the current main opposition against the liberal world order comes from the right, from nationalism, protectionism, populism, and ethnocentrism. However if you look at those right-wing forces enacting policies like the current US tax reform or the Brexit from the UK, it is likely that the right will not solve the problem of wealth distribution any better than the liberal world order (and will presumably create less wealth in the first place). Blaming foreigners and the media will only get right-wing politicians so far until the people realize that they aren’t in fact “better off than they were four years ago”. It is that, and not the whole lot of unrelated shouting about various values, that ultimately will bring change. The liberal world order failed the people, but the conservative version isn’t doing any better. So I’m wondering what will come next.

One likely answer is in the form of people like Bernie Sanders and Jeremy Corbyn. The economic left might one day look like a good answer to people whose main concern is wealth distribution, because the economic left has always stood for redistribution of wealth. However the economic left also has some policies in their book that hinders wealth creation more than necessary for a fair distribution. And they have a long history of ending up with “more equal than others” policies that aren’t in fact much closer to a fair distribution of wealth than the conservative version.

What an optimist could hope for would be a reformed liberal world order, the same values as above but with a priority for wealth distribution and against too much wealth concentration. A vision like in Robert Reich’s Saving Capitalism. However if you look at how the world previously solved excesses of wealth creation, there are only few examples of peaceful solutions (e.g. Theodore Roosevelt) and lots of examples of the wealth ending up destroyed or redistributed through war and revolution. A pessimist would buy gold coins instead of bitcoins.

Simplified : Client_Server – Socket Programming in Java

Client_Server – Socket Programming in Java

java socket programming



Client -server communication

At a basic level, network-based systems consist of a server , client , and a media for communication. A computer running a program that makes a request for services is called client  machine. A computer running a program that offers requested services from one or more clients is called  server machine.

Client-Server Architcture


What are Sockets?

In Client-Server architecture, you have two processes (running client-Server programs) that want to communicate with each other. For that, they have to establish a communication link between themselves. There is a network available,they just need to connect to this network , for this they use sockets.

Sockets in client server architecture

A socket is one endpoint of a two-way communication link between two programs running on the network.

An endpoint is a combination of an IP address and a port number. Every TCP connection can be uniquely identified by its two endpoints. That way you can have multiple connections between your host and the server.
The java.net package in the Java platform provides a class, Socket, that implements one side of a two-way connection between your Java program and another program on the network. 

How do I Open a Socket ?

If you are programming a client, then you would open a socket like this:
 Socket s;
s
= new Socket("Machine name", PortNumber);
Where Machine name is the machine you are trying to open a connection to, and Port-Number is the port (a number) on which the server you are trying to connect to is running. When selecting a port number, you should note that port numbers between 0 and 1,023 are reserved for privileged users (that is, super user or root). These port numbers are reserved for standard services, such as email, FTP, and HTTP. When selecting a port number for your server, select one that is greater than 1,023!


It is a good practice to handle exceptions. The above can be written as:

    Socket s;
try {
s
= new Socket("Machine name", PortNumber);
}
catch (IOException e) {
System.out.println(e);
}
If you are programming a server, then this is how you open a socket:

    ServerSocket ss;
try {
ss
= new ServerSocket(PortNumber);
}
catch (IOException e) {
System.out.println(e);
}
When implementing a server you also need to create a socket object from the ServerSocket in order to listen for and accept connections from clients.

Socket clientSocket = null;
try {
serviceSocket
= ss.accept();
}
catch (IOException e) {
System.out.println(e);
}

How do I create Buffered Reader?

Java BufferedReader class is used to read the text from a character-based input stream. It can be used to read data line by line by readLine() method. It makes the performance fast. 
    try {
BufferedReader br = new BufferedReader(new InputStreamReader(ss.getInputStream()));

}
catch (IOException e) {
System.out.println(e);
}

How do I create an output stream?

On the client side, you can create an output stream to send information to the server socket using the class  of java.io:
    PrintStream output;
try {
OutputStream ostream = sock.getOutputStream();
DataOutputStream dos = new DataOutputStream(ostream);

}
catch (IOException e) {
System.out.println(e);
}
The class DataOutputStream allows you to write Java primitive data types; many of its methods write a single Java primitive type to the output stream. The method writeBytes is a useful one.

How do I Close a Socket ?

On the client side:

    try {
output
.close();
input
.close();
s
.close();
}
catch (IOException e) {
System.out.println(e);
}

On the server side:

    try {
output
.close();
input
.close();
ss
.close();
}
catch (IOException e) {
System.out.println(e);
}
Let’s see java code for one-way communication using socket programming:

Client Side Code:
import java.net.Socket; 
import java.io.OutputStream;
import java.io.DataOutputStream;

public class SCPTL
{
public static void main(String args[]) throws Exception
{
Socket sock = new Socket("localhost", 5000);
String message1 = "Learn-Intern-Certify from SCPTL";

OutputStream ostream = sock.getOutputStream();
DataOutputStream dos = new DataOutputStream(ostream);
dos.writeBytes(message1);
dos.close();
ostream.close();
sock.close();
}
}
Server Side Code:
import java.net.ServerSocket;            
import java.net.Socket;
import java.io.*;

public class SERVER
{
public static void main(String args[]) throws Exception
{
ServerSocket sersock = new ServerSocket(5000);
System.out.println("server is ready"); // message to know the server is running

Socket sock = sersock.accept();

BufferedReader br = new BufferedReader(new InputStreamReader(sock.getInputStream()));

String message2 = br.readLine();
System.out.println(message2);
sock.close(); sersock.close();
}
}

Output:

Client:

Client side output
Server:

Server side output

Want to learn more about java?

What is Dash? — a short guide

CoinJournal

What is Dash? It’s a cryptocurrency. At it’s simplest, Dash is a form digital cash you can send over the internet to a friend or retailer without a middleman like a bank.

Read: What is cryptocurrency?

Dash began its journey in 2014 and is currently the sixth largest cryptocurrency in the world by market cap — behind Bitcoin, Ethereum, Bitcoin Cash, IOTA, and Ripple. But how is it different from Bitcoin, what are its advantages, and how much does it cost? You’ll find answers to these questions and more below.

Dash vs Bitcoin

The Merkle

Dash is similar to Bitcoin in many ways. You can use it to make purchases online or hold on to it as an investment. It also runs on a publicly disclosed blockchain that records each transaction.

Read: What is a blockchain? – Gary Explains

But Bitcoin has its share of problems Dash is trying to solve. Speed is one of them. Dash transactions are confirmed in four seconds, while sending Bitcoins to someone can take 10 minutes or more.

Then there are the fees. The average Bitcoin transaction fee is around $6, compared to only $0.4 you have to pay to send someone Dash. But the fee will increase when more people start using the cryptocurrency.

A big problem with Bitcoin is also that it doesn’t have a governance structure. This means important changes can’t be made without a hard fork that brings a new cryptocurrency to the market, which is how Bitcoin Cash was born. Dash is different. It has a voting system in place so that important changes can be implemented quickly.

Unlike Bitcoin, Dash is self-funding. 45 percent of newly created Dash goes to the miners, and 45 percent to masternodes. The rest — 10 percent — goes to a treasury for funding the development team, marketing, customer support centers, and so forth.

There are a few other differences between the two cryptocurrencies, but these are the major ones.

What are the advantages of Dash?

What is Dash? BitcoinCloudMining

Two of the biggest advantages of Dash are the speed and low fees already mentioned above. You can send money to anyone in the world for less than $0.4 in four seconds — try doing that through a bank.

Editor’s Pick

Banks charge higher fees, especially if you’re sending money abroad. A transaction can also take up to a few days to complete, although most banks can speed up the process, if you’re willing to pay extra.

Another benefit is anonymity. Although all transactions are public, you don’t have to share personal info like your name and address. However, this can also be a drawback. Dash, Bitcoins, and other cryptocurrencies that provide anonymity have been used by criminal organizations because the money can’t be traced back to them. Some claim their popularity among bad guys is one of the main reasons we’ve seen such a large increase in their value so far.

How to buy, store, and spend Dash?

What is Dash? Dash

Buying Dash is easy. You can get it the same way as many other cryptocurrencies including Bitcoin. Make an account on an exchange like BitPanda or Kraken and buy Dash with your local currency.

There are also a few locations in the US where you can buy Dash from an ATM. It’s the easiest way to get the cryptocurrency, although the fees are high. If you live in Austria, you can buy it at over 400 Post branches and about 1,300 Post partners.

How can you store Dash? You keep the cryptocurrency in a digital wallet, one of which you can download from the company’s website. The alternative is to keep it in a hardware wallet such as the Ledger, which is a much safer method due to the reduced risk of getting hacked.

Businesses that accept Dash include hosting providers, online casinos, and even advertising agencies.

Where can you spend it? Dash isn’t as acceptable as standard currencies like dollars and euros, but there are many businesses that have embraced it. These include hosting providers, online casinos, and even advertising agencies — see full list here. You can also use it as an investment, which we’ll talk more about in the next section.

How is it created and how much does it cost?

What is Dash? Waffal

Dash is created through a process called mining, same as Bitcoins. Mining requires specialized computers that search for solutions to difficult math problems. If the solution is correct, a new block is added to the blockchain and the miner is rewarded with some of the Dash created.

How much does a Dash cost? Its price goes up and down all the time as a result of supply and demand. At the time of writing, you can get one for around $690 — though the exact value of Dash can be seen in the updated widget below. This makes it far less valuable than Bitcoin, which currently costs around $15,800 per piece.

Dash has proven to be an excellent investment so far, as its value has been increasing ever since its introduction. For example, if you had invested $1,000 at the beginning of 2014 when one Dash was worth $0.3, you would have $2.3 million today. Cryptocurrencies have made people into millionaires in a short period of time, which is why everyone is talking about them these days.

If you bought $1,000 worth of Dash at $0.3 per coin in 2014, you would have $2.3 million today.

But before you get too excited and go online to buy Dash, keep in mind that investing in cryptocurrencies is risky. Sure, most of them have increased in value in recent years, but that doesn’t mean the trend will continue. The price can go down as fast as it went up, so make sure to never invest more than you can afford to lose.

What is Dash?


There you have it. These are some of the basic things about Dash. Will it become an important part of our daily lives in the future? No one can be sure, especially because there are many cryptocurrencies on the market — over 1,000. Not all of them will be able to survive, although it looks like Dash is on the right path for now.

Have you ever used Dash or any other cryptocurrency? Let us know in the comments.

Godwin’s Law in politics

If you haven’t read it in a forecast yet, you’ll read it in an analysis next week: The “Nazis” are back in Germany, with a good likelihood of coming in on third place in the German elections next Sunday. Soon the Germans will wear brown shirts again, grow mustaches, and roll their tanks all over Europe. Really? What sounds like a big story in a newspaper headline in reality is far more harmless. It is more a problem of Godwin’s law in politics, where the likelihood of a politician calling another politician or party anywhere to the right of himself a “Nazi” approaches 100% towards election day.

The German elections this weekend are boring. The two parties that govern today together, the center-left SPD and the center-right CDU together will have well more than 50% of the votes. The CDU has about 35%, the SPD 22%, and there is no chance of the SPD overtaking the CDU. 4 smaller parties each have around 10%, with the AfD, which is to the right of the center-right CDU probably getting something like 12% of the vote. So, is that a sign of a growing Nazi resurgence in Germany, or is there a simpler explanation?

The reason why the AfD has more votes than usual is that they are the only party with a strong anti-immigrant position (not counting the regionally limited CSU). The center-right CDU in Germany is well to the left of conservative parties elsewhere, like UK conservatives or US Republicans. Citing Christian values the CDU has welcomed a large number of refugees to Germany, Syrian and other, in previous years. This large influx of immigrants wasn’t unopposed. And so it isn’t really surprising that 12% of voters end up supporting a party that is anti-immigrant, the AfD being their only option in this case. Compare that to other countries, where anti-immigrant parties and policies are in the majority. The news is 88% of voters voting for pro-immigrant parties, not 12% voting for anti-immigrant parties. What you see is an anti-immigrant protest vote, by people who wouldn’t necessarily vote for the AfD if they had any chance at all to actually come to power.

Personally, I have been an immigrant for the last 20 years, and so of course I am pro-immigration. But I do believe that liberals have done a lousy job to explain the advantages of immigration, and to address the various fears of voters regarding immigration, from job competition to crime. I do think that an anti-immigration party has to exist in a democratic society. And we should stop calling people “Nazis” just because they are anti-immigration.

The Smart Weapons Fallacy: Civilian Casualties From ‘Precision’ Air Strikes in Iraq and Syria

There’s no such thing as a smart bomb.

The final elimination of Isis in Iraq and Syria is close, but welcome though the defeat of these monstrous movements may be, it has only been achieved at the cost of great destruction and loss of life. This is the new face of war which governments try to conceal: a limited number of combat troops on the ground call in devastating air strikes from planes, missiles and drones, be they American or Russian, to clear the way for their advance.

Governments pretend that air wars today are very different from Vietnam half a century ago when towns were notoriously “destroyed in order to save them”. These days air forces – be it the Americans in Iraq, the Russians in Syria or the Saudis in Yemen – say that this mass destruction no longer happens thanks to the greater accuracy of their weapons: using a single sniper, a room in a house can supposedly be hit without harming a family crouching in terror in the room next door.

The sale of vastly expensive high precision weapons to countries such as Saudi Arabia is even justified as a humanitarian measure aimed at reducing civilian casualties.

The PR has changed but not the reality. Despite the claims of enhanced accuracy, drone pictures of west Mosul look very much like pictures of east Aleppo, Raqqa or large parts of Damascus where every building is gutted or reduced to heaps of broken bricks interspersed with craters. The problem for journalists or human rights organizations is that it is almost impossible to verify the claims of victims or the denials of alleged perpetrators at the time.

Witnesses, when they are not dead, have often fled or are too frightened to speak; governments, regular armies and air forces will probably get away with it if they stick to a straight denial that they have done anything wrong. Even if damaging information does eventually come out, the news agenda will have moved on and public interest will be slight.

I found it frustrating during the final weeks of the siege of Mosul, which went on for nine months, to know that there was very heavy civilian loss of life as Iraqi forces backed by air strikes closed in on the Old City, but it was impossible to prove it. I was in touch by mobile phone with two different individuals trapped behind Isis lines who faced the dilemma of either staying where they were and chance being killed by the bombardment, or trying to escape to government-held territory and risk being shot by Isis snipers.

The two men took different decisions, but neither of them survived. One was shot dead by Isis as he and his mother joined a group trying to escape across the Tigris using rubber tires because they could not swim. A second man was wounded in one air strike and killed by a second in the last weeks of the siege. Most of the two men’s extended families were also dead by the time the siege ended.

Fortunately some reporters do go on looking at what really happened in battles like Mosul long after the rest of the media has shifted its attention elsewhere. Joel Wing, in the online journal Musings on Iraq, writes that fresh information on casualties raises “the total number of dead during the operation [to capture Mosul city and surrounding area] to 21,224 and 30,996 wounded. 17,404 of the former and 24,580 of the latter occurred in Mosul. The new numbers still highlighted the fact that there are many more undocumented casualties as the wounded should be four to six times higher than the fatalities figure. Even if you subtract the 5,325 people that were executed by the Islamic State, that would still mean there should be 60,000-90,000 injured from the fighting.”

The figure looks high but is credible, taking into account the use of conventional artillery and Russian multiple rocket-launchers in the attack on west Mosul. Casualties from air attack also went up because the rules on ground troops calling in air strikes were relaxed before the attack on west Mosul began. Isis was killing civilians who tried to escape from the shrinking Isis-held enclave and more people were confined in fewer houses so if one was hit the loss of life would be high.

Even before this happened many more civilians were being killed by air strikes than the US-led air coalition was admitting. The only way to get at the truth is to look at a large sample of air strikes on the ground and see if they were reported by the coalition and, if so, how accurate that reporting was.

This has now been done for the first time by Azmat Khan and Anand Gopal, who visited the sites of nearly 150 air strikes in northern Iraq between April 2016 and June 2017. In a lengthy study called “The Uncounted”, published in The New York Times on 16 November, they reached devastating conclusions. They write that “we found that one in five of the coalition strikes we identified resulted in civilian death, a rate more than 31 times that acknowledge by the coalition”. They add that when it comes to civilian deaths this “may be the least transparent war in recent American history”.

The coalition denied that many of the air strikes that had killed people had ever taken place, but the reporters found that there were videos of several of them on the coalition’s YouTube channel, though these claimed to show the destruction of Isis targets. When they pointed this out, the videos were quietly withdrawn.

The picture that the coalition presented of its air offensive turns out to be a fabrication. In one sample of a residential area called Qaiyara, near Mosul city, the coalition claimed it had killed only one civilian in or near the town and the Iraqi air force said it had killed nobody. It turned out that there had been 40 air strikes on this area which had killed 43 civilians, of whom 19 were men, eight women and 16 children aged 14 or younger. In about a third of fatal strikes Isis had been in close proximity to the civilians, but in half of the cases there had been no discernible Isis presence.

Where there was evidence of Isis it was often flimsy and out of date: in one case a family of six was wiped out aside from a two-year-old child because a local informant had once seen a mortar near their house though it had been moved long before the strike.

The significance of the study is great because for the first time it can be shown what is really happening in a series of wars in the Middle East starting with Afghanistan in 2001. There is no such thing as precision air strikes.

The coalition claimed that only one in 157 of its 14,000 air strikes in Iraq since 2014 have caused a civilian death, but the evidence on the ground shows the real rate to be one in five. The comforting claim by American and British air commanders that smart weapons enable them to avoid killing civilians is simply untrue.

 

 

Related Stories

  • The Forgotten Syria Crisis: How the World Profits Off of War
  • Give Your Values This Holiday Season: Buy Mexican
  • Communists Sweep the Nepali Elections, a Blow to The Establishment Parties

About Trees, different Traversals and BST

A tree is a data structure made up of nodes or vertices and edges without having any cycle. The tree with no nodes is called the null or empty tree. A tree that is not empty consists of a root node and potentially many levels of additional nodes that form a hierarchy.

Tree

Tree Terminology

Lets see some tree terminologies:-
Root: The top node in a tree.
Child: A node directly connected to another node when moving away from the Root.
Parent: The converse notion of a child.
Siblings: A group of nodes with the same parent.
Descendant: A node reachable by repeated proceeding from parent to child.
Ancestor: A node reachable by repeated proceeding from child to parent.
Leaf: A node with no children.
Internal node: A node with at least one child.
Degree: The number of sub trees of a node.
Edge: The connection between one node and another.
Path: A sequence of nodes and edges connecting a node with a descendant.
Level: The level of a node is defined by 1 + (the number of connections between the node and the root).
Height of node: The height of a node is the number of edges on the longest path between that node and a leaf.
Height of tree: The height of a tree is the height of its root node.
Depth: The depth of a node is the number of edges from the tree’s root node to the node.
Forest: A forest is a set of n ≥ 0 disjoint trees.

Tree Node

Tree Node has a data part and references to its left and right child nodes.

struct node {
int data;
struct node *leftChild;
struct node *rightChild;
};
In a tree, all nodes share common construct.

Tree Traversals

Traversal is a process to visit all the nodes of a tree and may print their values too. Because, all nodes are connected via edges (links) we always start from the root (head) node. That is, we cannot randomly access a node in a tree. Unlike linear data structures (Array, Linked List, Queues, Stacks, etc) which have only one logical way to traverse them, trees can be traversed in different ways. Following are the generally used ways for traversing trees.

  • In-order Traversal
  • Pre-order Traversal
  • Post-order Traversal

In-Order Traversal

In this traversal method we first visit the left sub-tree, then the root and later the right sub-tree. If a binary tree is traversed in-order, the output will produce sorted key values in an ascending order.
For e.g.
Output of the In-Order traversal for above tree is
4 -> 2 -> 5 -> 1 -> 3
Algorithm Inorder(tree)
1. Recursively traverse the left subtree, i.e., call Inorder(left-subtree)
2. Visit the root
3. Recursively traverse the right subtree, i.e., call Inorder(right-subtree)

Pre-Order Traversal

In this traversal method we first visit the root node, then the left sub tree and finally the right sub-tree.
For e.g.
Output of the In-Order traversal for above tree is 
1-> 2 -> 4 -> 5 -> 3
Algorithm Preorder(tree)
1. Visit the root.
2. Recursively traverse the left subtree, i.e., call Preorder(left-subtree)
3. Recursively traverse the right subtree, i.e., call Preorder(right-subtree)

Post-Order Traversal

In this traversal method we first visit the left sub tree, then the right sub-tree and finally the root node.
For e.g.
Output of the In-Order traversal for above tree is 
4-> 5 -> 2 -> 3 -> 1
Algorithm Postorder(tree)
1. Recursively traverse the left subtree, i.e., call Postorder(left-subtree)
2. Recursively traverse the right subtree, i.e., call Postorder(right-subtree)
3. Visit the root

Binary Search Tree(BST)

In binary tree, every node can have maximum two children but there is no order of nodes based on their values. Binary search tree is a type of binary tree in which all the nodes in left subtree of any node contains smaller values and all the nodes in right sub-tree of that contains larger values as shown in following figure

Operations on a Binary Search Tree

Following Oprations performed on BST
1. Search
2. Insertion
3. Deletion

Search Operation

Whenever an element is to be searched, start searching from the root node. Then if the data is less than the key value, search for the element in the left subtree. Otherwise, search for the element in the right subtree. Follow the same algorithm for each node.
Algorithm
node* search(int data){
struct node *current = root;
printf("Visiting elements: ");
while(current->data != data){
if(current != NULL) {
printf("%d ",current->data);
//go to left tree
if(current->data > data){
current = current->leftChild;
}//else go to right tree
else {
current = current->rightChild;
}
//not found
if(current == NULL){
return NULL;
}
}
}
return current;
}

Insert Operation

Whenever an element is to be inserted, first locate its proper location. Start searching from the root node, then if the data is less than the key value, search for the empty location in the left subtree and insert the data. Otherwise, search for the empty location in the right subtree and insert the data.
Algorithm
Node * Insert(Node * root, int data)
{
if(root == nullptr)
{
Node * NN = new Node();
root = NN;
root->data = data;
root->left = root ->right = NULL;
}
else
{
if(data < root->data)
{
root->left = Insert(root->left, data);
}
else
{
root->right = Insert(root->right, data);
}
}
return root;
}

Deletion Operation in BST

In a binary search tree, the deletion operation is performed with O(log n) time complexity. Deleting a node from Binary search tree has following three cases:-
Case 1: Deleting a Leaf node (A node with no children)
Step 1: Find the node to be deleted using search operation
Step 2: Delete the node using free function (If it is a leaf) and terminate the function.
Case 2: Deleting a node with one child
Step 1: Find the node to be deleted using search operation
Step 2: If it has only one child, then create a link between its parent and child nodes.
Step 3: Delete the node using free function and terminate the function.
Case 3: Deleting a node with two children
Step 1: Find the node to be deleted using search operation
Step 2: If it has two children, then find the largest node in its left subtree (OR) the smallest node in its right subtree.
Step 3: Swap both deleting node and node which found in above step.
Step 4: Then, check whether deleting node came to case 1 or case 2 else goto steps 2
Step 5: If it comes to case 1, then delete using case 1 logic.
Step 6: If it comes to case 2, then delete using case 2 logic.
Step 7: Repeat the same process until node is deleted from the tree.

Do you want to learn Java Programming?

Don’t want to battle for Azeroth

World of Warcraft announced a 7th expansion called Battle for Azeroth. At this point in time I don’t feel any interest in that expansion. If it came out today, I wouldn’t buy it. As it is coming out in a year, there is still time for me to change my mind. But there is a greater than zero probability that this will be the first World of Warcraft expansion I’m opting out of.

Pope: Fake News Is a Sin

Pope Francis calls on journalists to report correct information, not one-sided reports.

 

 Pope Francis has criticised journalists who dredge up old scandals and sensationalise the news, saying it’s a “very serious sin” that hurts all involved.

Francis, who plans to dedicate his upcoming annual communications message to “fake news”, told Catholic media on Saturday that journalists perform a mission that is among the most “fundamental” to democratic societies.

But he reminded them to provide precise, complete and correct information and not to provide one-sided reports.

The pope said: “You shouldn’t fall into the ‘sins of communication:’ disinformation, or giving just one side, calumny that is sensationalised, or defamation, looking for things that are old news and have been dealt with and bringing them to light today.”

He called those actions a “grave sin that hurts the heart of the journalist and hurts others”.

 

Related Stories

  • Blame the Media? The NY Times Coverage of Clinton v. Trump Was Lacking
  • Watch: Former Navy Officers Tell NY Times They Had a UFO Encounter in 2004
  • Ex-CIA Director Warns ‘Inaccurate, Unprofessional’ Fox News Against Its ‘Conspiratorial Hit Job’ on Robert Mueller and the FBI

Ultimate Guide on Gmail Advanced Search



One of the main reason why most of us love Gmail is because of its generous offering in terms of storage space.Google accounts now use a shared pool of storage. Every account gets 15 GB of free space, which is shared across your Gmail, Google Drive, and Google+ Photos.There’s really no need to delete your emails and still maintaining a far distance from blowing it up.

Not deleting emails leads us to next potential problem – messy and unsorted inbox. Gmail’s a Google product, so of course it has powerful search features. But some of Gmail’s search features are hidden and don’t appear in the Search Options pane.

The simple “Search Mail” function right beside Gmail logo actually does more than we imagined. In this post, we’ll introduce you the useful Gmail search operators as well as examples on how you can search for almost any type of mails easily via the search text field.

Operators

Here’s a list of Gmail operators you can take advantage of when you search via the search box in your Gmail. Examples of usage is also provided.
“” (quotes):

Format: “keyword”
Example: “Amazon.in order”(Return only emails with the exact quoted keyword(s).)

subject:
Format: subject:keyword
Example: subject:Practice Coding(Return emails with keyword(s) in titles.)



from:
Format: from:
Example: from:Pinterest(Return emails received from a specific user, but not the email address.)



Format: from:
Example: from:[email protected](Return emails received from a specific email address.)

to:
Format: to:
Example: to:Rocky Jagtiani(Return emails sent to a specific user, but not the email address.)

Format: to:
Example: to:[email protected](Return emails sent to a specific email address.)

in:
Format: in:
Example: in:trash(Return emails stored in a specific location. If you are looking for emails that you have no clue where it is, use in:anywhere.)



is:
Format: is:
Example: is:unread(Return emails with a specific status. E.g, Starred, unread, read emails or even Gtalk chat logs.)




cc: & bcc:
Format: cc: or cc:
Example: cc:Rocky Jagtiani or cc:[email protected](Return emails carbon copied to a user or specific email address.)

Format: bcc: or cc:
Example: bcc:Rocky Jagtiani or cc:[email protected](Return emails blind carbon copied to a user or specific email address.)

Before: & after:
Format: before:
Example: before:2016/01/01(Return emails before a specific date.)





Format: after: before:
Example: after:2015/01/01 before:2016/02/01(Return emails after in range of or after specific date.)

label:
Format: “keyword”
Example: “meeting agenda”(Return only emails with the exact quoted keyword(s).)

Format: label:
Example: label:Comments(Return emails with a specific label.)

filename:
Format: filename:
Example: filename:presentation.pdf(Return emails with the exact filename attached.)

Format: filename:
Example: filename:pdf(Return emails that have the same file type attached.)

has:attachment
Format: has:attachment
Example:has:attachment(A more general search for emails with attachments. Return emails with attachments, regardless of file type and format.)



Combining Operators

Here are some operators that allows you to yeild more specific and accurate results.

“-“

Format: operator : value -operator:value
Example: has:attachment -filename:zip(Return emails with attachments, filtering away those with .zip attachments.)

“OR”

Format: operator:value OR operator:value
Example: from:[email protected] OR from:[email protected](Return emails received from either user(s).)

“AND”

Format: operator:value AND operator:value
Example: from:[email protected] AND has:attachment(Return only emails received from a specific email that has an attachment.)

Saving a Filter

Create a filter to automatically perform actions when a message matches a specific search.

To create a filter, click the down arrow again, then click the “Create filter with this search” option.

 You can manage your filters from the Filters pane on Gmail’s settings page.

Want To Learn Digital Marketing?