Difference between binary tree and binary search tree

Question: Can anyone please explain the difference between binary tree and binary search tree with an example?
Answer: Binary tree: Tree where each node has up to two leaves
  1
 / \
2   3

Binary search tree: Used for searching. A binary tree where the left child contains only nodes with values less than the parent node, and where the right child only contains nodes with values greater than or equal to the parent.
  2
 / \
1   3

Comment: @pete birary trees do not necessarily have to contain comparable data, many (non search) binary trees are used for parsing algebraic expression, binary tree is perfect t write a infix notation parser, by placing the operator as node(s) and numerical values as leafs
Comment: @pete: It's a conceptual thing, you won't necessarily ever actually make one that is completely unconstrained. However, there are lots of non-search binary trees that are special in some other way, e.g. binary heaps.
Comment: @JBoy: They're not going to be binary trees in that case though. (e.g. unary operators can't have two children.) I really can't think of a practical use case for unconstrained binary trees, that's why I made that comment.
Comment: @Vroomfondel: What kinds of trees are you thinking of in particular? I'm guessing they might be binary trees used for searching, but I think the term "binary search tree" specifically refers to those that obey the ordering criterion... at least/especially in introductory computer science. (Though I wouldn't really call it "local", since it applies to the whole left and right subtrees?)
Comment: @Vroomfondel: Interesting. I know nothing about these trees unfortunately, but I don't expect they're called BSTs. Might be worth asking on CS.SE though, if you'd like to see if anyone knows more about them.
Comment: @Mehrdad A binary tree has *one or two* children per node. Expression trees are a perfect example. A binary search tree *also* has one or two children per node, unless it happens to be full, which can only happen with certain numbers of elements.
Comment: @JBoy: No, expression trees are actually the perfect counterexample. They can have any number of children, not just up to 2 (say, f(x,y,z)), unless you're artificially limiting them for no reason. Again, I can't think of anything that's naturally limited to 2 children. (As a side note, note that unary operator nodes never have 2 children, whereas in a binary tree any node is given 2 child slots that in general can be filled.)
Comment: @Mehrdad IMHO, the image for the binary tree might be a little misleading (as you have specified the nodes with numbers). People might start comparing it to the other example. I don't exactly know how to provide one here, but I suggest using some character that shows any value can be placed there.
Comment: Create a binary tree, carry out a sort operation on it - think called treesort - then it becomes a Binary Search Tree ; can search 1000 items with only 10 comparisons, so very fast.  However sorting is time consuming operation, so only do it once at the beginning.
Comment: A min-heap and max-heap can be represented using a "non-search" binary tree. @pete
Comment: @Ali: I'm guessing you missed my reply to his comment just underneath...
Comment: For binary trees, does the left child have to precede the right child in terms of their key-values (i.e. numeric, lexigraphically) as shown in the example? Can the key value of the left child be 3 and right child be 2?
Comment: @NoName: Nope it doesn't. The only constraints are the ones I've explicitly stated.
Comment: @Mehrdad is there any implementation of binary tree? (not binary search tree) because I'm struggling with it and didn't find any example of it. Every one is giving the binary search tree code.
Comment: @AsifMushtaq: Sorry I never replied, I think there isn't one because... what would its use case be, and what would be the contribution of an existing implementation? Like I wrote earlier, I don't know of any use case for plain unconstrained binary trees, and in some languages they're already trivial to represent anyway (e.g. `[left, value, right]` in Python).
Comment: There are binary search trees which don't necessarily obey the local ordering criterion left <= node <= right. If the size of the discriminator set is in the range of the reserved memory you can use a global compare which automatically protects you from degeneration, and the tree will be "mostly balanced" (no leaf deeper log(N))
Comment: @user541686 [Here](https://github.com/markpiffer/treemalloc/blob/master/treemalloc.c) you can see a scheme in ASCII art right at the top: in this exemplary tree you have allowed ranges for every tree level (marked with `|`) shrinking with every level down. You can vertically reorder nodes in this tree and still get a tree of the same property. Of course this works only for special cases and in searching you can't early-out but have to search the whole structure down. In my case I use it for a single-threaded memory allocator which has an easy time merging freed blocks due to this.
Comment: @user541686 PS: trees which are constructed with this property have a hard worst case depth of log(n) and are therefore always "mostly balanced". I don't know if they have a name (or if they are handled as trees at all in the literature) and would be grateful if you can provide me a pointer of someone treating this type in a more academic approach.
Answer: Binary Tree is a specialized form of tree with two child (left child and right Child).
It is simply representation of data in Tree structure
Binary Search Tree (BST) is a special type of Binary Tree that follows following condition:

left child node is smaller than its parent Node
right child node is greater than its parent Node
Comment: These conditions are not sufficient. The entire left subtree must contain no keys only less than the parent's, and the entire right subtree must contain nodes greater.
Comment: @EJP can you elaborate your comment please? what do you mean by entire subtree? you mean the all values of subtree should be less than to root on the left side? and all the values should be greater than root value on the right side?
Comment: Following the second link, read the section on "Verification" and it will be clear.
Answer: A binary tree is made of nodes, where each node contains a "left" pointer, a "right" pointer, and a data element. The "root" pointer points to the topmost node in the tree. The left and right pointers recursively point to smaller "subtrees" on either side. A null pointer represents a binary tree with no elements -- the empty tree. The formal recursive definition is: a binary tree is either empty (represented by a null pointer), or is made of a single node, where the left and right pointers (recursive definition ahead) each point to a binary tree.
A binary search tree (BST) or "ordered binary tree" is a type of binary tree where the nodes are arranged in order: for each node, all elements in its left subtree are less to the node (<), and all the elements in its right subtree are greater than the node (>).
    5
   / \
  3   6
 / \   \
1   4   9

The tree shown above is a binary search tree -- the "root" node is a 5, and its left subtree nodes (1, 3, 4) are < 5, and its right subtree nodes (6, 9) are > 5. Recursively, each of the subtrees must also obey the binary search tree constraint: in the (1, 3, 4) subtree, the 3 is the root, the 1 < 3 and 4 > 3.
Watch out for the exact wording in the problems -- a "binary search tree" is different from a "binary tree".
Comment: @GabrielStaples Added tree structure.
Answer: As everybody above has explained about the difference between binary tree and binary search tree, i am just adding how to test whether the given binary tree is binary search tree.
boolean b = new Sample().isBinarySearchTree(n1, Integer.MIN_VALUE, Integer.MAX_VALUE);
.......
.......
.......
public boolean isBinarySearchTree(TreeNode node, int min, int max)
{

    if(node == null)
    {
        return true;
    }

    boolean left = isBinarySearchTree(node.getLeft(), min, node.getValue());
    boolean right = isBinarySearchTree(node.getRight(), node.getValue(), max);

    return left && right && (node.getValue()<max) && (node.getValue()>=min);

}

Hope it will help you. Sorry if i am diverting from the topic as i felt it's worth mentioning this here.
Comment: Either the left or the right subtree can be empty. Your code doesn't handle that case correctly.
Comment: @user207421 Also there are binary search trees which don't obey a local ordering criteria and are still binary search trees (with optimality and all).
Answer: Binary Tree stands for a data structure which is made up of nodes that can only have two children references.
Binary Search Tree (BST) on the other hand, is a special form of Binary Tree data structure where each node has a comparable value, and smaller valued children attached to left and larger valued children attached to the right.
Thus, all BST's are Binary Tree however only some Binary Tree's may be also BST. Notify that BST is a subset of Binary Tree.
So, Binary Tree is more of a general data-structure than Binary Search Tree. And also you have to notify that Binary Search Tree is a sorted tree whereas there is no such set of rules for generic Binary Tree.
Binary Tree
A Binary Tree which is not a BST;
         5
       /   \
      /     \
     9       2
    / \     / \
  15   17  19  21

Binary Search Tree (sorted Tree)
A Binary Search Tree which is also a Binary Tree;
         50
       /    \
      /      \
     25      75
    /  \    /  \
  20    30 70   80

Binary Search Tree Node property
Also notify that for any parent node in the BST;

All the left nodes have smaller value than the value of the parent node. In the upper example, the nodes with values { 20, 25, 30 } which are all located on the left (left descendants) of 50, are smaller than 50.
All the right nodes have greater value than the value of the parent node.  In the upper example, the nodes with values { 70, 75, 80 } which are all located on the right (right descendants) of 50, are greater than 50.

There is no such a rule for Binary Tree Node. The only rule for Binary Tree Node is having two childrens so it self-explains itself that why called binary.
Comment: Can we implement Simple Binary Tree? is there any implementation available? and what is the use of this tree?
Comment: @UnKnown You can use the Binary Search Tree is for sort and search. You can find the implementation of Binary Search Tree here: https://github.com/bzdgn/data-structures-in-java/blob/master/src/ds_010_trees/BinaryTree.java
Comment: I know about that but is there any existence of Simple Tree or Simple Binary Tree? or any implementation of Simple Binary Tree?
Comment: There is no point to use that but you can add arbitrary Node instances to the root and to the children.
Answer: A binary search tree is a special kind of binary tree which exhibits the following property: for any node n, every descendant node's value in the left subtree of n is less than the value of n, and every descendant node's value in the right subtree is greater than the value of n.
Answer: Binary tree
Binary tree can be anything which has 2 child and 1 parent. It can be implemented as linked list or array, or with your custom API. Once you start to add more specific rules into it, it becomes more specialized tree. Most common known implementation is that, add smaller nodes on left and larger ones on right.
For example, a labeled binary tree of size 9 and height 3, with a root node whose value is 2. Tree is unbalanced and not sorted.
https://en.wikipedia.org/wiki/Binary_tree

For example, in the tree on the left, A has the 6 children {B,C,D,E,F,G}. It can be converted into the binary tree on the right.

Binary Search
Binary Search is technique/algorithm which is used to find specific item on node chain. Binary search works on sorted arrays.
Binary search compares the target value to the middle element of the array; if they are unequal, the half in which the target cannot lie is eliminated and the search continues on the remaining half until it is successful or the remaining half is empty. https://en.wikipedia.org/wiki/Binary_search_algorithm

A tree representing binary search. The array being searched here is [20, 30, 40, 50, 90, 100], and the target value is 40.

Binary search tree
This is one of the implementations of binary tree. This is specialized for searching.
Binary search tree and B-tree data structures are based on binary search.
Binary search trees (BST), sometimes called ordered or sorted binary trees, are a particular type of container: data structures that store "items" (such as numbers, names etc.) in memory. https://en.wikipedia.org/wiki/Binary_search_tree
A binary search tree of size 9 and depth 3, with 8 at the root. The leaves are not drawn.

And finally great schema for performance comparison of well-known data-structures and algorithms applied:

Image taken from Algorithms (4th Edition)
Answer:
Binary search tree: when inorder traversal is made on binary tree, you get sorted values of inserted items
Binary tree: no sorted order is found in any kind of traversal
Comment: No sorted order *need* be found. A binary search tree is also a binary tree. They are not mutually exclusive. BST is a proper subset of BT.
Comment: Right, if you read closely, that is why Binary search tree explanation has - when inorder traversal is made on * binary tree *
Answer: A binary tree is a tree whose children are never more than two. A binary search tree follows the invariant that the left child should have a smaller value than the root node's key, while the right child should have a greater value than the root node's key.
Answer: To check wheather or not a given Binary Tree is Binary Search Tree here's is an Alternative Approach .
Traverse Tree In Inorder Fashion (i.e. Left Child --> Parent --> Right Child ) ,
Store Traversed Node Data in a temporary Variable lets say temp , just before storing into temp , Check wheather current Node's data is higher then previous one or not .
Then just break it out , Tree is not Binary Search Tree else traverse untill end.
Below is an example with Java:
public static boolean isBinarySearchTree(Tree root)
{
    if(root==null)
        return false;

    isBinarySearchTree(root.left);
    if(tree.data<temp)
        return false;
    else
        temp=tree.data;
    isBinarySearchTree(root.right);
    return true;
}

Maintain temp variable outside
Comment: Either subtree can be null. Your algorithm doesn't handle that case correctly.
Answer: A tree can be called as a binary tree if and only if the maximum number of children of any of the nodes is two.
A tree can be called as a binary search tree if and only if the maximum number of children of any of the nodes is two and the left child is always smaller than the right child.
Answer: In a Binary search tree, all the nodes are arranged in a specific order - nodes to the left of a root node have a smaller value than its root, and all the nodes to the right of a node have values greater than the value of the root.
Answer: In a binary tree, each node has 2 child nodes the left node and the right node.
A Binary Search tree is a special kind of tree in which the nodes are sorted, the left node is smaller than the parent node and the left node is bigger than the parent node.
The binary tree allows duplicate values, Binary search tree doesn't allow duplicate values also carrying out any kind of operation is faster in Binary search tree than in Binary tree since BST is sorted
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Answer: A binary tree is a tree, in which each node can have at most 2 children.
A binary search tree is a further modification of this, giving a certain relationship to the parent and the two children. Since, there are only two children, i.e., left and right child; the relation is defined as follows:
Left Child <= Parent <= Right Child
It is actually, that simple.


Retrieve a cross domain RSS(xml) through Javascript

Question: I have seen server side proxy workarounds for retrieving rss (xmls) from cross-domains. In fact this very question addressess my same problem but gives out a different solution.
I have a constraint of do not use a proxy to retrieve rss feeds. And hence the Google AJAX Feed API solution also goes out of picture. Is there a client-only workaround for this problem.
JSONP is the solution for requests that respond with JSON output. But here, I have RSS feeds which can respond with pure xml .
How do I solve the problem.
Comment: What browsers and platforms have to be supported?
Comment: All major browsers :- IE 7+, Firefox 3+, Chrome..
Answer: Use something like Yahoo! Pipes to serve as your proxy and translate the RSS XML into a JSON response.
Here is an article with instructions and code samples that explains how to do it: Yahoo Pipes--RSS without Server Side Scripts.
Comment: yahoo pipes... thats a NO cos, i have internal feeds!! :(
Comment: I think for your internal feeds, you'll have to use a proxy.
Answer: If you have control over both domains, you can try a cross-domain scripting library like EasyXDM, which wraps cross-browser quirks and provides an easy-to-use API for communicating in client script between different domains using the best available mechanism for that browser (e.g. postMessage if available, other mechanisms if not).
Caveat: you need to have control over both domains in order to make it work (where "control" means you can place static files on both of them).  But you don't need any server-side code changes.
Another Caveat: there are security implications here-- make sure you trust the other domain's script!
Answer: Right now there really isn't a cross-platform solution for cross-site scripting. Do you have control or access to the RSS feeds? If so, why not simply respond with JSON and use JSONP?
There are other things coming down the pike with HTML5, like cross-site messaging (referred to as Cross-Document Messaging) that may be capable of delivering a payload of XML, but last time I checked, they hadn't even fully decided on a size limit for the messaging.
You can see the spec here: http://dev.w3.org/html5/spec/Overview.html#crossDocumentMessages
Comment: To answer your first question, No, I dont have a control over the feed. Feeds are everywhere!
Comment: They are?! /sarcasm. ;) It was worth asking in the off-chance you were in control of the feed you were retrieving.
Answer: A solution for cross-domain calls without a server-side proxy is to use a SWF component.
You can script yourself one or use the readily available FLSend
The component uses ActionScript's URLRequest to call remote domains and ExternalInterface to communicate with the JavaScript methods that render your content.
Comment: You still can't retrieve data from another server though unless the crossdomain.xml file on there allows access so it's not a general solution.
Answer: The only way I can think of would be to embed a signed java applet on the webpage to retrive the xml and use javascript to interface with that. I'm not even 100% certain what the java security model is for that at present though but I think it would work.


Should I cite all the open source python packages I used like numpy in my paper?

Question: I used many open-source packages in my research, such as matplotlib, numpy, pandas, scipy, etc. And I found this on the website of SciPy: Citing packages in the SciPy ecosystem. Should I cite every one of them in my paper? (I'd like to cite them but there are so many of them which will make my paper even half or one page longer)
Comment: Perhaps related: [Should I cite all R packages I used?](https://academia.stackexchange.com/q/27921/68109)
Comment: There is a more general related question too: [What software to cite in a manuscript, and how?](https://academia.stackexchange.com/q/11655/17254)
Comment: Is your paper describing your research or your software?
Comment: @Azor Ahai -- he him Well, I just used the packages for data extraction and analysis, that's why I felt confused. I'm not writing a paper to introduce my new software. I just wrote some scripts to process my data and draw some pics.
Answer: Presumably your research uses your software, which in turn uses and acknowledges open-source packages. Your papers need only cite the software used directly, which is perhaps just your software. You could also mention your software is built from open-source packages, but I don't think that's strictly necessary, since acknowledgements appear in your software.
Answer: I would apply the same prioritization as I would when referencing academic papers: Cite the packages you directly use, but not dependencies, as these are implied.
If you would like to be complete but are under a space or reference constraint in the main text of your publication (typically the case in big-name printed journals), you could include a list of references to all used packages as a supplementary table.
Comment: If I was using solely base R, I would cite it. However, if I was using packages on top of R or Python, I would instead cite the packages, as the use of R is implied and the package citations will themselves cite R. I would not give a citation for Matlab as it is a commercial product, unless a citation was specifically needed to explain a method or function that I used in the paper. Whether you include a citation or not, you still need to say what software you used in your methods section.
Comment: Thanks! One more question: should I cite programming languages such as Python/MatLab/R while almost everyone uses them?
Answer: The correct answer is yes, it is because they are open source specialized packages. The answer could be be yes or no depending software developer. Best course of action when in doubt is to include the citations as if you were citing any other individuals source of work, to avoid the plagiarism snafu. Whether you do are not, I would highly suggest you bring this up with your instructor for direction to cover your bases.
Answer: In the "acknowledgments" section of your manuscript, you could say something like

The authors thank the developers of SciPy (Virtanen et al., 2020) for making their > code available on a free and open-source basis.

Depending on the circumstances, that may or may not add less extra length to your manuscript than trying to shoehorn a citation into the main text.


iMac 17" 2nd monitor question

Question: I have a 17" iMac that I want to hook-up a 2nd monitor to. I bought an adaptor on eBay, but the plug does not match the back of my computer. It's not a Thunderbolt or FireWire. Not sure what kind of adaptor I need or what it is called. I have a photo, but not sure how to post it here.
Comment: Just post the photo anywhere online and copy/paste the link to it in your question
Comment: Check the specification! It's on Apple's website somewhere!
Comment: 17" iMac could be anything from 2002 to late 2006. As Dan J stated, it could be a mini-DVI or mini-VGA adapter that you need. Supplying the Model Identifier from System Info would be MOST helpful.
Answer: Unless you bought a very old iMac, its external display port is most likely mini-DVI. If you have something as old as a G4 (the "desk lamp"-looking iMacs), it may be a mini-VGA port. A helpful resource for identifying your model and seeing details of its capabilities is everymac.com - those are the only options I see for any of the 17-inch iMac models.

iMac 17" 2nd monitor question


On the topic of Kausalsätze

Question: Here are two sentences from my grammar textbook: 1)"Ich musste zu Fuß nach Hause gehen, weil ich die letzte Straßenbahn verpasst hatte"; 2)"Du musst langsam sprechen, weil der versteht nicht viel". The book states that in the former, "weil" is used to introduce a subordinate clause while in the latter, "weil" is used to introduce a second independent (coordinate) clause. My question is why is that? I thought that any Kausalsatz is a Nebensatz.
Comment: What book is that?
Answer: Short answer: The second one is colloquial, something inbetween main and secondary clause and not a Kausalsatz, it is unclear what weil is (Duden uses the term "Operator" for them) and lastly the second weil can be used in 3 different ways, while the Kausalsatz-weil only knows one usage: The cause.

1 uses "weil" as a subjunction and 2 uses "weil" as a.. what exactly?.
Whether it is a subjunction or conjunction, Duden is not clear about. At one point, they refer to it as a conjunction ( Randnummer 1696 ), at another, as a >subjunction< (note the characters around it, Randnummer 2017), but also sorting it (and others like obwohl) into a speech-only category called Operators.
From the positioning, you can call it a conjunction. It is positioned in front of the first part of the clause.
2 is only correct in everyday language (i.e. colloquial language).
In standard German, whether spoken or written, "weil" cannot be used like this - "denn" would be the best alternative for your sentence, as an example.

But is 2 independent? And why is it not a Kausalsatz?
It gets complicated from here on.
a.  You can only use 2 in post-position to another sentence. Does that mean that it is independent? It's certainly not a main clause, because those can stand alone. That's why I would say that your book is wrong.
But it uses a conjunction.. or a subjunction? So... is it a secondary clause or not? From my understanding, this is just not clear. Maybe it is one of the types of sentence which fit in neither category: Neither main, nor secondary. A number of sentences exist with this problem, so it's not unreasonable to assume that.
b. 2 gives the reason, which not necessarily has to be the cause.

Der fährt bescheuert, weil er fährt Schlangenlinien.,

In this sentence, no cause was given, just the reason for the observation in the first sentence.
As a third usage, suggestions can also be reasoned for using weil

Wieso machst du nicht den Abwasch, weil die Teller sind dreckig.

This demonstrates how verb-second clause with weil can't be called Kausalsatz, which have to include the cause.
Also, this is why almost all verb-last clauses with "weil" can be rewritten, but not the other way around.
+------------+--------------+-------------+
|            | --usually->  |             |
| Verb-last  |              | Verb-second |
|  (cause)   | <-sometimes- |  (reason)   |
+------------+--------------+-------------+

Dudenband 4, Randnummer 1696, 2017, 2021.
Comment: Can you quote one of the Randnummern that make the verb in second position in the *weil*-clause "legal"? All examples sound wrong to me.
Comment: @Raketenolli I put the randnummers at the end. No, I can't legally give you a quote from the book, as that would infringe copyright.
Comment: @Raketenolli Be assured that I've only slightly altered the examples from the book to be safe. The basic meaning and structure is same or similar. The sentences should be both correct. Also keep in mind that these are in spoken language. Have you tried speaking them out loudly? Maybe this will sound better to you.
Comment: It's unclear to me which part of your post comes from the Duden and what is your own writing. `this is programming code` btw, please use some other markup for quotes. --- The OP's example 2 is colloquial, but still wrong (from a more prescriptive than descriptive point of view, because people do speak that way). Your two examples sound weird to me, because *weil* introduces a Nebensatz with verb-last position, and like you said yourself, *weil* describes a cause or reason. *Er fährt Schlangenlinien* is not a cause for *Der fährt bescheuert*. ...
Comment: In your second example, the first part is actually a question, so you'd typically say *Warum machst Du nicht den Abwasch? Die Teller sind dreckig.* (or, if you absolutely need a *weil*: *Ich frag ja nur, weil die Teller dreckig sind.*)
Comment: Yes, it is colloquial.
Comment: As I said in my answer, "weil" is not a cause in "Der fährt bescheuert..." and this is a "proof" for the verb-last "weil" and verb-second "weil" not being interchangeable. Because verb-last "weil" has to always be a cause, while the other one can be a reason that is not the cause.
This is also visualized with the ASCII-table at the end, and you will find this in Duden 4 at Randnummer 2021.
Comment: @EagleFliesBanana "No, I can't legally give you a quote from the book, as that would infringe copyright." Luckily, this is very wrong! Look up "Zitatrecht" (and the international and US equivalents): https://www.bildung-forschung.digital/digitalezukunft/de/wissen/urheberrecht/urheberrecht-in-der-wissenschaft/gesetzliche-erlaubnis-und-zitatrecht/gesetzliche-erlaubnis-und-zitatrecht.html - Don't let unfounded worries get in the way of your useful contributions here!
Answer: The second is actually not "good" (prescriptivist) grammar as it is taught in the grammar books.
It is still very commonly used among native speakers in spoken language. Then it has the same meaning as "denn".
Further reading: Weil das ist ein Nebensatz
Answer: Your book is correct. Grammatically speaking, the first «weil» clause is a constituent of the main sentence introduced by a subordinating conjunction, whereas the second «weil» clause is another main sentence linked to the first one by a coordinating conjunction.
The movement test proves that the first «weil» clause is a constituent. The «weil» clause can be moved into the «Vorfeld», that is, into the position before the finite verb:

Ich musste zu Fuss nach Hause gehen, weil ich die letzte Strassenbahn verpasst hatte.
Weil ich die letzte Strassenbahn verpasst hatte, musste ich zu Fuss nach Hause gehen.

A clause that is a constituent of another sentence is a subordinated clause. Conjunctions that introduce such clauses, like «weil» in your first example, are called subordinating conjunctions.
The second «weil» clause cannot be moved to the Vorfeld:

Du musst langsam sprechen, weil der versteht nicht viel.
Ungrammatical: * Weil der versteht nicht viel, musst du langsam sprechen.

The replacement test shows that in the second «weil» clause, you can use typical coordinating conjunctions instead of the «weil»:

Du musst langsam sprechen, (denn|aber|und) der versteht nicht viel.

This means that «weil» in your second example is a coordinating conjunction.
Coordinating conjunctions link two clauses of the same order, in this case, main sentences. They add some semantics to the kind of relationship between the two sentences, specifying whether there is causality, contrast, or mere concomitance. But even if the second sentence is in a causal relation to the first one, it would not be called Kausalsatz. Kausalsatz only refers to a subordinated clause that is a causal adverbial in the main sentence it is a constituent of.
Furthermore, conjunctions like «und», «denn», or «aber» are not constituents of the sentences they introduce. If they were constituents, they would occupy the Vorfeld exclusively:

Ungrammatical: * Du musst langsam sprechen, (denn|aber|und) versteht der nicht viel.

Instead, the Vorfeld is occupied by a regular constituent (in your example, by «der»). Therefore, including the conjunction when looking at the sentence in isolation does not make much sense. The sentence would just be «der versteht nicht viel».
And of course, the use of «weil» as a coordinating conjunction is considered a colloqualism, as the others have already pointed out.
Comment: You recite a lot of basic knowledge but it's unclear how the second clause can be a main clause if it can only be used in post-position of another sentence, and never alone. This does not fit the definition of an independent main clause.
Comment: @EagleFliesBanana: You are mistaking the coordinating conjunction to be a part of the sentence it introduces. It is not, as I have shown. The second sentence is «Der versteht nicht viel», perfectly acceptable as an independent main clause. Just compare a simple example like «er kam und sie ging». The second sentence is «Sie ging», and the coordinating conjunction _und_ just links the two sentences together.
Comment: Ok, I am going to rework my understanding.

On the topic of Kausalsätze


what is the difference between inter and trans prefixes

Question: Is there a difference in meaning when one says, inter-generational organisation and trans-generational organisation
Answer: Inter- means "between" or "among". Trans- means "across" or "beyond".
As an example, Wikipedia describes the Panama Canal Railway as both "transcontinental" and "inter-oceanic". It runs across the width of the American continent (though the continent is only about 50 miles wide at that point) and it runs between the Atlantic and Pacific Oceans, connecting the two.
So an "inter-generational organization" would be between two generations. The meaning of "between" is a bit ambiguous without further context; it could be an organization made up of people who are in the gap between two generations, or it could be an organization that exists to connect members of different generations. Most likely, the organization would deliberately define itself or its purpose in terms of "generations".
A "trans-generational organization", on the other hand, would stretch across generations; it would have members from different generations, or interact with people from different generations. This would not need to be a deliberate policy, and might just be a coincidence.


田 pronounced as "た" or "だ" in people's surname?

Question: Is 田 usually pronounced as "た" or "だ" in Japanese people's last name?
Or is it pretty much 50/50?
Comment: Sounds like a draw between ta and da, but considering that 田 also has exceptions ie 田園調布 (denenchoufu) presumably also surnames may use other readings than "ta" or "da"
Answer: I have never been taught how to read 田 in surname, but I think in most case the start with 田 in surname such as 田中, 田村, 田口, 田辺, 田島, 田地野, etc. is pronounced as「た」.
And, I think pronouncing the end with 田 in surname as「だ」appearing in 吉田{よしだ}, 山田{やまだ}, 池田{いけだ}, 前田{まえだ} is more common than pronouncing it as「た」appearing in 太田{おおた}, 森田{もりた}, 柴田{しばた}, 藤田{ふじた}, etc.
However, this is not rule. You are simply getting accustomed to pronounce as such.
I don't think the length of surname defines how to read「た」or「だ」such as 宇多{うた}田{だ}, 久保{くぼ}田{た},  新井{にい}田{だ}, 古{こ}田島{たじま}, 小{お}田{だ}切{ぎり},宇田{うた}川{がわ}, 金田{きんだ}一{いち} etc.
Also, 新田{にった}, 八田{はった}, 治田{はった} ( I think I read this surname as「おさだ」 in most case ) has 促音: geminate consonant.
Lastly, maybe how to read「田」in surname is a bit different depends on the region where you live, but I believe my interpretation is natural in most case.
Reference: 田がつく名字のランキング.


Do newer laptop batteries still need to be drained before recharging?

Question: 10 years ago when I was doing hardware support it was best practice to fully drain a laptop battery prior to recharging in order to maximize its life.  Is this still the case or can a battery now be recharged at any point without worrying about shortening the lifespan?
Comment: This might be relevant as well: http://www.lifehacker.com.au/2009/10/an-exhaustive-guide-to-saving-your-smartphones-battery/
Answer: For lithium-ion, it is actually now considered bad practice to completely drain the battery before recharging. NiCd and NiMH batteries need this to be done to minimize their so called "memory effect" - not so for Lithium Ion. In fact, it will actually be harmful for Li-Ion batteries.
I quote you this paragraph from this link

A lithium-ion battery provides 300-500
  discharge/charge cycles. The battery
  prefers a partial rather than a full
  discharge. Frequent full discharges
  should be avoided when possible.
  Instead, charge the battery more often
  or use a larger battery. There is no
  concern of memory when applying
  unscheduled charges.

There are many other sources online that support this statement, but I know this from my long-time exposure to battery conditioning due to certain hobbies (e.g flashlights).
From Wikipedia's entry of Lithium Ion batteries :

Lithium-ion batteries should never be
  depleted below their minimum voltage
  (2.4 to 2.8 V/cell, depending on
  chemistry). If a lithium-ion battery
  is stored with too low a charge, there
  is a risk that the charge will drop
  below the low-voltage threshold,
  resulting in an unrecoverable dead
  battery.
Answer: NiCd and Nickel Hydride batteries need occasional deep discharging.  Lithium batteries do not suffer from the same issue - and deep discharging can damage them.  This article discusses the subject in more depth.
Comment: batteryuniversity.com is not a reliable source.
Comment: @DragonLord There is no such "university", so just to start, the site is using lies to gain a false veneer of credibility. Consensus on WP is that BU is not  reliable, that BU seems to simply search the net (incl. poor sources like blogs, forums, etc.) for "info" about batteries and regurgitate it without checking. Two EEs actually ran a "sting" and caught BU at it. See for ex. https://en.wikipedia.org/wiki/Talk:Lithium-ion_battery#.22Battery_University.22 and https://en.wikipedia.org/wiki/Talk:Lithium-ion_battery/Archive_1#Reliability_of_Battery_University_as_a_source.3F
Comment: Also https://en.wikipedia.org/wiki/Talk:Lithium-ion_battery#charging_instructions .
Comment: @JamieHanrahan: Downvoted answer. Thanks for the heads-up.
Comment: Although this may answer the question, you should give a more detailed description of the linked content and explain how it relates to the question. This will help ensure that this answer remains useful in the event the linked page is removed or goes offline. For more information, see [this Meta Stack Exchange post](http://meta.stackexchange.com/a/8259).
Comment: Neither NiMH nor NiCd "need occasional deep discharging". "Memory" in NiCds was never a problem in consumer-sized cells; it showed up only in very large sintered-plate cells where the battery was discharged to withn a % or so of the same point many many times. The cells were recovered and the problem cured NOT by any deep discharge, but by programming the charger to reach what is called "overcharge" at the end of the charge cycle. Consumer NiCds _can_ suffer from "voltage depression", caused by leaving them on a trickle charger for too long. Any modern "smart" charger will avoid this.
Comment: Re Li-ion: it's true that deep discharge can damage them. The packs in your laptop, etc., have an internal "electronic fuse" that will open if they're discharged too far. That is because, should charging be attempted after that point, bad things like fire can happen. So once that "fuse" opens, the battery pack is useless. But: no correctly designed laptop, phone, etc., will allow you to discharge its battery that far. So if you want to "fully discharge" your battery, running the device until forced power-off will accomplish as much of that as you safely can. with no risk to the battery.
Answer: Lithium ions seem to have different issues, more to do with how far you drain them and how you store them http://en.wikipedia.org/wiki/Liion#Guidelines_for_prolonging_lithium-ion_battery_life
Answer: I believe there's not really "battery memory" anymore with modern batteries, but it's a good idea to run down completely one time from a full charge to calibrate the "remaining time" left on most laptops.  I've done this on both Mac and Windows laptops and it helps.
Answer: Nope, although every 10-20 charges, it is best to in order to calibrate your battery (otherwise you may see it saying 2 hours left and then going flat after 20 minutes!)
You are referring to the "memory effect". Typically, Lithium Ion batteries (most modern gadgets use these) do not get affected by this.
Answer: If your laptop has a lithium ion (li-ion) battery, it does not retain a memory. Meaning you can charge them when ever you feel like it. At 10% or 90% it doesn't matter. The downside to li-ion batteries is they do not last that long. After a few hundred charges and prolonged use they do not hold a charge as well as when they were new.
Answer: I use a Dell Inspiron 1525 laptop. Recently, when my battery conked out, the reseller told me that I need to let the battery drain out once a month. I suppose he was just dishing out a defunct piece of advice.
Answer: No.  Lithium-ion batteries are not subject to the memory effect, and repeated full discharges will significantly reduce the life of the battery.
However, "smart" batteries, which keep track of the charge level to determine the percentage of battery life remaining, may gradually lose track of the full charge and discharge points over many partial charge-discharge cycles, causing them to report incorrect charge levels.  For these batteries, fully charging and discharging them can recalibrate the battery so that it reports the correct charge level.  This generally only needs to be done once every 3-6 months of use, depending on how much the battery is used.  More information on battery calibration can be found in this Battery University lesson.


Is creating linked service in data factory has been changed? There are not two options of connection string and keyvault anymore

Question: I created a linked service in data factory using keyvault option about some months ago. I wanted to create a new linked service some days ago and I understood the UI for linked service creation has been changed!
Previously based on this article https://learn.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault#azure-key-vault-linked-service there were two option 1. connection string (needed DB name, server name and username and password for DB)2.KeyVault(Just needed secret name and keyvault connection).
While now those two options has been changed to 1.password 2. Keyvault. and the weird part is that in both two options DB name, username and password are mandatory! which is not acceptable because the point of using keyvault is not to share DB properties with developers and just sharing the secret name.
Does someone have any opinion about it??
Answer: Yes. It has been changed. Now you only need put your password into your azure Keyvault.
You old linked service will still work. But the new UI will only support password only azure Keyvault.
Answer: You can edit the json code of linked service to make it reference connection string.

Here's the format, then click finish button, it will be published.


NCHW vs NHWC in Machine Learning

Question: As I've been introducing myself to the various deep learning frameworks, I've noticed a difference in the default placement of channels for images.  Is there a substantial difference between NCHW vs NHCW layout?  Why would I choose one over the other?
Answer: The only difference is when you need to carry out certain operations across the channel axis such as BatchNormalisation. If you look at https://keras.io/layers/normalization/, one of the parameters for batch normalisation is as such:

axis: Integer, the axis that should be normalized (typically the
  features axis). For instance, after a Conv2D layer with
  data_format="channels_first", set axis=1 in BatchNormalization

You need to provide the axis as the model needs to know to carry out normalisation across which axis. Other than that, it doesn't make a difference in training.

NCHW vs NHWC in Machine Learning


Is it true that the sun goes down to the west?

Question: I know the sun doesn't go down but we are moving and is it true that the sun goes down to the west? I've read on many webpages that this is not entirely true.
Comment: "I've read on many webpages that this is not entirely true" - can you give a link to illustrate what you mean? Are you asking if the Earth rotates on its axis, or something else?
Comment: That is talking about the exact east and west points on the horizon. If you imagine the horizon as a circle from 0 to 360 degrees, with 0 due north, 90 east, and 270 west, then the sun rises between 67 and 113 degrees at different points of the year, if you are on the equator.
Comment: "Actually, the Sun only rises due east and sets due west on 2 days of the year -- the spring and fall equinoxes! On other days, the Sun rises either north or south of "due east" and sets north or south of "due west.""
Although this is true, when we talk about the sun setting in the West, we mean West of the meridian (i.e. not East) not due West at the cardinal point.
Comment: Round here the sun rises in the NE in the summer, and sets in the NW. In winter it makes its way all the was from ese to wnw before giving up.
Comment: @Andy on this page for example: http://solar-center.stanford.edu/AO/sunrise.html
Comment: At the poles the sun just circles round the horizon during summer, and setting is a long process that takes a chunk of Autumn and has no specific direction :-)
Answer: Earth rotates. That gives us the feeling of Sunrise and Sunset. Actually there are no such things. See Below animated image. Earth completes one rotation in a day (24hrs). (Actually 1 rotation of earth is called a "Day").
This image also depicts the cause of Solstice and Equinox, earth's tilted axis.
Comment: Minor nit: the Earth completes on rotation or sidereal day (360°) in a bit under 24 hrs. Because the Earth is also moving it its orbit about the sun and has moved about 1 degree of arc during the course of a day, Earth has to rotate about 361° to complete a solar day, which is the day we measure on our calendars.
Answer: I live in an 'L' shaped building on the 14th floor, so I have a pretty clear view of the horizon. Up until March 20th of this year, the sun was setting behind the other wing of the building. My living room window faces roughly NW, and on March 21st, I was able to see the sun at the horizon for the first time this year. Each day, the sun will set a little further northwest until it's setting almost directly opposite my window. Then it will begin to retreat until one day in September, when it will begin to set behind the other wing of the building again.This is the first year I took note of the day that sunset was first visible, and I'm planning to note which day is the last day I can see the sun set.
Comment: Today's the 5th of June. On the 21st or 22nd, the sun will set the furthest to the north it will get. After that, it will begin the 3 month series of sunsets that will take it behind the other wing of the building. Right now, it's setting around 8:30 (EDST). I try to watch the sunset each day. Somehow it's dramatic, almost as if the next sunrise is in question. Some sunsets are plain, but sometimes the last rays of the sun light up the clouds in awesome glory.
https://drive.google.com/open?id=0By3-fBUSwRxMYjhfdWhLel9oLWc


I want to extend my joining date by 10 days

Question: I am fresh graduate and have received an offer letter from a company I recently got placed in. However their joining date coincides with my pre planned family vacation. I need an joining date extension of 10 days. Is it possible? What reasons should I give the HR?
Comment: Possible duplicate of [Delay a Job Start Date](https://workplace.stackexchange.com/questions/55400/delay-a-job-start-date)
Comment: How are we supposed to know whether it's possible or not? Only they can tell you that.
Answer: To start with, of course its possible. Given that you are are college hire, I am guessing you haven't had a lot of control in choosing the appropriate date. Nevertheless, a heads up would have been nicer. But still, good companies don't penalize on such matters. Unless your position needs to be filled very urgently, there's good chance they will allow.

What reasons should I give the HR?

Nothing other than the truth. You don't want to start with the wrong foot. Earn their trust by being honest. 10 days IMO is not much. All the best.
In worst case, if they don't agree and you have to comply with them and postpone your plans, that would again be a good example of your reliability. Finally, take it all in good spirit.
Answer: You should have brought this up when they asked when you are able to start. Now you're in a position to look like you have some difficulty with planning, but if they just sent you an offer letter you still have time to save some face.
You should be honest and tell them that you have a long-standing planned vacation and, if truthful, tell them that it can't be changed and you won't be able to recover the money. Apologize and ask if it is possible to have your joining date be Y instead of X.
If you are being hired on individually it probably won't be a big deal, but if you're backfilling someone and there is limited time for knowledge transfer or if  you are being hired in a group and are expected to do some kind of training/orientation, you may find yourself in a difficult position.
Answer: Whether it is possible or not will depend on the company's policies and plans. For example, some companies that hire a lot of new graduates do orientation and training for a block of new hires, making it more expensive to bring a new graduate on 10 days later.
The only way to know is to ask them. The obvious reason to give HR is the truth: "I have a pre-planned family vacation. May I delay my joining date to ....?".


Is it possible to create an addin for a specifc MXD?

Question: I am currently in the process of creating Addin's and also converting our VBA projects to .NET addins. With the VBA applications, they would only work with specific MXD's. Is this possible to do with Addin's as well?
Comment: The AddIns aren't tied to a specific MXD, so you would have to enable/disable function based on some identifying information of the MXD, filename or maybe `IDocumentInfo.Keywords`. I think you could probably also implement persistence on the MXD if you needed more structured storage, but I've never had to do it for an AddIn.
Comment: I am, by far, not an expert at add-ins, but one of the things that seems frustrating is that the add-ins seem like an "all or nothing" thing... I don't think you can turn it on or off for certain mxd's, etc.  What you might have to do is write code that maybe checks the name of the mxd and then executes only if the name matches one in your pre-determined list.
Answer: You can write your add-in to only respond to events when a specific document is open. CoCreate an MxDocument in ArcMap, cast to IMapDocument and check the DocumentFilename property to see if it's a map document you plan on supporting. It's extra code, but it works.
Comment: As has been implied in the comments and this answer by Jason you really have no other option here aside from checking the name of the .MXD and validating it against some value. The downside to this is that if the user changes the name of the .MXD for whatever reason it will no longer work. There is unfortunately no unique identifier of a .MXD file independent of the file name that is exposed through ArcObjects.
Answer: You can always implement an application extension and persist any data in the MXD, including some kind of flag which would signify that other parts of your addin should be available for that particular document.


Is it possible to disable Virtual Clone Drive from running on startup?

Question: I have Virtual Clone drive installed on Windows 7, but I only use it rarely. I would like to disable it from running on startup. I already checked the startup folder and msconfig, but I couldn't find a way to disable this service.
Comment: It appears in MSCONFIG on my system under the Startup tab. It's located in the Run key in the WOW64 node. "WhatInStartup" is a handy way to easily disable & re-enable programs and services.
Answer: See this page

You can set it in VCD prefs.
  It will not start, if you disable the tray icon and set the number of virtual drives to 0 (disabled).
Comment: The link is broken.
Answer: Hit Windows+R (run).
In the box that apears type msconfig. This will bring you to the system configuration.
Go to the tab that says windows start (or something like that, my sistem is not in english).
Find the entry that says virtual Clone Drive and uncheck it.
It will prompt you to restart, you may choose to do so later it doesn't matter.
Note: I would not recommend changing the registry unless you really know what you are doing, and even then, create a restore point before you do.
Cheers!


How to call a webservice that wasn't developed in .NET

Question: In the past, I have had experience calling WCF services or ASMX services, you just add service reference to the .svc or .asmx url and it generates the proxy for you, and then you have intellisense for calling the methods.
Is it the same for a non .net webservice?
I need to call this
http://www.earthtools.org/webservices.htm
from c# code in a winrt app, but I just dont know how
Comment: Have you tried anything? Like refering / add web service to a project and point to this url? SOAP is standard for different platforms.
Answer: If you have WSDL then you can add reference to that service. but here you try to call REST service.
you need to send post request and rad the response as:
private const string BASE_URL = "http://www.earthtools.org/timezone";
private const string REQUEST_URL_FORMAT = "{0}/{1}/{2}";

public timezone GetTimeZone(double latitude, double longitude)
{
    var uriString = String.Format(REQUEST_URL_FORMAT, BASE_URL, latitude, longitude);
    var requestUri = new Uri(uriString);

    var request = WebRequest.Create(requestUri);
    using (var response = request.GetResponse())
    {
        using (var responseStream = response.GetResponseStream())
        {
            var ser = new XmlSerializer(typeof (timezone));
            var result = (timezone) ser.Deserialize(responseStream);
            return result;
        }
    }
}

example from here.
Answer: If they were SOAP web services, then you could still point Visual Studio to the .WSDL endpoint and have it generate the client proxy.  But these appear to be REST services.  I think your best bet is to use XDocument.Load or somesuch, and then use Linq-to-XML or XML deserialization to convert the XML into C# classes.
For example, let's say you want to call this service.  An easy way to get lat/lng result would be something like this:
XDocument xdoc = XDocument.Load("http://www.earthtools.org/height/52.4822/-1.8946");
var lat = (decimal)xdoc.Element("location").Element("latitude");
var lng = (decimal)xdoc.Element("location").Element("longitude");

Answer: Microsoft Marketing guy's will tell that web services are interoperable, even with heterogeneous system.
It's half the truth. Web services standard is actually multiplatform. On the field, however, it can be a bit more complicated. Different philosophy of different systems can lead to different behaviors.
Not long ago, I add to query a Web service built with Java Web logic (not sure of the system, I was on the client side) with Visual Studio 2010. It was a bit of pain because :

Visual Studio proxy wizard only understand inline schema. Here the schema was references within the wsdl using <xsd:import>. Visual Studio does not understand that
Then I moved to svcutil to generate from command line the proxies. This was not working directly, because of some errors in the WSDL file (this file was manually build by the service provider). I have to ask to the service provider to clean it's wsdl file
the xsd file representing the DTOs were shared by several web services. This lead to duplicate the same classes in each proxies, even if not used by all services. I had to tweak with partial classes to "rewrap" into unique classes.

To conclude, you can the limit of the term "Interoperability". The standards say it's interoperable, but the field says not always.
I welcome the newcoming world of "rest" services. This can simplify a lot the interoperability. The drawback is that you may have to build yourself a part of the plumbing.
Good news, the service you mentioned seems to embrace this rest philosophy. It won't be straightforward, but you can build simple Http request (post, get or put) to query this service.


Is AGPLv3 "sticky" for commercial clients's clients? (embeddable script)

Question: I'm doing a platform for LiveChat, commonly this LiveChat is embedded in other sites via a js script so the live chat widget is displayed in the host websites, therefore it allows communication with the agent's. The platform itself is licensed with AGPLv3 which includes the backend, frontend, and embeddable live chat.
My question is regarding the license stickiness, so, if a third party is using my platform commercially under the terms of the AGPLv3 but is using the embed script in their client sites. would those clients need to comply with the AGPLv3 too? so would they need to disclose the source of their own sites as they will be using the embeddable script?
Comment: Does this answer your question? [If a part of the client-side code is licensed under GPL, does the server-side code have to be under GPL as well?](https://opensource.stackexchange.com/questions/3960/if-a-part-of-the-client-side-code-is-licensed-under-gpl-does-the-server-side-co)
Comment: This question and answer seems to cover your question: https://opensource.stackexchange.com/questions/3960/if-a-part-of-the-client-side-code-is-licensed-under-gpl-does-the-server-side-co . And if the AGPL licensed code is running on the client then it does not seem to make a difference between GPL and AGPL.
Comment: Not quite. My question is about stickiness propagation when my client side library widget (AGPLv3) is used on other sites
Comment: Could you please provide a definition of "stickiness propagation" in this context. I am puzzled.
Comment: just wondering if the license applies to third-party sites that use the js widget.
Answer: In GPL (and AGPL) there is no distinction between commercial or non-commercial distribution. The rules apply in the same way.
When you client creates a website that embeds the JS code, which is under AGPL license (regardless where that code comes from, your server or your client's server. No distinction between 1st party or 3rd party), it is the act of conveying a covered work.
The only remaining question is: Is just the JS code the covered work or is it the entire webpage ("html code") or even everything on the server as well? You should use the guidance in the GPL FAQ to determine this, and potentially ask your customers to do the same. The answer to the related question here might be helpful.
If the JS code works stand-alone and is just embedded in the webpage of your customer 'in a frame or better iframe', then you can likely assume that you are dealing with an 'Aggregate'.


Auto-startup for Just Gestures (run as admin)

Question: I cannot get the program Just Gestures to start up automatically when booting up. I have made sure to select the option in the preferences:

I've even made a shortcut of the .exe and put it in the startup folder, but it still won't startup automatically. I don't have this problem with any other program. It also seems as though the developer of the software has abandoned it, so I can't get any support from him.
I'm thinking it has to do with the fact that it has to run as admin (yes, I have admin privileges), but I have other apps that need admin privileges and those auto-start up just fine. The only difference seems to be that Just Gestures has an "unknown" publisher.
Can anyone help?
Edit: I tried scheduling a task, but I get this error:

The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist (0x800704DD).

I tried selecting "Run with highest privileges" but that didn't fix it either. I even tried the option "Run task as soon as possible after a scheduled start is missed" and "If the task fails, restart every 1 minute and attempt to restart up to 3 times." My computer has been on for 5 minutes now and it still hasn't started.
Comment: Use a scheduled task to do this
Comment: I tried doing that but I get this error: "The operation being requested was not performed because the user has not logged on to the network. The specified service does not exist (0x800704DD)."
I tried selecting "Run with highest privileges" but that didn't fix it either. I even tried the option "Run task as soon as possible after a scheduled start is missed" and "If the task fails, restart every 1 minute and attempt to restart up to 3 times. My computer has been on for 5 minutes now and it still hasn't started.
Answer: I found a solution. I changed it to "run at log on" instead of "when the computer turns on"
Also, uncheck the option for confining it to run only when on AC power vs battery power.


Can´t use Nvidia GPU?

Question: Could somebody please explain to me how I use my 740M GPU from Nvidia instead of the HD4000 form Intel?
I am using Ubuntu 13.04 on a Asus N56VB
Comment: Have you installed the NVIDIA driver?
Comment: The driver can't be installed as usual. See my answer, there is how to do it.
Answer: Actually you have hybrid graphics. Means that you have two graphics cards, Intel HD for power saving and nVidia for performance. You have to install Bumblebee to install nVidia graphics driver. Here is how to install bumblebee: ( https://wiki.ubuntu.com/Bumblebee#Installation )
You need to open your terminal and enter the commands below.
If on 12.04.3, replace linux-headers-generic with linux-headers-generic-lts-raring.
(not needed for 13.10 Saucy and newer)
sudo add-apt-repository ppa:bumblebee/stable

Enable the Universe and Multiverse repositories (for bumblebee and nvidia packages respectively).
sudo apt-get update

Install Bumblebee using the default proprietary nvidia driver:
sudo apt-get install bumblebee virtualgl linux-headers-generic
sudo reboot

For Ubuntu 14.04:
Run these commands in terminal

sudo apt-get install bumblebee bumblebee-nvidia primus nvidia-331

Now you have to install Bumblebee GUI to manage apps to be opened using nVidia. Here is the instructions: ( How to install Bumblebee-UI (GUI) in Ubuntu 12.04 )
Install Python App Indicator:
sudo apt-get install python-appindicator

Install Git:
sudo apt-get install git

Make a directory for git:
mkdir git && cd git

Check out the repository:
git clone https://github.com/Bumblebee-Project/bumblebee-ui.git
cd bumblebee-ui
sudo ./INSTALL

Go to Startup Applications and add /usr/local/bin/bumblebee-indicator
Now reboot again.
Comment: This actually works in many scenarios.

Can´t use Nvidia GPU?


How do you deal with an enemy pilot on your titan?

Question: Sometimes when I'm in multiplayer and in my titan, I am notified that an enemy pilot is atop my titan and attacking.
What recourse do you have in that situation? How can I combat this tactic when used against me?
Comment: I remember in the first titanfall the recourse was to attempt to exit your Titan and kill the pilot. Usually it resulted in you dying though.
Answer: If you have enough of your core bar charged, you can use the counter rodeo measures, which deploys your electric smoke. This won't stop the pilot outright, but if you react quickly enough, it typically can get them down to 10% HP.
If you're near allies, they can shoot off the pilot and a friendly titan can just melee them to insta-kill them.  Granted, the best thing to do is not get rodeo'd at all.
To do that, try to avoid high buildings/walls, as pilots need to attack from above to rodeo. If they drop down, it's much harder to spot them. If you do spot a pilot trying to get on you, a titan melee can one-shot them and titan guns can usually 1 - 2 shot pilots, with the exception of legion.
Answer: If there is a pilot on your titan, then you should endeavor to kill them as efficiently as possible. It is important to consider the risks of a pilot being on your titan.
Pilots have a limited set of tools available to them for rodeo'ing titans. They can pull out a battery (which will remove one of your 4 life bars), they can also (if a battery was previously removed) toss a grenade in the empty battery slot. While losing some life is rough, if you are "DOOMED" as a titan and catch a grenade in one of those slots it can blow both you and the titan up right then and there.
So, with all of that to consider from pilot risks, it is important to first weigh the risk dealing with this pilot poses versus all of the other threats that are presented on the battlefield.
The easiest way I have found is using the electric smoke anti pilot tactical attack that titans have. It is very damaging, and if you use it then spin a little in your titan the pilot will almost always get turned around as well and die even if they try to disembark.
If that is not an option, then having someone else scrape them off is nice, although this basically never happens unless you are on microphone with a teammate.
So, if there is no one around to help, and you just got in your titan and cannot use your ordinance (smoke) then there are two options. Get out and try your luck killing the other pilot (my favorite - they often don't think this will happen); or, wait until they jump off and kill them then take the battery pack back.
The battery pack will look like a small rectangular green object on the ground. You can plug it back into your titan by disembarking, grabbing it (running over it - no need to hold down X), and then simply getting back in your titan. As you get in, the benefit (a small overshield and partial health) will show.
Overall, the very best strategy for dealing with pilots in your titan is to avoid their proximity. Avoid being in narrow areas that allow easy jump access, and avoid being in the center of an area that has a lot of roofing around it. Pilots can be especially deadly to titans when they are in number, and 3 will most certainly take a titan down very quickly in an open area where they have the cover and high ground.
Comment: Where's the front roll button when you need it?
Answer: I read a tip on another forum to crouch in your titan when you deploy your electric smoke as it changes the trajectory of the attacking pilots jump so that it is almost impossible for them to escape the smoke without dying.


Children in the nine days

Question: May a child who has reached the age of chinnuch eat meat during the nine days? Is there a difference if it is Friday evening dinner assuming the child eats before Shabbat begins?
Comment: Similar https://judaism.stackexchange.com/q/17713/759
Answer: Rav Shmuel Kamenetsky in  קובץ הלכות - בין המצרים, פרק ט הלכה ב-ה writes:
1 - Up to around five years old - there are no restrictions.
2 - Erev Shabbos, if a child is eating his Shabbos meal before Shabbos, even meat is permitted. However, if he is eating again with the family at night, he should not have meat during the Friday daytime meal.
3 - Even during the week, bird meat [chicken] is permitted even for those children that are of chinuch age.
Answer: This article from Ohr Sameach Rabbi Yirmiyahu Ullman, says:
The custom is to refrain from eating meat and poultry or drinking wine and grape juice during the nine days. This also pertains to children.
(I assume that he is referring to children above the age of chinuch.)
Answer: A very comprehensive answer is brought by Rabbi Simcha Bunim Cohen in his Children in Halacha
On p.187 he starts to delineate the laws of eating meat and chicken during the Nine Days.
As far as the first part of your question about just stam being able to eat meat/poultry in the nine days, he asserts that healthy children above the age of three years old should also refrain from eating meat and poultry during this period. He notes (in the footnotes) the Rivevos Efraim, cheilek alef, siman 371 which brings the opinion of Rav Shlomo Zalman Braun (the author of She'arim Metzuyanim Ba-Halachah) which writes:

דקטן שאינו יודע להתאבל אסור בבשר ויין כשהוא בריא ונ"ל דעד ג' שנים אינו בחזקת בריא דכמו שהוא מסוכן
That a minor who doesn't know how to mourn is forbidden to have meat and wine when he is healthy, and it appears to me that until 3 years old one is not considered to be 'healthy' and it is like he is in danger (i.e. if he does not partake of meat etc in his diet)

Rav Simcha Bunim Cohen adds:

Therefore, adults may not feed children any of the aforementioned food items. If the child is unhealthy, or will not eat any other food, one is permitted to feed the child meat or chicken.

Then with regards to the second part of your question about feeding a child meat on erev shabbos, he adds (p.188):

If a child is eating a Shabbos meal Friday afternoon (i.e. after plag hamincha see p.58), one is permitted to feed the child meat or chicken.

Children in the nine days


KiCad footprint or supplier footprint?

Question: I download symbols and footprints from the component supplier into a project's library to go faster but I realized that many of the standard components footprints are slightly different in KiCad, like for example the SOT-23-6 so my question is: is it better to stick to KiCad footprints or just use the suppliers footprints?
Comment: This is unanswerable. The only realistic path is to compare them in detail and apply pragmatic knowledge of process.  If you are assembling or reworking by hand under a microscope you can probably survive things which would produce unacceptably low yield in an automated process.
Answer: There is more to good footprints than just "matching the pads to the pin". Depending on the dimensions and distances the results of soldering can strongly vary. Good footprints can reduce the risk of shorts and grave stones for example.
From my personal experience, I strongly advise using the IPC-7351 footprint recommendation because the standard library coming with KiCAD did not really live up to the expectations (at least back then I started) and even the footprints described in datasheets sometimes resulted in less optimal (reflow) soldering for me.
There was a rather prominent repository of a KiCAD library derived from the IPC-7351 recommendations but I cannot find it anymore. However, it seems like there is still a version around https://github.com/alexisvl/kicad-pcblib . I typically use the "Least" but only because I do a lot of tiny crowded PCB with reflow soldering. The "Most" version should be adequate for everyone with decent knowledge about hand soldering.
Comment: The current library uses IPC-7351B rule set (with some influences from the future C variant) to derive footprints for standard packages (like your run of the mill resistor, SOIC like, DFN/QFN like, ...) All of them are script generated with scripts found in https://github.com/pointhi/kicad-footprint-generator/tree/master/scripts/Packages and https://github.com/pointhi/kicad-footprint-generator/tree/master/scripts/SMD_chip_package_rlc-etc
Comment: Of course the official library has a few limitations. We can for example not make a specific footprint for every possible 0603 resistor out there so we use a reasonable example to get the part dimensions and tolerance ranges (for the most common ones we use the predecessor to IPC-7351 as the dimension source which was also checked against a random selection of parts available at farnell) And we need to make assumptions fo rthe manufacturing tolerances (here we use the example value given in IPC-7351B)
Answer: Best approach would be to ask people who will solder these components. For one component, KiCAD footprint may be better, for another - the supplier one. We ended up making our own library of components based on existing one.
Answer: How different? But usually the supplier knows the part (while KiCad has some generic footprint). You should also check the datasheet to see which one better fits the mechanical drawing (and remember to enlarger them a bit if you plan to hand-solder them).
Comment: Do not trust any footprint that you have not verified yourself.  Even the ones available for download from a manufacturer.  It is your responsibility to make sure it is right.
Comment: Well, why not start by comparing the supplier footprint and the mechanical drawing? Have you had bad experiences following the mechanical drawings on datasheets? Also, after that there will probably be a prototype PCB and in that step we will catch all the problems in pad sizes.
Comment: Still, if the OP already has the components he could just print (with a printer and so) the many footprints he'd like to test and see how the components fit those pads. But I assumed he does not have the components with him.

KiCad footprint or supplier footprint?


Connector between node.js and Scala (Java)

Question: What is the best way of integrating node.js with Scala (Java)?
The simplest way I see so far is using Redis PubSub as a mediator, with node.js server handling HTTP requests and publishing messages to the request channel (via redis-node-client), and Scala actors (e.g. Akka Redis PubSub integration) subscribed the request channel and publishing computation results to the response channel (subscribed by nodes).
Answer: Assuming you'll be using JSON as your message format, you'll find a couple of very good JSON implementations inside the lift framework (which you don't have to use as a web framework, you can happily cherry-pick components from lift-utils).
But if you want to go with a pubsub/actor model (and it's a good choice, depending on your needs) then you could do a lot worse than Akka, as you already suggested.
Comment: AFAIU, you're suggesting to use [RPC-style] JSON-dispatcher (like this http://demo.liftweb.net/stateless_json) sending JSON to Lift from node.js over HTTP, right?
Answer: I've implemented a small proof-of-concept library for connecting node.js to Scala Remote Actors directly via TCP (using protobuf as a marshalling mechanism).
Answer: I don't think that a node.js library implementing the Scala remote actor protocol is really the best way. It may work well for your current application but what if you need to add a third technology to the mix. Can it really be best if it requires writing special support libraries for each language/platform?
The best way to integrate these is to use a general purpose technology for integrating applications of all languages. And more specifically, one which supports actor-based message sending. Fortunately, AMQP and ZeroMQ both fit into that space and both can be used with node.js or scala. In addition, the libraries for AMQP and ZeroMQ will be more heavily used than any special purpose node-scala connector, therefore buigs will get fixed and newer versions will get supported.


Will my visa be refused if I didn't sign the declaration page?

Question: I applied for a UK Tier 2 General Migrant visa on July 4. I also requested Priority Visa Processing. I just figured out that I was unable to sign the declaration form on my printed online application. Would this lead to a refusal? What should I do? Can I send a copy of a signed form? I haven't heard anything and it's been 5 days.
Answer: If the U.K. Passport office is anything like the U.S. office, then likely your application will be rejected and you'll just have to re-submit it. You should find out the contact information of the receiving entity and verify with them the status of your application. I would print the application out and submit by mail in your case to be honest. As mentioned before, if the U.K. office is like the U.S. office, there may be a good chance there is a long wait for your passport to be issued. There's lots of red tape involved with issuing passports because of events happening in the last 16 years. You may be able to expedite your passport faster for a nominal fee.
So in short, if you fail to sign legal documents, regardless of the reason, they will fail to issue your passport, visa, etc.
Comment: This is about a visa application, not a passport application.
Comment: Sometimes visa and passport are synonymous (in the same document). That's why I said passport. My passport has something about visas in it. However, none the less, the original gist of my answer still stands though. They should call the appropriate office and print a physical copy to send in just in case.


Toddler refuses to drink milk from cup. Phase out bottle?

Question: My toddler is a bit over 2 and refuses to drink milk from anything but a bottle with a nipple. We have tried everything but my child just won't budge. Once we even went for a week with no milk. My child seems perfectly willing to completely phase out milk to avoid drinking it from a cup, straw, or anything but a bottle. So I have to choose between keeping my child on the nipple and drinking milk or phasing both out. Which is the least bad option for my child?
Answer: Will your child drink water from a cup?  And does your child like milk-substitute products like cheese, yogurt, etc?  If so, you might want to just rely on those.  It's never a good idea to turn mealtime into conflict situation.  Eventually, your child's memories of drinking from a nipple will fade and you can reintroduce milk.  In the meantime, make certain to feed lots of milk products to get proper nutrition.
Comment: I like the memories will fade out and milk can be reintroduced part. Kids of this age tend to not have a very long term memory. A couple of weeks might actually be sufficient.
Answer: Drinking from a bottle on an ongoing basis can be quite bad for a child's teeth, causing tooth decay and other problems.  On the other hand, cow's milk on a continuing basis is completely optional; your child can get equally high quality protein and fat from meat and calcium from green leafy vegetables.  Unless you are talking about pumped breast milk, I would say that phasing both out is the better option.
Answer: I'm currently going through this as well with my 2 year old. She loves her bottle. She will not drink milk from anything other than her bottle and will not drink anything other than milk from the bottle. I have been doing this disappearing act as in bottles are running away and rewarding when we don't cry. I have managed to get her to drink milk using the cuppy with a straw, she hates it but that's the only thing that did not run away during the day. It was so hard at first with temper tantrums but it is getting farther and few in-between those.


why the extruded verts not lay down on ground

Question: i have made the verts and extruded and added cloth simulation and below a plane ground. Why the verts not lay down on the ground. I have apply passive from physics tab.

New Result
Comment: Please edit your question to add some explanation as to what those images show and what steps you've taken to get to where you are now. Show screenshots of any relevant settings along with explanations where you can, describe what geometry you have in each example, what collision settings, anything else that is relevant.
Comment: @RichSedman A suggestion given by thibsert i have turn floor to collision and cloth (a verts line) i have extruded to 0.005 and got the above result (new result). Nothing special in the cloth setting. Just self collision on thats it. Rest default setting.
Answer: Floor plane needs to be set as Collision, not Rigid Body.
Cloth needs Faces to work, not only verts. You should extrude your vertices by a small amount on Y. (Not to small : below 0.003 I had some strange results)
Comment: Good point about Cloth needing Faces. If it is really a requirement to have edges only then Soft Body might be a better fit.
Comment: The verts made as shown but its not landing on the floor or ground and verts getting stretch behind. Not like a thread its smoothly fall down
Comment: i have attach new gif file new result. Its not landing on the floor and scrolling behind
Comment: @RichSedman plz look at the result as mention in the answer. gif file attach in the question (new result)
Comment: @atek, it's not clear what you've changed to get the 'new result'. Please update your question with step by step results to how someone could set up the same situation. Any new info should ideally be in the original question rather than tagged on as comments to this answer.
Comment: @RichSedman update new result


Add choice field options on item addition in SharePoint list

Question: i want to create a functionality or workflow so that when an item is added in a list('Status'), it will automatically get added as an option for a choice drop-down field('status') in another list. How i can achieve that?
Comment: You can use lookup field from first list to another list and use the "Status" column (If it is not choice column in first list)
Comment: @GaneshSanap   Actually we are using XSLT dataform webpart in our page which starts giving error when we are changing the type of field to lookup field. So thats why we want to keep as choice field and update the choices from a separate 'status' list
Answer: You can do this with workflows.
Just create a list-workflow on List1 which creates a new Item on List2 with the given item values and set the workflow to "Start workflow automatically when an item is created".
for more detailed information, refer to the following article:
https://www.sharepointsky.com/sharepoint-designer-workflow-create-list-item/
Answer: Since you must keep it as Choice, you could create a flow that calls a Sharepoint REST API to update the choice field. There is a question on Stack overflow that seems to explain how to update choice using SharePoint Rest API:
https://stackoverflow.com/questions/48027004/update-multiple-choice-field-in-sharepoint-using-rest-api
I did not try it myself, so please bear that in mind..
If you feel that Rest API is a good fit, you could create your own for the purpose. You can take guidance at:
https://www.c-sharpcorner.com/article/call-rest-api-from-microsoft-flow/


Does Reinhardt's shield block all abilities?

Question: Reinhardt's main strength is his shielding abilities and the protection he provides for his team, but Are there any abilities that cannot be blocked by Reinhardt's barrier field?
Answer: Composed with assistance from this Source:

The Barrier does NOT block the following:

Melee attacks.  Reinhardt and his shield will both take full damage from a single melee attack.
Sombra's EMP will destroy his shield, and hack everything that was behind it.
Orisa's halt ability will pass through it, however it will not suck his allies from behind a barrier if it detonates on the other side.
Some channeled weapons, including:  Winston's Tesla Cannon, but Symmetra's Photon Projector beam will be blocked.
Reinhardt's Fire Strike and Symmetra's Photon Orbs.
Hanzo's Dragonstrike
Junkrat's Rip Tire

Fire Strike and Photon Orbs can actually pass through and damage
  everything in its path, including Reinhardt, his barrier and anyone
  else behind Reinhardt.

Do also note that Reinhardt's shield does not block ally projectiles.  This means you should combo with a Bastion or any other front line assault that will make best use of your shield.
Comment: Note that Reinhardt's barrier doesn't keep Junkrat's Riptire from passing, but it will absorb the damage from the explosion.
Comment: Also note that the shield will block an Earthshatter only if the shield is touching the ground. Similarly, it will block McCree's flashbangs if they are thrown into the shield, but not if they are thrown _over_ the shield, which may stun the Reinhardt.
Comment: The following video shows Hanzo's ultimate killing Reinhardt while the latter is using his shield. https://youtu.be/oOVb9x0zd6M?t=1m12s
Comment: Similar to the Riptire, Junkrat's Concussion Mine is also quite effective against Reinhardt: you can toss it at Reinhardt's feet, wait until he steps over it and then set it off. Not only will it deal damage, it will also send Reinhardt flying, exposing anyone hiding behind his shield.
Comment: Mei's Blizzard is also not blocked in any way.
Comment: Another note: Most "basic" projectiles (any regular gunfire) are simply absorbed by the shield, but some persist after hitting it. Junkrat's mine and Widowmaker's spider will both stop and bounce off the shieldif they hit it. Hanzo's sonar arrow will actually stick in the shield for as long as it's up, and then drop to the floor as soon as the shield disappears. (I've actually seens a Hanzo get a kill by shooting the sonar arrow at the shield of a very low health Rein - as soon as Rein dropped the shield, he walked into the now-falling arrow and was "hit" by the projectile and died.)
Answer: Just to add some of the new champions:

All of Doomfist's abilities will go through the shield other than the shockwave from his E. This is because they all count as "melee" skills. Doomfist's primary fire is still blocked, as usual.
Moira's healing beam (primary fire) will still heal allies behind an enemy shield. Her damage beam (secondary fire) stops at the shield however.
Moira's orb will travel through enemy shields. If you use the damaging orb, it will not deal any damage to enemies until it has passed the shield.


Why use the real numbers instead of some larger totally ordered field?

Question: If there are ordered fields of cardinality larger then the reals why not use one of them? Is it just the completeness properties that are good? If it is why not embed the reals in something bigger and then you could use completeness in that field but only when confining yourself to cases involving just real numbers, while still having the other elements in that field to use for another purpose.
Comment: Completeness is good. Some do embed $R$ in larger fields, e.g., the "hyperreals" when doing non-standard analysis
Comment: @bof Use them for what? I'm trying to ask what makes studying the reals more interesting then constructing larger totally ordered fields with the reals embeded in them? Obviously "interesting" or "useful" are subjective terms, but can you then tell me at least from your prospective on the matter then?
Answer: Ordered fields containing the reals as a proper subfield cannot be complete.
Suppose $\varepsilon$ is a member of such a field and is greater than $0$ and less than every real. Then $\underbrace{\varepsilon+\cdots+\varepsilon}_\text{finitely many terms}$ must still be smaller than every real, since if $\underbrace{\varepsilon + \cdots+\varepsilon}_{n\text{ terms}}$ were at least as large as some real, then $\varepsilon$ would be at least as large as that real over $n,$ and thus not smaller than all reals. Elements such as $\varepsilon,$ that are smaller in absolute value than all reals, are called infinitesimals.
The set of all infinitesimals in an ordered field that contains nonzero infinitesimals cannot have a smallest upper bound within the field. To see this, consider two cases: $(1)$ that smallest upper bound is an infinitesimal, and $(2)$ it is not. If it is not, then half of the smallest upper bound is also bigger than all infinitesimals and you have a contradiction. If it is, then twice that smallest upper bound is also infinitesimal, and you have a contradiction.
Comment: I understand the entire new field they were embedded in would not be complete but by themselves they are, thus you could still use completeness when only working with reals under certain scenarios while at the same time you still have the other new elements of the field to work with. Why not keep building up ordered fields and embedding the previous ones in them? You still have the same tools to work with previously as well as the new field elements. Why is it interesting to stop or keep going with this at some point?
Comment: So you are saying $\lim_{n \to \infty} n\varepsilon $ is bounded above by $1$ but it can't converge to any element. Or in other words $\mathbb{R}$ has an absolute value which is Archimedian. Larger fields (such as $ \mathbb{R}(x)$) have some absolute values but they are not Archimedian.
Comment: @reuns : Correct.


Can't run Skype - connecting forever

Question: I have Internet, but from yesterday somehow my Skype loads endlessly, i have tried to restart computer and Skype, nothing works. It has the blue spot that is connecting, forever.
Comment: Skype is down for everyone right now by the looks of a quick Google search
Answer: Skype is down at the moment. Check http://heartbeat.skype.com/ for more information and to see the current status of Skype.
Answer: Check Heartbeat at Skype or DownDetector for known up-to-date issues. As writing today, there was an network issue which prevented users from logging in and using Skype around the world (Europe, Japan, Australia and the U.S.):

Subject: Issues with Skype status and calling
By: Leonas Sendrauskas on September 21, 2015.
  Updated 15:00 UTC
We have identified the network issue which prevented users from logging in and using Skype today. We're in the process of reconnecting our users, and focused on restoring full service. The issue did not affect Skype for Business users.

Related article: Skype app down for users around the world
Therefore if this happens again, it's advised to use Web Skype instead, which is usually less affected or try to use Skype for Business users.
If you can't find any existing issues with Skype, then you've troubleshoot your network or try upgrading/re-installing your Skype. Check also your proxy and firewall settings. Try also testing it on different machine/network.
Answer: Skype is experiencing problems at the minute:

http://www.theregister.co.uk/2015/09/21/skype_outage_hits_uk/
https://www.rt.com/news/316056-skype-messaging-down-globe/

You can check skype's service status at:
http://heartbeat.skype.com/

Can't run Skype - connecting forever


Server 16.04 crashing during Samba operations - General protection fault

Question: This issue is rock solid easy to reproduce. I've been running this rack server for almost a year now with no issues on 14.04. Ended up with a corrupted OS disk so decided it was time to upgrade to 16.04. All seemed well for a few weeks until it came time to run backups on my workstations and copy large (10+ GB) batches of files. Every time like clockwork, it will get to around 20-30% complete on the copy job (from Windows workstations) and then the server drops off the network. Samba share becomes inaccessible and I cannot ssh into the box. Upon firing up the server's monitor (or looking at syslog) I see when the issue occurs the server throws two (or more) general protection faults. Initially taking a stab in the dark I decided the only thing I did different this time around was configure my two NICs into a bonded interface. I removed the bond and went back to the onboard NIC only and it still does it.
Pastebin link is syslog of all the faults when they occurred last night after I reconfigured the NICs. http://pastebin.com/NnjMreie
Server setup is 16GB of RAM, 6 1TB drives in raidz2 (RAID6), 2 4TB drives in zfs RAID1, and 2 500GB drives in a md RAID1 array for the OS. If you need more information I can provide it.
Answer: Found 2/4 memory sticks failed via memtest. Removed them and completed a transfer with no issue.


Disable telephone control (answer call, call) from Bluetooth headphones

Question: Is there a way to disable telephone control (answer call, call) from Bluetooth headphones? I just want to listen to music.
Answer: Go to Setting - Bluetooth and find your headphone device in the list and press the settings gear next to it. Uncheck Phone Audio or similar entries related to phone/telephone (may vary by Android version or OEM).
Answer: Go to Settings, Accessibility, Answering and ending calls. Turn off the setting that automatically connects when you have headphones in.


OWA + AD Lockout Policy: Quite the Mixture

Question: Many organizations have webmail exposed to the world.  These sites are often hooked up to AD for user authentication.  Are there any specific security controls OWA (Outlook web app) has that would prevent or degrade an attacker's ability to lock out everyone once the userid pattern is known?
Answer: There are a variety of ways that this can be mitigated, but here are a couple.

Two-factor authentication : something you have (a SecurID fob for instance) and something you know (a password)
A PowerShell script to parse logs and add firewall rules based on a number of failed login attempts located in the Event Viewer
A product such as Messageware OWA Guard which will monitor your OWA instance and identify potential risks in real-time (full disclosure : I have no experience with this product and cannot vouch for its effectiveness)
Comment: I suppose if you use two factor you can turn off the lockout setting?
Answer: If you are using Office 365, then you can consider Azure Multi-Factor Authentication, which you can simply turn on with Office 365. It has options such as requiring phone-based response before accepting a sign-in. You can also integrate it with your on-premises applications.


How to calculate the brightness of an object in space dependent on its distance from earth?

Question: If a comet appears increasingly brighter as it approaches the earth, how many times brighter will it appear as it moves from $25AU$ to $5AU$ from us?
Answer: I'm not sure if this is the normal astronomer's way of calculating things, but i think this picture is quite intuitive:
Let's first assume the comet is radiating a constant total amount of light with a power $P$ into all directions evenly. We can now imagine that if we are a distance $R$ away from the comet, this power is distributed evenly across the surface A of the sphere (which is $4 \pi R^{2}$), and at that point we have the power density $$p=\frac{P}{A}=\frac{P}{4 \pi R^{2}}$$. Now, we can easily compare the power densities for two radii $R_1$ and $R_2$; the total power $P$ is independent of distance, thus all factors except $R_1$ and $R_2$ will drop out:
$$\frac{p_1}{p_2}=\frac{\frac{P}{A_1}}{\frac{P}{A_2}}=\frac{A_2}{A_1}=\frac{4 \pi R_2^{2}}{4 \pi R_1^{2}}=\frac{R_2^{2}}{R_1^{2}}$$
With this, you can easily calculate the different power densities. In your case, plugging in $R_2=25AU=5*5AU=5*R_1$ and $R_1=5AU$ yields $\frac{p_1}{p_2}=25$. So the number of photons hitting your eye will be 25 times larger for your given values and it would be 25 times brighter in astronomical terms. To relate this to the eyes' sensitivity is a little trickier, but I don't think this is of importance here and would also be subjective.
In astronomy you also call $P$ spectral luminosity $L$. $p$ would be flux density($F$ or $S$, depends on convention).
Answer: All you need to know is that the apparent brightness of an object is inversely proportional to its distance squared:
$$B\propto\frac{1}{r^2}$$
So if you have an object at a distance of 1 unit and you move it to a distance of 3 units, its brightness will be 1/9 compared to its initial distance.
This should enable you to solve this exercise (Since it has the homework-and-exercises tag, I won't provide a full solution as of now).


I have to add add PATH to /etc/environment but it breaks my machine - why?

Question: I'm trying to work with tensorflow on Ubuntu 18.04 using Deep Learning AMI from Amazon which has all CUDA verions installed. However, it's not so easy to make tensorflow 1.X work with GPU because some $PATH problems. When no action is taken, this run time error happens while using TF 1.X:
2020-03-25 16:31:58.162200: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory

But it works correctly for TF 2.X
So after reading some posts like this or this, i decided to add this commands to 1) ~/.bashrc and later to 2) ~/.profile:
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda-10.0/extras/CUPTI/lib64:$LD_LIBRARY_PATH"
export PATH="/usr/local/cuda-10.0/bin:$PATH"

but with no effect (I did restart machine or use source ~/.bashrc command).
However, if I add these variables to /etc/environment then tensorflow finds these variables and works perfectly! Problem is, that it completely breaks machine as, i assume, it overrides all other $PATH and LD_LIBRARY_PATH variables.
My theory is, that because /etc/environment has the highest priority the variable LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda-10.0/extras/CUPTI/lib64 is exactly what TF 1.X requires.
Question:
How do I add this variable correctly, so TF 1.X finds it's CUDA-10.0 files and TF 2.X finds its higher CUDA versions?
Comment: `/etc/environment` is not a script file, and thus unable to expand variables. So it ought to work if you state all the directories explicitly and drop the variables. (And you can drop the "export" command, too. It serves no purpose in `/etc/environment`.)
Answer: Answer to my own question lies here: setting LD_LIBRARY_PATH for CUDA and its this post but do not forget to do sudo ldconfig