Using chown successfully but not actually changing user ownership in Ubuntu bash on Windows 10?

I'm using the Ubuntu bash on Windows 10(v1804) and am experiencing a problem with the chown command. I'm trying to change the ownership of a file I created on my desktop with the following path:  mnt/c/users/XY/Desktop/filecat.txt   Using sudo -i I switch to the root user and navigate to the mentioned path and run  chown -v user1 filecat.txt   after which I get this message confirming the ownership change:  changed ownership of 'filecat.txt' from amar to user1   However, when I run ls -l filecat.txt it does not show any change in user. It's still the same user which created the file.  Anyone have any idea what might be the problem? I've been searching online but finding nothing similar so here I am asking the question myself.  EDIT:  This is the full output of the command line mentioned in the comments.  $ ls -l filecat.txt; chown user1 filecat.txt; ls -l filecat.txt -rwxrwxrwx 1 amar amar 2054 Jul  8 20:44 filecat.txt -rwxrwxrwx 1 amar amar 2054 Jul  8 20:44 filecat.txt   The file system I'm using is NTFS on both of my partitions.  Using lsblk results in the following output  lsblk: failed to access sysfs directory: /sys/dev/block: No such file or directory   The answer provided in the  suggested editing a certain line in the etc/fstab file. My etc/fstab file contains only the following  line   LABEL=cloudimg-rootfs   /        ext4   defaults        0 0


How to prove that the position operator in momentum is $i\hbar \partial/\partial p$ - One Missing Sign

I am trying to prove that the position operator in momentum space is  $i\hbar \partial/\partial p$ but my derivation is missing one sign. Can someone spot the error?   Start with  $$<\hat x> =  \int\limits_{-\infty}^{\infty} \psi^*(x)  x  \psi(x) \mathrm{d}x$$  Taking the fourier transform of both $\psi(x)$  $$ \frac{1}{2\pi} \int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}  \psi^*(\bar k_x) e^{i\bar k_xx} \, \mathrm{d} \bar k_x x \int\limits_{-\infty}^{\infty} \psi(k_x) e^{-i k_xx} \mathrm{d} k_x  \mathrm{d} x  $$  Taking integration by parts on the right most integral yields  $$ \frac{1}{2\pi} \int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}  \psi^*(\bar k_x) e^{i\bar k_xx} \, \mathrm{d} \bar k_x x * \frac{1}{ix} \int\limits_{-\infty}^{\infty} e^{-i k_xx} \frac {\partial \psi(k_x)}{\partial k_x} \mathrm{d} k_x  \mathrm{d} x  $$  We see the middle term gets canceled out.   Now using the following identity   $$ \delta(k_x-\bar k_x) = \frac{1}{2\pi} \int\limits_{-\infty}^{\infty}  e^{-ix(k_x-\bar k_x)} \, \mathrm{d} x $$  we arrive at  $$ \frac{1}{i} \int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}  \psi^*(\bar k_x) \delta(k_x-\bar k_x) \mathrm{d} \bar k_x  \frac {\partial \psi(k_x)}{\partial k_x} \mathrm{d} k_x  $$  $$ \frac{1}{i}\int\limits_{-\infty}^{\infty}  \psi^*(k_x) \frac {\partial \psi(k_x)}{\partial k_x} \mathrm{d} k_x  $$  Very lastly, we use the following identity  $$\frac{\partial}{\partial k_x} = \frac{\hbar \partial}{\partial p_x}$$  We prove  $$ \frac{\hbar}{i} \int\limits_{-\infty}^{\infty}  \psi^*(k_x) \frac {\partial \psi(k_x)}{\partial p_x} \mathrm{d} k_x  $$  So   $$ x = \frac{\hbar \partial}{i\partial p_x}$$  So close, not quite right. Because the actual answer is $$ x = \frac{-\hbar \partial}{i\partial p_x}$$ or $$ x = \frac{i\hbar \partial}{\partial p_x}$$  Can someone spot the mistake. Thanks!


How do I view my Disk Activity on Ubuntu? For example, How can I monitor what is being written and read from disk as well as the percentage of disk usage?  I am looking for an application similar to the Resource Monitor in Windows.


I've installed Ubuntu recently and I've been trying to install some programs using apt-get but it never seems to work, not even apt-get update works, here's what I get when I try to install something, in this case: java's jdk-7 using:   apt-get install openjdk-7-jre-headless   here's what I get:  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages were automatically installed and are no longer required:   linux-headers-3.2.0-29 linux-headers-3.2.0-29-generic-pae Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded. mkhas@mkhas-Inspiron-3520:~/Downloads$ sudo apt-get install openjdk-7-jre-headless Reading package lists... Done Building dependency tree        Reading state information... Done The following packages were automatically installed and are no longer required:   linux-headers-3.2.0-29 linux-headers-3.2.0-29-generic-pae Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   ca-certificates-java icedtea-7-jre-jamvm java-common openjdk-7-jre-lib tzdata-java Suggested packages:   default-jre equivs sun-java6-fonts ttf-dejavu-extra fonts-ipafont-gothic   fonts-ipafont-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts   ttf-bengali-fonts The following NEW packages will be installed:   ca-certificates-java icedtea-7-jre-jamvm java-common openjdk-7-jre-headless   openjdk-7-jre-lib tzdata-java  0 upgraded, 6 newly installed, 0 to remove and 24 not upgraded.  Need to get 44.1 MB of archives.  After this operation, 63.5 MB of additional disk space will be used. Do you want to continue [Y/n]? y  WARNING: The following packages cannot be authenticated!    openjdk-7-jre-lib ca-certificates-java tzdata-java java-common openjdk-7-jre-         headless   icedtea-7-jre-jamvm Install these packages without verification [y/N]? y 0% [Connecting to lb.archive.ubuntu.com (91.189.91.13)]    And it just get stuck at 0%  Edit: Yes, the internet is working fine on my system.  One thing I tried is changing the mirror server from which it's supposedly retrieving the packages from lb.archives.ubuntu.com to archives.ubuntu.com in /etc/apt/sources.list but it says that that file is read only and I can't make any changes to it.  I tried updating apt-get through   apt-get update    but I get this whenever I try to do that:  E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   EDIT: Issue resolved, I wasn't using sudo apt-get update and was only using apt-get update


VBox Guest Additions ISO can't be mounted because of VERR_PDM_MEDIA_LOCKED

I am trying to run the command sudo mount -t vboxsf SharedUbuntuWindows SharedUbuntuWindows but I get the error unknown filesystem type 'vboxsf' on my guest Ubuntu machine. I am following  but I cannot find 'Install Guest Additions' under 'Devices'. Instead, I see 'Insert Guest Additions CD image'. Am I even on the proper path to solve the issue?    This is what I see when I select 'Insert Guest Additions CD image...'. Pressing 'Force Unmount' only makes the pop-up dialog disappear, but I still am unable to run the command sudo mount -t vboxsf SharedUbuntuWindows SharedUbuntuWindows.


Why "do ... while (0)" can't be replaced by simple curly brackets?

I recently saw a piece of C code including a macro of the following style:  #define TOTO()              \ do {                        \   do_something();           \   do_another_something();   \ } while (0)   I was at first wondering of the purpose of the do while (0) here, but  explained to me: it is in case the macro is used just after an if or else without curly brackets, like this:  if (something)     TOTO(); else     do_something_else();   So here, without the do while (0) statement, the code would be expanded to:  if (something)     do_something();     do_another_something(); else     do_something_else();   Which is syntactically wrong, because the else is not directly following an if scope anymore.  But I thought it would work as well by declaring the macro in its own scope, without necessary a do while around it, so I tested the same code with just curly brackets. My entire code looks like this:  #include <stdio.h>  #define HELLO_WORLD()       \ {                           \     printf("hello ");       \     printf("world!\n");     \ }  int     main(int argc, char** argv) {     if (argc == 1)         HELLO_WORLD();     else         fprintf(stderr, "nope\n");     return 0; }   But GCC give me the following error:     error: ‘else’ without a previous ‘if’   However, the code of the main function should be expanded to:  if (argc == 1)     {         printf("hello ");         printf("world!\n");     } else     fprintf(stderr, "nope\n"); return 0;   Which is valid.  So what am I missing here?


How to limit Google Drive's client bandwidth usage?

Is there any way to limit the amount of traffic Google Drive uses? I'm syncing Drive's content, and it almost swallows the entire bandwidth. I can't use Internet during sync operation.


Fn+F5/6 Brightness shortcut not working - Asus laptop - Ubuntu 14.04

The brightness function keys on my Asus laptop don't work on Ubuntu. The function key combinations for sound volume (Fn+F12/F11/F10) and turning the screen on and off (Fn+F7), but not those that should adjust the brightness (Fn+F6/F5)...  After some, I tried , but it still doesn't work.  I tried  but again no success.  What else can I try?


I want to create a regular expression for validating phone numbers.  For example: +381 493 34949499  +381 - 1-4 numbers 493 - 2-3 numbers 34949499 - 5-15 numbers  '/^\+\d{3} \(\d{2,3}\) \d{5,16}$/')   I trid something like this but I got an error in +381 (country code).


Forward local port or socket file to remote socket file

Quick question - I run two linux boxes, one my own desktop and the other my VPS. For security reasons on the VPS end I opted for socket connections to MySQL (/var/run/mysqld/mysql.sock). I know I can tunnel like this: ssh -L 3307:127.0.0.1:3306 user@site.com if I set up the remote sql server to listen on some port, but what I want to know is can I do something like: ssh -L /path/to/myremotesqlserver.sock:/var/run/mysqld/mysql.sock thereby tunnelling two sockets, as opposed to two ports?  A perfectly acceptable solution would also be to forward a local port to the remote socket file, but where possible I'm trying not to have tcp servers running on the remote box.  (and yes, I know tcp would be easier).


Prove that $\left (\frac{a^2 + b^2 +c^2}{a+b+c} \right) ^ {(a+b+c)} > a^a b^b c^c$

Prove that $\left (\dfrac{a^2 + b^2 +c^2}{a+b+c} \right) ^ {(a+b+c)} > a^a b^b c^c$ if $a$, $b$ and $c$ are distinct natural numbers.  Is it possible using induction?


I need when I click on Mouse Right-Click  do the same effect like I clicked on keyboard Ctrl + shift + alt + D  It will be temporarily event, I hope no restart or any complex settings.


Convergence of $x_{n+1} = \frac12(x_n + \frac2{x_n}).$

Let $x_1=1$ and $$x_{n+1} = \frac12\left(x_n + \frac2{x_n}\right).$$ Prove or disprove $(x_n)$ is convergent and show the limit.   When I tried working on it I found the sequence was bounded by square root of 2 and it is was monotone. But apparently the sequence is not bounded by square root of two and is not monotone. But I have no idea why. Any help would be greatly appreciated! Thanks!


Terraria: How do you prepare for the battle against the Wall of Flesh and prepare your World for Hardmode?

How should I prepare for these things? Good advice: Base strategies, weapons and accessories, etc.


In the line of this , I am looking for a way to compile a large document (~400 pages with 10 chapters) into a single pdf file and one additional pdf file per chapter.   Currently, I use pdftk to manually split the large pdf file after its pdflatex compilation. However, this is tedious in the sense that the page split may vary (addition in chapter 1 will shift page numbers of following chapters...).  Is there a way to compile a latex file between two labels for instance ? Ideally I would like to keep hyperlinks active in the final sub-pdf files (which is the advantage of pdftk...).  The only thing I can think of is the use of \ifnum in order to consider specific parts of the document but this will necessarily break all hyperlinks.


Can this relativistic hack allow one to see beyond an event horizon, in principle, else why not?

Consider a lone photon. As its frequency increases, its energy increases. Taken to the limit, a sufficiently-high-frequency photon could be a black hole unto itself.  But the frequency of a photon is dependent on the inertial frame of the observer. Two observers could each observe this photon to be either above or below this critical frequency. Or, I could accelerate to "catch up" to this photon, red-shifting it until it is no longer energetic enough to be a black hole.  So couldn't I at one moment observe a particle to disappear beyond the event horizon, accelerate until the event horizon no longer exists, and hence observe what happened to the particle after crossing that threshold?  Is this in-principle possible? If not, why not?  EDIT: to clarify, I am not asking how much energy-due-to-photon-momentum is required to create a black hole, I am asking: given that threshold energy, how does the event horizon appear to different inertial frames which observe the photon to be above/below this threshold?


$A_n =\sum \limits_{j=1}^n\frac{\sin j}{j}$ convergence, not using series convergence tests(Abel, Dirichlet etc)

Let $A_n =\sum \limits_{j=1}^n\frac{\sin j}{j}$. How can I prove that $A_n$ converges as $n$ approaches infinity? I know that if we think of it as an infinite series, it can be proved by applying appropriate convergence tests(for example, Abel's convergence test(or Dirichlet test). But I want a proof not using convergence tests of an infinite series, and think of this as a 'sequence' $A_n$ instead of a 'series'. I read  and other answers related to this question, but most of them used convergence tests and I don't know about Riemann-Lebesgue lemma or Fourier series. Actually I am taking an elementary analysis course, and this is an exercise on the textbook's 'sequence' part, not 'series'.


How can I solve the infinite series 1+1/3+1/7+1/15+1/31+1/63+...

What is the summation of this infinite series $$1 + \frac{1}{3} + \frac{1}{7} + \frac{1}{15} + \frac{1}{31} + \frac{1}{63} + ... ?$$


Proof that if $s_n \leq t_n$ for $n \geq N$, then $\liminf_{n \rightarrow \infty} s_n \leq \liminf_{n \rightarrow \infty} t_n$

This is half of Theorem 3.19 from Baby Rudin. Rudin claims the proof is trivial. What I've come up with so far doesn't seem trivial, however, and is probably also wrong (my problem with it is pointed out below). This makes me wonder whether I'm overlooking some useful fact and/or using an unprofitable approach.  Theorem. If $s_n \leq t_n$ for $n \geq N$, where $N$ is fixed, then  $$ \liminf_{n \rightarrow \infty} s_n \leq \liminf_{n \rightarrow \infty} t_n. $$  Proof. Suppose that $s_n \leq t_n$ if $n \geq N$, but that  $$ \liminf_{n \rightarrow \infty} s_n > \liminf_{n \rightarrow \infty} t_n. $$  Let $E_s$ denote the set of all subsequential limits of $\{s_n\}$, and let $E_t$ denote the set of all subsequential limits of $\{t_n\}$. Then  $$ \inf E_s > \inf E_t. $$  This implies that there exists some $x \in E_t$ such that $\inf E_s > x > \inf E_t$, since otherwise $\inf E_t$ would not be the greatest lower bound of $E_t$. Hence some subsequence of $\{t_n\}$, say $\{t_{n_i}\}$, converges to $x < \inf E_s$.  Lemma. (from Rudin) If $x < \liminf_{n \rightarrow \infty} s_n$, then there exists an integer $N$ such that if $n \geq N$, then $s_n > x$.   By the lemma, there exists an integer $N_0$ such that if $n \geq N_0$, then $s_n > x$.   Now, let $\epsilon = \inf_{n \geq N_0} \{s_n - x\}$. This is where I think my proof breaks down. Can't $\epsilon$ be zero? Then, since $\{t_{n_i}\}$ converges to $x$, there exists an integer $N_1$ such that if $n_i \geq N_1$, then $|t_{n_i} - x| < \epsilon$. But this means that, if $n_i \geq \max\{N, N_0, N_1\}$, we have both  $$ s_{n_i} > t_{n_i}, $$  as well as $s_{n_i} \geq t_{n_i}$, a contradiction.


I'm using VS 2008 to create a C++ DLL (not managed) project and I need convert a char* to a long long type. Is there an easy way to do it?  Thanks in advance :)


How to calculate the rotation matrix between 2 3D triangles?

I need to calculate the rotation matrix and the translation vector between 2 given triangles in Euclidean space.  This is really just a rotation and a translation, the lengths of sides of the triangle are equal.  Coordinates of the points are real. $P_1, P_2, P_3$ are the 3 points of the 1st triangle, $Q_1, Q_2, Q_3$ are the 3 points of the 2nd.  My idea was: I translate the center of the triangles to the point of origin with $t_1 := \frac{P_1+P_2+P_3}{3}$, $P'_i = P_i-t_1$ and  $t_2 := \frac{Q_1+Q_2+Q_3}{3}$, $Q'_i = Q_i-t_1$ and then I only need to solve the set of 9 linear equations with 9 unknown (the 9 entries of the rotation matrix $R$):  $$ Q'_i = R.P'_i $$ Afterwards I could calculate the translation with  $$ t = t_2 - R.t_1 $$ The problem is: after I translate the triangles to the point of origin the points are linearly dependent ($P_3 = -P_1 - P_2$)  So in fact I only have 6 equation with 9 unknown, which allows multiple solutions for $R$. But I need "one" precise solution, because the triangles are just parts of two identical models, which I need the rotation for.   I think the approach will work, if I use 4 points instead of 3.  But can I somehow calculate the rotation matrix with "only" 3 points?


What word means 'to cause to be hidden', especially of dissenting opinions?

I think I've been using the word 'occlude' incorrectly.  I had thought that one of its meanings was something like "to cause to be hidden" or "to conveniently ignore", so one might say:     By describing the history of boxing exclusively in terms of the star athletes, Miller occludes the significant impact the surrounding cultural paradigms had upon the sport.   or else one might say     With the changes in the court, it became convenient to the imperial narrative that the citizens of the northern province be wealthy industrialists, and so the very existence of their homelessness problem became gradually occluded in depictions of the region.   I'm pretty sure there is a word that means what I am trying to use occlude to mean here, and it probably starts with an 'o' or something, but my googled definitions for the word don't match what I remember/how I've been using it.  Is there a different word that I might have forgotten?  Whenever I try to think of what it could be I just end up with 'obviate', but I know that means something entirely different (i.e. to make unnecessary, to get rid of). Does 'occlude' actually mean what I've been using it to mean?  If so, where can I find that definition?


Why was this answer not deleted at the sixth Recommend Deletion vote?

The , if an answer in the Low Quality Posts review queue gets six Recommend Deletion posts, it gets deleted immediately, and the post is marked simply as 'deleted on ...', such as  (physics 10k+ or SE team only).  However, I'm a bit confused by  (again physics 10k+ or SE team only):        The post got six Recommend Deletion votes, which should have deleted it on the spot, but it lingered on for another hour until a moderator deleted it (and turned it into a comment). Do Looks OK votes somehow count against recommended deletions? (My understanding was that they do, but only regarding whether the post stays on the queue or gets taken off it.) If so, does the existing documentation, such as the linked post above, need to be clarified on this regard?    Edit:  Answer revision history and timeline as requested:                In the other example, the timeline and revision history both say 'post deleted from review' attributing it to the reviewers.


Difference between "public static" and "private static" for storing simple data. What is better?

What is a better solution?   I was thinking about that, what is actually better on performance, or which is more "correct"?  public static List<String> globalUseVariable;   or  private static List<String> globalUseVariable; public static List<String> getGlobalUseVariable() {     return globalUseVariable; }   I think the second one because of encapsulation rule?


Wifi for Centrino Wireless-N 1000 Intel Corporation (HP Pavilion dm4 - 2070us) is not working

I have a HP Pavilion dm4-2070us which has an Intel Corporation Centrino Wireless-N 1000 adapter.   The problem is that my computer doesn't show the wireless networks after I upgraded my system to Ubuntu 11.10. Following is my output for sudo lshw -class network:  *-network DISABLED          description: Wireless interface    product: Centrino Wireless-N 1000    vendor: Intel Corporation    physical id: 0    bus info: pci@0000:01:00.0    logical name: wlan0    version: 00    serial: 8c:a9:82:81:5a:30    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=iwlagn driverversion=3.0.0-12-generic firmware=39.31.5.1 build 35138 latency=0 link=no multicast=yes wireless=IEEE 802.11bgn    resources: irq:42 memory:c2500000-c2501fff  *-network    description: Ethernet interface    product: AR8151 v2.0 Gigabit Ethernet    vendor: Atheros Communications    physical id: 0    bus info: pci@0000:08:00.0    logical name: eth0    version: c0    serial: 2c:41:38:07:f3:e3    size: 100Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.0-NAPI duplex=full firmware=N/A ip=192.168.1.7 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s    resources: irq:44 memory:c1400000-c143ffff ioport:2000(size=128)   The output for rfkill list all:  0: hp-wifi: Wireless LAN     Soft blocked: no     Hard blocked: no 1: hp-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 2: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 3: hp-wwan: Wireless WAN     Soft blocked: no     Hard blocked: no   I have also searched about the status of the WiFi network being shown as disabled. Somehow everything pointed to the fact that my wireless device is switched off and it can be switched on from Windows only. However, I don't have windows partition and it has just Ubuntu 11.10 so I don't see any point in switching the device on in Windows.


Where can I find Obsidian in the Pocket Edition?

I have looked everywhere for lava or obsidian in 0.7.1. I've looked all the way from top to bottom and all around, in about a 100 block diameter, but I can't find any. Where can I get some?


When I learned, what the anode and the cathode are, there were two definitions corresponding to each other:   Cathode is, where electrons enter in the system. Anode comes from the greek anodos meaning "going upwards", that is where current enters the system (that is the dirrection opposing to the flow of the electrons)   Now when I tried to understand the reverse biasedness of a photodiode, I struggled half an hour until I realized, that most of the sources I could find, refers the N-doped end of the diode a cathode, even if the current is now reverse.  Did I miss something? Why is that? Is there another interpretation for these notions?


Jump between open windows on multiple monitors in Task View on Windows 10 with keyboard

I'm using two monitors with Windows 10 and I have a few windows open on each monitor. When I open the Task View (Win + Tab) I can only navigate between the main monitor's windows with keyboard (using arrow keys or the Tab key). I see the other display's windows on that display but can't figure out how to cycle through those windows with my keyboard.  Is there a way I can give focus to secondary monitor's windows in the Task View using keyboard?  To put it another way, how do I select the first item on the right monitor in the following screenshot using keyboard?


Evaluation of $ \sum_{k=0}^n \cos k\theta $

I just wanted to evaluate  $$ \sum_{k=0}^n \cos k\theta $$  and I know that it should give  $$  \cos\left(\frac{n\theta}{2}\right)\frac{\sin\left(\frac{(n+1)\theta}{2}\right)}{\sin(\theta / 2)}   $$  I tried to start by writing the sum as  $$ 1 + \cos\theta + \cos 2\theta + \cdots  + \cos n\theta $$  and expand each cosine by its series representation. But this soon looked not very helpful so I need some clue about how this partial sum is calculated more efficiently ...


C#, Unity UI text, Display Number with limited decimals

Newbie here in C#..  I am creating a calculator, and would like to display my numbers through UI text elements. Problem is that i want to limit my number to say, 4 decimals like 10.4812  I tried with Tostring("F4"), which works, but then when i have a round number like 12, it will display "12.0000", which is ugly.  What would be the simplest way to achieve this ? I thought of complicated ways, like converting my ui element.text into a char array, then detecting the ".", counting 4 digits and removing the rest, but that sounds crazy maybe ?  It has happened many times that i was trying too insane things when something simple was existing, so i thought it was worth asking :D.  Thanks in advance!


how to get dimensions, surface area and volume of all the objects using python text editor in blender?

I am fairly new to blender. I have very little knowledge using python interface with blender. How to obtain a list in excel containing the object name, dimensions, surface area and volume of mesh.


Young's double slit experiment for a single photon

If I throw only one photon at the slits in Young's double slit experiment, can I get the interface pattern?


I get confused with the following. Any explanation would be greatly appreciated.         I can't do it myself.    I can't do it by myself.


Equilateral triangle whose vertices are lattice points?

Is it possible to construct an equilateral triangle with vertices on lattice points?  I think the answer is no, but how can I prove this?  I started with a triangle with coordinates $(0,0)$ $(a,b)$ and $(c,d)$. Equating the size of the 3 sides, I get  $a^{2}+b^{2}=c^{2}+d^{2}=2ab+2cd$  How should I continue?    I see there are solutions based on the fact that the angle between two edges can not be 60°. Is it possible to have a solution based on the fact that the length of the edges can not be the same?


Does this double infinite sum $\sum_{n=1}^\infty \sum_{m=1}^\infty\frac{1}{(m+n)^2}$ converge?  I can not understand how Ido this Please step by step


How to replace or remove kernel with signed kernels

Whenever I am updating ubuntu getting following error message. The message is asking me to remove or replace the current kernel version with the signed version.   How to do this?  Below is the message I am getting:     Your system has UEFI Secure Boot enabled in firmware, and the   following kernels present on your system are unsigned:      4.19.6      These kernels cannot be verified under Secure Boot. To ensure your   system remains bootable, GRUB will not be upgraded on your disk until   these kernels are removed or replaced with signed kernels.     Following kernels are right now installed in my machine, which is listed by running command: dpkg --list | grep linux-image   ic  linux-image-4.15.0-29-generic              4.15.0-29.31                                 amd64        Signed kernel image generic rc  linux-image-4.15.0-39-generic              4.15.0-39.42                                 amd64        Signed kernel image generic ii  linux-image-4.15.0-42-generic              4.15.0-42.45                                 amd64        Signed kernel image generic ii  linux-image-4.15.0-43-generic              4.15.0-43.46                                 amd64        Signed kernel image generic ii  linux-image-4.15.0-45-generic              4.15.0-45.48                                 amd64        Signed kernel image generic ii  linux-image-generic                        4.15.0.45.47                                 amd64        Generic Linux kernel image ii  linux-image-unsigned-4.19.5-041905-generic 4.19.5-041905.201812031110                   amd64        Linux kernel image for version 4.19.5 on 64 bit x86 SMP     kernel version I am running, retrieved by running command uname -a:     Linux dipak 4.19.6 #1 SMP Tue Dec 18 10:30:34 IST 2018 x86_64 x86_64 x86_64 GNU/Linux     Ubuntu distrubution version (lsb_release -a):     No LSB modules are available.    Distributor ID:   Ubuntu   Description:  Ubuntu 18.04.2 LTS    Release:  18.04    Codename: bionic


Solving the congruence $3x^2 + 6x + 1 \equiv 0 \pmod {19}$

I tried to solve this equation but without a success:  $3x^{2}+6x+1 \equiv 0 \pmod {19}$  I concluded hat $x(x+2)\equiv 6 \pmod{19}$, the only way i think to solve this is by just trying all the options. But there must be a more efficiant way.  I would like to get help with that, thanks


How to construct a dynamic xpath with regex pattern

Pattern --> sometext + '(' + F|R|O|H|C + ')'  String toolTipTextLabel = driver.findElement(By.xpath("//span[contains(@class,'chartTooltip-label')]/descendant::bdi[contains(text(),'(F|R|O|H|C)')]")).getText();


What is the difference between 'sudo' and 'su -c'

Is there any difference between using sudo and using su -c? There are situations where one should be used but not the other?  I was previously using Ubuntu where sudo appears to be ubiquitous but now I'm giving Fedora 15 a try and the idiom su -c appears frequently when I'm trying to learn how to do a few things, although I still see sudo being used now and then.


Lagrangian for free particle in special relativity

From definition of Lagrangian: $L = T - U$. As I understand for free particle ($U = 0$) one should write $L = T$.  In special relativity we want Lorentz-invariant action thus we define free-particle Lagrangian as follows:  $$L = -\frac{ m c^2}{\gamma} - U$$  At the same point, we have that definition of 4-momentum implies the kinetic energy is: $$T = (\gamma - 1) m c^2.$$  As you might guess, 1) question is how to relate all these formulas?  2) I do not understand why there is no $1/\gamma$ near $U$ in relativistic Lagrangian?  3) What is meaning of the first term in $L$ for relativistic case?


How can I detect if a user clicks the "X" Button in the top right corner of a Console Application (C# .net)

I know in a WinForm application I can use the "FormClosing" Event Handler. Is it possible to do something like that in a Console application? Im using the .Net Framework


settings bar when I add an object wont let me change anything

when I add an object, what do I do if I cant adjust the setting in the bottom left corner. I have tried changing my preferences and random stuff around blender and I cant find anything that works. what do I do?


Strictly increasing function $f$ such that $f(S)$ is connected.

Let $S=[0,1)\cup[2,3]$ and $f:S \to \Bbb R$ be a strictly increasing map such that $f(S)$ is connected.Can i say that $f$ must be continuous ? According to me $f$ being monotone so only jump discontinuity and since image is connected so no jump discontinuity and hence continuous. Am i right?


\includegraphics[width=1in]{space.jpg}    This shows an error:  Latex Error: Cannot determine the size of graphic no bounding box  I am new to LaTeX, I learned and installed it in an hour. I need to submit the term paper written in LaTeX by tonight. A kind request, even if you feel like my efforts are inadequate, help me out. I tried my best.  Just tell me the reason of error and how to fix it. I am using MikTeX and TeXnicCenter.


How to split a string into couple of strings in C++?

First I do not want to use boost library. I have a program which is reading a line and saving it to a string:  ajf938    sshd         Thu Mar 27 23:25   still logged in  c110-20-242-157.mirnd4.nsw.optusnet.com.au   And then I am trying to split it into 5 string. However the size of each element in string will be changed. The other string can be like:  jcm995    sshd         Thu Mar 27 15:18 - 15:19  (00:00)   192.131.251.2   What I already have is   pos=name.find(' ',0); cout<<pos<<endl; string username = name.substr(0,pos); cout<<username<<endl;   And then I look for fist not character from that position:  find_first_not_of(' ');   But I think there should be other efficient way. Any idea will be appreciated.  UPDATE:  This is what I have done so far:  if(name.find('(',0))         {             string username;             string date;             string duration;             string hostname;             int val = 0;             istringstream iss(name, istringstream::in);             string word;             while( iss >> word )             {                 if(val==0){                     username = word;                 }                 else if(val>1 && val<6)                 {                     date +=" "+word;                 }                 else if(val==6){                     duration = word;                 }                 else if(val == 7){                     hostname=word;                 }                 val++;             }             cout<<"usename= "<<username << " date= "<<date <<" duration= "<<duration<<" hostname= "<<hostname<<endl;          }


Prove the annihilator of a quotient module is a 2 sided ideal.

R is a ring and  is a left ideal of R.  Since R is a ring, it can also be considered as an R-module, therefore I is a submodule of R and the quotient R/I is an R-module.  I am trying to solve the following question: Show Ann(R/I) is a 2-sided ideal of R.  I have found a lot of similar questions online that prove Ann(M) is a 2-sided ideal where M is a submodule of an R-module. I was wondering if R/I is considered to be a submodule?


Evaluate $\int_{0}^{1} \frac{\log(x)}{\sqrt{1 - x^2}}$ complex integration

Evaluate: $$2\cdot\int_{0}^{1} \frac{\log(x)}{\sqrt{1 - x^2}} dx$$  Using Complex Integration.  I want to do something with the unit circle, but I am not quite sure how to work-around with the unit circle and the integral.  Will someone have an idea?  Thanks =)


Find three Poisson-distributed random variables, pairwise independent but not mutually independent

I am asked to give an example of three Poisson-distributed random variables which are pairwise independent, but are not mutually independent.  I thought of the example about the Intersection where cars are coming from one side and they can go to one of three directions left, right or keep straight, with probabilities $p \ $, $q \ $ and $1-p-q$, respectively.  However, I find it hard to prove.


Take a look at this document:  \documentclass[twoside]{article}  % For blind text \usepackage[english]{babel} \usepackage{blindtext}  % To make sections begin on new page \usepackage{titlesec} % Command for new sections beginning on new page \newcommand{\sectionbreak}{\clearpage}  % Headers \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} % Header on top right on odd pages \fancyhead[OR]{{\textsc{\leftmark}}\quad\quad\thepage} % Reader on top left on even pages \fancyhead[EL]{\thepage\quad\quad{\textsc{\leftmark}}} \renewcommand{\sectionmark}[1]{\markboth{#1}{}}  % Otherwise colors won't work! \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}  \begin{document}  \section{Section 1} \blindtext[2]  \section{Section 2} \blindtext[2]  \section{Section 3} \blindtext[2]  \section{Section 4} \blindtext[2]  \end{document}   Nice, no? But how boooorrrriiing. No color, no nothing. This hasn't had Carliste's magic touch yet. But fortunately, LaTeX supports color, and I'll use them!  Now, there are some ways to change the  according to the section number. However, I want to do something similar, but different: I want to change the color of the header according to the section number, with my own custom colors. Oh, this changes everything.  So, what did I try? I using a nested ifthenelse statement to get the wanted result. I also tried pulling my hair out and browsing answers for hours. But back to the ifthenelse statement – I really don't get why this doesn't work:  \documentclass[twoside]{article}  % For blind text \usepackage[english]{babel} \usepackage{blindtext,ifthen}  % To make sections begin on new page \usepackage{titlesec} % Command for new sections beginning on new page \newcommand{\sectionbreak}{\clearpage}  % Headers \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} % yum yum yum \ifthenelse{\equal{\thesection}{1}}{\fancyhead[OR]{\textcolor{red}{{\textsc{\leftmark}}\quad\quad\thepage}}}{\fancyhead[OR]{\textcolor{blue}{{\textsc{\leftmark}}\quad\quad\thepage}}} % Reader on top left on even pages \fancyhead[EL]{\thepage\quad\quad{\textsc{\leftmark}}} \renewcommand{\sectionmark}[1]{\markboth{#1}{}}  % Otherwise colors won't work! \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}  \begin{document}  \section{Section 1} \blindtext[2]  \section{Section 2} \blindtext[2]  \section{Section 3} \blindtext[2]  \section{Section 4} \blindtext[2]  \end{document}   This technically should make the first page header red and the second page header blue, but I think the engine has short-term memory loss (or maybe I'm not using it correctly – this is more likely the correct answer, but I don't want to admit it) but it's all blue, as if it doesn't heed or notice my meticulously crafted ifthenelse statement, which would have been much, much more intricate had it responded to me the first time (i.e. with the example above).   Now I need some help, which preferably doesn't involve the use of xcolor's color series (I mean, it's almost what I want, but unfortunately you're only able to choose the first and last color manually – every other color in between is a user-defined gradation between the first and the last one. Unfortunately this gradation has a mathematical basis and can't be manipulated into using just any random color which satisfies human want (as far as I can tell, anyway).  Also, maybe sometime in the future I would like to expand this to subsections, but I think I'll be able to figure out that bit by myself if I get a proper header with this question :) thanks :)


How to show the filesystem type via the terminal?

Possible Duplicate:             How can I quickly check the filesystem of the partition? Can I do that by using df?


Window control mnemonics in gnome shell ubuntu

I have switched to gnome shell in my ubuntu 16.04. I often use ALT + Space and then 'c' to close, 'n' to minimize the window. But, I haven't found them in gnome shell. As shown in the first picture, there is no mnemonics highlighted .   Also, Switching to other window of same application wasn't showed under it...  I can only see Quit... Ref Image2


I don't know the best way to describe it in technical terms, but what is the result of a continuing logarithm of $z$, for example:  $$\log(\log(\dots\log(z)))$$  Where it is taking the logarithm of the logarithm and so on, for an infinite amount of times?  How would this type of thing behave? Does it converge, go off to infinity or an infinitesimal? Does the resulting behavior depend on whether $z$ is imaginary or real? Positive or negative?


Have a look at   One of the bolds works, and the other one just turns up as ** in the actual post.  This is the string that isn't working: **x**ml n**ib**  Which renders as: xml nib


Do photons and cosmic rays radiate energy through gravitational waves? If not, why not?

Due to the mass-energy equivalence, both matter and EM radiation bend spacetime, and both are capable of forming singularities (black hole, white hole/kugelblitz). In light of this, why do photons traveling from the most distant reaches of the observable universe not lose energy due to the gravitational radiation they must emit? Furthermore, mustn't cosmic rays (e.g. protons) slow down or stop as they lose energy through the same mechanism?


How to show that $\lim a_n\geq\lim b_n$?

Suppose $(a_n),(b_n)$ are two convergent sequences such that there exists some $N\in\mathbb{N}$ such that $a_n\geq b_n$ for all $n\geq N$. Then $$\lim_{n \to \infty} a_n \geq \lim_{n \to \infty} b_n.$$   This is an obvious fact but I'm not sure how to formalize the proof.  Take the subsequences $a_{n_k}$ and $b_{n_k}$ which are defined to be the $N$th tail of $(a_n)$ and $(b_n)$ respectively. Since every subsequence of a convergent sequence converges to the same limit, we have $$\lim a_n=\lim a_{n_k}\geq \lim b_{n_k}=\lim b_n.$$  Is there a better proof than this?


Autodetect spell-checker language in Chrome using custom rules?

In the Chrome web-browser (current version: 32.0.1700.41 m Aura), how can I have Chrome AUTOMATICALLY detect the spell checker language for input fields, using sets of custom rules, for example:   Depending from the current domain, for example: *.de // changes spell-checker language to German englishforum.com // changes spell-checker language to English etc. etc. Autodetect using a smart algorithm (used when not covered by #1): Internally uses the activated spell checker languages and tests which language produces the least amount of errors, then changes the spell checking language to this language.   Is there a Google Chrome extension for this?


How to extract "fields" from JavaScript Object

This is my spinet:  $scope.foodtypes = {    'GRAINS': {       'HOT': ['Rice','Beans','Sogum'],       'ROOT': ['Yam','Potato','Cassava']    } }     I like to store the exact word "GRAINS" or "ROOT" in a variable for decision making:  something like:  if foodtypes is "GRAINS"     then ......  if foottypes is "ROOT"   then ......  Please how do I capture "GRAIN" or "ROOT" for use?


How can I show that the units $u$ of $R=\mathbb Z[\sqrt{2}]$ with $u>1$ are $(1+ \sqrt{2})^{n}$ ?   I have proved that the right ones are units because their module is one, and it is said to me to do it by induction on $b$ and multiplication by $-1+\sqrt{2}$. I have already shown that the units of this ring has norm $1$ and all the numbers with norm $1$ are units, this may help.


While using the Bernoulli's equation to deduce the upthrust on an aircraft , a statement is always made that     The air particles going above th wing have to cover a greater distance in same time than those going below, so they travel at a higher speed which causes the pressure difference.   But why do they have to cover greater distance? Why do the particles have to meet at the ends of wing again?


Proof for inequality containing a summatory and a product

Given the following inequality:  $$\sqrt[N]{\prod_i^N x_i} < \frac{1}{N} \sum_i^N x_i$$  for $x_i \in \mathbb{R^+_0}$ (positive reals) and $N \in \mathbb{N}^+$ (positive integer).  How can I prove that it is valid for the above conditions?    BTW: what is the english word for the $\prod$ operation? It has a name in spanish () but I have not been able to find a name for it in english other than "product".


Reason of strange output of a c++ program


Mention impact factor or conference acceptance rate in CV

Some people, in their CV or publication list, add bibliometric information to each entry. I've typically seen:   mention the impact factor of each journal number of citations of each paper mention the acceptance rate of each conference   I'm not sure it is very helpful: people from your field will surely know the journals/conferences, while people from outside your field might be more interested in a “macro” view and not go into the minute details of your publications.  Moreover, I'm not sure I like the tone it conveys: it feels like bragging (this is typically done by people who are proud of these indicators), and a bit over-the-top to me. Finally, it's well accepted by now that things like the journal impact factor are a poor measure of individual papers' merits.  So: is it accepted practice to do it? does it improve the CV? or does it risk alienating the reader?


Proving the probability triple resulting from the extension theorem is complete

One of the exercises in the textbook I'm using for self-study on measure-theoretic probability theory is as follows:   Prove that the extension $(\Omega, \mathcal{M}, \mathbf{P}^*)$ constructed in the proof of [the extension theorem] must be complete, meaning that if $A \in \mathcal{M}$ with $\mathbf{P}^*(A) = 0$, and if $B \subseteq A$, then $B \in \mathcal{M}$.   Some background on definitions first:   $\mathbf{P}^*$ is defined as the outer measure generated by $\mathbf{P}$ on all the subsets of $\Omega$, and it's been proven that $\mathbf{P}^*$ is monotonic on every subset of $\Omega$. $\mathcal{M}$ is, in turn, defined as $\{ A \subseteq \Omega\ \mid\ \forall E \subseteq \Omega : \mathbf{P}^*(E) = \mathbf{P}^*(EA) + \mathbf{P}^*(E \overline{A}) \}$. Since $\mathbf{P}^*$ is proven to be subadditive, we can replace the predicate with $\mathbf{P}^*(E) \geq \mathbf{P}^*(EA) + \mathbf{P}^*(E \overline{A})$ which is sometimes easier to show.   So, here's the proof of the lemma in the exercise:  \begin{align*} \forall E \subseteq \Omega\ :\ &\mathbf{P}^*(EB) + \mathbf{P}^*(E\overline{B}) \leq \qquad (\text{by monotoniciy and } EB \subseteq B) \\ & \mathbf{P}^*(B) + \mathbf{P}^*(E\overline{B}) \leq \qquad (\text{by monotonicity and } B \subseteq A) \\ & \mathbf{P}^*(A) + \mathbf{P}^*(E\overline{B}) = \qquad (\text{by the lemma condition}) \\ & \mathbf{P}^*(E\overline{B}) \leq \mathbf{P}^*(E) \qquad (\text{by monotonicity and } E\overline{B} \subseteq E). \end{align*}  So, to sum it up, we have $\forall E \subseteq \Omega : \mathbf{P}^*(E) \geq \mathbf{P}^*(EB) + \mathbf{P}^*(E \overline{B})\quad\blacksquare$  The problem with this proof that I immediately see is that I haven't used the condition of $A \in \mathcal{M}$ (or I truly missed where I used it implicitly). Is it really not necessary, or have I done a mistake somewhere?


Comparison of limsup of two particular sequences

I'm reviewing my analysis, and have found the following problem on an old exam. I don't know how to solve it, so I'm hoping that, if someone can explain it to me, I can gain some familiarity with a technique that I must be overlooking.  I'm also very happy for any hints anyone may drop in the comments!  Let $\{a_n\}_{n\in\mathbb{N}}$ be a sequence taking values in the positive real numbers. Prove $$\limsup a_n^{1/n}\leq\limsup \frac{a_n}{a_{n-1}}$$  My main idea is to try to use the inequality $\limsup a_nb_n\leq (\limsup a_n)(\limsup b_n)$ to manipulate this into something nicer, but I can't quite see how to do that, and this may be altogether the wrong approach.


du -sh and df -h are giving different output

I got an alert stating that 3 of my mount points are 91 % full and i need to clear the files. When I run df -h command it states that the mount points are 91% full but when i try to run du -sh * in the directory where i want to clear file it does not show me much of space occupied hardly 1 GB. Further when i run  find /mount-point -xdev -size +100000000c -exec ls -lhtr {} \;  it dose not provide a satisfactory output in terms of file size.   Can you help me out to find the solution for the above? What i thought is that finding the list of open files for that mount point and then kill the PID so that if any dead files consuming space may be cleared out, but i am not able to find a method to do that.   (Cant find the syntax of fuser and lsof in solaris 10 to do this)


I'm trying to parse the xml-response from the amazon api.  This is a part of the received xml-file:  <BrowseNodeLookupResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2011-08-01">   <OperationRequest>     <RequestId>31317fca-ad3d-4ff0-a64f-693c0e44959b</RequestId>     <Arguments>       <Argument Name="Operation" Value="BrowseNodeLookup" />       <Argument Name="Service" Value="AWSECommerceService" />       <Argument Name="Version" Value="2011-08-01" />       <Argument Name="BrowseNodeId" Value="186606" />       <Argument Name="Timestamp" Value="2015-01-04T11:50:06Z" />       <Argument Name="ResponseGroup" Value="BrowseNodeInfo" />     </Arguments>     <RequestProcessingTime>0.002221</RequestProcessingTime>   </OperationRequest>   <BrowseNodes>   I want to read the Argument Timestamp. This is my code, but it only work if I remove the xmlns attribute in the xml-file.       Dim nodeTimestamp As XmlNode = doc.SelectSingleNode("/BrowseNodeLookupResponse/OperationRequest/Arguments/Argument[@Name='Timestamp']")      Dim text As String = nodeTimestamp.Attributes.ItemOf("Value").InnerText


The sort method Collections.sort(list) works on the list even though I pass by reference. However, when I use the following method, the list does not get sorted.  public void getSortedList(ArrayList<String> currList) {     ArrayList<String> list = new ArrayList<>();      Cursor cursor = database.rawQuery(             "SELECT * FROM " + TABLE_NAME + " ORDER BY name DESC", null);      while (cursor.moveToNext()) {         String name = cursor.getString(0);         if (currList.contains(name)) {             list.add(name);         }     }     cursor.close();      currList = list; }


A girl I met online says the travel agency she went to says she can't get a B2 visa to the US because she took a loan out to pay for her trip. Under Russian law she has to pay back a 680 US dollar loan to get the visa. She says the US embassy won't let her get an interview for the visa. Is this a scam? It sounds fishy to me. Can she get a visa and leave Russia?


I have a bigger table in my document, including several urls. I made them active with the \url{...}-command, and now I wanted to make them multi-line-cells by using the \specialcell{..\\..}-command, which is defined as  \newcommand{\specialcell}[2][c]{%   \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}   But this combination (\specialcell{\url{a\\b}}) does not result in a multi-line url, but instead in the url a\\b. Is there another way to get a multi-line url in a table cell?


Connect a 5-Ring to two 6-Rings in chemfig

\chemfig{*6(-(*5(---))-(*6(------))----)}   gives me that:   How do I connect it like this?     EDIT: Thanks to all suggestions I came up with this:  \documentclass{article}  usepackage{chemfig} \begin{document} \chemfig{[:30]*6(-([:6,1.0705]*5(-=-))-(*6(------))----)} \end{document}   Which produces this:    Explanation: The structure is made up from two regular hexagons and three sides of a regular pentagon, with the sides of the pentagon enlarged by a factor 1.0705 to make the two ends correspond to the vertices of the hexagons. This approach has an advantage in that the double bond is considered as part of a ring and drawn properly as such. The enlargement factor comes from solving the equation that sets the width between the two ends of the "half pentagon" equal to the width between the vertices of the hexagons:  2 cos(30 deg) l = l' + 2 sin(18 deg) l'  where l is the length of the hexagons' sides and l' is the unknown, the length of the pentagon sides. Solving for l' with l = 1 yields to  (2 cos(30 deg))/(1 + 2 sin(18 deg)) = 1.0705  The rotation has to be figured with some sums and differences over the angles involved in the structure. For brevity's sake let's just say the 6 deg angle comes from 18 + 18 - 30 deg.


How to create a unique identifier in the attribute table based on spatial location within another layer?

I am currently working in ArcGIS 10.2.2 for Desktop and would like to know if there is a workflow for creating a unique ID for polygons within a shapefile based on their location. I am using data driven pages that are clipped to individual Township/Range/Sections of a city. There is polygon information that spans the entire city, but would like to create some type of unique identifier that allows users (of the exported attribute table) to quickly see where a polygon is located based on the identifier. What I currently have in mind is to list the Township/Range/Section and add a numeric suffix. For example, in the image below the first polygon in Township26-Range42-Section27 (highlighted in red) would be 26-42-27-1. The Township/Range/Section information is saved in another shapefile, so I am not sure the best process to append that info to the individual polygons within this other shapefile based on location.


How to remove/install a package that is not fully installed?

I went to install bsnes the other day and, for whatever reason, the installation failed. Now, I cannot update, install new packages, or do basically any apt-get commands as they all try to process this broken package and fail. Attempting to install a new package also just dooms it to the same fate. The error I get is: Setting up google-chrome-stable (33.0.1750.152-1) ... /var/lib/dpkg/info/google-chrome-stable.postinst: 124: /var/lib/dpkg/info/google-chrome-stable.postinst: update-alternatives: not found dpkg: error processing google-chrome-stable (--configure):  subprocess installed post-installation script returned error exit status 127 Setting up bsnes (0.088-7) ... /var/lib/dpkg/info/bsnes.postinst: 5: /var/lib/dpkg/info/bsnes.postinst: update-alternatives: not found dpkg: error processing bsnes (--configure):  subprocess installed post-installation script returned error exit status 127 Errors were encountered while processing:  google-chrome-stable  bsnes E: Sub-process /usr/bin/dpkg returned an error code (1)  I have been searching on Google and here on Ask Ubuntu but have not found a working solution. The commonly suggested fix is to run the following: sudo apt-get clean && sudo apt-get autoremove sudo apt-get -f install sudo dpkg --configure -a  This however does not work. The apt-get commands all fail with the same error as above and the dpkg command just doesn't help. The other thing they often suggest to purge it via Synaptic or the command line, which also fails.


How did Newton find out gravity is proportional to the product of two masses?

I am going to ask a really stupid question here. It is a very well known fact that gravity is inversely proportional to the distance squared between two masses. I understand how he arrived at this idea using Kepler's law and centripetal acceleration. But I was wondering how he found out that gravity is proportional to the product of two masses. Is this something obvious that I am too dumb realize or is there other proof behind this?


How to uninstall Ubuntu from a dual boot system?

Possible Duplicate:          I have dual boot laptop having two os windows 7 and Ubuntu. I want to remove ubuntu and merge space with windows.


If a coin toss is observed to come up as heads many times, does that affect the probability of the next toss?

A two-sided coin has just been minted with two different sides (heads and tails). It has never been flipped before. Basic understanding of probability suggests that the probability of flipping heads is .5 and tails is .5. Unexpectedly, you flip the coin a very large number of times and it always lands on heads. Is the probability of flipping heads/tails still .5 each? Or has it changed in favor of tails because the probability should tend to .5 heads and .5 tails as you approach an infinite number of trials?  I understand that flipping coins is generally a stochastic process, but does that change at all if you see a large number of trials bias to one side?


Comment out different and disconnected part of codes without doing it manually

I have a long draft I am working on. In the draft, there are comments which are not meant to be public, but that I add in order to guide my work. Sometimes, I need to share my draft (e.g. with my advisor, send it to conferences, etc.) and I have to manually comment out the comment blocks in the draft.  I wonder if there is a way to create some "comment environment" that I can decide to compile or not with one line at the beginning of the document.


difference of uniform continuity and continuity of map

$f:X\rightarrow Y $ is continuous iff every open ball in $Y$ has open pre-image. It is between topological spaces.  $f:X\rightarrow Y$ is uniformly continuous if $\forall \epsilon >0,\forall x \in X, |x-y|<\delta \implies |f(x)-f(y)|<\epsilon$.  My question is what is the difference between uniform continuity and continuity of a map.


Specific non-singular matrix A and its relation to linearly independent vectors

I am trying to prove the following:   The $m$ vectors $x_i$ are linearly independent if and only if the $m \times m$ matrix $A$ defined below is non-singular   $(i,j) \space element \space of \space A = \langle\ x_i,x_j \rangle\ $  I am confused by what this statement is saying, specifically what matrix A looks like. If we have a matrix where   $\begin{bmatrix}\langle\ x_1,x_1 \rangle\ & \langle\ x_1,x_2 \rangle\\ \langle\ x_2,x_1 \rangle\ & \langle\ x_2,x_2 \rangle\ \end{bmatrix}$   Is such a matrix even possible? I considered the one by one case  $\begin{bmatrix}\langle\ x_1,x_1 \rangle \end{bmatrix}$   This one by one matrix doesn't seem possible since whatever value is put into the first entry has to equal the square of itself.   I must be misunderstanding somehow. I considered the possibility that the question was asking to prove the following statement: the column or row vectors of a matrix are linearly independent if and only if the matrix is non-singular. Is this correct and should I go ahead and prove this statement instead? I suppose the notation throws me off.   Any insight or help would be greatly appreciated!


What are years based on in the saga "A Song of Ice and Fire?"

In these books there is quite a lot of focus on realism - there are weight units and length units based on things corresponding to the society's technological stage, and many things are based on internal events in that world. However, since there is so much focus on these details, I wonder what are years based on? In the real world we have developed them because of the cyclic changes of weather, but in this world these changes are irregular, and summers and winters are both stated to last years. So, what is a "year" based on in that world?


Find the volume of rotation about the y-axis for the region bounded by $y=5x-x^2$, and $x^2-5x+8$  Here is an image:    Normally I can do this question, but this one is tricky because since we are rotating about the y-axis, and we are quadratic, when I solve for $x$ I get two answers, one positive and one negative.   What I mean is that if you look at the graph $5x-x^2$, then there are two halves, and if you look at the green line, that's one half of the curve (positive one), and the red half is the negative one.  Since we can see both the negative and positive sections in this graph, and both are being rotated, I wasn't sure how to create the equation that I can later integrate.  Usually in the problems I do, the negative doesn't exist, and so it's trivial. In this case I am not sure.


Searching for an example:  A Banach Space $X$, $A,B$ are operators on $X$ where $AB$ is invertible but $A$ or $B$ is not invertible.  For finite dimensional case we know that result so the example will come from infinite dimension.  Thank You.


Relative Pronouns are ALWAYS added right after antecedent?

Is is a rule that relative clauses should be added right after the antecedent(the noun relative pronouns refer to)? What if it is confusing?   For example:  "I went for a spin with a handsome boy last night."  "The handsome boy went out with my friend."  "I went for a spin with a handsome boy who went out with my friend last night ."  "I went for a spin with a handsome boy last night who went out with my friend."


Regex to not not match exactly against a list

I need to write a regular expression for an html5 input pattern attribute for "is not one of the following items".  How do I make    ab aba ba   into a pattern that matches anything that is not exactly one of these words.  So for example what I want is for   ab - not match abab - match bab - match b - match ab a - match   In other words,  I want the regex equivalent of (in javascript)  ! ['ab', 'aba', 'ba'].some(x => x === term)


Secretary problem - why is the optimal solution optimal?

I have read about this problem:    But I want to see how it is proven that the "optimal" solution is indeed optimal. I understand how to prove that if the optimal solution is of the form "wait for $t$ candidates and then choose the next best one" then $t=n/e$ is optimal; but why is the best strategy of that form in the first place?  A complete proof is not required - a reference to a good text discussing this is good as well.


Surprising difference for Floating-Point Arrithmetic for Double vs Float

var num1 = 1.1 if num1 + 0.1 == 1.2 {print("true")} else {print("false")}   Result: false  var num1: Float = 1.1 if num1 + 0.1 == 1.2 {print("true")} else {print("false")}   Result: true  The former block of code has num1 which represents a double and the latter code block has num1 which represents a float.  My question: Why does the code with Float return true and the one with Double does not?


Is it possible or has some one devised a way where we can update old nokia phone like nokia 6630 to android OS?


Applying for post doc position when letter of recommendation from PhD advisers not available

I did my PhD in Electrical Engineering with supervision from three people. Very hard times during PhD as there was not much supervision from the three. Presently, I am working in an industry doing R and D, but look forward to apply for post doctoral positions. One of my advisers have told me he won't recommend me for any university in the foreign country, the second one is not reachable and the third is very rude fellow. In short, I wont get recommendation from any. What are chances for a post-doctoral position in a reputed university.  I have 3 international journals (2 Elsevier and 1 IEEE) and 3 conferences from my PhD work. I also have a Best Paper Award from one of the main IEEE conferences (EMBC 2014). I can manage reference letters from my masters advisers. Will recommendation from my masters advisers sufficient for applying to post-doctoral studies? Chances of getting a recommendation from any faculty from the university where I did PhD is very low.


If question was deleted during manual refreshing iOS app shows this text:         Tapping on the "Open in Chrome" link opens incorrect URL:         App Version: 1.6.2.5 Device: iPad Air 2 (Wi-Fi) OS Version: Version 10.2 (Build 14C92)


Yakkety Yak MATE rc.local does not exist

I am new to posting here and am unfamiliar with the protocols. I saw a reference here   and tried using that command  The command was  sudo systemctl enable rc-local.service   That command, for me, in 16.10 MATE provides the following (can't work out the formatting here, regrets:  $ sudo systemctl enable rc-local.service [sudo] password for chris:  The unit files have no installation config (WantedBy, RequiredBy, Also, Alias settings in the [Install] section, and DefaultInstance for template units). This means they are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's    .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has    a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer,    D-Bus, udev, scripted systemctl call, ...). 4) In case of template units, the unit is meant to be enabled with some    instance name specified.   Reboot has no effect.


How do I install Ubuntu to a USB drive WITHOUT touching my hard drive boot

Ok, before you say this is a duplicate, please let me explain and then point me to the duplicate answer and I will delete this post. I have searched a bit but I have found no definitive answer or way to do this. I have tried installing Ubuntu onto a USB before without touching my HDD but it installed Grub and then all the boot files on the USB. I have a duel boot Ubuntu/Windows 10 now but not because I wanted to. I originally just had Windows and wanted to install Ubuntu on a flash drive so I could transfer it to any computer like a live .iso file but it failed miserably. It put the boot files on the USB and installed Grub to my HDD and so I could not boot my computer without the USB. I have since turned my computer into a duel boot so now I can boot it fine but I still want to try to install Ubuntu onto a USB in a way that I can transfer it to another computer and it will run like a live copy but with more space (and before you tell me to just create a live one and add a second partition, I tried and it didn't work... several times.) So, is there a sure fire way to do a complete install onto a USB and install Grub only onto the USB in a way that will not touch my current boot status at all?   EDIT:  It's been over a year now and I still haven't been able to do this yet I haven't tried for a long time. When I first tried this, I had a bootable USB and went through the process of installation on the same USB and went through the process of selecting the USB for both installation and GRUB. For some reason, Grub did get installed correctly to the USB but it screwed up my master boot record and would only boot to grub on the USB. This got fixed when I decided to do a full install and it recognized my other boot files. I could have messed up somewhere in the process but I can't remember. I will try doing this again but this time around I will do it in a virtual machine. I will try the solutions you have made and get back with the working solution.


When documenting location, should current or historical place names be used?

When I am documenting records, do I use the name of a city or country as it is called today or as it was in the year an ancestor was there?  Related to:


I need two Apple Developer accounts, one for one type of games and one for another. But I need both to be in my name, and I'd like to use same card for payment. Is it possible and allowed? I cannot find any info on this.


What is "all" in isset($wp_filter['all'])

I'm a newbie in WordPress. I'm trying to understand how it generates the XHTML pages. I guess it's the function of do_action( 'hook-name' ) , but I'm stuck with the understanding of the instruction isset( $wp_filter['all] ) when reading the function do_action because I don't understand what is the meaning of the word all.  Is it a PHP feature or a WordPress one?


I want to use this code below to define theorems style:  \tcbuselibrary{theorems}  \newtcbtheorem[number within = section]{mytheorem}{\emph{Teorema}} {colback = blue!10, colframe = blue!50!black, fonttitle = \bfseries}{th}   I'm having problems to numbering it with the other environments, like definition for example. I tried to define a "ghost" counter  \newcounter{count} \numberwithin{count}{section} \theoremstyle{definition}        \newtheorem{definition}[count]{\protect\definitionname}   So just change number within = section for number within = count .  It almost work, but now theorems are numbered like "1.2.1",  "1.3.1" and so on while definitions (and others) are numbered like "1.2" "1.3" ...   How can I fix this?  Edit: Here's the code used in my initial problem  \documentclass[11pt]{article}   \usepackage[most]{tcolorbox}             %tcolorbox para caixas. \usepackage{amsmath} \usepackage{amsthm}  \newcounter{count} \numberwithin{count}{section}  \tcbuselibrary{theorems}  \newtcbtheorem[number within = count]{teo}{\emph{Teorema}} {colback = blue!10, colframe = blue!50!black, fonttitle = \bfseries}{th}  \theoremstyle{definition}           % use "definition-style" font for the rest. \newtheorem{definition}[count]{\protect\definitionname} \providecommand{\definitionname}{Def}  \title{Test document}  \makeindex \begin{document} \maketitle     \tableofcontents \section{Test section 1}  Here is the section  \begin{definition} Test definition. 1 \end{definition}  \begin{teo}{Teo 1}{} Test theorem. 1 \end{teo}  \section{Test section 2}  Here is the section  2 \begin{definition} Test definition. 2 \end{definition}  \begin{teo}{Teo 2}{} Test theorem. 2 \end{teo}  \end{document}


Converting Polygon into single or all Points using QGIS?

I want to convert polygons into points using QGIS.   I know how it's done in ArcGIS Desktop.


Show $\int_{0}^\infty \frac{x^q}{x^p + 1} dx = \frac{\pi}{p}\csc \frac{\pi(q+1)}{p}$, where $p>q+1$.

Suppose that $p,q$ are positive integers with $p>q+1$. By integrating around the boundary of the region $\{z\in\mathbb{C}:|z|<R,0<\mathrm{arg}(z)<\frac{2\pi}{p}\}$, show that $$\int_{0}^\infty \frac{x^q}{x^p + 1} dx = \frac{\pi}{p}\csc \frac{\pi(q+1)}{p}.$$    My attempt  I feel like I know the general procedure for this... but I feel a bit lost.    Let $C$ be the join of the contours $C_1,C_2,C_3$ where $C_1$ is the interval $[0,R]$, $C_2$ is the arc of the circle of radius $R$, with inclination angle $\frac{2\pi}{p}$, and $C_3$ is the line connecting the origin to $Re^{\frac{2\pi}{p}}$.    Define $f(z) = \frac{z^q}{z^p+1}$. We would like to calculate $$\int_{C}f(z)dz.$$ The roots to $z^p + 1$ are $z= e^{i\mathrm{Arg(z)}}$, where $\mathrm{Arg(z)} = \frac{\pi}{p},\frac{-\pi}{p},\frac{3\pi}{p},\frac{-\pi}{p},\ldots$    Suppose $R>1$. Then the only singularity of $f$ inside the region is $z=e^{\frac{i\pi}{p}}$.    Thus, the residue of $f$ at this singularity is $$\mathrm{Res}(f(z),e^{\frac{i\pi}{p}}) = \lim_{z\rightarrow e^{\frac{i\pi}{p}}} \frac{z^q}{z^p + 1} \\ = \frac{(e^{\frac{i\pi}{p}})^q}{p(e^{\frac{i\pi}{p}})^{p-1}} \\ = \frac{1}{p} e^{i\pi\left(\frac{1-(p-q)}{p}\right)}.$$    Now looking at my answer, I'm not sure how to involve a $\csc$ there, or even go ahead with the problem.


What are the open sets in $\mathbb{Q}$ wrt euclidean topology?   Basically I want to know whether an arbitrary open set in a metric space is countable union of closed sets or not, with or without depending on the locally compactness of the metric space.


So for some MOSFETs, specially with Power MOSFETs, the body diode is a flyback diode that (as far as aI can tell) can be conveniently added to the MOSFET's bulk as there already PN junctions (correct me if I'm wrong).  I've looked at the datasheet of a Power P-MOSFET and it has parameters like "Internal Source Inductance" and "Internal Drain Inductance". So, is the build up of reverse voltage on the source and drain sides, when said MOSFET is suddenly turned off, a behavior intrinsic to (at least some) MOSFETs? Or are these from the rest of the circuit, say inductive loads?


Continuous numbering of figures and tables

I want the figures and tables to be numbered 1, 2, 3, ... until the end of the document instead of 1.1, 1.2, ... in chapter I, 2.1, 2.2, ... in chapter II and so on.  I know how to convert the "chapter" part of figure/table numbers from Roman to arabic:  \renewcommand \thefigure     {\ifnum \c@chapter>\z@ \@arabic\c@chapter.\fi \@arabic\c@figure} \renewcommand \thetable     {\ifnum \c@chapter>\z@ \@arabic\c@chapter.\fi \@arabic\c@table}   One could modify the above code in order to remove the "chapter" part, but the figure/table counters would still be reset to 0 at the start of new chapters.


How to handle both a single item and an array for the same property

I have an incoming JSON payload that with the parameter device_config. This parameter might be, at times, sent as an array of strings or a string. How would I handle this parameter when its being sent    {     "device": [       "1337966815",       "6815133796",       "3796136815",     ]     "device_config": [       "sensor a",       "sensor b",       "sensor c",       "sensor d",       "sensor e"     ]   },   {     "device": [       "9337966001",       "7815133002",       "8796136003",     ]     "device_config": ""   }


Must the derivative of the wave function at infinity be zero?

I came across a problem in Griffiths where the derivative of the wave function (with respect to position in one dimension) evaluated at $\pm\infty$ is zero. Why is this? Is it true for any function that evaluates to zero at $\pm\infty$ or is there a special constraint on the wave function that I am forgetting?


App can't find libs even though they exist

I'm trying to launch an application (lets call it test), but it fails giving the following error:  ./test ./test: error while loading shared libraries: libuuid.so.1: cannot open shared object file: No such file or directory   Although this library does exist:  locate libuuid.so.1 /lib/x86_64-linux-gnu/libuuid.so.1 /lib/x86_64-linux-gnu/libuuid.so.1.3.0   It also can be found when using sudo ldconfig -v under the same folder.  Running ldd on the app gives the following info:  ldd test  linux-gate.so.1 =>  (0xf76fe000) libsteam_api.so => ./libsteam_api.so (0xf7665000) libcrypto.so.1.0.0 => ./libcrypto.so.1.0.0 (0xf74ba000) libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xf736d000) libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xf730d000) libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf72f3000) libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf72d7000) librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf72ce000) libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf72c8000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7282000) libuuid.so.1 => not found libc++.so.1 => ./libc++.so.1 (0xf71d8000) libcxxrt.so => ./libcxxrt.so (0xf71b9000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7008000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf6feb000) libiconv.so.2 => ./libiconv.so.2 (0xf6f07000) libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf6e1e000) libasound.so.2 => not found libssl.so.1.0.0 => ./libssl.so.1.0.0 (0xf6dc7000) libopenal.so.1 => not found libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xf6da5000) libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xf6d8d000) libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf6d7a000) libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xf6d75000) libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xf6d6f000) libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xf6d6c000) libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xf6d54000) libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xf6d4e000) libxcb-dri3.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri3.so.0 (0xf6d49000) libxcb-present.so.0 => /usr/lib/i386-linux-gnu/libxcb-present.so.0 (0xf6d45000) libxcb-sync.so.1 => /usr/lib/i386-linux-gnu/libxcb-sync.so.1 (0xf6d3e000) libxshmfence.so.1 => /usr/lib/i386-linux-gnu/libxshmfence.so.1 (0xf6d3b000) libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xf6d35000) libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xf6d27000) /lib/ld-linux.so.2 (0xf76ff000) libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xf6d23000) libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xf6d1c000)   So I'm missing 3 libraries in total, although all of them can be found using locate or sudo ldconfig -v.  I've tried using sudo ldconfig, and it did not change anything. I've also tried setting LD_LIBRARY_PATH to the directory of library.


I do not like to retype fish every time I start terminal. I want fish on by default. How can I set fish shell as my default shell on a Mac?


arcpy.env.overwriteOutput = True not working for one dataset

I am doing a basic copy from sde database to file geodatabase. I have a loop going through each feature dataset in the sde database, this loop is really basic it just uses arcpy.Copy_Management to copy everything over. I have arcpy.env.overwriteOutput = True at the beginning of the script after importing in arcpy. It does not throw me that error for any other feature dataset, even though they are also overwriting a FeatureDataset with the same name.   the error it throws is  :      ERROR 000605: Output Sidewalk already exists within   C:\Users\stack\Desktop\Testing\scripts\Dump.gdb\Sidewalk. Failed to   execute (Copy).   I even added arcpy.env.overwriteOutput = True to the beginning to of the function. I also put a line in the exception the prints out the status of env.overwriteOutput and it is true at that time when it breaks.  This does not make any sense to me. Has anyone else had this problem?


Adding additional images to CSS background

I'm attempting to add three social media icons through CSS. The company logo was added to the website through CSS (images/logo.png).   I've attempted extensions by adding commas, but that causes the entire logo to disappear.  Any CSS advice here would be greatly appreciated.  Update  The "duplicate" in question didn't address the position overlap issue I was having.  The multiple images issue is now resolved. The only issue I'm running into now is applying individual links to each social media button.  Any advice?  #heading h1 {     text-align: left;     font-weight: normal;     margin: 0px 0px 0px 0px;     padding: 0px 0px 0px 0px;     height: 92px;     background:#396ba5 url(images/logo.png) no-repeat 495px 0px; }


We are using SQL Server 2008 with full recovery model, the database size is 10 GB and the log file is 172 GB, we want to clear up the space of the log file internally ,we did transaction log file backup it should be clear up, but it still 172 GB ,what to do?


How to setup limit for process to memory usage?  Similar to open files limit in /etc/security/limits.conf:  ubuntu           soft    nofile          4096 ubuntu           hard    nofile          8192   E.g. while I'm launching python script with raw eval of json data from 1.1G file, python takes whole of RAM, while creating objects around each dict and list in json.txt. It hung my machine for 20-30 minutes. Thereafter:  # python read_data.py Killed   Ubuntu System is very stable today. Its recovery from hung. Swap going to 8Gb of usage. RAM completely empty, script going off.  I'm trying to find, is this limit, which killed my script configurable? Can I tune my system in such way, that every process, which takes more than 70% of current RAM size would be just killed or stopped or something.


Intermittent error with imgur when uploading images?

I just tried to upload an image as part of answering a question and I get a placeholder indicating that the image isn't present;     If I try and access the image using its URL directly I get the following;     Doing a bit of a further lookup on the IP address reported in this error message (since it changes with each request), these don't even seem to be IP addresses that are related to me at all;  IP Address        198.7.20.199  Host              198-7-20-199.edgecastcdn.net  Location          US US, United States  City              Santa Monica, CA 90405  Organization      EdgeCast Networks   Is this just me experiencing this issue or is this a more general issue with imgur or stackexchange linking to imgur?


Proving the generalized associativity for groups

Let $(G, * )$ be a group . For any $a_1,...,a_n \in G$, the value of $a_1 * ... * a_n$ is independent of how the expression is bracketed. Attempt: hint is to use inducition . Notice that for $n=3$ we have $$ (a_1 * a_2 ) * a_3 = a_1 * (a_2 * a_3) $$ and there is not other way to place the parenthesis but is true by definition. Now, $n=4$ let try see all possible ways to place the parentesis: $$ a_1a_2a_3a_4 = ((a_1a_2)a_3)a_4 = (a_1 (a_2a_3)) a_4 = a_1 ((a_2a_3)a_4) = a_1(a_2 (a_3a_4)) = (a_1a_2)(a_3a_4)$$ Let us assume it is possible to do so for some $n$: that is Let $S_n$ be the statement that: value of $a_1...a_n$ is independent of how we place parenthesis. We prove $S_{n+1}$ is true.Let $A = a_1...a_n$. Now express this as $$ A = (...(a_1...)))a_{n-1}) a_n $$ Now, consider $A a_{n+1}$. That is, $$ A * a_{n+1} = (...(a_1...)))a_{n-1}) a_n * a_{n+1} $$ but here I get stuck. Im not quite sure whether the LHS actually can be done... any help would be greatly appreciated.


How to typeset special Apple Mac keyboard symbols?

Is there a standard way to typeset the special symbols of the Apple Mac keyboard? That is, the curly rectangle ⌘ and the others?  If there is none, what would you suggest as workarounds?


I am providing you with food, shelter, clothes.      What more do you need   or      what else do you need?   Which one's correct?


Is there any $n$-dimensional (smooth) manifold $M_{0}$ which has largest symmetry  group, i.e. for any $n$-dimensional manifold $M$, $Sym(M)$ can be embedded in $Sym(M_{0})$? Intuitively, if it exists, I think sphere or whole euclidean space will give answer (because it looks highly symmetric), but I don't know how to show or even such manifold exists.  Is there any known results with more specific conditions? (specific $n$, compact manifold, complex manifold, Riemannian manifold (with isometry group), ...) Thanks in advance.


In the Avengers movie, why is Hulk's behaviour inconsistent?

In the Avengers movie, when      Bruce Banner is on the helicarrier, he becomes angry and transforms into the Hulk. Black Widow happens to be next to him and even though both are on same team, he attacks her and then Thor.  He becomes hostile to everyone on the ship.  But later on, in the fight against Chitauri troops, Hulk is very comfortably self-controlled.    Why is that?    The only thing I could think of is that it has been many days (a year?) since the Hulk had gotten angry, so he couldn't control himself.    But that's lame to be so puny when Bruce Banner was compared to Stephen Hawking in intelligence.


Force a container to fill the residual space

The div container .wrapper under #Wrapper must fill the space between header and footer. So it should get the height of the #Wrapper container.    Could you help me?


How do I create a keyboard shortcut to go to a specific folder?

I have a folder called ~/Documents/Work and I'd like to make the Finder shortcut cmd-shift-W go to that folder, similar to how cmd-shift-H goes to the Home folder (and the equivalent shortcuts for Applications, etc., all under the "Go" menu).  Is it possible to do this? And if so, how can I do it?


Schwarzschild metric, acceleration of ball before it's dropped

The Schwarzschild metric, describing the exterior gravitational field of a planet of mass $M$ and radius $R$, is given by$$ds^2 = -(1 - 2M/r)\,dt^2 + (1 - 2M/r)^{-1}\,dr^2 + r^2(d\theta^2 + \sin^2\theta \,d\phi^2).$$A tower has its base on the surface of this planet ($r = R$) and its top at radial coordinate $r = R_1$. A ball is held at rest by an observer at the top of the tower. It is then dropped and caught by an observer at the bottom of the tower.  What is the acceleration of the ball before it is dropped, i.e., if the ball has unit mass, what force would have to be exerted on the ball to hold it in place?  Here, we are not assuming that $R \gg 2M$ or that $R_1 - R \ll R$.


What is first line written in shell script? What is the meaning of that? If I didn’t write that line what will happen? Then how to run the script?

What is first line written in shell script What is the meaning of that If I didn’t write that line what will happen Then how to run the script


first of all, sorry for the bad english.  I need to convert my mouse coordinates to world coordinates, I'm trying to use the glm unproject method. 1280x720 is the size of the window, It's hard coded just for the test. The View and Projection are my matrices, they're fine and are not related to the problem (or so I guess).  EDIT: Success. The solution is:  int x,y; glfwGetMousePos(&x, &y);  GLint viewport[4]; glGetIntegerv(GL_VIEWPORT, viewport);   y = viewport[3] - y; float depth; glReadPixels(x, y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth);  mousePos = glm::unProject(vec3(x, y, depth), View, Projection, vec4(viewport[0], viewport[1], viewport[2], viewport[3]));   This method seem to have worked.


share login/logout sessions across two installs?

I'm having some issues sharing the user sessions across two installs.   (a) site on  (b) site on   I have installed B in the same database as A and I have defined the user and user_meta tables so I am sharing user data and users etc but I can't seem to bridge the sessions.   I have tried using cookies a few different ways but nothing works.   This is what I'm using in (b) wp-config at the moment with no effect,   define('COOKIE_DOMAIN', 'www.stolenmx.com'); define('COOKIEPATH', '/');        does anyone know how to get this working?   I'm actually using UserPro on site (a) to manage registration and login and I have wp-login.php disabled. Could this be why cookie isn't working cause UserPro saves the cookie elsewhere or just simply doesn't use one?


Which of the following is correct?  If Insurance company or Law Firm have changed their opinion then please let us know.  or  If Insurance Company or Law Firm has changed its opinion then please let us know.


Proving that $ ^\mathbb{Q}\mathbb{R}$~$\mathbb{R}$ using Cantor-Bernstein

I am trying to prove that $ ^\mathbb{Q}\mathbb{R}$~$\mathbb{R}$ .  I want to use Cantor Schroder Bernstein Theorem rather than coming up with a bijection. Any suggestions on how to get started with using this theorem?   Should I begin with a function from  $ ^\mathbb{Q}\mathbb{R}$ to $\mathbb{R}$ or the other way around first? I was also thinking maybe we do not need to explictly find an injection for one direction, instead, we could justify an injection by saying if we take $f\in  ^\mathbb{Q}\mathbb{R}$. Then $f\subset\mathbb{Q}$ x $\mathbb{R}$ and continuing from here somehow.  Would it be best to consider  $ ^\mathbb{N}\mathbb{R}$ instead?


How did rust appear on my cast iron in a matter of minutes?

So this has been an on-going saga the last few days, and I've already posted several related questions here, and I am feeling quite defeated.  I have/had a beautiful 16" cast iron dutch oven from Cabelas. I took it out for a test spin the other night (I had completed all seasoning steps that the Google Gods recommended). Then:   I tried (and failed spectacularly) to cook a pork roast in it, but cooked it at way too hot a temperature and burned/charred/fused the animal fats/juices into the oven, whereby it basically baked into the cast iron (related question ) I tried cleaning/scrubbing it with coarse-grained salt -> did nothing Then I tried cleaning it with dishwashing liquid + salt -> did nothing Then I let the whole thing soak in a vat of a 50/50 mixture of water + white vinegar -> took all the tarry slude off, stripped some seasoning off (revealing bare iron), but in 80% of the burned/charred areas, still did nothing Then I went to town on it with a steel wool and salt and dishwashing liquid and was left with some smooth, properly seasoned surfaces, and some more areas stripped down to bare metal I decided to just re-season it. So I scrubbed it one last time (about 1 hour ago) with a steel wool and some water, got all the rust and remaining crud off (finally), and built a fire. I placed it on the hot coals of the fire and let it sit there for 15 mins. My intention (whether misled or not) was to burn off all the remaining water from when I had previously washed/scrubbed it, then let it cool off, then season it with oil, and then bake it for a few hours.   So I just took the oven off the fire and opened the lid...and the entire inside is covered in rust. An hour ago there was none. When I put the oven into the fire 15 mins prior, there had been none (yes, I checked) This just came out of nowhere.  I'm ready to give up, unless anyone can offer some concrete set of steps for me that will salvage this $100 rust bucket. How can I get rid of the rust and then re-season this before more rust sets in? Meh...


AI story recognition: protagonist turns out to be computer in the end

I had read a story / article about artificial intelligence, I think it was last year (2012) but I'm not sure when it was published. It was on an online blog for an institute I believe. I am telling the story in quotes, just to demarcate where the story begins and ends.  In the story, a scientist is trying to build a perfect AI system which can respond to human interaction perfectly. Apparently the only way this is possible is to make the computer believe that it is human. He creates what he believes is the solution, and asks a friend to volunteer for a test, and the friend agrees. For the test the friend is supposed to step into a tank full of a liquid. As soon as he enters the tank, he is told, he will lose all his sensations - no vision, no hearing etc. After entering the tank, he talks to the computer and responds, and isn't able to recognise that he is in fact talking to a computer. After some time (days? Don't remember) has passed, he begins to worry - why is he still trapped in the tank? At this point the scientist tells him that he is in fact the computer he has made, the memory that he has of the human life till the time he enters the tank has been implanted in the machine, so he thinks he is human. He is not in a tank, he is a computer, and that is why he can't see or feel anything. The story ends here.  It is told from the perspective of the computer itself, but since it is an article in a science blog / forum for a technical college, it feels like you're reading an actual experiment when you start reading. It was a rather nice surprise ending to the story in my opinion. I just can not seem to be able to locate the article / story anywhere. Can somebody who might have read this help me? Even just pointing me in the direction of the site it is hosted on would be great.


I have a 13 mile commute, and I'm looking to buy a new bike

I'm currently riding a mountain bike from Wal-Mart, takes me about an hour. When I get my tax return, I plan buying a more appropriate bike for the commute. I'd like to stay around $300-400, and this would be the second bike I would buy, so I'd appreciate any suggestions and advice.


A 3rd grade math problem: fill in blanks with numbers to obtain a valid equation

Even though this is a 3rd-grade math problem, people found it extremely hard. Any people have a solution, or algorithm is welcome. I'll try make a program base on the algorithm and see if it's correct. And, people are welcome to provide the best solution (least loop, recursion)  Enough said, here's the original: Fill in the blank the number from 1-9 to complete the equation. (probably distinct numbers each blank)    PS: Help me with tags. I'm not sure which tags should I use.  EDIT 1: After a few shortened, here's what I've got:  a + d - f + 12*e + 13*b/c + g*h/j = 87.   So, as you see, the priority does matter.  EDIT 2: Maybe my description is not clear enough, but I think it require to use every number   Like this: an array from [1:9], each fill in the blank remove one component. As Martigan point out, it's like: fill in the blanks using once and only once each number from 1 to 9. Simple math here: There are 9*8*7*6*5*4*3*2 = 362880 possibilitities. (You may correct this simple math if I'm wrong).  And b mod c should = 0 (as only integers appear.)  EDIT 3: I just asked my mom (who's an elementary teacher). She's confirmed that 3rd grade has studied about mathematic priority, so sorry Hagen von Eitzen. Your answer is half right, she'd give you an 7/10.  PS2: People, please share your wisdom and provide the math algorithm.  Sorry for my bad English.


Panic Attacks during an exam - Can the student be re-tested?

I am a student who is currently undergoing therapy for mental health issues and I seem to be making good progress towards normalcy according to my therapist. Recently, I took an exam for a co-ordinated course and I completely panicked on the exam. I made a brave attempt to remain calm and answer the question to the best of my abilities and could only manage to earn 5 points overall.   Based on my predicament, can I approach my professor and department chairperson with a request to re-take the exam? I can of course ask my therapist to provide documentation detailing my case. Do universities make allowances for students who can demonstrate a genuine case for  a panic attack?   EDIT: I do realize that I should contact the counselling center beforehand to make arrangements to take the test there but unfortunately, I was doing quite well and my therapist did not see a need to supply me with a note documenting my need. I completely blacked out when I saw the questions as they were quite long and bore no semblance to the practice exams or the homework questions.


Getting NullPointer implementing a LinkedSet

I am trying to make a LinkedSet object class that implements a modified Set interface. I am getting a NullPointerException when I try and check if the firstNode is pointing to null or not. I'm not really sure how to solve this issue.   Here is relevant code.  Constructor for overall Set object  public class LinkedSet<T> implements Set<T> {      private Node firstNode;      public LinkedSet() {         firstNode = null;     } // end Constructor   Method that is holding me up  public int getSize() {     int size = 1;     Node current = firstNode;      while ((current.next) != null) {         size++;         current = current.next;     }     return size; } // end getSize()   isEmpty() method  public boolean isEmpty() {     Node next = firstNode.next; //Get error here     if (next.equals(null)) {        return true;     }     return false; } // end isEmpty()   Here is private inner class for Node objects  private class Node {     private T data;     private Node next; //Get Error here      private Node(T data, Node next) {         this.data = data;         this.next = next;     } // end Node constructor      private Node(T data) {         this(data, null);     }// end Node constructor  } // end Node inner Class   And lastly here is the main tester method.  public class SetTester {      public static void main(String[] args) {         LinkedSet<String> set = new LinkedSet<String>();         System.out.println(set.getSize()); //Get error here     } }


Determine whether or not a point lies within a rotated rectangle

I need some maths help for a 2D game I am programming. In this game I have a rectangle, specified by its centers' X and Y coordinates, and its width and height. I then rotate this rectangle via  halfWidth = width / 2; halfHeight = height / 2;  rad = angle * TO_RADIANS; cos = FloatMath.cos(rad); sin = FloatMath.sin(rad);  x1 = -halfWidth * cos - (-halfHeight) * sin; y1 = -halfWidth * sin + (-halfHeight) * cos; x2 =  halfWidth * cos - (-halfHeight) * sin; y2 =  halfWidth * sin + (-halfHeight) * cos; x3 =  halfWidth * cos - halfHeight * sin; y3 =  halfWidth * sin + halfHeight * cos; x4 = -halfWidth * cos - halfHeight * sin; y4 = -halfWidth * sin + halfHeight * cos;  x1 += x; y1 += y; x2 += x; y2 += y; x3 += x; y3 += y; x4 += x; y4 += y;   That is working fine.   Additionally I have a point in the same Cartesian coordinate space, specified by pointX and pointY. Now I want check whether or not this point lies within the boudaries of the rotated rectangle -- but unfortunately I do not have a clue how to achieve this :)  Can you help me with this question? Thanks in advance!  Kind regards, Matthias


Relation between Linux and Android kernel versions

I know Android is a modified linux kernel, but does that mean there is any relation between the kernel numbers?  In other words, Is kernel number (for example) 2.6.xx of Android somehow based on or modified from 2.6.xx of Linux? or is it maintained separately?


Are there any animals in the Star Wars universe that are the same as those on Earth?

In  to   , it is established that Star Wars     humans are not related to us at all, though they are anatomically identical   And we clearly have encountered dozens of  of various sorts.  Are there any canonically established animals or insects in the Star Wars galaxy which are "anatomically identical" (as far as we can tell) to Earth animals?    Fine print: For the purpose of this question, I'm going to assume that a random background extra probably doesn't count unless there's a substantial reason to believe its appearance was intentional.   It would have to be referred to by an Earth name (like "human") and also look identical to an Earth animal, as far as we can reasonably tell.   In the case of an offhand mention of an animal without depiction, I would assume it might be an alien analog.


I am new in PyQGIS and am having trouble programming how to copy features between layers.  Goal: from a robust layer (with more fields) copy its features to a 'simple' version layer.  from qgis.core import *  mapLayer = QgsProject.instance().mapLayersByName("MySQL:forexeasy,host=localhost,port=3306 authcfg='z4s291g',tables=avenida_rua|layername=avenida_rua")[0]  # selecionar estrutura dos fields name # criar um feature # clonar os  if (mapLayer.isValid()):     layer = QgsVectorLayer("D:\\workstation\\qgis\\temp\\fid_62.shp", 'lay', 'ogr')      if(layer.isValid()) :         print('init')         features = []         for feature in layer.getFeatures():             features.append(feature)          mapLayer.startEditing()         dataP = mapLayer.dataProvider()         dataP.addFeatures(features)         mapLayer.commitChanges()   Mean while I get this error:  exec(open('C:/Users/LUISMH~1/AppData/Local/Temp/tmp2vbxv1cy.py'.encode('utf-8')).read()) Traceback (most recent call last):   File "D:\OSGeo4W\apps\Python37\lib\code.py", line 90, in runcode     exec(code, self.locals)   File "<input>", line 1, in <module>   File "<string>", line 3, in <module> IndexError: list index out of range   I don't know if I would have to create a feature for the destination layer. And pass on the attributes features from the layer to destination feature. if so how?


How many orbits are possible in the group action?

Let $G$ be the Galois group of a field with nine elements over its subfield with three elements.   Then what is the number of orbits for action of $G$ on the field with nine elements?


Why is there a special site dedicated for Arduino, and not for uC/Embedded stuff?

I don't know if it is a right place to ask, but why isn't a certain low level programming site for embedded systems in the Stack Exchange network?


Is the "English" in the name of this site an adjective of noun?

Sorry, I cannot parse "English language and usage", at least, a similar phrase in Russian would be ungrammatical.


Visual C# (2015) web browser not displaying some fonts

Our marketing department has created web pages that use specific fonts for special purposes.  These fonts get installed onto the local system when our users install our software.  If I view one of these pages in Google Chrome, I can see the icon from a special font just fine (the circled item in the "Download quick start guide" image below):    However, I cannot see the icon from the font in a browser that I implemented using the "WebBrowser" component that is in Visual C# (2015).  I should also point out that I cannot see the font if I view the page with the Edge browser.    My question: Is there a property that I can change (or something else I can do) within the WebBrowser component that will allow the font to display?  Thanks for any assistance!


What happens when a permanent True Polymorphed creature drops to 0?

Assume that a creature was True Polymorphed for the entire duration of the spell and is thus permanently transformed.  When said creature drops to 0, does the creature revert to it's previous form or does it die?  Can you stack True Polymorphs to create an possibly infinite HP pool?