Let $A \subseteq (0,\infty$) such that $\inf A>0$. Let $\frac{1}{A}=\{\frac{1}{a},a\in A\}$. Prove that $\sup \frac{1}{A}=\frac{1}{\inf A}$.  My attempt:   For $a\in A$ we have $$a\geq \inf A>0 \Rightarrow \frac{1}{a}\leq\frac{1}{\inf A}$$  $\Rightarrow \frac{1}{\inf A}$ is an upper bound of the set $\frac{1}{A}$.  Now we have to prove that it is the least upper bound. So we have to prove that $(\forall \varepsilon>0)(\exists\frac{1}{a}\in\frac{1}{A})$ such that $\frac{1}{\inf A} -\varepsilon<\frac{1}{a}$. How do I continue from here?


If force is a vector, then why is pressure a scalar?

By definition pressure is the perpendicular force applied to a unit area. So it has a direction which is perpendicular to the area. So it should be a vector. But I did sone googling and found out that it is a scalar quantity. So it would really be helpful if someone could show me how pressure is scalar with some mathematical derivation.


Restrict onEdit trigger to only one sheet

I would like to use this code :  function onEdit(e) {   if(e.range.rowStart === 1 && e.range.columnStart === 1) {      e.range.offset(0,1).clearContent();   } }   but only on a tab called 'Inventory'. Could you kindly help?


I wish you would have died... vs. I wish you had died

I was watching an episode of the Arrow TV series and I came across the following sentence:     Tommy (to Oliver): I wish you would have died on that island.   I know Americans tend to use constructions like: "If I would have gone there, I would have lost." etc., and there is literature on that, but what is your take on the sentences bellow?     I wish you would have died there.      I wish you had died there.   I cannot find anything on the first structure with wish. Besides grammatical correctness, is there any difference in meaning? There's only this info about the structure, but there is no legitimate source provided:     Could it be that, when looked at in isolation, they have the same   meaning, or similar meanings, but a speaker might prefer to use one   version over the other depending on the context or situation?      It seems that the first version (with "would") might sometimes be   preferred by a speaker when they wish to be polite. For instance, when   talking to their boss or to their own friends.      A speaker might prefer to use the second version when they want to be   blunt. For instance, when you are reprimanding someone because they   should have known better than to have not told you.      When a speaker wants to be polite, they'll often use versions that   have more past-tense verb forms in them than would be necessary, and   have more words with modality in them (e.g. "might", "perhaps",   "could", "would"), and are longer in sentence length and wordier.      When a speaker intentionally wants to communicate bluntness, usually   the shorter versions (less wordy) are preferred.      Compare the following:  "You should have told me that" "I wish you had told me that" "I wish you would have told me that"       It seems that #1 could be the most blunt of the three, and that #3   could be the least blunt.      As to the grammaticality of "I wish you would have told me that",   usually the grammaticality of a sentence depends on: whether or not   native English speakers would intentionally say something like that in   a normal context and expect (all) other native English speakers to   fully understand them, and that other native English speakers do   understand them. Roughly that's the meaning of an utterance being   grammatical in today's standard English.      Now, as to that specific utterance of yours that is in the title of   your post, I can accept that many native English speakers will speak   that intentionally, and that many of those speakers would be   considered to be well-educated and good speakers of English by many   fellow native English speakers. And it also sounds okay to my ear. And   so, it seems to be grammatical to me.      And since you "hear people say things like this quite often", that is   more supporting evidence for its grammaticality.      Aside: On a school test, the teacher probably wants to see the last   version ("I wish you had told me that") as the answer.   Source:   Excess wordiness adds to politeness?  My questions are: Is there any difference in meaning? And if so, could you please provide a reputable source to back up your claims, too?


Reliable code for automatic \noindent after specific environments?

This question led to a new package:  Edit: package is broken since nov 2019. See my comment below for more info. [may 2021]  There are a number of environments which I never want to follow up with an indented paragraph. itemize, enumerate, theorem, definition, etc. I know there are people who  this is bad style. But it's a personal preference. Those environments basically always end a paragraph for me, so the visual clue is not needed in my case. I've found several similar questions, but none of them do what I need:      That third one was actually most useful, but appears to be unreliable for patching existing environments with. It doesn't seem to be working in my memoir document. To be clear, I don't want to remove the actual paragraph break. That's a semantic concept. I just want to patch the document style so that paragraphs following certain environments remain unindented. I've tried the following two 'solutions' (which use etoolbox for patching): \newcommand*{\noindentnext}{\everypar{{\setbox\z@\lastbox}\everypar{}}} \newcommand*{\NoIndentAfterEnv}[1]{\AfterEndEnvironment{#1}{\noindentnext}} \newcommand*{\NoIndentAfterCmd}[1]{\apptocmd{#1}{\noindentnext}{}{}}  \NoIndentAfterEnv{itemize} \NoIndentAfterEnv{theorem} ...  This one is loosely based on the third post from the list above. It sometimes works. It sometimes does nothing. I'm unable to predict when it will fail. The second: \let\old@par\par \newcommand*{\noindentnextpar}{\def\par{\let\par\old@par\par\noindent}} \newcommand*{\NoParIndentAfterEnv}[1]{\AfterEndEnvironment{#1}{\noindentnextpar}} \newcommand*{\NoParIndentAfterCmd}[1]{\apptocmd{#1}{\noindentnextpar}{}{}}  I invented this one myself. It breaks when the patched environment is not followed by a paragraph. It has also shown itself to inexplicably fail in other situations. Once and for all, I'd like to have a reliable way to do this. Let me give an example of what I need, just to be clear: \NoIndentAfterEnv{itemize}  \begin{itemize}     \item ... \end{itemize}  This starts a new paragraph. Note the empty line. But it should not be indented.  But this paragraph \emph{should} be indented.


PHP calculation issue 3348 became 3347.9999999999995

amount is having diff after multiplying with 100  $amt = 33.48; echo "$amt: ".gettype($amt); $amount = $amt* 100; echo "\n$amount: ".gettype($amount); echo "\n"; $arr = array($amount); print_r($arr); echo "\n".json_encode($arr);   output   33.48: double 3348: double Array (     [0] => 3348 )  [3347.9999999999995]   live   How 3348 became 3347.9999999999995 ?


Can you identify this novel about mind control, where everyone wears catsuits?

Back in the 70's my local library had a novel about a human coming to a human-colonized (I think) planet where mind control was common and where he was there to solve a crime. There was a hierarchy based on how many other people you could control, starting in the single digits and eventually going by tens up to eighty or so. The main character's local associate was something like a 40 working on 50, and our hero gets in trouble with his associate at one point for interrupting a mind duel he's engaging in on the road to 50.   Those in the single digits do most of the grunt work, though fortunately for our main character those who have no mind-control powers at all are exempt - he also chats with a "disabled" native at one point who is very glad to be disabled and out of all the competition.  Standard attire is a catsuit with your number over your heart, and what I remember most about the (hardback) book is the dustjacket, which depicted a woman who filled out her catsuit exceptionally well.  I have a vague recollection that the book was originally published in the 50's, but I wouldn't swear to it.


distinction between different "types" of root access in bash?

What's the  between: sudo su -  and su -i  and where would one be preferred over the other?     -, -l, --login           Start the shell as a login shell with an environment similar to a real login:               o      clears all the environment variables except TERM and variables specified by --whitelist-environment               o      initializes the environment variables HOME, SHELL, USER, LOGNAME, and PATH               o      changes to the target user's home directory               o      sets argv[0] of the shell to '-' in order to make the shell a login shell   and     su - run a command with substitute user and group ID   excerpts from the man su page.


How to block IP Address in ASA5505 firewall via ASDM?

I have an ASA5505 firewall and I need to block an external IP address which is talking to my server.  Basically, the ASA firewall shows that my server is "attacking" this Destination Address. So the Source IP is i.e. 192.168.100.100 which is internal, attacking 188.247.70.93 on port 80 thru the inside interface. which is outside.  I have blocked the IP from my server firewall but I need to know how to block it from the ASA Firewall via asdm as I am not too familiar with CLI  I mean, I did create an ACL with all the entries and applied it to the Inside interface, but then I have to create another rule to allow any to any for outgoing otherwise the firewall blocks all outgoing.  The problem with creating any to any is that as soon as I create that I saw 350+ hits on that rule. So how do I go about doing this block without compromising my system?  Thank you


Can't remove read only attribute from folder windows 8.1

I am using windows 8.1 64 bit  I am unable to remove the read only attribute on folders on my computer. I have tried multiple folders on my desktop, and in my documents folder, if I uncheck the read only box and hit apply, then close and reopen the properties window, the box is checked again. This applies to all folders I have checked. How can I allow full read and write privileges to these folders?


Lubuntu won't install using wubi (pastebin of log file included)

So I tried to install lubuntu 2 times now, and it seems that it won't install because at the very last of the install progress I get the error: Could not retrieve the required installation files for more ingormation, please see the log file ()  I tried a live USB and it just doesn't boot up.  Anyone know what the problem could be? I'm on a 64 bit i7 gtx560 system  Kind regards, Gilles


The question is to evaluate $\displaystyle7\int\frac{dx}{x^2+x\sqrt{x}}$.  My solution is attached.      The problem of my solution is if I use partial fraction, loop will be made, and this makes whole equation $0 = 0$. I want to know how to approach this question.


I've been developing a make target that uses dd (actually dcfldd) to write a Raspbian Jessie image to an SD card. The target is just   flash:     sudo dcfldd bs=4M if=$(IMGPATH) of=$(SDX)     sync   where $(SDX) is /dev/sdc. See  for a couple more details.  At one point, I removed the SD card from the USB card reader, tested it in the Raspberry Pi, and made some notes for changes to the script. However, I forgot to take it out the RPi and put it back into the reader (which was still in the USB socket) before calling the make target again. Bizarrely, no errors were thrown; but the ~4GB of data was "written" in seconds.  After this, putting the card in properly and calling the target again resulted in the same super-fast "copy", but the card did not appear to be altered.  I tried reformatting the card multiple times with the "Disks" tool in Ubuntu and with gparted, but the only way to get it flashing properly again was to reboot the machine. Of course, I also tried removing and reinserting the reader from the USB socket.  With the reader inserted, but with no card, I see only /dev/sdc. With the card also inserted, I see /dev/sdc, /dev/sdc1, and /dev/sdc2 (with the Raspbian image on the card).  I'm wondering   Where was dd putting the data it thought it was writing? Was there some way I could reset the card reader without rebooting?


A word that means "of few words" or "without words"

I assume that in English there is a word for everything, and I am looking for one that roughly means "of few words" or "of no words". The closest I could think of is non-verbal, but it sounds a bit too dry. Is there a better word?  Note: I did check for antonyms of "verbal" before I posted here, but didn't find any.


What price should I charge for my first wedding as a Amateur photographer?

I am an amateur photographer. I was asked by one of the public to be their wedding photographer, after seeing a lot of my work online!   This would be my first wedding and not sure what to charge!


I installed a fresh Ubuntu 10.10 onto a new hard drive and want to mount the old home directory to a subdirectory of my new (also encrypted) home directory.  I tried this with sudo mount -t ecryptfs /mnt/oldhome/me/ /home/me/oldhome, with /mnt/oldhome being the /home partition of the old system.  Afterwards ~/oldhome contains a desktop link file (Access-Your-Private-Data.desktop) linking to ecryptfs-mount-private and a README.txt saying I should run ecryptfs-mount-private. I do so, but as I don't know what is supposed to happen, I can't tell if it happens and if it brings me closer to accessing my old home.  Any hints?  update  I was able to mount my old encrypted home with the help of . Though, looking into it with ls, I get alot of errors like this:  ls: cannot access /mnt/oldme/some_file: No such file or directory   Other information ls -l should show, is replaced by question marks.  update 2  I mounted the old system to /mnt/oldroot and mount /dev, /sys, /proc and the old home partition into. Then I chrooted into /mnt/oldroot, su - me and ecryptfs-mount-private. Asked for the passphrase I put it in and got:  Error: Unwrapping passphrase and inserting into the user session keyring failed [-5] Info: Check the system log for more information from libecryptfs ERROR: Your passphrase is incorrect   ecryptfs-unwrap-passphrase gives me the exact same passphrase I used, though.


What will be the output/discharge current of a capacitor?

I am planning on doing an experiment where I want to connect a 2V 500mA solar panel to a 25F 2.7V super capacitor and then I will connect it to a 5V output boost converter. I know the capacitor output current formula is   $$i(t)=C \dfrac{dv}{dt}$$   but I am not sure what will be the output voltage and current of the capacitor would be to the boost converter. Another set up would be to connect 4 25F 2.7V capacitors in series and then in parallel to a 1.2 watt solar panel, what would be output V and I in that case? Also please let me know if its a bad idea. Thank you, any help would be greatly appreciated.


I'd like to know how to make in mathmode this fat 'E' as a symbol for expected value?


Make "axis cs" the default coordinate system in a PGFPlots plot

I would like to know if there is a way to specify axis cs to be the default coordinate system inside a plot in PGFPlots, so I don't have to type axis cs: in front of every coordinate pair. Here's a MWE that shows what I mean (the actual plot is irrelevant).  \documentclass{article}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}  \begin{axis}[               xmin=0,               xmax=80,               ymin=0,               ymax=80,               grid=major,              ]   \fill [green, opacity=0.5] (axis cs:14,14) -- (axis cs:80,47) -- (axis cs:80,80) -- (axis cs:47,80) -- cycle;   \fill [red, opacity=0.5] (0,0) -- (axis cs:80,0) -- (axis cs:80,47) -- (axis cs:14,14) -- (axis cs:47,80) -- (axis cs:0,80) -- cycle;   \draw [thick] (axis cs:47,80) -- (axis cs:14,14) -- (axis cs:80,47);  \end{axis} \end{tikzpicture}  \end{document}


Doubt regarding Nyquist theorem for sampling analog signals

If for an arbitrary signal H(f) = 1 for 300-f-3700 Hz; 0 otherwise, what should be the minimum sampling rate? 7400 Hz or 6800 Hz and why?


I did something like this.  var person = function (){   this.print = function ()   {     console.log('person');   } }  console.log(person.prototype);   This logs Object{}, but if I do:  person.prototype.print = function () {     console.log('person'); }  console.log(person.prototype);   Now it prints the entire object and its proto


Are there any possibilities to recover data from dead hard disc

I have an Sea-gate 500gb hard disc that is completely dead, i mean when i connect hard disc to my system it is not getting detected.   But i had so much of important data in it, i need those data now. Are there any way to get them back or get it repaired?  Are there any possibilities to recover the data from that dead hard disc from any special hardware???  How can i solve this???


what's the relation between sensor size and image quality (noise, dynamic range)?

I'm reading  on sensor size:     Digital compact cameras have substantially smaller sensors offering a   similar number of pixels. As a consequence, the pixels are much   smaller, which is a key reason for the image quality difference,   especially in terms of noise and dynamic range.   Could you please elaborate on the last sentence: what's the relation between sensor size and image quality? In particular, what are the advantages and disadvantages of a small sensor (of a compact camera, in contrast to a large sensor of a DSLR camera)?


someObj.java    public class someObj {         private int data;          someObj(int initVal) {             data = initVal;         }         int getAnotherObjectData(someObj bar) {             return bar.data;         }  }     Tester.java      someObj foo = new someObj(30);     someObj bar = new someObj(40);     System.out.println(bar.getAnotherObjectData(foo));     In result, I can get '30'. Why I can access another Object's private variable data?


Did we see Daniel, the cylon John murdered, in "Someone to Watch Over Me"?

The Last Cylon, Ellen Tigh, stated that Daniel was musical and that John murdered him.  In the episode "Someone to Watch Over Me", Starbuck meets the piano player seemingly her Father, who disappears.  We know in the end that Starbuck was a ghost.  Then was the piano player the cylon Daniel that John had suffocated and killed before he turned on Tigh and the creators?  If not, then did we ever see Daniel in the 2004 series?


How do you find a particular representation for Grassmann numbers?

This question is more general in the sense that I want to know how one finds a particular (say matrix) representation for any object. For the case of Grassmann numbers we have from :      Grassmann numbers can always be represented by matrices. Consider, for example, the Grassmann algebra generated by two Grassmann numbers $\theta_1$ and $\theta_2$. These Grassmann numbers can be represented by 4×4 matrices:   $$\theta_1 = \begin{bmatrix} 0 & 0 & 0 & 0\\ 1 & 0 & 0 & 0\\ 0 &  0 & 0 & 0\\ 0 & 0 & 1 & 0\\ \end{bmatrix}\qquad \theta_2 =  \begin{bmatrix} 0&0&0&0\\ 0&0&0&0\\ 1&0&0&0\\ 0&-1&0&0\\  \end{bmatrix}\qquad \theta_1\theta_2 = -\theta_2\theta_1 =  \begin{bmatrix} 0&0&0&0\\ 0&0&0&0\\ 0&0&0&0\\ 1&0&0&0\\ \end{bmatrix}.  $$   How do one find these matrices? Do you guess them or is there a procedure? What about finding differenct matrix-representations for Dirac $\gamma$-matrices? How do you find them?


Why does printf output float 1.45 with one decimal place, and 1.445 with two decimal places in different behaviors?

printf("%.1f, %.2f", 1.45, 1.445);  output  1.4, 1.45  1.45 is sliced but 1.445 is rounded. I found this,  Which explained the specification recommands to round the float. Edit: I tested it with VS2017 (in a C++ project) and Dev-C.


Subspace topology and order topology (2)

Yesterday I asked a very similar  but now I am confused again...  Let $I=[0,1]$. The dictionary order on $I\times I$ is just the restriction to $I\times I$ of the dictionary order on the plane $\mathbb{R}\times\mathbb{R}$. now, how can I show that the set $\{1/2\}\times (1/2,1]$ is not open in the order topology? The maximum element of $I$ is 1. So the order topology on $I\times I$ has intervals of the form $(a,1]\times (b,1]$ as basis elements. Isn't $\{1/2\}\times (1/2,1]$ itself a basis element of the order topology?


This might be a very stupid question for Science students, but I had this doubt always, since childhood. I still don't understand even when I'm adult because I didn't read science in detail.  When I would ask the same question from my teachers, first my classmates and teachers would laugh. Then he would reply:     This has no answer. Why is a man a man?   I felt bad.  Now, I do feel like it has something to do with Photons. But since I don't know much Physics, and I'm not in touch with it, I can't understand it.  Is there any basic way to help me understand this?  Like I can feel that light can enter from anything which has pores.  I can understand that air can't flow through glass.  But I just can't feel/understand how light can pass through it.


How do you upgrade the kernel in the ISO file?

I downloaded the ISO for Ubuntu 16.04.3 but I want to have it use at least kernel 4.8 because I'm trying to install this on a Microsoft Surface 3 (non-pro), which the 4.8 kernel supposedly adds support for. All the tutorials I see online for kernel upgrade is when Ubuntu is already installed. I need directions for updating it before installation.  Right now when I try to boot from the 16.04.3 live disk I got the Ubuntu logo and then it freezes at a black screen. The same thing happens with the Ubuntu 17.04 live disk as well.


Prevent Ubuntu from automatically starting up after 10 secs with dual-boot

I have a pc with Windows 10 and Ubuntu 16.04, set as dual-boot. The pc came with Win10 and I installed Ubuntu on it recently.  Everything works ok, but when booting the computer I have only 10 seconds to select an option, if I don't do anything within those 10 seconds Ubuntu starts automatically. I usually only use Windows so I prefer that to act as primary OS.  Is it possible to either set Windows as the default selected option, or disable the 10-secs timer?


Administrator account appears not to have all privileges

I have a Windows 7 machine, where I have enabled the local "Administrator" account. When I log in as this local Administrator I still cannot do everything I want to do. There are still settings that are disabled.  What do I possible need to look at in order to make my Administrator account in to a real super user account? Is there some hidden setting in Windows 7 that prohibits the Administrator from really being an administrator?  It has been suggested that I need to "run as administrator" those programs where I need administrator privileges. But how do I do I do this with the control panel?


If I book a return journey with British Airways and miss the first flight, can I still use the return flight?

I booked a return journey with British Airways.   If I miss the first flight can I still use the return flight?


I need an app to turn on/off apps at a specified time: turn on transmisson at 0:00 and turn it off at 6:00.  Thanks


i am using Sharepoint 2013.   A person can choose between 3 options.  Option A, Option B and Option C.  If the person choose Option B, only then there will be a text field (and then the person must type a text in it)  I use only Sharepoint 2013 and Nintex. I hope you understand what i mean.


On Ubuntu 14.04, I installed VirtualBox on which I have created 2 Ubuntu virtual machines.  Does Ubuntu provide a way to launch  the virtual machine I want at a particual moment ? Is there any solution for this problem by developing a .sh script for example or using any other programming language ?


How can I do this? I'm using a Samsung Galaxy Ace  I've tried this method  I confirmed that it was indeed set to 2. But it wouldnt work.  Then I rooted my phone, installed an app with which I could modify the default installation path, but it also wouldnt work.   What can I do?


A note making feature in the personal page

I would love a simple, personal notes taking feature. Not for everything on this page, but just on my personal page. Just for me to take some personal notes about stuff on this page, some useful metaqueries, links related to this site, etc.  I know I could use bookmarks, but those are only local to the browser, and I use the site from different places a lot, and so, for taking notes about a page, the page itself is the most logical location.  And it's only one extra column in the user table, so I shouldn't take too long for you to develop :))


How to migrate existing asp.net application to asp.net MVC pattern format

I want to migrate an existing ASP.NET application to an ASP.NET MVC pattern format. What procedure should I follow? Any step-by-step instructions would be very helpful.


Sending mass email with Visualforce template

I am new to Force.com and trying to learn some concepts.  Currently I am using Single Email Message to send my emails, but I need to change that to mass email, but I don't quite understand how to do that.   I have also created a Visualforce email template, which I would like to use, but it doesn't seem to work.   It would be great if someone could help me out.  //email_disease_map contains pairs of email address and disease ID for (Id id : email_disease_map.keySet())   {     Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();     String[] defaultAddresses = new String[] {'id@test.com'};      List<String> toAddresses = new List <String> (email_disease_map.get(id));      if (!toAddresses.isEmpty())       {         //set addresses for email to be sent         mail.setToAddresses(defaultAddresses);         mail.setCcAddresses(toAddresses);         mail.setTemplateId(Notification);         //set up remaining email         mail.setReplyTo('test@mail.com');          mail.setSenderDisplayName('Ms Test');          Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });       }  }


Is there anyway to permanently fix the Red Ring of Death?

I was thinking about buying some RROD Xbox 360s and JTag them and making a bit of cash. All the fixes i have found are only temporary.


How to fix incorrect SRID of the geometry column?

I've been told to use AddGeometryColumn to properly add a column with correct/preferred SRID. however I wonder if it's possible to fix/change the current column instead of adding a new? If there's no other way but to use this function should I remove the previous column?  Thanks a ton.


Why "either not $B$ or $C$" is logically equivalent to "$B$ implies $C$"?

On the book it says " $\lor \neg BC$ can be written as $\implies BC$, which read as 'either not B or C' or 'B implies C' " but I don't really understand why they are logically equivalent. Thanks ahead!


How to create ball moving under blanket effect

I am trying to get an animation effect of a ball moving under a blanket with some resistance or a round object protuding out of a flat surface.  Below is what I've been able to do so far and what I want to achieve. For now I've used a different colour for the ball to make things a more visible.


Overmatching bias and confounding variables

As I understand it, matching is one way to identify causality in observational studies. By matching observations that are "similar" and comparing ones that did or did not receive treatment, you can consider this as a quasi-experiment of sorts.  What is overmatching? What kind of bias does it introduce? I have mostly seen matching from an economics perspective, but have recently seen some papers on epidemiology suggesting that "overmatching" can result in bias. I find it hard to understand the terminology of the papers and would greatly appreciate if someone could help explain some of the main concepts. Below is an article that references the idea:


If $\frac{1}{p}+\frac{1}{q}=\frac{1}{r}$ prove that $$\|fg\|_{L^r}\leq \|f\|_{L^p}\|g\|_{L^q}.$$ I tried to use Holder, but I can't prove it... any idea ?


prevent image url from malicious code and sql injection

I'm using regex (https?:\/\/.*\.(?:png|jpg|jpeg|gif)) to validate image url and it's working, but still some unwanted user could put a code like this in the image url: http://avatar/image'OR''='/someimage.jpg and I wonder if there is another regex can detect special character like ' and ;


sed - remove the very last occurrence of a string (a comma) in a file?

I have a very large csv file. How would you remove the very last , with sed (or similar) ?   ... [11911,0,"BUILDER","2014-10-15","BUILDER",0,0], [11912,0,"BUILDER","2014-10-15","BUILDER",0,0], [11913,0,"BUILDER","2014-10-15","BUILDER",0,0], ]   Desired output  ... [11911,0,"BUILDER","2014-10-15","BUILDER",0,0], [11912,0,"BUILDER","2014-10-15","BUILDER",0,0], [11913,0,"BUILDER","2014-10-15","BUILDER",0,0] ]   The following sed command will delete the last occurrence per line, but I want per file.   sed -e 's/,$//' foo.csv   Nor does this work  sed '$s/,//' foo.csv


Determining permutations of numbers that sum to a certain score in the context of survey research

I am aware of figuring out the number of non-negative integers which sum to a certain number.     I’ve seen mentions of partitions, “stars and bars”, etc.   In the context of a survey:  Let’s say we have 5 questions with likert scales which range from 1 to 6 for possible values.   Then let’s say I want to know all of the permutations to get the sum score of 20. Order matters because each question is getting at a specific/useful piece of information even when they are being added together into a sum/composite score.   I am wondering if there is already a generalized solution to this where you can easily change the number of questions, the range of values for each question, and the sum score of interest.   If there isn’t one, I am hoping to find out what would help lead me to find one/if one has to create a specific solution for each specific set of parameters (ie it doesn’t generalize well).  I also saw that this kind of problem can be considered related to the knapsack problem.


Put leading zeros for long type number in java

My client sends me some data via web service, which he created, and expects 4 digit long value as return code. For example return code 9461 is for failure of operation A, or return code 0000 is for success. There is no problem of returning error codes, however when return code is 0000, that is success I am facing the following problem.   I can't create 4 digit long which starts with 0. I tried to set webservice response as follows  response.setResponseCode(0000L);   However it sends 0 instead of 0000. I know I can use hardcoded "0000" or String.format or DecimalFormat, but setResponseCode takes long  as input, therefore I can't use string.  Is there any way to set zeros before number so that 0 can be set like 0000 or 45 can be set like 0045?


What is the 'libc gethostbyname buffer overflow' and how can I protect myself from it

Apparently there is a bug in the , that can cause a buffer overflow, how can I protect myself from it?!  Reference:


How do I create a weighted collection and then pick a random element from it?

I have a loot box that I want to fill with a random item.  But I want each item to have a different chance of being picked.  For example:   5% chance of 10 gold 20% chance of sword 45% chance of shield 20% chance of armor 10% chance of potion   How can I make it so that I select exactly one of the items above, where those percentages are the respective chances of getting the loot?


Do you use 'who' or 'that' when referring to people

There were 10 people who went to the store, vs. There were 10 people that went to the store.  Can we not consider reversing the subject and verb to ask a question and thus aid us in clarifying the answer? Wouldn't we ask "Who went to the store?" and not "That went to the store?"


I intend to develop a small (Java) application for managing my finances. I believe I need to use an embedded database, but I have no experience regarding this issue. I tried to look at , but I can't decide which one would be more suitable for me. , ,  and  seem to be good candidates, but I still don't see how they compare to each other. I appreciate your help comparing them and helping me decide which one to use.  I intend to use Hibernate for my application (unless you would recommend using DBMS-provided API), but I also want to have the ability to edit the database easily using a SQL browsing tool (modifying schema and changing data).  Thank you.


Where to ask a question about online stores and which is better while buying a laptop?

I want to ask about online stores such as Amazon, Newegg, erc. and I don't know on which Stack Exchange website I should ask such questions.  I need to ask about buying a laptop and which website will be better and some other questions.


Remove periods after author initials, but leave spaces

The terseinits option exists to remove the periods after the authors' initials, but it also squashes two or more initials together. How can I have it so that it will be  Author A B, Buthor B C and Cuthor C D  instead of  Author AB, Buthor BC and Cuthor CD


How do i make material like this lampshade? Let light through, but not be transparent.


Factorial question: number of trailing zeroes in 125!

How many zeros are after the last nonzero digit of 125! ?  The answer is 31, but how do you solve it?


Usually I use the package mhchem for writing chemical formulas, but until now I was not able to find a solution for writing crystals such as Nd^{3+}:YAG properly with this package. When simply writing   \ce{Nd^{3+}:YAG}   it results in an error. My current alternative solution is to write it as   \ce{Nd^{3+}}:\ce{YAG}   Is there a more elegant way to do that?


If I have a Pidgey, how can it I get the HM02 Fly in Pokemon X and Y. If Pidgey can't learn Fly, I also have a Hawlucha.


I have recently installed Ubuntu 18 and after correcting my wifi problem, I still have one. Every time I open my laptop my wifi signal is weak. I always have to type below command to strengthen the signal.   sudo modprobe -r rtl8723de && sleep 5 && sudo modprobe rtl8723de ant_sel=2   I want to make this setting permanent. How can I do that?


In Google Spreadshets, how can you loop through all available sheets not knowing the total count?

I'm keeping stats for my daughter's baseball team. I have a sheet for each game, each one identical in structure.  I want to create a summary sheet that totals numbers from the other sheets.  How should I construct the formulas to reference N number of sheets?  Example:  =G1!C2+G2!C2+G3!C2   I don't want to go back and change each formula when a new sheet is added.  Update: Searching some more at Google Help, I don't think this is supported.  What I'm doing is referred to as a 3D range and though it is supported in Excel, it is not supported in Google Spreadsheet.


I was inspired by this interesting question on this forum:     Say you're stranded on an alien planet without any significant tools. How would you recreate the SI system of units with some accuracy?   The meter is fairly easy within less than 1% since most people know their height to within a cm or less than an inch.   How about the second? Given the unreliability of biological clocks, I'd have to measure it. But I can't use a pendulum because I don't know $g$. I can't build a mechanical mass-spring system because I don't know the stiffness of materials (in general). To measure stiffness I'd have to re-create the SI Newton, which is a derived unit from seconds.    How could you re-create the SI second? The least technically complicated answer the better (pendulums beat RC circuits which beat atomic clocks and radioactivity measurements).  Is the only way to re-create the second is to measure $c$ or build an RC circuit (basically the same things since I can use $\varepsilon_0 =\frac {1}{\mu_0 c^2}$)? If point 2 is correct, how would you measure $c$ or build an RC circuit in the most simple manner?    Myself, I believe that (1) is not possible with mechanical systems, because (2) is true for classical mechanics so I'll have to build an optical interferometer, a radio/receiver to measure c, or an RC circuit. For point (3) given copper wire and iron (which are thousand year old technology) it's possible to build a magnetic amplifier radio and try to measure the time to bounce off an obstacle.   Thoughts?   EDIT: This is different from . That question assumes I'm still on Earth, and I'm possibly a member of civilization. Then I can re-create the meter fairly accurately from it's original definition as a fraction of the circumference of the Earth, and for the second I can build a pendulum of period 1s, since g has not changed.   The challenge here is, given a facts that a reasonably educated person would know (their height, the value of c and how it relates to other values. I know some basic astronomical facts but don't know the names and position of all the uncatalogued  stars), excellent physics knowledge (i.e. I understand special relativity, lie grouops, ect) and perfect mathematical ability (I can derive any known mathematical result I need) can I recreate the SI system within a reasonable margin of error?   Also, people have asked if they can assume certain things (i.e. can I see Jupiter, does the planet have an earth). Assume away, you'd be answering interesting specific cases and exploring other techniques. However, the more general the answer, the better.   Finally, if there are any doubts read the original question at the very top. I'm ultimately trying to get a satisfying answer for that scenario.


Let $R$ be a ring and $I\subset R$ an ideal. Let's give an example of a ring $R$ such that $I^2=I$ but $I$ is not a direct summand of $R$.   Given ring $R$ and ideal $I$, i know that if $I$ is a direct summand of $R$ then $I^2=I$ but i can't show the converse.


How to install Lubuntu Desktop Environment and ONLY the desktop environment?

I have a slower computer that I would like to use the Lubuntu desktop environment with. However, I do not want to install any of the software that is not related to the desktop environment. I am talking about programs like Abiword and Lubuntu Software Center. How do install the desktop environment and the desktop environment ONLY?  Also, if someone could point me in the right direction for research, when I use multiple desktop environments, I notice that certain elements of one desktop environment (e.g. scrollbars, color schemes, program themes) are present no matter which desktop environment I log into. Is there a fix for this?


I am trying to unzip a file (Facebook download-your-info zip file), but here's what I got:   Is there a way I can force-unzip it?  Update: I tried sudo unzip file.zip -d destination_folder in terminal, and it unzipped the file, but what came out, all the files have size 0 bytes:   Update 2: I do have permission to the directory and the file.    (I'm really sorry if my question is asked badly. Let me know down in the comments :) )


Is there way to replace value of symbolic link?  For example I want to replace symbolic link like this:  first -> /home/username/foo/very/long/directories/that/I/do/not/want/to/type/again    to   second -> /home/username/bar/very/long/directories/that/I/do/not/want/to/type/again   I want to change only foo to bar.  Of course I can create a link again, but if it is possible to replace value of the link, it become easier.


I can no longer log in to my system after running this command :  sudo chown -R &USER: $HOME   as ROOT because I couldn't access  a certain file.   Now I can't log in again.


I know this might be an easy task but I cannot seem to get anywhere with this proof:  I am given this: $\exp(x)=$ $\sum_{n=0}^\infty \frac{x^n}{n!}$.  I have to prove that: $\exp(x+y)=\exp(x)\exp(y)$.


Can one use the catapult spell with a net to restrain a target?

It is clear that a , being a 3 lbs item, can be used with a  spell. Using the Catapult with an object against a creature is described as (emphasis mine):     On a failed save, the object strikes the target and stops moving.   The description of a net states that:     A Large or smaller creature hit by a net is restrained until it is freed   Would using a Catapult spell to throw a net also count as a creature being "hit" by the net and thus cause a creature to be restrained as well or is the description on the Net applied only specifically to attacks made with the net?


I was reading through Enderton's "Mathematical Introduction to Logic" and came across 2 examples, one a formula, one a relationship:   ∃x(Qx→∀x Qx) ∀y∃x Pxy $\nvDash$ ∃x∀yPxy    Enderton claims the first one is a validity. I fail to see how this is the case. How would I show this?  For the second one, I explicitly defined a predicate P: a 2 place predicate that says ($y*x = 1)$ so the statement would read as following: For all y, there exists such that ($y*x = 1)$ but the right side would read: there exists x such that for all y, ($y*x = 1)$. Now if you do it the converse way, ie ∃x∀yPxy  $\vDash$ ∀y∃x Pxy then this relationship is actually true. My question is, is the example I provided enough to show the relationship holds for (2)?  edit: Not an exact duplicate, since there is a second part of the question that is not answered in the linked thread.


I'm newbie at java and have no idea how to repair my simple code. I need to create a person, using another class, in this case, "PersonBuilder".  The problem is, that I've got NullPointerException :X      Exception in thread "main" java.lang.NullPointerException       at RevStr$PersonBuilder.withAge(RevStr.java:64)       at RevStr.main(RevStr.java:75)   There is class Person  public class Person{ private String name; private String surname; private int age; private String pesel;  // ** AKCESOR I MUTATOR ** // public void setName(String name){     this.name = name; } public void setSurname(String surname){     this.surname = surname; } public void setAge(int age){     this.age = age; } public void setPesel(String pesel){     this.pesel = pesel; }  public String getName(){     return this.name; } public String getSurname(){     return this.surname; } public int getAge(){     return this.age; } public String getPesel(){     return this.pesel; }   }  and PersonBuilder      public static class PersonBuilder{     private Person p;      public Person build(){     return p;     }  public PersonBuilder withName(String name){     p.setName(name);     return this; } public PersonBuilder withSurname(String surname){     p.setSurname(surname);     return this;  } public PersonBuilder withAge(int age){     p.setAge(age);     return this; } public PersonBuilder withPesel(String pesel){     p.setPesel(pesel);     return this; } }   Main method  public static void main(String[] args) { Person p = new PersonBuilder().withAge(25).withName("A").withSurname("B").withPesel("11224").build(); System.out.println(p); }   I assume that the problem could be repaired quickly and simply, but I can't see the solution right now :X


Use of “where” in a question when referring to something other than a place

I am teaching English online and we have this activity in which we ask a student to formulate questions from a sentence. The sentence is      There was an error in the client's invoice.   So the question is expected to be     Where was there an error?    The answer should be      There was an error in the client's invoice.   What would be a simple yet clear explanation why where is the appropriate question and not what?   Note: this is my first time asking here so I'd appreciate refinements in the way I'm asking.


Are derivatives of geometric progressions all irreducible?

Consider the polynomials $P_n(x)=1+2x+3x^2+\dots+nx^{n-1}$. Problem A5 in 2014 Putnam competition was to prove that these polynomials are pairwise relatively prime. In the solution sheet there is the following remark:     It seems likely that the individual polynomials $P_k(x)$ are all irreducible, but this appears difficult to prove.   My question is exactly about this: is it known if all these polynomials are irreducible? Or is it an open problem?  Thanks in advance.


Prove for $\sigma \in S_n$, $\sigma(a_1, … , a_n)\sigma^{-1}= (\sigma(a_1),…, \sigma(a_n))$

How do I even begin this problem? Does it involve induction or something like induction?  Would it be more helpful to instead prove it as $$\sigma(a_1,..., a_n) = (\sigma(a_1),...,\sigma(a_m))\sigma\ ?$$  I'm lost.


"Shall" versus "will" for the first person

When I studied English, I was taught that shall is used to express the future tense for the first person (singular, or plural), and will is used for the same purpose in the other cases.  When I look for shall on the NOAD, I read the following sentence, in a note about the usage of shall:     In practice, however, shall and will are today used more or less interchangeably in statements (although not in questions).   Does that mean shall and will are used with almost the same meaning?  Does I shall return have the same meaning of I will return?


Differences between ways to express future actions

I asked this question  but I haven't gotten a useful answer. Could you tell me the difference in meaning between these sentences?        Do you think you will visit them next week?     Will you visit them next week?     Are you going to visit them next week?     Are you visiting them next week?     Are you going to be visiting them next week?     Are you planning to be visiting them next week?     Do you plan to visit them next week?      Will there be any difference in the answers?        I think I will visit them next week.     I will visit them next week.     I am going to visit them next week.     I am visiting them next week.     I am going to be visiting them next week.     I am planning to be visiting them next week.     I plan to visit them next week.      Can I use "planning to" instead of "going to"?  (E.g. "Are you planning to visit them next week? — Yes, I am planning to visit them next week.") Which of these sentences show that the subject of conversation has already been discussed? For example, I talked with a friend of mine about my plans to visit somebody. So my friend is aware of my plans.  And my last question. Which of these seven sentences express that the action will certainly take place?


Is it simply a coincidence that if you differentiate the formula for the volume of sphere you get the formula for the surface area of sphere?

So my question is this: $$V=\frac{4}{3}\pi r^3$$  And,  $$\frac{dV}{dr}=4\pi r^2=SA$$ Is this a coincidence or are there some mathematical hoodoos that I'm unaware of?  P.S. are there any more tags that I should use?


Why do I get the error "failed unmounting /var" during shutdown?

I have a fresh install of Debian 9.0.0. It has a separate 1 GB partition for /var formatted at ext4. When I shutdown from the terminal, using shutdown -h now, there is a bright-red error message stating "failed unmounting /var".  What is the fix for this error?


Best way to add a DNS wildcard record for a domain

What is the best way to add a DNS wildcard record for a domain?  I want example.net, www.example.net, a.b.c.www.example.net, ... going to one server.  Now I use:  example.net.    60  IN  A       1.2.3.4 *.example.net.  60  IN  CNAME   example.net.   Is it possible to do it simpler?


I would like create something like that in QGIS:   I have a huge amount of points and I can import in QGIS (lat, long). I can create also heatmap but the result isn't like image above. if it is useful to the purpose, I have also the possibility to import a huge amout of line (I can join all my points with index before import in QGIS).  How can I obtain the lines density like the image above?


duty free from UK to EU country during transition period

I was under assumption that nothing changed during transition period but apparently. My friend flew from BHX to DUS on 25/02/2020. It was not allowed to buy any alcohol in duty-free shop except only 3 kinds of beverages... Does someone can comment on this with link to regulations in transition period? Thanks.


Locking shapefiles from editing by ArcGIS for Desktop?

How we can lock or protect a shapefile from editing in arcgis?  I want another person to be able to view the data/attributes in the shapefile, but don't want them to be able to change or edit the data.


Let $\sigma :\{1,2,3,4,5\} \rightarrow \{1,2,3,4,5\}$ be permutations such that $ \sigma^{-1}(j) \leq \sigma(j)~\forall j, 1 \leq j \leq 5$.

Which of the following are true?   $\sigma \circ \sigma(j)=j~\forall j, 1 \leq j \leq 5$. $\sigma^{-1}(j)=\sigma(j)~\forall j, 1 \leq j \leq 5$. The set $ \{k: \sigma(k) \neq k \}$ has even number of elements. The set $\{k:\sigma(k) =k \}$ has an odd number of elements .    Can someone tell me to solve it in $1$ or $2$ min....trick..or some concept behind it?


Let $F : \mathbb{R}\to \mathbb{R}$ be a monotone function then Prove that  $F$ has countably many discontinuities.  Edit: Monotone function is not only increasing.  My Attempt :  I know that the set of discontinuities of a monotone function is at most countable. If I take greatest integer function $[x]$ which is monotone function that has countable set of discontinuities as $\Bbb Z $. But I'm unable to Prove it. Please help me.


How does one account for the momentum of an absorbed photon?

Suppose I have an atom in its ground state $|g⟩$, and it has an excited state $|e⟩$ sitting at an energy $E_a=\hbar\omega_0$ above it. To excite the atom, one generally uses a photon of frequency $\omega$ equal (or sufficiently close to) the transition frequency $\omega_0$, and this will stimulate a transition.  One thing that is often left by the roadside,* though, is the fact that the incoming photon has momentum as well as energy, and that if the atom wants to swallow the energy it also needs to swallow the momentum. So, in the nuts and bolts of states and operators,     how does one describe the transfer of momentum during an atomic transition?   In addition to this, the fact that this recoil momentum is rarely mentioned is a good indication that it is also rarely an issue. Why is it that in most circumstances we can safely ignore the photon's momentum when describing electronic transitions?  *Apart from treatments of Doppler cooling, which simply take the momentum transfers for granted and do not explain how and why they happen.


Is it possible (in 2019) to appeal a Community♦ judgement? ("This question was deleted as spam or offensive")

Earlier today I asked a , seeking to clarify whether Stack Exchange (the commercial organisation) subscribes to a particular pseudo-scientific idea or not.  There ensued an animated, albeit entirely civil, discussion.   Some people supported subscribing to the idea, regardless of SE's perspective Some people opposed subscribing to the idea, regardless of SE's perspective Some people speculated that SE probably subscribed to the idea Some people felt the question was ambiguous Many people thought the question worth downvoting Many other people thought the question worth upvoting   Certainly there was no unanimity, but there definitely was no shortage of intelligent exchange. Between humans.  Then Community♦ came along.  Community♦ deleted the question and said:     This question was deleted as spam or offensive   I don't think the question was either spam or offensive.  I'm fairly certain that many others, whichever position above they took, also did not consider the question spam or offensive.  Is there any way to appeal a Community♦ judgement? Or is the judgement final?


I made a partition on my hard drive to install Ubuntu and thus have Windows 10 and Ubuntu 18.04. Now I want to allocate more space to Ubuntu and I find a difficulty that is to move the partition with swap, since between the partition in which Ubuntu is and the free space is swap. I tried to move it with GParted but there are still things that I do not understand well. How could I increase the main partition of Ubuntu?    This post has been translated from Spanish. Please see the  for the original


UK PLAB Visa Refusal due to unexplained bank deposits

I had applied for a PLAB (Doctors) Visa for the UK to appear in PLAB test. I got refused on the basis of two recent large deposits in the bank statement I provided (my mothers). In reality, these are my own savings which I had deposited in her account to make it more strong. The only objection I got was that I must provide evidence for the source of these deposits. Other than this, I have previously travelled to the UK and USA as well as other parts of the world and my travel history is fine. Can someone please advise on how to proceed and re-apply?


Turn multiple line into one liner with custom separator

Trivial question. What is the most elegant function myfunction that allows to produce the following output?  # myfunction "a b c d" a%0Db%0Dc%0Dd%0D


I am using Ubuntu 14.04 LTS and I really need for my work to use Nvidia driver. My NVIDIA card is NVIDIA GeForce GTX 1050 Ti and I find in  that driver version 390.59 is the driver I should install.  After download the driver I run it and I have this error show in the image throw the link:


I tried to remove wine but it says that virtual packages like wine can't be removed. Also I am unable to find my .wine file.


Could Gandalf have killed the Witch-king?

There was a prophecy about the Witch-king of Angmar saying that 'No man could kill him'.  The actual quote:     "He will not return to this land. Far off yet is his doom, and not by the hand of a man will he fall."   —Glorfindel, The Return of the King, Appendix A (iv)   I always interpreted it as literary speak for no person of the male gender could kill him, which is why Eowyn was able to deal the death blow after Merry broke the spell granting them undying life.  But while answering  question, NominSim pointed out rightly that it is possible to interpret the prophecy as no male human can kill him and since Gandalf was a maiar, he could have definitely defeated the Witch King.  Is there anything in canon to clear this up?


public  class MyPositionClass {      public List<Position__c> pos;     public  void  updatePositionRecords() {         pos = [select id, Name, Apex__c, Close_Date__c, Days_Open__c, Educational_Requirements__c,                Functional_Area__c, Hire_By__c, Job_Description__c, Job_Level__c, Location__c, Max_Pay__c, Min_Pay__c,                Open_Date__c, Responsibilities__c, Travel_Required__c , Skills_Required__c   from Position__c  where RecordTypeid = '0126F0000016zuu'];         for (Position__c p : pos) {             if (p.Name == 'Salesforce Busyness Anylyst') {                 p.Close_Date__c = Date.Today().addDays(30);                 p.Hire_By__c = Date.Today().addDays(90);                 if (p.Travel_Required__c == false) {                     p.Travel_Required__c = true;                 }                 if (p.Java__c == false) {                     p.Java__c = true;                 }             }             update pos;         }     } }


After upgrading from 14.xx.xx to 16.04 I miss the wifi.  Herewith is the nice report... so... anybody has a clue about what I should do now?  Thank you in advance.  dmesg | grep -i firmware [   14.893895] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0b05-17b5.hcd failed with error -2 [   15.436254] b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error -2 [   15.436293] b43 bcma0:1: Direct firmware load for b43/ucode30_mimo.fw failed with error -2 [   15.436326] b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with error -2 [   15.436350] b43 bcma0:1: Direct firmware load for b43-open/ucode30_mimo.fw failed with error -2 [   15.436358] b43-phy0 ERROR: Firmware file "b43/ucode30_mimo.fw" not found [   15.436364] b43-phy0 ERROR: Firmware file "b43-open/ucode30_mimo.fw" not found [   15.436368] b43-phy0 ERROR: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version.      Please carefully read all instructions on this website.


A friend asked me for the time. When I looked at my analog clock (which only has a minute hand and an hour hand, no second hand), I thought of telling her the time with the hour and minute hands swapped, and then have her work out the actual time. Then I realized that not all clock-hand configurations make sense when the hands are swapped. Let $T$ denote the set of all clock-hand configurations on an analog clock that occur over twelve hours. Question: What is the subset of times $S\subseteq T$ such that when the hands are swapped, the time still makes sense? (In other words, $S$ is the maximal subset of $T$ closed under the operation of swapping the hands.) Comments: $S\neq T$, since for example $3:00\notin S$. But $S$ is non-empty, since $12:00\in S$.


I'm trying to do some shizzle with SFTP and SSH but it would seem I'm getting hung up on super-simple array declaration.  According to , I should be able to use the following syntaxes to create an array:  [bob in ~] ARRAY=(one two three)  [bob in ~] echo ${ARRAY[*]} one two three  [bob in ~] echo $ARRAY[*] one[*]  [bob in ~] echo ${ARRAY[2]} three  [bob in ~] ARRAY[3]=four  [bob in ~] echo ${ARRAY[*]} one two three four   The part from that for me to focus on is this line:  [bob in ~] ARRAY=(one two three)   I tried replicating in my script:  #!/bin/bash USERS=("user1" "user2" "user3") PASSES=("pass1" "pass2" "pass3")  for i in ${!USERS[@]}; do     echo ${PASSES[i]}; done   Running this (using sh script.sh) outputs:     script.sh: 2: script.sh: Syntax error: "(" unexpected   Why is my array declaration incorrect? Is the guide just wrong?  I know I can use:  declare -a ARRAY   and then append to it, but I like the idea of using a one-liner wherever possible.   Thanks,


Let us choose a different theme for the Android app

Please provide a setting to select themes and an option for a white-text-over-dark-background (e.g. twilight, monokai) theme for the Android app.  This would make reading the posts much easier on the eyes.


i know it's rude and pretentious and maybe stupid to ask such question but, i would like to know the reason why in geometry the area of a parallelogram follows this formula :  $ Base \times Height $  and not this one :  $ Base \times Side $  I saw this method which consists of transforming our figure into a rectangle by moving the black one to the right, and that seems logical to me, but why not adopt the second rule, all the horizontal points multiplied by the vertical ones ?    PS :  I found the same , but was unconvinced by the answers


Can I use dispensers or droppers to auto-replant crops?

I'm working on a fully-automatic farm now that 1.5 is out. The plan is to use redstone to flush fully-grown crops into a channel to be collected by a hopper and then picked up by a cart. The issue I've ran into, however, is that seeds do no seem to be planted by dispensers or droppers. The wiki says bone meal can be used on growing crops from dispensers, but is it possible to plant the crops from either device?   This is my current setup:


Is there a browser that allows different instances that don't use the same cookie for the same site?

By default, all browser instances use the same cookie for the same site. Is there a browser that doesn't follow this?  Or is there a Firefox plugin that can "wear" different cookies for a specific site?


Is there another way to restart the sound system if pulseaudio/ALSA don't work?

I was listening to music, and my sound suddenly went dead in all my applications. I'm using Ubuntu 12.04, which uses pulseaudio, so I tried sudo /etc/init.d/pulseaudio restart, but nothing happened. According to lsof | grep pcm, nothing is using the soundcard at the moment, although I'm not entirely sure if  is applicable.   Is there a way another way to restart Ubuntu 12.04's sound system from the command line without rebooting the system?


Finding value of $k$ in definite Integral

If $\displaystyle \int^{\pi}_{0}\ln(1-2a\cos  x+a^2)dx=k\ln(a),a>0$   Try: assume $$I(a)=\int^{\pi}_{0}\ln(1-2a\cos x+a^2)dx=k\ln(a)$$  Differentiate both side with respect to $a$  $$I'(a)=\int^{\pi}_{0}\frac{2a-2\cos x}{1-2a\cos x+a^2}dx=\frac{k}{a}$$  Now substitute $a=1$ because given $a>0$  So $$\int^{\pi}_{0}\frac{2-2\cos x}{2-2\cos x}dx=k.$$  So $k=\pi.$  But answer given is $2\pi$  Could some help me what is wrong in my process, thanks


How to disable mist/fog in the viewport?

When i zoom out even a bit, there's this mist that prevents me from seeing the object. Is there a way to disable it?


Where can I download the Beta release for Ubuntu?

According to the 13.04 release schedule, the Beta 2 release for 13.04 was made available today (April 4). Does anyone know where I can download it? Thanks!


Is having 2x4GB of RAM or 4x2GB of RAM faster

I've seen lots of controversy on this topic so I want to ask it for myself.  I have 4 RAM slots on my Q43 (antelope) motherboard. Apparently It can take a max of 8GB of RAM. I already have 2 4GB sticks of RAM and loads of 2GB sticks. If they both run at the same speed Which would be faster for me? I've heard people say that 4x2 is faster because there are more lanes, and people say that 2x4 is faster because it doesn't have to switch between them? Who's right? And why?


Problem with disallowing Poll-based questions

As I understand it, the reason that poll-based questions are disallowed on Stackoverflow is because they lend themselves poorly to the Q&A format.  Several explanations for this exist on meta, but I found tzenes answer to this question to be the most helpful:    The problem I see is that Stackoverflow has become too powerful and dominant in the community for this policy. It is no longer "just a Q&A site". It is the best site, by a huge margin, to glean wisdom from the community in general.   Because of this, for problems that lend themselves to poll-based questions (Example: What software library should I try for X?), even though it was not designed for this purpose, it is still THE best place to get this type of information. And despite its being a poor format for poll-based questions. There is no legitimate competitor.   (Here is an example of a great source of information from a Stackoverflow poll-based question: )  If I understand correctly, an ideal solution to this problem would be to implement a system that works better for poll based questions. I mean who wouldn't want to know that "X" software package is liked by the most people with the highest reputation?   Unfortunately, it takes time and money to implement new software. So in the mean time, I might suggest one or more of these temporary solutions:   Allow poll-based questions, but have them tagged as "poll" so people can easily filter them out. By moderator discretion, stop closing poll-based questions with significant up-votes By moderator discretion, opt to not close poll-based questions from users with high reputation or who have obviously put a lot of time into crafting a well-worded question Only allow poll-based questions and answers from users with significantly high reputation.


What is the relationship called between a word and something/someone that does/performs that word?

Basically, is there a word that relates "carpenter" to "carpentry" or "astronomer" to "astronomy"? So if there is a subject that does some noun, is there a word or phrase for that relationship? EDIT 1: Sample sentence: "'activist' is a _________ of 'activism'." or "'architect' is a _________ of 'architecture'."


What is the point of isomorphism concept?

In many courses, say Linear Algebra, Group Theory, Topology, instructors often say that knowing that certaing objects are isomorphic, sometimes makes life easier because we can work with more friendly objects.  Is there any example of using isomorphism concept to solve a non trivial concrete problem?   I must say, I'm not looking on important or famous isomorphic objects, but on non trivial application of the concept of isomorphism used in order to solve another kind of problem.


Use the chain rule to convert the Laplace equation in (x,y) coordinates into an equivilent differental equation in (r,theta) coordinates.

use the equations $r=\sqrt{x^2 +y^2}$ and $\theta=\arctan(\frac{y}{x})$. I was able to get the partial derivative of of $r$ with respect to $x$ and $y$ and the partial derivative of $\theta$ with respect to $x$ and $y$. I have spent hours trying to figure this problem out by looking at the polar form of the Laplace equation as a reference but everything I try does not get me to that point. If anyone is up to the challenge please help me out! I apologize for not putting in Latex format, I have not quite gotten the hang of it yet.


New hard drive is read-only and root-only access, how can I get full access to it?

I'm very new to this and I've been at trying to fix this problem for about two hours to no avail.  I just finished getting my new computer put together and installed a new 2TB Seagate hard drive as a secondary drive (my boot drive has no problems at all). I have it formatted into two petitions, one in ext4 through GParted. I want to use this partition to store extra files and programs (specifically games and CAD stuff). I went to make a steam library folder in it and found that it's read only. It is at /dev/sda1  I first attempted to reformat it to no avail. I looked around for some help (most of what I found related to external storage) and tried a few things through the terminal to change the owner.  mount /dev/sda3 /mnt/   Returned "only root can do that."  I'm stuck past here, I've tried a couple other things I can't hunt down now, but every attempt gives an access problem to me. How can I change this and regain access? Are there more effective ways to map/install this drive for this purpose to avoid this problem in the future? Thank you!


Was the fact that the foreign schools were non-coed important?

Is there any explanation for why the other 2 schools in the TriWizard tournament are both single-gender, unlike Hogwarts?  Was single-gender education normal in wizarding world with Hogwarts being the exception?  Was this some special intentional literary trick on Rowling's part or on movie creators'?    Here's the evidence from the movies:  Durmstrang Institute is boys-only:    Beauxbatons Academy of Magic seems to be an all-girl school:


Can a 3rd party app *technically* take better pictures?

I've seen in several forums that some phones have very good cameras and the photos  taken are compressed too much and the details are lost.  I was wondering whether a 3rd party application (forgetting the post processing done by the application) have access to the full resolution image without any compression.  So can another application access the raw data from the camera or all applications gets the same raw data when they access the camera?


I am using exsheets and pythontex packages in order to make a book of exercises. I have noticed that pycode environment cannot be used inside question (or solution) environment of exsheets. However, \pyc command works normaly within question.  The easiest workaround is to write pycode outside of solution and, in nutshell, that works for me. However, I would like to understand the reason behind this limitation.  \documentclass{article} \usepackage{pythontex} \usepackage{exsheets}  \begin{document}     \begin{question}         \begin{pycode}          i_Go = J_L * J_M         \end{pycode}     \end{question} \end{document}


Windows 7 how do I get rid of mobigenie malware

How do I get rid of mobigenie it keeps changing my chrome search setting and attempting to install backup and driver software.


I am trying to model a violin belly and I am intrigued, how is it possible to make faces with soft / rounded edges?    The edges I do are totally straight (see the blue amoeba).  Also, do you have some idea on how to avoid the edge loops getting too "compressed" in the middle of the model (see the red amoeba) ?    I know the Subdivision surface modifier, but I want curved edges after applying the modifier... like in this picture :  Any help will be very appreciated. Thank you in advance!  Marcos  2nd part  In fact, I've tryied to model using nurbs and bezier curves, but I wasn't able to find any tool similar to loft that works with curves, then I was forced to convert it in meshes, the results were not terrific and I've started to move the vertices manually, a real pain... Unlike a guitar, each edge loop is on a diferente elevation on z axis and I have to keep the original dimensions, So I have to be extremely careful when using the subdivision suface modifier. I've already modeled this think on three different CAD softwares, but the meshes are far from good... I want to improve the edge loops, but it will be a long path... Thank you again.


What is a word that means someone who hates their own race?

I'm seeking a word that means you hate your race for whatever reason, but you don't hate yourself for being a part of it, because it wasn't up to you to choose to be so.


How to create a separate subnet for wireless access?

I need to configure my wireless router so all wireless devices are on a different subnet (192.168.2.1).  The wireless devices should be able to access the internet, but ideally not the workstations on the LAN.  Here is my network:    All suggestions welcome!


Are the links in JavaScript considered as Toxic Backlinks?

I have the similar question as asked at   Actually, I have suddenly found an increase in a number of backlinks and decrease in my SEO rankings.   I checked all these new sites from where I gained the links, but cannot find my website URL when I used View Source option (Ctrl + U)  So is it possible that my website's URL is included in the Javascript and Google is counting them as backlinks and they are classified in toxic backlinks? However, I haven't received any notification in webmasters.   Is there any way to check the URLs in the Javascript?


Javascript Regex: How to put a function argument inside a regular expression?

I have the following javascript function with one argument     How can i put function argument text inside this regex rather than YYYYYYYYY  innerHTML = innerHTML.replace(/YYYYYYYYY/gi, '' + text + '');


Every time I try to install or remove a package, I get this error. I thought maybe it was the hard disk, but a disk check gave me a clean bill of health. dpkg: unrecoverable fatal error, aborting: reading files list for package 'linux-headers-3.16.0-31': Input/output error E: Sub-process /usr/bin/dpkg returned an error code (2) A package failed to install.  Trying to recover:  I tried the solution of removing the listing for this file from the dpkg status file, but to no avail. I tried purging the package but no use. I'm stuck at this point as nothing I can find on Google helps. Update: This is now what the error says: dpkg: unrecoverable fatal error, aborting: E: Sub-process /usr/bin/dpkg returned an error code (2) A package failed to install.  Trying to recover:  After trying:  Update2: Seems the drive has bad sectors, but the reallocated sector count is 0. The drive is relatively old, however, so I expect some issues. I won't be able to replace it immediately, and until then I would still like to be able to keep the system up to date (especially for security reasons). I noted that there was an issue with coping some md5 checksums related to the package mentioned in the error, but I don't know what to do with those, such as if clearing them would allow dpkg to continue.


I have a text file:  deiauk 1611516 afsdf 765 minkra 18415151 asdsf 4152 linkra sfsfdsfs sdfss 4555 deiauk1 sdfsfdsfs 1561 51 deiauk2 115151 5454 4 deiauk 1611516 afsdf ddfgfgd luktol1 4545 4 9 luktol 1   and I want to match exactly deiauk.  When I do this:  grep "deiauk" file.txt   I get this result:  deiauk 1611516 afsdf 765 deiauk1 sdfsfdsfs 1561 51 deiauk2 115151 5454 4   but I only need this:  deiauk 1611516 afsdf 765 deiauk 1611516 afsdf ddfgfgd   I know there's a -w option, but then my string has to mach whole line.


Settings on ISO and Aperture for Sunset on Canon 600D

I will be going to a beach location and there will be opportunities for some good sunsets.  I have a Canon 600D with 2 lenses and wanted to know the range for ISO and aperture settings.  I am doing daily home work with normal sunsets and want some guidance on the range of settings.  Many thanks


When transiting Moscow (SVO), citizens of which countries need a transit visa?

According to  it seems that anyone can make the transit without a visa, but I'm not convinced. Where can I get some more official information on this?


How do I install "non-free firmware" (wifi driver) from USB? (Debian)

I just installed Debian on laptop, it tells me  Some of your hardware needs non-free firmware files to operate. The firmware can be loaded from removable media, such as a USB stick or floppy. The missing firmware files are: iwlwifi-7265-9.ucode iwlwifi-7265-8.ucode If you have media available now, insert it, and continue. Load missing firmware from removable media?  Using minimal Debian iso and no mirror I was able to install terminal only. Two questions:  Where do I download these files?  How do I get Debian to recognize them once on flash drive? Grep?  Do I need to do special formatting or partitioning to flash drive?


Predestination (movie) - predestination or bootstrap paradox?

In the movie Predestination:     Jane is born as a result of John and Jane having sex. John and Jane are the same people from different timeline.    Is Jane's birth because of a predestination paradox or bootstrap paradox?  which one is it?


Getting "Google Chrome didn't shut down correctly" every week

I am getting "Google Chrome didn't shut down correctly" twice a week - it becomes a very annoying problem -  I always fixed this issue by removing the chrome's default user profile and re-opening the chrome, but doing this will remove all my extensions / apps / bookmarks / settings.   but this is happening more often and I keep losing settings   is there a way to end this madness? I am running Win 8.1 / latest version of chrome


Prove certain subsets of $\mathbb R^n$ are subspaces

Show  $S=\{ x \in \mathbb R^n\mid x\cdot v=0 \}$ is a subspace of $\mathbb R^n$. Show $\mathbb Rv=\{tv\mid t \in \mathbb R\}$ is a subspace of $\mathbb R^n$ and describe $S$ and $\mathbb Rv$ geometrically when $n=3$.   I know I should check property of subspace, but in these two cases I have no idea how to start. Someone give me a hint?


changing the intensity falloff of light sources using Cycles nodes

So generally people tend to agree that the intensity of light has a fall-off that is the inverse square of the distance to the light.    Something like:  intensity  = 1.0 / (distance * distance);    I'm fairly certain from what people say that this would be used in OSL/Cycles since it's supposed to be physically based however it's useful to have control over this when a scene is being difficult or even just to give more control when using several fill lights.  I'd like to find a node setup that can help modulate(or replace) the current falloff with something that is a bit more linear.    intensity = 1.0 / distance;   So does anyone have an idea on how to control the intensity falloff using what we have available to us already?


Researching English/Christian families in India during first half of 19th century?

Are there any online sources of information for (English) Christian families in India?   I'm particularly interested in the first half of the nineteenth century.


Why are there so few robots in Star Trek?

Okay, obviously beyond Data and the Soong-type androids. But seriously, we have more robots in our daily life now than there apparently are on Trek. Is there a canon answer why not? It seems like Star Wars is more on the nose in this regard - it’s unclear why all dirty/dangerous/boring work wouldn’t be done by robots (anthropomorphic or not).


Should I capitalise "or" between examples?

On this site, there are often many different options as an answer, for example both with and without the Oxford comma.  When giving multiple options, should I capitalize the word "or" between them?  Option 1:     Eggs, butter and milk are dairy products   Or   Eggs, butter, and milk are dairy products     Option 2:     Eggs, butter and milk are dairy products   or   Eggs, butter, and milk are dairy products     Notice in Option 1 the "or" is capitalised. In Option 2 the "or" isn't.


Is there an efficiency hit for a constant formula in a C #define?

I was perusing some kernel source code from cpufreq_governor.h and saw this:   /*  * The polling frequency depends on the capability of the processor. Default  * polling frequency is 1000 times the transition latency of the processor. The  * governor will work on any processor with transition latency <= 10ms, using  * appropriate sampling rate.  *  * For CPUs with transition latency > 10ms (mostly drivers with CPUFREQ_ETERNAL)  * this governor will not work. All times here are in us (micro seconds).  */ #define MIN_SAMPLING_RATE_RATIO         (2) #define LATENCY_MULTIPLIER          (1000) #define MIN_LATENCY_MULTIPLIER          (20) #define TRANSITION_LATENCY_LIMIT        (10 * 1000 * 1000)   Would it not be more efficient to change the last line to read:  #define TRANSITION_LATENCY_LIMIT        (10000000) /* (10 * 1000 * 1000) */


Gaming performance difference between Windows and Ubuntu

What are the pros/cons switching from Windows 7/8 to Ubuntu?  I mainly develop software and play games.  I obviously don't play games on my laptop that's why I give Ubuntu a try. But the whole OS looks great and I recently discovered PlayOnLinux.  How big is the performance hit from Windows games?  What if the game supports DX11 and has tessellation, does PlayOnLinux translate DX11 to OpenGL?


How do I select OK on the following screen?

Clicking and doubling clicking with the mouse doesn't work.


LibertinusT1math printing unusual characters in Beamer

Using LibertinusT1math in Beamer, several characters (e.g., circle, \times) are not displayed and some (parentheses) are displayed incorrectly.  The following code shows the problem.  Just uncomment the \usepackage{libertinust1math} line to see the output with and without the errors.  I'd be very grateful for any suggestions.  The problem doesn't occur using the article class.  \documentclass[12pt,presentation]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{libertinus} \usepackage{textcomp} \usepackage{amsthm} % \usepackage{libertinust1math}  \setbeamertemplate{itemize items}[circle]  \begin{document} \begin{frame}{Linear Regression}   \begin{itemize}  \item first  \item second  \end{itemize}  \[ Y_{E} = b_{0e} + (b_{1e} \cdot x_{1}) + (b_{2e} \cdot x_{2}) + (b_{3e} \cdot x_{3})\ldots (b_{ne} \cdot x_{n}) + e\]  Degree classification \(=(IQ \times 0.23) + (Motiv \times 0.36) + (Grade \times 0.54) + (Supp \times 0.14) + 20.3\)  \end{frame} \end{document}


I need to change system time and date on my xubuntu to do some QA testing does anyone know how to do it?  I tried going into system manager -> time and date setting  every time i change the time it keeps going back to current time.


when i try to download anything from terminal i have this

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?


Have men and women in the Wizarding World always had relatively equal rights?

There are racial struggles and examples of racism, (Muggle-borns, centaurs, hous-elves, goblins, etc.) but are there any examples in the Wizarding World of sexism?  Have witches and wizards always had equal rights?


Suppose $f$ is differentiable on $R$ and $f'(x) \leq 4$ for all $x ∈ R$. Prove that there is at most one $a \leq 2$ such that $f(a) = a^2$.

Suppose $f$ is differentiable on $\Bbb R$ and $f'(x) \leq 4$ for all $x \in \Bbb R$. Prove that there is at most one $a \leq 2$ such that $f(a) = a^2$.  I'm trying to come up with a way to prove this using contradiction and MVT, but I'm not sure how. I assumed there were two such numbers on $\Bbb R$ and since differentiable implies continuous, then ...?


Clarifying on how if p,q is logically equivalent to p only if q

Here is what my book says about the different ways implications are worded     I am struggling with how "if p, then q" is logically equivalent to "p only if q"  The example I came up with   With "if p, then q" - If Russell plays in the NFL, he plays football.  With "p only if q" - Russell plays in the NFL only if he plays football.  Say Russell plays in the NFL, plays football and plays soccer.   With regards to that statement, my thought would be that "If Russell plays in the NFL, he plays football" implication would evaluate to true because Russell plays in the NFL and he plays football. However, with regards to "Russell plays in the NFL only if he plays football", wouldn't this evaluate to false because it says that the only way for Russell to play in the NFL is if he plays football. That means that playing football and soccer would not be a path for Russell to play in the NFL because it is not the  defined only way, only playing football.   Can someone clarify this?


I'm trying to write a program that can compute the average result given an integer N  #!/bin/sh          CTR=0     sum=0     read N          while [ $CTR -ne $N ]; do       read integer;       sum=$(( $integer + $sum ))       CTR=$(( $CTR + 1 ))     done           printf '%.3f\n' "$(( $sum * 1/ $N ))"  This was my input when compiling : 2 5 6  Expected output 5.500 Actual output 5.000 Why is that ?


need to replace default drupal user picture with an image field from user profile

Need to replace the user_picture with my own field_profile_picture(since i've provided a nice crop with imagefield crop).   I've succeeded in getting the file path using template_preprocess_user_picture and the code   function theme_preprocess_user_picture(&$variables) {             $account = user_load($variables['account']->uid);     if(isset($account->field_profile_picture['und'][0]['uri'])) {         $variables['user_picture'] = $account->field_profile_picture['und'][0]['uri'];   the user_picture is getting replaced by the file path.... how to render the image???  Anyone Please....


Force placement of pairs of figures on even and odd page

Is there a possibility to place pairs of figures on the even page and the corresponding odd page, respectively? The scenario is that I have e.g. 2 figures showing the same statistic (separating males and females). Each figure spreads over a whole page. Now, it would be very good for improved readability (for comparing males' and females' results) if this pair would be placed on corresponding even and odd pages:  |~~~~~~~~~~||~~~~~~~~~~| |Text Lorem||elitr, sed| |ipsum dolo||eirmod te | |sit amet  ||fot.      | |sed diam  ||          | |ut et doro||          | |~~~~~~~~~~||~~~~~~~~~~| |~~~~~~~~~~||~~~~~~~~~~| |-FigureA-+||-FigureA-+| |-females+-||-males+-++| |++++---+++||+++-+----+| |-++-++--++||+++-+-----| |++-++-++-+||--+-+--+-+| |~~~~~~~~~~||~~~~~~~~~~|  \documentclass[twoside=on]{scrartcl} \begin{document}     Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore et dolore  magna aliquyam erat, sed diam voluptua. At vero eos et accusam   et justo duo dolores et ea rebum. Stet clita kasd gubergren,   no sea takimata sanctus est Lorem ipsum dolor sit amet.       \begin{figure}         \includegraphics{statisticA-females.pdf}     \end{figure}     \begin{figure}         \includegraphics{statisticA-males.pdf}     \end{figure} \end{document}   Hence, what I need, is something like \cleardoublepage without leaving float mode for figures (without creating empty space, at least, as Long as there is text left).  Is this possible? Thanks for any suggestions!  Fabian


What kind of magic is happening in these screenshots?

In HP and the Order of the Phoenix, we see this magic occurring;      What's this called?


NullPointerException trying to access a BufferedWriter method

I am trying to separate an old program I wrote into multiple classes. The old program had a method that was 4000 lines so obviously this won't suffice. Right now I'm trying to get past a persistent null point error.   What I want to accomplish is to have a GUI class, buffered reader/writer, and main. I want the main class to first call the GUI which will allow the user to select a file and save directory. I then want the reader/writer to scan the file and save the number of lines starting with "5" as a variable to be used later. I will add a second scan of the file later to manipulate the data but for now I'm simply trying to scan for the number of lines beginning with five and I keep getting this pesky null pointer & have no idea why..   Main Class  package nachamulti;  public class NachaMain   {      public static void main(String args[]){          NachaWriter writer = new NachaWriter();          NachaGUI gui = new NachaGUI();          gui.getFile();         gui.setDirectory();          writer.getTotalBatches();          System.out.println(writer.fiveTotal);      }  }   GUI Class  package nachamulti;  import javax.swing.JFileChooser; import javax.swing.filechooser.FileNameExtensionFilter;  public class NachaGUI{      JFileChooser uploadFile;     JFileChooser saveFile;         public void getFile(){          JFileChooser chooser = new JFileChooser();         uploadFile = chooser;         FileNameExtensionFilter filter = new FileNameExtensionFilter("ACH Files", "ach");         chooser.setFileFilter(filter);         chooser.setDialogTitle("Please choose ACH file to upload");         int returnVal = chooser.showOpenDialog(chooser);         if(returnVal == JFileChooser.APPROVE_OPTION){          }     }      public void setDirectory(){          JFileChooser chooser2 = new JFileChooser();         saveFile = chooser2;         chooser2.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);         int returnValue2 = chooser2.showDialog(chooser2, "Directory to save");         if(returnValue2 == JFileChooser.APPROVE_OPTION){          }      }   Buffered Reader Class  package nachamulti;  import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList;  public class NachaWriter   {      BufferedReader br = null;     BufferedWriter bw = null;     BufferedReader br1 = null;     String five = null;     String eight = null;     String one = null;     ArrayList<String> sixList = new ArrayList<String>();     int fiveCounter=0;     int fiveTotal=0;     int nineCounter=0;      NachaGUI gui = new NachaGUI();      public void getTotalBatches(){          try{              String sCurrentLine;             br = new BufferedReader(new FileReader(gui.uploadFile.getSelectedFile()));              while((sCurrentLine=br.readLine()) != null){                 if(sCurrentLine.startsWith("5")){                     fiveTotal++;                 }             }          }catch(IOException ex){             ex.printStackTrace();         }finally{             try{                 br.close();             }catch(IOException e){                 e.printStackTrace();             }         }      }  }   Stack Trace  Exception in thread "main" java.lang.NullPointerException     at nachamulti.NachaWriter.getTotalBatches(NachaWriter.java:43)     at nachamulti.NachaMain.main(NachaMain.java:16)   The input file does not much matter. As long as it has lines of text and at least some begin with the number "5".


How to know what program a java process is running

I want to find out which application a java process is running for.  When I open a task manager, there are many java.exe processes listed there, but I have no idea what applications those java.exe are running for?


Basic question about Fisher Information matrix and relationship to Hessian and standard errors

Ok, this is a quite basic question, but I am a little bit confused. In my thesis I write:  The standard errors can be found by calculating the inverse of the square root of the diagonal elements of the (observed) Fisher Information matrix:  \begin{align*} s_{\hat{\mu},\hat{\sigma}^2}=\frac{1}{\sqrt{\mathbf{I}(\hat{\mu},\hat{\sigma}^2)}} \end{align*} Since the optimization command in R minimizes $-\log\mathcal{L}$ the (observed) Fisher Information matrix can be found by calculating the inverse of the Hessian: \begin{align*} \mathbf{I}(\hat{\mu},\hat{\sigma}^2)=\mathbf{H}^{-1} \end{align*}  My main question: Is this correct what I am saying?  I am a little bit confused, because in this  on page 7 it says:      the Information matrix is the negative of the expected value of the   Hessian matrix   (So no inverse of the Hessian.)  Whereas in this  on page 7 (footnote 5) it says:     The observed Fisher information is equal to $(-H)^{-1}$.   (So here is the inverse.)  I am aware of the minus sign and when to use it and when not, but why is there a difference in taking the inverse or not?


I have a business logic as follows.   1. A web service class parses XML file containing case data and loads the case to SF. 2. Trigger that on update of case email field make a call to future method to generate attachment ,send email and update case owner field.  trigger CaseUpdate on Case (After update)  {  for(case c : trigger.old)  {     for(case ca : trigger.new)     {         if((c.Email__c != ca.Email__c) && (c.CS_ID__c != null) && (c.Count__c == 1))         {           UtilsClass.generateReport_Future(c.id);         }     }  } }    @Future(callout=true)  public static void generateReport_future(String caseId)  { String result = ''; result = generateReport(caseId); if(result == '')  {     result = emailReport(caseId); } UtilsClass.ChangeOwner(caseId);  }   The issue i am facing is,  System.LimitException: Too many future calls: 11, even though single case record is loaded.  Multiple records may be loaded at the same time, but they are sequential(One By One).  Are the records coming in a single batch even though they are being loaded individually..?


How to keep Bash running after command execution?

I would like to run something like this:  bash -c "some_program with its arguments"   but to have an interactive bash keep running after some_program ends.  I'm sure -c is not a good way as man bash seys:     An interactive shell is one started without non-option arguments and   without  the  -c  option   So how to do this ?  The main goal is described   NOTE   I need to terminate some_program from time to time I don't want to put it to the background I want to stay on the bash then to do something else I want to be able to run the program again


When having a number of files opened in Texmaker, at the top of editor pane, there is a drop down panel with the names of open documents in it. I prefer to have tabs of open documents at the top of editor pane, similar to Texstudio and Winedt. Is there a way that I can change this setting?


How to add a reminder to a specific list and time via Siri

I can say " Add call friend to my Work list " and Siri will add that reminder to the specific reminder list WORK. However, if I imply any time, it will add it as a calendar entry. Yet when I say " remind me to call friend on Thursday ", Siri will add the reminder on that day and at 9AM ...   But I would like to choose my own date and time for reminders while specifying which reminder list it goes in, how can I accomplish this ?  EDIT  I managed to find this method :   Me : Remind me to call friend on thursday at 11am Siri : Here is your reminder, shall I create it ? Me : Move it to my name list   And then the reminder is moved to your specific list. However, I would rather avoid having to do this longwinded method, is there a way to skip step 2 and combine them all in one sentence ?


Why are the global sections of structure sheaf of Proj$S$ just the homogenous elements of $S$?

Let $A$ be a ring and define $S = A[x_{0}, x_{1}, \ldots , x_{r}]$. Let $X = \text{Proj }S$. I would like to show that $\Gamma(X, \mathcal{O}_{X}(n)) = S_{n}$. This is Proposition II 5.13 in Hartshorne, but I am not comfortable with the proof given there. I am currently trying to follow the proof , which is the corrected version of the proof given in Liu's Algebraic Geometry and Arithmetic Curves. The idea seems simple enough. To specify an element of $\Gamma(X, \mathcal{O}_{X}(n))$ is to specify the restrictions, $$ f_{i} = \frac{g_{i}}{x_{i}^{d_{i}}} \in S(n)_{(x_{i})} \quad \text{with } \deg(g_{i}) = n + d_{i} $$ We can assume WLOG that $g_{i}$ in the above is not divisible by $x_{i}$. We would like these restrictions to agree on overlaps $D_{+}(x_{i}x_{j})$, that is $$ \frac{g_{i}}{x_{i}^{d_{i}}} = \frac{g_{j}}{x_{j}^{d_{j}}}  $$ In terms of the equivalence relation defining localization, this gives us that $$ g_{i}x_{j}^{d_{j}} - g_{j}x_{i}^{d_{i}} = 0 $$ From this I would like to reconstruct a unique element of $S_{n}$. Is someone able to walk me through what is actually going on in the proof above? I'm missing something, and am not sure how we can recover the homogenous polynomial that he does. Even if I could just see this done for the case of $S = A[x_{1}, x_{2}]$ would be enough.


Just wanted to check because I have multiple Schengen Visa and during the application I applied France as I will be spending more days in Paris and that is my point of entry. However the ticket I've booked going to Paris is through Czech Airlines and I have 12 hours layover at Prague-Vaclav airport. I want to check if I can go out from the airport and have a quick tour at Prague City Center?


How do I get a colored sky instead of black for stars photo? I recently took a long exposure night shot and it looked great but the sky is basically black with white stars. I've seen some amazing photos online where the sky is very rich in colors. How is that done?


C++ class template not compiling when passing parameters to constructor

I am attempting to implement some small generic data structures as review and to learn more c++, but am running into problems with getting my basic template class to compile. Header file: template <class T> class ArrayList {     public:          ArrayList(T dataToAdd[]); };  C++ file: #include <iostream> #include "arrayList.hpp"  template <class T> ArrayList<T>::ArrayList(T dataToAdd[]) {     std::cout << "ArrayList constructor" << std::endl; }  main.cpp: #include <iostream> #include "arrayList.hpp"  int main(int argc, const char* argv[]) {      int data[3] = {1, 2, 3};      ArrayList<int> testList(data);      return 0; }    I am thinking that the problem has to do with the array being passed into the constructor in main.cpp, as when I removed all parameters (from header, implementation, and actually calling the constructor) the program compiled fine. The error I am receiving: /usr/bin/ld: /tmp/cc5ra82s.o: in function `main': main.cpp:(.text+0x46): undefined reference to `ArrayList<int>::ArrayList(int*)' collect2: error: ld returned 1 exit status


What do I do after "Defending the Rift"?

What do I do after the Defending the Rift quest in Abyssal Depths? Legionnaire Nazgrim jumped into the vortex and I am left alone on the ledge.


What happens if I delete a question with upvotes?   Will I have a penalty?   I mean, what would happens if the answers have upvotes?


When is it correct to use "yourself" and "myself" (versus "you" and "me")?

I'm confused by why people use the following:     It's up to yourself.   Rather than:     It's up to you.   Another example of this would be:     Please feel free to contact ourselves if you have any problems.   Rather than:     Please feel free to contact us if you have any problems.   Are both of these correct?  Is there any reason for using the former?


Can I be notified when a post that I answered was edited?

Sometimes the OP change something significant in his question which affects my answer.  Is there some way I can be notified when:  A certain question was edited? Question that I answered was edited?


Build for Windows NT 4.0 using Visual Studio 2005?

An MFC application that I'm trying to migrate uses afxext.h, which causes _AFXDLL to get set, which causes this error if I set /MT:     Please use the /MD switch for _AFXDLL builds   My research to date indicates that it is impossible to build an application for execution on Windows NT 4.0 using Visual Studio (C++, in this case) 2005.  Is this really true? Are there any workaround available?


I wish to insert a simple vertex name like a1. All I want is to put 1 as subscript of a. I couldnot figure out how to do it in LaTexDraw.


Why do we have to call `sudo apt-get update` more than once for Ubuntu?

I sometimes see update commands for Ubuntu which make it twice as      sudo apt-get update && sudo apt-get upgrade   I wonder why do we have to call it twice like that? Why not just once?


A village has about 1 million residents. Suppose each resident has a jar with 100 coins in it.Two jars are considered to be “equivalent” if they have the same number of 10c, 20c, 50c, \$1 and \$2 coins in them. How many different (i.e. nonequivalent) jars of coins exist? Is it theoretically possible that every person in this village has a different jar of coins?  To my understanding, we know the number of coins in each jar is always 100, so for example if we have five 10c coins in a jar then there are 95 coins of other values in that jar. If we have k1 10c coins in the jar where k1 is between 0 and 100 inclusive, then there are 100-k1 coins of other denominations in the jar. We also have k2 20c coins in the jar where k2 is between 0 and 100 inclusive, so the combined number of 50c, \$1, and \$2 coins in the jar is 100-k1-k2 and so on. And we always have some k1, k2, k3, k4, k5, let's say, so that the sum of those k's is 100. Also, I assume there's no concept of the order of coins in a jar of coins, they're just in there. I got stuck from here, is anyone able to help me out?


When will auto upgrade to 14.04.1 be available from the software updater? Many thanks.