I am an Indian Passport holder, traveling from Chicago to New Delhi INDIA with Layover in Zurich of 2 hours. My US Visa is expired which is why I am traveling back to get the new visa stamped. Will I also need a Transit visa for Zurich? I have all the visa documents to show the approval through which stamping will be done in INDIA.

I am a citizen of India holding a B1B2 visa for US. I am planning to visit the USA for the first time via Zurich and want to stay in Zurich for 2 days. Will I need a Swiss visa for that?


How can you calculate sums such as:  $$\sum_{k=1}^∞{\frac{1}{k(k+1)}}$$  How do you best explain this to students in a rigorous or non-rigorous way?

An  which I am not able to solve.  Let $\mathsf{S_{n}}$ denote the $n$-th partial sum of the series: $$\sum\limits_{r=1}^{\infty} \frac{1}{r(r+1)}$$  Prove that for every integer $k>1$, there exists integers $m$ and $n$, such that $$s_{m}-s_{n} =\frac{1}{k}$$


Don't you find the words to name various groups of animals strange? Here are just some examples:   Group of cats (wild): Destruction Group of crows: Murder Group of ravens: Unkindness Group of rhinos: Crash Group of seabirds: Wreck Group of trout: Hover Group of wombats: Wisdom   What the heck?!

As I watched the murder of crows sitting on the line above my house this evening, I got wondering where all of the collective nouns for animals (pod of whales, gaggle of geese, pride of lions) came from and why we need so many.    If sheep can be a flock, why can't whales, geese, lions, and crows?


When I type echo $TERM on my terminal it shows me xterm. From there itself I believe there are more than one terminal in Ubuntu. Is it the name of the terminal that I am using? I have seen some computer experts using terminal which is having lots of colored text and all. Actually how many types of terminals are there in Ubuntu?

I spend a lot of time at the command-line during the workday and at home too since I run Ubuntu exclusively.  I've been using the default gnome terminal but I've reached a point where I'd really like to get my terminal tricked out so that my common tasks are as easy as possible. Specifically, I find that I spend of lot of time browsing code in the terminal and working in config files.  On my wish list would be:   Ability to have multiple screens, tabs, windows (I don't have a preference at this point) that I can easily switch between. Color coding for everything Easy to modify the aesthetics of the terminal (is it vain to want my terminal to look nice?) such as transparency, borders, etc.


I have string with numbers:  string s1 = "cos555cos"; string s2 = "coscos1"; string s3 = "22coscos"; string s4 = "333coscos"; string s5 = "cosco444s";   I made a list:  IList<string> test = new List<string>(); test.Add(s1); test.Add(s2); test.Add(s3); test.Add(s4); test.Add(s5);   How to order it by number. The result should be like:  s2, s3, s4, s5, s1  foreach (var item in test) {     Console.WriteLine(item); }

Anyone have a good resource or provide a sample of a natural order sort in C# for an FileInfo array?  I am implementing the IComparer interface in my sorts.


I uninstalled all versions of java. I then installed java using  sudo apt install default-jre default-jdk  I then looked to see which java is installed and what version it is. Here is the result I got:  joshua @Joshua-PC ~ $ readlink -f `which java`                                                                                /usr/lib/jvm/java-11-openjdk-amd64/bin/java  joshua @Joshua-PC ~ $ java --version                                                                                openjdk 10.0.2 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.3, mixed mode)   `  Why is java version 10 in the java 11 directory?

While looking to compile OpenJDK from source, the newest General Availability version () insists on OpenJDK 9 or 10.  JDK 11, however, is not due to be released until .    However, to my surprise, when I do apt search openjdk the result is:  ... openjdk-11-jdk - OpenJDK Development Kit (JDK) ... openjdk-8-jdk - OpenJDK Development Kit (JDK) ...   No OpenJDK 9 or 10!  And wait, is that OpenJDK 11?  Maybe a Beta release?  Nooo....  So I looked at apt show openjdk-11-jdk:  Package: openjdk-11-jdk Version: 10.0.1+10-3ubuntu1 ...   Why has OpenJDK 10 been packaged as openjdk-11-*??


I have a user named: 用户alex, and I want to change the 用户 to a English word, how can I do that in Windows 10?    C:\Users\用户alex>xxx install xxx   I want to change the 用户alex name to English words.

I'm using Windows 10 on my personal computer (HP Pavilion Laptop) and you can see in the Screen Shot under C:\Users there are two folders.    The name of the first folder is C:\Users\SINGHA, however, the correct spelling of my last name is SINHA.  I need to change the name of this folder to C:\Users\SINHA so that it shows the correct name.     Under User Account, the spelling of my name is correct - it's only under C:\Users\ where the name is spelt incorrectly. Consequently, if I open/edit a Word or Excel document, the name of the owner being shown is the incorrect one (i.e it's shown as C:\Users\SINGHA instead of C:\Users\SINHA)   If I right-click on this folder, I won't get the Rename option; How can I change the name of this folder?


How can I prevent line-breaking of an acronym which contains a hyphen? I have the acronym "AP-CMOS" all over my document, and it's been broken in several places into "AP-" and "CMOS". The same occurs with the compound "1\textsuperscript{st}-order". I tried using \hyphenation without any luck. Thanks, Jorge.

I'm writing a document where I frequently refer to some experimental cases which are called things like "M-1" and "P-2". It's always a single number, a hyphen, and a single number. In several places, I'm finding these case names broken across two lines with the number and hyphen on the first line and the number on the second line. Is there a way to tell the document never to break these words across two lines aside from using \mbox or \nobreakdash at every instance?  My hope would be to define something globally, like the opposite of the \hyphenation command, specifically for these case names (there's 7 of them). I'd prefer to avoid changing setting which would affect other words in the document, like \exhyphenpenalty=10000.  If using \mbox or \nobreakdash is the best option, what's the difference between the two?  As suggested by Dan and David I tried setting up  \renewcommand{\P}{P\nobreakdash}  (and the same for the other cases, except M, which used \newcommand) So that I would still have the text P-1 in the text for searching purposes. In the text of the document, it works fine. However, sometimes I name the cases in figure captions, and the document has to include a list of figures. The case name shows up fine in the figure caption, but in the list of figures, I get a missing control sequence error. With a caption of:  \caption[For case P-1.]{For case P-1, more words.},   the lof output file reads  \contentsline {figure}{\numberline {4.1}{\ignorespaces For case P\unhbox \voidb@x \toks@ \@emptytoks \def 1{\toks@ {--}\futurelet \@let@token \setbox \z@ \hbox {-\penalty \@M }\unhbox \z@ }\def \setbox \z@ \hbox {-\penalty \@M }\unhbox \z@ {\setbox \z@ \hbox {-\penalty \@M }\unhbox \z@ }\futurelet \@let@token \setbox \z@ \hbox {-\penalty \@M }\unhbox \z@ -1.}}{64}{figure.caption.62}.  The text of the document says "For case P------1" (the first hyphen is sometimes an different character that's the same length, but gray and slightly lower, and sometimes it's a regular hyphen). This is happening for all of the cases, except the L cases. All of which occur before this error in the list of figures. Although I tried changing one of the references to P-1 that was giving this error to L-1, and the error went away for that caption.


My computer is a ThinkPad T460. I have been trying to install lm-sensors but it gives me:  The following packages have unmet dependencies:  lm-sensors : Depends: libsensors5 (>= 1:3.5.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I try to install libsensors5 and it gives me:  The following packages have unmet dependencies:  libsensors5 : Depends: libsensors-config but it is not going to be installed   E: Unable to correct problems, you have held broken packages.   And when I try to install that I get:  The following packages have unmet dependencies:     libcheese-gtk25 :        Depends: libclutter-1.0-0 (>= 1.16) but it is not going to be installed       Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed       Depends: libcogl20 (>= 1.17.4) but it is not going to be installed       Depends: gstreamer1.0-clutter-3.0 but it is not going to be installed     libcheese8 :        Depends: libclutter-1.0-0 (>= 1.16) but it is not going to be installed       Depends: libclutter-gst-3.0-0 (>= 3.0.4) but it is not going to be installed     libgl1 :        Depends: libglx0 (= 1.1.1-0ubuntu1) but it is not going to be installed     libwebkit2gtk-4.0-37 :        Depends: libgstreamer-gl1.0-0 (>= 1.14.0) but it is not going to be installed              Recommends: gstreamer1.0-gl but it is not going to be installed              Recommends: libgl1-mesa-dri but it is not going to be installed  E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   Does anyone know what's wrong? I'm new to Ubuntu.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Some texts say quantum spin is analogous to the spin of a planet in that it gives a particle angular momentum and a magnetic moment. However, as subatomic particles are tiny, the surfaces of charged particles would have to be moving faster than the speed of light in order to produce the measured magnetic moments! If the particle is not physically spinning, is anything spinning? Is the particle's wave function spinning?

I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion?


I was wondering if I could have my Destiny character on two of the same system because I started playing on my brothers ps4 because I was getting my own next month. when I get my own ps4 can I port my destiny character on my brothers ps4 to my own ps4?

So I really like Destiny and I can see myself playing it for quite a while. I'm curious to know that, because it's all 'online' are characters linked to the console or to the PSN account?  Will I be able to level up my Guardian on PS3 and when I eventually buy a PS4, and a copy of Destiny PS4 will my characters still be available?


My girlfriend has been looking for this story for some time now, as it was one of her favorites from her childhood. She says it has a pilot of a spaceship which travels by dimensional jumping, and every time they jump, he sees alternate versions of himself. He begins to see a happier version of himself, and doubts his choices in life. Anyone have any ideas?

Trying to find a story I read a couple of years ago in an anthology, not sure when the story dates from but likely to be recent - the last decade or so.   The story has passengers travelling between stars via a series of jumps. The calibration of the drive is affected by a special metal, any of which has to be stored in a shielded compartment (I think the jumps were measured in 'degrees'). One of the passengers unwittingly takes some of this metal on board, which throws off the calculations for the jumps, and they jump into an alternative universe where there are no signs of any humans ever existing. They start to try to reverse their steps to get back to the known universe, but the reverse calculation seems impossible.  That's as much as I read of the story before I lost the book. After many dreams (feverish nightmares!) re-living this story, I need to know how it ends. I know it's not much to go on. The story name, author, or the anthology it appears in would be fantastic.


I am asking this because I was wondering this all day and all the existing answers about installing libappindicator1 and logging out and doing dropbox stop && dropbox start in the terminal were NOT working

Affects:  14.04 / 14.10 / 15.04 / 15.10 / 16.04 / 16.10  I started my dropbox deamon today, with the following result in the panel:     The icon with the warning/failed symbol should be my Dropbox icon. I cannot right-click or left-click it, so no interaction.  I am running Xubuntu 15.10 on 4.2.0-27-generic x64. I also tried to re-install Dropbox, reinstall nautilus-dropbox, recursively delete ./cache/sessions/ as well as set other themes and icon sets.  Apparently nothing helped and similar problems described here and on other boards are similar, not the same and do not work in my case.


I am new to Ubuntu and Linux and just starting my journey. I have successfully installed and have the OS booting from a console window. I have tried to download the GUI through sudo apt-get update then sudo apt-get install ubuntu-desktop, but ran into this error:  Unable to locate package ubuntu-desktop   Kindly assist with the steps to follow in order to install the GUI.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I have a function that generates a random email address:  def emails     names = ["alfred", "daniel", "elisa", "ana", "ramzes"]     surnames = ["oak", "leaf", "grass", "fruit"]     providers = ["gmail", "yahoo", "outlook", "icloud"]     address = "#{names.sample}.#{surnames.sample}#{rand(100..5300)}@#{providers.sample}.com" end   Given a list of randomly generated email address:  email_list = 100.times.map { emails }   that looks like this:  daniel.oak3985@icloud.com ramzes.grass1166@icloud.com daniel.fruit992@yahoo.com ...   how can I select the most common provider ("gmail", "yahoo", etc.)?

How do I find an item in array which has the most occurrences?  [1, 1, 1, 2, 3].mode => 1  ['cat', 'dog', 'snake', 'dog'].mode => dog


This is the problem:  int num = -16; int div = num / sizeof(int);   The value of div is incorrect (Some big garbage value). But if I do,  int num = -16; int intSize = sizeof(int); int div = num / intSize;   Then it gives the correct answer. What I need to know is, why does this happen?

Suppose I have the following C code.  unsigned int u = 1234; int i = -5678;  unsigned int result = u + i;   What implicit conversions are going on here, and is this code safe for all values of u and i? (Safe, in the sense that even though result in this example will overflow to some huge positive number, I could cast it back to an int and get the real result.)


I would like to use my Apple wireless keyboard and mouse with my work and personal Macbook without having to pair them every time. Is there a simple way to pair with multiple Macbooks and switch between them?

I work out of my house where I have two computers: a mid-2010 Macbook Pro (for my day job) and a mid-2010 iMac (personal). During the workday, my iMac acts as a second display for my Macbook Pro via Mini Displayport.  Currently, I use a USB keyboard and mouse for my work computer and a Bluetooth keyboard and Magic Mouse + Magic Trackpad for use with my personal computer. I'd like to get rid of the wired keyboard and mouse and just use the Bluetooth stuff for both machines (but never simultaneously).   Is it possible to easily share the single set of input devices without having to repeatedly break and reestablish the pairing of the input device to the correct computer? I'm not opposed to buying some type of additional hardware to accomplish this, provided it's not prohibitively costly or cumbersome to use or configure.  It's not clear to me how I would tell the MacBook Pro to leave the devices alone so the iMac can have them for the evening. I want to avoid de-pairing and re-pairing the devices each time I want to shift them back or forth.  Basically is there software or hardware that works as a Bluetooth KVM switch?


Is there some way when I'm in Ubuntu 12.10 that I can set it to reboot automatically to Windows just once, so that when I'm in Windows I can reboot and it will automatically boot back into Ubuntu?  I need this because often when I travel I access my home computer for email and other personal info that I don't want to travel with or leave to the tender mercies of the "cloud".  On rare occasions, I need to temporarily boot into Windows 7 to do something Windows-specific, but then I want to be able to boot back into Ubuntu because that's where most of my computing takes place.  Any ideas?  Thanks in advance!

I'm looking for a way to reboot into Windows from Ubuntu on a 10.10/Vista dual boot system. The specific use case is that I would like to be able to ssh into my running Ubuntu instance and issue a command that will initiate a reboot directly into Windows.  I found , but the script that it suggests isn't working:  #!/bin/bash  WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg  | grep --line-number Windows` MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 )) sudo grub-reboot $MENU_NUMBER sudo reboot   man grub-reboot isn't much help, but it seems to be leading me in the right direction:     set  the default boot entry for GRUB,   for the next boot only   WINDOWS_ENTRY=`grep menuentry /boot/grub/grub.cfg  | grep --line-number Windows` MENU_NUMBER=$(( `echo $WINDOWS_ENTRY | sed -e "s/:.*//"` - 1 )) echo $MENU_NUMBER   This returns the expected value, but on reboot the first menu entry is still highlighted. Any ideas why this isn't working or suggestions for other solutions?


Recently, on this same site, I reviewed . That was a two-day-old discussion answer on a discussion question and required two Looks OK to dismiss, so it wasn't an auto-flag. And given the content, I can't see any way anyone who knows what Meta is for could sincerely flag that as either VLQ or NAA. (It's further suggestions for/amendments to a pending feature. How much more answer-y can you get?)  It's bad enough that we have to live with downvotes for disagreement as an unfortunate but natural consequence of using Meta for opinion-based questions (aka ). Using flags for disagreement are a whole nother story, and I for one find that pretty despicable. "I don't like what you're saying, so I'm going to ask some reviewers to delete it" is a really terrible way to go about policy decisions. And while we already discourage using flags for wrong answers on all sites, it doesn't seem that that's enough to prevent a fair number of flags for answers that are only subjectively disagreed with, policy-wise. (Although this does not appear to show up on any other site than M.SE.)  Can we actively discourage this in some way, perhaps simply through Meta consensus?  Similar recent reviews: , .

I recently asked a question that got a quick answer that was wrong.   After a few comments with the answerer, he stopped defending his position (because it does not work).  But the answer is still there to mislead others.  So I am left wondering if I should do anything about it or just let the eventual downvoting take its course.


I am new to Python, I have seen many examples but not a good summary of examples. Here are the 4 things that I want to get done.  Thanks for your help.  mydict = {'carl':40,           'alan':2,           'bob':1,           'danny':3}   I wanted to use the following to access the dict elements:  for key in sorted(mydict.keys()):     print(key, mydict[key])   How do I get the following output:  Case 1: (by key ascending)  alan   2 bob    1 carl  40 danny  3   Case 2: (by key descending)   danny  3 carl   40 bob    1 alan   2   Case 3: (by value ascending)  bob   1 alan  2 danny 3 carl 40   Case 4:  (by value descending)  carl   40 danny   3 alan    2 bob     1

I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique, so that is the key of the dictionary.  I can sort on the keys, but how can I sort based on the values?  Note: I have read Stack Overflow question here  and probably could change my code to have a list of dictionaries, but since I do not really need a list of dictionaries I wanted to know if there is a simpler solution to sort either in ascending or descending order.


I've been poking around the net trying to find synonyms for "renaissance man" which indicates someone that is proficient at many skills. I was thinking "jack of all trades" but that has a negative connotation that the individual is not good at any of them, but capable. Any ideas?

I am looking for a positive, passionate word to describe the all-round capabilities of a person.   Are there any words better than 'all-rounder'?


I downloaded a map for my Minecraft game (I have Minecraft Windows 10 Edition) but it won't show up in the actual game. I looked up how to download maps onto Minecraft Windows 10 and it said that the .minecraft file would be in %appdata%. I searched that in the file explorer in downloads but it's not there!

I have searched in %appdata%, pulling up the list of files there, but there is no file labelled .minecraft. Searching %appdata%\.minecraft returns "no results found".   I also opened Minecraft to click on the resources button and could not locate that either.


Let $\{a_n\}$ be a sequence of real numbers. Define $\sigma_n = 1/n(a_1 + \dots + a_n)$. Suppose that $\lim a_n = a \in \mathbb{R}$. Show that $\lim \sigma_n = a$.  Here is my work so far...  Fix $\epsilon > 0$. We are given that for $N \in \mathbb{N}$ we have that $|a_n - a| < \epsilon/\alpha$ whenever $n \geq N$, and $\alpha$ will be choosen later. We must find $N \in \mathbb{\widehat{N}}$ so large such that $|\sigma_n - a| < \epsilon$ whenever $n \geq N$. Note that  $$|\sigma_n - a| = |1/n(a_1 + \dots + a_n) - a|...$$  Then I got stuck trying to work out the details. Should I try showing that the $\sigma_n$ is a Cauchy sequence, and somehow use the convergence of the $a_n's$? Thanks for your help.

I have this problem I'm working on. Hints are much appreciated (I don't want complete proof):  In a normed vector space, if $ x_n \longrightarrow x $ then  $ z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x $   I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere.  Thanks!


Why does setting the secret key to a fixed, public value not make MACs like CBC-MAC or EMAC into secure unkeyed cryptographic hash functions?  In other words, why is the resulting hash function not 1st pre-image, 2nd pre-image, and collision resistant?   What about HMAC? Still not pre-image and collision resistant?

It would seem to a naive eye that if you have a MAC, you have a hash function: use a key that all the parties know (such as all-bits-zero).  A potential application would be a resource-constrained platform where code size is at a premium, and which needs to implement AES for confidentiality: instead of also implementing SHA-2 for integrity verifications, it could use e.g. AES-CMAC.  Is there a reason not to do this? Is the existence of hash functions alongside MAC due to security? Performance? History?


Let $f(x)$ be twice differentiable on $(0,\infty)$ and let $\lim_{x\to \infty} f(x) = L<\infty$ and $|f''(x)| \le M$ for some $M>0$.  Prove that $\lim_{x \to \infty} f'(x) = 0$.  I've tried to use taylor with remainder in a lot of different ways and am still unable to crack this one.

Let $f\colon\mathbb R\to\mathbb R$ be twice differentiable with $f(x)\to 0$ as $x\to\infty$ and $f''$ bounded. Show that $f'(x)\to0$ as $x\to\infty$. (This is inspired by  to a different question)


This sci-fi short story was written by a female in the 60s. A missionary persuades a roly-poly young boy to skip a coming of age ritual where the teenagers (all roly-poly and energetic) are hung from gnarled trees with boulders during the beginning of flood season. They all stretch out into skinny low energy adults. The missionary convinces one boy to skip the ritual.  The boy bends over, grabs his ankles and transforms into one of the gnarled trees. I think title of story contains word "suffering"

I am seeking a short story where a man rescues an alien from a cruel hanging ceremony, but the alien turns into a shrub. It turns out the hanging ceremony was a way the aliens,of humanoid form, had developed to prevent themselves turning into a non-motile   mature form and to retain their humanoid form.The young ones were muscular and agile, but after the ceremony the older ones were emaciated and weak. By saving the young alien, the man is horrified when the rain starts and the young alien turns into a shrub ! The joke at the end is that the spaceman telling the story recounts how the unfortunate kind  man carts the shrub around the universe with him from job to job, and doesn't know he has the wrong shrub. He had grabbed it in the rain storm as they hurried to take off in their space ship while the angry aliens approached to rescue their young one. This was probably written in the late 1950's. One phrase in the story describes the spaceman doing maintenance, tightening bolts in rotation as per the service manual.


When I click “wear hat” it shows that one only. I can only wear one at a time.  The position controls are applying to all hats, not just the selected one, too.

I earned two hats on a site, and I think it would be great if we can wear both at the same time.  Can this please be made possible?


I have a Google Sheets where I store customers details and the date of the last time I contacted or was contacted by this customer:  Customer name   |   Last contact date Bob             |   2016/01/30 John            |   2016/02/16   I have to update the Last contact date cell very often.  Is there a keyboard shortcut to replace the current cell's content with today's date? Or anything faster than looking at my calendar and typing it.  Obviously, =TODAY() is not a solution because it would change the date all the time.    Note: Not a duplicate of , which indeed has a solution that partly contains the answer to the present question, but is 1) Taken from a radically opposed point of view 2) About timestamps, not dates.

I'm using Google Spreadsheet's  function as a shortcut to insert the current timestamp now.   However, the value in the cell changes whenever the spreadsheet is modified in any way, even when the changes have nothing to do with that particular cell.  How do we stop the value in the cell from being automatically updated?


Though i found answer to this in the below link, i want to know how to achieve this using itertools in python.

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


When I stay at ordinary hotels in the United States it seems there is rarely or never any central light. The entryway usually has an overhead light, but the room itself usually just has lamps, so to light up the room I have to go around turning on lamps (in the dark). By contrast, in private homes usually each room has a central light and there is a switch by the door, so as you enter you can flip the switch and the room lights up. Why do hotels use lamps and have no central overhead light?

Random question du jour, inspired by the thoroughly depressing airport Holiday Inn I'm writing this in due to a missed flight connection:  Why don't American hotels have ceiling lights?  Every chain hotel I've ever stayed at has instead had a motley assortment of bedside, table and floor lamps.  What's more, instead of a single master light switch, there are individual switches/knobs to turn them on and off located next to the bulb, on the cable on the floor, on a switch on the side, etc, so you get to fumble around when turning them on and once more when turning them off.  And yes, I'm sure there are exceptions, but no, that doesn't make "you're wrong, I stayed at Motel Z in Bent Arm Pit, Wyoming once and they had a ceiling light!" an answer.  I'm curious about the reason why: Lower ceilings so cheaper to build?  Easier/cheaper to maintain?  Fire code?  Something else?


I have a 2 tables, which look like this:  Table 1: personal  | uid      |      city     | |----------|:-------------:| | 1        |  Zurich       | | 2        |  Chicago      | | 3        |  London       |   Table 2: technologies  | uid      |      tech     | |----------|:-------------:| | 2        |  HTML         | | 2        |  JavaScript   | | 2        |  PHP          |   The query that I use:  SELECT DISTINCT personal.city, technologies.tech FROM personal INNER JOIN technologies ON personal.uid = 2   The result:  | Chicago      |  HTML         | | Chicago      |  JavaScript   | | Chicago      |  PHP          |   As you see, I receive 3 records. My goal is to receive only 1 record. So the strings (HTML, JavaScript, PHP) should be either in an array (if that's possible) or they should be separated by a semicolon.

I need to run a query like:  SELECT p.id, p.name,         (SELECT name            FROM sites s           WHERE s.id = p.site_id) AS site_list   FROM publications p   But I'd like the sub-select to return a comma separated list, instead of a column of data.  Is this even possible, and if so, how?


There is an option in my phone camera to adjust the white balance before taking photo. Again after taking the photo I can adjust it in any photo editing app. Do these two produce the same thing? I also want to know the answer in general for other options like adjusting the contrast, exposure etc.

With such good post production in editors like Adobe is there any real benefit in shooting with manual settings when you can change just about everything in any shot you take?


Do eggs really need to be refrigerated? If so, how long can they last without refrigeration? Obviously eggs come out of the chicken at body temperature, so there must be some amount of time they can survive without spoilage.  I once attended a catering school in Hungary, and families there store eggs at room temperature for days with no (apparent) ill-effects, particularly in rural areas. But the idea seems anathema to almost everyone in the US.

I've read a lot of conflicting advice on whether it's advisable to store eggs in the refrigerator. The case against seems twofold: (1) that eggshells are porous, and eggs can take on unwelcome flavours, or even spoil faster in the fridge, and (2) that cooking with cold eggs can be problematic. But lots of people refrigerate eggs through perceived necessity.  Do eggs last longer in the fridge, and is the shelf life gain worth it? Or should I just stick them in the cupboard?


Let $a$,$b \in \mathbb{R}$ be two real numbers and let $t \in \mathbb{R}_+$ a real positive number.  I would like to know if is it true that  $$ |a-b|<t \Longrightarrow |a|<|b|+t $$  Thanks.

For any $\epsilon>0$ and $a,b\in\mathbb{R}$ show that $$|a-b|<\epsilon\Rightarrow  |a|<|b|+\epsilon$$   In some notes I found the following property $$|a|-|b|\leq ||a|-|b||\leq|a-b|$$ So $$|a-b|<\epsilon\Rightarrow |a|-|b|<\epsilon\Rightarrow |a|<|b|+\epsilon$$  I have two doubts  1) Is it right?  2)In triangular inequality I have that $$|a+b|\leq |a|+|b|$$ $$|a+(-b)|\leq |a|+|-b|\leq|a|+|b|$$  Is wrong do that?


New to this community. I have had a DSLR for a few years now so familiar with a few settings.  I tried and failed to take a passport photo . The main issue I am facing is getting shadows around the ears and cheeks?  I am not using any special lights, just using standard flash that comes with the camera  Am I trying the impossible here? just looking for any DIY tricks :)

I recently received a Nikon D3100 as a gift. My main interest is capturing images of parts of my body for dental imagery, personal 'snaphots' (yes I know a bit unusual with an actual camera), human faces etc..   I have always been very displeased with passport photos as I could never see my facial expression when taken in a studio but this time I have an opportunity to choose what image i take. I have read that this camera can be 'live' controlled from a PC. This might be necessary to see the image i'm capturing.  What I'm mainly concerned about is the basic features that I would need to know to create an appropriate passport photo in terms of focus, lighting and quality.  NOTE: This question is regarding the basic aspects needed to take an appropriate close up photo of the face. The other thread (which is not mine anyway) purely discusses connecting the camera to a laptop display. Also that question was asked 4 years ago and I have just received my camera.


I am aware of  but I am looking for another Open Source GIS way to do this.  Is there a possibility to create centerlines in PostGIS?  I have this shapefile (see below) which contains different zones. I need a centerline in each zone - it may not be one line, it can be more (for example in brown zone).  In ArcGIS I can separate each zone as a new shapefile and then use ET Geowizard to create that lines.

I was wondering if there is a way to create centre lines from polygons in QGIS? I have a polygon layer, but ideally need the centrelines as a separate file.


I have a wordpress site and my current directory was wp-content  I just wanted to backup and move the current files of the wp-content/ folder to a folder called wp-content-backup20170907 and clone a new wp-content folder...  I ran the command  sudo mv /*  wp-content-backup20170907   And just realised that this moved everything - how can I undo this?

I've accidentally run this command  sudo mv /* /applications/minced/   instead of   sudo mv ./* /applications/minced/   This is all that's left in the root directory  $ / applications/ dev/          proc/         run/          sys/          tmp/          I still have an active ssh connection to the server. I've tried calling mv, sudo and chmod... directly from /applications/minced/bin/ or /applications/minced/usr/bin/, but nothing works, though I can locate them there using path autocompletion.   $ /applications/minced/bin/ls -bash: /applications/minced/bin/ls: No such file or directory   I've read , but mounting the system under LiveCD is not an option for me since it's a VPS, not a physical machine. Any ideas?  Update  I figured out this is due to library linkage problems, so I did this   $ export LD_LIBRARY_PATH=/applications/minced/lib/x86_64-linux-gnu/ $ /applications/minced/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /applications/minced/bin/mv /applications/minced/* /   Obviously I ran into permission problems. Calling sudo with the linker throws this error  $ /applications/minced/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /applications/minced/usr/bin/sudo ... sudo: effective uid is not 0, is /applications/minced/usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?   As suggested by Barafu Albino, I've tried calling su with busybox (.../bin/busybox su -), but it throws su: must be suid to work properly. I guess this happens because su can't locate /etc/passwd and /etc/shadow. Seems like I've screwed up the system completely.


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

I am trying to filter items with a stored procedure using like. The column is a varchar(15). The items I am trying to filter have square brackets in the name.  For example:  WC[R]S123456.  If I do a LIKE 'WC[R]S123456' it will not return anything.  I found some information on using the ESCAPE keyword with LIKE but I do not understand how to use it to treat the square brackets as a regular string.


So I want to select a range of rows in an Oracle DB. I need to do this because I have millions of rows in the table and I want to paginate results to the user (if you know another way to do this on the client side, I'm using JavaFX if it matters but I don't think it's a good idea to send all the datas over the network to paginate them on the client side). So after reading this post: , I have the following query: Select * From (Select t.*, rownum r from PERSON t) Where r > 100 and r < 110;  The 100 and 110 are just example. In the application, I just ask for the lower bound and add a size of 10_000 to fetch the next 10_000 rows. Now the rownum column appears in the result and I don't want to see it. As I'm not very experienced with SQL, here's my questions:  Why (this was my first attempt until I search on SO) Select * From Person Where rownum > 100 and rownum < 110; returns 0 rows ?  Why there is no simple way to do something like Select ... FROM ... WHERE rownum BETWEEN lowerBound AND upperBound ?  How to get rid of the r column in the resulting values? From there  I need apparently to create a view or a temporary table, but is there another way considering my query?  Does it ensure correct pagination? I read  section "Pagination with ROWNUM", that said I should order the values by something unique to get a consistent pagination (so I guess ordering by rownum is fine, if you can confirm). Doesn't it defeat the purpose of using FIRST_ROWS(N)?   I hope it's not too much, I could split into separate questions, but I think it's relevant to have them collapsed as they are closely related.

Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select *  from sometable order by name limit 20,10  to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select *  from sometable where rownum <= 10 order by name  will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset.


I have a directory with 6 subdirectories. Each subdirectory also have a variable number of subdirectories. These last directories have variable numbers of *.jpg files. The jpg files are named in the form 0000.jpg, 0001.jpg and so on.  I am interested in getting the last 100 *.jpg files ( all directories have > 100 files), and storing them in separate directories with similar structure as the original directories.  What is the best way of doing it?

I'm trying to move the last 8 files from the Documents directory to another directory, but I don't want to move them one-by-one to that specific directory. Is it possible to move them with a substitute of the tail command, but for directories instead of files? I mean I'd like to do so with something like tail -8 ./Documents | mv ./Anotherdirectory or with mv tail -8 ./Documents ./Anotherdirectory.  In fact, I'm looking for a clever way I could move the last 8 files (as listed in ls) quickly (without typing out each name) to the other directory. Any suggestions?


HI I am new to the Ubuntu community and Operating System (Ubuntu 12.04). After having recommended from my Compute Programming Teacher, I decided to install it. I'm satisfied with the operating system except for the Adobe Flash Plug-in. Anything that requires flash looks green and purple, but anything that has audio comes through just fine similar to this user's issue:  No one seems to have provided any one with a sufficient answer so I have decided to ask again. I have tried many things including going to the Terminal and copying and pasting that install flash command. I've even decided to use LightSpark (although I'm not sure if I did it right). Nothing seems to work. I can watch you-tube videos using HTML5 however many other video players require Adobe Flash. Please list any and all techniques that could help me in this situation. The only thing I haven't tried so far is try to disable my hardware acceleration, which I don't know how to do.

The Problem After updating to Ubuntu 12.04 from Ubuntu 11.10, all video is still blue, whether playing in a browser or a player. Same problem occurs in 11.10 as well. I have tried to uninstall all Flash and re-installed but it makes no difference. What is causing the blue Flash video? Ubuntu 11.10 64bit Ubuntu 12.04LTS 64bit  What it looks like


Can I use @Named and @Inject in Java SE application?  Something like this:  import javax.inject.Inject; public class ThreadA implements Runnable {      @Inject     private MySignal sharedSignal;      @Override     public void run() {          while (!sharedSignal.hasDataToProcess()) {             try {                 Thread.sleep(1000);             } catch (InterruptedException e) {                 e.printStackTrace();             }         }          System.out.println("Finished");      };  }  import javax.enterprise.context.ApplicationScoped; import javax.inject.Named;  @Named("sharedSignal") @ApplicationScoped public class MySignal {      protected boolean hasDataToProcess = false;      public synchronized boolean hasDataToProcess() {         return this.hasDataToProcess;     }      public synchronized void setHasDataToProcess(boolean hasData) {         this.hasDataToProcess = hasData;     }  }  public class Main {     public static void main(String[] args) {         Thread a = new Thread(new ThreadA());         a.start();     } }   I get this error:     Exception in thread "Thread-0" java.lang.NullPointerException     at   ThreadA.run(ThreadA.java:11)  at java.lang.Thread.run(Unknown Source)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Let's say we have someone who is really energetic and excited about a task they are doing, and then something happens (or someone says something), that totally takes the excitement out of the task away. You could imagine the person "deflating" - for that reason I always thought that "take the steam out" - would be a good expression, but I noticed people sometimes would misunderstand my intention.  Is it a valid expression, or is there something that would fit better in this scenario? I am looking basically how to describe what the event did to the previously energized person.  The country of reference is Canada if that matters.

I want to get across the point that I was no longer enthusiastic about something:     When I walked in the room I was disenthused by what I saw.   , disenthused isn't a word.    Edit:  was right about my question being more vague than I intended.  Lots of great answers which can only be discriminated by criteria I failed to include in the original post.  I will not repeat the mistake for future postings.  Thank you all for the help.  I've marked the answer that best fits my situation as "accepted", but future Googlers should scroll through the list of answers for their needs.


I am using Lenovo Legion Y720 laptop. I have been using dual boot with Ubuntu 16.04 and Windows 10 for about 6 months now and have not had any problems. When I restarted my laptop this morning, it automatically logs into Windows 10 without showing the option (the dark pink screen - GRUB loader) to log into Ubuntu at all.   I tried going into UEFI mode by hitting Esc/Shift multiple times but neither of them works. It seems to me that the laptop is only detecting Windows as the only OS and not Ubuntu. I have important work saved onto my Ubuntu partition. Please help me in getting the Ubuntu working again.  Thank you very much.

I installed Ubuntu alongside Windows but I did not disable secure boot as someone told me it could cause problems with boot loader. So when installation finished and I rebooted, the system went straight into Windows. I went to Ubuntu IRC Support and they told me to turn off the secure boot and reinstall Ubuntu. I did that but my system still boot into windows.  This is a picture of partitions on my system:    This is my first Ubuntu install on my new laptop. I followed everdaylinux guide to install it and I used something else option.


I am a newbie in objective programming so forgive me if this question is dumb.  I am developing a small to-do program as a exercise. But when I try to load existing txt file & folders for task storage, IDE told me Exception in thread "main" java.lang.NullPointerException. I read the popular one from this site describing this error, I kinda understood why it happened, but I just coudn't find the problem.  Line 17-26 of ListProcess:  public ListItem[] loadList() throws FileNotFoundException {         ListItem[] listitem = new ListItem[200];         int listCount=0;         for (String txts : loadTxtsList()) {             File file = new File(txts);             Scanner scanner = new Scanner("List/"+file);             listitem[listCount].isFolder = false;             listitem[listCount].name = txts.replace(".txt", "");             listitem[listCount].description = scanner.nextLine();             int i = scanner.nextInt();   and yes, I'm using a class called ListItem to store these tasks.  ListItem class:  public class ListItem {     boolean isFolder=false;     String name;     String description;     String[] tags = new String[10];     Status status; }


How do I set a .bbx file that contains some customisations inside my actual .tex file? I want to move all the changes I've made to the "numeric" biblatex behaviour somewhere outside of my main .tex file.

says:     Finally, assuming that I'll want to use my style adjustments in a multitude of documents: Where do I put the relevant macro stuff?   The recommended answer is a copy of biblatex.cfg in one's local texmf tree. However, going away from above precondition:  What are all the places, i.e. file types and respective locations, where I can put biblatex style modifications?  I know you can write your own bbx and cbx styles, and there's probably a way to put modifications directly in a tex file? What are the limitations, advantages and disadvantages of each of these, which kind of modification typically goes where, which overrule others ...?


Im running apt-get install and the answer is always please insert the disc label. Im using Ubuntu Server 16.04 on VMware virtual machine. Can anyone help?

I'm running a Ubuntu server (9.0.4 'Jaunty') as a VMware image.  It's a real pain on the odd occasion I need to install a new package to have to fish out the install CD-ROM, and make it available to the VMware image so I can continue the package install.  Is there any way to take the original installation media out of the list of source packages - I'm assuming all packages will be available on the internet.  Thanks.


The Windows form app (C#) that we've already got imports files based on an .xlsx file. I've been tasked with writing a new section that automates the production of that spreadsheet. Creating the data for it is easy (and done). I've got any extra information I need to create the spreadsheet, except...  They told me at the 11th hour that Microsoft Office isn't installed on the server, so Microsoft.Office.Interop, etc., isn't a solution. I found out at the same time that the goal is to do this with minimal impact... so if I can avoid adding any references, that would be preferable; it doesn't sound like installing anything on the server is an option.  I was able to parse it out well enough into a .csv file, but it turns out the code that selects the file only looks for .xlsx files. So even though I can open it in Excel no problem, this doesn't actually provide a solution.  So, for all my research, I haven't found an answer to the question "Can I build an .xlsx file manually?" The closest I think I got was actually using an oledb, but since the spreadsheet doesn't exist out of the gate, every time I got to conn.open(); in the code below, it failed.  Are there any simple ways for me to create this file myself? I know .xlsx is basically compressed XML, but I can't find any reference where I can see what tags I would need to put inside a file and then how to properly compress it?  string cnStr = "Provider = Microsoft.ACE.OLEDB.12.0; Data Source = " +     filePathAndName + ";Persist Security Info=True;";             using (System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(cnStr))             {                 conn.Open();                 System.Data.OleDb.OleDbCommand cmd = new System.Data.OleDb.OleDbCommand();                 cmd.CommandText = "CREATE TABLE [" + worksheetCategory + "] (SKU VARCHAR, FileName VARCHAR);";                 cmd.ExecuteNonQuery();                  foreach (string f in files)                 {                     string shortProductName = f.Substring(f.LastIndexOf("\\") + 1);                     shortProductName = shortProductName.Substring(0, shortProductName.IndexOf("_"));                     cmd.CommandText = "INSERT INTO [" + worksheetCategory + "](SKU, FileName) VALUES(" + shortProductName + "," + f + ");";                     cmd.ExecuteNonQuery();                 }                 conn.Close();             }

How can I create an Excel spreadsheet with C# without requiring Excel to be installed on the machine that's running the code?


Now, this is the exact same question as , but is is left without a solution. @WillRobertson answered in a comment more than two years ago that he would fix this in , and I assume he has, since this is now addressed in sections 6.6 and 7.6 of the manual. But I still don't understand what I need to do in order to use the different fonts some font families provide for different optical sizes.    EDIT: See  to the original question for a solution.    Below is a MWE using . I've tried a dozen or so variants of this, but they all result in errors, the most common of which (as below), is that it can't find a font called EBGaramond.otf.  In this example, I've placed the EB Garamond fonts in a subdirectory called /fonts/.  \documentclass{article} \usepackage{fontspec}     \setmainfont{EBGaramond}[         Path = ./fonts/,         Extension = .otf,         SizeFeatures =         {             {Size = {10.1-},                 UprightFont = *12-Regular,                 ItalicFont = *12-Italic},             {Size = {-10.1},                 UprightFont = *08-Regular,                 ItalicFont = *08-Italic}         },         SmallCapsFeatures = {Letters = SmallCaps},         Ligatures = {Common, TeX},         Numbers = {Proportional, OldStyle}] \begin{document} Hello world \end{document}   Error message:  luaotfload | db : Reload initiated (formats: otf,ttf,ttc,dfont); reason: "File not found: ./fonts/EBGaramond.otf.".  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! fontspec error: "font-not-found" !  ! The font "EBGaramond" cannot be found.

I am a big lover of the  by Georg Duffner. As of now, he has made two sets of font files, EB-Garamond-8 and EB-Garamond-12, respectively for “design size 8pt” and “design size 12pt”. Is there a way to make fontspec (and possibly unicode-math, too) use EB-Garamond-8 fonts for small sizes e.g. sub/superscripts, footnotes… and EB-Garamond-12 fonts for regular sizes when using local font files¹?  If I use only EBGaramond12, the following code works if I put the EBGaramond12-* .otf files in a fonts/ directory sibling to the .tex²  \setmainfont[     Path=fonts/,     Extension=.otf,     UprightFont=*-Regular,     ItalicFont=*-Italic,     BoldFont=*-Bold,     RawFeature={+clig,+dlig,+cv11},]{EBGaramond12}   but if I try to adapt it to use the SizeFeatures options  \setmainfont[     Path=fonts/,     Extension=.otf,     UprightFont=*-Regular,     ItalicFont=*-Italic,     BoldFont=*-Bold,     RawFeature={+clig,+dlig,+cv11},     SizeFeatures={         {Size={-12}, UprightFont=EBGaramond8-Regular, ItalicFont=EBGaramond8-Italic},         {Size={12-}, UprightFont=EBGaramond12-Regular, ItalicFont=EBGaramond12-Italic, BoldFont=EBGaramond12-Bold}     }]{EBGaramond12}   Then the document won't compile and I get the following error. Using complete names instead of wildcarded ones changes nothing.  The key 'fontspec/UprightFont' is unknown and is being ignored.     ¹ It means that using features that automagically select the right system fonts is not an option.  ² the file structure is  . ├── fonts │   ├── EBGaramond08-Italic.otf │   ├── EBGaramond08-Regular.otf │   ├── EBGaramond12-Bold.otf │   ├── EBGaramond12-Italic.otf │   └── EBGaramond12-Regular.otf └── paper.tex


How do I check when my month ends? For Math stack exchange I recently got the 50 questions a month limit, just wondering how to check.

I noticed that I can only perform certain actions such as commenting a finite number of times in a given period of time. Obviously, rate limiting is in place to prevent accidental misuse or intentional abuse of certain features.  Where else is rate limiting applied on Stack Exchange sites, and what are the limits?


By RAW, when I use a grapple:  "Grappling When you want to grab a creature or wrestle with it, you can use the Attack action..."  And the 5th level eldrich invocation:  "Thirsting Blade Prerequisite: 5th level, Pact o f the Blade feature You can attack with your pact weapon twice, instead of once, whenever you take the Attack action on your turn."  So, by RAW: If it says "instead", then otherwise (A.K.A. without that eldrich invocation) the rule would be: "You can attack with your pact weapon once whenever you take the Attack action on your turn." And that would allow the player to grapple and attack with his pact weapon. Because when he grapples he uses the attack action, and then trigger the eldrich invocation. From that perspective, with this eldrich invocation, you can grapple and then attack with your pact weapon twice. Is that interpretation right?

As a Warlock with the Thirsting Blade Invocation, can I replace one of the Attacks with my pact weapon with a Grapple/Shove?  The only wording difference between Thirsting Blade and Extra attack is: "with your pact weapon"


In my quantum mechanics lectures it says that the relation between the basis $|x\rangle$ and $|p\rangle$ is given by:  $\langle p | x \rangle = \Large \frac{e^{-ip x/ \hbar}}{\sqrt{2\pi \hbar}} \, .$  However, i'm not sure how to go about proving this relation. My idea was that the eigenstates of momentum can be written as below:  $\phi(x,p) = \Large \frac{1}{\sqrt{2\pi \hbar}} e^{ipx/\hbar},$  which form an orthogonal basis.  But, we can expand any state, $|\text{state}\rangle$, in terms of the othorgonal basis right?  $|x\rangle = \int_{-\infty}^{+\infty} \phi(p', x) |p'\rangle dp'$  If it were correct then the following would also be correct?  Using the fact that $\langle p | p' \rangle = \delta(p - p')$, $\langle p | x \rangle$ can be computed:  \begin{align} \langle p | x \rangle =& \int_{-\infty}^{+\infty} \phi(p', x) \langle p | p' \rangle dp' \\ =& \int_{-\infty}^{+\infty} \phi(p', x) \delta(p - p') dp' \\ =& \phi(p, x) \\ =& \Large \frac{e^{ip x/ \hbar}}{\sqrt{2\pi \hbar}} \end{align} as required.  I.e. Clearly the exponent here does not have a minus sign where as in the lecture notes, it does. Where am I making a mistake?  EDIT:  Someone flagged as a duplicate so I couldn't provide answer.  The statement that: $|x\rangle = \int_{-\infty}^{+\infty} \phi(p', x) |p'\rangle dp'$ is wrong.  In order to expand in another basis, you should have essentially up with an integral of the basis states multiplied by some factor that tells you how much that state contributes to the end result i.e. an overlap. You can prove that the expansion of states is actually written:  $|p\rangle = \int \langle x | p \rangle | x \rangle dx$ which leads to the required results.

In my quantum mechanics textbook it says that the relation between the basis $|x\rangle$ and $|p\rangle$ is given by:  $\langle p | x \rangle = \Large \frac{e^{-ip x/ \hbar}}{\sqrt{2\pi \hbar}} \, .$  However, i'm not sure how to go about proving this relation. My idea was that the eigenstates of momentum can be written as below:  $\phi(x,p) = \Large \frac{1}{\sqrt{2\pi \hbar}} e^{-ipx/\hbar},$  which form an orthogonal basis.  But, we can expand any state, $|\text{state}\rangle$, in terms of the othorgonal basis right? So is my notation below correct for the expansion of the state $| x \rangle$ ?  $|x\rangle = \int_{-\infty}^{+\infty} \phi(p', x) |p'\rangle dp'$  If it were correct then the following would also be correct?  Using the fact that $\langle p | p' \rangle = \delta(p - p')$, $\langle p | x \rangle$ can be computed:  \begin{align} \langle p | x \rangle =& \int_{-\infty}^{+\infty} \phi(p', x) \langle p | p' \rangle dp' \\ =& \int_{-\infty}^{+\infty} \phi(p', x) \delta(p - p') dp' \\ =& \phi(p, x) \\ =& \Large \frac{e^{-ip x/ \hbar}}{\sqrt{2\pi \hbar}} \end{align} as required.  Does the logic work here?


My phone screen has been broken, I have root access and my usb debugmode is on. when i connect my phone to Moborobo, moborobo shows the screen shot on my phone, is there any way to touch my phone screen with pc ? something like real remote that give me this chance to use my mouse for accessing my phone ?

My Android device screen got broken and I can't see what I'm doing. That's the only wrong thing with my device, the rest is apparently working OK. Is there any way to send my device screen to my computer? I don't want to work blindly anymore!


Fermat's Last Theorem      In number theory, Fermat's Last Theorem (sometimes called Fermat's conjecture, especially in older texts) states that no three positive integers a, b, and c can satisfy the equation $a^n + b^n = c^n$ for any integer value of $n$ greater than two.   Now the question is will Fermat's last theorem hold true if we extend the question to the complex plane. Ie when $a$, $b$ or $c$ can be complex numbers. Why or Why not and is there any prove to it?

As far as I know, we are searching solutions in set of positive integers for $x^n + y^n = z^n$  for $n > 2$. There are many proofs are stated that Fermat is true and there is no solutions for this equations. Now my question is, can we have solutions in complex numbers field? If yes, how to find them.   Thanks in advance.


I know that we cannot instantiate an interface.  HashMap method, keySet(), its return type is Set.  public class aMap{     public static void main(String args[]) {         HashMap newmap = new HashMap();         newmap.put(1, "please");         newmap.put(2, "help");         newmap.put(3, "me");         System.out.println("Key set values are: " +                 aMap.keySet());     }     }   Output: Key set values are: [please, help, ma]  -Why can the method return a Set, which is a interface?(if Set cannot instantiate)  -Suppose Set interface can only have static final attributes and empty methods, why can it (stores) Strings into a Set?

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I would like to create a view that has a part number, order number and any comments attached to the part number. Comments are stored in a table OEC. There is a record for each line of comments.   OEC.ord_no OEC.seq_no OEC.cmt_seq_no OEC.comment 123        1          1              Comment line 1 123        1          2              Comment line 2   The OEC will link to an OER table by OER.ord_no and OER.seq_no  I would like the view to return   OER.ord_no OER.item_no OEC_Comment 123        ABC         Comment line 1, Comment line 2   There is no limit to the number of lines a comment could possibly have

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I want to know about my database how much secure in this way ? What else can i do for more security ? Is htmlentities and mysqli_real_escape_string enough combo for security?  <?php require 'db.php'; $mysqli2 = new mysqli('localhost','x','x','x'); session_start(); $_SESSION['message'] ='';  if (isset($_POST['username'])){     /* User login process, checks if user exists and password is correct */      // Escape email to protect against SQL injections     $username= htmlentities($_POST['username']);     $username = $mysqli->real_escape_string($username);     $result = $mysqli->query("SELECT * FROM accounts WHERE username ='$username'");      if ($result->num_rows == 0){ // User doesn't exist         $_SESSION['message'] = "You should register !";         header("location: error.php");     }     else { // User exists         $accounts = $result->fetch_assoc();         $password= htmlentities($_POST['password']);         $password = $mysqli->real_escape_string($password);         if ( password_verify($password, $accounts['password']) ) {              $_SESSION['username'] = $accounts['username'];             $_SESSION['usercode'] = $accounts['usercode'];             $usercode= $_SESSION['usercode'];             $_SESSION['email'] = $accounts['email'];             $_SESSION['active'] = $accounts['active'];             $result2 = $mysqli2->query("SELECT * FROM account_info WHERE usercode ='$usercode'");             $account_info = $result2->fetch_assoc();             $_SESSION['name']= $account_info['name'];             $_SESSION['lastname']= $account_info['lastname'];             $_SESSION['location']= $account_info['location'];             $_SESSION['phone'] = $account_info['phone'];             $_SESSION['balance'] = $account_info['balance'];             // This is how we'll know the user is logged in             $_SESSION['logged_in'] = true;              header("location: index.php");         }         else {             $_SESSION['message'] = "You have entered wrong password, try again!";             header("location: error.php");         }         }     }  ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


A glossy  object looks perfect in material preview ,but when I come to render mode (I try to use cycle), everything looks completely different.

When I apply a glossy shader to the material of my text, the text becomes just black. Why?    I have lamp and everything, but the problem persists. The text is red before I add the glossy shader.  I'm using Cycles render.   Thanks!


Using pdflatex pi-2.6-1.40.15 and BibTeX 0.99d, when compiling my LaTeX documents with multiple .bib files, some of my references are not sorted by the first author last name properly.  As an example, book.bib I have   @book {Connes,     AUTHOR = {Connes, Alain},      TITLE = {Noncommutative geometry},  PUBLISHER = {Academic Press, Inc.},    ADDRESS = {San Diego, CA},       YEAR = {1994}, }  @book {Conway,      AUTHOR = {Conway, John B.},      TITLE = {A Course in Functional Analysis},  PUBLISHER = {Springer-Verlag},    ADDRESS = {New York},       YEAR = {1990},     SERIES = {Graduate Texts in Mathematics},     VOLUME = {96},    EDITION = {2nd ed}, }   and in article.bib,   @article {Connes1989,     AUTHOR = {Connes, Alain},      TITLE = {Compact metric spaces, {F}redholm modules, and hyperfiniteness},    JOURNAL = {Ergodic Theory Dynam. Systems},   FJOURNAL = {Ergodic Theory and Dynamical Systems},     VOLUME = {9},       YEAR = {1989},     NUMBER = {2},      PAGES = {207--220}, }   bibtex will sort in the bibliography of document: Connes1989 first, then Conway, and finally Connes.    A test document for which I can see this behavior is:  \documentclass[12pt,twoside,letterpaper]{article}  \begin{document}  \cite{Connes} \cite{Connes1989} \cite{Conway}  \bibliographystyle{alpha} \bibliography{./book,./article}  \end{document}   This is confusing because some authors are properly sorted and others are not.

Using the alpha bibliography style, citations are sorted by the citation key. I'd like to use the same style of authors-year citation keys (e.g., [CP92]) but have the bibliography sorted by the first author's lastname instead of alphabetically by the citation key itself. This would keep the same papers by the same first author together.  For example, alpha would produce the following sorted order:        [Cha81] D. Chaum. Untraceable...   [CL04] J. Camenisch and A. Lysyanskaya. Signature...   [CP92] D. Chaum and T. Pedersen. Wallet...      Whereas, abbr would produce the following sorted order:        [1] J. Camenisch and A. Lysyanskaya. Signature...   [2] D. Chaum. Untraceable...   [3] D. Chaum and T. Pedersen. Wallet...      I am looking for the same sorting as abbr but maintaining the citation key style of alpha.  Is there a way to achieve this hybrid style?


Hp pavilion dv6 on win8  I was installing Ubuntu 14.04 using my external hard disk as a USB flash drive. My CPU is a 32 bit laptop. Its not progressing past a black screen with cursor on left top.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


As per statistical literature, there seems to be this understanding that given a p value less than alpha, we are to reject the null hypothesis.   The way I am interpreting this is that is the critical region, as defined by the alpha is the 'False Rejection' (TYPE 1 error) zone and constitutes the error threshold, why then p-value for a sample that is less than the alpha and within the error zone results in rejection of the null hypothesis?  Another line of thought - if the p-value is a way of saying how extreme a test statistic is for our sample data and seems to have a low probability, then how does it constitute evidence against the null hypothesis?  Where am I going wrong?

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


I heard many of them used the word 'tho' in their sentence and I'm still can't figure out what it really means and how to use it!

Ok, English textbooks mostly teach the structure "Although / though", for example,   Although my wife and I are so busy,we spend time together every weekend.  Anne was fond of Tim, though he often annoyed her.    However, in reality, I heard a lot of people use "though" at the end of a sentence. So, I checked the dictionary & found that "Although" & "Though" in the above examples are conjunction. But, from , "Though" is used especially at the end of a sentence to add a fact or an opinion that makes the previous statement less strong or less important Example:  Our team lost. It was a good game though.  But, for me, It seems that "Though" that is used at the end of a sentence is more popular than "Though" that is used at the start of a sentence.


Consider a regular n-gon with side length $A$.  Let $p$ be a point in the polygon. Let the distances from $p$ to the corners of the n-gon be $x_1,x_2,...,x_n$  Are there solutions with $A,x_1,x_2,...x_n$ all positive integers and $gcd(A,x_1,x_2,...,x_n) = 1$.  For the triangle ( $n=3$) this question has been answered already here      --  I assume for sufficiently large $n$ there are no solutions ?  In particular im intrested in $n=4,5,6$.

Let's call a point $P$ which satisfies the following condition 'a rational point'.  Condition: Each distance $PA, PB, PC$ from a point $P$ to three vertices $A, B, C$ of an equilateral triangle $ABC$ which has edge-length $1$ is rational number.  I'm interested in this point because I found the following three:  1. There exist an infinite number of rational points on an edge of the equilateral triangle $ABC$.  2. There exist an infinite number of rational points on the circumference of the circumscribed circle of the equilateral triangle $ABC$.  3. There exists a rational point in the equilateral triangle $ABC$.  Supposing that $A(0,\frac{\sqrt3}{2}), B(-\frac12,0), C(\frac12,0)$, one example for the above 3 is the following: $$P\left(\frac{61}{2058},\frac{220}{1029}\sqrt3\right), \left(PA, PB, PC\right)=\left(\frac{73}{147}, \frac{95}{147}, \frac{88}{147}\right).$$  I found this example by using computer. I found the other examples, but I don't know there exist an infinite number of rational points in the equilateral triangle $ABC$. Then, here are my questions.  Question 1: Do there exist an infinite number of rational points in the equilateral triangle $ABC$ ?  Question 2: Can we find all rational points in the equilateral triangle $ABC$ ?


I have been struggling some days now to understand the more general concept behind the abstract definition of geometry (probably the old-fashioned one due to Klein). As far as I know there are different kinds of geometries like euclidean, spherical, hyperbolic, elliptic, projective, affine etc. Although I've been looking around for the differences/similarities of them, didn't manage to sort it out clearly on my own, hence I think is a good place to ask here my query.   What I have so far is that projective geometry is a kind of extension of the Euclidean (and that does make sense in my head), and elliptic geometry is just the generalization of spherical in higher dimensions. But what's going on with the others? Is the projective geometry the general stage under which every other geometry can be built up? The Wiki article I think says for instance that projective space shares locally the same properties as models of spherical geometry, but don't really get that.. (as many many others unfortunately).  Frankly, I' m quite confused and a thorough answer behind the general philosophy of the aforementioned things (or probably a concise reference) it's really appreciated.  Also what can be said about the most recent definition of what Klein called geometry in his Erlangen Program?  I' m quite new here, so if I have done any mistake please feel free to remedy them! Thanks

I heard that there's several kind of geometries for instance projective geometry and non euclidean geometry besides the euclidean geometry. So the question is  what do you mean by a geometry, do you need truly many geometries and if yes what kind of results we can find in one geometry  and not in the others. Thanks a lot.


I tried to change the icon in the start button of win10 :     after downloading a software (start10). That made it really slow and I uninstalled  it. I want to change that in the CMD or even changing the image (finding the directory).  01) I want to find the image directory of this icon  02) I want to find the command that changes the image

I want to change the icon in the start menu:    I'm willing to mess with the Registry, and I am well aware that I should make backups (and do!)  How will I accomplish this?


Im trying to make a conditional statement in my java GUI program. I was already able to make connection with my database db2 and also able to execute query to obtain a result set.   The problem is that when i use a table data to compare with a string in a conditional statement (if), It always returns false and goes to else clause even though the data from the resultset is identical to the string im comparing it to.  I have written the code below.  String query3 ="select * from module where uname='ADMIN' and modulename='SETADMIN'";                 PreparedStatement pst2 = conn.prepareStatement(query3);                 ResultSet rs2=pst2.executeQuery();                 rs2.next();                 if (rs2.getString(1)=="ADMIN"){                     JOptionPane.showMessageDialog(null, "if statement working");                 }                 else{                     JOptionPane.showMessageDialog(null, "if statement not working");                 }   the resultset that will be obtained by the query would look like this  **UNAME   MODULENAME    CANADD   CANEDIT   CANDELETE**   ADMIN     SETADMIN       T        T           T   everything else in the program seems fine except for the if clause always returning false and going straight to else clause  Any help would be much appreciated :)

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


This question occurred to me, and I was wondering what everybody else thought about it. Lets say that an infrared laser and an ultraviolet laser were to intersect at a right angle. What kind of things would happen from there? Would they average out and create a point of visible light? Would they pass through each other as if nothing happened at all? Would their trajectory be effected? Finally, if they did create a point of visible light, would the ray continue on past that point returning to its original wavelength, or would it be permanently altered as it continued along its path? Thanks for the input! :)

See the image first:   Why are light rays able to cross each other? Air isn't able to.


Why would i need more energy to raise the velocity of an object from 2 m/s to 3 m/s, than raising the velocity of the same object from 1 m/s to 2 m/s. Note: I am not talking about the math related to this question, I am talking about the physical intuition.  Thank you in advance.

As  says:     [...] the kinetic energy of a non-rotating object of mass $m$ traveling at a speed $v$ is $\frac{1}{2}mv^2$.   Why does this not increase linearly with speed? Why does it take so much more energy to go from $1\ \mathrm{m/s}$ to $2\ \mathrm{m/s}$ than it does to go from $0\ \mathrm{m/s}$ to $1\ \mathrm{m/s}$?  My intuition is wrong here, please help it out!


\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning}  \begin{document}  \begin{tikzpicture}[flow/.style={thick,-stealth}]    \node             (A) {A};   \node[right=of A] (B) {B};   \node[right=of B] (C) {C};   \node[right=of C] (D) {D};   \node[right=of D] (E) {E};    \draw[flow] (A) -- (B) -- (C) -- (D) -- (E);  \end{tikzpicture} \end{document}   This code produces the follow layout:  A ---- B ---- C ---- D  ---> E   How can I add an arrow head for each of the intermediate arrows without using separate \draw commands?  A ---> B ---> C ---> D  ---> E

I would like to draw a single path with relative coordinates, where every segment gets their arrow tips. I have tried  \draw[<->] (0,0) -- ++(1,0) -- ++(1,0) -- ++(1,0);   But of course, as is specified in the manual, this adds arrow tips to the first and last subpaths only, of course, so it becomes something like <------------>, whereas I would like it to be <---><---><--->. I have read  and know that an edge will give me arrow tips on every edge, but then I can't use incremental coordinates. (I am actually trying to do the exact same thing that @quinmars is doing in that question.)  Since the answer to that question is 5 years old, I was hoping that either TikZ or somebody else may have an elegant solution to this?


Which is the best or preferred flavour of Ubuntu for running alongside the macOS on a dual-bootable MacBook Air (8,1) ?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


We know that Hedwig died, and Pigwidgeon presumably stayed at the Weasleys'. But what about Crookshanks? Is he even mentioned in DH? He seems to just disappear at one point with no explanation.

Crookshanks is Hermione's familiar in PoA, GoF, and OOTP. I cannot recall mention of Crookshanks following OOTP, though. What happened to Crookshanks? Does canon refer to Crookshanks in either HBP or DH?


If I type in a 16 digit number (format: number, no decimals) it changes the number on me. Example: 1234567812345678 changes the view to 1234567812345670.    If I type it in as a general format it changes the numbers above so it displays 1.23457E+15 but if you click on the cell, the display shows the last digit as a 0 instead of an 8 once again.   I opened the file on a different computer and same issue now with it.  I have changed the auto correction and auto formatting all to no avail.  Help!

I want to add more than 20 digits in an Excel cell.  The current format of the cell is general, it converts the number to an exponential format. I tried with a number format and accounting, but when I enter more than 15 digits it gets converted to 0's.  What are the recommended steps for stopping Excel from converting data to exponential Format for 20 digits when in the general format?     Example: 12345678901234567890   Excel converts it to 1.23457E+19 in general format.  Without using ' before the value, is there any other way to keep value same?


I am reading about closures right now and am confused by this javascript code.   function makeAdder(x) {   return function(y) {     return x + y;   }; };  var add5 = makeAdder(5); var add10 = makeAdder(10);  console.log(add5(2));  // 7 console.log(add10(2)); // 12   How does the console.log work? Since add5 = makeAdder(5), then isn't add5(2)) = makeAdder(5)(2)?    I am wondering how y = 2 is determined by javascript in this function, as the function only defines one argument x.  EDIT: Sorry to make it clear, what I was confused about was the fact that it appears like 5 and 2 are both being passed into makeAdder(x).

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I've been hit with several serial votes and I'm wondering how soon they will be reversed, since I've noticed it used to happen in the past.     The specific site is Code Golf. See the picture below:

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I found , with a similar problem, but doesn't seem to be answered. I'd like to be able to type an iMessage and hit "send" when using an Apple Bluetooth Keyboard and iPad Air without touching the screen. I've tried changing my hardware keyboard to International...without luck. I've used many combinations of shift or control or command or option and return/enter without luck. Looking for an answer, not a have-you-tried...scenario.

I use a Bluetooth keyboard with my iPad. When I am sending messages through the Messages app, the enter key does not initiate a "send" the way I expect (it, instead, just returns down to the next line). Is there a way to make the "enter" key send the message instead of dropping down to the next line? Some magic key combination perhaps?


Why are answerers allowed to comment/vote on one another's posts? We can infer that answerer's already disagree with one another which is why they wrote their own answer. Or they wanted to contribute to the other answerer.  It seems answerers think their own answer is better and will downvote other answers just because they want their own answer to be the best.  If an answerer wants to respond to another's answer they could do it in their own answer (ie "Other answerers have said X but I believe Y").  This is not a duplicate. Other questions ask about etiquette. I am asking why it still exists.

Possible Duplicate:          I was reading  on hacker news. In particular people seemed to be very discouraged about idea they are getting downvotes by competing answerers.   Think about it as anti-sportsmanship. It is clear this is not a super-common practice. Obviously on meta this is a bit more common than on SO.   It is also clear that it leaves a .  Should we look at introducing a system that stops people from downvoting the competition in certain cases? If so what are the cases? If not why?


I want to prove that every open interval has the same cardinality of R.  I've proved that $|(a,b)|=|(c,d)|$ so I may find a bijection $f: (a,b) \to (c,d)$.  I need a bijection $f: (c,d) \to \Bbb R$ (a bijection defined by an interval to $\Bbb R$) The problem is that the only function like this that I know is tan(x) that is bijective in ($- \pi/2, \pi/2)$ but I am not allowed to use trigonometric functions.  Does anybody know another function like this?

I want to prove that every open interval has the same cardinality of $\Bbb R$.  The question is:  Is it enough to prove that any open interval is uncountable? If I prove it, can I say that this interval has the same cardinality of reals?  I know that I can get a bijection using the tangent function, but I am not allowed to use trigonometric functions.  I've proved that |$(a,b)$|=|$(0,1)$| so I may prove that |$(0,1)$|=|$\Bbb R$| but I did not find the bijection without using trigonometric functions.


Assigning JSON string to apex:inputText  jQuery code:  $('*[id*=stageName]').val(JSON.stringify(final_array));   Apex & Visualforce:   public String stageName{set;get;}  <apex:inputText value="{!stageName}" id="stageName"/>   Getting below text into stageName in apex through jQuery  {     "New":["Prospect","Open","In Negotiation","Final Negotiation"],     "Readoption":["Won"],     "Rollover":["Won","Invoiced","Lost"],     "Upsell":["In Negotiation","Lost"],     "Conversion":[] }   How to convert this JSON text into apex map like Map<String,List<String>>

I am trying to parse the following JSON format into a Object.  {   "info1": "blah blah",   "info2": "blah blah2",   "info3": 1391673663,   "info4": "blah4",   "info5": {     "AAA": 0.1,     "BBB": 0.3, .....   } }   But the problem is under [info5] list, name like "AAA", "BBB" and their related values are dynamic and always changing.   How should I make my Object to satisfy this kind of structure? I want to put those values into a Map if possible.  So that I can easily get "AAA" and its Related values.  Any input will be so helpful for me.


How many Server-sent event connections can be handled by an Ubuntu server with:    1 GB of RAM Dual-core CPU Running Nginx (as a reverse proxy) In front of ExpressJS server?   Topics I have was able to study about:   Difference between Websockets and Server-sent events. Limitations imposed by browsers for SSE (max 6 for one domain). Headers that need to be mentioned in the proxy configuration for Nginx. Configuring workers for Nginx. Node.js is a better choice for SSE instead of PHP. Nginx being among the few servers to address the C10K problem.   I did not find any real stats or case studies about how many simultaneous connections can be handled by a server (may be with the above mentioned specs and configuration or ... some other higher/lower spec configuration)

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


My recently suggested edit for the  question got immediately rejected first by Community ♦ on the following grounds (screenshot):        Then, later it got rejected by OP who reviewed the post and made an edit (as shown at the top in the above screenshot).  Here is what my suggested edit looks like:        Here is what OP's edit looks like:        I found out the following facts:   Community likes the OP as their edit got approved for lower case "S" and adding "." at the end. If you notice in the OP's edit screenshot above, you will see this "stealth.travel." in the highlighted area. OP did not have the word "currently" originally. I added it in my first edit (refer to screenshot #2 above) because the edit was lower than 6 chars.   So, my question is, why did the "Community" aka Ghost moderator rejected my substantial (highlighted in bold below) edit?  Reject:      I currently work for Stealth .travel   but approved the OP's tiny change:     I currently work for stealth.travel .   Please share you thoughts on this.

Why does the Community user sometimes approve or reject edits? How does a machine know if my edit is valid? What does it mean if my edit was rejected by Community?     See also:


When I need to focus on a specific instance of a subject, but want to include a clarifying remark making it plural, I may set off that secondary statement like this:      The state of Florida (and 27 other states in the US) has/have Right-To-Work laws.   I'm not asking about parenthetical pluralization where you add an optional (s) to the subject when the quantity is not known (e.g. vendor(s) as in ), but a clarifying statement that is part of the subject (or maybe it isn't; that's what I'm asking).  So is the subject of this sentence above singular or plural? Which is the correct usage in my example?

I would tend to say     Sara (and all of us) have a lot to think about now.   ...but it occurs to me that if I remove the parenthetical it's clearly incorrect. Is it proper to say     Sara (and all of us) has a lot to think about now.   ...that sounds really strange to my ear.  Also, does it change the rules in any way if I use an em dash, e.g.     Sara–and all of us–have a lot to think about now.


I once , but that was . Now, , and they have , but where's the business model? The  its own Q&A about its site (since it wasn't included in the ), and just about the only dig in there that halfway has merit is the business model dig:  We switched to a premium model to keep out of the Venture Capital business (been there, done that, got the t-shirt). Companies like StackExchange couldn't do it without the VC cookie jar. Where's the model? Huh, Spolsky? (I’m sorry. Did that slip out?)  It hurt, but I can't help but wonder if they're on to something.  How would Stack Overflow Internet Services pay back the VCs? Ad revenue alone?  There is only one 'paid' product, Stack Overflow careers, but it doesn't seem like that could sustain a business as large as Stack Overflow (Joel once mentioned on his blog that his jobs board brought in an extra million a year in revenue). So what does Stack Overflow do when the VC cash runs out? Is this a get-big-and-take-the-company-public maneuver? Is that the only viable business model for Stack Exchange? Edit: With the size of Stack Overflow's team, it isn't a stretch to say that payroll is at least $2 million  a year, probably as much as 4 when you think about benefits (average 120K for a developer in New York City; x2 for benefits/taxes/all-that-other-good-stuff). Office space can't be cheap, so how long does $6 million last before you need another VC infusion?


I got a pop-up for a security update which uninstalled and reinstalled lots of stuff. During this it said something failed to update. Now when I try to install the update that failed I get this error message.   Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f   Running the command gives me this   Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) Unable to lock the administration directory (/var/lib/dpkg/), are you root?   I barely know anything about linux so please give simple answers and don't use shorthand lingo.  Edit: I ran the command with sudo and got this in terminal   The following package was automatically installed and is no longer required:   libllvm3.5 Use 'apt-get autoremove' to remove it. The following extra packages will be installed:   libllvm3.8v4 The following NEW packages will be installed:   libllvm3.8v4 0 upgraded, 1 newly installed, 0 to remove and 9 not upgraded. 33 not fully installed or removed. Need to get 0 B/10.2 MB of archives. After this operation, 40.3 MB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 788253 files and directories currently installed.) Preparing to unpack .../libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_i386.deb ... Unpacking libllvm3.8v4:i386 (1:3.8-2ubuntu3~trusty4) ... dpkg: error processing archive /var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_i386.deb (--unpack):  trying to overwrite '/usr/lib/i386-linux-gnu/libLLVM-3.8.so.1', which is also in package libllvm3.8:i386 1:3.8~+rc3-1~exp1~gd~t dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing:  /var/cache/apt/archives/libllvm3.8v4_1%3a3.8-2ubuntu3~trusty4_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Side note: I can't launch the Ubuntu software center and everytime I launch steam. Steam brings up the terminal and installs something every time it didn't used to do that.

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


Is there any way to determine current filesystem location of executed class from the code of this class, in runtime, given that it's executed using java command?   For example for following class:  public class MyClass{  public static void main(String[] args){\    new MyClass().doStuff();  }   private void doStufF(){    String path = ... // what to do here?!    System.out.println("Path of class being invoked: " + path);  }  }   Is there any way to get and print the correct path in filesystem of MyClass.class file just being invoked?  Similarly, if I invoke jar file from java -jar command, is there any way to get a path of jar file from within classes inside that jar?  P.S.:Please, do not make any assumptions about working directory from which java command is invoked!

Does anyone know how to programmaticly find out where the java classloader actually loads the class from?    I often work on large projects where the classpath gets very long and manual searching is not really an option.  I recently had a  where the classloader was loading an incorrect version of a class because it was on the classpath in two different places.  So how can I get the classloader to tell me where on disk the actual class file is coming from?  Edit: What about if the classloader actually fails to load the class due to a version mismatch (or something else),  is there anyway we could find out what file its trying to read before it reads it?


public static void main(String[] args) {     List<Integer> numbers1 = Arrays.asList(1,2,3);     List<Integer> numbers2 = Arrays.asList(3,4);      List<int[]> intPairs = numbers1.stream()             .flatMap(i -> numbers2.stream()                     .filter(j -> (i+j)%3 == 0)                     .map(j -> new int[]{i,j}))                     .collect(Collectors.toList());      intPairs.stream().forEach(System.out::println); }   For the above code, I am getting output as:    [I@214c265e [I@448139f0   But my expectation is to get [(2, 4), (3, 3)].  Could you please guide me to achieve this?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]