How can I create a immutable object?
How to create immutable objects in Java?
Looking for the title of a book about alien invasion, mining asteroids and using lasers to defend earth What I remember of this novel/series is that the main character creates solar laser satellites and mines asteroids to create more satellites to defend Earth from aliens. Later on, he uses the hollowed out asteroids as a base and eventually as an armored fortress to repulse the alien fleets. I last remember the main character attempting to hollow out more asteroids to defend and attack the aliens eventually. How can I get bold math symbols? To make Latin-letter variables bold I can use e.g. \mathbf{a}, but while putting Greek letters or symbols such as \nabla inside \mathbf doesn't cause any errors or warnings, it also doesn't do anything else.  What is the best way to make bold math symbols, in particular Greek letters and \nabla? Determine the SQL Server version and edition from the available set up, before actually installing it? Testing equality of coefficients from two different regressions This seems to be a basic issue, but I just realized that I actually don't know how to test equality of coefficients from two different regressions. Can anyone shed some light on this?   More formally, suppose I ran the following two regressions:  $$ y_1 = X_1\beta_1 + \epsilon_1 $$ and  $$ y_2 = X_2\beta_2 + \epsilon_2 $$ where $X_i$ refers to the design matrix of regression $i$, and $\beta_i$ to the vector of coefficients in regression $i$. Note that $X_1$ and $X_2$ are potentially very different, with different dimensions etc. I am interested in for instance whether or not $\hat\beta_{11} \neq \hat\beta_{21}$.   If these came from the same regression, this would be trivial. But since they come from different ones, I am not quite sure how to do it. Does anyone have an idea or can give me some pointers?   My problem in detail: My first intuition was to look at the confidence intervals, and if they overlap, then I would say they are essentially the same. This procedure does not come with the correct size of the test, though (i.e. each individual confidence interval has $\alpha=0.05$, say, but looking at them jointly will not have the same probability). My "second" intuition was to conduct a normal t-test. That is, take   $$ \frac{\beta_{11}-\beta_{21}}{sd(\beta_{11})} $$  where $\beta_{21}$ is taken as the value of my null hypothesis. This does not take into account the estimation uncertainty of $\beta_{21}$, though, and the answer may depend on the order of the regressions (which one I call 1 and 2).   My third idea was to do it as in a standard test for equality of two coefficients from the same regression, that is take  $$ \frac{\beta_{11}-\beta_{21}}{sd(\beta_{11}-\beta_{21})} $$   The complication arises due to the fact that both come from different regressions. Note that   $$ Var(\beta_{11}-\beta_{21}) = Var(\beta_{11}) + Var(\beta_{21}) -2 Cov(\beta_{11},\beta_{21}) $$ but since they are from different regressions, how would I get $Cov(\beta_{11},\beta_{21})$?  This led me to ask this question here. This must be a standard procedure / standard test, but I cound not find anything that was sufficiently similar to this problem. So, if anyone can point me to the correct procedure, I would be very grateful! How do I move all files from one folder to another using the command line? Height/Radius ratio for maximum volume cylinder of given surface area I have problems with getting an Asus PCE-N53 11n N600 PCI-E Adapter card to work on my desktop computer.  As far as I can tell no drivers are installed for the card. I know I can manually download the drivers directly from Asus, but I would rather not go that route.  If there are anyone that knows about any packages or other things I can do to make this work would be much appreciated.  Some systems details:  $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 12.04.1 LTS Release:    12.04 Codename:   precise   $ sudo lshw -C network   *-network                       description: Ethernet interface        product: RTL8111/8168B PCI Express Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:03:00.0        logical name: eth0        version: 06        serial: d4:3d:7e:03:b9:1d        size: 100Mbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168e-3_0.0.4 03/27/12 ip=192.168.0.173 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:43 ioport:d000(size=256) memory:f2104000-f2104fff memory:f2100000-f2103fff  *-network UNCLAIMED        description: Network controller        product: Ralink corp.        vendor: Ralink corp.        physical id: 0        bus info: pci@0000:04:00.0        version: 00        width: 32 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:f7100000-f710ffff  $ lsmod Module                  Size  Used by nvidia              12319264  51  vesafb                 13844  1  snd_hda_codec_hdmi     32474  1  joydev                 17693  0  bnep                   18281  2  rfcomm                 47604  0  bluetooth             180104  10 bnep,rfcomm snd_hda_codec_realtek   224173  1  snd_seq_midi           13324  0  ppdev                  17113  0  snd_rawmidi            30748  1 snd_seq_midi usbhid                 47199  0  hid                    99559  1 usbhid nouveau               774641  0  parport_pc             32866  1  snd_hda_intel          33773  5  ttm                    76949  1 nouveau snd_hda_codec         127706  3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel drm_kms_helper         46978  1 nouveau drm                   242038  3 nouveau,ttm,drm_kms_helper snd_seq_midi_event     14899  1 snd_seq_midi snd_hwdep              13668  1 snd_hda_codec snd_seq                61896  2 snd_seq_midi,snd_seq_midi_event i2c_algo_bit           13423  1 nouveau mxm_wmi                12979  1 nouveau wmi                    19256  1 mxm_wmi mac_hid                13253  0  snd_pcm                97188  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec psmouse                97362  0  video                  19596  1 nouveau snd_timer              29990  2 snd_seq,snd_pcm snd_seq_device         14540  3 snd_seq_midi,snd_rawmidi,snd_seq snd                    78855  20 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_rawmidi,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_seq,snd_pcm,snd_timer,snd_seq_device serio_raw              13211  0  soundcore              15091  1 snd snd_page_alloc         18529  2 snd_hda_intel,snd_pcm mei                    41616  0  lp                     17799  0  parport                46562  3 ppdev,parport_pc,lp r8169                  62099  0 Radially symmetric charge distribution (dipole moment) a) There's a radially symmetric charge density $\rho(r)$ centered around the origin. Determine the dipolemoment of that charge density. b) Let $\rho(r)$ be an arbitrary charge density now. Under what circumstances does the dipole moment of the displaced charge density  $\rho '(\vec{r}) = \rho (\vec{r}-\vec{b})$ differ from the one not displaced at all.  Here were my ideas so far: a) Just thinking about the situation it has to be zero, right? I mean, since there's no real dipole. But how do I show that mathematically? I was thinking of just going like this (it may be wrong): Let the charge density be $\rho (r)=kr$, then we can get the charge q by integrating: $$q=4\pi \int_0^R kr\cdot r^2dr=\pi k R^4$$ I'm looking at the charge distribution as a spherical electron cloud with radius $R$. Then, since $p=qd$ and $d$ is zero because there are no two different charges the dipole moment is zero. Is that sufficient as an answer? b) I don't know how to approach this one. My guess is that its dipole moment is also zero because we're only looking at a displacement here. Anyone got any idea? I would appreciate any advice on this. Has Stack Overflow been haiku-hacked? Large 10 kWh 18650 Lithium-ion power pack - What configuration? I need to build a 10 kWh lithium-ion pack, anywhere from 70 V to 200 V.  This is to drive a motor.  Power output will not exceed 15 kW.  The cells will be Panasonic NCR 'B' at 3.4 Ah 18650.  I would like to minimize space and weight and cost. :D  Level of safety would be standard for a hobby application.  Charging will be done in a safe area using two levels of overcharge and overcurrent protection.  Charging is from house current, 110V, and multiple chargers may be employed to double or triple the charge rate.   What is the best configuration for cells?  I would prefer if the pack is broken down into units of 1 to 2 kWh each.  Each unit may be charged separately. In addition to a balancing-protection board and a CCCV charger, what other protection or safety mechanisms are recommended, short of a smart BMS system? I have looked at a cheap Chinese balancing board that offers protection (thermal, overcharge, undercharge, overcurrent, short).  A 20S board will offer up to 84 V and adequate current for the application, for a 1.5 kWh unit.  At 1/3C, I would need a 83 V 6 A CCCV charger.  How do I get one of these? Off-topic question:  Can a balancing-protection board be used for a configuration with a lesser number of cells? Such as using a 10S board to control an 8S configuration.  Or does this depend on the board? In the digital age of photography, we can see a range of digital camera sensors sizes in use, from 1/3.2" in small phones, up to Medium format sensors that are 53.4 x 40.0mm in size or more!  Why has no company endevoured to produce a sensor that can be considered to be large format (50mm X 80mm or larger)? Do such camera sensors exist in non-consumer products? I just wrote an answer to , which was trying to find numeric strings with or without commas (e.g. 1,234,567.89). I wanted to be thorough because I've seen this problem a lot, both on SO and in real-world code.   When I finished, I found 7 other new answers waiting for me, mostly variations on each other. Which would be fine, except for one thing: They're garbage answers. Unless I'm severely mistaken, every answer but mine (so far) is deeply flawed, and I want to downvote all of them. Yeah, I'm a stickler on regex, but IMHO if your pattern lets stuff like  ...,.,,.,,..9 or even ... pass as "numeric input," then you've failed to meet even the bare minimum requirements.  Enough venting. The reason I'm whining to Meta about this is that I'm about to do something that'll REALLY look like tactical downvoting, and I'm mildly concerned about the consequences. If I answer a question and then rain downvotes on every competing answer, will I get flagged for abuse? That would certainly seem like suspicious behavior to me.  More of an opinion question: At what point does a semi-correct answer deserve a downvote? Obviously, if it were just a typo, I'd edit it myself. Where's the line between "close enough" and "this answer sucks?"  Basically, is it just me? You've seen the question; am I right that these answers deserve downvotes? Seven people thought that [0-9,.]+ was good enough to declare something a number, so why am I the only one who doesn't?    Note: I found some related questions, but nothing that seemed like a duplicate:    - More of an etiquette question, plus the voter hadn't posted his own answer.  - I guess this pretty much covers my second question.   Also, as some have noted, my answer ended up pretty long and thorough. I put in a lot of effort because, with all this talk about how the other answers sucked, I wanted to be extra sure mine didn't. I don't expect pages of detail in a normal SO answer. Normally, LaTeX will only create references for the BibTeX entries cited in the text. Is there a way of extracting these entries into a different .bib file automatically? For example if I have a .bib file with two entries, and only one is cited in a particular text, I need a way of creating a new .bib file with just that reference. Unable to mount Windows (NTFS) filesystem due to hibernation Can I create a TIN from contours lines (shp) in QGIS? I need to do a slope analysis, and would like to make a TIN from 2m contours lines.  Or do a slope analysis directly from contours? The only DEM available is not precise enough.  I do not have any elevation raster files.  And how do I then make slope classes?  The TIN properties does not seem to be able to classify anything other than elevation. Divergence of $\frac{ \hat {\bf r}}{r^2} \equiv \frac{{\bf r}}{r^3}$, what is the 'paradox'? This question was , but I think that the only answer didn't quite understand the question so I thought I'd try again. I'm writing a paper in which I need to have references show up in two places:  a special list of &quot;key references&quot; in its own section, and a bibliography containing the rest of the references that were cited in the text. I thought that bibentry would do it, so the document looks something like: \documentclass[11pt]{article} \usepackage{natbib} \usepackage{bibentry} \nobibliography*  \begin{document}  \section{Amazing idea}  Chicken chicken chicken \citep{chicken:2010fj}.  Chicken chicken, chicken \citep{turkey:2010jk}.  \section{Key References}  \begin{enumerate} \item \bibentry{lemur:2009ii} \item \bibentry{gibbon:2011jk} \end{enumerate}  \bibliographystyle{apalike} \bibliography{amazing.bib} \end{document}  Unfortunately, this doesn't quite do it, as the resulting document presents the lemur and gibbon bibentry references correctly in the &quot;Key References&quot; section, but also prints them in the bibliography at the end of the document.  Ideally, the only entries in the bibliography would be the chicken and turkey \citep references.  I'd like it to look like:  Key references  Lemur, L. (2009). Lemur, 12(4):1-7. Gibbon, G. (2011). Gibbon, 135:1002-1009.  References Chicken, C. (2010). Chicken. Chicken Press, Coop. Turkey, T. (2010). Turkey, 7(4):E231.  What it actually looks like:  Key references  Lemur, L. (2009). Lemur, 12(4):1-7. Gibbon, G. (2011). Gibbon, 135:1002-1009.  References Chicken, C. (2010). Chicken. Chicken Press, Coop. Gibbon, G. (2011). Gibbon, 135:1002-1009. Lemur, L. (2009). Lemur, 12(4):1-7. Turkey, T. (2010). Turkey, 7(4):E231.  Is there any way to achieve this with the current method, or is there some other (possibly easier!?) way to do this? iOS: Your passcode is required to enable Touch ID Hi all im a noob on Ubuntu/Linux World,  So i need some that give a full tutorial to How to install  from apachefriends.org correctly on Ubuntu 11.10 + all beyond Ubuntu for 32 bit and also 64 bit Desktop Version.. and also i need this:   Make a Folder on Your Home Folder and Linked to htdocs from Apache Web Server Make a GUI interface for Xmapp Start Xampp when Ubuntu Boot Up or Start Ubuntu   (Note: i ask it for both X86 and X64 so people in the further can see the tutorials)    New Data:  What i did was i download from  for now and i also what to say that I'm currently running Ubuntu 11.10 X64 bit for Dell Studio 1558 processor intel i3  i will let you know guys which solution was the best, and it is for a Desktop Version of Ubuntu 11.10 (Laptop 15 inch screen ^_^ ) not Server Ubuntu How to use notify-send with crontab? I really read many tutorials, but crontab doesn't start notify send.  What I've tried:   etc/crontab  added at the end:  15 * * * * notify-send 'crontab' 'test'  with crontab interface:  crontab -e   added at the end:  15 * * * * notify-send 'crontab' 'test'