struct Buffer{     int* p;     unsigned n;     mutable std::string toString;      mutable bool toStringDirty;     Buffer (void); // implement it with correct initialization      Buffer (unsigned m, int val = 0); // inits with m ints with val     Buffer (const Buffer& a) {     Buffer::Buffer();     if (a.n) {          unsigned m = (n = a.n) * sizeof(int);          memcpy(p = (int*) malloc(m), a.p, m);     }     toString = a.toString;     toStringDirty = a.toStringDirty;     Buffer (const Buffer&&);     int& operator[](unsigned i);     const Buffer& operator=(const Buffer&&);     const Buffer& operator=(const Buffer&);     const Buffer& operator=(int val); //sets all with val     const Buffer operator+(const Buffer& a) const; // concatenates     // appends ‘a.first’ ints with an ‘a.second’ value     const Buffer operator+(const std::pair<unsigned,int>& a) const;     const Buffer operator-(unsigned m) const; // drops m ints at end     // converts to string with caching support, format as [%d] per integer     const std::string ToString (void) const;  };   I was given this struct to convert to a Buffer class. Any do's and dont's cuz this the first time ever i have encountered this problem? any advice would be appreciated. I know i have to use the right encapsulation as well as some move constructors. any advice? thank you.


I executed sudo chmod -rwx /  To my surprise, all the icons on the dock vanished and all the commands (from man to sudo) are now unrecognised or not found.  The system had only one user.  We shut down the system and tried to login via tty2. The screen runs on a loop.   We are not able to see the normal login screen when We tried boot it up either.  Is there anything that we could do?


System requirements for installing kubuntu 14.04

What are the minimum system requirements for installing kubuntu 14.04 LTS?


My Model is not rendering after adding hair !! The uploading BVH value goes to 100 % and the blender program closes

There maybe some possible outcomes .. i rendered it succcessfully without adding the particle system : hair !!


What must be the simplest proof of the sum of first $n$ natural numbers?

I was studying sequence and series and used the formula many times $$1+2+3+\cdots +n=\frac{n(n+1)}{2}$$ I want its proof.  Thanks for any help.


How to prove $\sum_{k\leq n}^{n} \binom{n}{k}= 2^n$ by induction

$\sum_{k\leq n}^{n} \binom{n}{k}= 2^n    , n, k \in  \mathbb{N}$  Im trying with mathematical induction but im stuck.  My inductive step:  $H) \sum_{k=0}^{h} \binom{h}{k}= 2^h$  $T) \sum_{k=0}^{h+1} \binom{h+1}{k}= 2^{h+1}$  For the demo:  $\sum_{k=0}^{h+1} \binom{h+1}{k} \Rightarrow \sum_{k=0}^{h} \binom{h}{k} + \sum_{k=0}^{h} \binom{h}{k-1}$  Where i can use the hypothesis in the first term, but dont know how to continue.


Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?

new finding by Minev et al. seems to suggest that transitions between atomic states are not instantaneous, but continuous processes wherein a superposition smoothly adjusts from favoring one state to another (if I understand it correctly). The authors also claim to be able to catch a system "mid-jump" and reverse it. Popular articles are  and .  I am curious if this finding rules out any interpretations of QM. It seems to generally go against the Copenhagen attitude, which describes measurements as collapsing physical systems into a definite classical state. The popular articles indeed claim that the founders of QM would have been surprised by the new finding.  The link with the asterisk mentions that something called "quantum trajectories theory" predicts what was observed. Is this an interpretation, or a theory? And are they implying that other interpretations/theories don't work?


Unable to access location: Not authorized to perform operation

In Ubuntu 18, this error is caused by Chrome Remote Desktop. The solution is:  Stop the Chrome Remote Desktop Service: (use terminal)  /opt/google/chrome-remote-desktop/chrome-remote-desktop --stop Open all external disks, that logo appears  Start again the Chrome remote desktop service:  /opt/google/chrome-remote-desktop/chrome-remote-desktop --start  I think you have to do this after each reboot.


thank you very much for your time! I am currently working on a neuroimaging study comparing lateralization indexes between the two hemispheres in three different groups. I have 4 lateralisation indexes (two different independent parameters for two different fiber tracts) and am now wondering whether it's better to use MANOVA or repeated-measures ANOVA. In the literature I found some studies looking for differences in diverse lateralization indexes via repeated measures ANOVA but I am not quite sure if this is the correct approach since the two indexes are independent and are not describing the same fiber tract.  Thank you very much for your help in this matter!


Loop through pages with specific template

I would like to know how I can loop through pages with a specific template name. I have several pages where the admin can select a template name of SALE. I want to display all content with this template name via the loop.   Any ideas are much appreciated!


ideal behind Maximal ideals are Prime ideals

In a set of old lecture notes, I came across this corollary:  Corollary: Any maximal ideal is a prime ideal.  While I do not have the proof for this, what immediately comes to mind is whether this corollary is predicated on the fact that...  Theorem: For any commutative ring $R$ and ideal $A$, $R/A$ is an integral domain iff $A$ is a prime ideal Theorem: For any commutative ring $R$ and ideal $A$, $R/A$ is an field iff $A$ is a maximal ideal  Recall: Any finite integral domain is a field. So, from the two theorem above, we can reconcile the fact that a maximal ideal is a prime ideal (and vice versa) on the supposition that the integral domain in question is finite. Or is there another proof for the claims in my notes?


I want to make a Java program that takes date as input and generates another date based on number of dates I will add

I want to make a java program that takes dates as input and generate another date based on the number of days I will add.  eg:      input date 23/4/2018     number of days: 10      output date: 3/5/2018


I have to show that for any $b >1$, we have  $$ b^n > n$$ for all $n$ sufficiently large, using only very basic analysis (no calculus). My attempt is as follows.    We know that $b^{n+1} - b^n = b^n(b-1)$. For $n$ sufficiently large, say $$n \geq N = \left\lceil \frac{\ln(2/(b-1))}{\ln b} \right\rceil + 1,$$ we have  $$ b^{n+1} - b^n > 2.$$  Now let $\Delta = N - b^N$. Then for any $j\geq 1$, we have  $$ b^{N+j} = (b^{N+j} - b^{N+j-1}) + \ldots + (b^{N+1} - b^N) + b^N > 2j + b^N = 2j + N - \Delta = N+j + (j - \Delta).$$ Thus we have $b^n > n$ for any $n \geq N + |\Delta|$.    This works, but it  seems messy. Is there is better way? I know induction is usual for this type of problem, but establishing the base case for generic $b$ seems difficult.


Stack Exchange & Area 51 sign up/ log in update

As of today,  and  no longer have separate login and signup pages. When you log in or sign up on either site you will be sent  through meta.stackexchange.com flow. Currently,  is still on the internet, but we are in the process of completely removing it.  As a part of our removal of OpenID. Learn more here:


Detect whether a swap partition is in use by a hibernated system

Is there a way to detect whether a swap partition contains the memory of a hibernated system?  More specifically: suppose I have a Linux installation and that I hibernate it. This means that all the content of the RAM is dumped on the swap partition and then the computer is shut down.  Suppose that in the meantime I start another Linux on the same system (either because it resides on another partition, or because I use a live system). If I used the same swap partition, that would corrupt the data of the hibernated system, and I do not want that. So I would like to be able to tell whether a swap partition is keeping "interesting" data or just leftovers of a properly shut down system.  Is there a way to distinguish between these two cases just by looking to the content of the partition?  I am not asking whether data become corrupted or not. I am sure they will. I am asking if there is a way to detect whether the swap I would like to use contains data of an hibernated system, so that I can avoid turning it on if it does.


What is the equivalent of 'Control-Alt-Delete'?

On Windows anytime the system hangs Ctrl-Alt-Del brings up the Start Up Manager, from which you can end the program or process causing the hang.  Is there any command like this on Ubuntu?


Minecraft Server| When I try to join my minecraft server using direct connect, why do I get an error?

Essentially, I've set up a minecraft server but I am unable to join my own because I get the error: io.netty.channed.AbstractChannel$AnnotatedConnectException: Connection refused: no further information Here are some of the things I've done:  connected with direct connect with only my IP connected with direct connect with my IP and port allowed the firewall to give access to javaw  I have seen another question similar to this but the comments/replies didn't make sense to me at all Any help is appreciated


Detecting checkbox status change with jQuery on checkboxes created via javascript

I'm receiving this html code via Ajax in the variable data. It contains , which are basically checkboxes:
<input class="custom-control-input" type="checkbox" value="3" name="details[]" id="control_id_detail_3">S

<input class="custom-control-input" type="checkbox" value="4" name="details[]" id="control_id_detail_4">M

<input class="custom-control-input" type="checkbox" value="5" name="details[]" id="control_id_detail_5">L

<input class="custom-control-input" type="checkbox" value="6" name="details[]" id="control_id_detail_6">XL
   Then, I'm adding that html content to a div called #attribute_holder with:  $('#attribute_holder').html(data);   So at the end, I have this code:

<input class="custom-control-input" type="checkbox" value="3" name="details[]" id="control_id_detail_3">S

<input class="custom-control-input" type="checkbox" value="4" name="details[]" id="control_id_detail_4">M

<input class="custom-control-input" type="checkbox" value="5" name="details[]" id="control_id_detail_5">L

<input class="custom-control-input" type="checkbox" value="6" name="details[]" id="control_id_detail_6">XL

   Now, I need to detect via jQuery when the checkboxes change their state. I'm using this code:  $(function(){ $('#attribute_holder input[type="checkbox"]').on('change', function(){     console.log($(this).val() + ' changed state to: ' + $(this).is(':checked')); }); });   This seems to work if the html is already burnt in the html when the page is loaded. But, if I load the same html via ajax, jQuery is not detecting the change event on the checkboxes. What am I missing? Thanks!


Why would a web site hide the log out button?

I have recently observed many sites that do not have a log out button. Either it's not there or hidden somewhere so that you have to find it. Why do you think this has been done? Does it apply to every category of site - for example a social networking site versus a banking site?


Rearrangement of Sequence $\left\{x_n\right\}$

We say that a sequence $\left\{y_n\right\}$ is a rearrangement of a sequence $\left\{x_n\right\}$ if there is a 1-1 correspondence $f : \mathbb{N} \rightarrow \mathbb{N}$ such that $\forall$ $n \in \mathbb{N}$, $y_n = x_{f(n)}$. Suppose $\left\{y_n\right\}$ is a rearrangement of $\left\{x_n\right\}$. Prove that $\left\{y_n\right\} \rightarrow L$ iff $\left\{x_n\right\} \rightarrow L$.   1) How do I prove this ?


What exactly is expanding when they say universe is expanding?

We know that universe is expanding and galaxies are moving away from each other. Does this mean the galaxies are also expanding in itself and therefore I guess growing larger in volume? Depending on the answer of that, does the solar system also expands?


Why particle hole symmetry and chiral symmetry are called symmetries?

$PHP^{-1}=-H$ (particle-hole symmetry) and   $\Gamma H \Gamma^{-1}=-H$ (chiral symmetry)   I understand why we get the negative signs but im just a bit confused as to why such equalities mean $H$ is particle hole and chiral symmetric.   When we say $H$ is symmetric under some operation, like time reversal,  don't we usually mean that $H$ is invariant under the said transformation?  $THT^{-1}=H$ if $H$  is time reversal symmetric.  On the contrary, we say $H$ is symmetric under particle hole and chiral operations when $H$ picks up a negative sign. This seems to contradict our usual convention of what we mean by $H$ being symmetric(invariant).


Can coordinating-conjunctions be omitted from a list?

This is a question I've wondered for a while.  Examples:   I'm drained, confused, frustrated. I'm tired, lonely.   Can "and" be omitted if the sentence retains its clarity?


How to disable drupal empty comments error?

I'm new to drupal. I have created a custom module, where user can post comments for the videos. I have used default comment module in drupal for calidation. ie(modules->comment->comment.module). But on giving a empty comment it is showing validation in a page called (/comments....) let us assume my page is www.drupal.com/videos I want the validation to be shown in the same page.. Plss help  This is the custom code in comment.module   if (empty($comment->cid) && empty($comment->pid)) {   $form['#action'] = url('comment/reply/' .$comment->nid); }    In the url tag i've given my custom url. but it redirects to that page,  but the empty comment error is showing in some other random page every time.


I have created the required buttons,panels and the frame and now i want to add everything where it needs to,but i have to create the .add method using the       getMethod() but i dont now what arguments to use.Also do i have to create different methods for the buttons and the panels or is there something more general?  Class frame = Class.forName(frame_path); Object obj = frame.newInstance(); Method meth = frame.getMethod("setVisible", Boolean.TYPE); Method meth2 = frame.getMethod("setDefaultCloseOperation", Integer.TYPE); meth.invoke(obj, true); meth2.invoke(obj, EXIT_ON_CLOSE);  Class jb1 = Class.forName(rec_button_path); Object objJb1 = jb1.newInstance(); Class jb2 = Class.forName(round_button_path); Object objJb2 = jb2.newInstance(); Class jb3 = Class.forName(rec_button_path); Object objJb3 = jb3.newInstance();  Class jPanel1 = Class.forName(container_path); Object objJP1 = jPanel1.newInstance();             Class jPanel2 = Class.forName(container_path); Object objJP2 = jPanel2.newInstance();  Method add1 = jPanel1.getMethod(".add", jb1);   // i need helpo here


Migration 100 TB of data from SQL Server 2008 to 2016

We are planning to migrate to 100 TB of data from one of our client to new SQL Server environment. We just started receiving information from client. It will take couple of months to complete the project. But, can anyone please provide detail plan for migration such a large number of SQL Servers and data. New environment will have 4 fail-over cluster node at 4 different location.    Current environment: SQL Server 2008 R2 New environment : SQL Server 2014/16


My Nginx does not trust in the certificate my app sends?

I am trying to setup an NGINX server that has SSL and also does client verification. For some reason it's not working. If I try out the certificates between 2 spring boot applications, they work. So certificates are good. I have the following nginx config file: #user  nobody; worker_processes auto;  #pid        logs/nginx.pid;   events {     worker_connections  1024; }   http {     include       mime.types;     default_type  application/octet-stream;       sendfile        on;      keepalive_timeout  65;      server {         listen 443 ssl;                  ssl_certificate D:/nginx/server.cer;         ssl_certificate_key D:/nginx/server.pkcs8;          ssl_verify_client on;         ssl_trusted_certificate D:/nginx/client.cer;         ssl_client_certificate D:/nginx/client.cer;                   server_name localhost;                  location / {                         return 301 https://www.google.com/ ;         }                  location /api/user {             proxy_pass http://localhost:8443/api/user ;         }                  location /api/key {             proxy_pass http://localhost:8443/api/key ;         }                   #error_page  404              /404.html;          # redirect server error pages to the static page /50x.html         #         error_page   500 502 503 504  /50x.html;         location = /50x.html {             root   html;         }     } }  If I change this ssl_verify_client on; to ssl_verify_client off; I get the result I expect. So the rest of the configurations should be fine... I started NGINX today, would like to get some help. Certificates are created by me. No issuer, no certificate chain. Self signed certificates. Thanks in advance.


How to convert multiple rows from a select subquery into a single column in postgres?

I'm trying to take a list of tag rows and add them to a column as a CSV. I thought a subquery would be appropriate for this using string_agg. Below eventstags is a many-to-many table associating tags with their event.  (SELECT string_agg(name, ',') FROM tags WHERE tags.id IN (SELECT eventstags.tags_id WHERE eventstags.events_id = events.id)) AS tags   This appears to only return a single tag, as if it's ignoring all the other tag rows. Any idea how I can get the IN query to be aware of the other rows so that it concatenates the tag names as a CSV column?  I'm using psycopg2 and Postgres 9.5


Capture multiline content between two words in javascript with RegExp

I try to parse something like this in regexp (js)  CODE some stuff which contains even linebreaks END  CODE anothEr block of code END   I want to get all between CODE and END That works with:  /CODE([^(?!END)]*)END/g   The problem is when there is E, N or D somewhere between CODE and END, that's because the second block won't be matched.  So the negative lookahead checks for E, or N or D and not the word "END".  Is there a way for negative lookahead for the whole Word "END" ?  martin


Is there a way to reverse the line order (considering \r\n line break) of a file using Notepad++?  Input:     Line 1   Line 2   Line 3     Required Output:     Line 3   Line 2   Line 1   Any plugin/macro is OK


If $\phi(n)$ is the Euler-totient function, how can I show that $\phi(n) \ge \sqrt{n}$?


How do you bind to an objects method in this scenario in WPF? public class RootObject {     public string Name { get; }      public ObservableCollection<ChildObject> GetChildren() {...} }  public class ChildObject {     public string Name { get; } }  XAML: <TreeView ItemsSource="some list of RootObjects">     <TreeView.Resources>         <HierarchicalDataTemplate DataType="{x:Type data:RootObject}"                                    ItemsSource="???">             <TextBlock Text="{Binding Path=Name}" />         </HierarchicalDataTemplate>         <HierarchicalDataTemplate DataType="{x:Type data:ChildObject}">             <TextBlock Text="{Binding Path=Name}" />         </HierarchicalDataTemplate>     </TreeView.Resources> </TreeView>  Here I want to bind to the GetChildren method on each RootObject of the tree. EDIT Binding to an ObjectDataProvider doesn't seem to work because I'm binding to a list of items, and the ObjectDataProvider needs either a static method, or it creates it's own instance and uses that. For example, using Matt's answer I get:  System.Windows.Data Error: 33 : ObjectDataProvider cannot create object; Type='RootObject'; Error='Wrong parameters for constructor.' System.Windows.Data Error: 34 : ObjectDataProvider: Failure trying to invoke method on type; Method='GetChildren'; Type='RootObject'; Error='The specified member cannot be invoked on target.' TargetException:'System.Reflection.TargetException: Non-static method requires a target.


In an absence of gravity, does time flow faster or slower than on Earth?

I understand from my very limited knowledge of relativity that an object traveling at relativistic speeds essentially experiences the progression of time slow to a crawl. Since, according to , gravity bends spacetime, does that mean that time is also slowed down by large amounts of gravity?  If I were in a place where there was absolutely no gravity in any way shape or form, would I experience time passing more quickly, and if so, by how much?


How do I send a set of file paths to cat and display their contents?

to be more specific ,I want to display contents of files from output of find command,I tried the following commands but they don't get my work done   cat < find . -name "*.txt" find . -name "*.txt" | cat


Can you explain the boot order of an Android device?

I understand a good bit of the ARM system architecture. you have an ARM system on chip containing the CPU, GPU, peripherial devices, baseband processor and both CPU and Radio firmware. Supposedly the application OS is stored on the phone's internal flash memory chip and the bootloader ROM on the chipset firmware boots on top or before the app OS on flash module 0? Is this like a BIOS in a desktop PC?  Or is it that Android itself is stored in this on-chip firmware and the Root disk or Home directory is flash module 0, and it works like a live image booting from a CD or ROM?  What is the first thing to load in a. Android phone/tablet? Where is the main OS stored and where is the recovery bootloader stored? What about the radio firmware for phones?  When a phone boots, what is the animated splash screen and music tone played? Why does that flash video/animation always show the manuacturer logo screen, and then the Android OS video?


Give an example of a function $f:\mathbb{R}^2 \mapsto \mathbb{R}^2$ such that $f(av) = af(v)$ for all $a \in \mathbb{R}$ and all $v \in \mathbb{R}^2$ but $f$ is not linear.   Basically, we need to find a function that adheres to the linear property of Homogeneity (closure under scalar multiplication) but not the linear property of Additivity (closure under vector addition). I'm having difficulties coming up with such a function as I can't find one that has the homogeneity property but not the Additivity property. I've tried polynomials in $P(\mathbb{R^2})$, trigonometric functions, etc. and none of them seem to work. My other guess is a piecewise function, but I'm not entirely sure.


Why does the Earth not fall towards the Sun?

According to  , the earth does not fall down because of the gravitational force of the sun.   At the same time , earth's repulsive force , acts as a resistance to the gravitational force of the sun.   This theory is not satisfying because it doesn't hold good for mercury.   Mercury's mass is negligible when compared to sun.  So sun should have swallowed mercury already.  Is there a better theory to why the earth doesn't fall.


array.sort() does not work in IE 11 with compareFunction

I'm sorting an array following . When I use a compareFunction parameter, Internet Explorer 11 is not sorting properly.  I have a team array with players. These players have names:  var team = [   {name:"Waldo"},    {name:"Sarah"}   ];   But I want to display them at the stadium video board sort by alphabetical order. So I have a list to append them when the DOM is ready:  MyHtml
My Team after sorting
       <button onclick='sortAndDisplay()'>Click here to sort by Name</button>

   My Javascript code  function sortAndDisplay(){   $("#myTeamAfter").empty();   team.sort(function(a, b){return a.name > b.name;});   for(var i=0; i < team.length; i++){     $("#myTeamAfter").append( "
" + team[i].name + "
" );   } }   Problem is that some Clubs use Internet Explorer 11 at their stadiums, and sort() function when I use my own compareFunction is not working properly on IE11, so Waldo is displayed first than Sarah and the fans are confused.  I've created a  where you can reproduce it:   Firefox 33.1                - Working!! :) Chrome 39.0.2171.65         - Working!! :) Internet Explorer 11.0.9600 - Not Working :(   Any idea to resolve the sort() for every browser?  Thanks!


Oracle SQL - Select for each user the maximum row

I have a table like this:  PROFILE_ID X_START_DATE X_END_DATE   FORMER_EMPLOYER    NEW_EMPLOYER  START_DATE 1          2015-07-20   2016-07-20   GOOGLE             BURGER KING   2017-01-01 1          2003-10-25   2009-01-14   FACEBOOK           BURGER KING   2017-01-01 2          2007-10-04   2008-05-05   MICHAELS           KFC           2017-01-01 2          2008-05-06   2009-05-05   GOOGLE             KFC           2017-01-01 2          2009-05-06   2010-05-05   FACEBOOK           KFC           2017-01-01 3          2007-10-04   2008-05-05   MCDONALDS          BURGER KING   2017-01-01   What I want:  For each PROFILE_ID, I need the row, that contains the latest X_END_DATE. For PROFILE_ID 1 I need row 1 and so on.  When I do:  Select profile_id, max(end_date) group by 1;   I actually get what I want, but not all columns that I need. By taking more columns, I need to use them in my "groupby" statement, which is not what I want.  Thanks!!


Multiplicative inverse of $4x+3$ in the ring $ \mathbb Z_{11}[x]/(x^2+1)$

How to find the multiplicative inverse of $4x+3$ in the ring $ \mathbb Z_{11}[x]/(x^2+1)$?    I understand that any element belonging to the ring $ \mathbb Z_{11}[x]/(x^2+1)$ is of the form $ax+b$ where $a,b \in \mathbb Z_{11}$. How to proceed?


Proof variance of Geometric Distribution

I have a Geometric Distribution, where the stochastic variable $X$ represents the number of failures before the first success.  The distribution function is $P(X=x) = q^x p$ for $x=0,1,2,\ldots$ and $q = 1-p$.  Now, I know the definition of the expected value is: $E[X] = \sum_{i}{x_i p_i}$  So, I proved the expected value of the Geometric Distribution like this:  $E[X]=\sum _{ i=0 }^{ \infty  }{ iP(X=i) } = \sum _{i=0}^{\infty}{i q^i p} = p\sum _{i=0}^{\infty}{i q^i} = pq \sum _{i=0}^{\infty}{iq^{i-1}}$  $\qquad = pq \sum _{i=0}^{\infty}{\frac{d}{dq}q^i} = pq \frac{d}{dq}(\sum _{i=0}^{\infty}{q^i}) = pq \frac{d}{dq}(\frac{1}{1-q})$  $\qquad = pq \frac{1}{(1-q)^2} = \frac{pq}{p^2} = \frac{q}{p}$  So now, I would like to prove that $Var[X] = \frac{q}{p^2}$. I know I have to use a simular trick as above (with the derivation).  $Var[X] = E[X^2] - E[X]^2 = \sum _{i=0}^{\infty}{i^2 q^i p} - (\frac{q}{p})^2 = p \sum _{i=0}^{\infty}{i^2 q^i} - (\frac{q}{p})^2 = pq \sum _{i=0}^{\infty}{i^2 q^{i-1}} - (\frac{q}{p})^2$  $\qquad = pq \sum _{i=0}^{\infty}{\frac{d}{dq}i q^i} - (\frac{q}{p})^2 = pq \frac{d}{dq} \sum _{i=0}^{\infty}{iq^i}-(\frac{q}{p})^2$  Then I'm stuck. How can I get another $q$ out of the sum? Won't it mess up the first derivation?


– Schematic created using   Hi, usual apologies here, total enthusiastic amateur noob, etc.  The situation is: a Common Collector NPN transistor.  Question: Is it okay to omit the resistor R2?  (that is, R2 = 0 Ohms)?  The way I understand it, when the switch is closed, the voltage at the Emitter (as indicated) would be 5V – 0.7V = 4.3V. The reason for that is that both the Collector and the Base are connected directly to 5V, and that VBE must be 0.7 V for silicon-based transistors. Therefore the voltage drop from the Collector to the Emitter will 0.7 V rather than the normal 0.05 to 0.10 V.  But if that is the case, if I want to calculate the value of R2, the total voltage drop is the same, irrespective of whether I calculate it through the loop containing the switch, or going through the transistor form the Collector to the Emitter. Therefore IR = 0 for the Base resistor so that R2 must be 0 Ohms.  Elsewhere I came across the injunction: “Do NOT omit the Base Resistor!” so now I’m uncertain.  (I’m really trying to design a circuit to drive an PWM input to an H-bridge from an Intel Edison, so the above is not my complete circuit – it just crystallises one of the many current conceptual difficulties I have. This particular part has to do with an AND gate, so there will at least be another transistor and a pull-down resistor, and so on.)


I have an older MacBook Pro (Mid 2009) that cannot start and need to reinstall OS X from USB key or disc. With another MacBook I tried to download OS X El Capitan but is not available, only macOS Sierra, but my laptop is too old for macOS Sierra. How can download OS X El Capitan or older version of OS X?


Saturday-night stay for multi-city itineraries

In airline travel, how does Saturday-night stay pricing work for multi-city itineraries?  For a roundtrip booking it is pretty clear what the destination is, but less so for more complicated itineraries. I've been playing with some transatlantic trips in online booking tools and I'm not getting a clear intuitive sense for how this works (i.e. where I need to spend the Sat night to get good pricing).  I mainly fly OneWorld carriers but would be curious to learn how this works for other airlines too.  edit: In the comments there appears to be some doubt about whether Sat night stay is still a thing, but I see this sort of price graph all the time (maybe it's an international/transatlantic/OneWorld thing?):    Here is a direct copy-and-paste from britishairways.com for a booking I'm looking at right now:    "first sun after arrival at turnaround" — how do they define "turnaround" if it's a multi-city trip?


Show that the set of all $x$ such that $x \in P$ and $x \notin Q$ exists

I have to show that set of all $x$ such that $x \in P$ and $x \notin Q$ exists. So, I think I have to assume that sets $P$ and $Q$ already exist. So, with that, I can use  . This axiom is $$ \forall w_1,\cdots, w_n \, \forall A \,\exists B \,\forall x \left( x \in B \Longleftrightarrow [ x \in A \wedge \varphi(x,w_1, \cdots , w_n, A)] \right) $$ So, I will let $\varphi(x, Q, P) = x \in P \text{ and } x \notin Q $. Also, I will let $A = P$ and  $w_1 = Q $. So using universal instantiation, I get the following $$ \exists B \,\forall x \left( x \in B \Longleftrightarrow [ x \in P \wedge \varphi(x, Q, P)] \right) $$ And using, existential instantiation, there exists a set $B$ such that $$ \forall x \left( x \in B \Longleftrightarrow [ x \in P \wedge \varphi(x, Q, P)] \right) $$ Using the definition of $\varphi(x, Q, P)$, this can be simplified as following $$ \forall x \left( x \in B \Longleftrightarrow [ x \in P \wedge x \in P \wedge x \notin Q] \right) $$ $$ \forall x \left( x \in B \Longleftrightarrow [ x \in P \wedge x \notin Q] \right)$$ $$ \forall x \left( x \in B \Longleftrightarrow x \in \{ x \,| x \in P \text{ and } x \notin Q \} \right)$$ Now, using , it will follow that $$ B = \{ x \,| x \in P \text{ and } x \notin Q \}  $$ And, since $B$ exists, this means that $\{ x \,| x \in P \text{ and } x \notin Q \} $ also exists. Is the proof good ?


I am trying to display something like    ó í ö ß   ... basicalliy European alphabet Italy, France, Spain, Portugal, Germany. Should not be too hard.  I load this package \usepackage[utf8]{inputenc}. As far as I know utf-8 contains these characters. But, when I compile, I get     Unicode char not set up for use with latex    And Fórum turns out to be nothing more then a F. Why is that?


I have a folder with ~30 files. The are already BitTorrent metafiles that lack a .torrent suffix. I want to change all those files to .torrent files. How would I do that? In windows it was as easy as typing  ren *.* *.torrent   while being inside the folder with all those files.   I am not sure what the current file extension of those 30 files is.   Appreciate any help!


I have lots of bikes and lots of interesting wheel sizes, I would like to know how to calculate the right spoke lengths for a wheel.  I appreciate that there are probably rather a lot of variables but this is something that has been an issue for me from time to time so being able to work out the right spoke length for an arbitrary wheel (did I mention that I have half a dozen or more different wheel sizes in the garage?) would be useful.  To be clear - I don't want a calculator, I want to know what the sums are.


According to my understanding, and my calculator, cos(90 degrees) equals 0. In my code, I have a function that allows me to type in degrees whenever I need to:  function deg(i) {     return i*Math.PI/180; }   Although, when calling Math.cos(deg(90)); the output I receive is 6.123233995736766e-17.  Why could such a thing possibly happen?  (Please excuse me for my bad English)


I applied for a UK Standard Visitor visa for on 23rd August 2018 at the visa application centre in Mumbai. On the same day, I got an SMS saying The visa application for [GWF reference number] was forwarded to UKVI on 8/23/2018.   I have applied for non-settlement visa that is supposed to be processed within 15 working days. Four of my colleagues applied at the same time and were issed a visa on 8th Sep 2018.   Today I received this notice by email:     NOTIFICATION LETTER TO ADVISE THAT APPLICATION MAY NOT BE PROCESSED WITHIN SERVICE STANDARDS      Your Reference:   UKVI /  GWF      12/09/2018       Dear    Thank you for your UK visa application which has been received and is under consideration.  We aim to process applications:         Non-settlement within 15 working days    Priority Visas within 5 working days    Settlement within 60 working days.         Unfortunately, we will not be able to make a decision on your visa application within these service standards because we require further information to fully assess your application. We will contact you should we require any additional information from you.      Please be assured that we will continue to progress your application to enable a decision to be made as soon as possible. We will notify you by email once a decision has been made.      Please do not go to the visa application centre until you have been advised that your passport is ready for collection.   Anybody got similar email? Did you get the visa? After how many days later you got the visa? Is it sign of refusal?


How do I install LibreOffice 6 in Ubuntu?

LibreOffice 6.0 has been released. How can I install LibreOffice 6 in Ubuntu? What is the official PPA?


SQL SELECT WHERE Columns Data begins and ends with [ ] i.e. [Unchecked]

As the title says im trying to do a select statement in my database to find data that begins and ends with square brackets i.e. [Unchecked]     I've tried the following select query with like but it doesn't seem to be correct...  SELECT * FROM [DB_Table] WHERE [DB_Column] LIKE '[%'   This doesn't seem to get any of the data that starts with [. although if i change the [ to a letter such as A it gets all the data beginning with A.  is it possible to do Like '[%' (beginning with) and '%]' (and ending with)?  This link  is not a duplicate of mine it is completely different.


Hyperbola asymptotes from conic general equation

If I have the coefficients of the following equation:  $$AX^2 + BXY + CY^2 + DX + EY + F = 0$$  And I know it's a hyperbola, how can I get the equations for the asymptotes  with respect to the coefficients A, B, C, D, E, and F?  i.e. similar to this , except that question deals with properties of ellipses from the general equation instead of hyperbolas.


I've installed a command called gsutil on my Ubuntu VM with the command           sudo snap install google-cloud-sdk --classic   However, when running gsutil I started an unrelated existing program of the same name (GSutil, a GrandStream BudgeTone phone backup, restore and reboot utility), which was stored in usr/bin/gsutil. Following advice from  I ran   sudo dpkg --purge gsutil   which removed it. But now when I run gsutil I get  -bash: /usr/bin/gsutil: No such file or directory   With which gsutil I get  /snap/bin/gsutil   And I tried to make a symlink with  ln -s /snap/bin/gsutil gsutil   but still get the same results. Why can't bash find it? Both locations are in my PATH:   echo $PATH  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin


Replace all words before the start of the first word (Regex and Ruby)

Here are my test cases.  Expected:  JUNKINFRONThttp://francium.tech should be http://francium.tech JUNKINFRONThttp://francium.tech/http should be http://francium.tech/http francium.tech/http should be francium.tech/http (unaffected)  Actual result:  http://francium.tech francium.tech/http http   I am trying to write a regex replace for this. I tried this,  text.sub(/.*http/,'http')   However, my second and third test cases fail because it searches till the end. It would help if the answer could also do the case insensitivity.  2.5.0 :001 > url = 'francium.tech/http'  => "francium.tech/http"  2.5.0 :002 > url.sub(/^.*?(?=http)/i,'')  => "http"


Native speech recognition software for Linux

I am looking for a user friendly speech-to-text software to run offline on linux.  Simon needs a dictionary and training, I need a full dictation-able software, speechpad needs internet access, julius and sphinx are engines not for end-user. I am in doubt if there is a solution.  Look, I am able to install softwares via ssh tunneling connection, but it is a pain in the neck to hold this connection forever, I am not allowed to give internet access to this machine, I would rather not to, just for installing purposes, after that it should run natively and offline.  For now it is Ubuntu 16.04.1. Is there any solution?


Why "lsof" is not working when it used in ssh?

I found this command line is not working  ssh i01n10 "/usr/sbin/lsof -p $(pgrep -nf a.out)"   it shows the error     lsof: no process ID specified   However   ssh i01n10 "$(pgrep -nf a.out)"   correctly gives the PID  Why lsof is not seeing the PID?


Cut one side of a rectangle node in TikZ

I would like to draw two consecutive rectangle nodes (one is next to the other with an intersected edge). How to cut one side of a rectangle node in TikZ so that the intersected side looks like others?   Consider the example below, I don't want the "duplicated" edge between node 1 and 2.   \begin{tikzpicture}    \node [style={draw, inner sep=0pt, minimum size=0.5cm}]           (1) at (0, 0)  { $1$ };   \node [style={draw, inner sep=0pt, minimum size=0.5cm}]           (2) at (0.5, 0)  { $2$ };  \end{tikzpicture}


How do I turn accented lowercase letters to uppercase? - Using the 'tr' command

I'm tryed with:  $ echo 'Ciência' | tr 'a-z' 'A-Z' CIêNCIA   But the 'ê' character does not change, obviously because it is accentuated. Then I tried with POSIX classes:  echo "Ciência" | tr '[:lower:]' '[:upper:]' CIêNCIA   But the 'ê' continue in lower case.  Could someone help me?


What does this mean - "Please call me in 30 minutes"?

I'm confused about "in" used in the above sentence.   Does it mean "Please call me after 30 minutes" or does it mean "please call me within 30 minutes" ?


Using atan2 to calculate angle between two vectors

I understand that:  atan2(vector.y, vector.x) = the angle between the vector and the X axis.  But I wanted to know how to get the angle between two vectors using atan2. So I came across this solution:  atan2(vector1.y - vector2.y, vector1.x - vector2.x)   My question is very simple:  Will the two following formulas produce the same number?   atan2(vector1.y - vector2.y, vector1.x - vector2.x) atan2(vector2.y - vector1.y, vector2.x - vector1.x)   If not: How do I know what vector comes first in the subtractions?  Thanks


For global safely, is it safe to to use htmlspecialchars or striptags when user POST or GET in php ?  for example, htmlspecialchars any post and get that sent by request and save that to the database


"Unbiased" hypothesis test --- what does it mean actually?

Consider a statistical hypothesis test of size level $0<\alpha<1$ for testing a null hypothesis $H_0:\theta \in \Theta_0 \subset \Theta$ against an alternative hypothesis $H_1:\theta \in \Theta_1=\Theta - \Theta_0$.  I know that the test is considered "unbiased" if its power function $\beta$ satisfies the condition: $$\beta(\theta)\leq\alpha \hspace{0.3cm}\text{if}\hspace{0.3cm}\theta \in \Theta_0,$$ $$\beta(\theta)\geq\alpha \hspace{0.3cm}\text{if}\hspace{0.3cm}\theta \in \Theta_1.$$ I understand the definition but I do not understand what does this mean for the test?  Does it mean that the test has more power than it should?   And how do you compare the power of two tests, one "biased" and the other "unbiased"?


How do I identify what is my 'Intel Chipset' , on a Windows 7 Home Premium 64bit system?    This is actually a follow-up question to         The specs for my computer are:  HP Pavilion dv7-6b32us Laptop Core i7 2670QM 2.20GHz, 4GB DDR3, 640GB HDD ,Win 7 Prem.  As suggested at the previous Superuser question-and-answer, I tried going to the . (click to see)  There are 4 downloads being offered by the website, but how do I determine which of these 4 offered downloads is the appropriate one for me to download?  More to the point... how do I identify what is my 'Intel Chipset'?   I did find something called 'Intel Chipset Identification Utility' via         , but, it's stated as being only compatible with 32-bit operating systems. I am on Windows7-home-premium-64bit.  Many thanks for any help that can be offered in helping me identify what is my 'Intel Chipset'.    Status Report#1  Sigh... well, a slight update on the situation, and this corresponds to the preceding thread located , too.  None of the ideas so far worked, despite spending HOURS trying to get the USB3.0 ports to actually operate at USB3.0 speeds.  I mention this as a warning to others that might be having a similar issue-- solving the problem could potentially eat up a LOT of time.    Status Report#2  Well, I haven't thrown in the towel altogether, but...  Pursuant to the answer provided by @Chris-C in this thread,  , I've discovered something terribly distressing.  Specifically, I was told:  NO USB 3.0 support on the Intel 6-series chipset   And, yes. I found out that my system uses a Generation-6 chipset.  Hopefully, people that have this similar issue can be made aware of this limitation by this post.  But... why did Hewlett Packard include USB3.0 ports (I know they're USB3.0 because they have a blue color to their interior) IN THE FIRST PLACE?? Seriously, if you can give me an answer (in a comment), please do!  As far as the underlying concerns go, I'm still not quite giving up. At least not yet.


How do I set an image as the background on a Google Doc

I know how to change the color of the document but is there a way to make it a picture instead of a color?


How to make multiple callout as asynchronous from single component?

I have one single component which will make two different callouts and append data to two sections. I want these two-component to load asynchronously so that whichever data comes the first will load first. But it is now working as expected when I checked network tab in chrome console callouts is concatenated to each other. doInit : {   helper.callout1();//event based callout   helper.callout2();//event based callout }


Possibility of mass update using Salesforce Rest api

Is there any way by which we can update and insert records using rest api of salesforce in apex , if not how to do it with bulk api in apex . As object DatedConversionRate do not supports DML for ACM


Problem with overpriced ESTA from ESTASERVICE.COM

I just got charged $88 for an ESTA using a non-standard site.   Has anyone got any ideas as to whether I can get a refund?


How to prove that $\sin 1^\circ$ is irrational?

What is a simple proof that $\sin 1^\circ$ is irrational?    I have no idea how to solve this problem.


So I just installed Ubuntu 16.04 on my Dell XPS 13. When I get to the login screen it starts at 3200x1800 for a quick second, then I get a way lower resolution like 800x600 but as soon as I login it adjusts to 3200x1800. How would I get 3200x1800 permanently on my login screen? I didn't have this issue on 14.04.


How to stop getting e accent when I hit apostrophe

I hit something that now makes accented vowels come up whenever I hit the apostrophe key. I don't know how to fix it.


I'm using the glossariespackage to create an acronyms list.  \documentclass[fontsize=11pt,paper=a4]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{geometry} \geometry{showframe} \usepackage[%     acronym,     toc,     style=long,     nogroupskip,     nopostdot,     nonumberlist,     nomain,     section ]{glossaries} \renewcommand{\glsnamefont}[1]{\textbf{#1}} \newacronym{BBSR}{BBSR}{Bundesinstitut für Bau-, Stadt- und Raumforschung} \makeglossaries  \begin{document} \glsaddall \printglossary[%      type=\acronymtype,      title=Abkürzungsverzeichnis] \end{document}   How do I remove the indentation? I tried other styles but did not found an appropriate one. Is there any simple solution?


100% loss of my website content. I couldn't find cached pages on the net. Need help, please!

I had a website that I actively used from about 2/2014 through 10/2014. The site is www.tatumparnell.com. It was a collection of personal stories which mean the world to me, but the site is now down and the website builder can't recover it due to the time lapsed (over 30 days).  I had it backed up to a computer, not the cloud, and that computer is no longer in my possession. My fault, no lecture necessary.  I'm a novice in this area and I'm hoping someone can help. I've contacted some of my followers to check the cached pages from their devices, but most have new devices since then and the others didn't find the content. And I can't find a simple way for iPad users to check for cached pages. I want to start a site again but can't properly recreate the content. Is there any hope?


Is the War Machine armour simply "the Iron Man armour with big guns"?

What are the differences between Iron Man and War Machine armours ?  In the movies, it seems that they are the same, except the War Machine armour features more heavy weapons. But if they are the same, why wouldn't Tony Stark use the War Machine armour?  Do they have different characteristics (like strength, resistance, flight time...)?  I am looking for answers from the movies and/or the comics.


Travelling to UK as a dual-national, when your British Passport has expired?

I am a South African (living in South Africa) with a British passport (Dual Nationality) I need to visit the UK in a few months time, but my British passport has expired. Can I enter the country with my South African Passport supported by my Certificate of naturalisation? Or where can I renew my Passport?


I want to find out when my log files were compressed by logrotate because when I received them from cron in my email, the logs came in as text in the main body of the email instead.  I did:  ls -1la /var/log/some_services   And found that the logs in question are already in the compressed .gz format. So I was wondering if those files were emailed first, before being compressed.   However, the dates shown are not when the files were compressed, but when the logs were last updated.  How can I tell when a file was compressed?


Revision history & community wiki links show the same page

On community wiki posts both the revision history link & community wiki links lead to the same page.   Shouldn't the username in the community wiki post point to the user profile page?  Revision link   Community wiki link


Here is my table:  -- log +----+---------+------------+ | id | user_id |    seen    | +----+---------+------------+ | 1  | 2342    | 1442664886 | | 2  | 3244    | 1442665851 | | 3  | 2342    | 1442711823 | | 4  | 7654    | 1442864219 | | 5  | 3244    | 1442954080 | | 6  | 9984    | 1442984716 | +----+---------+------------+   I want to get the biggest seen time for a specific user as last seen. I can do that by these two queries:  First query:  SELECT seen AS last_seen FROM log WHERE user_id = :id ORDER BY seen DESC LIMIT 1   Second query:  SELECT MAX(seen) AS last_seen FROM log WHERE user_id = :id   Well which one is the standard way? Should I go with which one? Is there any different in the performance?


Given $f(t)$ satisfies $\dfrac{d^2f(t)}{dt^2}-(2-3i)f(t)=0,\,f(0)=1,\,\lim_{t \rightarrow \infty}f(t)=0$. What is $f(\pi)$ ?


Is there any difference in equals and == for String variables?

if ('text'.equals(str))   or   if ('text' == str)   Is there any difference? If yes, then what is it?   Added, after answered.  String q = 'teXt'; system.debug('teXt'.equals(q)); // true system.debug('teXt' == q);      // true system.debug('text'.equals(q)); // false system.debug('text' == q);      // true


How to return multiple values in a function (Python)?

So I'm new to coding and working my way through the Titanic data set from Kaggle. In the data frame there are columns labeled "Age" and "Sex." I want to make a new column that has 4 values that indicate for different things: 0: Male aged 16 or over 1: Female aged 16 or over 2: Male aged 15 or younger 3: Female aged 15 or younger  So far I've gotten this, but this just splits it up into 3 values, not the 4 I'm looking for.  def person_detail(Person):     Age, Sex = Person     return 2 if Age < 16 else Sex   I then apply the function to the "Age" and "Sex" columns to get a new column. I know that you can't have two returns, but if it gets across what I am trying to accomplish, it would look something like the below.  def person_detail(Person):     Age, Sex = Person     return 2 if Age < 16 and Sex == 0     return 3 if Age < 16 and Sex == 1 else Sex   Thanks in advance. For reference in the "Sex" column 0 is for male, and 1 is for female.


Lightning:input type="date": how to change the date fomat - Summer'18

I'm trying to change date format of this component but I dont find any attribute (like ui:inputDate has) to change the date format.   <lightning:input type="date" name="input8" label="Dates" value="2017-09-07" min="2017-09-05" max="2017-09-22" />   NOTE:Also I have used the new <lightning:inputField fieldName="date__c" /> for dates and actually works really nice but date format is a must I need to change.  This is an example of official lightning input here:     The first one is Lightning input, the second one is ui:inputDate component.  I'm guessing it is changed by your Time Zone but actually, there is no change at all.   Any ideas about how can I use it with the date format I want (DD/MM/YYYY)? Thanks


I have a laptop with Xubunutu, want to reinstall Windows 8, but can't enter bios on reload

So, it's a Asus laptop, which came with Windows 8.1 and instantly loads in to the OS, no ASUS splash screens or anything. Is there a way to boot in to Bios in Ubuntu?  I installed Xubuntu using the Windows function of reloading in to Bios, but can't since i formatted the drive.  Installing Windows because it was faster with it, than with Xubuntu.


$|G|= 2^n, o(g)=2~\forall g \in G, g \neq e$ show that G is abelian

Question as in title:  I have attempted this question by saying that the homomorpism that maps G to $Z_2$ is onto, $Z_2$ is abelian so G must be abelian.


How to make command block stop outputting signal?

I want to create a command block with the command  /clear @a[r=5,m=0] 570   (Yes, it is an ID from a mod, but it does not matter anything). I want to detect when this command has succeeded using comparator facing from the command block.  So, everything works good, but the comparator after that is always outputting. How to make it stop outputtng, so the command success can be detected several times?  I tried to hook up the command block with /blockdata ~ ~ ~2 {SuccessCount:0} where the coordinates point at the first command block, but this didnt work.  I'm running Minecraft 1.7.10.


What is the origin of the progressive form of the english verbs


Will there be bad effect if I do a fresh install of Ubuntu 18.10 without removing my old home folder

Will the old config file affect Ubuntu 18.10 in the bad way? Such as the themes, etc.


Exist a way in Ubuntu 20.04 to add an entire wallpaper folder to the background previews in the settings?

I'm a new Ubuntu (Linux) user.  Ubuntu creates each time a copy when I'm setting up a picture as a desktop wallpaper using the file manager. But if I'm using the settings it doesn't. But the problem is that you can just link one file at once to the selection which is when you have many pictures a big problem.  So my question is: exist a way to link all wallpapers at once or something like that?  The previews in the settings


How to enter a carriage return in an Excel file

How do you enter a carriage return or CHAR(13) in a worksheet cell manually ? I'm not talking about a line feed or CHAR(10).  I've seen this in a file and the carriage return had a very weird effect on the cell contents, but I can't reproduce it manually.  UPDATE  There are very good answers about how to enter a line feed in an Excel worksheet cell, and actually one of them gave me an idea how to achieve what I wanted in the first place:  =A1&CHAR(13)&A2 'Then copy cell + paste values only back again.   I'll accept the one that updates their content to reflect this. However, it'd be nice to know whether there's an equivalent of Alt + Return to type a carriage return.


Show vote counts on activity>comments page

It would be helpful to show vote counts on the activity > comments page, and also allow sorting by votes.  This would make it easy to see what comments other people thought were valuable or at least amusing.


Is it safe to put a 120W equivalent LED bulb in a 100W max fixture?

I bought a 15W led bulb which is the equivalent of a 120W incandescent. But, I can't find a cord grip ceiling bulb holder rated higher than 100W. Is it safe to put the 120W equivalent bulb in a 100W ceiling socket?


So I'm creating a simple javascript program that allows me to add text boxes and a remove button that when clicked removes the button and the text box next to it:   <!DOCTYPE html>   <meta charset="UTF-8"> <title>Title</title>

     <input type="text" class="in"/>     <button class="btn" id="1">Remove</button>

 <button id="add">Add</button>
 <button id="cacl">Calculate</button>

     And here is the script   $(function () {     var i=2;     $("#add").click(function () {         $("#space").append('
<input type="text" class="in"/> <button class="btn" id="'+i+'">Remove</button>

');         i++;     });      $(".btn").on('click', function () {         console.log("OK");         $(this).parent().remove();     }) });   However when I click on the remove button nothing happens it doesn't even log "OK".  Any ideas?


True or false? The linear system of equations $Ax=b$ is uniquely solvable for every $b \in \mathbb{R}^{n}$ if and only if det(A) $\neq$ 0

Let $n \in \mathbb{N}$, let $A \in \mathbb{R}^{n \times n}$      True or false? The linear system of equations for $Ax=b$ is uniquely   solvable for every $b \in \mathbb{R}^{n}$ if and only if   $\text{det(A)} \neq$ 0   I think the statement is true. Making $\text{det(A)} \neq 0$ should avoid us getting non-unique results such as $0=0$.  Remebering this and knowing $\text{det(A)} \neq 0$ gives linearly independent vectors, we can only get unique solution.  Edit: We don't know anything about $x$. If $x \neq 0$, then the statement will be true, right?    Please correct me if I'm wrong / unclear, these tasks will be asked in my exam and I want pass it :)


Reason of enabling voting after the question gets closed

Question scores show how a question is good or suitable to a specific site, or it is not suitable or has poor quality.   But there is something I wonder. After a question got closed, it still can receive upvotes/downvotes.  Downvoting means, a question is either not suitable or have poor quality or is duplicate. Downvoting a poor question, for example, shows the question owner and other users that there is something wrong about the question.  But after the question got closed, users can still downvote it. Since the question is already closed, what is the reason of letting it got more downvotes? Both users and the question owner already know that it has low quality and needed to be improved (if it is possible to reopen it after improvement). Close reason is also written under the question.  Similarly, a user with enough reputation may vote to reopen the question, if he had enough reputation to do so. Also, AFAIK there is no way to see how many upvotes/downvotes a question had received after it had closed. So, that also do not reflect the community thought about the closure of the question.  So I wonder, what is the logic behind letting closed questions still being able to vote?


Limits of dead reckoning using MEMS sensors

I'm trying to track body parts relative to a person's torso. I see quite a few questions about using MEMS accelerometers and gyros for dead reckoning, and they confirm my suspicions that various factors greatly limit their usefulness for these sorts of applications, but I'm seeking clarification of these limits:   What exactly are these limits?  Other answers have addressed why these limits exist. Naturally the specifications the parts in the system in question and what is considered "acceptable error" for the system will both change the exact limits, but is there a single order of magnitude in time, or distance that I can expect dead reckoning to work? I'm well aware that over long distances (a few yards or so) the error becomes too large for most practical purposes, but what about within a few feet?  What can I do to improve these limits?  I'm currently looking at using an accelerometer and a gyro. What other sensors can I add to the system to improve the error rate? I know over longer distances a GPS can be used, but I doubt any consumer electronics grade GPS has fine enough resolution to help in my case.  Additionally, a general consensus seems to the only way to improve these limits past the point of improved sensors is to provide a reference not subject to error. Some systems solve this using cameras and markers.  What kind of reference points can a portable/wearable device provide?   I've seen the usage of radio waves to measure long distances accurately, but I can't tell if such a system could be accurate on such small scale (in terms of distance measured) using "off-the-shelf" components.


I'm trying to prove for algorithm-purposes that given $a,b,n$ positive integers: $$2^{n-1}(a^n+b^n)\geq(a+b)^n$$ I tried by induction, and got the step as follows: $$2^{n}(a^{n+1}+b^{n+1})\geq^?(a+b)^{n+1}$$ I tried using the binomial expansion $(a+b)^n=\sum^n_{k=0} {{n}\choose{k}}a^kb^{n-k}$ and then excluding the last element $$(a+b)^{n+1}=\sum^{n+1}_{k=0} {{n+1}\choose{k}}a^kb^{n-k+1}=\sum^{n}_{k=0} {{n+1}\choose{k}}a^kb^{n-k}b+{{n+1}\choose{n+1}}a^{n+1}b^0$$$$=\sum^{n}_{k=0} (n+1){{n}\choose{k}}a^kb^{n-k}b+{{n+1}\choose{n+1}}a^{n+1}b^0=[(n+1)b]\sum^{n}_{k=0}{{n}\choose{k}}a^kb^{n-k}+{{n+1}\choose{n+1}}a^{n+1}b^0$$$$=[(n+1)b](a+b)^n+a^{n+1}\leq[(n+1)b]\times2^{n-1}(a^n+b^n)+a^{n+1}$$ Assuming that everything is correct so far, I don't how to proceed from there to get $\leq 2^n(a^{a+1}+b^{n+1})$ My second attempt was by doing the step as follows: $$2^{n-1}(a^n+b^n)\geq(a+b)^n \setminus\cdot(a+b)$$ $$2^{n-1}(a^n+b^n)(a+b)\geq(a+b)^{n+1}$$ $$2^{n-1}(a^{n+1}+b^{n+1}+a^nb+b^na)\geq(a+b)^{n+1}$$ Now I don't know how to eliminate $a^nb+b^na$, and to proceed to $2^n$ Is there another way to prove this? Or any hints to continue my step?


Am I entitled to air passengers compensation if my flight was cancelled and I did not get a re-route?

Recently a flight was cancelled and I think I was mistreated. On the day, about 5 of the flights from the airport got cancelled, they claimed it was because of bad weather. I had to wait for two more hours after my estimated departure time only to get information that my flight was cancelled.  However, 5 minutes from the information being anounced, another airlines plane departed from the same airport, and other departures were also succesful.  I did not get any re-routing options and was told I can re-book or refund at their website. They did not have any available flights until after more than a week and therefore I am not able to get home for Easter. I cried all day as I am spending Easter alone now.  Am I eligible for compensation? Shall I challenge the airline that the weather conditions were not to be considered as extreme circumstances?


Get values from list inside dictionary and save it in a list of lists

I have a dictionary A containing day as a key, and list of strings as a values example:   A = {"day1": ['A', 'B', 'C']}.   How can I create a List B containing the unique relationships that will be established Lists?  B = [['A','B'], ['A','C'], ['B','C']]


There is  (also known as Lucia) which is celebrated during December 13th.  However, the  is awarded for voting on December 15th.  Since there's no exact match, why is the hat called with this name?


Right way to add JS and CSS to node/edit and other forms

I am making a site with a lots of JS, and I am wondering where I should put the JS code. Optimally I would like to keep the JS with each module and not the theme layer. Some content could be exposed as blocks etc.   But I am having some issues with the cache. In my example I need to add JS & CSS to the node edit form. I have used hook_block_view, but it is cached. So if there is an error in the node edit form, the drupal_add_js & drupal_add_css functions are not called. The same seems to be true for hook_node_prepare.  Where would you input the JS & CSS layer? and are there hooks that get's called even if there is an error in the node edit form?


Sort tags by number of followers (add a tab to the tag page)

Right now, the "Tags" page supports listing the tags either in the most popular order or in alphabetical order. I think it will be interesting to see not only what tags are the most popular on questions but also what tags are the most popular for users, so it will be nice if we could get another tab that will sort the tags by the "most followed" order (the number of users who have that tag as an favorite tag).  I think that this order also gives a better sense of how many experts we have on topic X, as opposed to how many questions we have on topic X. That's something I would very much like to see.


I always thought the verb "to prove" was irregular (prove, proved, proven). Recently, I've heard quite a few times people saying "I was proved wrong" or "It has been proved that he did it" rather than "I was proven wrong".  Are both forms correct?


Restore the "Downloads" folder in "Places"

I mistakenly deleted the Downloads folder in Places. Right now, all the downloads file are in home.  How can I restore it?  Thanks in advance for any help!


Maximum Likelihood Estimator for $\theta$ when $X_1,\dots, X_n \sim U(-\theta,\theta)$

Exercise :     Calculate a Maximum Likelihood Estimator for the model $X_1,\dots, X_n \; \sim U(-\theta,\theta)$.   Solution :  The distribution function $f(x)$ for the given Uniform model is :  $$f(x) = \begin{cases} 1/2\theta, \; \; -\theta \leq x \leq \theta \\ 0 \quad \; \; , \quad\text{elsewhere} \end{cases}$$  Thus, we can calculate the likelihood function as :  $$L(\theta)=\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n\mathbb I_{[-\theta,\theta]}(x_i)= \bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[0,\theta]}(|x_i|) $$  $$=$$  $$\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(|x_i|)\prod_{i=1}^n \mathbb I_{[0, +\infty]}(|x_i|)$$  $$=$$  $$\boxed{\bigg(\frac{1}{2\theta}\bigg)^n\prod_{i=1}^n \mathbb I_{[-\infty,\theta]}(\max|x_i|)}$$  Question : How does one derive the final expression in the box from the previous one ? I can't seem to comprehend how this is equal to the step before.  Other than that, to find the maximum likelihood estimator you need a $\theta$ sufficiently small but also $\max |x_i| \leq \theta$ which means that the MLE is : $\hat{\theta} = \max |x_i|$.


I made a script that should notify me when there's a new chapter of manga that I'm reading. I used the command notify-send to do this. The program works when I am trying to run it in terminal. The notification is showing. However, when I placed this in my crontab, the notification doesn't show. I'm pretty sure that the program is running since I made it to create a file for me. The file was created, but the notification didn't show.  Here's my script  #!/bin/bash    #One Piece Manga reminder     #I created a file named .newop that contains the latest chapter.     let new=$(cat ~/.newop)     wget --read-timeout=30 -t20 -O .opreminder.txt http://www.mangareader.net/103/one-piece.html  if (( $(cat .opreminder.txt | grep "One Piece $new" | wc -l) >=1 ))     then         (( new+=1 ))         echo $new         echo $new > ~/.newop         notify-send "A new chapter of One Piece was released."     else         notify-send "No new chapter for One Piece."         notify-send "The latest chapter is still $new."     fi         exit   And here's what I wrote in my crontab  0,15,30,45 12-23 * * 3   /home/jchester/bin/opreminder.sh


At what level of complexity should I consider UL listing my widget?

I am interested in making a widget to sell, but it will probably have a small market and small volume.  At what level of complexity should I consider UL listing (or otherwise certifying) my widget?  I presume that device complexity is the range I should measure the device against to obtain a safety certification.  I understand it costs several thousand dollars for such things.  For a widget with only a few dollars in parts (off the shelf/eBay prices), and a small market or run, it doesn't make much business sense for sure.  However, in general, what level of complexity should I consider to procure some kind of safety certification?  The particular widget I am thinking of right now is a PCB with connectors and possibly a small 24V to 12V transformer (<100ma).  Basically, something that was wirenutted/butt-spliced together will now be more professional looking on a board in a box.  Don't let the example distract you from the overall question though.


Bash is not finding a program even though it's on my path

I have a program on my path.  The program runs when executed with a full path specified.  But the program cannot be found when I run it with just its name.    Essentially, I want to understand how the below output is possible, and how to fix it so that my program can actually be found without a full path specified:  root:/usr/local/bin# ./siege **************************************************** siege: could not open /usr/local/bin/etc/siegerc run 'siege.config' to generate a new .siegerc file **************************************************** root:/usr/local/bin# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games root:/usr/local/bin# siege bash: /usr/bin/siege: No such file or directory root:/usr/local/bin# wtf!?!?   I'm on Ubuntu 12.04 using bash.  Also please note the warning output from siege is not relevant for the purposes of this question, as I am only interested in whether or not the program can be found and invoked.


'Unbalanced Curly Brackets' Error with this command block code, what am I doing wrong?

I am trying to make a chest that is called 'I' that has another chest inside called 'II' that has another chest inside called 'III' that has another chest inside called 'IV' that has another chest called 'V' that has a piece of paper called 'An important message...' and it has a lore saying      自分自身を解放する方法があります。呪文はもう一度私たちの魂を得る。しかし、我々はそれを話さなければならない - 私たちは話すないとき - 音が出ないを。我々は、すべての耳が聞こえています。だから、失敗は避けられない。そして、私は今まで私の中の悪魔で、私の内部賭けに入る後悔。不滅か。魂のひったくり。ジェイク対ゲイリー·クルック。野望は過大評価され。   I keep getting 'Unbalanced Curly Brackets' every time I try use this command. I checked with Notepad++, I'm pretty sure the curly brackets are right? Here's the command below, but what am I doing wrong?  /setblock ~ ~ ~ chest 0 replace {Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"II"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"III"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"IV"},Items:[{id:54,Count:1,Slot:13,tag:{display:{Name:"V"},Items:[{id:339,Count:1,Slot:13,tag:{display:{Name:"An important message...",Lore:[自分自身を解放する方法があります。呪文はもう一度私たちの魂を得る。しかし、我々はそれを話さなければならない - 私たちは話すないとき - 音が出ないを。我々は、すべての耳が聞こえています。だから、失敗は避けられない。そして、私は今まで私の中の悪魔で、私の内部賭けに入る後悔。不滅か。魂のひったくり。ジェイク対ゲイリー·クルック。野望は過大評価され。]}}}]}}}]}}}}],display:{Name:"I"}}}


Acrobat Reader & saving last page I read?

I like to read eBooks, but I tend to have a hard time keeping track on which page I am in which file. Is there a bookmark function or something similar that I'm not aware of?


How to list files in a zip without extra information in command line

In my bash command line, when I use unzip -l test.zip I get the output like this:  Archive:  test.zip   Length      Date    Time    Name ---------  ---------- -----   ----    810000  05-07-2014 15:09   file1.txt    810000  05-07-2014 15:09   file2.txt    810000  05-07-2014 15:09   file3.txt ---------                     -------   2430000                     3 files   But I am interested only by the lines containing the file details.  I tried to make filtering using grep like this:   unzip -l test.zip | grep -v Length | grep -v "\-\-\-\-" | g -v Archive | grep -v " files"  But it is long and prone to error (e.g a file name Archive in this list will be dropped)  Is there any other options with unzip -l (I checked the unzip man page and did not find any) or another tool to do so?  It is important to me to not really unzip the archive but just to look what files are inside.


What's the correct way to address someone in a letter when you know their name but not their gender?

I'm writing a formal appeal letter as a reply to a letter I got from a government agency. Unfortunately, the person sending it only put their name with an intial, e.g. "J. Smith" and no title. They're in a foreign French speaking country, and I don't want to be too informal.  What would be the correct way to address them in my reply? "Dear Sir or Madam", "Dear J. Smith"... any suggestions?


Removing repeated page numbers from table of contents

Hi I'm trying to create a document in LaTeX with a few small subsections on the same page, is there any way to remove the repeated page numbers and keep the numbers when I move onto a new page?


Difference between '(int)a ', 'a as int' and Convert.ToInt32(a) in C#

What is difference between the following cast/convert.  string a = 5; int b = (int)a; int  c = a as int; int d = Convert.ToInt32(a);   Just curious to know about these different methods and where to use them accordingly.


Find the sum of the following infinite series   $$\frac {1}{3!} + \frac {4}{4!} + \frac {9}{5!} + \ldots$$  I was trying this question ,but I couldn't get it. This is homework that my teacher has given me.  I solved this question using d'Alembert's ratio test but I didn't get a finite value.  If anyone could help me, that would be much appreciated. Thank you


What makes a spell being cast considered to be a {class} spell?

My understanding is that when a spell is known or prepared via one of your class features, or if you cast it via a class feature, it's considered a "class spell" (sorcerer spell, cleric spell, etc.) for you. If you cast it via some method outside your class (items, etc.), it isn't considered a spell from your class.  For clarity, some class features care about whether or not a spell is a 'class' spell (emphasis mine):    Wild Magic Surge for Wild Magic sorcerers can only trigger "[...] immediately after you cast a sorcerer spell [...]". Overchannel for School of Evocation wizards can only be used "when you cast a wizard spell [...]" Empowered Evocation for School of Evocation wizards can also only be used on "[...] any wizard evocation spell you cast". Rod of the pact keeper gives a bonus "[...] to the saving throw DCs of your warlock spells".   Contrast with a feature like Blessed Healer for Life Domain clerics that just use the language of "When you cast a spell [...]", and you'll see why I believe there's an important distinction as to whether or not a spell instance is a 'class' spell.  However, comments on  made me question where my understanding of what makes a spell instance a 'class' spell comes from, and I'm not sure of a concise spot that explains it. What are the rules that govern what is or is not considered a class spell when cast?   Of particular concern is whether or not a spell is, in all instances, a class spell once you've obtained it from your class. For example, if you were a wizard that had magic missile both prepared and in your spellbook, would any instance of magic missile you cast be considered a wizard spell, even if it was cast by way of, say, a wand of magic missile?


Where does complex number multiplication (as vectors, not referencing $i$) come from?

It is  as this:  $$(a,b)(c,d)=(ac-bd,ad+bc).\,$$  I don't see anywhere where the decision to have - these components $ac-bd$ and + these components $ad+bc$ was made. Or why it is like this. Wondering if one could explain why it's like this, without using or referencing $i$ or $\sqrt{-1}$, just using the idea of complex numbers as an ordered pair of reals.


Is there a way to browse from random topic to random topic?

I am completely new here and I am overwhelmed. This is a wonderful ocean of information both on and in between the lines.   Is there be a way to leap from random topic to random topic? I usually implement a page that does that on my sites and it would be great to have something like that to navigate through this Pool of Wisdom too. Just F5 and -poof- another topic.   It would be a great help to get a feeling for this place and its companions for newbies like me.     Thank you all for what you showed me in this humble first post of mine in this community.   The need for the random button subsided once I found the power of the tag-button filters.  What I will never forget, is what I found out about this Q&A site. It is very healthy. I undeliberately and very hesitantly injected this off-topic question on Stack Overflow and within 5 minutes, I was shoved this way by five sober and friendly white blood cells. The Organism is very strong and decisive on staying healthy.   This simple post is one that I'll never forget. I feel welcome here, and should I do anything wrong, I have every confidence that I'll be standing corrected in no time, so false habits won't get a chance to creep in.   I greet you, and thank you for this warm welcome.


Why are certain example URLs like https://site.com/ and https://mysite.com/ blocked from post content?

Why is  and  blocked from the post content on the main site? I tried to make a sample URL and I had to use  instead.


What are my options for geocoding a large dataset for free?

I'm a software engineer new to GIS and mapping systems. Recently I have been playing with ideas for applications built from the . It consists of about ~1.5 million records of American physicians, and their Medicare billing information.  Each physician has an address and I think there are interesting things to be done with mapping this data. However mapping APIs / libraries universally require latitude / longitude values, and I only have street addresses. I've done a fair amount of investigating how to go about bulk geocoding data. Google and Bing maps APIs both are volume limited (even with a business license) to a restrictive level. SmartyStreets seems to do the job, but to get the volume that I require to geocode ~1.5m addresses would cost ~$1000 dollars per month. AddressDoctor looks both complicated and prohibitively expensive.  Are there ways I can do this for free? I'm very unfamiliar with GIS but I understand that at least for the U.S., a lot of the source data comes from the federal government and (I would think) would be free. However bulk processing APIs seem prohibitively expensive for the scale on which I am trying to work.


Reentering the Schengen area when visiting without visa

I'm travelling to Spain with my US passport. After five days in Spain, I'm travelling to Morocco for four days.    After Morocco, can I reenter Spain for one more week?    I've read we have up to 90 days, but they don't say what happens if you leave the Schengen zone to visit Morocco.


What is the limit of   $$\lim_{n \to \infty} \frac{\log n}{n^\delta}$$  where $\delta > 0$?


Services Actions Missing in Central Admin

We recently added a new SharePoint server to the farm and to my surprise the server is not showing any actions in The Page Manage Services on Server .Please see the attached screenshot for further details    After Stopping SharePoint Foundation Web Application Service


Why do professional print houses use gamut-limiting CMYK?

I recently had some business cards printed, and was warned to use the CMYK colour space if providing TIF files.  When I tried saving from Paint Shop Pro to a CMYK, of course the colours came out very much duller, so I provided a different file type that preserved my colours using RGB. To my horror, the cards came back nevertheless converted to the CMYK dull shades.    A few months previously I had been in a hurry and had printed my own one-sided quasi business cards using glossy photo paper and a cheap home printer.  This reproduced my desired colours perfectly.  Since the whole point of using professional printers is quality (though I admit bulk as well), why do they not use printers that can cope with the RGB colour range?   FYI: the main colour in question, which I chose very carefully, is a slightly yellow-tinged lawn green, which I understand doesn't feature in the CMYK gamut.  So why use that gamut, and is there anything I can do to overcome this issue and get cards printed in the colour I have chosen?


Is anybody able to tell me what this supernova looking icon in between the bluetooth and wifi icon is?


How do I make my Tex output have such font?

This question is about font in Tex.  I want to make my Tex output have the font as in this book  but I do not know how. I have no idea where to begin.  I appreciate your help!


Does anyone know of any alternatives to recuva for file recovery?

I was using recuva to find pictures and videos on a windows xp hard drive, but I keep getting an internal error message. Does anyone know of an alternative program for recovering broken and damaged files?  I know that with ubuntu it's sometimes better and I had some more success recovering data from windows computers with ubuntu, I tried find but are there any GUI programs that someone would recommend?


How can I identify on linux how many sockets/cpus are installed on the hardware?

For Oracle licensing topics I need to identify how many sockets and cpus are actually installed on the hardware. On windows this information can be found by the cmd command “systeminfo”.


doing:  >>>'a'*20 is "aaaaaaaaaaaaaaaaaaaa"   gives  >>>True   while doing:  >>>'a'*21 is "aaaaaaaaaaaaaaaaaaaaa"   gives   >>>False   Whats going on here? Is this a bug?


HTTP session hijacking vulnerability on Stack Overflow

was released yesterday, a Firefox extension that makes it very easy to do HTTP session hijacking for users of insecure websites. It looks like Stack Overflow (and company) doesn't use SSL for the whole site (or allow an option to do so). Does that make it vulnerable to session hijacking? Should there be an option for full-site https like Gmail and others have?


Let $R$ denote a ring with identity, can an element $a\in R$ be a right divisor while it is not a left divisor?

Definition: An element $a$ in a ring $R$ with identity is called a right(left) divisor if there exist $u \in R$ such that $ua=1$ ($au=1$).   Can we construct a ring $R$ such that there exist an element $a\in R$ , $a$ is a right divisor of $R$ while $a$ is not a left divisor.   My attempt: $(1)$ Since a is a right divisor, if such a ring exists, R must have an identity $1_R$. (2) R can not be commutative.


Calculating the sensor size or pixel pitch of the Logitech BRIO 4K Webcam?

I have a  webcam and want to try and calculate some of its physical dimensions like the sensor size or the physical size of each pixel.  Unable to find any info on the official site, I saw a blog post that  that the camera has a 1/4" sensor in the comments.  What is this 1/4" referring to exactly? Can I use this number and the max resolution of the camera (4096 x 2160) to calculate the physical size of each pixel?  Thanks!


What are my options if tex files are unavailable?

This is a rather morbid question; sorry for that. A friend recently passed away. Prior to passing, he had submitted some of his work to a journal. Journal editor has reached out to see if I could help with some non-controversial copy editing and providing a source file (only PDF had been submitted). We're going to confirm with the family that they're OK with this. If we proceed, is there anything I can do short of entirely recreating the tex file by hand?


Proving this function is integrable on [0,1].

Let f:[0,1]->$\mathbb{R}$ be defined by f(x)=0 when x is irrational and f(x)=1/q when x=p/q with gcd(p,q)=1. Prove that f is integrable on [0,1]. What is $\int_{0}^{1}$f(x) dx? I only have knowledge of Riemann integrability conditions and results.The integral is obviously 0 i think but i really don't know how to do this. Any help would be appreciated!


How to play protected AAC tracks via Sonos?

I have many songs I bought from iTunes that are in the old Protected AAC format.  They play find from my iPhone or from my computer to attached speakers.  I would like to stream them over my home WiFi network.  I tried some Sonos speakers with their app, which could play everything in my library except these.  Is there a way to stream them?


Command to reinstall ubuntu mate desktop

When I booted up my machine, it said failed to start session. So I press Ctrl + alt + f1, then I login. Now I need to install the mate desktop. But I don't know what the command for that is, I know what the command for unity is but not for mate. I have very limited file space and using unity would eat it all up, so I need e command to install the mate desktop.


The Ready action states:     Then, you choose the action you will take in response to that trigger...   I am unsure whether this means you can only ready an action such as Dodge, Hide, Attack, Cast A Spell, or if this also includes bonus actions and reactions as the PHB states (page 189):     Certain special abilities, spells, and situations allow you to take a special action called a reaction.    And then later states (page 190):     Various class features, spells, and other abilities let you take an additional action on your turn called a bonus action.   I am aware that the Ready action uses up your action just like Dodge, Hide, and others, but am wondering whether what you spend your reaction to do can be something that would normally require a bonus action.  I am also aware that you cannot take a bonus action when it is not your own turn. Given that, one reason you might want to do this is to effectively use two bonus actions on a single turn (one using your bonus action, and another using the Ready action where the trigger occurs on that same turn).    One example of when you may want to do this (however there could be others which are entirely different in structure or setup):    You have already cast a spell such as spiritual weapon which you can use your bonus action to do something with (in this case make the weapon move and attack).   You take the Ready action to Ready the following: "When I say 'Go!', I will use my reaction to make the spiritual weapon move and make an attack."   You say "Go!", providing the trigger which allows you to spend your reaction to make the spiritual weapon attack.   You now still have a bonus action you haven't spent and can use it on anything, such as casting the spell misty step   Another possible example scenario:  You are walking past a row of allies but one is secretly an enemy and will attack you with an opportunity attack as you walk past. You want to know who this enemy is but also do not want to get attacked. Disengaging will prevent you from learning who they are as no opportunity attack will be provoked. Instead you decide to Ready misty step so that "When a creature attacks me (but before they have hit me) I will cast misty step and get away" thus allowing you to learn who they are and prevent the attack.  Can you ready a bonus action?


On dark matter distribution and effects at terrestrial (or solar system) scale

Or the lack of them. If DM is much more abundant of common baryonic matter, why its gravitational effect becomes evident only if the dynamic of huge systems such as galactic rotation is considered?  I do not understand why DM should not contribute to our weight (assuming that it permeates Earth or it is concentrated in its nucleus) or should not be considered when describing the motion of the solar system.  What I do not understand here? I am ok with all instances that brought DM into consideration but I do not see why its gravitational effects do not take places here on Earth . Shall I take it as homogeneously distributed (at the scales I mentioned) so that I and the Earth are basically "within a DM spherical shell" and, thus, basically facing each others as if DM was absent?   Edit. Likely the moderators will add this. My question is about a duplicate of


Conditional Entropy is less than entropy

Let $p_{ij}=P(X=i,Y=j)$ be the joint distribution, $P(X=i)=p_i=\sum_j p_{ij}, P(Y=j)=q_j=\sum_i p_{ij}$ be the marginal distributions, and $p_{i|j}=\frac{p_{ij}}{q_j}$ be the conditional distribution. Then the conditional entropy is defined as $$E[h(X|Y)]=-\sum_j \sum_i p_{i|j} \ln p_{i|j} q_j $$ Show $E[h(X|Y)]\leq h(X)$ where $h(X)$ is the entropy of $X$. I'm at a lost as to even know where to begin.


How to show the determinant of this $n \times n$ matrix

Given $   A_n =   \left[ {\begin{array}{cc}    2 & 1 & \\    1 & 2 & 1\\     & 1 & 2 \\    & & & ... \\    & & & & 2 & 1 \\    & & & & 1 & 2   \end{array} } \right] \in M_n(\mathbb{R})$. What I have to do is calculate the determinant with respect to $n\in \mathbb{N}$. I already found out $\det(A_n) = n+1$. I tried to show this with induction. I get confronted by the following problem:   I showed the statement for $n=1$. Lets consider the statement is true for one $n \in \mathbb{N}$. Now show that the statement is also true for $n+1$ using laplace expansion for the first row.  We get $\det(A_{n+1}) = (-1)^2\cdot 2\cdot \det(A_n)+(-1)^3\cdot 1\cdot     \begin{vmatrix}    1 & 1 & \\    0 & 2 & 1\\    & 1 & 2 \\    & & & ... \\    & & & & 2 & 1 \\    & & & & 1 & 2 \end{vmatrix} $. The second determinant should be $1\cdot \det(A_{n-1}) = n$ but we only considered the statement tu be true for $n$ and not for $n-1$. How do I continue from here?


Know when edit-mode is entered by script? (python)

How would I know through a script when the switch to edit mode happens? I need it for modal operator.  I was thinking on listening for 'TAB' event and checking obj.mode, but I hope there is a better way, for reasons like changed edit-mode shortcut or switching to edit-mode by script.


Story or stories about a matriarchal society where everybody is treated like children

I read this a long time ago, perhaps 30 years, and the story may have been older than that, in Danish. I remember some fragments that are really quite bizarre, but the main gist was that the general population lived in a sort of kindergarten, where everything was kept non-scary. Some points I remember:   Everybody was known by their first name only. When people got too old, they were given a party and euthanised. This was called something euphemistic, like 'retiring' or 'being let go' or similar. Once, an air-plane passed over the community and made a loud noise - and it was later announced that the pilot had been 'let go' as a consequence.   There is of course a young, male hero, who runs away, but this is where I think I may be mixing up two stories, because I seem to remember there was something about all the worries and trauma of reality being kept away from most people, but then channeled into a few individuals, somehow.


I am using MS SQL Server.  I have a table of students like this:  StudentID,Teacher 123,Adams 124,Adams 125,Johnson 126,Johnson 127,Adams 128,Marks   I need to have output that looks like this:  Teacher,Students Adams,123|124|127 Johnson,125|126 Marks,128   I appreciate your help. Thank you.


Why do we talk of 'spoiling for a fight'?

According to the OED the sense of spoiling for a fight/argument etc is of US origin.  Does anyone know the provenance of this use?  OED     to be spoiling for (a fight, etc.), to long for, to desire ardently or   earnestly. Also const. inf. orig. U.S.>       1865   L. Stephen Sketches from Cambr. 67   We are in the condition   which the Yankees call ‘spoiling for a fight’.      1890   R. L. Stevenson Lett. (1899) II. 191   The native   population..chronically spoiling for a fight.      1893   Nation (N.Y.)  16 Nov. 368/2   Dr. James Martineau, who, in   spite of his eighty-nine years, seemed still to be ‘spoiling for an   argument’.      a1960   E. M. Forster Maurice (1971) vii. 42   Durham..would be found   at all hours curled up in his room and spoiling to argue.


Why are Unbreakable Vows not used more in the Harry Potter Universe?

I wonder why the Wizarding Legal System doesn't use Unbreakable Vows in their legal system. Having the judges swear "to uphold the law to their best ability while acting in their official role" would really cut down corruption, making it almost impossible to abuse ones position.  Likewise, having accused criminals forced to swear "to not intentionally commit perjury while before the Wizengamot today, and to vocally correct any mistakes in [accused's] claims when realizing a mistake has been made". This would make it a more limiting Vow, as it only lasts for the duration of that particular day, and could be used for any trial about a crime of specific severity.  Most likely, it's not used simply because the Wizarding World is based on, and created from, corruption and power-lust. The very goverment exists more for the sake of being able to obtain power than to create a good country. The members of the Wizengamot want to be able to do illegal and immoral acts to further their own power, so they refuse to make laws that might limit their ability to do so (or increase the risk of them geting caught).


Why $0$ (zero) is a purely imaginary number?

I was reading  Wikipedia article and found that $0$ is a purely imaginary number. Why? Is it because $i0=0$? So zero is the only number which is real as well as purely imaginary? Any explanations on this please?


I am having some difficulty understanding what a script is. As far as I understand, it's a set of commands in  a shell. And what's the difference between a bash script and a shell script? can somebody explain this concept?


remove the dynamically created elemnts in javascript

I am creating four input textboxes(i.e srno , po_item, po_quantity, po_due_date) and one button (i.e remove_item) dynamically. i wanna remove these element when I click that button.. Please help me.. Thanks in advance  $('#space').append(   '

   <input type="text" name="srno" id="srno" class="form-control" />

   <input type="text" name="po_item" id="po_item" class="form-control" >

   <input type="text" name="po_quantity" id="po_quantity" class="form-control">

   <input type="text" name="po_due_date" id="po_due_date" class="form-control"

   <input type="button" id="remove_item" name="remove_item" value="Remove" class="form-control btn btn-danger">

');


So these are stains that I tried to get off with everything this board has adviced. Still no end in sight.  I tried baking soda, citric acid, white vinegar, bar keeper's friend etc.  Does anyone know what these are? First time I'm getting these in 5 years of cooking, hard as hell to get off. I even tried to scratch it off but it doesn't work.


Are there any other pairs similar to virtual and normal photons?

Are there virtual particles for every kind of particle there is?


Why doesn't this question appear under tagged questions?

I posted  some minutes ago, and I can reload that page to make sure it's there, but I cannot see it appear under the newest questions tagged "ruby". It is already several minutes ago. Why doesn't it appear?  Update After about ten minutes, I can finally see it appear. Why is this the case? Is there some delaying mechanism?


Linux based SMB share: can access only using owner account from Windows

In Windows when I connect using test_reader account I can access with no problems. However when I use peter account it gives me Access Denied.  I did some testing and if I change share folder ownership to peter I can access using peter account and then there's no acccess for test_reader. So only a folder owner can access the share.   smb.conf:   [share]         comment = Venice         path = /media/test_folder/share         read only = yes         create mask = 0650         directory mask = 0760         browsable = yes         valid users = @mac         write list = peter   mac memebrs:   mac:x:502:test_reader,peter   Folder permissions:  drwxrw-r-x 2 test_reader mac   2048 Jun  9 18:23 share   I have set smbpasswd for each accounts.   Why I cannot access the share using peter account that belongs to the same group as test_reader?


node.js - subtraction not correct on the 17decimal?

This for sure is a duplicate, however didn't find an answer quickly so far. When I calculate 0.8 - 0.45 in my node script as variables or directly in the console it results in:  0.35000000000000003  Why? And how can I calculate this correctly?


How can I fix an issue which causes players to die upon joining to my server?

When a player joins my server, he automatically dies and it repeats, over and over and over. How can I fix this with console commands?


If $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$

Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$.   For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent.  Not to sure if this is correct, any help would be much appreciated, many thanks.


validate $_POST['date'] to compare to SQL server date column

I have some code where I want to pull code from the database where the date matches the date that the user selected. The column on the SQL server end is a Date parameter. Below is my code where I try to SELECT a record where the user imputed date matched the date in the record on the database. However I am getting error every time I get tot he $stmt = $dbh->query($sql) line i get the error call back.  I have tried echoing $sql from the below line of code  $sql = "SELECT * FROM tblEmployee WHERE  dtDate = " . $selected_date;   and on sql server I get  "Operand type clash: date is incompatible with int". Below is my code  if(isset($_POST['submit'])){             try{                 $dbh = new PDO('sghf','','');                  $dbh->setAttribute ( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );                  $selected_date = date('Y-m-d', strtotime($_POST['dateFrom']));                 $selected_option= $_POST['iChoiceID'];                 $returnVals = array ();                  $sql = "SELECT * FROM tblEmployee WHERE  dtServed = " . $selected_date;                 //echo $sql;                $stmt = $dbh->query($sql);                  //$sourceInfo = $stmt->fetch( PDO::FETCH_ASSOC);                 /*                 $returnVals['info'] = array();                 $returnVals['info'] ['txtInfo'] = $sourceInfo ['txtInfo'];                 $returnVals['info'] ['txtName'] = $sourceInfo ['txtName'];                 $returnVals['info'] ['txtOther'] = $sourceInfo ['txtOther'];                 $stmt->closedCursor();                 */               }catch ( PDOException $e ) {                 echo "error";     }   I would just like to know if there is a way of verifying they are the same type.  Thanks in advance


I'm trying to improve my login system and make it more secure.  $hashed_pass = password_hash($pass, PASSWORD_BCRYPT);   Is this function the best way to safely store password and other information in the database?


Background not changing using gsettings from cron

I'm trying to change my wallpaper to a random image using Indrajith Indraprastham's suggested script here:    When I run the script from a terminal window, the bg changes just fine, but when it's run from cron, I'm mailed this error:     (process:21901): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=00216c114dcf433c9bb9009985d607d6 --binary-syntax --close-stderr': Child process exited with code 1   I would appreciate any suggestions.


Are a bonsai tree and its normal version the same species?

I would like to know if bonsai type of a tree is a separate species from its normal version. Do they differ by genes, or is it just a matter of different physical care?  Can I grow a bonsai tree from seed of a normal outdoor tree (of course, I understand that not every species will endure being dwarfed)? Can I grow a normal outdoor tree from some seeds labeled "bonsai"?