Why is default ctor of struct range required at Line 16 (mentioned in code below)?  My code :  struct range {     int begInd, endInd, fr;     range(int b, int e, int f) : begInd(b), endInd(e), fr(f) {}     //range() {}   /* COMPILE SUCCESS if this line is uncommented */ };  class Solution { public:     int findShortestSubArray(vector<int>& nums) {         unordered_map<int, range> freq;         int i, minLen = INT_MAX, maxFreq;         for (i = 0; i < nums.size(); ++i) {             if (freq.find(nums[i]) == freq.end())                 freq.insert(make_pair(nums[i], range(i, i, 1)));             else {                 freq[nums[i]].endInd = i;   // Line 16                 freq[nums[i]].fr++;             }         } // more code after this...   Compile error (leetcode is not letting me copy the error, so image) :        Last 3 lines of error : Line 16: Char 29:     required from here /usr/local/include/c++/8.2.0/tuple:1668:70: error: no matching function for call to 'range::range()' second(std::forward<_Args2>(std::get<_Indexes2>(__tuple2))...)  My understanding : Since no new node is being created in unordered_map at line 16, there shouldn't be any need of ctor of any type. I also checked , but didn't find anything on such case.


Which of these two forces is stronger: static friction or kinetic friction?

Which of these two forces is stronger: The force of static friction or the force of kinetic friction? I am having a hard time understanding this concept of , so please explain your answer!


Locked question on the hot questions list

The following question has been on the hot questions list for what seems like awhile:    It's also currently locked. Shouldn't this disqualify it from the hot questions list?


Using two and’s in one sentence, and starting a sentence with “To”

Is this sentence correct?     To view your policy status, last payment information and next payment information, enter your policy number in the box below and click Submit to continue.   I’m not a fan of starting a sentence with a preposition. I believe it’s ok, but I’m not completely certain.  Also, I don’t like the use of the word and twice there in the same sentence like that.   I would rewrite and structure the sentence differently.  It also feels like a run-on sentence to me, but I’m no expert and have been out of school for a long time now.    I was curious so I Googled it and this site came up, so I decided to post a question see what response I got.


"Biweekly" means every two weeks. What's the term for something that happens twice a week?     We need to have _______ meetings until this crisis is over.


Suppose that $S\neq\emptyset$ is a bounded set of numbers and that $a$ is a number. Define $aS=\{ax\mid x\in S\}$.   Prove that sup $aS$ = $a$ sup $S$ if $a \geq 0$  I can intuitively see why this is true by just trying out some cases for $a$ and $S$ but I can't seem to prove why this is true.


Run TTY script every time I open a GUI terminal

When I log in to a TTY I get the following nice text:  Ubuntu 16.04.03 LTS Log-in: username Password: Last log-in date/time Welcome to Ubuntu 16.04.03 LTS   * Documentation:  * Management:  * Support:  9 packages to update 4 updates are security updates   I would like the last 2 lines repeated every time I open a GUI terminal for all users in the adm group (but will settle for having the entire thing displayed each and every time I open a GUI Terminal for all users)  I tried the obvious:  fab-root@fab-ux-predator:~ $ cd /etc/update-motd.d/ fab-root@fab-ux-predator:/etc/update-motd.d $ ./90-updates-available  fab-root@fab-ux-predator:/etc/update-motd.d $ cat /var/lib/update-notifier/updates-available cat: /var/lib/update-notifier/updates-available: Permission denied fab-root@fab-ux-predator:/etc/update-motd.d $   What am I missing?  P.S. Obviously I can chmod o+r the file, but how future-proof would that be?


Find no. of non negative integer solutions of $a+2b+3c = 200$

I want to find number of the non negative integer solutions of $a+2b+3c = 200$ (answer can contain $a,b,c = 0$)  Example one of the solutions is $a = 100, b = 50, c = 0$  I used stars and bars trick and here i get is  $\dfrac{\dbinom{200+2}{2}}{2 \times 3}$ but it is incorrect  any type of math is welcomed    what I have learnt from stars and bars technique is to find the solutions of $x+y = n , x,y,n > 0$ are positive integers but I am confused with equation of type $ax+by = n$ where $a , b> 1$


Show that $\int_{-\infty}^{\infty} \exp(-x^2)\, dx = \sqrt{\pi}$.  I believe it is necessary to use the Fubini's Theorem and the Change of Variables Theorem.  I guess the variable shift function can be $g: (s,v)\times (s,2\pi) \rightarrow \mathbb{R^2}$, such that $g(r,\theta)=(r\cos\theta,r\sin\theta)$.   I've seen this question here, but none explains why g fits the assumptions of the theorem. As, for example, why $g$ is a diffeomorphism of class $C^1$, or why $g((s,v)\times (s,2\pi))$ is compact and $J$-measurable.  PS.: I know that Change of Variables Theorem It has other versions with different hypotheses, but these are the book I follow.


Where to place JavaScript in an HTML file?

Say I have a fairly hefty JavaScript file, packed down to roughly 100kb or so. By file I mean it’s an external file that would be linked in via


i get the following error while running a packet sniffer code:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at ps.MainGUI.startbtnActionPerformed(MainGUI.java:399)     at ps.MainGUI.access$000(MainGUI.java:26)   what could be the reason??the program code is give below :   // TODO add your handling code here:  startPacketbtn();  ps.startUpdating();   and   public class MainGUI extends javax.swing.JFrame {  public DefaultTableModel dtmPacket = new DefaultTableModel(); PSCaptor ps; /** Creates new form MainGUI */ public MainGUI(int bufsize,boolean mode,int deviceno) {     initComponents();     System.out.println("HERE");


Files and folders are not deleted from the external hard disk

When I connect my external hard disk to my Ubuntu device and delete some files and folders from it, they are not actually deleted as they still preserve space but I do not see them.   However, when I connect the hard disk to a Windows machine, I see a folder .Trash-1000 contains some files and folders, and when I delete them from there, I get the space freed.  1) How can I delete my files and folders from the external hard disk to the rubbish bin and free their space in Ubuntu?  2) How can I see the .Trash-1000 folder in the external hard disk from my Ubuntu machine?


Geometrical or Physical significance (interpretation) of the inner-product $\langle A,B \rangle := Trace (AB^t)$ over $M_n(\mathbb R)$

$\langle A,B \rangle := Trace (AB^t)$ is an inner product over the vector space $M_n(\mathbb R)$ of all real matrices of size $n$ , I would like to know whether this inner-product has any Geometrical or Physical significance (interpretation) or not ? Please shed some light . Thanks in advance


.swp file size increasing automatically, why?

I want to ask reasons for swp file for instance generated by vim increasing its size automatically.  What could possibly be the reasons / factors of size being increased?


server_name in nginx.conf seems to be ignored

I've got a domain name, let's say example.com that point to my server. And my nginx.conf is:  upstream domain {     server 127.0.0.1:8002;  }  server {      listen 80;     server_name <example.com>;     client_max_body_size 10M;     keepalive_timeout    15;   During development, I want to deactivate example.com. I replace it by <different_name>.  server {      listen 80;     server_name <different_name>;     client_max_body_size 10M;     keepalive_timeout    15;   It works fine as expected with <different_name> but it still continues responding to <example.com>. And I can't figure out why. I'd like nginx to not respond at all on <example.com>.   Naturally I didn't forget to restart services as gunicorn and nginx.  Edit: It may be a duplicated post as suggested. In my opinion the way the problem is exposed in the post you mentioned is confused. Even the title is not clear. "nginx open reverse proxy" What does it mean seriously? I tried to expose my problem which has a similar solution in clear terms keeping in mind that it could / should be reusable and much more explicit to everyone.


Limits of integration become equal upon substitution

In order to integrate :  $$\int_0^{2\pi} \frac{1}{a + \cos x }dx $$ I made the substitution :  $$ u = \tan(x/2) \Rightarrow du = \frac{\sec^2(x/2)}{2}dx   \Rightarrow  dx = \frac {2du}{1 + u^2}$$ with this and $$ \cos x = \frac{1-u^2}{1+u^2}$$ I get the integral simplified to: $$\frac{2}{a-1}\int_{tan(0)}^{tan(\pi)}\frac{du}{\frac{a+1}{a-1} + u^2}  = \frac{2}{a-1}\int_0^0\frac{du}{\frac{a+1}{a-1} + u ^2}$$  Although the integral is now quite easy to solve the limits have become equal in the process and the integral becomes zero. This is clearly incorrect because the original function would be positive throughout the interval given a value of $a$ more than 1 and thus implying a positive integral and not zero.  It is clear that there is a mistake with the substitution but I can't seem to find it.  There is a question on this stack exchange which deals with this issue (), but in this problem here I couldn't pinpoint any ambiguity in expressing the functions of x in terms of u as was the case in the other question.


Affect of multi-Col linearity in Machine Learning Algorithms

This is my general understanding on the affect of Multi-Col linearity on Linear and Logistic regression. However I am still not able to understand whether multi-col linearity is a problem in decision tree (Classification and regression).  Linear Regression - It has a huge impact as the co-efficient might vary drastically if there are 2 variables with high correlation. And regularisation would overcome this issue. Logistic Regression - Same as Linear regression.  Can anybody please give me some insight on how it affects in decision tree classifier and decision tree regressor. And how to overcome this problem if it affects.


How to avoid copying “..” while using cp command in terminal?

I am using CentOS7 and when I use command   cp /root/test/.* /root/test1   it also copies .. which copies all the files and folder in the parent directory of the source.  How to avoid copying . and ..?


How do you change the size of figures drawn with Matplotlib?

How do you change the size of figure drawn with Matplotlib?


impossible to modify encapsulated variables

Consider the following code.  using System.Drawing;  public class Element {     public static Point position1;     private static Point position2;      public static Point Position2     {         get { return position; }         set { position = value; }     } }  class Drawing {     public Drawing()     {          Element.position1.X = 0; //Correct         Element.Position2.X = 0; //Incorrect     } }   Why can not the value of position2.X be changed through Element.Position2.X?  Because of this I am obliged to do :  Point newPoint = new Point (0, 0); Element.Position2 = newPoint; //Or : Element.Position2 = new Point (0, Element.Position2.Y);    Why is not it simply possible to access the value of position2.X as with position1.X but using Element.Position2.X ? Do you know any other way to solve the problem?


Finding filenames that end in a specific character with or without an extension

I have a bunch of files in a folder that all end in a different version number, like 1, 2, 3, etc. Some of them have extensions, some of them don't. Is there any way I could use a command like ls, find, or grep that can list all of the files that end in a specific character, like '1', that may or may not end in an extension?   For example, in a directory, I have the following files: ver1.txt, ver1, and file.1. I'd want to do something that would return ver1.txt and ver1, but not file.1, if that helps any. I've tried using something like ls *[1.]* but that's not doing what I want...


I have created a bib file the contents of which are :  @article{han2014semantic,   title={Semantic context-aware service composition for building automation system},   author={Han, Son N and Lee, Gyu Myoung and Crespi, Noel},   journal={Industrial Informatics, IEEE Transactions on},   volume={10},   number={1},   pages={752--761},   year={2014},   publisher={IEEE} }  @inproceedings{karademir2013dynamic,   title={Dynamic interactive voice response (IVR) platform},   author={Karademir, Ramazan and Heves, Emre},   booktitle={EUROCON, 2013 IEEE},   pages={98--104},   year={2013},   organization={IEEE} }  @inproceedings{xu2010design,   title={Design of hierarchical and configurable IVR system},   author={Xu, Shanchuan and Gao, Wanlin and Li, Zhen and Zhang, Shuliang and Zhao, Jianing},   booktitle={Computational Intelligence and Natural Computing Proceedings (CINC), 2010 Second International Conference on},   volume={2},   pages={205--208},   year={2010},   organization={IEEE} }   When I include it in my document with,  \bibliographystyle{model1-num-names} \bibliography{references.bib}   I don't get my list of references. What is the issue here?


Stream media from Ubuntu 12.04 to Xbox One

Not sure if this is an Ubuntu question, but I've posted in Xbox forums too, so hopefully I'll get some help!  As the title says, I'm looking for a way to stream media from my Ubuntu 12.04 laptop to my Xbox One console.. any ideas?  I've done a bit of research, and so far I can see that the Xbox One only supports playing media from a dlna server via a 'play to' feature, i.e. it can't pull files from the server, the files need to be pushed from the server (my laptop) to the console, so I was wondering if there is anything that will work on Ubuntu that will give me this feature..


Generating TIN from DEM using MacOSX/Unix tools?

I'd like to generate a 3d terrain model moving from a DEM dataset (currently in shp and GeoTIFF format).   As far as I understand it, the first step of the better path would be generating a TIN, but I can't find the way to do.   I found a lot of references to ArcGIS 3D Analyst, but no tools in MacOSX/Unix world.   Are there any?


I have asked similar questions here, but I still don't understand the following:  If I have a metric e.g. $$d(x,y) = |x^3 -y^3|$$ why is translation invariance and homogeinity preventing me from simply defining the norm as $$||x|| = d(x,0)$$?


Prove $\forall a,b,c \in \mathbb Z$, if $ab+ac\equiv 3\pmod 6$ then $b \not\equiv c \pmod 6$ by contraposition

Prove by contraposition:      $(\forall a,b,c\in\mathbb Z$) if $ab+ac\equiv 3 \pmod 6$ then $b  \not\equiv c \pmod 6.$   So, by contraposition，it is  $\forall a,b,c\in\mathbb Z,$ if $b \equiv c \pmod 6$, then $ab+ac\not\equiv 3 \pmod 6.$  No idea for next step


I am going to check if a JLabel is the same as a name of a tv show.  I have the code   public int lastEp() {     if(name.getText() == "Dexter") {         switch (season) {         case 1:             return 12;         case 2:             return 12;         // etc.         }     }     return -1; }   I have checked in console what i get from name.getText() and the console prints "Dexter". Still my if statement wont return true. System.out.println(name.getText() == "Dexter") gives false, while System.out.println(name.getText() + " " + "Dexter") gives "Dexter Dexter". What is happening?  Also bonus question, if anyone know what i should return instead of -1 if no other option fits, if there is a good standard to follow.


Alien invasion movie, giant robot aliens with long legs capturing people

So I saw this movie about 10 years ago, when I was about 5 years old. Since I was really young, my memory of it isn't really that great.   I think it may have been an alien invasion movie, but the only scene I remember is that there were these giant robot-alien things:   I think they had several long legs. They had a big glass dome on top of them They would grab civilians and drop them in their glass dome.   That's all I remember. If you could please help me out, that would be great.   Again, I was about 5 years old when I watched it, so my memory of it isn't that great, but I hope you know what I'm talking about. Thanks so much :)


How to create generic array of class with two type parameter and constrain?

I'm trying to create generic array in java but it results in error. Can any one help me on this?  Please find my code below:  public class GenericArrayTest<TKey extends Comparable,TValue>                                    implements Iterable<Map.Entry<TKey,TValue>> {   private TKey[] _arrayCOll;    public void test(){     _arrayCOll = new TKey[10];//error "Cannot create a generic array of TKey"   }    @Override   public Iterator<Entry<TKey, TValue>> iterator() {         // TODO Auto-generated method stub         return null;   }  }   Note: I could not know the class type so that i could not use the below solution   Thanks in advance. Sarath


i wanted to ask How to install Ubuntu 14.04 dual boot . i have windows 8.1 pre-installed and i downloaded the Ubuntu 14.04 and i want to dual boot them . please tell me how do i do that. please do help.


flat tyre even after replacing the tube?

So I bought a used Specialized Sirrus 2011 model as my first bike (so I'm new here) recently and I love riding it, light weight, smooth handling and comfy to ride. Rear wheel was flat when I bought it so guy gave me some money to replace the tube.   I took the bike home and removed the tyre (tyre size is 700*28cc), took out the tube and I could see a puncture on the tube when I inflate it. Was quite happy as I found the reason for the flat tyre. I replaced the tube ride for about 30 mins and put it back in the garage. But on the very next day, the tyre was flat again.   I took the tube out, inflated it but couldn't find a puncture. So I left the inflated tube for few hours and could see that it's deflated a bit. I checked the rim to see if there are any spokes sticking out and no, seems it's all good. Couldn't find anything on the tyre as well.  So anyway, I inflated even more, hoping to find the puncture in the tube. I was squeezing the tube and it got BLASTED!    Now I'm wondering what to do? Should I try with another tube? Also the given that the rear tyre is quite worn out and could see wear marks (rubber on the top center has brown color here and there), and has fibres coming out from sidewalls.   If I put a new tyre and a tube, this should solve my issue right? As there are no visible spoke problem with the rim. This's driven me really impatient, what should I do?


How to prove the following:  For any complex numbers $z_1,...,z_n$, there exists a subset $E$ of $\{1,...,n\}$ s.t. $$\left| {\sum\limits_{j \in E} {{z_j}} } \right| \geqslant \frac{1}{6}\sum\limits_{j = 1}^n {\left| {{z_j}} \right|} $$


How to update grub on a dual boot machine?

I have a machine which installed a ubuntu 16.04 on one partition and a ubuntu 16.10 on another. I have a 200m partition which mounts /boot/efi.  Basically I use 16.04 and use the grub installed by 16.04.  Sometimes I get on 16.10 and update the kernel. However, I cannot update the grub of my 16.04 without entering it. So I have to do grub-install on 16.10 in order to boot the new kernel. Then when I come back to 16.04, I update-grub and grub-install, which is stupid I think.  How can I update the grub of 16.04 without entering it, is there a good solution?  Can I do something like updating the grub config file or using another partition as /boot? Is this kind of operation dangerous?


URLs behind a Reverse Proxy of subdirectory starting with '/'

I have nginx acting as a reverse proxy. URLs of the form https://example.com/dir/... are proxied to the internal server listening at http://localhost:8080/. location /dir/ {       proxy_pass http://127.0.0.1:8080/; }  Links in that server are handled fine if they do not begin with a initial /. Those that do point to https://example.com/... rather than example.com/dir/....  Is there any way, without altering the server's code, to fix this so links on that server behave as desired (e.g. act like they would if they weren't behind this proxied subdirectory). Basically I'd want to set up nginx so that the server behind the proxy will to be able to use the same code whether it is a proxied subdirectory or on its own subdomain.


In the X-Men movie franchise, were the third and fourth movie written out of the timeline?

Much like Superman III and IV were kind of just...ignored... was it the same with the 3rd and 4th X-Men movies when X-Men: First Class came out?  It seems that most of the inconsistancies with the First Class story come from the last two movies' story lines, so I was just curious.


Why does the variance of the Random walk increase?

The  that is defined as $Y_{t} = Y_{t-1} + e_t$, where $e_t$ is white noise. Denotes that the current position is the sum of the previous position + an unpredicted term. You can prove that the mean function $\mu_t = 0 $, since $$E(Y_{t}) = E(e_1+ e_2+ ... +e_t) = E(e_1) + E(e_2) +... +E(e_t) = 0 + 0 + \cdots + 0$$ But why is it that the variance increases linearly with time? Does this have something to do with it's not “pure” random, since the new position is very correlated with the previous one? EDIT: Now I have a much better understanding by visualizing a big sample of random walks, and here we can easily observe that the overall variance does increase over time,  and the mean is as expected around zero. Maybe this was trivial after all, since in the very early stages of the time series (compare time = 10 with time = 100) the random walkers have not had yet the time to explore as much.


How to Handle NullpointerException when Query throws Exception?

I am having one query.That query is having an input,If the input found in Database then it will return sum value. If the input is not found in db then it will throw exception.  String Query="SELECT SUM(tot) FROM Test where Id=?";  double sum = getJdbcTemplate().queryForObject(         Query, new Object[] { Id }, Double.class);  return sum;   If the Id present In db then It will return sum value.Otherwise It will return NullPointerException.I want to Handle that exception.If I got NullPointer then I want to set Sum value as 0.


Lubuntu 20.04 - unable to conect to wifi

I installed lubuntu 20.04 from a live usb, dual boot with Windows 10. I don't know how I missed it it during installation, but both the live and installed version are unable to connect to wifi. To be more specific, after boot, I get a notification that I was connected to a wifi, and clicking the connetion manager in the taskbar shows all available networks around correctly. However, after a few seconds, all wifis disappear, and nothing brings them back. To me, the issue seem to be that wlo1 is disabled. sudo lshw -C network  *-generic DISABLED            description: Wireless interface    product: RTL8822BE 802.11a/b/g/n/ac WiFi adapter    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:02:00.0    logical name: wlo1    version: ff    serial: 40:5b:d8:4d:3c:e1    width: 32 bits    clock: 66MHz    capabilities: bus_master vga_palette cap_list ethernet physical wireless    configuration: broadcast=yes driver=rtw_pci driverversion=5.4.0-47-generic firmware=N/A latency=255 link=no maxlatency=255 mingnt=255 multicast=yes wireless=IEEE 802.11    resources: irq:157 ioport:3000(size=256) memory:a1200000-a120ffff  this can be confirmed with ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo    valid_lft forever preferred_lft forever inet6 ::1/128 scope host     valid_lft forever preferred_lft forever 2: wlo1: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 link/ether 40:5b:d8:4d:3c:e1 brd ff:ff:ff:ff:ff:ff  (state DOWN). One solution I found online was sudo ip link set wlo1 up, however that either immidiatelly finishes executing and fixes nothing, or after a short waiting returns RTNETLINK answers: Operation already in progress. In similar questions, I saw people asking for lspci -knn | grep Net -A3; rfkill list, so here it is: 02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter [10ec:b822] (rev ff)     DeviceName: WLAN     Kernel driver in use: rtw_pci     Kernel modules: rtwpci  0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no  1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no  Thank you for your help!


Python dictionary from an object's fields

Do you know if there is a built-in function to build a dictionary from an arbitrary object? I'd like to do something like this:  >>> class Foo: ...     bar = 'hello' ...     baz = 'world' ... >>> f = Foo() >>> props(f) { 'bar' : 'hello', 'baz' : 'world' }   NOTE: It should not include methods. Only fields.


If we define on $C([0,1])$ the operator $$ Tf(x) = \int_{0}^{1} K(t,s) f(s) ds$$ where $K$ is a continous function on two variables. I want to show that:  $1)$ $||T|| = \displaystyle\max_{t} {\int_{0}^{1} |K(t,s)| ds} $  $2)$ When $K(t,s) = \displaystyle\min(t,s)$, to prove that $T$ is compact  Thanks.


I just began filling out a survey for a contest that Walmart is hosting. Since I live in Canada there is a skill testing question which was as follows: $$(4×2)+(6/3)?5=$$ The answer to the equation was omitted.  What kind of mathematical significance does the question mark hold?  I have tried Googling the equation for an explanation, but to no avail.  Is the equation bunk?  FWIW, the answer turned out to be 5... so obviously the question mark represented a subtraction symbol, but how was I ever supposed to induce that if the answer is/was omitted?


How does memory gets allocated for string literal in c and do we need to free it? EG  char *k="hello world";   where does this string gets stored and how does it gets de-allocated?


What's the name of PHP functions that change parameter values?

I noticed that some php functions have the power to change a variables value by simply calling the function and others do not. For instance, consider trim() and sort() which both perform an "action:"  //trim() $string = "     Test"; echo $string."
"; trim($string); echo $string."
"; //each echo returns the same. trim() does nothing for the second echo   However, with sort():  //sort() $fruits = ['squash','apple','kiwi']; foreach($fruits as $fruit){     echo $fruit."
";     //returns array in original order } sort($fruits);  foreach($fruits as $fruit){     echo $fruit."
";     //returns sorted array }   I know the correct way to use both (done it a 1000 times). But what is the technical term for the difference between how these two functions work? sort() modifies its' variable (to some extent) but trim() does not.


If $\operatorname{ran} F \subseteq \operatorname{dom} G$, then $\operatorname{dom}(G \circ F) = \operatorname{dom} F$.

THEOREM: If $ \text{ran } F  \subseteq \text{dom } G $    then $\text{dom }(G \circ F)= \text{dom }F$  PROOF: if $ F\subseteq  A \times B$ and  $ G\subseteq  B\times C$  then by definition  $$\text{dom }F=A \\\text{ ran }F=B$$ $$\text{dom }G=B\\\text{ran }G=C$$   Now  $(G \circ F)\subseteq A \times C$  by definition   so   $\text{dom}(G \circ F)= A =\text{dom}F$   $ QED $


Proof by induction that $\sum$ $n\choose k $ $= 2^n$

Trying to prove by induction that  $\sum^{i=n}_{i = 0}$$n\choose i$$=2^n$  So obviously, I prove for some arbitary number, i.e $n = 2$  I then go on to show what the n = k terms look like for the first 3 terms  Then I realise to show that it is the same for $n = k+1$, I need to show that:  $2\times(n=k)\equiv (n=k+1)$  Yet when I try and work out the algebra I keep coming excruciatingly close but to no success, am I going about this proof the wrong way or? I've redone my calculations multiple times so there are no errors in my algebraic simplification.  Could it be that I need to go about this another way instead of trying to show it is $2\times n=k$


What is the meaning of this two letter code in the YouTube logo?

I see a new logo with CA at youtube.com. Does anyone know what it means?


\[  \left| \dfrac{(1-\beta e^{i\theta}) \sum_{k=2}^{\infty}(k-1)[1+\gamma(k-1)]  \alpha_k\beta_k z^k}{B(1-\beta e^{i\theta}) \sum_{k=2}^{\infty}(k-1)[1+\gamma(k-1)]   \alpha_k \beta_k z^k -[(A-B)(1-\alpha)][z+\sum_{k=2}^{\infty}[1+\gamma(k-1)]  \alpha_k \beta_k z^k]}\right|<1 \]


Saving damaged HDD (Win10-Sys) on Linux Mint

Device with problem: Hard disk drive (1TB, internal, notebook, Windows 10)   Rootcause: physically damaged (something hit the notebook), BIOS asked for a bootable disk.  USB-Live-Stick worked perfectly with the notebook, conclusion -> problem only with HDD. When I tried to open/mount the HDD, an error-message occurred: ".. try in read-only mode.."   Goal: recover data Goal: save the disk (if possible)   Solutions tried so far:   Windows-Recovery-USB-Stick created with another Windows 10 Start-help: unsuccessful. Recoverypoint: unsuccessful. "chkdsk /f /r" with runtime of around 48 hours: unknown error 6e74667363686b2e b05 at 99% of phase 4 (I guess, since 5 is on empty space) and 10% or 11% overall connected to another notebook with Linux Mint via USB to S-ATA I can read the HDD via "disks" (see picture)  "sudo mount -t ntfs /dev/sda4 /media/winhdd" with no response (had to abort with CTRL+C, tried ..sda1.. as well)   How to proceed next?  EDIT: Since this question has been marked as "exact duplicate of an existing question" I am asked to "explain how it is different". How can I see the question which seems to be alike?  EDIT2: Ok, saw it on top of mine now, will review it's answers and come back afterwards. Please give me some time to do this.


Is the 2DS region locked? Will I be able to play NA games on a Japanese System?

If I purchase a 2DS from Japan, will I be able to play American games on it?


How can I write this letters (in blue) in LaTeX ? its look like $z$   Some help would be appreciated


Rebounding your own miss when the ball only hits the backboard

is it legal to dribble the ball after rebounding your own miss when the ball only hit the backboard?


Use Stokes's Theorem to show $\oint_{C} y ~dx + z ~dy + x ~dz = \sqrt{3} \pi a^2$

I am a little stuck on the following problem:  Use Stokes's Theorem to show that  $$\oint_{C} y ~dx + z ~dy + x ~dz = \sqrt{3} \pi a^2,$$  where $C$ is the suitably oriented intersection of the surfaces $x^2 + y^2 + z^2 = a^2$ and $x + y + z = 0$.  OK, so Stokes's Theorem tells me that:  $$\oint_{C}\vec{F} \cdot d\vec{r} = \iint_{S}\operatorname{curl} \vec{F} \cdot \vec{N} ~dS$$  I have calculated:  $$\operatorname{curl} \vec{F} = -\vec{i} - \vec{j} - \vec{k}.$$  I then figured that on the surface $S$ we must have:  $$\vec{N}dS = \vec{i} + \vec{j} + \vec{k}dxdy$$  since this follows from the equation of the given plane.  However this will then give me:  $$\operatorname{curl} \vec{F} \cdot \vec{N} = -1 -1 -1 = -3$$  And thus I would get, if project this onto the $xy$-plane:  $$\iint_{S} \operatorname{curl} \vec{F} \cdot \vec{N} ~dS = -3 \iint_{A} dA = -3 \pi a^2$$  which is obviously not correct.  I would greatly appreciate it if someone could help me with this.  I actually had multivariable calculus a few years ago, and I know that I knew this stuff then.  However, now that I need it again I notice that I've become quite rusty.  Thanks in advance :)


I am trying to find the correct opposite of a delegate in the context of a person being a representative of someone else that have allowed or chosen them to be their delegate. What would you call that "someone else?" The only word I could find is a delegator (which isn't a real word in English) or assigner, but they are technical words rather than descriptive.    Any other word I could use?    Think of it in a sentence like this:       Here is a list of all the delegates in the company.   But that is the list of their _ _ _ _ _ (what can go here?).   I am trying to avoid fillers such as:  bosses, agents, managers, etc.


I got away some time and couldn't update my 19.04 Ubuntu in time. Now I'm stuck on 19.04 and can't find a way to update to any  working version. I fixed the apt update so it can still work (using older repos), but I can't go any further. I tried :  upgrading from this  this  too (can't get to 19.10 with dist-upgrade) and with the do-release-upgrade (see below)  Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Get:1 Upgrade tool signature [1 554 B]                                          Get:2 Upgrade tool [1 342 kB]                                                   Fetched 1 344 kB in 0s (0 B/s)                                                  authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'  extracting 'focal.tar.gz'  Reading cache  Checking package manager  Can not upgrade   An upgrade from 'disco' to 'focal' is not supported with this tool.  I'm kinda stuck and out of ideas, and I can't really do a clean install, I don't really want to loose some of my things that are a bit hard to backup


They agreed to stay connected for hours in their provisional support group, looking for answers in their counterparts.   I want to change the bold part to say that they all shared the same problem.  Might end up using one of the above, but I feel like I need some more options to weigh in.    Edit for context: they all share the same rare cognitive impairment


NFS umount fails to find directory in /proc/mounts

When mounting an NFS share manually using mount and a path of the form <domain/ip>:<path>/<path> or <domain/ip>:/<path>/<path>, umount fails to find the path in /proc/mounts, despite the fact that the path is in fact listed in /proc/mounts.  This is the same problem as in this question:   Steps to reproduce:  # mount --version mount from util-linux 2.24.1 (libmount 2.24.0: debug, assert) # mkdir mountpath # mount 192.168.2.101:/devices mountpath # umount mountpath /home/.../mountpath was not found in /proc/mounts # grep mountpath /proc/mounts 192.168.2.101://devices /home/.../mountpath nfs4 rw,[snip],addr=192.168.2.101 0 0   How can I unmount this mount?


refresh a production org to a starting point

I have a production org to which i deployed metadata from dev sandbox using Ant. There is no connection between dev sandbox and production. How can i refresh the production org to a starting point ?


Appropriate dash to use when attributing a quotation?

If I’m citing a poem or quotation, what kind of dash precedes the author’s name? For example:  This Business of Printing; which I am heartily tired of, and repent I e’er attempted....  —John Baskerville  Should this be an em dash, an en dash,  or something else? And should there be a space between the dash and the author’s name?


I have the following situation:  [ORACLE]/u01/app/grid/12.1.0.2/network> ll total 20 lrwxrwxrwx. 1 root root 36 May 11  2016 admin -> /u01/app/grid/12.1.0.2/network/admin [ORACLE]/u01/app/grid/12.1.0.2/network> cd  /u01/app/grid/12.1.0.2/network/admin -bash: cd: /u01/app/grid/12.1.0.2/network/admin: Too many levels of symbolic links   I am not sure who or why the symbolic link was created, but I would like to remove it without removing the contents of the admin folder.  Is it just rm admin or is there a different command?


C# get member's type ignoring it's value?

How can I get a Type of member, ignoring its value ?  public static class Program {      public static String a {set; get;}      public static void Main()     {          a = null;          a.GetType(); //Cant do that, it's null, how can i get "String"?     }  }


Advantages of Box-Muller over inverse CDF method for simulating Normal distribution?

In order to simulate a normal distribution from a set of uniform variables, there are several techniques:    The Box-Muller algorithm, in which one samples two independent uniform variates on $(0,1)$ and transforms them into two independent standard normal distributions via: $$ Z_0 = \sqrt{-2\text{ln}U_1}\text{cos}(2\pi U_0)\\ Z_1 = \sqrt{-2\text{ln}U_1}\text{sin}(2\pi U_0) $$ the CDF method, where one can equate the normal cdf $(F(Z))$ to a Uniform variate: $$ F(Z) = U $$ and derive  $$Z = F^{-1}(U)$$      My question is: which is computationally more efficient? I would think   its the latter method - but most of the papers I read use Box-Muller -   why?   Additional information:  The inverse of the normal CDF is know and given by:  $$F^{-1}(Z)\; =\; \sqrt2\;\operatorname{erf}^{-1}(2Z - 1), \quad Z\in(0,1).$$   Hence:  $$ Z = F^{-1}(U)\; =\; \sqrt2\;\operatorname{erf}^{-1}(2U - 1), \quad U\in(0,1).$$


Tensorflow and Python: Why two same operations have small error in output

I was working on tf.matmul op with multidimensional input arguments. For example given in code below,  import tensorflow as tf import numpy as np  nn_arch = [100,1200] batch_size = 128  n_ = np.random.normal(size=[batch_size,nn_arch[1],nn_arch[0]]) w_ = np.random.normal(size=[nn_arch[1],nn_arch[0]]) x_ = np.random.normal(size=[batch_size,nn_arch[0],1])  n = tf.constant(n_) w = tf.constant(w_) x = tf.constant(x_) nw = n + w c = tf.matmul(nw,x) sess = tf.InteractiveSession()  c_ = np.zeros(shape=[batch_size,nn_arch[1],1]) for i in range(batch_size):     c_[i,:] = (n_[i,:,:] + w_).dot(x_[i,:,:])  print(sess.run(c)-c_) print(np.max(np.abs(sess.run(c)-c_)))   This function will print the last line with value of the order of 1e-15. Why is there a this small amount of difference between two ops, that are basically doing same calculations at same precision float64?


Lower bound on the size of the universe, if closed

As the measurements show the flatness of our universe is approximately 1 but the measurements are with a slight error. If we assume that the flatness is greater than 1 but still within the error of measurements, how big would the universe be?   I understand that the total size of the universe would thus be much bigger than the visible universe, but how much?


I've an update statement which uses 2-3 tables. It runs in less than a second in QA but it takes forever in Prod. The number of records are exactly same and all the indexes are same too. In fact Prod server is an stand alone box while QA is a VM and have Dev,QA and Stage SQL Server instances on one server. So in that way Prod is better equipped than QA or Stage as it has more memory and more h/w.  And it's not just one update statement which has this issue. There are some other selects too which runs in lower environments but they don't move at all in Prod. I tried these codes to run when no one is on Prod.   My dba restored the prod copy to another instance. where no user has any access. And then he tried to run the same query. Again, it runs in QA but not in prod and not in the new instance. What could be the possible things which We should look for?   The update I'm running is -  UPDATE d Set Status = 'Active'  FROM DimesionTable D  INNER JOIN StageDB.dbo.StageTable a on d.PublicID = a.PublicID  WHERE EXISTS(SELECT 1 FROM StageDB.dbo.Table1 p       INNER JOIN Table2 d ON p.PublicID = d.PublicID       WHERE p.RetroFlag = ''       AND p.AccountID = a.RowNumber       AND d.IsActive = 1       AND (p.CancellationDate is NULL       OR p.CancellationDate > GETDATE()       OR p.CancelFlag = 'Cancelled')  AND GETDATE() BETWEEN p.StartDate AND p.EndDate) AND d.AccountID > 0       I'm ruling out blocking as I tried in off hours in Prod as well as in the new environments where no one has any access.  I looked in sys.configurations, and the only differences I found are:   max degree of parallelism - Prod - 8      | QA - 0 max server memory (MB)    - Prod - 472064 | QA - 256000   Both servers have 8 CPUs. I double checked all the involved tables and all have the same indexes. Still the query plans are different. And the suggested index by SQL Server is different too. My understanding is - if the tables has exact same structure, then query plan and suggested indexes should be same.  Indexes and statistics are getting updated nightly. And data distribution is also exactly same. No difference at all. We restored the prod database on a separate instance and there too we have the same issue. In fact, it's not just this query, there are other queries too which is having the same problem. I'm more concerned about something wrong with the server rather than the query. All these queries run in just few secs or a min or two in QA but they won't finish at all in prod or the new test environment restored from Prod.  Tempdb configuration:   QA   - Size - 122880 MB, Available - 97277 MB Prod - Size - 174080 MB, Available - 148476 MB   Total 8 files in each server.    QA - 1st one's initial size is 25600 and rest 10240, auto growth - 5120 MB unlimited Prod - 1st one's initial size is 76800 and rest 10240, auto growth - 15% unlimited   Initially STG was created from QA and it used to run on STG. But when we created STG from PROD, it's not running there either. The compatibility is set to 120 on both the instances.


Somehow, the lines in my document are all ragged, i.e. the further use of \raggedright does not change the document. I do not know the command to undo this (I believe not ragged is the preset). Here are the packages I'm using, could it be one of them responsible for this?  \documentclass[12pt]{article}  \usepackage[letterpaper]{geometry}  \geometry{top=1.35in, bottom=1.35in, left=1.35in, right=1.35in}  \usepackage{setspace}  \usepackage{amsmath}  \usepackage{amssymb}  \usepackage{float}  \doublespacing  \usepackage{rotating}  \usepackage{multirow}  \usepackage{lineno}


Primes $p$ in which $3$ is a primitive root modulo $p$

I want to show that if $3$ is a primitive root modulo $p$ if $p$ is a prime of the form $2^n+1$ for some $n>1$.  First, I wrote $3^{p-1} \equiv 1 \mod p$. Then writing it as $(1+2)^{p-1}$, we see that $p| 2+ \dots 2^{p-1} =2^p - 2$ and I stuck at this point.  Also, by a theorem we can see that $3 $ is a quadratic residue modulo $p$. I wrote $3 \equiv n^2 \mod p$ but that is not helpful too.  So, how can I prove this theorem?


I installed ubuntu inside windows 7 using VMware. I wanted to execute a c program in ubuntu.  when I tried I got like this,  b@ubuntu:~/examples$ vim a.c The program 'vim' can be found in the following packages:  * vim  * vim-gnome  * vim-tiny  * vim-gtk  * vim-nox Try: sudo apt-get install <selected-package> b@ubuntu:~/examples$ sudo apt-get install vim [sudo] password for b: Reading package lists... Done Building Dependency tree Reading state information... Done Package vim is not available, but is referred to by another Package. This may mean that the package is missing, has been obseleted, or  is only available from another source  E: Package 'vim' has no installation candidate I tried apt-get install vim  E: Could not open lock file /var/lib/dpkg/lock - open (13:Permission denied) E:unable to lock the administration directory (/var/lib/dpkg/), are you root?   when I tried to do su it asked me for a password . When I typed the root password its not accepting it and says "Authentication Failure"  I could not install the Vim package. Is there any way I can install it? Please suggest me. How do I regain my root paswword.


How can I draw  this is  figure?      \documentclass[12pt]{book}  \usepackage[top=25mm,bottom=25mm,left=25mm,right=25mm]{geometry}  \usepackage[all]{background}  \usepackage{ptext,xcolor} %\usepackage{showframe}  \usepackage{tikz} \usetikzlibrary{calc}   \usepackage{changepage} \strictpagecheck   \usepackage{fancyhdr} \fancyhf{} \fancyhead[LO,RE]{\thepage} \fancyhead[LE]{عنوان کتاب} \fancyhead[RO]{\leftmark} \renewcommand{\headrulewidth}{0pt} \pagestyle{fancy}   \usepackage{xepersian} \settextfont[Scale=1.2]{Yas}  \linespread{1.5}  \newcommand*{\vsp}{2cm} \newcommand*{\hsp}{2.5cm}  \newcommand{\MyTikzLogo}{%  \begin{tikzpicture}[remember picture,overlay] \checkoddpage \ifoddpage     \draw  [color=magenta,line width=1mm] ($(\paperwidth+\hsp,-\vsp)$) --($(\hsp,-\vsp)$); \else     \draw  [color=cyan,line width=1mm] ($(0,-\vsp)$) --($(\paperwidth-\hsp,-\vsp)$); \fi  \end{tikzpicture} }  \SetBgContents{\MyTikzLogo} \SetBgPosition{current page.north west} \SetBgOpacity{1.0} \SetBgAngle{0.0} \SetBgScale{1.0}  \begin{document}  \chapter{titel}  \section{sec }  \ptext[1-40]   \end{document}


Linking outer Control Field to the inner field and MU calculation

If we have 2 control fields within each other and after the 2 fields are created we connect the outer CF to the Inner CF do we still get MU points for the 2 original CFs and the last 2 CF points after the connection is made?


Simple counter example to show box-dimension is not finitely stable?

I'm reading Kenneth Falconer's "Fractal Geometry" and it mentions on page 35 that box-counting dimension is not finitely stable. That is, in general it is not always the case that  $$ \dim_B (E \cup F) = \max (\dim_B E, \dim_B F)$$  But rather, this property is only true for the upper box-counting dimension (box-counting dimension defined by taking the upper limit).  I've been trying to think of a counter example to see why this is, but I can't think of one. Is there any simple example? Or does it require complicated constructions to show it's not true in general.


Alternative to Dragon NaturallySpeaking?


how to install skype in ubuntu 61.0.1 (64-bit)

I'm trying to install skype in Ubuntu software or terminal, but always showing unable to install Skype, snap "skype" has "install-snap" change in progress. or cannot perform the following tasks. How to fix this?


How do I get a list of installed printers?

I'm searching for a possibility to get a list of installed printers. I'm using JDK 1.6 with a Windows operating system. Does anyone know a solution?   Thank you in advance.


Historical reason behind different line ending at different platforms

Why did DOS/Windows and Mac decide to use \r\n and \r for line ending instead of \n? Was it just a result of trying to be "different" from Unix?  And now that Mac OS X is Unix (-like), did Apple switch to \n from \r?


Prove this inequality: $\frac n2 \le \frac{1}{1}+\frac{1}{2}+\frac{1}{3}+...+\frac1{2^n - 1} \le n$

$\dfrac{n}{2} \le \dfrac{1}{1}+\dfrac{1}{2}+\dfrac{1}{3}+...+\dfrac{1}{2^n - 1} \le n $  I've Tried for hours but didn't got any striking idea. I don't have any efforts to show rather than induction. Please Try If you 've non-inductive proof.


If $F$ is a free module then $-\otimes F$ is an exact functor

For any module $M$, the functor $-\otimes M $ is right exact. I want to show that if $F$ is a free module then $-\otimes F$ is a exact.   I could not see how to adapt the proof for the case of $M$ not being free to  this case.


Can we have some statistics about users who could overcome the post-ban?

We often come across questions on Meta where users complaint/rant that they can't ask/answer any further question; some come here for advice on how to overcome this restriction and re-juvenate their user accounts like the following one:      So, can we have some statistics about how many users are getting banned on a periodic basis and how many of them are able to recover and overcome this ban, what was the extent of effort required on their part to recover from this ban (amount of upvotes they had to receive, edit suggestions they had to made, etc), time period taken to overcome and other similar statistics which would help to assess the situation?


BibTex, non-ascii initials and nameptr f

I have a problem with BibTex – many citation styles use nameptr f. to show just the initial of author's first name. I have trouble using this if the name starts with a non-ascii character. BibTex produces some insane character such as Å and I get an inputenc error.  My guess is that BibTex, being unaware of non-ascii characters, probably just takes the first byte from the name regardless of whether the initial is actually a multi-byte character.  In any case – does anybody know of a solution other than switching to BibLatex?  Note also that using markup such as \v{S} in place of Š does not help – that only results in v. being listed as author's initial.  An MWE:  \documentclass{book}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \begin{document}  \cite{cube}  \bibliographystyle{apalike} \bibliography{bibliography}  \end{document}   And an MWE bib file:  @Book{cube,   Title                    = {Matematika ZD\v{S} v kocke},   Author                   = {Novovesk\'{y}, Š. and Le\v{c}ko, I.                               and Kri\v{z}alkovi\v{c}, K.},   Publisher                = {Bratislava/SPN},   Year                     = {1972} }   As I mentioned, you may try to use \v{S}, which compiles, but also does not work properly:  @Book{cube,   Title                    = {Matematika ZD\v{S} v kocke},   Author                   = {Novovesk\'{y}, \v{S}. and Le\v{c}ko, I.                               and Kri\v{z}alkovi\v{c}, K.},   Publisher                = {Bratislava/SPN},   Year                     = {1972} }


What is a concise function that formats a (String) decimal into a currency format in Apex?

goal: write the most concise function that formats a (String) decimal into a currency format in Apex. Feel free to trainwreck the code for points, I've kept mine exploded for readability purposes.


Suggested reading for renormalization (not only in QFT)

What papers/books/reviews can you suggest to learn what  "really" is?  Standard QFT textbooks are usually computation-heavy and provide little physical insight in this regard - after my QFT course, I was left with the impression that Renormalization is just a technical, somewhat arbitrary trick (justified by experience) to get rid of divergences. However, the appearance of Renormalization in other fields of physics  approach in statistical physics etc.), where its necessity and effectiveness have, more or less, clear physical meaning, suggests a general concept beyond the mere "shut up and calculate" ad-hoc gadget it is served as in usual QFT courses.   I'm especially interested in texts providing some unifying insight about renormalization in QFT, statistical physics or pure mathematics.


Let $f: X\rightarrow Y$ be a map  Show that for any subset $C\subseteq Y$, one has  $f^{-1}(Y\setminus C) = X \setminus f^{-1}(C)$  In this case $f^{-1}$ refers to preimage  I started off with trying to show $f^{-1}(Y\setminus C) \subseteq X \setminus f^{-1}(C)$  Let $ x\in f^{-1}(Y\setminus C) \Rightarrow x \in f^{-1}(Y), x\notin f^{-1}(C)\Rightarrow x\in X, x\notin f^{-1}(C) \Rightarrow x\in X \setminus f^{-1}(C) \Rightarrow f^{-1}(Y\setminus C) \subseteq X \setminus f^{-1}(C) $  Then I tried to show $f^{-1}(Y\setminus C) \supseteq X \setminus f^{-1}(C)$  Let $ x \in X\setminus f^{-1}(C) \Rightarrow x \in X, x \notin f^{-1}(C)$ and since $ C \subseteq Y$ ,if $ x\notin f^{-1}(C)$ , $x$ must be in $f^{-1}(Y\setminus C)$ , so $f^{-1}(Y\setminus C) \supseteq X \setminus f^{-1}(C)$.  Could anyone tell me if this is the correct way to answer this question? It almost seems like I'm repeating the same argument and it looks too simple. Would appreciate if anyone could point out any mistakes or if i should be more vigorous in my working. Thank you!


I am a bit lost...I'm learning Java and have to program a small poll command line application.   We are supposed to program it in german first(to be consistent between us all), so I'll try to translate it, so it's easier to read for you. My problem is, that it's throwing an exception (while compiling) as following:     Exception in thread "main" java.lang.NullPointerException      at communication.Poll.addQuestionItem(Poll.java:18)      at main.PollTool.main(PollTool.java:8)   am I initializing my array "questionItems" wrong? Aren't I supposed to do it like that? What's wrong here? Did I forget something? :(  main.PollTool:  package main; import communication.Poll;  public class PollTool {      public static void main(String[] args) {         Poll poll = new Poll ("Best Smartphone:",3);         poll.addQuestionItem("iPhone");  //<--line 8         poll.addQuestionItem("Android");         poll.addQuestionItem("Windows Phone");          poll.askQuestions("This poll determines the polularity of different Smartphones.");      }  }   communication.Poll:  package communication; import java.util.Scanner; import calculations.QuestionItem;  public class Poll {     private String questionTitle;     private QuestionItem[] questionItems;     private int count;     private Scanner in = new Scanner(System.in);      public Poll(String s,int arraySize){         questionTitle = s;         questionItems = new QuestionItem[arraySize]; //<--problem here?     }      public void addQuestionItem(String s){         if(count<questionItems.length){             questionItems[count++].setItemText(s); // <--exception here         }     }      public void askQuestions(String topic){         System.out.println(topic);          System.out.println(questionTitle);         for(int i=0; i<questionItems.length; i++){             System.out.println("- - - "+ questionItems[i].getItemText() +" - - -");             System.out.print("Your numerical answer: ");             questionItems[i].vote(in.nextInt());         }     }      void evaluation(){         //not ready :)     } }   calculation.QuestionItem:  package calculation;  public class QuestionItem {     int count;      int overall;     String text;      public void vote (int pointValue){         overall += pointValue;         count++;     }     public double getDurchschnitt(){         return (double) overall/count;     }     public void setItemText(String s){         text = s;     }     public String getItemText(){         return text;     } }


How to make a yes/no option to control the shown text, using beamer, latex

I am making template for presentation slides using beamer class.  I want to let the user choose if this file is confidential or not. If yes, then shown it is yes; if not, then show it is no.  The following pseudo-code is what I want to do. Do you know how to achieve this functionality? Thanks.  \documentclass[20pt]{beamer}  \confidential{yes}  % yes or no  \begin{document}  \begin{frame}  \frametitle{Click}  \framesubtitle{Click}      \if\confidential=yes it is yes \else it is no \fi \end{frame}  \end{document}


how to return multiple values from get function in c++

I am basically passing two parameters in the private class and I am trying to access these two parameters in my main function. Since I made those two parameters private, I am using get and set functions to access these parameters, but I am not able to return two values from the get function. Please help me.  The last post that asked kind of same question, but this time it has been asked for object oriented concept.   class FirstClass{   public:     void setName(int x,int y){         a = x;         b = y; }     int getName(){     return a,b;       }   private:     int a,b; };


Can changing iPad motherboard to older version bypass iCloud lock?

I was curious to know if its possible to change the motherboard of an iPad to reset its software version? The iPad is locked to my friends late grandpa, and hence locked to his name.   I was using it without any problems until one fine day when the iOS upgraded from 6.0 to 7.0 and after that it was asking the iCloud password of the device, which unfortunately none of us knows. Then I kept the iPad as a decoration, until today, when it struck me, that probably changing the motherboard might help to reset the software version to an earlier iOS version.  Or are there any other possible technical solution to bring back the iPad to life, instead of running around solicitors and lawyers?   This is a genuinely bought family iPad / not stolen etc duly passed on to a family member.


Is Review.stackexchange messing with my mind?

I rejected a disaster area of an edit, and look what popped up:     Congratulations!      This was only a test, designed to make sure you were paying attention.   You passed.   How many more Easter Eggs are going to sneak up on me?  :-)


I'm creating a short slogan describing a website's functions. The website consists of a photos storage function plus discussion boards. This is an attempt to put it shortly:     Example.com is photos plus discussions   Is it correct? Particularly, I'm not sure using "is" with plural nouns is correct.


Is the mentioned method appropriate to solve $\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx$?

The integral is,  $$I=\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx$$ I know the answer would be $\pi$ and I know how to solve this using Feynman's method and Fourier transform. However I was trying something, rather naively, since by understanding of the subject is constrained to undergraduate mathematical physics. I did the following, taking the imaginary part of $e^{ix}$,  $$\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx=\Im\left\{\int_{-\infty}^{\infty}\frac{e^{ix}}{x}\, dx\right\}$$ Then I introduced a variable $\alpha$ where taking $\alpha=1$ would result in the required integral. So we have here, $$I(\alpha)=\Im\left\{\int_{-\infty}^{\infty}\frac{e^{i\alpha x}}{x}\, dx\right\}$$ Taking the derivative of $I$ with $\alpha$ we will get,  $$\frac{dI(\alpha)}{d\alpha}=\Im\left\{\int_{-\infty}^{\infty}ie^{i\alpha x}\, dx\right\}$$ We know that this is the definition of Dirac delta, $\delta(\alpha)$. Therefore, $$\frac{dI(\alpha)}{d\alpha}=\Im\left\{i2\pi\delta(\alpha)\right\}=2\pi\delta(\alpha)$$ Integrating with $\alpha$,  $$I(\alpha)=2\pi\theta(\alpha)+c$$ Where, $\theta$ is the Heaviside step function and $c$ is the constant of integration. Using $\alpha=-\infty$ from the initial equation we shall get $I(-\infty)=0$, which gives $c=0$. Therefore,  $$I(\alpha)=2\pi\theta(\alpha)$$ And putting $\alpha=1$ here, we have,  $$I=2\pi$$ Which isn't the required answer. I want to know where I am going wrong, which step, or if it's the entire method. I am also not aware of all the properties of the functions I used and this is just me fiddling with things, so I will be really obliged if anyone can help.  Edit for duplication claim: My question isn't exactly about how to solve the sinc integral using the known methods. I want to know what is wrong with the approach I am using, which I know is wrong, but I don't know what exactly is going wrong.  Edit after suggestion in comments: Okay assuming $\alpha=-\infty$ to calculate the integration constant's value, is kind of a blunder, since that's not gonna work. However, if I take $\alpha=-1$ this might work, and will give me,  $$I(-1)=-\int_{-\infty}^{\infty}\frac{\sin x}{x}\, dx=-I(1)$$ This means,  $$c=I(-1)=-I(1)$$ And that would give me,  $$I(\alpha)=2\pi\theta(\alpha)-I(1)$$ And now taking $\alpha=1$, $$I=\pi$$ And that matches the answer, however I am kinda skeptical if this approach is right.


I'm having an issue with a SQL Server log file which will not maintain a steady amount of space held on a HDD which it has been issued. The drive is ~50GB and the log file is growing to occupy this quite often.   The database is set to FULL recovery mode, with hourly differential backups. I understand that this should allow the log file to truncate and use space already allocated to it?   When checking the status of the log file using DBCC LOGINFO it returns that the status of most VLF's within the files are set to '2' which shows them as being active? We've 537 VLF's in the log file. I don't know why all these would be active at one point using 15GB of space?    I've checked the replication through DBCC OPENTRAN and it reports that there are no actively open transactions on the file.   Is there a method of maintaining this file I may of overlooked?   Is there anywhere I can go to determine exactly what the log file is doing?   Would replication interfere with truncating/shrinking the log file?   At present, it grows around 1.67GB per day. I've ~18 days before having to perform some emergency work on shrinking the file. I'd like it to stay below 25GB if possible so there is plenty of room to grow if this has a sudden need for space.


Closed form for the series: $\sum_{n=1}^{\infty}x^{n^2}$

Let $$S=\sum_{n=1}^{\infty}x^{n^2}, \quad|x|<1.$$  It is convergent and the sum is definitely less than $1/(1-x).$   Is there any closed form for $S$ ?


Is there any way I can query the Resources in Public Calendars and Resources? There does not seem to be any object related to the resources so if someone could help me out, it'd be great!


Can't find an icon to launch Ubuntu Tweak on Ubuntu 14.04

I've installed Ubuntu Tweak on Ubuntu 14.04 and I can only run it by going to the terminal and typing ubuntu-tweak.  There's no icon in the drop down menu. I installed GNOME flashback so I am just trying to get a launcher icon somewhere in the launcher. It's not in system settings either.


A book from the 70s/80s; boy breaks out of his dreary city life to find the country as bad

Was taught in UK schools in the 80s. The city was a grubby but sterile environment with the usual tropes of bloody sports and  I think high tech policing: then, through a big old fence was the country, very gentrified country piles, but the gent who takes our hero in has I think been lobotomised for being too passionate and thus we learn that aside from the wealth, amenities, health care, education, space and general comfort, the rich have it just as tough (!)


LaTeX, of course, has a protective mechanism that prevents you from doing some stupid things:  \newcommand\a{a} \newcommand\a{b} %% LaTeX Error: Command \a already defined.   Of course, if you know what you're doing, then you can circumvent it with \renewcommand.  However, some commands have their own definition mechanisms:  \newcommand\a{a} \DeclareMathOperator\a{a} %% LaTeX Error: Command \a already defined.   (and there is no \RedeclareMathOperator).  I've been getting around this by doing something awkward like:  \newcommand\a{a} \makeatletter \DeclareMathOperator\@a{a} \let\a=\@a %% \let (and \def) circumvents LaTeX's protection \makeatother   (Of course, the best thing to do would be to delete that original definition, but, in practice, it's in another package that I must include but whose source I do not control.)  However, it occurs to me that a hypothetical \undef command would do the job:  \newcommand\a{a} \undef\a \newcommand\a{b} %% No complaints   Does such a command exist?  If not, is there an easy way to write it?


Can't rezise Ubuntu partition from live usb

I have 300 GB approx that is unallocated so I tried to put that space on my Ubuntu partition that only has 90 GB approx. When I boot GParted from the live usb, it doesn't let me add that space.


Background notebook template with spiral

I would like to print a document with math text to look like the picture below:  However, I would like to be able to edit :   color of background  the position of spiral grid on/off       i tired this one from answer of Gonzalo Medina     \documentclass{article} \usepackage[vmargin=3cm]{geometry} \usepackage{tikzpagenodes} \usepackage{lipsum} \usepackage{background}  \definecolor{notepadrule}{RGB}{217,244,244}  \backgroundsetup{ contents={%      \begin{tikzpicture}     \foreach \fila in {0,...,52}     {       \draw [line width=1pt,color=notepadrule]        (current page.west|-0,-\fila*12pt) -- ++(\paperwidth,0);     }     \draw[overlay,red!70!black,line width=1pt]       ([xshift=-1pt]current page text area.west|-current page.north) --         ([xshift=-1pt]current page text area.west|-current page.south);   \end{tikzpicture}% }, scale=1, angle=0, opacity=1 }  \begin{document}  \lipsum[1-14]  \end{document}


I am importing a data table into a document and want the table to be within the text. When I import with \input{bodyrate}[htpb], the table is placed at the end of the document and [htpb] is printed instead. How do I get the table to be where I import it in the .tex file?  \documentclass[preprint]{aastex} \begin{document} \input{file}[htpb] \end{document}   the table file begins with:  \begin{deluxetable}{lccc} \tablecolumns{4} \tablewidth{0pc}   I tried creating a table environment, but am getting the error: "! LaTeX Error: Not in outer par mode."  \begin{table}     \import{file) \end{table}   Any suggestions?


Can I reapply immediately after a UK visa refusal?

I applied for a UK visitor visa in 2013 and I was refused because I did not explain the funds in my account. Now, in May 2017, I applied again and was refused again.    Can I reapply immediately? What do I need to provide to demonstrate a change in my circumstances? How do I explain how that the  money is from my sponsor, since I am a student and I choose to take care of the travel expenses myself.


how can I rename multiple files by removing a character or string?

As a follow-up to my , if I have multiple files of the form  sw.ras.001 sw.ras.002 sw.ras.003 …   What command can I use to remove the ras. in the middle of all the files?


UK visa requirement: Residence or citizenship?

On gov.uk's  it is indicated      Check if you need this visa if you’re visiting from outside the European Economic Area (EEA) or Switzerland"   “Visiting from” makes you understand that the country you regularly live in is relevant, thus you can avoid applying for a visa if you are visiting from Italy (as country of regular residency).  As a matter of fact, if you proceed to make the check, the question to answer is "What passport or travel document do you have?", not really consistent with the indication previously given.  So, what is relevant: the country you live in with regular documents (and where you leave from to visit UK) or the country of origin which issued the passport?  To be practical, a Moldovan who is an Italian resident with regular resident card and Italian ID card (but with the note "not valid for expatriation") can avoid applying for a visa if he wants to spend a week-end in London (thus visiting from inside EEA)?


Select Nth value from each group in Oracle

I have two tables as below  Table A    Key    Field1  Created_date   1234    a      Jan-18   1234    b      Feb-18   1234    c      Mar-18   4567    d      Mar-18   6789    e      Apr-18     Table B  Key Posted_date 1234    Mar-18 4567    Apr-18   I want to join table A with B on the field Key and select records with max(A.created_date) where A.created_date < B.posted_date. The table B has around 300 million records. Could you please help me out.  Result    Key Field1  Created_date   1234    b   Feb-18   4567    d   Mar-18


What are some good Numerical Analysis textbooks?

I have been doing some research lately about numerical analysis textbooks, but I have not found anything successfully. I was wondering if there is like some sort of standard, for example, whenever someone mentions Calculus, I would think of Spivak or Stewart. I do not have any background nor experience on the subject, so readability counts, and I am a first year undergraduate student. Hopefully I made my point.


How do villages spawn in Minecraft Pocket Edition? I would also like to know what I need to do to have a village spawn, e.g., if there is any specific biome it has to be in.


How to update the text a label from another Non UI thread in c#

I have a main that start a thread for my form. I want to update the label1 text from the main thread. I have created my delegate and my method to update it  but i don't know how to access the form thread and to modify the label1 text.  Here my code for the main:   public class Program {     /// <summary>     /// The main entry point for the application.     /// </summary>      [STAThread]     static void Main()     {         //Thread l'affichage de la form         Program SecondThread = new Program();         Thread th = new Thread(new ThreadStart(SecondThread.ThreadForm));         th.Start();            //Update the label1 text      }      public void ThreadForm()     {         Application.EnableVisualStyles();         Application.SetCompatibleTextRenderingDefault(false);         Application.Run(new Form1());      }  }   Here the code for my form1:    public partial class Form1 : Form {      public delegate void SetTextLabelDelegate(string text);      public void SetTexLabel(string text)     {         if (this.label1.InvokeRequired)         {             SetTextLabelDelegate SetLabel = new SetTextLabelDelegate(SetTexLabel);             this.Invoke(SetLabel, new object[] { text });         }         else         {             this.label1.Text = text;             this.Refresh();         }            }      public Form1()     {         InitializeComponent();     } }   How can i access to the form thread and to modify the label1 text ? I am using C# and .Net 4.5.


Greetings Fellow Designers  I want to print a vivid Cyan for a Business Card. Its hex code is #04f1d7. It was sent by my client to me and it was designed in RGB. Now the client is stuck on this option to print, while after converting to CMYK it becomes dull.   But I am getting as image below. Can anyone help me to solve this problem?      but I am looking to catch a straw.


Where does the angular momentum of the solar system come from?

We inhabit a system with significant angular momentum:    If our solar system formed by gravity gathering its material together to form the sun, proto-planetary disc, and eventually the planets, which all orbit in the same direction...  Where did this angular momentum come from in the first place, since angular momentum is conserved?  It does not seem possible to me that the formation of the solar system under gravity could impart this angular momentum on it, if it is a closed system. If it formed from a 'cloud of space dust', then it must have been present in that dust cloud, but where did the dust cloud get it from?


Finding element in binary representation of $GF(2^6)$

I got the following task:  Let $F = GF(2^6 )$ be K[x] modulo the primitive polynomial $h(x) = 1 +x ^2 +x ^3 +x ^5 +x ^6$ , and let $\alpha$ be the class of x. I have a table with the binary representation of the elements of $GF(2^6 ) = \{0; 1; \alpha^1; \alpha^2 ; ...; \alpha^{62}\}$.  Is there a quicker way to check $\alpha^{52}$ than performing a long division of $x^{52}$ by $h(x)$ ?  It has $2^6$ elements so after $\alpha^{62}$ it will be back to 1 again, but maybe there is some trick to find it faster rather than performing such a long division?  I have also $\alpha^{13}$ so it's $\alpha^{13^4}$, but no idea how to use it


Prove that $$\phi=\dfrac{13}{8} + \sum \limits_{n=0}^{\infty}\dfrac{(-1)^{(n+1)}(2n+1)!}{n!\,(n+2)!\,4^{(2n+3)}}$$,where $\phi$ is the golden ratio ($\approx1.6180$).  Evaluating the first few few partial sums makes it obvious that the expression approaches $\approx 1.61$ as the limit of the infinite sum is $\approx -0.007$. But is there any algebraic method to prove the same ?  Stirling's approximation seems to work a little but not much as the limit of the sum has to calculated and not the limit of the fraction. If there is no other known way than Stirling's, how should I properly implement it ? I have tried my best, but there does not seem any way out. As far as I think, only numerical method will help here.


Java non-static method cannot be refenced from a static context

I am new to java and having an issue calling a non static method  This is my main      public static void main(String[] args) {     Fish f1 = new Fish("Nemo");     Fish f2 = new Fish("Dory");     f2.setNumber(2);     Fish m = new Fish("Bruce");     m.setNumber(3);     Fish.printAllFish(); }   This is my fish class  import java.util.ArrayList; import java.util.List;   public class Fish { protected String name; protected int number; protected List<Fish> fishList = new ArrayList<Fish>();   public Fish(String in){ name = in; number = 1; fishList.add(this); }     public void printFish(){     System.out.println("the fish called" + name + " is number " + number ); } public void setNumber(int Number){     this.number = number; } public int getNumber(){  return number;    } public String getName(){  return name; } public int getFishNumOf(){     return fishList.size();  }  public void printAllFish(){     int size = this.getFishNumOf();     System.out.println("There are " + size + " fish:");     for (int i = 0; i < size; i++){         String a = getName();         int b = getNumber();         System.out.println("The Fish " + a + " is number " + b );     } } }   I  get the nonstatic error when trying to call printAllFish, I know I am probably making some rookie mistakes but I only just started to learn programming and things like classes, gets and sets still confuse me, any help would be very much appreciated!


I'm currently updating an old class written in mostly plain TeX into LaTeX (mostly for readability) and I changed a combination of hbox and vbox into a single parbox with all the optional arguments.   The problem is that this class was clever and when the text in the box overflowed, it attempted to typeset it in two columns instead of one. It did this using \ifnum\badness=1000000 which worked fine for the old hbox/vbox method but fails using the parbox method.   Is there some way to test the vertical badness of a parbox?  MWE  \documentclass{article} \usepackage{blindtext} \begin{document} % New code \noindent\parbox[c][3cm][t]{\linewidth}{   \blindtext }                               %parbox \ifnum\badness=1000000\relax \vspace{3em} THE PREVIOUS BOX HAS BECOME OVERFULLxs\fi%  \vspace{5cm}  \makeatletter % Old code \noindent\vbox to 3cm{\hbox{ \parbox{\linewidth}{ \blindtext }                               % parbox }%          hbox \vfill}%    vbox \ifnum\badness=1000000\relax \vspace{3em} THE PREVIOUS BOX HAS BECOME OVERFULL\fi% \makeatother  \end{document}


What is an intuitive interpretation of the 'events' $$\limsup A_n:=\bigcap_{n=0}^{\infty}\bigcup_{k=n}^{\infty}A_k$$ and $$\liminf A_n:=\bigcup_{n=0}^{\infty}\bigcap_{k=n}^{\infty}A_k$$ when $A_n$ are subsets of a measured space $(\Omega, F,\mu)$. Of the first it should be that 'an infinite number of those events is verified', but I don't see how to explain (or interpret this). Thanks for any help!


When I'm creating games, I really love the coding part -- designing, developing the main functionality and "core" part of the game. However, most of my games are reasonably small/easy in terms of coding, but require a lot of content -- whether graphics, levels, sounds, puzzles, story narrative, etc.  I find development speeds through the coding parts, but nearly halts when it comes to content creation -- it's tough, sometimes boring work.  What can I do to make content creation quicker and more interesting/fun? I'm already integrating content into a working game, and building/using tools as much as possible to quickly assemble my content.  Edit: my question is not about learning any particular labor-/time-intensive skills like drawing assets or picking out sound effects; it's about that psychological hurdle when you have to just sit down and grind out the rest of your game, even if it's not the most fun thing in the world to do.


Extending the "guess 2/3 of average" game to “guess of average" game

In game theory, 'Guess 2/3 of the Average' is a game where n people are asked to choose a real number between 0 and 100 inclusive. The person with the closest answer to 2/3 of the average value wins. It can be shown that there is a unique pure strategy Nash equilibrium where everyone picks the number 0.  Now if we change the rule to be whoever's answer is closet to the average value wins, how do we develop a strategy, or a Nash equilibrium now? The original thought process is no longer applicable.


In the Android app, can we have some option to mark a read notification to unread? I know that this option is not available in the web version of Stack Exchange sites. But sometimes I open the notification in the app and it opens the post, but sometimes I can't see the exact reply to my comment or where my name is mentioned using the app.   And I want those comments to be read from the web version of the Stack Exchange site. Sometimes I forget about replying to a comment since the notification is already marked as read. So I want to mark the notification as unread and have it as a new notification displayed in the mobile app and the web version too.


Footnotes (e.g. citations) in the footline of beamer frames?

I like to have references to images etc. on my beamer slides printed in the footline area of the frame, i.e. close to the bottom:    In the example I create the footnote 'manually' like this:   \begin{frame}{Testframe}    It is known\textsuperscript{1}    \footlinetext{\textsuperscript{1}en.wikipedia.org} \end{frame}   where the '\footlinetext' command has been created according to   My question is now: Can I redirect the output generated by '\footnote' commands to the footline via '\footlinetext' ? Specifically, I'd like to use Biblatex citation commands such as '\footfullcite' automatically generate the footnotemark and to fill the footline with the reference's information from the bibtex database.   So this code should produce the same output than above:  \begin{frame}{Testframe}    It is known\footfullcite{wiki-en} \end{frame}   assuming that 'wiki-en' is the Bibtex key for en.wikipedia.org


Error : could not start the command : pdflatex -synctex=1 -interaction=nonstopmode "main".tex

I checked several questions at this community about the issue but did not works out as a solution.  I am trying to run the LaTex code on my machine, but it stopped working for this file.   I have tried to reopen an old file that I have implemented before at my machine and it works fine without any error. Can anyone give a hint what shall I do to make it compilable?      Error screenshoted below.


Why do animations of Stern Gerlach show the tiny magnets in fixed orientation?

Anyone who's played with bar magnets knows that if you bring a bar magnet close to another tilted at some angle off axial to the other magnet, the one you're not holding will immediately flip to line up with the other that you're holding.   This would mean that every single tiny magnet sent in to the SG apparatus no matter the angle would immediately flip in to a vertical orientation in line with the applied field and be sent in a straight line through the apparatus, resulting in a single clump at the center.  Yet in most animations of the Stern Gerlach experiment (like this one here ), and indeed in explanations of the classical expected outcome of the experiment, we see the tiny magnets maintain their orientation throughout the trajectory through the magnetic field, and this is used as an argument as to why the tiny magnets are evenly distributed at the other end.  This has always bothered me why this is not reconciliated with our childhood experiences of playing around with bar magnets. Please note that I am NOT talking about the actual result of the experiment wherein the electrons formed two clumps one at the top and one at the bottom. I'm asking about the part where they explain the classical expectation of an even distribution.  My classical expectation is for only a single clump, right in the center because they all rotate line to up immediately entering the field and have equal magnetic forces up and down.   What is wrong with my expectation?


Unbiased estimator of a square root of chi-squared distribution

Let $Y_1,Y_2,...,Y_n$ be a random sample from $N(\mu,\sigma^2)$. I need to show that $S$ is a biased estimator of $\sigma$. As from the definition, I see that $\frac{(n-1)S^2}{\sigma^2}\sim\chi^{2}_{(n-1)}$. My thought process follows like this:    If $X\sim \chi^2_{n-1}$, then by definition $X\sim Gamma(\frac{n-1}{2},2)$.   Apply above definition to this problem. Since I need to find if $S$ is biased or not, I must compute the expected value of S.  I also know that $E[Y^a]=\frac{\beta^a\Gamma(\alpha+a)}{\Gamma({\alpha})}$ when Y is a gamma distribution. I should be able to apply the same concept to this problem.   After calculations, I obtain something like this:  $E[S]=\frac{\sqrt{2}\Gamma(\frac{n}{2})}{\Gamma{(\frac{n-1}{2})}}\times\frac{\sigma}{n-1}$  How do I prove that above is an biased estimator of $\sigma$? Obviously the value of the gamma functions change as the n changes (between even and odd). Is there a more systematic way of obtaining this? I'm not quite sure how to deal with this gamma function and go on to compare $E[S]$ with $\sigma$. Is there a way for me to simplify this gamma function further?


In my daughter's class of $23$, three students and the teacher all share the same birthday. Of course, there are $365$ days in the year, and the first case of the shared birthday is not counted in the probability. But is the likelihood of this just $$\frac{1}{365}\times 3 = 0.0082?$$ For my curiosity, leap years can be omitted.


Having difficulty placing Bounty on a question

I attempted just now (several times, with and without various "refreshes") to place a Bounty on . The Bounty dialog appears, but when I select an amount of 50 rep, neither the Next or cancel controls has any affect. The X-close control does work, and the Next button does go a darker shade of orange when I click it.  Same behaviour occurs if I select a bounty of 100-rep, so it's not just that I must specify a larger amount.  Does anyone know what I might be doing wrong? I have not placed a bounty on a question before.


Can "the sort of justifications" take plural verb agreement? If so, why?

... the sort of justifications it does or does not get differ greatly.   In the above sentence, the verb differ agrees with a plural. Is the subject sort or justifications? And, if sort, why is that not with an s?  Can anyone please explain this verb agreement? It sounds correct, but I seek an explanation of the subject, ideally providing grammatical terms.


Message about no longer required packages on every install through apt-get

I ran this command sudo apt-get install tor-browser and I got this output. Should I apply autoremove as mentioned?      sudo apt-get install tor-browser     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages were automatically installed and are no longer required:       linux-headers-4.4.0-21 linux-headers-4.4.0-21-generic linux-headers-4.4.0-22       linux-headers-4.4.0-22-generic linux-image-4.4.0-21-generic       linux-image-4.4.0-22-generic linux-image-extra-4.4.0-21-generic       linux-image-extra-4.4.0-22-generic linux-signed-image-4.4.0-21-generic       linux-signed-image-4.4.0-22-generic     Use 'sudo apt autoremove' to remove them.     The following NEW packages will be installed:       tor-browser     0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.     Need to get 69.5 MB of archives.     After this operation, 69.5 MB of additional disk space will be used.     Get:1 http://ppa.launchpad.net/webupd8team/tor-browser/ubuntu xenial/main amd64 tor-browser amd64 6.0.2-1~webupd8~0 [69.5 MB]


I'm trying to install netbeans-7.4-linux.sh on my 13.10 Ubuntu.    After using terminal sudo sh ./netbeans-7.4-linux.sh it is telling me cannot open netbeans-7.4-linux.sh.    How do I get past this?


Ok I hope I am mising something here as I really don't want this to be a bug.   The following piece of code returns 2. Per my understanding of the ceiling functionality, the result should be 3 because 7/3 is roughly 2.33333 and the ceiling should return 3.   Is this a bug or am I missing something? Thanks.   Integer pageNumber = (Integer) Math.ceil(7/3);   This returns 2 and not 3 as expected.   It works fine on other input. For example:  Integer pageNumber = (Integer) Math.ceil(8/5);   This returns 2 as expected.


Who's that big scary guy talking to Kylo Ren and Hux?

In The Force Awakens, Kylo Ren and General Hux go talk to someone who is shown as the hologram of a big, weird, and scary guy. They call him “Supreme Leader,” and he seems to be the power behind the ruler.  Who is he? Where does he come from? How was he tied into all of this?


Why has ls never had a parsable option implemented?

So we all know you  for many reasons, mostly due to filenames allowing almost every character.  However why has nobody been able to overcome this in an implementation of ls? Many commands have a command line argument that will output parsable text to stdout, often csv format. Now I know filenames can have commas but so can csv files, that is a simple fix using double quotes.  I guess another issue would be that filenames could also contain double quotes, but I still refuse that the open source hivemind couldn't find some solution to this.  What is preventing someone from implementing a parsable option for ls?


What is this black line around image in PDF?

The the psd file is a clean cut. Looks great (1)   Still looks good when brought into Illustrator (2)   But then as a PDF this ugly black line appears around the edges of the psd file (3)   Any ideas what causes this because it looks really bad sending this to the client?


Overstay France Schengen visa by one day

I made travel arrangements to travel to France between July 27 and August 10 with my family. I received a Schengen visa from the consulate of France from July 27 to August 10 for myself and my spouse, while my two children (12 and 17) received their visas from July 26 to August 9.  When I checked with the consulate, they told me it's not a problem if they stayed one additional day since they are with their parents. Is that normal?


I am relatively new to DSLR cameras, so I apologize for any potential ignorance. Since I have been using my Canon T3i, every time I attempt to take a close-up photo, the camera does not auto adjust and take the shot. I get red square dots that show in live mode or a blinking green dot in the viewfinder.   I have searched around trying to find answers, but I haven't found one yet. Does anyone have any idea what I am doing wrong?


Primitive element of the extension $\mathbb Q(\sqrt{2},\sqrt{3})$ over $\mathbb Q$

The title says it. I want to find an element $\alpha$ such that  $\mathbb Q(\alpha)=\mathbb Q(\sqrt{2},\sqrt{3})$.  I tried something like $\sqrt{2}+\sqrt{3}$ but that didn't help...


I have recently downloaded Blender. But because my laptop is old i'm thinking of buying this HP Laptop (Pavilion 17-e100sv) with these characteristics:  Intel Core i3-3110M Processor-2.40 GHz RAM: 4 GB - DDR3 SDRAM 500 GB - Serial ATA - 5400 rpm 2GB AMD Radeon HD 8670M graphics card.  Can you please tell me if these technical characteristics are enough for Blender? If not, what do you recommend in terms of RAM, etc?   Please help out, since I will only buy a new laptop for Blender and I don't want to pay for something and then realize that it will not perform when i render an animation.   Thanks a lot!


ArcGIS: fishnet with rotation angle and coordinates error

I have a micro plots map shapefile with NDVI data. I want to create a fishnet of polygons to divide the map into the micro plots. I have being able to create a fishnet with polygons but I cannot place it on top of my map.    I know my map has a -32 angle rotation. I have tried to modify the coordinates but still get the wrong placement for fishnet as you can see in the image.  I am now using ArcMap 10.5


In an observational study in causal inference, why are the covariates usually assumed to be iid? What happens if they are not?

Suppose that in an observational study with $N$ units, we have that $X_i$ are our covariates. I have read in several places that in order to calculate an unbiased treatment effect, the $X_i$ are assumed to be iid. I am wondering why this is necessarily the case, and specifically why the independence part is needed. What happens if we do not have:  $$ X_i \overset{iid}{\sim} F $$  for some distribution $F$? What if it is the case that there is a dependency structure for $X_i$ and $X_j$?   The unbiased estimation procedure I am referring to is from . Thank you.


Correct PPA to install Python 3 on Ubuntu 18.04 and 20.04

For Ubuntu 18.04 and 20.04 I need to install python 3. Currently 3.9.5 as I wrote this post. I watched some videos on youtube and read some tutorials. There are two different approaches One sudo apt install python3 [python-pip]`  Two sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt install python3.9   The situation is that about  says:  Team for maintaining unofficial Python packages for different releases of Ubuntu.  And in  says: This PPA contains more recent Python versions packaged for Ubuntu.  Disclaimer: there's no guarantee of timely updates in case of security problems or other issues.  If you want to use them in a security-or-otherwise-critical environment (say, on a production server), you do so at your own risk.  Update Note =========== Please use this repository instead of ppa:fkrull/deadsnakes.  Observation: The tutorials and videos based on ppa:deadsnakes are <1 year ago (they are not neither very old nor outdated) and even are for Ubuntu 20.04 and works. Question 1: When could be mandatory take the ppa:deadsnakes approach? So thinking in have always the latest, stable and secure python installed. Question 2: what approach is the correct? I am not sure, but seems there is no an official guide to install Python (latest version 3.9.5) on Ubuntu. Question 3: Is there an official (latest-stable-secure) Python repository for PPA?. For future So if Python at  releases the 3.9.6 version, then if sudo apt update upgrade is executed that new release must be installed


Seeking English term for relationship between two members of extended family?

Here at the Genealogy and Family History Stack Exchange we see many questions about relationship mapping which is also known as:   relationship calculation kinship terminology etc   If you are just trying to understand how to calculate "cousins and removes" then  provides an excellent guide.  However, if you are seeking an English term for a more complicated relationship between two members of an extended family, rather than asking a question like:          site users are encouraged to first review the answers below.    Note: This Q&A arises from  and is set to  to help make it canonical.


The evil, repressive government is trying to stop the heroes! For a very good reason, it turns out

I have a memory of a short story in which a plucky group of scientists and researchers (and maybe students?) invent a machine that allows you to view any place and period in history.  It will revolutionize historical studies, but almost immediately the evil G-men of the oppressive government are after them, trying to seize and destroy their machine, muzzle the scientists, etc. etc.    Finally one of the G-Men catches the scrappy group of heroes.  And in a trope-breaking moment, we realize the evil government isn't really evil at all, but has realized what the scientists didn't - that being able to view any point of history anywhere on the planet will include "history" that happened just a second ago.  All privacy will be lost forever.  The scientists realize the implications of their discovery and agree to get rid of the device, but one ashen-faced scientist (or student) reveals that he had just mailed the plans for the device in the mail to a journalist, so they would be distributed to the world even if the scientists were caught.  The story ends with the G-man grimly welcoming the scientists to a new world of no privacy.    UPDATED: The story is "" (thank you, user14111!)  I can't think of any other stories that have explored this idea - the scrappy heroic underdogs fighting a faceless, repressive government... who turns out to have a very good reason for trying to suppress what the heroes are trying to do.  Are there any other stories that have explored this interesting twist on a common trope?


Is it okay to borrow information from other answers?

Say there are several answers to a question, and I realize that if I borrow some information from other answers all the information addressing the question will be in one place. What should I do? Do people here care more about their reputation or about user experience?


I am helping a friend search for a short story she read 20+ years ago in junior high. It is about a car that gains a conscious mind and locks the owners in the vehicle and drives and drives and drives. The story is told from the view point of a gas station attendant who sees this car pass year after year.   Anyone know the name of this story?


How can I animate object properties in Blender?

I was wondering if there was a method to alter object settings at a set point in an animation in blender.  For example, I want to make the color of an object blue for the first 20 frames, but after 20 frames I want its color to change to green. Is there any known method of doing this? I could not find anything when I searched.


How to call a derived templated function in CRTP?

My attempt is:  template<typename Derived> struct Base {     void A()     {         ((Derived *)this)->B<42>();     } };  struct Derived : Base<Derived> {     template<int> void B() { } };   ()  Which results in  main.cpp: In member function 'void Base<Derived>::A()': main.cpp:6:34: error: expected primary-expression before ')' token          ((Derived *)this)->B<42>();                                   ^ main.cpp: In instantiation of 'void Base<Derived>::A() [with Derived = Derived]': main.cpp:17:17:   required from here main.cpp:6:30: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<'       ((Derived *)this)->B<42>();       ~~~~~~~~~~~~~~~~~~~~^~~


TikZ/PGF drawing Sierpinski triangle for predefined iteration-level

I would like to draw some iteration levels of the Sierpinski triangle. Lets say I'm ok for Iteration 0-4: line, triangle, first times devided triangle (triforce ;) ), ...  Is there a way to do it like the Koch snowflake?   \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.fractals} \begin{document} \begin{tikzpicture}[decoration=Koch snowflake]      \draw decorate{ decorate{ decorate{ decorate{ (0,0) -- (3,0) }}}}; \end{tikzpicture} \end{document}   I can't find any nice solution in the www.   Further I would like to print only a part of the next lvl. Lets say we have the basic triangle of step 1. In step 2 you will devide the whole triangle in 4 congruent triangles. I would like only to print the next step in the upper part.   (for each Step until 4)   The last mission I am facing: I want to add three curved lines, from each edge of the basic triangle to the right of the triangle and enter some Text. So they shall stop in a neighbourhood of the text. I guess, if I finished the previous step, this one might be pretty easy.   thank you all for reading and helping :)


Given that N is a natural number .Then I was trying to find the number of positive integral solutions of the equation    $$1!+2!+3!+4!+.....+x!=N^2$$   By hit and trial, $1$ and $3$ are obvious solutions for $x$.  But are these the only solutions and how can I find any other solutions if present ?


How to animate an object to revolve around a fixed point in blender?

I want to animate the revolution of earth around the sun in blender. I know that keyframes can be used to make an object revolve on its own axis. But how do I make an object revolve around an external fixed axis?


Is there a size of rectangle that retains its ratio when it's folded in half?

A hypothetical (and maybe practical) question has been nagging at me.  If you had a piece of paper with dimensions 4 and 3 (4:3), folding it in half along the long side (once) would result in 2 inches and 3 inches (2:3), which wouldn't retain its ratio. For example, here is a piece of paper that doesn't retain its ratio when folded:   Is retaining the ratio technically possible? If so, what is the side length and ratio that fulfills this requirement? Any help would be appreciated.  Update:  I added "once" because I got an answer saying that any recectangle would work, as any rectangle folded twice has the original ratio. Nice answer, but not quite what I was looking for. As for the other answers, I got 3x as much information as I needed! Thanks!


Let {$ X_i $: i $ \in $ I} be a family of topological spaces. Show that $ \prod_{i \in I} X_i $ is path-connected...

Let {$ X_i $: i $ \in $ I} be a family of topological spaces. Show that $ \prod_{i \in I} X_i $ is path-connected  if, and only if, $ X_n $ is path-connected  for each n $ \in $ I.  Let x and y be two points in the product. Let t $\in$ [0,1] and z(t) be a point such that $z_i$(t)=$f_i$(t) where $f_i$:[0,1] $\to x_i$ is a path connecting $x_i$ with $y_i$ in $X_i$ . Since any open subbasis set U in the product is an inverse projection $\pi^{−1}_i$($U_i$) of a proper open set $U_i \subset X_i$ for some i , the preimage $z^{−1}$(U) is just $f^{−1}_i$($U_i$) which is open in [0,1]. I was only able to think this. Any help will be appreciated. Thanks in advance.


Does "required reviews completed" mean good news or bad?

I submitted by math paper to an Elsevier journal around 6 months ago. Today I logged into EES and saw that the status changed to "Required Reviews Completed" about 10 days ago. Is this good news or bad news ? Does it mean my paper is rejected and the Editor is basically preparing the rejection letter :( ?


Can a hotel kick you out if you let an unregistered guest share a room with you?

We are going to an event and because of this event all hotels are fully booked. Now a friend wants to join us, but can't find accommodation. We are okay with him crashing in our hotel room, either on the couch or on a self-inflatable mattress. We have done this in the past where we secretly sneaked the "guest" in.   It is not that we don't want to pay the tourist tax, it is that when ask and the hotel says no, we can't sneak him in, because we drew attention to ourself. In many hotels you can just order another bed, but there are also a lot that don't have that service.   I don't have any ethical problems with my behavior of secretly hosting a guest. I did pay for the room. I don't like being sneaky about it, since again I do pay for the hotel room. Also if I have to choose between sneaking someone in the room to crash on the couch or let him/her sleep on bench in the park. I opt for the first.   Am I just worrying to much and will being honest about it in the end be acceptable to most if not all hotels?


Well, my first question is related to the energy of the capacitor. Why does the energy of capacitor equals $E=\frac{1}{2}QV$ and not $E=QV$;in other words, why we multiplied it by $\frac{1}{2}$?? My second question is why the sum of the voltage of each of the capacitors connected in series equals to that of the battery??