Why does "is" comparison gives two different result?

I'm learning how python stores variables and refers it with names in Python and I came across something that I couldn't make sense of. I assigned same value to var1 and var2 and saw that these variables refers same object. And I created another two variable named var3 and var4 and assigned same value (but different from before) and I saw that objects that these variables refers isn't the same. Can someone explain the difference in this?   Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> >>> vars() {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': None, '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>} >>> var1 = 100 >>> var2 = 100 >>> var1 is var2 True >>> var3 = 500 >>> var4 = 500 >>> var3 is var4 False >>> id (var1) 491903584 >>> id (var2) 491903584 >>> id (var3) 56573264 >>> id (var4) 87458544 >>> >>> vars() {'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': None, '__annotations__': {}, '__builtins__': <module 'builtins' (built-in)>, 'var1': 100, 'var2': 100, 'var3': 500, 'var4': 500}


What's it called when two people can't decide which way to go?

This phenomenon happens to me several times a week and I've actually just recently started pondering if this situation has a defined term for it?  When two people walk towards each other in opposite directions, and they need to quickly decide whether to walk on the right or left side of each other, oftentimes failing to do so when both decide on the same direction, and then switching and causing an awkward situation to occur between you and the stranger. It probably has happened to anyone of you. What is this called?


Consider the infinite line, $L$ in $2D$ consisting of all points $p$ such that $p.[0.3511 0.9263]= 6$. Find the point on the line closest to $(10, 20)$. Find the point on the line closest to $(4, 3)$. Find the distance from the line to both of these points.  Hi, I was reading the book $3D$ Maths Primer for Graphics and Game Development. The book mention about $2$ formulas but I don't know how to apply them.   $\text{Signed distance} = d-q.n$  $q' = q + (d-q.n)n$  for any point $q$, the point $q'$ that is the closest point on $L$ to $q$.  This is what I have tried,   Since the lines are parallel then the normal are the same so   $q' = q + (6 - q(0.3511 0.9263))(0.3511 0.9263)$   I'm stuck here.


Google Chrome update won't install due to unmet dependencies

There was an update for  today, and it wasn't installable due to unresolved dependencies. How can I correct this?


What is the physical meaning of the "decay rate" in Fermis golden rule?

As far as I understood,  gives a prediction of the transition rate in a perturbed quantum system $H_0+V$ between two eigenstates of the unperturbed system $H_0$, say from $\left| i\right>$ to $\left| f\right>$ with eigenenergies $E_i,E_f$. The prediction is perturbative in the first order of $V$.  The result is, that the rate equals  $$\gamma_{i\to f} = 2\pi |\left<f|V|i\right>|^2 \delta(E_i-E_f)$$  This rate is defined as  $$\gamma_{i\to f}=\frac{d}{dt} |\left<f|U(t)|i\right>|^2.$$  My question: How should one interpret this differential "rate" physically?   My thoughts so far: Apparently it is the derivative of the transition probability with respect to time, so it is not a probability itself. In literature it is often called decay rate, but for an exponentially decaying probability $p(t)\sim e^{-\lambda t}$ the decay rate $-\lambda$ would not be computed as $dp/dt$, but $(dp/dt)/p$.


Unable to edit .bash_profile file on mac

Unable to edit ~/.bash_profile file on my mac. I did some changes in this file and rebooted. From then nothing is working on my command line:    Any help would be appreciated.


the problem of using "~\\" and blank line

Recently,I found the code that cotains the"~\\" and blank line always shows the warning imformation "Underfull \hbox (badness 10000) in paragraph at lines"  \documentclass{ctexart} \usepackage{color} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} \usepackage{epstopdf} \hfuzz=\maxdimen   $(A \pm  B)^{-1} \neq A^{-1} \pm B^{-1}$,$(A \pm  B)^* \neq A^* \pm B^*$~\\  $|(A^*)^*|=|A|^{n^2-2 n+1}$~\\  \end {document}   I add the code:  \tolerance=10000 \hbadness=10000 \begin{document}   However,fail to solve it!


where do I download ubuntu desktop for intel?

When I download ubuntu, it always gives me an image for amd...  Like ubuntu-18.04-desktop-amd64.iso  Where can I find an download for Intel?  I try to install that through Oracle VirtualBox so maybe I am doing something wrong in the virtual machine I create...


I have a few PC's with an ext4 filesystem that I want to backup to a file server which is also ext4. Problem is there are some discrepancies in file sizes when using rsync, and I have noticed this is due to sparse files.   The problem is I want to create an exact rsync copy of the filesystem using rsync over a network to keep weekly backups, in case I need to restore, and the restored data should be the same size as whats running on the PC.  Creating the test files, 1 sparse and 1 not:  mkdir testing dd if=/dev/zero of=testing/sparse-file.img bs=1 count=0 seek=5M cp testing/sparse-file.img testing/non-sparse-file.img --sparse=never   Rsync with and without sparse option:  mkdir testa testb rsync testing/* testa rsync --sparse testing/* testb   Results:  du -h 5.1M    ./testing 4.0K    ./testb 11M     ./testa 16M     .   testing has 1 file 5MB and one sparse file, testb had both files become sparse, testa had both files become non-sparse  But how do I make rsync maintain the file sparseness? So the filesystem will have the exact same size on the restored system.  I want to have certainty when I restore my system I'll know exactly how big the restored data will be, with sparse option, my restored system is going to be more sparse then what it was originally (I guess this is acceptable), and with the non-sparse option, this will result in an unpredictable larger restored system.


Roots of unity filter, identity involving $\sum_{k \ge 0} \binom{n}{3k}$

How do I see that$$\sum_{k \ge 0} \binom{n}{3k} = (1 + 1)^n + (\omega + 1)^n + (\omega^2 + 1)^n,$$where $\omega = \text{exp}\left({2\over3}\pi i\right)$? What is the underlying intuition behind this equality?


How can I get all the year of posts in archive.php and put it on the list?   2016 | 2017 | 2018   And after clicking any year, It will show the posts of the selected year www.example.com/post_type/2018.   Do I need to rewrite rules to make this done?


Python cross-platform listening for keypresses?

I need to listen for certain keypresses in a python terminal program without pausing execution with raw_input. I've seen people use a few windows specific ways of listening for keystrokes and I've seen people use large modules like tkinter and pygame which I want to avoid. Is there a lightweight module out there that does this cross platform (at least ubuntu, windows, mac)? or is there a way to use just the event system from tkinter, pygame, etc...? If not, how should I approach tackling this? My first thought is to redirect stdin to another process and keep checking to see if it contains one of my event keys.  edit Thank you @unutbu for taking the time to mark this question that is 3 years old and successfully answered as a duplicate of another question whose answers do not apply to this question because I specifically asked about a non-blocking solution.


Remove directories sequentially vs. simultaenously in background

Part of a script I am writing utilizes rm -rf to completely remove two directories.  These directories are relatively large and can take a considerable amount of time to remove.   Currently the directories are removed sequentially:  rm -rf dir1 rm -rf dir2   Would it be any faster to remove them simultaneously in the background via:  rm -rf dir1 & rm -rf dir2 & wait   If so why?


I set a background image (below) but it's not displaying while editing, and yes I'm not in ortho mode.  Any ideas?  Also attached a screenshot.  Update: this above part is now answered in comments—you must be in one of the preset ortho views or the camera view, and not the general ortho view or the perspective view.  I'm also interested in making this show up in my Cycles render, but it's not showing up despite having checked the Transparent checkbox under the Film panel.  Threads I've already read include:


I understand that it will be "nice" to have a quantum description of Gravity as well, just like the other 3 forces. I would like to find out what problems arise in existing theory (not counting String Theory) that indicate that Gravity has to be quantizable?   Putting it differently - what is the motivation, apart from the appeal of elegance, for wanting to quantize Gravity?


Automatically run commands over SSH on many servers

There is a list of IP addresses in a .txt file, ex.:  1.1.1.1 2.2.2.2 3.3.3.3   Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is in the known_hosts list (on my PC, Ubuntu 10.04 LTS/bash).  How can I run commands on these servers, and collect the output?  Ideally, I'd like to run the commands in parallel on all the servers.  I'll be using public key authentication on all the servers.  Here are some potential pitfalls:   The ssh prompts me to put the given servers ssh key to my known_hosts file. The given commands might return a nonzero exit code, indicating that the output is potentially invalid. I need to recognize that. A connection might fail to be established to a given server, for example because of a network error. There should be a timeout, in case the command runs for longer than expected or the server goes down while running the command.   The servers are AIX/ksh (but I think that doesn't really matter.


What should the ALT text be for an image that is also a link?

An image alt="" text should contain information about that image in the context of the page, so for instance if you have an article about cats on skateboards and then a photograph of the cat on his skateboard you'd probably give it the alt text of alt="Fluffy pulling some mad tricks on his pimped-out board".          – Wireframes created with   However, what should happen when that image is a link to a page (such as the Wikipedia cat page)?  I don't think there is any point using the title attribute here because screenreaders just ignore that when an alt attribute exists - the only people who would see the title attribute are mouse users who hover over the image, so that excludes keyboard only users too. It's not really any benefit to accessibility to include a title in this situation (Overall the title attribute is a bit useless really).  So, what should the image ALT text say in this case?   states:     Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.    Therefore giving it the alt text of cat article page on Wikipedia is incorrect because that doesn't describe the image, neither does skateboarding cat image that links to the wikipedia article because the alt text should refer to the image itself, not the link associated with it.


Sentence:      A set of deer antlers lying on a flat stone just inside [of?] one cave reveals more recent visitors.   Should we use preposition -of- in that case?  I have checked Corpus of Contemporary American English and have found examples of both usages:        ...to plant another 20 acres of vines, finish building the inside of   an on-site cave, and work on building a retail tasting room (Fiction)   However, opened and remained blue as the inside of an ice cave, paler   than the shell of a robin's egg (Fiction)   It looked like the wall on the inside of a cave: flat and kind of   scale (Fiction)   ...-To protect the inside of the cave. " // He stepped inside, leaving   the gate open.  (Fiction)     Views outside and inside of Wind Cave in South Dakota (Magazine)   Above, Black Hills grasslands and, right, boxwork inside of the cave   (Magazine)   You can see Bill Elliott's great photos of what you can see inside a   cave. (Spoken)   So, when I am asked, what was your feeling inside the cave? (Spoken)   At some point, we found a small river running through the inside the cave (Spoken)   We were gathered around a small fire inside the cave (Fiction)   About 700 feet inside El Sidrn cave, a research team including   Lalueza-Fox excavated 1,700 bones (Academy)      I still cannot come up with a clear pattern why we are using -of- in some cases but are not using it in other. Is it more a question of style rather then a grammar? Or it has something with how speaker/writer sees things around and perceives a reality? Does absence of -of- make things sound weird/wrong for native speaker? Thanks.


Bluetooth gets ON by itself in every session

I don't know what is wrong. I use 18.04, every time when I boots into my laptop Ubuntu, I find that Bluetooth is ON. I turn it off and it stays so till I switch off my laptop. But when I boots into Ubuntu again Bluetooth is ON. No matter how many time I turn it off, it comes back with every new session. Is there any way to permanently turn it off ?


How to register data-accordion as an allowed attribute

Continuing my now protected question from earlier at :  How do you "register data-accordion as an allowed attribute" @Rup ?  I looked at the Codex and it is not crystal clear. I also did more Googl'ing and found the same answer at  but it simply does not work.


how can I install Ubuntu on my old computer

I've been trying to download and install Ubuntu on my Dell Inspiron 6000 laptop computer with no luck. It's an old computer about 9 years old. It has intel 1.6g processor and 2 gigs of memory. I had tried to install one of the Ubuntu but I got a message that says I need an x86-64.  I have a 32bit laptop.  I have only one hard drive with windows XP on it,  How can I purchase a Ubuntu O.S. or download the correct Ubuntu for my particular computer but a current system where I can get support.


I want to recover my data from a formatted hard disk partition

So this is going to be a long story. And I will try explain this complex story as simple as I can.  At the beginning I have a single hard disk where I have all my data (1TB).  I now make two new partitions of 100 gb. So all my data is on the 700 and something gb of partition(LET THIS BE MAINDRIVE PARTITION). Of these two new partitions from MAINDRIVE partition One is for my important data(let this be the important Data drive partition) and the other is for the Ubuntu installation(this is unallocated)(let this be ubuntu drive partition). Now I am trying to install and the tutorial asks me to make several partition along side it (swap area , efi(because Ubuntu says it needs EFI partition or something) etc.).NOTE these all partitions come from ubuntu drive partition . At this point I still have some unallocated space from ubuntu drive partition. I do every thing, the install is complete and the computer asks me reboot so I reboot it but it doesn't load anything not Ubuntu nor windows. Just a black screen and on top left a statement which says no boot device available. So I go into boot device options and select boot from efi file i select ubuntu, i select BOOT and then the second .efi file by mistake. And miraculously the os boots and i am using ubuntu. But the problem is that windows is not booting so I try to fix it.so I  formatted the main drive partition(thinking i have a backup of all of my imp. Data on imp. Data drive partition) and created a Windows bootable drive.i load the bootable USB of Windows 10. after loading into the part where it asks you to select which disk partition you want to install your windows on it shows me an error(I'll add a photo of that error if that helps). Then I took a break and thought I'll try to fix it after the break . During the break I remember that I forgot to take an important backup from the maindrive partition which is already formatted so after the panic attack I try to look it up on the internet on how to recover lost data.  And they tell me to STOP using my laptop so I shut it down and pray for an answer.  So now I can boot into ubuntu via efi file if that means anything and I have one drive partition with some imp. Files but not all, a formatted main drive partition(which I want to recover data from) and some unallocated space.  Also please try to make the explanations simple.i dont understand much computer.  As a side note this data loss has traumatised me so much that while writing this I was copying after writing each sentence lol.


Why, exactly, can't two field lines cross?

My physics textbook says two electric field lines never intersect. Their explanation runs somewhat like this:     If two field lines crossed, there would be two different directions to the electric field at the intersection point, which is impossible by definition.   A similar explanation is provided as to why two stream lines never cross.   However, mathematically, two intersecting curves can have the same direction of tangent at their intersection point. For example, consider the $x-$axis and the curve $y=x^3$ is the $xy$ plane. Or any two curves of the form $y=x^{2k+1}$ with $k\in\mathbb N$, plotted for $-1<x<1$.  Is the explanation then wrong, considering these counterexamples? If not, why not? If yes, then what's the correct explanation?  Edit: The answers to  seem to focus on the very explanation I am having trouble understanding; I don't see how this is a duplicate of that one. I'd rather describe this as a follow-up question to that one.


after installing different drivers (rtl8812au-dkms from ubuntu apt repo, and driver from https://github.com/gnab/rtl8812au) my usb wifi receiver (802.11n) doesn't work. if i do lsusb i get: ... Bus 003 Device 002: ID 0bda:f179 Realtek Semiconductor Corp. 802.11n ...  no drivers work, so what could i do?


All I want for Christmas is a list of burninated tags

Would it be possible to make the list of blacklisted tags public?  The list would help establish precedence when determining if a tag should be put forward for burnination. This will simplify the task of proposing and evaluating a .  For example, when I  come across a tag I believe shouldn't be used, I  in a hope of finding burninated tags that are similar. If I find something similar, I submit a burnination request; otherwise I simply clean up the tags and move on. Having a definitive list will substantially speed up this process.


Why a long delay after command not found?

Often when I mistype a command such as ls (e.g. I hit ENTER before I type 's') there is a long (~2s) delay after the terminal displays:  bash: l: command not found...   I can understand the reasons for a similar delay after an incorrect password is entered, per . But why delay after an unrecognized command? Does FAIL_DELAY in /etc/login.defs affect this also?


I have somewhere the concepts of left groups (A non empty set with an associative binary operation, a left identity and each element has left inverse) and right groups. I have also studied some basic properties of identities and inverses .  Now I have a question.  Does there exist a left group which is not right group?


Behaviour of new Task with parameters is not the expected one in C#

I am running the following simplified code:  public static void runCode(int num){   Console.WriteLine("Task {0}",num);   for(int j=0;j<10;j++)     Console.Write(num); }  public static void Main(string[] args){   // some operations here   for(int i=0;i<numIterations;i++){     Console.WriteLine("Current number={0}",i);     Task.Run(()=>runCode(i));   }   // remaining code }   The result is the following one:  Current number=0 Current number=1 Current number=2 Current number=3 Task 4 4444444444Task 4 4444444444Task 4 4444444444Task 4 4444444444   Why does the shown number is always the same? Maybe for static?


If I want to make some cool photos with long exposure times but not having a good camera that allows me to define the time, can I get the same result recording a video and make the superposition of its several frames in my computer?


Why is there such a strong preference for 45 degree angles in PCB routing?

I've always wondered this: every single modern PCB is routed at 45 degree angle increments. Why does the industry prefer this so much? Doesn't any-angle routing offer more flexibility?  One plausible theory would be that the existing tools only support 45 degree increments and that there isn't much pressure to move away from this.  But having just researched this topic on google, I stumbled across  - which does away with the 45 degree increments, and according to their marketing materials it does a considerably better job than the 45-degree-limited competitors.  What gives? What would it take for you personally to start routing arbitrary angles? Is it all about support in your favourite software, or are there more fundamental reasons?  Example of non-45-degree routing:   P.S. I also wondered the same about component placement, but it turns out that many pick & place machines are designed such that they can't place at arbitrary angles - which seems fair enough.


I used   % sudo apt-get update  % sudo apt-get install vlc browser-plugin-vlc     I am getting   Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package vlc E: Unable to locate package browser-plugin-vlc


Listings morekeywors is no adding special caracters like ::, + etc

when i use morekeys in the lstdefinestyle it succesfully adds any word but it doesn't work with some characters like +,<, etc. this is the style: \lstdefinestyle{ligth}{ morekeywords = [1]{}, keywordstyle = [1]\color{red}, morekeywords = [2]{otherwise,\_, |, >, ==, :: }, keywordstyle = [2]\color{blue}}  This adds perfectly fine the word otherwise and _ but it doesn't add any of the others: , >,==,:: How can I fix this?? Thanks for your time


Multipartite graphs which are not planar

Please take a look at these definitions:     A multipartite graph is a graph of the form $K_{r_1,\ldots, r_n}$ where   $n > 1$, $r_1, \ldots, r_n\ge 1$, such that         The set of nodes of the graph is the disjoint union of n sets:   $V = V_1   \cup\cdots\cup V_n$, and $|V_i|=r_i$ for all $1\le i\le n$.   The set of nodes of the graph is the set of all possible connections between nodes in that do no belong to the same set $S_i$. Formally:      $$E= \{(x,y)\mid x \in S_i, y \in S_j, i \ne j\}$$         A graph $G$ is planar if and only if every subdivision of $G$ is planar.   A graph $G$ is planar if and only if it contains no subdivision of $K_{3,3}$   or $K_5$.   I need to determine all multipartite graphs that are not planar.


How to integrate $\int_{-\pi/4}^{\pi/4} (\cos(t) + \sqrt{1 + t^2}\cos^3(t)\sin^3(t))\;\mathrm{d}t$.

How do I integrate      $$\int_{-\pi/4}^{\pi/4} (\cos{t} + \sqrt{1 + t^2}\cos^3{(t)}\sin^3{(t)})\;\mathrm{d}t$$   There's no substitution that immediately jumps out at me.


Nikon d5500 troubleshooting blur unsharp at 100%

I am using a Nikon d5500 with Nikor 18-55 br lens. I was able to get some great photos outside during one set of shots. I noticed since then, when I use the zoom magnifying feature on the lcd, all of my photos are not sharp and blurred when I review. Ive taken them into photoshop and at 100% 300 dpi at roughly 10x14" they aren't sharp. I've tried different setting and am reading about user error but is there a way to test the camera with a still shot? I am using vr on and af on the lens, also tried different settings raw, raw +jpg, large, and fine settings.


/tag Regular expression in Python /tag My code below doesn't recognize the pattern

My regular expression in Python below doesn't see the pattern. Can you please tell me what I am doing wrong here?  ================  import re  l = 'rootfs on / type rootfs (rw xyz' m_obj = re.match(r'on / type .*? \(rw', l)  if m_obj:     print "Found!" else:     print "Not found!"   =================  Thanks


Is it possible to exit a C console application without threads at any time by pressing a key?

Let's suppose I'm in a while (1) loop calculating something, would it be possible to quit the whole application by pressing a certain key?  It's a C console application without threads.  I'm pretty sure it's not possible, but I'm a newbie so hey. I can only imagine beeing forced to press a key by some function like _getch() or similar. But then you have to wait until the user presses the key and the calculation cannot run meanwhile.


java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()'

I have a class dedicated to managing sharedpreferences, however I keep getting a NPE on one of my calls. Heres the class,  public class UserManager extends Activity{  Context mContext;  UserManager(Context mContext){     this.mContext = mContext; }   public boolean getFromMatches(String userUid, String matchUid){     SharedPreferences spMatches = mContext.getSharedPreferences(getString(R.string.match_key), Context.MODE_PRIVATE);     if(spMatches.contains(userUid + matchUid)){         return true;     }else{         return false;     } }   }  This is what is passed from my main activity:      @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main_screen);      userManager = new UserManager(getApplicationContext()); }   The NPE is received at this line:  SharedPreferences spMatches = mContext.getSharedPreferences(getString(R.string.match_key), Context.MODE_PRIVATE);


Google-bot sees “Sorry, we have no imagery here” on pages with Google Maps

I have a site with Google Maps on most of the pages. When inspecting content keywords in Google Webmaster tools, content keywords identified by Google-bot for the site include "imagery", "sorry" and "here". These turn out to be part of an error message returned by Google Maps: "Sorry, we have no imagery here". I cannot reproduce this error with normal clients, nor does "fetch as Google" show it. The problem is presumably that Google-bot tries to execute some of the Google Maps Javascript but then shoots itself on the foot and records the error message.  A  shows that this problem is endemic to sites across the internet, including Yelp and many others.  I'd like to convince Google that my site is not about imagery and being sorry, but I'd also like to keep the maps in place. I guess one option would be to transition to , but that's not a great alternative.  There's some , no resolution.


Prove that if $~\sum a_n=A~$ , $~\sum b_n=B~$ , and $~\sum c_n=C$

Let $\{a_n\}$, $\{b_n\}$ be sequences. Define $\displaystyle c_n=\sum_{k=1}^n a_kb_{n+1-k}$. Prove that if $~\sum a_n=A~$ , $~\sum b_n=B~$ , and $~\sum c_n=C~$ (so they are all convergent series) then $C=AB$. (Note that we do not need $\sum a_n$ to be absolutely convergent). Hello everyone. I am stuck on how to start this problem. I don't want the answer, just a hint on how to get started.


How to share internet access between Ubuntu and Windows guests OS in VirtualBox?

Using VirtualBox.  There's two Virtual Machines, Ubuntu 10.04 and Windows 7.  On Ubuntu:  There's two ethernet interfaces.   Bridge interface (eth0) who can access the internet. ping www.google.com works ok. NAT interface (eth1) configured as Internal Network who have ip 10.0.0.101, netmask 255.255.255.0 and gateway 10.0.0.1 who can ping Windows 7 in 10.0.0.102.   On Windows   A interface who have ip 10.0.0.102 and can ping Linux in 10.0.0.101 ok, but can't ping www.google.com.   So, how can I configure Windows to have access to the internet using my Linux machine?


Simple past or past perfect with "by" and years

What is the difference between      He became a star by 1990's.     He had become a star by 1990's.    Is the first sentence correct? If yes, then please tell me the difference between the two.


What is the difference between Swing and AWT?

Can someone please explain me what's the difference between Swing and AWT?  Are there any cases where AWT is more useful/advised to use than swing or vice-versa?


My 'IF' statent doesn't do what I've it expected to do

I'm trying to have user input where user types a letter and then depends on letter 'IF' statement chooses which fields to display.  What I have now if I type 'p' and 'P' or 'F' or 'f' my 'for' statement still don't understand my input and throws me to 'else' statement.  But why not?          Scanner scanner = new Scanner(System.in);          System.out.print("Employee's Last Name: ");         inputName = scanner.next();         System.out.print("Employment Status (F or P): ");         inputStatus = scanner.next();          if (inputStatus == "F" || inputStatus == "f")         {             // some code         }         else if(inputStatus == "P" || inputStatus == "p")         {             // some code         }         else         {             System.out.println("I don't understand...");         }


Can I use independent t-test for my sample?

I want to compare the means of two independent variables, but my problem is the large difference in their sample sizes. One of my variables consists of 560 people and the other only has 29.  So can I use the t-test for independent samples in this case? If not, which test should I use?


number of ways of distributing n chocolates to m friends?

If i  want to distribute n chocolates to m friends considering each friend can  get 0 to n chocolates(unfair distribution is possible), how many ways can i do it?


Area of a triangle in terms of areas of certain subtriangles

In triangle $ABC$ , $X$ and $Y$ are points on sides $AC$ and $BC$ respectively . If $Z$ is on the segment $XY$ such that $\frac{AX}{XC} = \frac{CY}{YB} = \frac{XZ}{ZY}$ , then how to prove that the area of  triangle $ABC$ is given by $[ABC]=([AXZ]  ^{1/3}  + [BYZ]^{1/3})^3.$


Is the definite article 'the' necessary in front of seasons?

The best time to travel is in the autumn.   The best time to travel is in autumn.      Which sentence is correct?


Where is the right place to import libraries in an OOP code

let's say that I have a python file for some task written in OOP.  some classes in my code use libraries such as pandas, csv ...  Is it ok to import these libraries just before the main() function? Technically it works but I'm not sure if this is the right way  class A class B class C   import csv import pandas  def main ():     #pass if __name__ == '__main__': main()


I'm not able to talk in chat, although I've already logged in

I cannot chat with anyone.  I'm able to see all chatrooms but unable to chat. I tried clearing my browser's cache and history but still facing the same problem.  I've tried in multiple browsers, and all I got message like 'you must logged in to talk'     And I am getting the same message in the various browsers I've tried:   Firefox 26.0 Safari 6.0.2 (8536.26.17) Google Chrome Version 32.0.1700.107)


Going through solutions of IMO'09. Bumped into a without-loss-of-generality assumption that I can't comprehend.  Here's the statement of the problem:  Let $a,b,c$ be positive real numbers such that $\frac{1}{a}+\frac{1}{b}+\frac{1}{c}=a+b+c$. Prove that $$ \frac{1}{(2a+b+c)^2}+\frac{1}{(2b+c+a)^2}+\frac{1}{(2c+a+b)^2}\leq\frac{3}{16}. $$  Here's how they start in the solution:  We prove the homogenized inequality $$ \frac{(a+b+c)^2}{(2a+b+c)^2}+\frac{(a+b+c)^2}{(2b+c+a)^2}+\frac{(a+b+c)^2}{(2c+a+b)^2}\leq\frac{3}{16}(a+b+c)\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right) $$ for all positive real numbers $a,b,c$. Without loss of generality we choose $a+b+c=1$. Thus, the problem is equivalent to prove for all $a,b,c>0$, fulfilling this condition, the inequality $$ \frac{1}{(1+a)^2}+\frac{1}{(1+b)^2}+\frac{1}{(1+c)^2}\leq\frac{3}{16}\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right). $$ And so on... If someone's interested in the rest, it's problem A2, solution 2 in this pdf:   Why is there no loss of generality in such a choice of $a,b,c$?


User revenge? All my questions were downvoted in the past hour

I asked this question on meta about 2 hours ago:  Since then it seems almost every one of my questions was downvoted once after the @ErrorErrorError user complained about it on chat. Here is a link to my rep:  Can these votes please be reversed because downvotes on questions dont cost anything to downvoter....  chat links:   -- also according to that user he ignores me on chat now, so he will not respond.  Please see here for a summary of who and why someone multi-upvoted me accidentally:   ALSO This user in question just got 2, count 'em 2, badges for all the downvoting he did. Can those be rescinded?


How to get apt after I accidentally uninstalled it

Is it possible to use dpkg to install apt? It was uninstalled accidentally. If not, how can I get apt without reinstalling Ubuntu?  Edit: The following is what I get when I try to install apt with dpkg...  root@ben-HP-ENVY-dv4-Notebook-PC:/home/ben/Downloads# sudo dpkg -i apt.deb(Reading   database ... 285851 files and directories currently installed.) Preparing to replace apt 0.9.7.9+deb7u1 (using apt.deb) ... Unpacking replacement apt ... Setting up apt (0.9.7.9+deb7u1) ... gpg: key B98321F9: "Squeeze Stable Release Key <debian-release@lists.debian.org>" not changed gpg: key 473041FA: "Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>" not changed gpg: key 65FFB764: "Wheezy Stable Release Key <debian-release@lists.debian.org>" not changed gpg: key 46925553: "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>" not changed gpg: Total number processed: 4 gpg:              unchanged: 4 Processing triggers for man-db ...


A question from Topics in algebra-IN Herstein.

Prove that if a abelian group has elements of order $m$ and $n$ then it has a subgroup of order equals to $lcm[m,n]$.  I am new to group theory so please explain....


QGIS v2. Convert longitude/latitude to UTM projection-Zone 51J - Southern hemisphere

Could somebody please let me know in QGIS version 2.0.1 How do I convert Longitude/latitude default setting to UTM projection. I am bringing in waypoints from a GPS device which is set to the above specifications ie UTM projection/Zone 51J/Southern Hemisphere BUT when I bring the waypoints into QGIS version 2.0.1 it displays  files as longitude/latitude. Can I change settings somewhere???


Is there a value of the function $g$ that is greater than the length of the interval?

I need to prove or disprove the following:  Suppose that $g$ is a positive real valued function of a real number. If $a < b$ are real numbers, then there is a finite sequence $a = t_0 < t_1 \dots < t_n = b$ of real numbers such that in each interval $[t_k,t_{k+1}]$ there is a point where the value of the function $g$ is greater than the length of the interval.   With out the assumption of continuity, I'm not sure how to proceed. Any advice?


The background layer is locked by default. When I unlock it, PS creates a new layer layer0 and deletes the background layer.   Is this a bad thing to do. Does the background layer have any special significance or properties that it shouldn't be deleted/replaced? Should I instead copy of the contents of the background to another layer and leave the background layer alone?   I noticed that when I open an image, PS automatically puts the image on the background layer. How do you handle opened images before working on them.


How to automatically input ssh key password?

We have the base64 encoded SSH key password (so not a user account password!).   We have to keep an SSH tunnel opened to a place.   But sometimes the connection is bad and the SSH session terminates.   When we start the SSH tunnel, the SSH private key is encrypted with a password, thus requiring a human to input the pw.   We know that it is just obscurity to have the private ssh key password in a file, but it helps :)  Question: How can we automate the pw input when we open the tunnel? Maybe "expect" can help?


A ghost process started automatically and drains CPU

I am running an Ubuntu virtual machine that has few sites installed on it. I think due to my error and wrong permissions a malicious code was uploaded on the server and the "worm" had root access for a while before I delete it. Now all looks fine apart of one thing, there is a process that gets started automatically called named and that process uses 100% of my CPU. I checked it in TOP and the path of the process is ./named -c named.conf which is relative to something not sure what. Second thing I tried was to get the PID and I checked /proc/[PID]/exe and it point to non-existent file in root: /root/named/named I presume because there is no file at this path it gives constant error and gets in some kind of loop.   Now I can stop the process which is fine but I can't find who or where is the process started. I am afraid there are still some files left behind that I didn't clear.   Can anyone help investigating this issue or give some tips on where to look for the malicious code or is there a way to block the process from starting completely on the server?


$4$ letter words taken from the letters of CONCENTRATIONS

How many words with or without meaning can be made from the letters of the word CONCENTRATIONS by taking $4$ letters at a time?  There are  $14$ letters total present in the word. $4$ letters can be picked in $14\choose 4$ ways. $4$ letters can be arranged in $4!$ ways. So ideally answer has to be ${14\choose 4} * 4!$. But I know this answer is wrong because some letters are repeating. How do I solve this then? I appreciate any help.


I am required to embed fonts in my document, in order to ensure the printing of my thesis goes well. The recommendation is to include \usepackage{lmodern}. Unfortunately, my document uses bold small caps, which renders as bold lower case when I use lmodern.  (The thesis should look similar to the default template. Thus I can not use a completely different font)  (I currently use \usepackage[T1]{fontenc}, although I do not know if that is relevant)  How can I embed bold small caps?  MWE (removing \usepackage{lmodern} causes desired output):  \documentclass[pdftex,10pt,b5paper,twoside]{book} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}  \usepackage{lmodern} \usepackage[]{glossaries} \makeglossaries \newacronym{sqp}{\textsc{sqp}}{sequential quadratic programming} \newacronym{doe}{\textsc{d}o\textsc{e}}{design of experiments}  \begin{document} \printglossary[type=\acronymtype, title=Acronyms ]  \section{Demo} In text ok: \acrshort{doe} and \acrshort{sqp} \end{document}   Edit: I included lmodern to ensure embedded fonts.  This broke bold small caps. When I removed lmodern, and checked if the fonts are embedded, this was the case.  Thus I do not need the package, and I think my problem is solved.


Applying for two position at the same department

There are two advertised positions at one department. The department is approx. 30 people. So it is not a large institution where my two applications would be "lost". I am sure if I apply for both positions it will end up at the same people/commitee. Both position are for scientific staff, not for postdoc. The two positions are quite similar but there are some differences. I think I match one position more than the second one. Should I apply only to one position or can I apply for both? The application has to be done through online submission system, i.e. it is not possible just write to the cover letter that I am eventually interested in both positions.


Hundred or hundreds (for unit-less numbers)?

Which is correct?  The molecular weight of this substance ranges from   two hundred to two hundred and sixty. two hundreds to two hundred and sixty.   I need to spell the numbers out for some reasons and I'm stuck.  Thank you for your help!


Wrong direction of vertices in tikz-feynman remains under macOS, using PGF 3.1 and luatex 1.07

This question is originally from the discussion under github issue .  The similar problems raised by questions   , and    are now nicely solved with the newly updated PGF 3.1, using either luatex 1.07 or 1.09 under Linux (see ) and Windows (verified by my friend). This is why the current question is tagged duplicate.  But, as stated in  and the following one, the problem (will explain latter) remains under macOS, even with PGF 3.1.  The problem fixes if I use   LuaTeX 1.09, or LuaTeX 1.07 by luatex53 --fmt=lualatex main.tex.   Hence, so far as I know, the problem only remains with macOS, LuaTeX 1.07 (Lua 5.2.4).    A full example  \documentclass{article} \usepackage[compat=1.1.0]{tikz-feynman}  \begin{document} \begin{tikzpicture}   \begin{feynman}     \diagram [vertical'=a to b] {       i1 [particle=\(e^{-}\)]          -- [fermion] a          -- [draw=none] f1 [particle=\(e^{+}\)],       a -- [photon, edge label'=\(p\)] b,       i2 [particle=\(e^{+}\)]          -- [anti fermion] b          -- [draw=none] f2 [particle=\(e^{-}\)],     };     \diagram* {       (a) -- [fermion] (f2),       (b) -- [anti fermion] (f1),     };   \end{feynman} \end{tikzpicture} \end{document}   The comparison of outputs    Version info:   - TeX Live 2018 on macOS 10.14.2  - LuaTeX 1.07.0  - LaTeX2e 2018-12-01   *File List*  article.cls    2018/09/03 v1.4i Standard LaTeX document class   size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option) tikz-feynman.sty    2016/02/05v1.1.0Feynman diagrams with TikZ     tikz.sty    2019/01/05 v3.1 (3.1)      pgf.sty    2019/01/05 v3.1 (3.1)   pgfrcs.sty    2019/01/05 v3.1 (3.1) everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)   pgfrcs.code.tex  pgfcore.sty    2019/01/05 v3.1 (3.1) graphicx.sty    2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) graphics.sty    2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)     trig.sty    2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg    2016/06/04 v1.11 sample graphics configuration   luatex.def    2018/01/08 v1.0l Graphics/color driver for luatex   pgfsys.sty    2019/01/05 v3.1 (3.1)   pgfsys.code.tex pgfsyssoftpath.code.tex    2019/01/05 v3.1 (3.1) pgfsysprotocol.code.tex    2019/01/05 v3.1 (3.1)   xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)    color.cfg    2016/01/02 v1.6 sample color configuration  pgfcore.code.tex pgfcomp-version-0-65.sty    2019/01/05 v3.1 (3.1) pgfcomp-version-1-18.sty    2019/01/05 v3.1 (3.1)   pgffor.sty    2019/01/05 v3.1 (3.1)  pgfkeys.sty      pgfkeys.code.tex  pgfmath.sty      pgfmath.code.tex   pgffor.code.tex     tikz.code.tex ifluatex.sty    2016/05/16 v1.4 Provides the ifluatex switch (HO)  pgfopts.sty    2014/07/10 v2.1a LaTeX package options with pgfkeys supp-pdf.mkii epstopdf-base.sty    2016/05/15 v2.6 Base part for package epstopdf infwarerr.sty    2016/05/16 v1.4 Providing info/warning/error messages (HO)   grfext.sty    2016/05/16 v1.2 Manage graphics extensions (HO) kvdefinekeys.sty    2016/05/16 v1.4 Define keys (HO)  ltxcmds.sty    2016/05/16 v1.23 LaTeX kernel commands for general use (HO) kvoptions.sty    2016/05/16 v3.12 Key value format for package options (HO) kvsetkeys.sty    2016/05/16 v1.17 Key value parser (HO) etexcmds.sty    2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO) pdftexcmds.sty    2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)    ifpdf.sty    2018/09/07 v3.3 Provides the ifpdf switch epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live  ***********


Is RAM completely cleared when you turn off computer after pulling power?

Would there by some way to pull the power instead of conventional shut down, and recover the contents of ram without loading the operating system upon the next start-up? I'm trying to recover files open on an unresponsive Ubuntu live cd.  Update:  I read the paper suggested by Alex and I think that's probably my best bet. Like Dan D said, you don't need liquid nitrogen, the paper itself suggests dust cleaner fluid in those cans to lower the temperature. I'll give it a try and post the results here. If anyone has any suggestions, please let me know.  From what I gathered from the paper, I lower the RAM's temperature to around -50 degrees before cutting power, cut power, boot a modified program supplied by the paper's authors from a USB stick, which then dumps the RAM's contents to the USB.


Difference between funct1: function versus funct1 function ()

I often see code like the following in JavaScript:  func1: function() {       return array1.pop();     }   What is the difference between the above and something like this:  function func1 (){          return array1.pop(); }   Are the above two the same thing with different way of writing? The first one looks like a switch statement to me. Sorry if this question is too simple but JavaScript books seldom uses the first syntax if this is just the matter of syntax issue; the main reason for me to ask this question in StackOverflow.


For a complex function $f(z)$ which continuous in $\overline{D}$ and holomorphic in $D$, can the zeros of $f$ on $\partial D$ have limit point?

As title goes, one knows that for a holomorphism $f(z)$, zeros of $f(z)$ cannot have limit point unless $f(z)$ vanishes everywhere. But I am confused at the behaviors of holomorphism at boundary. My question is      Let $\mathbb{D}=\{z\in \mathbb{C}: |z|<1\}$ to be the unit disc. If $f: \mathbb{D}\to \mathbb{C}$ is continuous in $\overline{\mathbb{D}}$ and holomorphic inside $\mathbb{D}$. Can the zeros of $f$ in $\partial \mathbb{Z}$, $Z_0=\{z\in \partial\mathbb{D}: f(z)=0\}$, have limit point for nonzero $f$?    Here are some remark on it.    Firstly, if $Z_0$ is the complete unit circle, then by maximal module principle, $f$ equals to zero inside $\mathbb{D}$.  And, if $Z_0$ consists a piece of arc of unit circle, then $f$ vanishes everywhere. Since one can take $F=\prod_n f(\mathrm{e}^{i\theta_n}z)$ for some suitable $\theta_n$ such that $F$ vanishes all over the unit circle.  Note that given a boundary value of $f(z)$, then by Cauchy's formula, $f(z)$ is given by  $$f(z)=\frac{1}{2\pi i}\int_{C} \frac{f(\zeta)\textrm{d}\zeta}{\zeta-z}$$ Naive thought is to give a continuous function at boundary whose zeros have limit point. But there are two problems, firstly, the integral may fails to be continuous at boundary; secondly, the function should at least satisfy $\int_C f(\zeta)\textrm{d}\zeta=0$, so not all continuous functions can derive a holomorphism from this method.  Poisson's integral determines $f(z)$ by the real part of boundary value of $f(z)$, which may not help in this problem.    Even more, I am confused that      What is the condition of a function on unit circle being the boundary value of some holomorphism?    Of course, it is essentially a PDE problem.


Is there any English word in which "ph" is not pronounced as "f"?

A few days ago, a friend and I were discussing how every "rule" of English spelling or pronunciation has an exception, and every exception has an exception as well. Then I brought up the rule of a ph cluster equaling an f sound (as in phonetic, elephant, morph, etc.) as a pronunciation rule that didn't have any exceptions I could think of. Is this a true hard-and-fast rule or does it have some exceptions as well? I'm not counting abbreviations such as pH scale.


Quick way to open terminal in current folder in nautilus?

I use the nautilus-open-terminal package. Before upgrading from 13.10 to 14.04, nautilus used to have a settings button on the top right panal where you can click something like "open in terminal " to open the terminal here. After upgrading to 14.04, the settings icon is gone and I have to return to the parent folder and right click on the folder to open terminal here. (Because in list view the folder might have many files so that there is no white space I can right click to show the "Open in terminal" menu.)  The solution mentioned here:  doesn' t seem to work for me.


A vessel (preferably circular) filled with water is accelerating unidirectionally such that the level of water is higher on one end than the other. What I want to know is that if the vessel is immediately stopped, the water level will force itself back to the equilibrium point, but in doing so push the other end up. If water is an ideal fluid, what type of oscillation will occur in this situation.   I can tell that maybe the mathematical expression for this oscillation will be complex, but please do let me know if I am thinking this correctly.   I am considering, finding the oscillation equation for infinitesimally small u-tubes(considering a 2-d plane) and integrating it to get the final expression.  Thanks in advance


server {   listen 80;     server_name *.bitmitigate.com bitmitigate.com;      location /.well-known/acme-challenge {         proxy_pass          proxy_set_header Host $host;         proxy_set_header X-Real-IP $remote_addr;         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;         proxy_set_header X-Forwarded-Proto $scheme;   }   location / {     return 302 https://bitmitigate.com;   } }   Essentially I want it to return 302 if it isn't matching that location, but for some reason it isn't working and always returns a 302


Hi want to install apache in my virtual box ubuntu but when I try to download apache it shows to me the same error.


so the exercise goes:  Let $E, F$ and $G$ be given sets and let the functions $f: E \to F$ and $g: F \to  G$ be given. Consider the claim:  if $f$ is surjective and $g$ is surjective  $\implies g\circ f$ is surjective.  The claim is either true or false. If it is true, prove it. If it is false, give example of 3 sets of $E,F,G$ and two functions $f,g$ where the fuctions $f:E\to F$ and $g: F\to G$ are surjective but $g\circ f$ isn't surjective.  How should I think about all of this? We've had so few tasks in our course on this subject


The question is from the "Introduction to Algorithm" 3rd edition:  B-2 Friendly graphs: Reword the following statements as a theorem about undirected graphs, and then prove it. Assume that friendship is symmetric but not reflexive.   Any group of people can be partitioned into two subgroups such that at least half the friends of each person belong to the subgroup of which that person is not a member.


I'm a member of Code Review; we have a very (star-happy) chat room called . It's not uncommon to want to make a reply to a message on the starwall and start a conversation based off of that message.  There's no option to reply to something on the starwall by using the drop-down menu for each message; you only have the ability to create a permalink, flag, star/unstar or view history of the comment, so in order to reply to a comment currently you have to hover over the timestamp (which has a link to the original comment) and copy the original ID into chat by hand.  Could an item be added to the dropdown menu that allows you to quickly reply to that specific comment? All I would expect it to do is just populate the chat box with :messageId (where messageId is the Id of the message you're replying to).


Integrating $\frac{1}{1+z^3}$ over a wedge to compute $\int_0^\infty \frac{dx}{1+x^3}$.

Compute $\displaystyle\int_0^\infty \frac{dx}{1+x^3}$ by integrating $\dfrac{1}{1+z^3}$ over the contour $\gamma$ (defined below) and letting $R\rightarrow \infty$. The contour is $\gamma=\gamma_1+\gamma_2+\gamma_3$ where $\gamma_1(t)=t$ for $0\leq t \leq R$, $\gamma_2(t)=Re^{i\frac{2\pi}{3}t}$ for $0\leq t \leq 1$, and $\gamma_3(t)=(1-t)Re^{i\frac{2\pi}{3}}$ for $0\leq t \leq 1$.  So, the contour is a wedge, and by letting $R\rightarrow \infty$ we're integrating over one third of the complex plane.  I believe this means we are integrating over the entire complex plane under the substitution $u=x^3$.  There are poles at $-\zeta$ for each third root of unity $\zeta$, so there's only one pole in this wedge.  I'll just refer to that pole as $-\zeta$. I guess this means that we can use the residue theorem to say $$\int_{\gamma}\frac{1}{1+z^3}dz=2\pi i\eta(\gamma,-\zeta)\operatorname{Res}\left(\frac{1}{1+z^3},-\zeta\right)=2\pi i \lim_{z\rightarrow -\zeta}\left[(z+\zeta)\frac{1}{1+z^3}\right]$$ I can't evaluate this limit.  Also I don't see how it involves $R$, which I'm supposed to be taking a limit of. I suspect I've done something wrong.  What's the problem? How do I proceed?  Also, after I do properly evaluate this integral, I am assuming that its value is supposed to be $\displaystyle\int_0^\infty\frac{dx}{1+x^3}$.  Why? (I think I know why conceptually but I need to see how one rigorously writes that out.) (Note: This is exam review, not homework.)


Deterministic encryption for a limited space: using HMAC as IV

I need a deterministic encryption scheme. Objectives:   Same plaintext is always encrypted to the same ciphertext. Related plaintexts are encrypted to unrelated ciphertexts. (For example, attacker that knows two ciphertexts cannot learn whether corresponsing plaintexts start with the same prefix.) Minimum space overhead. Authenticated encryption, of course.   There are also some conditions that can make it easier:   I will encrypt small chunks of data (few dozens of bytes). It is OK to store them in RAM and then start the encryption. The data will be padded to the same length all the time. So, we can conclude that the length of the data is some constant. Not high performance requirements.   My first idea was to derive IV from plaintext using HMAC and then use some authenticated encryption that requires just unique (potentially predicable) IV, like AES-GCM. This requires both IV and authentication tag to be stored alongside the encryption.  But I have an idea how to reduce the space overhead even more: Use (H)MAC of plaintext as both IV and authentication of the message. I know this is generally dangerous scheme close to encrypt-and-mac, so I specify further requirements for primitives to mitigate its risks:   The encryption will not leak anything when decrypting attacker-manipulated data. Stream ciphers like AES-CTR look suitable here, because there are no risks related to padding oracle. It just “decrypts” any attacker-provided garbage to another garbage (rejected by MAC check later) without any side channel if the AES-CTR implementation is correct. The encryption requires just unique IV, but it does not have any other requirements. Thill, AES-CTR looks suitable here. The MAC does not leak any data. HMAC (potentially truncated to 128b) looks suitable there, because failing to do so would at least weaken preimage resistance of the underlying hash function. Encryption uses a key completely unrelated to authentication key, of course. (This requirement might not be strictly needed when using, say, AES-CTR with HMAC-SHA256. However the requirement makes reasoning about security easier.)   The whole schema looks somewhat exotic to me, but I believe that I have resolved risks arising from the unusual design.  Is there any existing work that aims to do the same? Is there any research that would tell me anything about security of this scheme?


I use the chocolate chip recipe on the bag but double the vanilla and add more chips than called for. I also add a bit more flour.   What I want to achieve is that old time chocolate chip cookie that is chewy flat and wide.  Can you offer a suggestion.  I still would use more chips and vanilla unless that might cause a problem. I am so glad I came apon your sight.


Why do I need to check updates after adding a ppa

Is there a way to avoid this step a check only the newly added ppa?


When does the community protect the question?

I didn't find any help related to this topic. How does the community protect a question? What is the logic behind that? Here is an example question:     protected by Community♦ 58 mins ago      This question is protected to prevent "thanks!", "me too!", or spam   answers by new users. To answer it, you must have earned at least 10   reputation on this site.


-bash export message when opening terminal on mac

I'm having the following message whenever I open my terminal on mac OS Mojave:  Last login: Sun Sep 22 20:35:33 on ttys000 -bash: export: =': not a valid identifier -bash: export:/Users/MYNAME/.local/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/MYNAME/anaconda3/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin': not a valid identifier  How do I get rid of it?


The image of a polynomial curve $p:F\to F^2$ lies in the zero set of another polynomial $q:F^2\to F$

Suppose $\mathbb{F}$ is an infinite field. Define $p:\mathbb{F}\to\mathbb{F}^2$   as $p(t)=(p_1(t),p_2(t))$ where $p_1,p_2:\mathbb{F}\to\mathbb{F}$ are   polynomials.   Show that the image of $p$ lies in the zero set of some polynomial   $q:\mathbb{F}^2\to\mathbb{F}$.      (Bonus) Give a lower bound to the degree of $q$.   Any polynomial $q:\mathbb{F}^2\to\mathbb{F}$ of degree $D$ looks like $$q(x,y)=\sum_{0\leq i+j\leq D}c_{ij}x^iy^j\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(1)$$ where $c_{ij}\in\mathbb{F}$. Now finding $q$ is solving the equation $$q(p(t))=q(p_1(t),p_2(t))=0.(2)$$ Plugging (1) in (2) we will have the equation $$\sum_{0\leq i+j\leq D}c_{ij}p_1(t)^ip_2(t)^j=0,\;\;\text{ for all }t\in\mathbb{F}.$$  Since this is true for all $t\in\mathbb{F}$ and the field is infinite, we can choose $t_1,t_2,\ldots,t_{N=\frac{(D+1)(D+2)}{2}}$ values for $t$ from $\mathbb{F}$ so that we get a system \begin{cases} \sum_{0\leq i+j\leq D}c_{ij}p_1(t_1)^ip_2(t_1)^j=0\\ \vdots\\ \sum_{0\leq i+j\leq D}c_{ij}p_1(t_N)^ip_2(t_N)^j=0 \end{cases}  So now we want to show that there exists those $t_1,t_2,\ldots,t_N$ that make this system not invertible. How to do that?


If $ \alpha_1,\alpha_n, ....\alpha_n $ be the roots of the equation $x^n+1=0$, then  $(1-\alpha_1)(1-\alpha_2)...(1-\alpha_n)$ is equal to  a) 1.  b) 0 c)n d)2  when I put n=3,and directly evalutae the value of $(1-\alpha_1)(1-\alpha_2)...(1-\alpha_n)$ I find no option matching to my answer.    I know the answer is 2. i've seen the solution here .   but, if we put n=3 , $x^3+1$ has roots -1 , and $\frac{1}{2} \pm \frac{3i}{2}$ then if we put that in the expression $(1-\alpha_1)(1-\alpha_2)...(1-\alpha_n)$  , it doesn't give  2. what mistake am i doing ?


If I take a loss when I sell my car, can I claim a capital loss deduction on my income tax return?

If I sell my car off at a loss, can I write that loss off against my income to save on tax? Does it matter if the car was used just for personal leisure use, or if I used the car to generate business income? (e.g. travel to work, to attend education seminars, etc.)


It is often the case that other people greet me with "What's up?" and I don't know how to answer, so I usually say "hello" or "hi". It's embarrassing...  As a person whose first language is not English, I am not really sure "What's up" means. Does it mean "what are you doing", or "hello"? How should I answer "What's up"?  Thanks!


When I run a search (as this one ) and then I click on a tag, I have always Page Not Found.  Is it ok?


I have an asp.net mvc application, and I'd like to send an email :   MailMessage mailMessage = new MailMessage();             var smtpClient = new  SmtpClient();             {                 smtpClient.Host = "smtp.gmail.com";                 smtpClient.Port = 587;                 smtpClient.EnableSsl = true;                 smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;                 smtpClient.Credentials = new NetworkCredential("myemail@gmail.com", "password");                 smtpClient.Timeout = 20000;             }             mailMessage.To.Add(model.Email);             mailMessage.From = new MailAddress("support@team.com");             mailMessage.Subject = "Modification de mot de passe";             mailMessage.Body = "Vous avez modifié votre mot de passe de votre Compte ";             mailMessage.Body += Environment.NewLine;             mailMessage.Body += "le nouveau mot de passe est : ";             mailMessage.Body += newPassword;              smtpClient.Send(mailMessage);    I get this exception :     La réponse du serveur était : 5.5.1 Authentication Required.    in last line of code.  I need to know what is the reason of this problem? How can I resolve it?


If I get an  USA -J1 visa on my Indian passport and after that I decide to apply for the new passport (due to insufficient pages), is J1 visa in my old passport is valid ??


Calculate Rotation Matrix to align Vector A to Vector B in 3d?

I have one triangle in 3d space that I am tracking in a simulation. Between time steps I have the the previous normal of the triangle and the current normal of the triangle along with both the current and previous 3d vertex positions of the triangles.  Using the normals of the triangular plane I would like to determine a rotation matrix that would align the normals of the triangles thereby setting the two triangles parallel to each other. I would then like to use a translation matrix to map the previous onto the current, however this is not my main concern right now.   I have found this website  that says I must    determine the cross product of these two vectors (to determine a rotation axis) determine the dot product ( to find rotation angle) build quaternion (not sure what this means) the transformation matrix is the quaternion as a 3 by 3 ( not sure)   Any help on how I can solve this problem would be appreciated.


The best way of creating .CSV files in java

I need to create MAX file for using it in Xerox FreeFlow Process Manager. Most of the data is static, and is just poped out of the mssql database. (And it has nothing to do with Excel.) What is better in this situation to use? some tools like CSVReader/CSVWriter? Or is it more useful to handle it with the Apache Velocity?


Is it possible to move an Animal Crossing: New Leaf save onto a different game card?

I rent (and still have) Animal Crossing: New Leaf. Since I might buy it later, and I have gotten pretty far into the game, is there a way for me to keep the save so when I buy the game later I can use the same save?


Why is my object appearing as a series of incomplete lines in the 3D view?

So I was just modeling a Pokeball to upload to Deviant Art for fun. And as soon as I left the live preview in object mode as seen here(Picture 1),   I went to start adjusting the camera only to be greeted with this(Picture 2).  The mesh is still fine in edit mode. I am just wondering what it is and why Blender is replacing the spheres with what would belong to a science fiction game.   Thanks in advance :)


I'm looking at stdint.h and given that it has uint16_t and uint_fast16_t, what is the use for uint_least16_t what might you want that couldn't be done equally well with one of the other two?


Simplest example of a free module that has bases of different sizes

I'm trying to find a simple and easy to understand example of a free module that has bases of differing sizes. We were told about the existence of them in class but no example was given.


I wrote this piece of code of simple if statement and the out put is not it should be it gives   What is your Gender? male male The user did not answer the Question.  strong text public static void main(String args[]) {      Scanner userInput = new Scanner(System.in);     System.out.println("What is your Gender?");     String gender = userInput.nextLine();      System.out.println(gender);      if (gender == "Male" || gender == "male") {         System.out.println("Go to Room M1.");     } else if (gender == "Female" || gender == "female") {         System.out.println("Go to Room F1.");     } else {         System.out.println("The user did not answer the Question.");     }      userInput.close(); }


What is plex? "plex is missing" replacing disk in a mirror

A similar question exist which the author himself has answered by actually giving in on the question and it relates to Windows 8. I found an answer but it is for Windows 2016 Server which might be different.  I have created a mirror on Windows 2016 Server running as a VM (Oracle Virtual Box).  To test it I replaced one of my virtual disk with a new one after power down. After boot I have strangely 3 disks in concern.   One disk from the mirror.  Disk 1 status: Failed Redundancy, online The new unformatted disk which is supposed to be part of the mirror. Disk 2 dynamic status : online A missing disk   I tried to select the missing disk an choose "Resynchronize mirror" Nothing happened, then I tried "Reactivate volume" and I got "plex is missing"  What is plex and how do I rebuild my mirror?


What is the shortest way to remove file extension? this is what I have tried:  file = "/home/usr/my_file.xml" file = File.basename(file) file.slice! File.extname(file)   #=> my_file


How do I add a prefix before all the data items that are in column B?

In column B I have contact number. I want to add a country code to all of them.  For example, if the number is 123456, I want it to become 88123456.    Each number is in 1 row, and there are about a thousand of them, so I want an automatic way to do this that allows me to add the country code to each of them without a space.


Do we still need HMAC now that SHA3 is here?

In  from Koblitz and Menezes, they state that HMAC came along because doing h(secret || message) was vulnerable to length extension attacks. But as far as I know, these kind of attacks only exist because of the Merkle-Damgard construction.  Now that we have SHA-3, that does not use such a construction, and that is not vulnerable to length extension attacks. Do we need to use the complicated HMAC-SHA3 or can we just use SHA3 as a MAC?


Local vs. global variables in javascript

I'm very new to coding and i'm trying to understand the difference between local and global variables. I was trying to create an image gallery where you could switch image by pressing buttons. I got it to work by putting the image variables inside the functions as a local variables. But if i put it outside of the function as one, global variable it wouldn't work. Why is that?  Here is my html:  <button onclick="previous_image();"></button> <img src="image1.jpg" alt="Image gallery" id="image"/> <button onclick="next_image();"></button>   Here is my Javascript when i got it to work:  var image_tracker = "a";  function previous_image(){     var image = document.getElementById("image");     switch(image_tracker){         case("a"):              image.src = "image3.jpg";             image_tracker = "c";                 break;          case("c"):              image.src = "image2.jpg";             image_tracker = "b";                 break;          case("b"):              image.src = "image1.jpg";             image_tracker = "a";                 break;     }  }  function next(){     var image = document.getElementById("image");     switch(image_tracker){         case("a"):              image.src = "image2.jpg";             image_tracker = "b";                 break;          case("b"):              image.src = "image3.jpg";             image_tracker = "c";                 break;          case("c"):              image.src = "image1.jpg";             image_tracker = "a";                 break;     }  }   Here is my javascript when it didn't work:  var image_tracker = "a"; var image = document.getElementById("image");   function previous_image(){     switch(image_tracker){         case("a"):              image.src = "image3.jpg";             image_tracker = "c";                 break;          case("c"):              image.src = "image2.jpg";             image_tracker = "b";                 break;          case("b"):              image.src = "image1.jpg";             image_tracker = "a";                 break;     }  }  function next(){     switch(image_tracker){         case("a"):              image.src = "image2.jpg";             image_tracker = "b";                 break;          case("b"):              image.src = "image3.jpg";             image_tracker = "c";                 break;          case("c"):              image.src = "image1.jpg";             image_tracker = "a";                 break;     }  }


Transverse Manifolds. Intersection is a Manifold again.

Suppose we have two manifolds $A,B$ in $\mathbb{R}^n$. I heard that the intersection $A\cap B$ is again a manifold in $\mathbb{R}^n$ if $A$ and $B$ intersect transversally in any point of the intersection (i.e the the tangent spaces fulfill $T_A(x)+T_B(x)=\mathbb{R}^n$ for any $x\in A\cap B$)  Moreover, for the tangent space, we have $T_{A\cap B}(x)=T_A(x)\cap T_B(x)$.  Do you know any references for these results or do you know how to prove them?


Inserting newlines in Rectangle Text elements via ArcPy causes overlap?

I ran across an issue the other day when I tried to use ArcPy's mapping module to edit rectangle text elements with newlines (\n) in an ArcMap document.  Here's what the output looked like:    Here's the code I used to generate that output.  The first column are rectangle text elements Text1, Text2, Text3 going down; the second column are "plain" text elements Text4, Text5, and Text6 going down.  import os import arcpy  HomeDir = r"C:\Desktop" arcpy.env.workspace = HomeDir  CurrentMXD = arcpy.mapping.MapDocument(r"C:\Desktop\TextTest.mxd") OutputFilename = r"C:\Desktop\TextTest.pdf" if os.path.exists(OutputFilename):     os.remove(OutputFilename)  for TextElement in arcpy.mapping.ListLayoutElements(CurrentMXD, "TEXT_ELEMENT"):     TextElementName = TextElement.name      String1 = "The quick brown fox jumped over the lazy dog.\nShe sells sea shells by the sea shore."     String2 = "The quick brown fox \njumped over the lazy dog.\nShe sells sea shells by the sea shore."     String3 = "The quick brown fox jumped \nover the lazy dog.\nShe sells sea shells by the sea shore."      if TextElementName == "Text1":         TextElement.text = String1     if TextElementName == "Text2":         TextElement.text = String2      if TextElementName == "Text3":         TextElement.text = String3     if TextElementName == "Text4":         TextElement.text = String1     if TextElementName == "Text5":         TextElement.text = String2     if TextElementName == "Text6":         TextElement.text = String3  arcpy.mapping.ExportToPDF(CurrentMXD, OutputFilename)   So far, it looks like the presence of the messed up text depends on whether the line is longer enough to wrap, and whether the line before the newline is longer than the line after the newline.  Any ideas about what could be going wrong?  Is there a workaround?  I could use plain text elements and worry about wrapping lines using Python, but I'm hoping I can figure something out.


udev working with SYMLINK but not with NAME

Problem:  I'm writing persistent naming rules for a USB dongle following the tutorial . The rule works as expected for :  SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="custom/ttyUSB-ZStick-5G"   This creates a symlink to the original device file /dev/ttyACM0.  $ ls -la /dev/custom/ttyUSB-ZStick-5G  lrwxrwxrwx 1 root root 10 Mar 16 12:48 /dev/custom/ttyUSB-ZStick-5G -> ../ttyACM0   However, I need to have /dev/custom/ttyUSB-ZStick-5G as a real device file not a symlink. To do that I've tried:  SUBSYSTEM=="tty", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", NAME="custom/ttyUSB-ZStick-5G"   But this hasn't produced the correct result.   Reasearch and reference  Reading man udev I can't conclude if this is possible:     The following keys can get values assigned:      NAME      The name to use for a network interface. The name of a device node    cannot be changed by udev, only additional symlinks can be created.   First it stats that it can be assigned but disproves that in the next sentence.  Also, I've seen  claiming that it's possible:   KERNEL=="hdb", NAME="my_spare_disk"       The above rule says: match a device which was named by the kernel as   hdb, and instead of calling it hdb, name the device node as   my_spare_disk. The device node appears at /dev/my_spare_disk.   Question:  Is it possible to have a custom device file name (not symlink) with a udev rule?


How much time did straw hat pirate need to travel to the next island?

In Anime/Manga One piece, when straw hat pirate had finished explore the entire island ( or beat the bad guys ), straw hat pirate will continue their journey to the next adventure ( a.k.a next island ). They travel around grand line using Going Merry soon will be replaced with Thousand sunny. The manga/anime never mention how long they have been in sea ( cause using a boat to travel in sea would be take a month maybe a year ). In anime/manga it's like the distance between previous island and the next island only take an hours to make it. Is the distance of island in one piece not really that far ?


How can I go about putting Ubuntu on my  with dual boot options? That way I can have a computer when needed and Android on the other.  I have tried to Google it, but keep coming to pages listing just the Nexus devices and I honestly just want to use Ubuntu on a Samsung tablet.  Specifications: ⠀Processor: Samsung Exynos 5420 Octa 1.8 GHz (ARM-based SoC with integrated Mali GPU) ⠀Memory: 3GB ⠀Graphics adapter: ARM Mali-T628 MP6 ⠀Display: 12.2 inch 16:10, 2560x1600 pixel, capacitive touchscreen, LCD ⠀Hard disk: 32GB eMMC Flash, 32GB , 22.82GB free    Any help would be appreciated.


when converting a string to a string array during splitting, it produces an undesired output

When i try to split a String "Element" into a String array, and then print out the result i get an output which i don't understand. My code is as follows:   String element = mapArray.get(i); elementSplit = element.split("(?!^)"); System.out.println(elementSplit);   And the output produced when i print the String Array is:  [Ljava.lang.String;@3dee2310   Could someone please advise, as i do not know why it is printing this output.  Thanks very much


Can Lagrangian be thought of as a metric?

My question is, can the (classical) Lagrangian be thought of as a metric? That is, is there a meaningful sense in which we can think of the least-action path from the initial to the final configuration as being the shortest one? Then the equations of motion would be geodesics - not in physical space, but in phase space, with the metric defined by the Lagrangian. Below is a slightly expanded outline of this idea, outlining why I think it might make sense.  (Classical) Lagrangian mechanics is derived by assuming the system takes the path of minimum action from its initial state to its final one. In the formalism of classical mechanics we normally write time $t$ as a special type of coordinate, quite distinct from the other (generalised) coordinates $\mathbf{q}$.   However, if we want we can lump these together into a single set of "generalised space-time coordinates" $\mathbf{r} = (t, q_0, q_1, \dots)$, to be considered a vector space of dimension $1+n$, where $n$ is the number of degrees of freedom. Then the action is just a function of curves in $\mathbf{r}$-space, and the equations of motion are determined by choosing the least-action path between two points, $\mathbf{r_0}$ and $\mathbf{r_1}$. In this picture, $L$ depends upon the position and direction of the curve at each point along it, and the action is obtained by a line integral along the curve.  This has a pleasingly geometrical feel, and so my question is, is there a meaningful sense in which I can think of the least-action path as being the shortest path, with the Lagrangian playing the role of a metric on $\mathbf{r}$-space? Or is there some technical reason why $L$ can't be thought of as a metric in this sense?  Note that this isn't in general the same as a metric defined on space-time. For an $m$-particle system in $3+1$ space-time, $\mathbf{r}$ will have $3m+1$ dimensions, rather than 4. I'm interested in the notion of a metric in $\mathbf{r}$-space defined by $L$, rather than the more usual picture of $L$ being defined in terms of a metric on space-time.


How to run a python script with sudo without being prompted for a password

I have a python script that restarts the mouse driver   import os  os.system("sudo modprobe -r psmouse") os.system("sudo modprobe psmouse")   since my mouse doesn't always show up on start. What is a way I can run it on start up without being prompted for a password?


Close Lightning Modal by clicking anywhere outside of it

Just wondering whether this is possible? i.e. once a modal is open, close it by clicking anywhere on the grey backdrop?  I've tried invoking my custom close-modal function via: - Adding onclick to the slds-backdrop div - Adding onblur to the slds-modal__container div - Adding onclick to the slds-modal (just wanted to see whether this would work)  None of these seem to work.


Analysis Question Involving Real Numbers and Sets

I've been sick and I've missed a couple of lectures Analysis. But I didn't want to be too behind in lecture, so I was trying to catch up by reading my textbook and solving some problems.  Here's a question I was having some trouble with:  Prove $\sqrt{2} \in \mathbb{R}$ because $x^2=2$ where $x=A\mid B$ is a cut in $\mathbb{Q}$ with $$A=\{r\in \mathbb{Q}: r\le 0 \text{ or } r^2<2\}.$$  Any help would be appreciated!  Thank you! :)


If $|z+w|=|z-w|$, prove that $\arg z-\arg w =\pm\pi/2$

If $|z+w|=|z-w|$, how to prove that  $$\arg z-\arg w =\pm\frac{\pi}{2}$$ I squared the modulus so that I can use properties of conjugates to simplify it yielding $zw*=-wz*$.


Finding charge (electromagnetism course)

I'm a maths undergrad taking a course on electromagnetism, I've drawn a diagram to represent this following question, but I'm having a bit of trouble approaching it:  "Two tiny balls of mass m = 0:1 g and charge q are suspended on silk threads of length l = 30 cm (see picture below). Their centers are separated by D = 6 cm. Find the charge q."


If you want to ask someone how long he has been working here can we say "he is working since how long? I heard this sentence somewhere.


Is a Tumblr blog on my site good for SEO?

I have a Tumblr blog on my "news" page on my website so if I keep this updated regularly will this improve my SEO and should I link it to my Facebook and Twitter?


Harmonic function vanishes with its normal derivative on a part of boundary; can Green's formula be applied to broken boundary?

Let $\Omega$ be an open domain, and let $\Sigma$ be a smooth and nonempty portion of the boundary. Let $u$ be a harmonic function in $\Omega$ and $u=D_\nu u=0$ on $\Sigma$. ($D_\nu$ is the derivative along the outward vector). How to prove $u=0$ in $\Omega$?  Can I use Green's formula to this "portion" of boundary?


Can't pass a string argument into a constructor?

When I try to run my program it prints out     "error: no matching function for call to Dog::Dog(const char [4], const char [5])".   This occurs at line 60 and 61. Is it reading the arguments as a C-String? I should still be able to pass it into the constructor, can't I?  #include <iostream> #include <string>  using namespace std;  #include <string> class Pet { protected:     string type;     string name; public:     Pet(const string& arg1, const string& arg2);     virtual void whoAmI() const;     virtual string speak() const = 0; };  Pet::Pet(const string& arg1, const string& arg2): type(arg1), name(arg2)   {} void Pet::whoAmI() const {     cout << "I am an excellent " << type << " and you may refer to me as " << name << endl; }  class Dog : public Pet { public:     void whoAmI() const;  // override the describe() function     string speak();  };  string Dog::speak() {     return "Arf!"; }  class Cat : public Pet {    string speak();     // Do not override the whoAmI() function };  string Cat::speak() {     return "Meow!"; }  ostream& operator<<(ostream& out, const Pet& p) {     p.whoAmI();     out << "I say " << p.speak();     return out; }  int main() {     Dog spot("dog","Spot");     Cat socks("cat","Socks");     Pet* ptr = &spot;     cout << *ptr << endl;     ptr = &socks;     cout << *ptr << endl; }   Any help is greatly appreciated!


I'm an Irish citizen living in a different EU country, can I use my foreign ID if it has my Irish nationality on it

I'm just asking out of curiosity. I'm an Irish citizen currently living in Estonia. I have an Estonian ID card which has my Irish nationality on the card. Can I use this card to enter Ireland and can I use this card to reenter Estonia?


How to reinstall Ubuntu linux 12.04, after I reinstalled windows 7

I had Ubuntu and Windows both on my pc. I reinstalled Windows 7 and Ubuntu just disappeared after that.   When I tried to reinstall Ubuntu, it is showing errors. And I am new to Ubuntu, I don't know anything about it.


Getting files committed in a particular commit using commit ID

I want to list all the files committed under a commit when user sends request in the form of commit id using jgit .


Recently I ordered a Peltier unit online and received it yesterday. Naturally, I was very excited to play with it. When I first turned it on, One side got hot, an another very cold. I had read that I should attach a heat sink to the hot side of the unit. So straight away, I attached a heat sink and a fan to the hot side (The fan is pulling air out).   I also added a heat sink to the cool side. However, both sides started getting very hot. I have tried reversing the polarity, changing the fan to push, and used voltages from 4 to 12. After nothing worked, I removed the heat sink on the cold side, But still, both side remain stubborn  and insist on getting painstakingly hot.   Anyone got Any Ideas as to what's wrong?  Also, If it helps, at 12v the unit is using roughly 2A...


Responsive Design - How to deal with wide HTML Tables

I am doing a proof of concept with responsive design. One web page that I am modifying has some extremely wide tables. I really don't know how to shrink the tables width so there is no horizontal scroll bar in a mobile browser.  I was just wondering if anyone had the same issue with wide tables and what they did to overcome a horizontal scroll bar in a mobile browser using responsive design. Oh and I wanted to add that I can not hide columns in the table.


Schrödinger's equation is supposed to be a differential equation for the wave function of a particle. As I currently understand, De Broglie's hypothesis is a hypothesis that for particles there should be some wave function $\Psi$ with wavelength $\lambda$ such that  $$p=\dfrac{h}{\lambda}$$  Where $p$ is the particle's momentum and $h$ is Planck's constant. As I understand, this hypothesis is based on the following: for light, we know there is a wave function, but we also know that it has particle behavior and we know that $p = h/\lambda$ holds, in that case we want the converse for particles.  The hypothesis, however, doesn't tell which differential equation this wave function satisfies. In that case, Schrödinger's equation is the answer to that, saying that the differential equation is  $$i\hbar \dfrac{\partial \Psi}{\partial t}=\left(-\dfrac{\hbar}{2m}\nabla^2+V\right)\Psi$$  Now, I simply can't understand why it would be reasonable to consider that equation. I mean, if we just accept it and deduce results, then we get a feeling that it should be right. But how could one motivate it? I mean, what reasoning lead Schrödinger to that equation in specific?  Is it possible, without knowing further quantum mechanics that follows from the equation, to motivate that the wave function of a particle should satisfy that equation? I've heard that this equation can't be derived. But I believe there is some reasoning behind it.


Which of these two is correct, “What should everyone know?” or “What everyone should know?”

Which of the above is correct usage and why. I saw  edit in a stackoverflow question and it got me wondering why was it edited. Is it just because the first one sounds better?


Drop brackets around reference item in `natbib`

I am writing for a journal (Transportation Research Record) that has strange and particular bibliographic guidelines. I've been able to adapt natbib to work for the in-text citations. But the bibliography prints brackets around the item numbers.   \documentclass[11pt]{amsart} \usepackage{graphicx} \usepackage{amssymb} \title{Brief Article} \author{The Author}     \usepackage[round,sort,numbers]{natbib}     \newcommand{\trbcite}[1]{({\it\citenum{#1}})} \begin{document} \maketitle  This is an example citation \trbcite{Mokhtarian2008}. \bibliographystyle{plain} \bibliography{bibfile} \end{document}      With bibfile.bib containing  @article{Mokhtarian2008, author = {Mokhtarian, Patricia L. and Cao, Xinyu}, doi = {10.1016/j.trb.2007.07.006}, issn = {01912615}, journal = {Transportation Research Part B: Methodological}, keywords = {built environment,causality,land use,residential location,smart growth}, month = mar, pages = {204--228}, title = {{Examining the impacts of residential self-selection on travel behavior: A focus on methodologies}}, url = {http://linkinghub.elsevier.com/retrieve/pii/S0191261507000744}, volume = {42}, year = {2008} }   Any easy ways to do this? Or is this something that will require the .bst file?


Proving that $x$ is irrational if $x-\lfloor x \rfloor + \frac1x - \left\lfloor \frac1x \right\rfloor = 1$

Prove : $$ \text{If } \; x-\lfloor x \rfloor + \frac{1}{x} - \left\lfloor \frac{1}{x} \right\rfloor = 1 \text{, then } x \text{ is irrational.}$$  I think the way to go here is to falsely assume that $x$ is rational, thus having $x=\frac mn$ with $m,n$ integers and go with that, we also know that $x$ with the celling belongs to the integers and that $\frac 1x$ with the celling gotta be a $0$. Still can't prove it. Thank in advance !


May I, and how do I, change my mind about an accepted answer?

Suppose I accepted an answer to my question, and then a real doozie got submitted later, and I wish to change which one is marked as "accepted"?  Is this possible (if so, how)?  Is it frowned upon?  I couldn't find anything about this in the Help.  --- Edit --- The  is helpful but I would like to leave my question here, if I may, because its specificity was helpful for me and will hopefully be helpful for others.


Does there exist a symmetric matrix $A$ such that $2^{\sqrt{n}}\le |\operatorname{Tr}(A^n)|\le2020 \ \cdot 2^{\sqrt{n}}$ for all $n$

Does there exist a symmetric matrix $A$  such that $2^{\sqrt{n}}\le |\operatorname{Tr}(A^n)|\le2020 \cdot2^{\sqrt{n}}$ for all $n$? I think no. The trace of $A^n$ equals $\sum\limits_{i=1}^n\lambda_i^n$ where $\lambda_i$ are the eigenvalues of $A$. Now, if the absolute value of trace of $A$ is bounded below by $2$, then I think the trace of $A^n$ will grow infinitely. Am I right? Thanks beforehand.


Is it possible to set two MX records for one domain?

I've seen articles about "different subdomains for different MX records".  But I want two records for the same domain, @abc.example for example.  Originally, I used Live Mail(MSN) to host my emails, and already have MX setup for it.  Now I want to use some of the Google App features, so I need to setup MX for Google Mail.  Can both of the two work together and well?


Why doesn't Karabiner map F2 from the touch bar?

I used Karabiner to map f2 to return_or_enter, so that F2 can rename files in the Finder. The configuration is "for all devices", not specific keyboards and is taken directly from Karabiner on-line configuration options "Use F2 as Rename."   This works on my external  keyboards (Apple and Microsoft), but not in the touch bar.   Apparently touch bar F2 is not being detected as such--even though Karabiner EventViewer shows its events as code 59, f2, just like the external keyboard.  Touch bar configuration is shown below.  How can I configure this correctly in Karabiner?


Baby always rolling over and ending up sleeping on his stomach, is it dangerous?

Our 3 months old baby is very keen on rolling over and being on his stomach. Most of the time he automatically rolls over in a few minutes after we put him on his back, including during bed time. Is this dangerous? We are particularly worried that   his nose maybe blocked when facing down it is said that SIDS risk increases when a baby sleeps on his stomach   If it is dangerous, how can we stop this, especially during bed time or other times when we can't watch him continuously?


Math equations not rendered in Android app

In Mathematics.SE, equations are not properly typeset in the Android SE app. It shows raw Latex format.  Is there a solution to it?


Densifying polyline to generate points at set distances using ArcMap?

I have a polyline, that I wish to create points along using ArcMap 10.2.2.  I used the methodology suggested in , but I do not seem to be able to generate the points at the set intervals I desire.  For instance, densifying the polyline using 500m and 250m, and then converting the vertices to points  using the Feature Vertices to Points tool), seems to generate the same number of points (540) for either densifying distance when using the "Both_Ends" option in the Feature Vertices to Points tool:  250m - Both Ends:    500m - Both Ends:    With the same number of points in each generated points layer. And using the option 'All' in the Feature Vertices to Points tool generates way too many points (5250):    My end goal is to have points spaces at every 250m or 500m along each branch of this polyline, finally settling on the polyline to point conversion that generates a reasonable number of values.


Can anyone show me a good method to express a character in binary in C? I would need to see a given character as a sequence of 1 and 0. For example, if I get as an input 'a', I would like to see it as 01100001 and finally return 00010110 (a byte with inverted nibbles). Is it good to use unigned char? Should I use an 8-element array of integers to store a byte?  int main(void){    unsigned char c = 'a';     return 0; }


Getting NullPointerException while trying to save console output in text file

Can someone please help here, i am trying to save the console output into a text file, i am getting NullPointerException error. Please suggest what wrong i am doing here.Also is there a way to create a new text file for each run?  Thanks in advance:  import java.io.*;   import java.sql.*;    public class RetrieveFile {       public static void main(String args[]) throws Exception {         try {             Class.forName("oracle.jdbc.driver.OracleDriver");             Connection con = DriverManager.getConnection("jdbc:oracle:thin:@tkdp2gpsdbc03-vip.hk.hsbc:35120/GPSEAU_TAF", "gppeareadu", "F4nt4na");              PreparedStatement ps = con.prepareStatement("select * from MSG_FEES where MID='1961108001406E00'");             ResultSet rs = ps.executeQuery();              try {                 printResultColumns(rs);             } catch (SQLException e) {                 System.err.println(e.getMessage());             }              con.close();         } catch (Exception e) {             e.printStackTrace();         }     }      public static void printResultColumns(ResultSet resultSet) throws SQLException, IOException {     ResultSetMetaData rsmd = resultSet.getMetaData();     int columnCount = rsmd.getColumnCount();      while (resultSet.next()) {         // you get a single result row in here, not the entire ResultSet         for (int i = 1; i <= columnCount; i++) {             switch (rsmd.getColumnType(i)) {             case Types.VARCHAR:             case Types.LONGVARCHAR:             case Types.CHAR:                 System.out.println(resultSet.getString(i));                 break;             case Types.DOUBLE:                 System.out.println(resultSet.getDouble(i));                 break;             case Types.INTEGER:                 System.out.println(resultSet.getInt(i));                 break;             case Types.DATE:                 System.out.println(resultSet.getDate(i).toString());                 break;             case Types.TIMESTAMP:                 System.out.println(resultSet.getTimestamp(i).toString());                 break;             case Types.BOOLEAN:                 System.out.println(resultSet.getBoolean(i));                 break;             case Types.DECIMAL:             case Types.NUMERIC:                 System.out.println(resultSet.getBigDecimal(i));                 break;             default:                 //System.out.println(rsmd.getColumnClassName(i)                }         }     }   StringBuilder record = new StringBuilder(); while (resultSet.next()) {     if (record.length() > 0) record.append("\n");     for (int i=1; i < columnCount; ++i) {         if (i > 1) record.append(", ");         record.append(resultSet.getInt(i));     } } try {     String filename = "C:\\Users\\45060849\\Desktop\\test1.txt";     BufferedWriter writer = new BufferedWriter(new FileWriter(filename));     char[] str = null;     writer.write(str);     writer.close(); } catch (IOException e) {     // handle exception }   }     }    Please find the below Log file for above code:- Please find the below Log file for above code:-  java.lang.NullPointerException     at java.io.Writer.write(Writer.java:127)     at RetrieveFile.printResultColumns(RetrieveFile.java:76)     at RetrieveFile.main(RetrieveFile.java:14) Picked up JAVA_TOOL_OPTIONS: -Duser.home=C:\Users\123


Displayed dimensions of the edges are different than in object mode

Just a beginner question here about dimensions. As an exercise I wanted to create a house and started with a block. The block was supposed to be 20m long, 3m high and 6m deep. I entered these values in object mode:  Then I wanted to continue changing the shape in edit mode to progress with the house design but I saw that the displayed dimensions of the edges were completely different than in object mode:  ...however, if I switch to "global" in the side menu under "transform" the dimensions become correct again...:  Can anybody tell me what's going on here? Why are the values different? Thanks in advance for helping me out.


I am trying to reconstruct this image here    I am not very happy with the code, as it uses hacking and adding white boxes and alike. My problem is now how do I draw the somewhat arbitary function in the figure? I tried to do a polynomial fit, but that did not work. I got dimensions to large, would a spline solution work better?    \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{patterns}     \usepackage{pgfplots}     \pgfplotsset{compat=1.6}     \begin{document}     \begin{tikzpicture}      \begin{axis}[         xmin=-0.1,xmax=5,         xlabel={z},         ymin=0,ymax=4.5,     xtick={2.5,4},     xticklabels={$v_1$,$v_2$},     ytick={2.5,3.5},     yticklabels={$u_1$,$u_2$},     xlabel={$u$},       ylabel={$v$},     axis lines=middle]  \draw [fill=gray!40!white,thick,dashed] (axis cs:0,0) rectangle (axis cs:4,3.5); \draw [color=black,fill=white,thick,dashed] (axis cs:0,0) rectangle (axis cs:2.5,2); \draw [fill=black] (axis cs:0,0) rectangle (axis cs:0.01,4.45); \addplot+[black,thick,domain=0:5,no marks] {0}; % \node at (axis cs:2.5,0)    [anchor=south west] {$A$}; \node at (axis cs:4,0)      [anchor=south west] {$A'$}; \node at (axis cs:2.8,2.2)  [anchor=north]      {$B$}; \node at (axis cs:4.2,4)   [anchor=north]       {$B'$}; \node at (axis cs:0.25,2.5) [anchor=north]      {$C$}; \node at (axis cs:0.25,4)   [anchor=north]      {$C'$}; \node at (axis cs:0,0)     [anchor=south west]  {$O$}; % \end{axis} \end{tikzpicture} \end{document}


Custom environment with minipages causes "Illegal parameter number in definition of \end"

Using MiKTeX with PDFLaTeX on Windows I want to create an environment that contains two minipages; the first one has a description item, and the second has a small text (or picture). This piece of code works as I want: { \noindent \begin{minipage}{0.5\textwidth} \begin{description}     \item[Label] Description \end{description} \end{minipage}\hfill \begin{minipage}{0.3\textwidth}     Second minipage \end{minipage} }  I wanted to create a macro or environment to make it easy for me to introduce this kind of content. So I create the following environment with two arguments: \newenvironment{myenvironment}[2]% 1:label, 2:second minipage text {%     \noindent     \begin{minipage}{0.5\textwidth}     \begin{description}         \item[#1] % Description }% {%     \end{description}     \end{minipage}\hfill     \begin{minipage}{0.3\textwidth}         #2     \end{minipage} }  But when I try to use it with \begin{myenvironment}{Label}{Second minipage text} Description text \end{myenvironment}  I get Illegal parameter number in definition of \endmyenvironment. pointing to the line that finishes the newenvironment declaration. After some hours struggling with this I tried using double hashes (##) and got two new different errors: You can't use `macro parameter character #' in restricted horizontal mode and You can't use `macro parameter character #' in internal vertical mode. This time the errors were pointing to the lines when I wanted to use the environment, but had no complaints on the definition. What am I doing wrong?


If $a$ is a zero divisor of $\mathbb{F}$, then does $a$ fail to have a multiplicative inverse?

Let F be a ring. Show that if $a$ is a zero divisor of F, then $a$ fails to have a multiplicative inverse.  All I understand is that $ab = 1$ doesn't hold and that $ac = 0$ for some $c \in F$ holds. Basically, only the definitions, but I don't know what to do with them.


What is the easiest way to clean the boot folder in Ubuntu 14.04 when you have 0 bytes left

I have tried to look on ask Ubuntu and all answers say the same thing. I have tried lots of them and still no luck; is Ubuntu 14.04 code specific?  Please help. : )