proving cartesian product is distributive over unions and intersections

I had to prove this:  Let $A$, $B$, and $C$ be sets. Then, $A \times (B \Delta C) = (A \times B) \Delta (A \times C)$.  By the definition of symmetric difference, we know that $$B \Delta C= (B \Delta C) \cup (C \Delta B).$$ So, we can expand the LHS of this theorem to get  $$A \times ( (B \Delta C) \cup (C \Delta B) ).$$ Therefore, \begin{align} A \times (B \Delta C) &= A \times ( (B \Delta C) \cup (C \Delta B) ) \\ &= (A \times (B \Delta C)) \cup (A \times (C \Delta B)) \\ &= ((A \times B) \Delta (A \times C)) \cup ((A \times C) \Delta (A \times B)) \\ &= (A \times B) \Delta (A \times C). \end{align} So, the LHS = RHS.  But I'm not sure how to show that cartesian products are actually distributive over unions and intersections?


Contraposition and law of excluded middle

Does truth-equivalence of an $A \rightarrow B$ and contrapositive $\neg B \rightarrow \neg A$ rely on the law of excluded middle?


I’m traveling from Jeddah, Saudi Arabia to Indianapolis and have a 6hr layover in Paris, I have a US visitor visa and was wondering if there’s anything else I would need if I’m stopping in CDG.  thanks !


Store the distance between records in a variable

Here is a snippet of my code that gives me accounts based on the distance to my "current" account:  public String currentPosition {      get {         if (String.isBlank(currentPosition)) {             currentPosition = currentAccount.Geolocation__c;          }         return currentPosition;     }     set;  }   public PageReference findNearby() {       String lat, lon;             List<String> getcurrentId = currentId.split(':', 0);      List<String> latlon = currentPosition.split(',');     lat = latlon[0].trim();     lon = latlon[1].trim();      Decimal dlat = decimal.valueOf(lat);     Decimal dlon = decimal.valueOf(lon);   warehouses =  [                            SELECT Id,ShippingState,  Name,URL_zum_CC__c,Mitarbeiternzahl_final__c,Auftragseingangstyp__c,AD_MS_Rel_Anzahl_bez__c,Vollst_ndiger_Name__c,ShippingStreet,LocateCity__longitude__s, LocateCity__latitude__s, OwnerId,GeoLocPosition__c,Accountinhaber_Text__c,WirtschaftszweigWZ08__c,WZ_Code_ebene_2__c,AE_letzte_12_Monate__c ,anzeigendaten_de_ID_account__c,indexurl__c                            FROM Account                             WHERE Letzte_gew_Opp_OneSales_in_Tagen__c <= :decimal.valueof(myTime) AND DISTANCE(LocateCity__c, GEOLOCATION(:dlat,:dlon), 'km') < :decimal.valueof(myInput) AND Id != :theaccId                     //      ORDER BY DISTANCE(LocateCity__c, GEOLOCATION(:dlat,:dlon), 'km')                                      LIMIT :recordLimit                   ];    }   However what I want in addition is the actual distance as a value. I want to store that value in a variable to display it in my visualforce page. (inside a table)  The result should be something like this:


How to share internet connection between two computers one which is connected to a dongle

I have a dongle connected on an ubuntu laptop.  I couldn't find a way out to share internet using WiFi.  How can I share internet over a LAN cable?  Does I require a cross-over cable?  Any extra settings?


How can I disable the Windows key from opening the Activities overview?

How can I disable the Windows key (or Super) from showing the GNOME Shell Activities overlay?


How to get first file extension in string using PHP?

I want to get first file extension in string using php.  now i use this code.  <?php $string = "aaa.jpgbbb.pngccc.jpg"; if( strpos( $string, $needle ) !== false ) {     list($string) = explode('.png',$string);     echo $string.".jpg"; } ?>   My code only check file extension in string. but can not get first file extension. How can i do ?  . .  For this string first file extension is jpg.  $string = "aaa.jpgbbb.pngccc.jpg";   . .  For this string first file extension is gif.  $string = "aaa.gifbbb.pngccc.jpg";   . .  For this string first file extension is png.  $string = "aaa.pngbbb.pngccc.jpg";


Does all hydrogen originate from the Big Bang?

I was wondering, if every single hydrogen in the universe originate from the time about ~3 min after the Big Bang.  I know there are nuclear fusion processes going on in stars like the pp-chain reaction which 'emit' hydrogen, too, but those reactions needed several hydrogen atoms to begin with.  So are there really processes which create hydrogen 'from scratch'?  Now, assuming that the human body consists of ~60% water and a taking a body weight of ~75kg => 45kg water => 5kg hydrogen (taking m(H) = 1u & m(O) = 16u => m(H2) / m(H2O) = 1/9) [I'm no biochemist so I don't really know if there are significant amounts of hydrogen in other compounds within the human body], does this mean that roughly 95% (70kg/75kg) of me is - like Carl Sagan said - made of stardust, but even more mesmerizing, ~5% of the stuff that makes up my body made shortly after the Big Bang, nearly 14 billion years ago?


If you take a general complex number x+iy and raise it to the power i, what does this mean and what is the resulting value i.e. what are the real and imaginary parts? I need to apply this to z=-1-i


What is the most user friendly way to verify an email address after user signed up on an app?

When a user signs up for for our app, he will have a limited access, and certain features won't be available to him.  When he tries to access any of these limited features, a pop up will show up saying he needs to verify his email first to access these features.  Then if he clicks he will get an email, with two options/buttons of "verify now" and "not my account".  Here is my question. When he clicks on"verify now" what do you think should happen? Which of these is the most user friendly approach?  Should he receive another email saying he is now a verified user. Should the link open a web page saying he is now a verified user? Should the link just launch the app? Should the link launch the app with a popup saying he's verified now? Should he receive an app inbox message saying he is now verified? Should he get a push notification saying he is verified? Or should nothing happen other then the back end gets updated?


Let $z_1$ and $z_2 $ denote complex numbers. Show that $⟨z_1,z_2 ⟩=z_1\bar z_{2}$ defines an inner product, which yields the usual metric on the complex plane. Under what condition do we have orthogonality?  Question: Under what condition do we have orthogonality? (I don't know how to show that)


I can't run a Data Explorer query - the captcha won't show up

On RPG.SE, we're engaging in some comment cleanup practices . For this purpose, one of the moderators put together a data explorer query to dig up comments that might need cleanup:    I'd like to run this for myself, but the captcha isn't showing up so I can't prove I'm human!        "Maybe I just have to click the button?" I wondered to myself, but when I try it I get this:        I'm running Firefox Aurora 30.0a2. My addons are Adblock Plus, Grease Monkey with the Stack Overflow Unofficial Patch, and Ghosterly. However: this is the same with ABP and SOUP disabled, and the data explorer added to Ghosterly's whitelist.


In the traditional 3+1 spacetime, Maxwell's equations také the following form:     $\nabla × \mathbf E = -\frac 1 c\frac {\partial \mathbf B} {\partial t}$   $\nabla \cdot \mathbf B=0$   $\nabla \cdot \mathbf E=\rho$   $\nabla × \mathbf B = \frac 1 c \mathbf j + \frac 1 c \frac {\partial \mathbf E} {\partial t}$     But to make the relativistic formulation, we use a vector potential $\mathbf A$ and a scaler potential $\phi$, such that $\mathbf B=\nabla × \mathbf A$ and $\mathbf E = -\frac 1 c \frac {\partial \mathbf A} {\partial t} - \nabla \phi$. We than combine these quantities into the four vector $A^\mu = (\phi, A^1, A^2, A^3)$ and the electromagnetic field strenght $F_{\mu \nu} = \partial_\mu A_\nu - \partial_\nu A_\mu$. It is then easy to see that $E_i=F^{0i}$. But what are the remaining components? In a 3+1 spacetime, there are 3 components left over, which makes for the (3D) magnetic field vector. But in 4+1, there are 6 components left, which doesn't fit into a 4-D vector, as it has only 4 components. What are then the remaining components? Or is magnetic field a tensor in 4+1D?


How can we distribute Shamir's secret sharing scheme shares without a dealer?

Let's say $k$ users have shares to a $(k,n)$ secret sharing scheme, and they want to issue new shares. How can they do this without collecting the shares together?  In particular, no set of $k-1$ users (including the new users) should be able to learn the shared secret during or after the share generating process. There is also no trusted third party.  One way to do this is by doing a secure multiparty computation. Is there a way to accomplish the task without a general multiparty computation scheme?


Radius of Convergence - $\sum_{n=1}^{\infty}2^n x^{n^2}$

What is the radius of convergence of this power series here?   $$\sum_{n=1}^{\infty}2^n x^{n^2}$$


What are GPT Protective volumes on Windows 8 and can they be recovered?

I have seen a few GPT Protective volumes now with Windows 8.x.  These are default configurations where the users are very "un-savvy" and so they did not enable anything as far as additional security goes.  I suspect that this may be some default bitlocker setting that MS or the mfg's (HP mainly so far) are setting?  When I have attempted to convert such volumes to MBR, it results in losing the data on the drive from what I can tell.  I would very much like to understand precisely what is going on here so that I can work with these volumes better and also perhaps recover data as well.  Secondly, after understanding if this is something specific to Windows 8 (because I thought this may also be a normal "GPT" partition format also used in OS X, etc. up to now), has anyone seen any applications or utilities that will facilitate recovery of a volume that has been converted to mbr or had other operations performed?  I have not seen any success with Stellar Phoenix, for example.


What is the most reliable and secure way to determine what page either sent, or called (via AJAX),  the current page.  I don't want to use the $_SERVER['HTTP_REFERER'], because of the (lack of) reliability, and I need the page being called to only come from requests originating on my site. Edit: I am looking to verify that a script that preforms a series of actions is being called from a page on my website.


I needed some expensive items in the game and forgot it changes your name. I need to know if , in the 3ds download version, I can get rid of the title "Thief"?


Linker error: undefined reference to... (member functions)

I read many of the other questions about this linker error, but I still wasn't able to solve it yet...  vector.hpp  #ifndef vector_hpp #define vector_hpp  namespace vec {  template<class T> class Vector { private:     T* arr;     unsigned int numberOfElements;  public:     Vector();     ~Vector();     void push_back(const T&);     void pop_back();     void pop_front();     unsigned int size() const;     T& at(int);     T& front();     bool empty() const;      T& operator[](const int) const; };  }   #endif   vector.cpp (not everything, would be too long)  #include "vector.hpp" #include <iostream>  namespace vec {  template<class T> Vector<T>::Vector()         : arr(nullptr), numberOfElements(0) {     return; }  template<class T> Vector<T>::~Vector() {     delete[] arr; }  template<class T> unsigned int Vector<T>::size() const {     return numberOfElements; }  ... }       patientenliste.hpp  #ifndef patientenliste_hpp #define patientenliste_hpp  #include "vector.hpp" #include <iostream> #include "patient.hpp"  using namespace std;  class Patientenliste { private:     vec::Vector<Patient> liste;  public:     Patientenliste& operator+= (const Patient&);     vec::Vector<Patient>& getPListe();      friend ostream& operator<< (ostream&, const Patientenliste&); };   ostream& operator<< (ostream&, const Patientenliste&);  #endif   patientenliste.cpp  #include "patientenliste.hpp"  Patientenliste& Patientenliste::operator+= (const Patient& p) {     liste.push_back(p);     return *this; }  vec::Vector<Patient>& Patientenliste::getPListe() {     return liste; }  ostream& operator<< (ostream& os, const Patientenliste& p) {     if(p.liste.size() == 0)         os << "Keine Patienten in der Liste.";     else         for(unsigned int i=0; i < p.liste.size(); i++)             os << p.liste[i] << endl;     return os; }   I have some more files/classes in my project but every class which uses my Vector-class I get the Linker-error:  patientenliste.cpp:(.text+0x32): Nicht definierter Verweis auf vec::Vector<Patient>::size() const' patientenliste.cpp:(.text+0x5e): Nicht definierter Verweis aufvec::Vector::size() const' patientenliste.cpp:(.text+0x6c): Nicht definierter Verweis auf `vec::Vector::operator [ ] (int) const'  (in english "Nicht definierter Verweis auf" means "undefined reference to") I have absolutely no clue about what's going wrong...  I already tried it wihtout the namespace vec, but that didn't work either.


Is it necessary to have getters and setters in POJO's

I have been going through clean code book which states that the class should not expose the internal state of its data and only should be exposing the behavior. In case of a very simpl and dumb java bean exposing the internal state which getter's and setters, is it not worth just removing them and make the private members public? Or just treat the class as a data structure?


Why is the python append method not modifying the list referenced in this dictionary?

So I am iterating through a "list of lists" of integers in python 3.9.0 as follows: n = 3 adjList = dict.fromkeys([i for i in range(n)], []) p = [[1, 0], [2, 0]] for s, e in p:    if e not in adjList[s]:      adjList[s].append(e)  I would expect adjList to result in: {0: [], 1: [0], 2: [0]}  Instead I get: >>> adjList {0: [0], 1: [0], 2: [0]}  Why isn't append modifying the list specified in adjList[i] only where i is the integer key? I can get it to work by changing adjList[s].append(e) to adjList[s] = adjList[s] + [e].


$\sigma$-algebra that is countable, but not finite

I just had a chat with my real analysis teacher today, we talked about how there is no $\sigma$-algebra such that it has countably many elements, but finitely many.   In the end, he said that I can visualize it by drawing out the $\sigma$-algebra on (0,1) using intervals. But I'm not too sure how to do that, should I draw it out on the real line? Or can I use any type of diagram?


Loading next item from the close vote queue takes longer and longer

As a regular close vote review tasks handler I'm pretty used to the user experience, including the performance of load times of the next review task.  When reviewing close votes I'm always filtered on  and off-topic. I primarily use IE11 as my browser on WIN7.  The last week or so I notice that loading the next review tasks takes a considerable amount of time up to 20 seconds. I do notice that in that case I get a .   Can this be investigated or explained and maybe tuned?


Prince of Persia: Based on Movie or Game

When I watched Prince of Persia, it really seemed I was playing a video game. The Game was released before the movie was.   The question was: Was the movie based off the video game, or was video game just out before the movie. Making the the game based on the movie.


Why are there so many ubuntu distributions

Ubuntu comes with Gnome as window manager. They you can install lubuntu or xubuntu that have LXDE and Xfce consequently.   As far I can tell, the only difference is the window manager.  My question is this: if you can just remove gnome and install another window manager, which takes max 15 minutes, why would you bother making another distribution out of it?   There are also articles comparing those distributions online like there were completly different operating systems, but afaik they are not.  Thanks for your input.


Why do all the items in my 2D list have the same index?

I'm trying to make a 2D list where all the items are copies of the same list. The following code just prints "0" five times, but I need a unique index for each item. my_list = [] list_of_lists = []  for i in range(0, 5):     my_list.append(i)  for i in range(0, 5):     list_of_lists.append(my_list)  for l in list_of_lists:     print(list_of_lists.index(l))  I get the same results when I append my_list.copy() instead of my_list. Any help is greatly appreciated.


Was Voldemort's body destroyed when he attacked Harry?

Before the opening of the Sorcerer's Stone, when Voldemort attacked Harry and failed, was his body destroyed or only killed?


Show link to revision history when there are revisions but no edits

In the latest  I saw this:     2013-02-18: The revision history of a question that was closed as a duplicate is now showing the chosen originals as part of the "Closed as duplicate" notice.   That sounds cool, so I went to go see what it looks like and realized that questions with , but no edits, don't have an "edited <date>" link to click.  This applies to questions which had a bounty posted, or have been closed, reopened, locked, deleted, etc.  Examples:   , revisions:  , revisions:          I realize I can manually type the URL:  https://meta.stackoverflow.com/posts/168761/revisions   But it would be nice to simply click. It could say "revised" instead of "edited" if there were no edits:


i have a upvote posts style layout on my website, i have an ajax request that loads more posts, that code works fine, but my problem is when i try to upvote them. The ones that are not dynamically showed from the ajax request can be upvoted but when it loads more they can't be upvoted.  I have a id like_postID so the code can check wich post is being upvoted.  Searching i came across the $(document).on( eventName, selector, function(){} );, i tried it and it still works but only the ones that are not requested by the ajax call.  Heres my HTML code:

'.$upvote['upvotes'].' Up Votes

   Heres i my Jquery:  $(document).ready(function(){      // like and unlike click     $(".upvote-vetor").on("click",".like", function(){         var id = this.id;   // Getting Button id         var split_id = id.split("_");          var text = split_id[0];         var postid = split_id[1];  // postid         // Finding click type         var type = 1;         // AJAX Request         $.ajax({             url: 'php/upvote.php',             type: 'post',             data: {postid:postid,type:type},             dataType: 'json',             success: function(data){                 var likes = data['likes'];                  $("#likes_"+postid).text(likes);        // setting likes              },             error: function(data){                 alert("error : " + JSON.stringify(data));             }         });     }); });   PHP upvote code:  $userid = $id_user; $postid = $_POST['postid'];   // Check entry within table $query = "SELECT COUNT(*) AS upvotes FROM upvotes WHERE id_post='$postid' and id_user= '$userid'";  $result = $conn->prepare($query); $result->execute(); $fetchdata = $result->fetch(PDO::FETCH_ASSOC); $count = $fetchdata['upvotes'];   if($count == 0){     $insertquery = $conn->prepare("INSERT INTO `upvotes` (`id_upvote`, `id_user`, `id_post`) VALUES (NULL, '$id_user', '$postid');");     $insertquery ->execute(); }else {      $updatequery = $conn->prepare("DELETE FROM `upvotes` WHERE   id_user= '$userid' and id_post='$postid'");     $updatequery->execute(); }   // count numbers of like and unlike in post $query2 = "SELECT COUNT(*) AS upvotes FROM upvotes WHERE id_post='$postid'"; $result2 = $conn->prepare($query2); $result2->execute(); $fetchlikes = $result2->fetch(PDO::FETCH_ASSOC); $totalLikes = $fetchlikes['upvotes']. " Up Votes";   $return_arr = array("likes"=>$totalLikes);  echo json_encode($return_arr);   Thanks in advance. :)


Separated sets written as union of disjoint closed sets can be separated

Suppose $A$ and $B$ are sets such that $\overline{A}\cap B = \emptyset = \overline{B}\cap A$. Furthermore, $A$ and $B$ can be written as a countable union of closed sets. I am trying to show that there exist disjoint open sets $U,V$ such that $A$ is in $U$ and $B$ is in $V$. I am not sure where to start.   Note this is all happening in a normal T1 space.


Given a $10×10$ grid with $9$ red blocks and $91$ white blocks, in each step we color one red block black and after that one white block red until there are $91$ black blocks and $9$ red blocks. Prove that there exits a step in which a black block shares an edge with a white block. I ran a few trials and couldn't get past the fifth step without adjacency. But I don't know how to build a proof.


Java: make a function not virtual - call parent method on parent reference

I would think this question has been asked before, but was not immediately able to find an answer.  Say, somehow, a Pet reference is assigned a Dog object:  Pet pet = new Dog();   If I write  pet.attackInvader();   The child class (Dog)'s method is called by virtue that all functions in Java are virtual.   Is it possible to invoke Pet's attackInvader() instead?  (I know I can edit Dog's method to call super, but, in this case, assume I cannot change Dog's implementation.)


I'm dual booting W7 and Ubuntu (installed from Wubi). I've had it up and running a few times but today I'm getting a message from Windows Boot Manager when I select Ubuntu that wubildr.mbr is missing or corrupt. Any help would be greatly appreciated.


Workflow rule causing trigger to fire twice

I need to be able to detect that the trigger execution is happening because of a workflow field update. There is a suggestion in the cookbook:  But this solution is not properly bulkified. If my batch of records is split up (200, 100, 50 whatever the server decides) the 2nd to nth batches are not processed correctly because the flag has already been set. The second part of the problem is: This is part of a managed package. I have no control of the customer's workflow rules, supporting and configuring a flag/last changed field on a record is not realistic, our company doesn't have the support resources to be walking each customer through the configuration. Has anyone been able to solve this problem for large batches of records? Edit (In Response to Calebs Answer) Separate trigger batches do not run in separate contexts trigger AccountTriggerContext on Account (before insert) {     System.debug('counter='+TriggerContextCounter.getCounter()); }  . global without sharing class TriggerContextCounter {      private static Integer counter = 0;          public static Integer getCounter() {         Integer value = counter;         counter++;         return value;     }      private static testMethod void testTriggerContexts() {         List<Account> accounts = new List<Account>();         for(Integer i = 0; i < 250; i++) {             accounts.add(new Account(Name='testTriggerContexts: ' + i));         }         insert accounts;     } }  Unit test debug messages  USER_DEBUG|[2]|DEBUG|counter=0 USER_DEBUG|[2]|DEBUG|counter=1  Both counters should have been 0 if the batches were running in separate contexts Edit Further explanation of background for @Ralph This is a generalized explanation, but when certain conditions are met, some date fields on other objects are updated. The trigger runs and updates the dates. If a workflow rule causes a field update on the object, the same trigger is run again and the dates on the other objects are updated for a second time. And because this is an increment operation the dates on the other objects are off by a factor of 2.


Looking for a part of a proof involving connected spaces

I am looking for the proof of the following theorem:  If $X_1 \times ... \times X_n$ is a connected space $\iff$ $X_i$ is a connected space $\forall i$  I got one of the implications ($\implies$) But I am looking for a proof to the other implication


Hi¡ I have some troubles with the next problem.   Let $(X,\tau)$ be a topological space. Prove that $X$ is $T_1$ if and only if there exists a family $U$ of open sets such that $\bigcap U=\Delta$ where  $\Delta=\left\{(x,x): x\in X\right\}\subseteq X\times X$ (the diagonal)   My attempt.  $\Rightarrow)$ We know that $X\times X$ is $T_1$ because $X$ is $T_1$. Moreover, we have the next theorem for $T_1$ spaces  Theorem Let $X$ be a topological space. The next conditions are equivalent.  1) $X$ is $T_1$  2) For all $B\subseteq X$, $B=\bigcap \left\{ U: B\subseteq U, U\in\tau\right\}$  3) For all $x\in X$, $\left\{x\right\}=\bigcap\left\{U : U\in\tau,  x\in U\right\}$  Then, the implication follows from 3).  But, what can I do for $\Leftarrow)$? I have tried to prove that $\left\{x\right\}$ is closed, but I have failed.  My best attempt was consider two distinct points $x$ and $y$. Clearly, $(x,y)\notin\Delta$, then, $(x,y)\notin\bigcap U$, so, there exist some basic open set such that $(x,y)\notin A\times B$. Then, my idea was use the projection $\Pi_X$, but, from here, I'm so confused.   Thanks in advance.


RemoveClass not working on a class name just added using jquery

For some reason when I add a class to an element using Jquery I cannot perform a function using the class name just added:   $('.openslidecontent .arrow.off').click(function() {           $('.openslidecontent,.rightwrapper .arrow').removeClass('off')         $('.openslidecontent,.rightwrapper .arrow').addClass('on');       return false;      });      $('.openslidecontent .arrow.on').click(function() {   // THIS FUNCTION DOES NOT EXECUTE         $('.openslidecontent,.rightwrapper .arrow').removeClass('on');         $('.openslidecontent,.rightwrapper .arrow').addClass('off');       return false;      });


Extending multiple classes in one class with laravel

I have two PHP classes, one of which is unnecessary so I'm trying to move it into the first class The issue is that each extends another class I'm trying to move the class aggregateData into the main class dataGather. Basically, just moving those functions into the dataGather class. aggregateData extends a custom class and dataGather extends the laravel model class. How can I properly move those functions into the dataGather class and still extend both the custom class and Model properly? aggregateData.php class aggregateData extends aggregater {   //functions within }  dataGather.php class dataGather extends model {  }


What's the origin of "cold" being used roughly for "no (proper) introduction"?

E.g. cold call in marketing, cold open in movies. Also "unsolicited" and "unexpected" seem to be synonyms  but is there a better one?


I'm looking at adding a unique identifier field for my assets that will have a prefix of the record type and then a following 4 numbers.   Office Equipment   Abbreviation of OE  Remote Equipment   Abbreviation of RE    So we would have OE-0001 and RE-0001 as two unique records, in the same field, same record.  I know we can use something like A-{0000} to specify A as the prefix and {0000} as the minimum numbers to show. But replacing the A is the issue?   Can this be done / how?


App doesn't render the year in a single Post

Sorry for the lack of hand drawn red circle. The Post in question    App Version: 1.6.0.3 Device: iPhone 4S OS Version: Version 9.3.5 (Build 13G36)


What is the best way to inject script after ajax request?

Js doesn't work after using the ajax request, so I inject the script after each request, is it okay that way, if not, is there a better way?   createTable() {         function newTable() {             beelatter.ajax("GET", "./new_table.html", true, false, function () {                 if (this.readyState == 4 && this.status == 200) {                     beelatter.nodes().children[1].innerHTML = this.responseText;                                          //I need a better solution just for that.                     let script = document.createElement('script');                     script.src = "js/build.js";                     document.body.append(script)                 }             });          }         this.queryS(".new_group").addEventListener("click", newTable, true)     },


Prove that $ \sum_{n=1}^\infty \ln\big(n\sin \frac{1}{n}\big)$ converges.

Prove that $\displaystyle \sum_{n=1}^\infty \;\ln\left(n\sin\frac{1}{n}\right)$ converges.   My Work: $$\left|\ln \left(n \sin \frac{1}{n}\right)\right| \leq\left|\ln \left(n \sin \frac{1}{n^{2}}\right)\right| \leq\left|\ln \left(\sin \frac{1}{n^{2}}\right)\right|$$ I was going to use comparison test. But now stuck. Please give me a hint.


I'm currently struggling which of the following two versions (I anononymized them) is the correct grammatical form for the title of a publication:  Evaluating Safety, Cleverness and Fastness of Masking Systems Evaluating the Safety, Cleverness and Fastness of Masking Systems  We are currently using the first version. Is it missing "the"?


Identifying linear relationships among many interrelated variables

I have a dataset with many variables. Some of these variables are linked to each other in various ways, but I don't know in advance those that are.  For example, these are some relationships:   $A=B$ -- obvious and easy to spot/remove; $A=B\cdot\mathrm{constant}$ -- again easy to remove using a correlation matrix; The problem comes with $A = B+C+D+E$ or even $A = B+(0.5\cdot C)+(0.5\cdot D+E).$   The last set are difficult to identify and PCA doesn't provide me with all the clues to identify what A is made up of.   For example, a simple $A = B + C$ will not always show a link. If half of the B values are 0.1 with the other half distributed from 0.5-1.5 randomly and C is a normal distribution with mean 1 no correlation is detected between B and A. However, correlation is often detected in A and C due to the distribution in C still being present in A.  Without knowing in advance these relationships are present how do identify these underlying relationships?  In essence, I am trying to remove these relationships before running PCA and later modelling with remaining uncorrelated variables.


How to ensure that buttons look clickable?

I always notice that my designs look good but buttons and other clickable elements don't look clickable. Can you provide any tips or links that can help me?


I want to make a partition of my current disk as shown in the picture. I tried GParted but it's not working because the current partition is running. in fact, the buttons are not active to proceed.  Please help to divide it.


If $a,b$ are positive integers such that $\gcd(a,b)=1$, then show that $\gcd(a+b, a-b)=1$ or $2$. and $\gcd(a^2+b^2, a^2-b^2)=1$ or $2 $

If  $a,b$ are positive integers such that $\gcd(a,b)=1$, then show that $\gcd(a+b, a-b)=1$ or $2$ and $\gcd(a^2+b^2, a^2-b^2)=1$ or $2 $. Progress We have   $\gcd(a,b)=1\implies \exists u,v\in \mathbb Z$ such that $au+bv=1\implies a^2u'+bv'=1, u',v'\in \mathbb Z$. Let $\gcd(a+b, a-b)=d$. Then $\mid (a+b)x+(a-b)y, \forall x,y\in \mathbb Z$. How to show $\gcd(a+b, a-b)=1$ or $2$ and $\gcd(a^2+b^2, a^2-b^2)=1$ or $2 $.


Why does this expected value simplify as shown?

I was reading about the german tank problem and they say that in a sample of size $k$, from a population of integers from $1,\ldots,N$ the probability that the sample maximum equals $m$ is:  $$\frac{\binom{m-1}{k-1}}{\binom{N}{k}}$$  This make sense. But then they take expected value of the sample maximum and claim:  $$\mu = \sum_{m=k}^N m \frac{\binom{m-1}{k-1}}{\binom{N}{k}} = \frac{k(N+1)}{k+1}$$  And I don't quite see how to simplify that summation. I can pull out the denominator and a $(k-1)!$ term out and get:  $$\mu = \frac{(k-1)!}{\binom{N}{k}} \sum_{m=k}^N m(m-1) \ldots (m-k+1)$$  But I get stuck there...


Is Flight Booking Is a Must For Uk Visit Visa?

i want to know do i have to attach a flight booking confirmation with my uk visit visa application? Is there any rules that can reject my visa if i wont attach flight reservation before getting my visa?


Block All Ips from editing files on server

We have been under recent attacks from a hacker and we need to be able to stop all IP addresses from editing files except for the ones at our office.  I know how to do this via an .htaccess file however I am at a loss when it comes to just a server side thing.  Unfortunately we use a server at HostGator and they couldn't tell me much. I am not much of a server person, so I am not even sure if this is the best route.  Any guidance or help on the subject matter would be greatly appreciated.    Thanks!


After I upgraded from HDD to SSD, I followed some tips from Internet and turned swap off, but then, my OS would always freeze when out of memory although I have 8GB RAM and just open some applications.   Today I decide to turn swap on to get my system working better. Are there any better solutions for my case?


What changes with Kerberos Authentication in IPv6 when using NAT?

How should Kerberos Authentication be setup with IPv6?   Of you're using NAT for IPv6 where there is a single public IPv6 address and it translates to the machines inside in the ULA range?


while loop checking for two booleans always runs

I'm a beginner at java and I just recently started to study interfaces so I triead to make a program that had classes which implemented intefaces. Anyways, i ran into a problem with the while loop in my program. I'm tryng to give the user the opportunity to choose between talking to a robor or a person, and as far as i understand && checks for both of the conditions (If either one of them is true it runs the loop).  import java.util.Scanner; public class App {  public static void main(String[] args) {     Scanner ai = new Scanner(System.in);     Conversation guy = new Human();     Conversation rox = new Robot();     System.out.println("What do you want to talk to?");     String choice = ai.nextLine();     while (choice != "Robot" && choice!= "Person"){         System.out.println("Option not available, choose again.");         choice = ai.nextLine();     }     switch(choice){     case "Person":         System.out.println("What's my name?");         guy.greet();         guy.conv();         guy.bye();         break;     case "Robot":         System.out.println("What's my name?");         rox.greet();         rox.conv();         rox.bye();         break;     }     ai.close();      } }   I'm trying to make it so that if the input is neither "Person" or "Robot" it scans again for new input but despite the input being either one the program always runs the loop, Why?


I want to calculate integrals $$ \begin{split} \int_0^\infty x \exp\{ ax-b x^2\} dx    &= \int_0^\infty x\exp\{-b(x^2-\frac{a}{b}x)\}dx\\    &= \exp\left\{\frac{a^2}{4b}\right\}\frac{\sqrt{\pi}}{2}       \int_0^\infty x \frac{\sqrt{2}}{\sqrt\pi(1/2)}                     \exp\left(\frac{-b}{2(1/2)}\left(x-\frac{a}{2b}\right)^2\right)dx \end{split} $$  Integral  $$\int_{0}^{+\infty}x \frac{\sqrt{2}}{\sqrt\pi(\frac{1}{2})}\exp\frac{-b}{2(1\2)}(x-\frac{a}{2b})^2dx$$ is a expectation half-normal distribution or expectation Truncated Normal Distribution؟ and What is the final answer?


Solving the trigonometric equation $A\cos x + B\sin x = C$

I have a simple equation which i cannot solve for $x$:   $$A\cos x + B\sin x = C$$  Could anyone show me how to solve this. Is this a quadratic equation?


WFS how to consume with different coordinate system?

I have a WFS in EPSG:4167. My map view has EPSG:3857. How to make the WFS work on a map view with different coordinates?   I used this to define my coordinate system from wfs:  import { register } from 'ol/proj/proj4.js'; proj4.defs("EPSG:4167", "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs");  register(proj4);   Note it is a third party wfs, so I only can use this EPSG.  Any ideas?   My first thought is that I should get the geojson from WFS and then transform the entire geojson using proj4 lib and display it on map (I'm using openlayers). Not sure if this is the best approach.


What is the AppDelegate for and how do I know when to use it?

I'm just beginning to work on iPhone apps.  How do I know when I should be putting stuff in AppDelegate versus a custom class?  Is there a rule or any type of analogy with another programming language like Python or PHP that uses an AppDelegate like pattern?


Why do we ignore C in definite integrals?

I am teaching myself Calc, and I could not find a reason that we ignore the constant of integration when we evaluate a definite integral. Thanks.  P.S, my etiquette is not that good when relating to calc, as I am only in 8th grade. Thank you for help.


Update Windows 8 Enterprise to Windows 8.1 Enterprise KMS activation

So it is shown that volume license packages of Windows 8, like Pro and Enterprise, are unavailable for upgrading.  I received a link last night to download the Windows 8.1 Enterprise 90-day Evaluation, but it will replace my current Windows 8 Enterprise version.  Is it known when these versions will become available for upgrade? I've been waiting patiently for weeks to get this upgrade.  Thanks.


Points to remember when having to write recommendation letter yourself

While it is an unethical academic practice, it is a fact that most recommendation letters for MS degrees in US and Europe from countries like India and China are written by students themselves. Students apply en masse; the faculty strength in departments in many universities is small; the few professors hardly get the time to write recommendations for all applying students. Moreover a 4-year engineering degree is dominated by coursework and professors are unlikely to get to know students outside the classroom.   Let us set aside the question of whom to blame for this practice and look at the question that comes up on most applicants' minds:    "In the event that I have to write a recommendation letter on my own, what are the points I need to bear in mind?"    I have the following points:   Ensuring similarity of language among all letters from a particular professor maturity of presentation and avoidance of blandishment Creating tonal differences among different recommendation letters.   Could someone elaborate on these points? The third one is oft-quoted but is found to be very tough to execute in practice.


Disable browser 'Save Password' functionality

One of the joys of working for a government healthcare agency is having to deal with all of the paranoia around dealing with PHI (Protected Health Information). Don't get me wrong, I'm all for doing everything possible to protect people's personal information (health, financial, surfing habits, etc.), but sometimes people get a little too jumpy.  Case in point: One of our state customers recently found out that the browser provides the handy feature to save your password. We all know that it has been there for a while and is completely optional and is up to the end user to decide whether or not it is a smart decision to use or not. However, there is a bit of an uproar at the moment and we are being demanded to find a way to disable that functionality for our site.  Question: Is there a way for a site to tell the browser not to offer to remember passwords? I've been around web development a long time but don't know that I have come across that before.  Any help is appreciated.


How can I assign custom icons to folders?

How do I assign custom icons to folders, as well as the default folders Desktop, Downloads, Music, etc.? I know that one way is to assign the properties of folders, but I want to assign icons in the same way that are assigned the default folders, so the custom icons will also appear in the Nautilus bookmarks. I've also seen this question >>  <<, but that is not what I seek.  I want the markers to display custom icons like the dolphin. I know it's possible, because the folder "Desktop", "Documents", "Music" have their own custom icons in bookmarks. How?


How does a Lambda with instance variables work?

I read through  by  and it has the following example: Func<int, Func<int, int>> adder =      (int x) => (int y) => x + y; // `int` declarations optional Func<int, int> add5 = adder(5); var add6 = adder(6); // Using implicit typing Debug.Assert(add5(1) == 6); Debug.Assert(add6(-1) == 5);  // Closure example int yEnclosed = 1; Func<int, int> addWithClosure =      (x) => x + yEnclosed; Debug.Assert(addWithClosure(2) == 3);  I've used lambdas in C# for years and yet I do not understand what is going on here. Obviously this adds an instance variable, but what in the declaration is defining all this? Is x or y the instance variable? And what's with the Closure example at the bottom?


Networking - how to allow from second lan interface to access first lan interface?

I have one box with 2 ethernet interface:  auto lo iface lo inet loopback  auto eth0 iface eth0 inet dhcp  auto eth1 iface eth1 inet static   address 192.168.2.1   netmask 255.255.255.0   #network 192.168.1.0   gateway 192.168.2.1   #broadcast 192.168.1.1   dns-nameservers 195.130.131.11 192.130.130.139    Now eth0 is connected to main internet and eth1 is connected with another laptop Windows 7 which has ip : 192.168.2.2  But Windows 7 cant ping my eth0 IP. How can i make it possible?


How to make callout to tooling api from the queueable apex which is enqueued in scheduler where source and target orgs are same?

I am calling tooling api from my Queueable apex to get information of flow object from my org and scheduling it on daily basis. Now my problem is when I run my code from anonymous window with Authorization header set to 'Bearer '+Userinfo.sessionId(), It works fine. But when i schedule it, it returns error saying :"Session expired or invalid","errorCode":"INVALID_SESSION_ID". I think the reason is scheduler runs in system context and in that case Userinfo.sessionId() is returned as null. So is there any way to make tooling api callouts from scheduler or Queueable? Here is my code-  String endpoint = 'https://lightningwarrior-dev-ed.my.salesforce.com/services/data/v37.0/tooling/query?q=Select+Id,processtype,Description,LastModifiedDate,MasterLabel,Status,LastModifiedById,VersionNumber+From+Flow';  HttpRequest req = new HttpRequest(); req.setEndpoint(endpoint); req.setMethod('GET');  req.setHeader('Content-Type', 'application/json'); req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());  Http httpreq = new Http(); HttpResponse res = httpreq.send(req); String reqresponse = res.getBody(); system.debug('dt'+reqresponse); jsonHelperClass jsonres =  new jsonHelperClass(); jsonres = (jsonHelperClass)JSON.deserialize(reqresponse ,     jsonHelperClass.Class); public List<RecordWrapper> ListrecordsWrap=new List<RecordWrapper>(); ListrecordsWrap=jsonres.records; system.debug('jsonres'+ListrecordsWrap[0].MasterLabel); public class jsonHelperClass {     public List<RecordWrapper> records;     public jsonHelperClass()     {      } } public class RecordWrapper {     Public String Id;     Public String ProcessType;     Public String Description;     Public String MasterLabel;     Public String Status;     Public Integer VersionNumber;     public Id LastModifiedById;     public Datetime LastModifiedDate;     public RecordWrapper()     {     } }   Thanks in advance.


Ubuntu in virtual box not able to connect to internet

Host- WindowsXP Guest- Ubuntu 12.10  The host machine has internet connectivity, but I am not able to connect to internet in Ubuntu. NAT-Using this I am able to ping a site, it shows packets sent and received but via browser I am not able to access.  Bridged- Not able to connect.  I have a static IP on my host machine and I use a proxy too.  Please let me know what is going wrong?


How to compute the correlation between a qualitative and a quantitative variable?

My study is about the correlation of the person's gender and his or her score in a questionnaire about gender stereotyping. The higher the score in the questionnaire means he or she gender stereotypes more. What kind of correlation statistic should I use? Can I find it in Excel?


How can I make a drive accessible to Linux / Bash subsystem on Windows?

I have a laptop which I've dual-booted with Ubuntu and Windows 10.  My goal is to use a bash shell inside windows to access the linux partition.  Inside Windows, I've installed the Linux subsystem and also used Ext2Fsd to create a D:// drive for the Linux system.  In the Bash shell, though, I can only see the C:// drive. How can I access the D:// drive?  I tried creating a shortcut in windows, but it makes .lnk file that I'm not sure how to follow in Linux.


Can we search on Stack Overflow based on or condition over tags?

I can search through tags using [tag-name] and then add a search term that I want to search like. For multiple tags I can also search with [tag-name-1][tag-name-2][tag-name-3]. But it filters the questions by joining the tags using AND conditions. So if a question has all the tags then it will come in the result set, otherwise not.  However I want to search the questions based on joining the tags by OR conditions. Like I want to filter the questions which either came in PHP or Java.  Is it possible to search like that on Stack Overflow...?


I'd like to remove some of the default icons and maybe add one or two icons of my own. For example, it would be nice if there were icons for the NerdTree and the Taglist.


Can someone please suggest a good latex editor for mac. something close to one that is used in this video    I liked the highlight and everything that this editor is offering. right now I am using TeXworks and it is so very plain  Thanks for the help


$\int_2^\infty \left(\frac1{x\log^2x}\right)^p\mathrm dx$ diverges for p>1

I see  question and the answer by joriki.  However I cannot understand joriki's argument that $$\int_2^\infty \left(\frac1{x\log^2x}\right)^p\mathrm dx$$  diverges for p>1.  So I try to show that by myslef, by finding a function $f(x)<\left(\frac1{x\log^2x}\right)^p$ for sufficiently large $x$ and $\int f(x) dx=\infty$, but it is difficult.  Please help me to understand that argument or give me some hints.


Given a polynomial $p(x)$ that outputs an integer for every integer input $x$, is it necessary for $p(x)$ to have rational coefficients?


When not used, what gear should I store my bike in

Is there a conventional wisdom to what gear a bike should be left in, when used infrequently?


Why must an English learners should know Grammar first?

Why must everyone understand Grammar first before learning to speak?


Shouldn't the frequency increase the current in the photoelectric effect

I know that intensity determines the no. of electrons and the current produced. But if the intensity is constant and the frequency changes, the kinetic energy of the photoelectrons changes, so their velocity changes. So if the frequency increases, the kinetic energy of the photons increases so they move faster. In that case, the number of photoelectrons moving through a space in unit time increases because their velocity is more so the electrons are traveling faster. That is my reasoning behind this. But why does frequency not affect the current?


I have this query and works. But It seems ugly to me that it needs some optimization since I repeat the same actions over and over again. There must be a better way to merge all of these  SELECT * FROM   (SELECT COUNT(*) AS a    FROM order_item_histories    WHERE order_status_id IN (5, 4, 15)) AS e,   (SELECT COUNT(*) AS b    FROM order_item_histories    WHERE order_status_id IN (6)) AS f,   (SELECT COUNT(*) AS c    FROM order_item_histories    WHERE order_status_id IN (4, 10, 9, 12, 7)) AS g,   (SELECT COUNT(*) AS d    FROM order_item_histories    WHERE order_status_id IN (11, 16, 17, 13)) AS h


Error: unexpected inconsistency; run fsck manually

When I start my PC, the following commands appear in cmd space:  /dev/sda1 contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found. /dev/sda1: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on `/dev/sda1` requires a manual `fsck`  BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in-commands.  (initramfs)_   Can anybody help in sorting out the issue? Thanks!


Select all is missing in mobile version of gmail

How can I select all instead of one by one in gmail Android version application. ?


How to create keyframes for Animation Nodes, which I can see in dope sheet?

is there a way to create keyframes for Animation Nodes parameters, which are shown in Dope Sheet ?


Reference request for motion & related topics

I'm starting a Robotics course at grad school and I could use some help to relearn and revise my concepts in the following topics :   Kinematics  Rigid Body Dynamics Rotational Motion and Linear Momentum Force   Could you good people please let me know of  1) the best (subjectively speaking) intuitive sources that helped you learn the concepts? 2) some sources that showed examples instead of verbose explanations ?  Any help/suggestions much appreciated! Thanks. (if there are any more specifics required, please let me know, I will edit the post)


How to exclude the system directory using Powershell

I want a simple way to exclude the system folder from the searches in PowerShell.  I use the following script:  $mysys = 'c:\windows'     PS C:\> Get-ChildItem -path . -Include *.txt -Exclude '$mysys' -Recurse   I basically want anything under c:\windows to be completely ignored, however, when I run the search, i continuously get errors as it searches under c:\windows; and in some cases also gives out results that it found.  Error: (why is it even going under c:\windows when I excluded it)   Get-ChildItem : Access to the path 'C:\Windows\System32\LogFiles\WMI\RtBackup' is denied. At line:1       char:1   + Get-ChildItem -path . -Include *.txt -Exclude '$mysys' -Recurse -Dept ...   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       + CategoryInfo          : PermissionDenied: (C:\Windows\Syst...es\WMI\RtBackup:String) [Get-ChildItem],   UnauthorizedAccessExcept     ion       + FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand   For example, it includes: (this should all be excluded) (basically anything under c:\windows)  > >     Directory: C:\Windows\WinSxS\amd64_microsoft-windows-c..iser-inboxdatafiles_31bf3856ad364e35_10.0.14393.0_none_9eeac2cef7a25999 >  >  > Mode                LastWriteTime         Length Name                  >  > ----                -------------         ------ ----                                                                                > -a----        7/16/2016   6:42 AM         855814 hwcompat_RS1.txt                                                                     > ------        7/16/2016   6:42 AM           1764 hwexclude_RS1.txt                                                                    > ------        7/16/2016   6:42 AM           1327 wucompat.txt   I basically want to do a recursive search under c:\ and then exclude whatever I don't want. Starting with c:\windows and everything under it.


Why is propagation of uncertainties quadratic rather than linear?

1) Up until now, during practical work sessions, I always used these formulas for uncertainty propagation:  if $C = A+B$  or  $C = A-B$ $$\Delta C = \Delta A + \Delta B$$ if $C = AB$ or $C = \frac{A}{B}$ $$\frac{\Delta C}{C} = \frac{\Delta A}{A}  + \frac{\Delta B}{B}$$ if $C = A^m$ $$\frac{\Delta C}{C} = |m|\frac{\Delta A}{A}$$   These formulas are derived from the expression for the differential of a function of multiple variables:  if $C = f(A,B)$ $$ dC = \frac{\partial C}{\partial A}dA + \frac{\partial C}{\partial B}dB \Rightarrow \Delta C = \frac{\partial C}{\partial A}\Delta A + \frac{\partial C}{\partial B}\Delta B$$  and I think that makes sense because the value C is just a function of two variables that happen to be measurements.  2) But this morning, I was told that this is wrong and I should actually use these instead:  if $C = A+B$  or  $C = A-B$ $$(\Delta C)^2 = (\Delta A)^2 + (\Delta B)^2$$ if $C = AB$ or $C = \frac{A}{B}$ $$\left(\frac{\Delta C}{C}\right)^2 = \left(\frac{\Delta A}{A}\right)^2  + \left(\frac{\Delta B}{B}\right)^2$$  which are apparently derived from a general formula:  $$(\Delta C)^2  = \left(\frac{\partial C}{\partial x_1}\Delta x_1\right)^2 + \left(\frac{\partial C}{\partial x_2}\Delta x_2\right)^2 +   \hspace{0.3cm}...$$  or   $$\Delta C  = \sqrt{\left(\frac{\partial C}{\partial x_1}\Delta x_1\right)^2 + \left(\frac{\partial C}{\partial x_2}\Delta x_2\right)^2 +   \hspace{0.3cm}...}$$  3) So:   Why is this formula better?  Where does it come from? What does it actually represent? (Do I recognize the shape of a norm in that last formula?)  What is wrong with the formula of the differential?   I'm asking a lot, but the propagation of uncertainty always confused the ship out of me.


Java Arraylist works by reference or by value?

I run the following program in Java:      public class foobar {     public static void main(String[] args) {      ArrayList<float[]> arr = new ArrayList<float[]>(10);      for (int i=0; i<10; i++){         int k = i + 10;         float[] foo = new float[5];         foo[2] = k;         //System.out.println(Arrays.toString(foo));         arr.add(foo);         foo[0] = 11;         foo = null;     }      for (float[] item:arr) {         System.out.println(Arrays.toString(item));     }      } }   and it outputs,  [11.0, 0.0, 10.0, 0.0, 0.0] [11.0, 0.0, 11.0, 0.0, 0.0] [11.0, 0.0, 12.0, 0.0, 0.0] [11.0, 0.0, 13.0, 0.0, 0.0] [11.0, 0.0, 14.0, 0.0, 0.0] [11.0, 0.0, 15.0, 0.0, 0.0] [11.0, 0.0, 16.0, 0.0, 0.0] [11.0, 0.0, 17.0, 0.0, 0.0] [11.0, 0.0, 18.0, 0.0, 0.0] [11.0, 0.0, 19.0, 0.0, 0.0]   From what I understand, Arraylist only stores a reference to the object (a float array in this case). However, since array foo is only valid within the for loop's scope in this case, why does arr not end up with null values after the for loop? Why is the change foo[0]=11 reflected, but not foo=null?


file_get_contents('php://input') doesn't work with Bash pipe

I was working on my project and suddenly stdin in PHP stops working. I have code in PHP: test.php <?php  $stdin = file_get_contents('php://input');  echo ">>>>>"; echo $stdin; echo "<<<<<";  and I'm executing it with: echo 'HELLO' | php -f test.php >>>>><<<<<  This works fine: echo 'HELLO' | php -c "echo file_get_contents('php://input');" HELLO  and it doesn't work, I'm spending way too much time on this. Why this simple code doesn't work? Any clues? I'm using Fedora GNU/Linux with php 7.4.19.


Why did I not see that I was downvoted in my achievements?

I logged on today, and saw nothing in my inbox or achievements bar, so I thought nothing happened. Upon looking on my profile just now, I saw that I was downvoted on . Why did this downvote not appear as a notification in my achievements bar? Is this a bug?


How to switch from 32 bit to 64bit without reinstalling?

I have a laptop supports 64bit. I'm using Ubuntu 12.04 32 bit by a mistake I installed 32bit. Now I want to switch from 32 bit to 64 bit and a new version of Ubuntu 12.10 is also available so I want to install it.   Is there any easy way with out New Installation ?  I have a separate partition for Ubuntu of 40 Gb size if I reinstall the new 64 bit version on it will it remove my applications and other stuff from the other partitions. Like /home partition and /data partition.  Also tell how to make backup.


If $m$ and $n$ are integers and $7m =n^2$, then $7\mid \gcd(m,n)$.

For this problem would it be $7$ for both $m$ and $n$ because you will get $49$ on both side and then it is divisible by $7$. Or am I thinking of how to do this completely wrong?


Inequality concerning complex numbers and their modulus properties

If $\left| z^3+\frac{1}{z^3} \right| \leq 2$, prove that $\left| z+\frac{1}{z} \right| \leq 2$.  My approach:  Let $z=x+yi$, where $x, y \in \mathbb{R}$ and $i=\sqrt{-1}$ is the imaginary unit.  Factor the expression$$\left| z^3+\frac{1}{z^3} \right| = \left| \Big(z+\frac{1}{z}\Big)\Big(z^2+\frac{1}{z^2}-1\Big)\right|=\left|z+\frac{1}{z}\right|\left|z^2+\frac{1}{z^2}-1\right|$$  Now use that fact that $$\left|\sum_{i=1}^{k}z_i\right| \leq \sum_{i=1}^{k}\left| z_i \right|$$  Hence, $$\left|z^2+\frac{1}{z^2}-1\right| \leq \left|z^2\right|+\left|\frac{1}{z^2}\right| - 1$$  But $$\left|z^2\right|+\left|\frac{1}{z^2}\right| = x^2+y^2 + \frac{1}{x^2+y^2} \leq 2$$  Which implies $$\left|z^2\right|+\left|\frac{1}{z^2}\right|-1 \leq \implies \left|z^2+\frac{1}{z^2}-1\right| \leq 1$$  Which implies $$\left| z + \frac{1}{z}\right| \leq 2$$  Did I miss something or is there a better way to prove the inequality?  Thank you :)


Ghostscript breaks the hyperlinks of my PDF

When I use Ghostscript on a PDF it breaks the PDF's hyperlinks. Why, and how can I retain hyperlink functionality after doing so?  I have made a PDF named link.pdf with the text Hello World where world is linked to . I tried this beginning with both LibreOffice Writer and LaTeX:  \documentclass{article} \usepackage{hyperref} \begin{document}  Hello \href{https://www.bbc.com/}{World}.  \end{document}   The link works.  Now execute    $ gs -sDEVICE=pdfwrite \      -dNOPAUSE         \      -dQUIET           \      -dBATCH           \      -dPDFSETTINGS=/ebook \      -sOutputFile=link-export-gs.pdf \       link.pdf   The link is broken.   Edit1: Originally asked about Ghostscript and ps2pdf. Given @AlexG's comments, removed ps2pdf.  Edit2: Note, the reason I wish to do this is to utilise Ghostscript's -dPDFSETTINGS=/ebook compression, so I added that to the command.


Which TeX distribution? (Undefined control sequence)

(FYI I am new to LaTeX)  I'm trying to compile a TeX document that someone else has given me. I had BasicTex installed, and it didn't seem to work. My friend said he uses TeX Live, so I tried installing that but I get the same error after typing pdftex document.tex:  ! Undefined control sequence. l.1 \documentclass                   [final,hyperref={pdfpagelabels=false}]{beamer}   I'm guessing that means the distribution I have installed does not support this tag, is that right?  How can I find out which distribution I should install?


Case 1: when a player kicks the ball in soccer game  Case 2: When a fast bowler swing the ball in cricket  In both cases the ball makes a curvature. How this happens ? Is there any Law of Physics behind them? Does both the case undergoes same phenomenon?


I need to combine two wires with very light room lighting loads into one breaker in the panel to free up one breaker for another use.  How best to combine the two wires and insert only one into the breaker (since the two can't fit)?


Lambda Explanation and what it is as well as a good example

Can anyone give me a good explanation of how to use Lambda and give a good example. I have seen it but I dont know what it is or does.


How to create partition on single partitioned disk

I have installed ubuntu 12.04 lts I have 500 gb single partitioned hard disk on which this ubuntu is installed  now i want to create two partition  but when I try using gparted it is only showing unmount option(all other options are grey) so how can i do it without losing any data


Adobe Flash Player Installation in Ubuntu 18.04; E: Malformed entry

Please let me know how to install Adobe Flash Player on Ubuntu 18.04 LTS from command prompt. I tried enabling Canonical Partners repository using the following command without any success:  sudo add-apt-repository "deb http://archive.canonical.com/$(lsb_release -sc) partner"   Here is the error message:  E: Malformed entry 53 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read.


Added a new field to user profile, how do I set a value for existing users?

I have added a new field to the user profile on my site (i.e. in /admin/config/people/accounts/fields), a boolean value that can be either 0 or 1. Existing users have no value. How can I easily set a value for all existing users?


How can I avoid having to enter a password for an scp command by hard-coding the password into my script?

I've created a bash script that sometimes need me to enter some information (other machine password / username) when I run it.  Is there a way to prevent this by entering (hard-coding) this information in the code? In this way when I execute it, it will run smoothly without asking me to input anything.  This is the command:  scp /home/machine1/backup/test.txt /home/machine2/backup   Instead of typing the machine2 password, I want to hard code it in my script.


Strict equality and loose equality with logical and operator

Is it considered a bad practice to combine a loose equality check (foo != null) with a strict equality check (bar === true)?  In my opinion, they should both be compared with the strict equality, or both be compared with the loose equality check.  Is there ever a scenario where I would need to have a loose equality check combined with a strict equality check?  Thanks Stackoverflow!   Looking forward to your insight!  const foobar = foo != null && bar === true;   Edit, this question differs from  because, this is particularly on combining a loosely equal comparison with a strict equal comparison. This stack overflow question referenced above is only in conjunction with using one or the other.   I am particularly interested if its ever a valid use case to use both a loose equal, with a strict equal inside a comparison.


Is there advantage on a non-adjacent attack against an unconscious creature?

The unconscious condition states the following two effects (PHB 292):      The creature drops whatever it's holding and falls prone.     Attack rolls against the creature have advantage    Under the prone condition it says (ibid):      An attack roll against the creature has advantage if the attacker is   within 5 feet of the creature. Otherwise, the attack roll has   disadvantage.    The rules of advantage/disadvantage include the following paragraph (PHB 171):      If circumstances cause a roll to have both advantage and disadvantage,   you are considered to have neither of them, and you roll one d20. This   is true even if multiple circumstances impose disadvantage and only   one grants advantage or vice versa. In such a situation, you have   neither advantage nor disadvantage.    The question then is, does one receive advantage for a non-adjacent attack against an unconscious foe?  Are the effects of unconsciousness written to define the condition as it is, or are we meant to "calculate" the full truth by recognizing that the unconscious advantage and prone disadvantage (of non-adjacent attacks) should cancel out?


can't create directories: Error: "You are not the owner so you cannot change this permission"

i wanna  create folder in  one  of  my hard disc partition but  i  can't because I'm not  the  owner. How do I do this?


in my app I get a String from RSS fedd item(tag description)and put it in a ListView but the String looks like this:    I try to remove the tag with this method but doesn't work:  private String refactor(String mess) {         int indexToRemove = mess.lastIndexOf("<strong>");         String toBeReplaced = mess;         if(indexToRemove >= 0 ){              toBeReplaced = mess.substring(0, indexToRemove);         }         int newIndex = toBeReplaced.lastIndexOf("</strong>");         String messFinal = toBeReplaced;         if(newIndex >= 0){             messFinal = toBeReplaced.substring(0, newIndex);         }         return messFinal;     }


Could someone kindly tell me if the following picture illustrate a LaTeX font? If yes, what font is it? It looks like the characters are more dense and thicker (which is what I want) compared to a normal LaTeX font. Thanks in advance.


incremental $R^2$ update at every new sample

I am sampling from a random process $X$ and I would like to calculate $R^2$ for the cumulative sum of the samples: $$x_1,..x_n$$        $$y_n=\sum_0^n x_i$$  $$R^2_n=RSQ( [1,2,...n], [y_1,y_2,..,y_n])$$  The calculation becomes increasingly slow as $n$ grows. Do you know any incremental way to update $R^2$ at every new sample, without recalculating it from the beginning every time?


Which is the direct object and which is the object complement in this sentence?

I was reading a book on English grammar and it stated that the object complement may also be an adjective. In the sentence "Roger called George heartless", Roger was the subject, called was the verb, George was the direct object and heartless is the object complement. But heartless is what receives the verb, and George should be the indirect object. If we change "heartless" to "a moron", we see that moron becomes the direct object while George becomes the indirect object?  Is there something wrong with my reasoning?  Edit: So what I meant when I said heartless is what receives the verb, is that with direct objects, the subject is performing the verb and the verb is performed on the direct object. For example, "You broke the window!". You is the subject, broke is the verb and window is the direct object. In this sentence, window 'receives' the verb.


emacs: open the file which my current cursor position points to

I am wondering does emacs have a command that opens the file where the cursor points to. eg: I have a ASCII file with the following text:  source ../scripts/setup.tcl   I would like to have a command that opens the file ../scripts/setup.tcl when my current cursor position is on one of the characters of the file.


Fascinating (Secret) hat on Stack Overflow

How did I earn the Fascinating (secret) hat on Stack Overflow? There is no clear explanation on the  page for it, just this is a secret hat!


Trying to recall the name of a book I read in the 80's

I read a book or short story where kids did not go to school or read books.  When they reached a certain age they were programmed.  The programming did not work on some kids and they were sent away.  The kids that were sent away were really the smart kids who developed the programming tool for the other kids.  What was the name of that book?


Rewrite rule Mod_Proxy truncate file name

I search online for the solution, but nothing :(.  I write this simple rule  RewriteRule ^(.*)$ http://www.mysite.com/$1 [P,NE,QSA,L]   In mysite.it i have an .htaccess with this rule and it's ok, but if i have a link  " name.html"  the server point to ""  I try many solution but i can't solve.  I try this and many shades of...  RewriteRule ^(.*)(%20)(.*)$ "http://www.mysite.com/$1$3" [P,NE,QSA,L]   Thanks!


Abstract Algebra Resource for Self Study

I am a high school student who is trying to learn abstract algebra. I know that there are many threads on this already but, I have been through them and am stuck. I have been trying to get a good grasp on abstract algebra for close to two years now. Here are some of the sources I have been through:  I started with Rotman Advanced Modern algebra but, ended up having to switch after getting to the section about Galois theory because bunches of details were left out. I tried filing them in but, I ended up confusing myself more.  I went to Knapp's Basic algebra which had many topics about algebra that I wanted to learn about but, ended up having to switch after reading the section about tensor products when details ended up being left out and I was not able to fill them in.  I tried Dummit and Foote which was a really good resource. I ended up getting stuck at the part on rings when I tried to fill in some details which I could not fill in.  I went around a third of the way through Aluffi which was another great resource. However, as with the others, there were details I had to fill in and I ended up only confusing myself trying to fill them in.  I found Sharifi's notes on Abstract algebra to be very comprehensive and detail-oriented in the beginning but just like with the others, there were details to fill in that I could not fill in.  I looked through many of the sources suggested in other threads such as Saunders Maclane, Hernstein, etc. but, I couldn't find a source that was as comprehensive as Dummit Foote or Rotman.   My favorite source of these is the one by Rotman and I am looking for a resource that covers similar topics (I was using the 2nd edition of Rotman for a while. If the third edition is more detail-oriented, please let me know). Does anyone know of an abstract algebra source that is both comprehensive and fills in the details?


Are there limits or costs to Wishing forever for ability score increases?

Are there any drawbacks to using a wish spell to increase ability scores? If not then what would stop players from just using wish repeatedly and raising their ability scores to 30?  I'm just getting back into RPGs with D&D 5e after not playing for years, and I seem to remember this being covered in the editions we played back then.


How can I resize and shrink a BTRFS partition?

I have my /home on a BTRFS partition and I need to shrink it. Unfortunately, Gparted does not have the resize option for this FS. Can I resize it in any other way without losing my data?


Can anyone help me. I have made looping using javascript but i dont know how to redirect after playing all the text animation. Here's my source code.  CSS         JS         HTML
i am.


Adding new classes when user changes type

I posted a similar question yesterday and got some helpful responses but the problem I am having now is slightly different. When the user changes the type on the UI, classes are added to the html elements (this simply adds a blue border around the element). I'm not receiving any error messages but it's just not doing anything.    document.querySelector(DOM.inputType).addEventListener('change', function() {   if (usersInput.type === "Health") {     document.querySelector('.input_type').className += " blue";     document.querySelector('.input_activity').className += " blue";     document.querySelector('.input_time').className += " blue";     document.querySelector('.input_end').className += " blue";     document.querySelector('.input_btn').className += " blue_btn";   } }); .blue {   border: 2px solid blue !important; }  .blue_btn {   color: blue; } <div class="input">   <select class="input_type" id="input_type" name="input_type" style="height:36px" placeholder="Type" required>   </select>   <input class="input_activity" type="text" name="activity" placeholder="What do you need to do?" size="60" style="height:32px" required>   <select class="input_time" name="Time" style="height:36px" required>     <option value="Start">Start</option>   </select>   <select class="input_end" name="end" style="height:36px" required>     <option value="End">End</option>   </select>   <input class="input_btn" type="button" value="Submit!"> </div>     Here is where usersInput comes from:  var usersInput = UICtrl.getInput();   Here is where 'getInpu't comes from:  return {     getInput: function() {         return {             type: document.querySelector(DOMstrings.inputType).value,             activity: document.querySelector(DOMstrings.inputActivity).value,             startTime: document.querySelector(DOMstrings.inputStart).value,             endTime: document.querySelector(DOMstrings.inputEnd).value         };     }, },   These are the options to select from the 'type' drop down menu:  <select class="input_type" id="input_type" name="input_type" style="height:36px" placeholder="Type" required>     <option value="">Type</option>     <option value="health">Health</option>     <option value="work">Work</option>     <option value="leisure">Leisure</option> </select>   Please note, I have checked similar questions on the forum but none that I have found have really answered my question. Thanks in advance for your support!


I am looking for a counterexample to the following claim:      Let $p: E \rightarrow B$ be a fiber bundle, then $p$ is an open map.   This is true when $E \simeq F \times B$ where $F$ is the fiber and $p$ is the projection onto the second coordinate. It is also true when $p$ is a covering map. However, I do not believe it is true without any further assumptions.   A proof of the claim for covering spaces can be found . It explicitely uses the fact that for some $x \in B$ there is a neighborhood $V$ s.t. $p^{-1}(V)$ is a disjoint union of open sets, each of which homeo to $V$. So I doubt this can be adapted for the general case of a fibre product.   It also does not help that most examples of fiber bundles I work with a covering maps, so there may very well be a very simple example that I just don't see.  Thank you in advance for your help.


Is there some extension to add color labels to the file manager? I use Ubuntu 18.04 LTS

I'd like to label files with colors, like in the MacOs. I run Ubuntu 18.04.


When I run ls -l there are files listed with @ file mod for some folders:  drwxr-xr-x   5 root  admin      170 Sep  4 13:51 Users drwxrwxrwt@  3 root  admin      102 Sep  5 09:02 Volumes   I realized that the folders with @ sign can not be displayed in Finder. Can somebody tell me what is the @ sign for and how i can remove it?


Someone has hacked my Facebook account and changed the password and I couldn't reset it following the regular steps.  Few days later, Facebook let me log in to my account but I'm not able to change my password since I don't know the old one now. What can I do?


I am just about to start an OS course and as an Apple user I am not very familiar with the underlying details of Windows OS. I was wondering, is MS DOS still used with Windows running on top or is ONLY Windows used now as the OS? I was a little confused because I read somewhere that MS-DOS is used for booting but Windows has all other OS capabilities built into it and thus is used for all other OS operations...


I've been using Ubuntu 16 and yesterday it was taking too much time to boot. So I forced restart it by pressing and holding the power button. Later when I tried to boot it,it's "Unable to mount root fs on unknown-block(0,0) How can I fix this without losing my data?


I just came across this problem while studying the Euler-Totient function :  Find all integers such that $\phi(n)$ = $n$/2.  Now,  I know that $\phi(n)$ gives the count of the total number of positive integers upto $n$ that are relatively prime to $n$. But I have no clue how to go about solving this question.


Blender renders plane in distorted way when enabling displacement only vs. bump displacement

I'm trying to use a plane with an image texture to render a topographic map of the US. When I add a subdivision modifier and use a Bump Only surface displacement, I have a fine looking map:  When I try to use Displacement Only, however, I get this much less fun looking thing:  Is there a reason for this, and if so, what can I do to avoid it? Here's my set of settings for reference:


Google Sheets split by " ," & add new rows

This is an example:   I need to split by "  , " in a new row and duplicate the others The desired output on a new sheet:


Why can't I use string.Empty as an optional parameter contrary to empty quotation marks?

I'm refining my code and noticed that at some places I had optional parameters with the default value of an empty string. I changed that to a default value from the class for empty string and guess what! Apparently there's a difference between empty quotation marks and string.Empty. What the duck?! (typo intended)  private void Khaboom(String parameter = "") { ... }  private void Bazinga(String parameter = String.Empty) { ... }   Can someone explain to me why the duck does Khaboom work while Bazinga doesn't?!  The error message whines this:      Default parameter value for 'parameter' must be a compile-time constant.    Well... It is!


While modelling hand of Lego man, i found something really weird.  The cylinder i created in it contained all the vertices of the individual circle loops things inside it(At least that's what it looked like,see in the image)    But in the object mode, i see disconnected loops in that cylinder like shown in the image below. I'm not really sure why that is happening, and after messing around for a while i decided to ask it here.Thanks.


If $y = \sqrt{x + \sqrt{x+\sqrt{x+\ldots}}}$ prove that $\frac{dy}{dx}=\frac{1}{2y-1}$

If $$y = \sqrt{x + \sqrt{x+\sqrt{x+\ldots}}}$$  prove that $$\frac{dy}{dx}=\frac{1}{2y-1}$$  Please help me to solve this problem.


Prove by contradiction (not using a calculator) that $\sqrt6 + \sqrt2 < \sqrt{15}$?

Prove by contradiction (not using a calculator) that $\sqrt6 + \sqrt2 < \sqrt{15}$.   How do you approach such a problem?  I need to admit that I'm completely new to proof writing and I have completely no experience in answering that kind of questions. I tried to square it as I read online but I'm stuck with having $\sqrt3$ and not knowing how to get rid of it to have the answer as clear as the sun. squaring them yielded: $(\sqrt2 + \sqrt6)^2 =  8 + 4\sqrt3 < 15$ which indeed holds but the problem is that I am not allowed to use calculator to check the little difference.  My final answer was $4\sqrt3 < 7$.


I want to test if two observations of nominal data accord to the same distribution. I am using the chi squared statistics to perform a  and normalize the result with Cramer's $\phi$.  Unfortunately, all the examples for performing a chi squared homogeneity test I could find (e.g. ) perform the test with two one-dimensional observations. The example after the link above, for example, compares boys and girls dependent on their viewing preferences. This makes two observations in the form $[x_0, \ldots, x_n]$. However, I want to test observations in the form $[[x_0, \ldots, x_n], \ldots, [z_0, ..., z_m]]$. I don't know, if "multidimensional" is the right term in this context. I figured it might be.  Could you explain to me, how a chi squared homogeneity test can be performed with multi-row observations? I know it works, because scipy provides unique values for two dimensional input lists.  import scipy.stats as sps observation1 = [[95, 31, 20], [70, 29, 18]] observation2 = [[21, 69, 98], [54, 35, 11]] data = [observation1, observation2] print sps.chi2_contingency(data)   The code above yields (159.18016188570166, 4.772222443744986e-31, 7, array([[[ 69.44008748, 47.45072645, 42.53205358], [ 45.11526642, 30.82876539, 27.63310068]], [[ 76.04085626, 51.96125177, 46.57502446], [ 49.40378984, 33.75925639, 30.25982128]]])) where the first value is chi squared. Flattening the observations yields different values, so there must be a difference.  How do you calculate $\chi^2$ for determining the homogeneity of multidimensional observations? Please note that I know how to calculate $\chi^2$ on a multi-row contingency table. Instead I want to know how to perform a for the homogeneity of two contingency tables.  Example:  Table 1                                   Table 2         outcome0 outcome1 outcome2 sum                outcome0 outcome1 outcome2 action0       95       31       20 146        action0       21       69       98 action1       70       29       18 117        action1       54       35       11     sum      165       60       38 263   Question: Are these observations following the same distribution?  Scipy allows to determine the expected values (and $\chi^2 $) of multi-dimensional observations. The expected values are returned as the last element of its call:  Expected table 1                      Expected table 2         outcome0 outcome1 outcome2            outcome0 outcome1 outcome2 action0    69.44    47.45    42.53    action0    76.04    51.96    46.58 action1    45.12    30.83    27.63    action1    49.40    33.76    30.26   The sum of the squared differences, divided by the expected value, yields the $\chi^2$ value. Note, however, that the expected tables are not just the expected values from each individual table (quick proof for the first cell of table 1: $\frac{146 \cdot 165}{263} = 91.60$). Instead their calculation seems to be somehow dependent on each other.  I'd like to know how the expected values depend on each other, so that I can calculate it myself.


Why GRUB is in 2 different locations (/etc/default & /boot)?

First of all I am very new to Linux and I might sound stupid. I am having difficulties to understand in Ubuntu why GRUB is in two different locations: /etc/default/grub  and also /boot/grub. In order to make changes, which .cfg file should I edit /etc or the /boot one? Also what are the purpose to put GRUB in 2 different directories? Thanks in advance.


How to export installed device driver on Windows 7 for later use?

I see myself confronted with an unusual problem:  I own a laptop which was (past) served with an installed initial disk image with all the required drives already installed on it. Within the installed initial disk image was a proprietary device driver. Also a tool to create recovery DVDs. So until here a common "modern" setup like most laptop manufacturers use today.  The issue is that both the recovery DVD created from the tool and recovery DVD ordered from the manufacturer does not contain the one device driver which I need in order to use the device.  After 5 unsuccessful "repairs" (replacing the totally intact/working device) the manufacturer finally replaced the whole laptop so I do have the required device driver again pre-installed (initial disk image) on my laptop.  Off course I could just make a backup of the image but there is a catch... It is an old Windows 7 image. And there are several factors that requires me to perform a clean installation of the operating system (Windows 10). You may point out that I also do not have the other device drivers in this case but those are available for download on the download website of the laptop manufacturer. All the other drivers but not the one in question. The laptop manufacturer and the device manufacturer both refuses to send me the required device driver.  So: How to extract an pre-installed device driver on Windows 7 to use/install it on Windows 10 after clean install. The driver itself works great on Windows 10 (verified via Windows 7 to 10 upgrade process).


Can I use #14 wire pigtails on a 20A circuits?

I’ve used 12 gauge wire and 20 amp breakers in my basement.  They go into a shallow box and the 12 gauge is difficult to work with.  Can I drop to 14 gauge in the receptacle boxes and pigtail the connection ?


In the paper Batch Normalization: Accelerating Deep Network Training b y Reducing Internal Covariate Shift () Before explaining the process of batch normalization the paper tries to explain the issues related with (I am not getting what the exact issue addressed here is).  excerpt from section 2, para 2:     We could consider whitening activations at every training   step or at some interval, either by modifying the   network directly or by changing the parameters of the   optimization algorithm to depend on the network activation   values (Wiesler et al., 2014; Raiko et al., 2012;   Povey et al., 2014; Desjardins & Kavukcuoglu). However,   if these modifications are interspersed with the optimization   steps, then the gradient descent step may attempt   to update the parameters in a way that requires   the normalization to be updated, which reduces the effect   of the gradient step. For example, consider a layer   with the input u that adds the learned bias $b$, and normalizes   the result by subtracting the mean of the activation   computed over the training data: $\hat x= x − E[x]$ where   $x = u + b, X = {x_{1...N}}$ is the set of values of $x$ over   the training set, and $E[x] = \frac 1 N(\sum_{i=1}^nx_i)$   .       If a gradient   descent step ignores the dependence of E[x] on b, then it   will update $b ← b + ∆b$, where $∆b ∝ −\partial l/\partial\hat x$. Then   $$u + (b + ∆b) − E[u + (b + ∆b)] = u + b − E[u + b] \tag 1$$.      Thus, the combination of the update to b and subsequent   change in normalization led to no change in the output   of the layer nor, consequently, the loss. As the training   continues, b will grow indefinitely while the loss remains   fixed. This problem can get worse if the normalization not   only centers but also scales the activations.   here is my understanding of the literature:   We have a batch of size N (One training batch) Let there be two arbitrary hidden layer connected to each other (L1 and L2) connected by parameters $W$ and $b$ output coming out of L1 is x1  $u = x1W$ (this is where the literature above starts. dimension of u is MxN)(M is the number of units in L2) $x = u+b$ (dimension b = dimension x = dimension u = MxN) Now before feeding x into L2 we centre it by subtracting the mean of $x$ from each entry in $x$ ($\hat x= x − E[x]$) We compute the loss and backpropogate the gradient and update just this layer's $b$ in order to give it a sanity test. New $b$ = $b + \Delta b$ We run it again on the same batch with updated $b$ repeat 3 and 4 $x_{new} = u+b + \Delta b$ (dimension b, $\Delta b$ = dimension x = dimension u = MxN) Now before feeding x into L2 we centre it by subtracting the mean of $x$ from each entry in $x$ ($\hat x = x + \Delta b − E[x + \Delta b] = x - E[x]$). which is the same as what was calculated before updating b and hence updating b had to effect on the training   My question is with this part of the excerpt:  "If a gradient descent step ignores the dependence of E[x] on b, then it will update $b ← b + ∆b$, where $∆b ∝ −\partial l/\partial\hat x$. Then $$u + (b + ∆b) − E[u + (b + ∆b)] = u + b − E[u + b] \tag 1$$."  Why is   " $$u + (b + ∆b) − E[u + (b + ∆b)] = u + b − E[u + b] \tag 1$$." dependent upon what comes before it? What is even the point of that bit? Please also note the useage of word "Then" (made bold) implying the statement necessarily draws causality from what comes before


So I was wondering if manipulating differential as fraction is fine.In Physics problems ,usually, what I see is if we have equations of magnetic field ,we consider a magnetic field caused by a small length dl and the magnetic field is dB and integrating over the whole length.it seems we are treating dB as a infintesimal quantity.However ,after browsing for a while,the answer is that the notation dy/dx is not a infintesimal quantity but rather an operation on the function y.I am confused as to how it is valid in physics to treat it as infintesimal quantities.(After learning it,my notion for physics just got crushed and am now confused).I have not learned multivariable calculus yet,but from the arguments I've read ,I found that interpreting them as fractions does not work anymore.But it seems it works fine when in 2 dimensions.In mechanics when we derive equation for rocket motion (ejecting mass) we interpret differential as small quantities (dm) and divide by small time dt.Sorry for the long story... I am confused right now  TL:DR : In physics ,dy/dx can be operated as if it was a small quantity divided by small quantity,though from what I've read it is not supposed to be a ratio.  When does interpreting them work and when does it not. Any help would be very much appreciated ...


At what saltiness will water simply pass through us?

If water has a low salt content, it hydrates us. When water has too high salt concentration, like sea water, it drains water out of us instead when we drink it. At what salt concentration would water leave us completely unaffected?


When I tried to install Ubuntu by using a flashdrive on windows, I didn't get a dual installation option. I could either replace windows, or click something else. So I clicked something else, and made the partitions. However when I tried restarting the computer wouldn't load Ubuntu. It was just stuck on a black screen. So when I did a hard shutdown and restart, it took me back to the original installations screen. When I ran through all the steps again, I got the option of replacing Ubuntu with Ubuntu. I tried that and got the same results. Came back to the installation screen. I decides to try installing Ubuntu alongside Ubuntu. That didn't work either. Now the only options are too delete everything on the hard drive and install Ubuntu or something else. So now I have two copies of Ubuntu and (hopefully) one copy of windows. How can I get both of them (one of each) to run on the same machine from this point.


I have 12 rocks, all have the same weight except for one rock, but I don‘t know which rock is. How do I know which rock is different from other, and also know that rock heavier or lighter, with maximum 3 comparating steps. My only tool is just a balance that can only compare the weight between the rocks.


I have encoded the roads based on the column Fclass as an example of "international, primary, secondary, sub" Can I specify the scale range for each encoding on the same layer without exporting them to multiple layers?


Plausibility of black hole in center of galaxy (apparent paradox?)

Reading a question on the Worldbuilding SE site a minute ago about a trip to the other side of the galaxy flying by the supermassive black hole in the center of our galaxy, my immediate first thought was: "How silly, how do you plan flying by close and ever again escaping, that's not just some black hole, it's a black hole strong enough to hold together an entire galaxy".  Which led me to say: "Oh, wait a moment...", and here comes the question: Is it (and if it is, how?), from everyday observation, plausible that there is indeed any such thing as Sgr A* at the center of our galaxy at all?  Earth rotates around itself and around the sun, and the sun orbits the center of the galaxy, in some kinda-elliptical but not alltogether trivial way. This means that I (and every object on Earth) rotate in some kind of semi-chaotic way, facing in every possible direction now and then. Inevitably, while standing on Earth's surface I will face "towards" the center of the galaxy at some point, and "away from" it at other times.  Now, that means one day the black hole's gravitation (which is strong enough to hold together a galaxy, so it is not as trivial as e.g. the Moon's or Mars' gravitation) would add to Earth's gravitation, and on another day it would pull the opposite way.  In other words, the weight of a constant-mass object should be very observably different on different days. That's apparently not the case, or someone would have wondered during the last couple of hundred years. What now?


Is gravitational attraction increased by relativistic mass as well as rest mass?   If so what would happen if an observer travelled at relativistic speeds? Would it appear to him that the whole universe had acquired a greater mass as it was moving at relativistic speed towards or away from him and hence start accelerating towards him under greater gravitational attraction?   Similarly would it mean that the universe was suddenly hugely more energetic that it was before with much higher balancing gravitational potential?


Meaning in context - "if not where that curiosity comes from,at least how you can best satisfy it"

It seems that basic nosiness is a natural part of the human condition. If it weren’t, why would people watch the endless string of reality shows on TV? Peering into the lives of others seems to satisfy a deep yearning, if not just idle curiosity. It’s perhaps for this reason that so many of us enjoy chatting with strangers when we’re thrust together by circumstance. Whether on line in the supermarket, waiting in a waiting room, or sitting next to a fellow passenger, it seems almost endemic for someone to initiate a conversation. New research shows, if not where that curiosity comes from, at least how you can best satisfy it.   What does “if not where that curiosity comes from,at least how you can best satisfy it”mean?


Suppose a spring with spring constant 1 N m^-1 is held horizontally. If a pull of 1 N is applied to its left end and a pull of 2 N is applied to its right end, how much longer would the spring be as compared to its unstretched length?  I came up with this question because the spring related qurstions I've seen all have one end fixed some where. I am totally stuck on this one and I really have no idea where to start.   All I can figure out is that the spring will accelerate due to a net force. It seems inappropriate to be taking net forces, since pulling both ends with a larger force makes the spring more elongated.  P.S. this is not homework


Remove duplicate polygons in a single layer using ogr2ogr?

I have a spatialite database file containing buildings within a country as multipolygons. While trying to use QGIS to delete these duplicate features, QGIS keeps on crashing due to the millions of buildings within the layer. So I am trying to find an command line solution using ogr2ogr but cannot find any info. What would be the syntax to do such a task?


C++ objects passed (by value) to a vector are ignoring function overwriting

First of all sorry if this is a silly question. And also, sorry if this is a duplicate, I could not find any questions like this one. So, I have a class B that is inheriting from a class A, this class A has a virtual void foo() function which I am overwriting in B with void foo() override. When I try to to run foo() from a B object I get the expected B output. However, if I add a B object to a vector and then try to run foo() I get the A output. This might be a bit confusing so I wrote a little script that replicates the problem. #include <iostream> #include <vector>  class A { public:     virtual void foo()     {         std::cout << "This is the A class!" << '\n';     } };  class B : public A { public:     void foo() override     {         std::cout << "This is the B class!" << '\n';     } };  std::vector<A> vec;  int main() {     B b;     vec.push_back(b);      b.foo();      // Prints B     vec[0].foo(); // Prints A. I want it to print B.      // Overwritten functions     // apparently ignored.     return 0; }  Is there a way for me to get the B output when the B object is in a vector?


Where should I use interface as variable type? I see a lot of people say it's best practice to do so, but every example refers to collections:  List<String> list = new ArrayList<>()   Does this practice apply mostly to collections? I never saw anyone use interface when declaring i/o streams for example.


Proof of $\frac{(n-1)S^2}{\sigma^2} \sim \chi^2_{n-1}$

It's a standard result that given $X_1,\cdots ,X_n $ random sample from $N(\mu,\sigma^2)$, the random variable $$\frac{(n-1)S^2}{\sigma^2}$$ has a chi-square distribution with $(n-1)$ degrees of freedom, where $$S^2=\frac{1}{n-1}\sum^{n}_{i=1}(X_i-\bar{X})^2.$$ I would like help in proving the above result. Thanks.


Do Wine Viruses only work while Wine is running?

I heard Linux can get viruses through Wine,and I was curious if the viruses work only while Wine is running.  In other words, could I stop a virus from doing it's thing by just quitting Wine?


EDIT: Background: I need to (lin) scale a big dataset to e.g [0,10]. Outliers (in example below 1 and 10000 get (non lin) mapped to resp 0 and 10, the rest (50,51 in this case) is scaled over 0 to 10 The goal is to catch as much as numbers in this range. If I do not protect myself against very large/small outliers all other values will be mapped to a very small range if that happens.   Assume I have a big dataset (million numbers), and I want the smallest range without outliers.  So e.g. I have:  $$x=[1,1,50,50,50,50,50,50,50,50,51,51,51,51,10000,10000]$$  I am looking for "the smallest range which include the maximum number of numbers", so that I am looking for an algorithm which finds $50$ (lower bound) and $51$ (upper bound) in this case.  My question:   What is the statistical term or name of this kind of questions? How can I solve this? (For academics) are there any papers/researchers who wrote about different possibilities about solving this.    My ideas:  So my initial idea was: range = [average/mean $\pm$ $1$ or $2$ standard deviations)  $$\matrix{\text{mean}(x) &=& 1287\\ \text{std}(x) &=& 3292\\ \text{mean}(x) - \text{std}(x) &=& -2005}$$  So that is not a solution, so second thought:  $$\text{median}(x) - \text{std}(x)  = -3242$$  So that also does not help.


footer {   font-family: arial;   bottom: 0;   position: absolute;   color: #fff;   width: 100%;   background-color: #2E6171;   text-align: center;   padding: 15px 0;   -webkit-box-shadow: 0px -10px 40px -3px rgba(0,0,0,0.75);   -moz-box-shadow: 0px -10px 40px -3px rgba(0,0,0,0.75);   box-shadow: 0px -10px 40px -3px rgba(0,0,0,0.75);   letter-spacing: 1px; }   I want my footer to stick to the bottom on the page and right now it its on fullscreen because everything fits in one vieuwport but when i resize my window smaller and i have to scroll to see everything the footer is stuck in the middle of the page


Is there any tool available to sync files between two or more linux servers immediately after writing the file in the disk? The rsync command does not suit me on this, because if I set rsync in cron, the minimum time I can set is 1 minute, but I need it on real-time basis.


Folders Of External Hard Drive being are behaved like Protected Operating system Files

Some days ago I mounted my External Hard Drive to the Friend's Laptop (WinXP), Then all Folders on the Hard's root have been hidden (on all Windows Versions).therefore to access them you should know their exact address and type in address bar OR make hidden folders visible by change default settings in folder options like below image.    Any Other Hard Drive or flash disk that mounted to that laptop have been same condition. So I scanned whole of the Drive by an Updated Anti-malware (Kaspersky Internet Security) but no threats infected.  Did a malicious cause that? How to Back to previous state?


Protons and Neutrons Overshoot Actual Mass?

When I add up the mass of 6 protons and 6 neutrons in amu, I get a mass that is greater than the mass of carbon. I thought that it should be the other way around, because I have not including binding energy when I add up the mass of the protons and neutrons.  Proton: 1.007276466812 u  Neutron: 1.00866491600 u  6(1.007276466812)+6(1.00866491600)=12.099  Carbon: 12 u  Why is this so?


Looking for a short story about a woman who is the keeper for a "witch" man

This was in the alternate universe/fantasy/horror genre.  It was set in somewhere like Appalachia.  The premise was that there were men with supernatural powers who were essentially sociopathic and needed to be controlled. The villages used their powers, but they each had a "keeper" who essentially controlled access to them and their powers.    In this story, the keeper of one of these witch men was dying of an incurable disease.  The story is told from her point of view.


What is the difference between matter & spacetime?

If the universe is expanding why doesn't the matter in it expand proportionally making it seem as if the universe is static?  Alternatively, as spacetime expands why does it not just slide past matter leaving matter unmoved?  What anchors the matter to a particular point in spacetime?