I was trying to get a game working. But I have Lucid Lynx on amd64 running while the game binary was 32 bit (no 64 bit version available and nobody was in the mood for recompiling). It lacked libfsml-windows1.5 to run, and apt-getting it failed. So I have to manually download the i386 packages and force install them. (No, not part of ia32libs.)  Now I'm wondering if there is an automated way to have x86 packages downloaded at least on a 64-bit installation. apt-get -o apt::architecture=i386 did not work. (If you switch the architecture mode it doesn't find the package or assumes missing dependencies for existing packages all around.)  Is there another tool to automate that? Possibly one which downloads the i386 packages and relocates contained libraries into /usr/lib32/ implicitely?

I have a 64-bit version of Ubuntu 13.10.  I want to run a 32-bit version of a program.  However I see ia32-libs is not included in 13.10.  Is there a replacement package for this or what?


Does post selection lead to instantaneous communication between two points in space? Below is the scenario:  Take two entangled qubits A and B. Seperate them out in space. Post select on qubit A to be 1. Immediately qubit B will collapse to 1 irrepective of far apart they are.

I understand that faster-than-light communication is impossible when making single measurements, because the outcome of each measurement is random. However, shouldn't measurement on one side collapse the wave function on the other side, such that interference effects would disappear? Making measurements on "bunches" of entangled particles would thus allow FTL communication, by making observed interference effects appear or disappear. How does such an experiment not:  1) Clearly imply that faster-than-light communication is possible?  or  2) (if #1 is rejected) Imply that measurement of one half of an entangled pair does not cause the collapse of the other half's wave function.  Why doesn't this thought experiment clearly show that if we maintain that FTL communication is ruled out, we must also rule out "universal collapse" in the Copenhagen interpretation?  EDIT: Here is an example of an explicit experiment (though I think experts could come up with something better):  You can entangle a photon with an electron such that the angle of the photon is correlated with the electron's position at each slit of a double slit experiment. If the photon is detected (it's outgoing angle measured), then which-path information is known, and there is no interference. If the photon is not detected, the interference remains.   The experiment is designed such that the photon and electron go in roughly opposite directions, apart from the tiny deflection which gives which-path information. You set up a series of photon detectors 100 ly away on one side, and your double slit experiment 100 ly away in the opposite direction. Now you produce the entangled pairs in bunches, say of 100 entangled pairs, each coming every millisecond, with a muon coming between each bunch to serve as a separator.   Then the idea is that someone at the photon detector side can send information to someone watching the double-slit experiment, by selectively detecting all of the photons in some bunches, but not in others. If all of the photons are detected for one bunch, then the corresponding electron bunch 200 ly away should show no interference effects. If all of the photons are not detected for one bunch, then the corresponding electron bunch 200 ly away would show the usual double-slit interference effects (say on a phosphorus screen). (Note that this does not require combining information from the photon-detector-side with the electron-double-slit side in order to get the interference effects. The interference effects would visibly show up as the electron blips populate the phosphorus screen, as is usual in a double-slit experiment when which-path information is not measured.)  In such a way the person at the photon detectors can send '1's and '0's depending on whether they measure the photons in a given bunch. Suppose they send 'SOS' in Morse code. This requires 9 bunches, and so this will take 900 milliseconds, which is less than 200 years. The point is that such an experiment would only work if you assume that the measurement of the photon really does collapse the wave function nonlocally.


Let $R=\mathbb{Z}[i]=\{a+bi\mid a,b\in\mathbb{Z}\}$, where $i^2 =−1$, and let $I=(3+i)$. Find the exact number of elements in $R/I$.   I know that all element can be written as a real number reminder but does that just mean there is only $0$, $1$, and $2$. But if we take $1+i$ this is equivalent to $-2$ but surely this would go on forever.

I'm trying to get through a proof of Gauss' that certain primes can be written as the sum of two squares. An assumption is that      the order of $\mathbb{Z}[i]/(a+bi)$ is $a^2+b^2$.   I get that $(a+bi)(a-bi)=a^2+b^2$, so this places a bound on the order of integers with no imaginary part. But since $b$ isn't a unit, it doesn't seem like this finishes the proof.  Any hints?


I am reading The C Programming Language and the first program is to print Hello World I wrote the code as it shown in the book:  #include <stdio.h>  main() {     printf("hello, world\n"); }   But I got an error warning: type specifier missing, defaults to 'int' [-Wimplicit-int] main() . I fixed it by writing the code like this:  #include <stdio.h>  int main() {     printf("hello, world\n"); }   Can anyone tell me what is the difference and why should I write it like that?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


I want to know what's wrong with this command:  /tellraw @p {text:"You have joined ",color:white,extra:[{text:"Breakfast Baker!",color:green,bold:true,{text:"Breakfast Baker is a 5-player game, where you have to bake breakfast for a judge, ",color:white,bold:false,{text:"Villager Ramsay, ",color:orange,{text:"and if you have the best breakfast, you ",color:white,bold:false,{text:"WIN!",color:gold,bold:true}}}}}]}   It says  invalid json: expected name at line 1 column 92   I don't know what's wrong... it's supposed to say     "You have joined Breakfast Baker! Breakfast Baker is a 5-player game, where you have to bake breakfast for a judge, Villager Ramsay, and if you have the best breakfast, you WIN!"   With different colors, bold and other flair. Can anyone help?

I've been at this for almost two hours and no one seems to have the same problem as I and I doubt this will be solved but I'll try anyway.  this is the code  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}},{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   this part is fine  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}}   it's just when I add this  ,{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   Minecraft gives me the error:     Invalid JSON at line 1 column 203   I've tried to space it out and figure out what column 203 is but I can't, I don't know what I did. Anyone got any ideas?


I know this is a duplicate question, maybe triple duplicate or more, but I really cannot find a solution for this. My USB Drive wasn't write protected before, but something happened to it and now I cannot write to or format it.  I have tried in ubuntu to change the permissions, fsck, fdisk, dmesg | tail, mkfs -t vfat, hdparm -r0 and nothing works; all I get is Permission Denied. I tried from GParted but it also says it's read only. I have also tried using Windows to change permissions, setting attributes disk clear readonly, renaming the key in the registry, and tried a low level format.  But truly nothing works. Also, the stick doesn't have any hardware pin or switch for write protection.  Is there any solution to this or should I just give up?

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


I've just started java couple of days ago. Im currently following this 'course'  . Havent had encountered any problems yet but now im stuck at task 32.  heres my code so far (always getting Squirrel instead of moose as output):  import java.util.Scanner;   public class TwoQuestion32 {  public static void main(String[] args) {     boolean animal, vegetable, mineral, smallerthan;      String whatIsIt, biggerThan;     Scanner keyboard = new Scanner(System.in);       System.out.println("Hello and welcome, i've got 2 questions for you!");     System.out.println("Think of an object and i'll try to guess it");     System.out.println();     System.out.println("Question 1) Is it an animal, vegetable or mineral?");     System.out.print(">");     whatIsIt = keyboard.nextLine();      if (whatIsIt == "animal")             animal = true;             if (whatIsIt == "vegetable")             vegetable = true;             if (whatIsIt == "mineral")             mineral = true;       System.out.println("Question 2) Is it bigger than a breadbox?");     System.out.print(">");         biggerThan = keyboard.nextLine();             if (biggerThan == "yes")             smallerthan = false;             if (biggerThan == "no"){             smallerthan = true;}               System.out.print("My guess is that you are thinking of a ");         if (animal = true){             if (smallerthan = true)                 System.out.println("squirrel");         }else {                  System.out.println("moose");} }    }   Thanks in advance! Would also love to hear tips how to put up the code in smarter ways. Be friendly, keep in mind i've just started!   Edit: Okay I took another approach. My first attempt was really strange. Thanks for the help!  Heres the working code:  import java.util.Scanner;   public class Questions32 {  public static void main(String[] args) {     Scanner keyboard = new Scanner(System.in);       String whatIsIt, whatIsIt2;     String animal = "animal";     String mineral = "mineral";     String vegetable = "vegetable";     String bigger = "yes";     String smaller = "no";       System.out.println("Hello and welcome, i've got 2 questions for you!");     System.out.println("Think of an object and i'll try to guess it");     System.out.println();     System.out.println("Question 1) Is it an animal, vegetable or mineral?");     System.out.print(">");     whatIsIt = keyboard.nextLine();      System.out.println("Question 2) Is it bigger than a breadbox?");     System.out.print(">");         whatIsIt2 = keyboard.nextLine();      if (whatIsIt.equalsIgnoreCase(animal)){         if (whatIsIt2.equalsIgnoreCase(bigger)){             System.out.println("My guess is that you are thinking of a moose");         }else{ System.out.println("My guess is that you are thinking of a squirrel");         }     }      if (whatIsIt.equalsIgnoreCase(vegetable)){         if (whatIsIt2.equalsIgnoreCase(bigger)){             System.out.println("My guess is that you are thinking of a melon");         }else{ System.out.println("My guess is that you are thinking of a carrot");         }     }      if (whatIsIt.equalsIgnoreCase(mineral)){         if (whatIsIt2.equalsIgnoreCase(bigger)){             System.out.println("My guess is that you are thinking of a Camaro");         }else{ System.out.println("My guess is that you are thinking of a paper clip");         }     }     System.out.println("I would ask you if I'm right, but I dont actually care.");      }   }

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


What is causing this script to exit the loop at line "program is exiting loop here"? In the context it will loop twice but it won't if i have the CM_CHECK_STATUS where i have it. RUNLOG="log" OUTPUTFILE="output"  LIST=$(/usr/local/bin/sshpass -f $PASSWORD_FILE  ssh -o StrictHostKeyChecking=no $USER@$IP "ls -al" 2>> $RUNLOG > $OUTPUTFILE)  PS_VALS=$(cat $OUTPUTFILE)  if [[ $? != 0 ]] then   echo "There was an error at:" `date` >> $RUNLOG else   while IFS= read -r line;    do     # Check ls     echo "... $line ..."     CM_CHECK_STATUS=$(/usr/local/bin/sshpass -f $PASSWORD_FILE  ssh -o StrictHostKeyChecking=no $USER@$IP "ls -al")     #program is exiting loop here   done <<< "$PS_VALS"   echo "finished" fi  If i remove CM_CHECK_STATUS=$(/usr/local/bin/sshpass -f $PASSWORD_FILE  ssh -o StrictHostKeyChecking=no $USER@$IP "ls -al") and place it anywhere else outside the loop that command works fine and the loop runs as expected. Is there something wrong with using that command inside a loop?

I have finally managed to boil down a problem I have been struggling with for a few weeks.  I use SSH with "authorized keys" to run commands remotely.  All is fine except when I do it in a while loop.  The loop terminates after completing any iteration with an ssh command.  For a long time I thought this was some kind of ksh weirdness, but I now discovered bash does in fact behave identically.  A small sample program to reproduce the problem.  This is distilled from a larger implementation which takes snapshots and replicates them amongst the nodes in a cluster.  #!/bin/bash  set -x  IDTAG=".*zone" MARKER="mark-$(date +%Y.%m.%d.%H.%M.%S)" REMOTE_HOST=sol10-target ZFSPARENT=rpool  ssh $REMOTE_HOST zfs list -t filesystem -rHo name,mounted $ZFSPARENT | grep "/$IDTAG    " > /tmp/actionlist  #for RMT_FILESYSTEM in $(cat /tmp/actionlist) cat /tmp/actionlist | while read RMT_FILESYSTEM ISMOUNTED do    echo ${RMT_FILESYSTEM}@${MARKER}    [ "$ISMOUNTED" = "yes" ] && ssh $REMOTE_HOST zfs snapshot -r ${RMT_FILESYSTEM}@${MARKER}    echo Remote Command Return Code: $? done   (Note there is a TAB character in the grep search expression as per the definition of the behaviour of the zfs list "-H" option.)  My sample have some ZFS filesystems for the root where all the "zones" have their root file system on a dataset named similar to  POOL/zones/app1zone POOL/zones/group2/app2zone    etc.  The above loop should create a snapshot for each of the selected datasets, but in stead it operates only on the first one and then exits.  That the program finds the right number of datasets can be easily confirm by checking the "/tmp/actionlist" file after the script exists.  If the ssh command is replaced by, for example, an echo command, then the loop iterates through all the input lines.  Or my favourite - prepend "echo" to the offending command.  If I use a for loop in stead then it also works, but due to the potential size of the list of datasets this could cause problems with the maximum expanded command line length.  I am now 99.999% sure that only those loops with ssh commands in them give me problems!  Note that the iteration in which the ssh command runs, completes! It is as if the data pipped in to the while loop is suddenly lost...  If the first few input lines don't perform an ssh command, then the loop goes on until it actually runs the SSH command.  On my laptop where I am testing this I have two Solaris 10 VMs with only about two or three sample datasets, but the same is happening on the large SPARC systems where this is meant to go live, and there are many datasets.


Let $z=a+ib,w=c+id\in\mathbb{C}. $Prove $|z|-|w|\leq|z-w|$   Solution: If $|z|-|w|\leq 0$ then we are done since $|z-w|\geq 0$. Suppose $|z|-|w|>0$. The stages are going backward: $$ \\ |z|-|w|\leq|z-w|\Leftarrow  \\ (|z|-|w|)^2\leq |z-w|^2\Leftarrow  \\ (\sqrt{a^2+b^2}-\sqrt{c^2+d^2})^2\leq(a-c)^2+(b-d)^2\Leftarrow  \\ ac+bd\leq c^2+d^2+\sqrt{(a^2+b^2)(c^2+d^2)} $$  How can I finish it?  Also, is there a way to solve it without using $a,b,c$ and $d$?

Can somebody please check if my proof is okay?  Prove that $||z_1|-|z_2|| \leq |z_1-z_2|$.  Attempt: This proof seems similar to the triangle inequality proof.  $$\begin{split} |z_1-z_2|^2 &= (z_1-z_2) \overline{(z_1-z_2)} \\ &= (z_1-z_2)(\bar z_1 - \bar z_2) \\ &= z_1\bar z_1 - z_1 \bar z_2 - \bar z_1 z_2 + z_2 \bar z_2\\ &=|z_1|^2 - 2Re(z_1 \bar z_2) + |z_2|^2\\ & \geq |z_1|^2 -2|z_1 \bar z_2| + |z_2|^2 \\ &= |z_1|^2 - 2|z_1||z_2| + |z_2|^2 \\ &= (|z_1| - |z_2|)^2. \end{split}$$  Taking the square root of both sides gives $|z_1|-|z_2| \leq |z_1-z_2|$  Can I just take the norm of both sides so that $||z_1|-|z_2|| \leq ||z_1-z_2|| = |z_1-z_2|$?  Thank you.


Recently updated core from 8.9.2 to 8.9.4, in doing so the options to place blocks on specify pages is now gone?

I am doing development in drupal 8. All of a sudden, I see that block visibility role section is missing.  How can I bring the block visibility role section back?


I hibernate windows 7 and open ubuntu.  Afterthat, I mount my remaining drives(excluding C which I obviously can't) and use ubuntu .. but if I want to copy some file into other drives  I can do it but when I restart ubuntu and resume windows I can't see them. To see those files in windows I have to restart windows. Is there a way in which I can do this thing without actually restarting windows 7 'cause restarting windows takes hell lot of time  Thanks

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I am working on $\displaystyle\int_0^\pi \frac{x\cos x}{1+\sin^2 x}\,dx$  First: I use integrating by part then get   $$ x\arctan(\sin x)\Big|_0^\pi-\int_0^\pi \arctan(\sin x)\,dx $$  then I have $\displaystyle -\int_0^\pi \arctan(\sin x)\,dx$ because $x\arctan(\sin x)\Big|_0^\pi$ is equal to $0$  However, I don't know how to integrate $\displaystyle -\int_0^\pi \arctan(\sin x)\,dx$  Can someone give me a hint?  Thanks

I came across the following sum: $$\sum_{k=0}^{\infty} \frac{(-1)^k}{(2k+1)^2}\frac{4^k}{{2k \choose k}}$$    I thought that this can be evaluated using the expansion of $\dfrac{\sin^{-1}x}{\sqrt{1-x^2}}$ but I couldn't make any use of it. Then I tried to use the following: $$\frac{1}{(2k+1)}\frac{1}{{2k \choose k}}=\frac{\Gamma(k+1)\Gamma(k+1)}{\Gamma(2k+2)}=\int_0^1 x^k(1-x)^k\,dx$$ but this didn't help either and now I am stuck.   Any help is greatly appreciated. Thanks!    EDIT:  The sum originated from the following definite integral:  $$\int_0^{\pi/2}\tan^{-1}(\sin x)\,dx$$


When accessing my profile and selecting the Reputation tab, my rep events are shown clustered by time with a fold-out button. Rep events that are close together in time are duplicated within these clusters.    If it matters: this image is taken from RPG.SE

I have six upvotes for the one question with no intervening history. They have been summarised into two groups - one with 4 events and one with 2 events. However, when you expand either, both show all 6 events. Minor I know, just letting you know.


I got this problem and solution in a paper but cannot find how they have solved it. Consider I have a sphere that is equally divided into two different patch(P, S). The sphere can rotate and translate(up-down) at the air-water interface. The angle $\alpha$ defines the position of the sphere (alpha increase means the sphere goes towards the air). The angle $\beta$ defines the rotation of the sphere. So the surface area of any patch into any phase changes with the position and orientation(example: area of P inside air phase will change with $\alpha$ and $\beta$ angle). Now the calculation of the surface area of P part of the sphere in air is given by this . I understand the limit for $\theta$ direction but did not find out how the limit comes for $φ$ direction. Here is the visual representation of the problem    Please keep in mind that the figure is only $2D$ presentation of a $3D$ sphere where the coordinate system refers as $(r, θ, φ)$ .

I got this problem from a journal and curious how they have calculated that.Previously I asked this problem and unfortunately did not get any answer. Hereby I am posting again and hopefully someone can answer as it is a popular platform to understand math. Consider I have a sphere that is equally divided into two different patch(gray and white). The total gray portion can be called as Pt The sphere can rotate and translate(up-down) at the air-water interface.  The angle α defines the position of the sphere (alpha increase means the sphere goes towards the air). The angle β defines the rotation of the sphere. So the surface area of any patch into any phase changes with the position and orientation(example: area of Pt inside air phase will change with α and β angle). Now the calculation of the surface area of Pt part of the sphere in air(Apt-A) is given by this equation.  I understand the first integral limit in polar angle direction but did not find out how the limit comes for azimuth angle direction. Please keep in mind that the picture is only visual representation of a 3D sphere in 2D.


A friend sent me this problem and I couldn't find a solution online. I'm wondering if my attempt is correct and whether if there is a more elegant solution?  The Problem: Suppose that $a_0, a_1, ... a_{n-1} $ are $n$ integers. Show that the following product $$ P(a_0,a_1,...,a_{n-1}) = \prod _{0\le i<j\le n-1}^{ }\frac{a_j-a_i}{j-i}\ \qquad(1)$$ is integer.  My Attempt: We will prove this with induction and an application of the pigeonhole principle  Base case: $n=1$  $$P(a_0,a_1) = \frac{a_1 - a_0}{1-0}$$ is clearly integer as $1-0 = 1$ and $a_1,a_0 \in \mathbb{N}$  We now assume $n=k$ Assume $P(a_0, ... , a_{k-1}) \in \mathbb{N}$  Note that  $$P(a_0, ... , a_{k}) = P(a_0, ... , a_{k-1}) \cdot \prod _{0\le i \le k-1}^{ }\frac{a_k-a_i}{k-i}\ \qquad (2)$$  For any fixed $0 \le i \le k-1$, we see that it is possible that $k-i \not| \ a_k - a_i$, and then resulting in the product on the right of (2) being non-integer.   Specifically, we observe that the product on the right of (2) is non integer if the following occurs  $$a_k\ \text{mod}\ (k-i) \not\cong a_j \qquad (3)$$  For all $0 \le j \not= i \le k-1$  Note that as $0 \le i \le k-1$, then $1 \le k-i \le k$, meaning that the complete residual class of $k-i$ is at a maximum, $\{0, 1, 2, ..., k - 1\}$, $k$ possible distinct residuals.  Consider the $P(a_0, ... , a_{k-1})$ in (2)  By the definition of $P$ in (1), we see that for every unique permutation of the set $\{c,d\}$ corresponding to the term $\frac{a_c-a_d}{c-d}$ for $0 \le c<d \le k-i$ exists in $P(a_0, ... , a_{k-1})$.  Additionally, due to (3), we have that $a_c, a_d$ can have a possible $k-1$ distinct residuals at most, with one being the residual of $a_k\ \text{mod}\ (k-i)$  But note that $P(a_0, ... , a_{k-1})$ uses $k$ variables $a_0, a_1, ..., a_{k-1}$, so therefore by the pigeonhole principle, there must be one term in that product that results in $$k-i \ | \ a_c - a_d$$  Otherwise similar stated by saying that $a_c - a_d \ \text{mod} \ k - i\cong 0$  Thus, we show that for any $0\le i \le k-1$, the product on the right of $(2)$ will still evaluate to be an integer. Thus (2) is integral as we also assumed that $P(a_0, ..., a_{k-1})$ is integer.   Thus, by the induction principle, (1) must be true.  I'm not sure if this is a valid formal proof, also am wondering if there are better solutions.

Let $x_1,...,x_n$ be distinct integers. Prove that  $$\prod_{i<j} \frac{x_i-x_j}{i-j}\in \mathbb Z$$   I know there is a solution using determinant of a matrix, but I can't remember it now. Any help will be appreciated.


I have added a webform into site to register a user, now i want users who added their information into form, to become a user of site .

I am using Drupal 7. I have Webform with 6 fields:    Your name User name password Email phone number Website   If we submit it will store in database, but here I need username & password should store in "User Account Registration" form also.   We can add fields from Configuration -> People -> Account settings for other fields, but it doesn't work in this situation. I need to store the User name & password values to "User Account Form" and then to login with that username and password.


I am a Windows user, but want to use Ubuntu now.  For this I have downloaded Ubuntu 64-bit from the Ubuntu site. But, I am not able to install it. I have tried both, booting from it as to clean install and through Wubi.  While booting from Ubuntu, all I got was a black screen with a circle, an '=' image and small human like image. It remains there for a while and thereafter an error message Uncompression failed -- System Halted appears and system reboot.  Here are last few lines of error log:  08-14 15:58 ERROR  TaskList: Non fatal error [Errno 4] IOError: <urlopen error (7, 'getaddrinfo failed')> in task download 08-14 15:58 DEBUG  TaskList: ### Finished download 08-14 15:58 ERROR  TaskList: Could not retrieve the required disk image files Traceback (most recent call last):   File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__   File "\lib\wubi\backends\common\backend.py", line 592, in get_diskimage Exception: Could not retrieve the required disk image files 08-14 15:58 DEBUG  TaskList: # Cancelling tasklist 08-14 15:58 DEBUG  TaskList: # Finished tasklist 08-14 15:58 ERROR  root: Could not retrieve the required disk image files Traceback (most recent call last):   File "\lib\wubi\application.py", line 58, in run   File "\lib\wubi\application.py", line 132, in select_task   File "\lib\wubi\application.py", line 158, in run_installer   File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__   File "\lib\wubi\backends\common\backend.py", line 592, in get_diskimage Exception: Could not retrieve the required disk image files   While trying with Wubi, it gives error Could not retrieve the required disk image files. Whereas I have complete Ubuntu desktop installed.  Please guide me through this as I really want to move to Ubuntu.  Please do not suggest that I have to  download it again, as I have a very slow data connection.  One thing I would like to share, is that I didn't downloaded the setup in one go, but many a times by resuming as my net connection is very bad.  My laptop is Dell Inspiron 3521 with Windows 7 Ultimate 32-bit trial version is installed in it. But it is of 64 bit architecture.  EDIT: Just checked on my other desktop and it has same problem. Though my desktop is of 32 bit architecture, so there had to be incompatibilty. Do you think it could be because OS on my laptop is 32 bit or trial version?????

I tried to install Ubuntu 12.10 with the Wubi installer while running Windows, because my PC does not accept my BootCD as a bootable medium.  But Wubi showed me this error:  Ubuntu-Installationsprogramm (X) Ein Fehler ist aufgetreten: Could not retrieve the required disk image files Weiter Informationen finden Sie in der Protokolldatei: c:\users\username\appdata\local\temp\wubi-12.10-rev273.log   What can I do, because I want to get rid of my Windows 7 and use the way better Ubuntu 12.10?  Thanks for your huge answer, now my next problem after trying to install wubi with the .iso is, that the same error shows up again and i am not shure which part of the errorreport you need.  Can you tell me? Because i'm not that good at linux.


Prove that $\lim_{x \rightarrow \infty} \frac{f(x)}{x}= \alpha$ when $f$ is continuous and $\lim_{x \rightarrow \infty} (f(x+1) - f(x)) = \alpha$  The given hint suggests to consider the case of $\alpha=0$.  Given $\varepsilon \gt 0$, there exists $M$ such that $x \ge M $ implies that $|f(x+1) - f(x)| \lt \varepsilon$. Then for any $y$ which is larger than $M$, we can write it as $y=x+N$ where some $x \in [M, M+1]$.   And $f$ is continuous on $[M, M+1]$, it has a maximum $M_0$ on this interval, i.e., $|f(x)| \le M_0$ on this interval. Then $|f(x+N)| \le M_0 + N\varepsilon$. So $|\frac{f(x+N)}{x+N}| \le \frac{M_0 + N\varepsilon}{x+N}$. Then as $N \rightarrow \infty$, $\lim_{y \rightarrow \infty} \frac{f(y)}{y} \le \varepsilon$, which means that $\lim_{y \rightarrow \infty} \frac{f(y)}{y} =0$.  Is this argument valid? And I’d like to know whether there is a simple argument.

Let $f:[0,+\infty)\to\Bbb R$ be a function bounded on each finite interval. I want to show that if $\lim\limits_{x\to+\infty}[f(x+1)-f(x)]= L,$ then also $\lim\limits_{x\to+\infty}\dfrac{f(x)}x = L$


I have a LaTeX document broken up into chapter, sections, and subsections. The theorems are numbered according to the section.   If I reference a theorem from a particular chapter in the same chapter, I would like it to show up as      Theorem section.#.   If I reference the theorem from a different chapter, I want it to show up as      Theorem chapter.section.#.   How can I do this?  Edit:  I know very little about LaTeX. This is a portion of what appears at the beginning.  \newtheorem{theorem}[subsection]{Theorem}  \newtheorem*{theorem-non}{Theorem}  \theoremstyle{plain}  \newtheorem{acknowledgement}[subsection]{Acknowledgement}  \newtheorem{algorithm}[subsection]{Algorithm}  \newtheorem{axiom}[subsection]{Axiom}  \newtheorem{case}[subsection]{Case}  \newtheorem{claim}[subsection]{Claim}  \newtheorem{conclusion}[subsection]{Conclusion}  \newtheorem{condition}[subsection]{Condition}  \newtheorem{conjecture}[subsection]{Conjecture}  \newtheorem{corollary}[subsection]{Corollary}   I hope this helps. If something more specific/different is needed, please let me know.

I have a document organized into several chapters. In each chapter, theorems are numbered by section (1.1, 1.2, ... even in chapter 5). I often would like to refer to theorems in different chapters. However, if I am in chapter 6 and refer to theorem 1.3 in chapter 1, it is rather ambiguous, and the reader might assume that "theorem 1.3" meant the current chapter. Is there an automatic way of configuring things so that the cross-referencing will say "theorem 1.3" only if it is really the current chapter, but "theorem I.1.3" (or something like that) if the cross-referencing spans chapters?


What is difference of apt-get and aptitude? Does both of them use same repositories?  Which one is better?

When installing a software via dpkg -i packageA.deb, will the dependencies required by packageA be downloaded and installed automatically? How is this different from using apt-get or aptitude?


def test1():    print(x)  def test2(x):    print(x)  x=1 test1() test2(x)  When I run this python code, I get:  1 1  How can function test1 know about x, without passing it as an argument?

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I have a FindAll method on my DataAccessLayer which looks like this:  public FindResult<T> FindAll<T>() where T : Entity, new()   and a client code that has a Type[] array which it needs to use to iteratively call the FindAll method with like this:  foreach (var type in typeArray) {         var result = DataAccessLayer.FindAll<type>();     ...   but the compiler complaints about "Type or namespace expected".. Is there an easy way to get around this? I've tried type.GetType() or typeof(type) and neither worked.  Many thanks in advance!

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


public static int countLetter(String[] x, String y){     int count = 0;     for(int i = 0; i < x.length; i++){         for(int h = 0; h < x[i].length(); h++){             String yo = new String(x[i].substring(h,h+1));             if(yo==y){                 count++;}             }         }         return count;     } }   My method should return an integer that counts how many times total the letter appears in all strings of the array. (Assuming the string is one letter and I can't use charAt()).

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


I want to generate a random  element from a list that is already given by myself or a list taken as an input .

Assume I have the following list:  foo = ['a', 'b', 'c', 'd', 'e']   What is the simplest way to retrieve an item at random from this list?


I want to create a bell curve with some explanatory text around it. However I am unable to add linebreaks to the notes, and also failed to get the two texts about life expectancy in latex. My own code so far is below as well.  Thanks!  EDIT: The problems with the linebreaks are solved! However, I still dont understand how to get the arrows below the graph with Increasing/Decreasing life expectancy below them    \documentclass{article} \usepackage{pgfplots} \begin{document}  \pgfmathdeclarefunction{gauss}{2}{%   \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}% }  \begin{tikzpicture} \begin{axis}[   no markers, domain=0:10, samples=1000,   %axis lines*=left,   axis y line=none,   axis x line*=bottom,   %xlabel=$x$, ylabel=$y$,   every axis y label/.style={at=(current axis.above origin),anchor=south},   every axis x label/.style={at=(current axis.right of origin),anchor=west},   height=6.25cm, width=15cm,   xtick=\empty, ytick=\empty,   enlargelimits=false, clip=false, axis on top,   grid = none   ]   \addplot [fill=cyan!20, draw=none, domain=6:7] {gauss(5,1.1)} \closedcycle;  % \addplot [very thick,cyan!50!black] {gauss(4,1)};   \addplot [very thick,cyan!50!black] {gauss(5,1.1)};   \draw [yshift=-0.6cm, latex-latex](axis cs:4,0) -- node [fill=white] {Value of liabilities} (axis cs:6,0); \draw[cyan!35] (axis cs:5,0) -- (axis cs:5,0.4);  \node[coordinate,pin=45:{Attachment point}] at (axis cs:6,0.2399) {}; \node[coordinate,pin=45:{Detachment point}] at (axis cs:7,0.06945) {}; \node[coordinate,pin=180:{Expected value \\ of liabilities}] at (axis cs:5,0.39) {};   \end{axis}  \end{tikzpicture} \end{document}

The MWE:  \documentclass{standalone}  %====================================== \usepackage{tikz} \usetikzlibrary{graphdrawing} \usetikzlibrary{arrows} \usetikzlibrary{graphs} \usegdlibrary{force, layered, trees} %======================================  \begin{document}  \tikz  \graph [spring layout, nodes = draw] {     a/"dispersive\newline collision";     b/"non-dispersive\newline  collision";      a -> b };  \end{document}   The output:    The question:  As you can see above, the \newline command does nothing. Trying to use \\ instead of \newline, like how the pgfmanual does in some examples (see pg. 386) has the same effect. Why? What can I do in order to have the words appear on separate "lines"?


<script>      $("#form").validate();     $(document).ready(function ()       {         var merror = '';             jQuery.validator.addMethod('mvalid', function(value, element) {           if($("#mobile").hasClass("required") == true && ($("#mobile").val().substr(0,1) != '7' ||$("#mobile").val().substr(0,1) != '8' ||         $("#mobile").val().substr(0,1) != '9'))  {                                                     merror = 'Enter correct Mobile No.';             return false;                                                              }             return true;                 }, merror);      });  </script>

How do you create a simple, custom rule using the jQuery Validate plugin (using ) that doesn't use a regex?  For example, what function would create a rule that validates only if at least one of a group of checkboxes is checked?


I have three random variables $X_1, X_2, X_3$ that are normally distributed each with different means $\mu_1, \mu_2, \mu_3$ and share the same variance $\sigma^2$. I want to find the covariance of $(X_1-\bar{X}, \bar{X})$, where $\bar{X}$ is the average of the three random variables.  I did the following , $Cov(X_1-\bar{X}, \bar{X})= Cov(X_1, \bar{X})+Cov(-\bar{X}, \bar{X})$. Now I am unsure if I can apply the formula $Cov(X_1, \bar{X})=E[X_1\bar{X}]-E[X_1]E[\bar{X}]$ because $\bar{X}$ and $X_1$ are not independent? Also I am not sure how to handle $Cov(-\bar{X}, \bar{X})$, because of the negative sign inside. Is it still $Var(\bar{X})$?

Let $X,A,B,C,D$ be time-series variables and the covariance between any two pairs of these are known.  Suppose we want to find $\textrm{cov}(X,aA + bB + cC + dD)$, where $a,b,c,d$ are constants.  Is there any way of doing this without expanding out $E[(X-E[X])(aA+......)]$?


I was just editing some tit photos I made on our balcony, and I found really strange patterns of noise over the bird's feathers:  The photo is from Nikon D5600, settings 85mm F4.0 1/1000 ISO 160 These are individual pixels exported from RAW and even if I went all the way to the beginning of my edit history, these patterns are still there. Is this an error in demosaicing, or is it a feature of the photo? I can provide the RAW file but I am not sure where to upload it. I am using darktable, if it's software related, it the cause might be there. I would like to get rid of these. RAW file:

On the photos where the lens flare is present, my Nikon D7000 is drawing strange labyrinth-looking artifacts. Here's an example.  The first image is a screenshot of a little part of the original photo zoomed 2:1 in Lightroom.  The second image is the same photo with Lightroom's contrast, clarity and sharpening set to the maximum to make the labyrinth pattern more visible.      This affects only some of the photos presenting lens flare. Here, for instance, the lens flare is present and light conditions are very close to the first photo, but there is no labyrinth pattern, only usual noise (screenshot of a part of a photo at 1:1 with contrast, clarity and sharpening set to the maximum):    Notes:   I can see this pattern only on some of the photos when the sun is in the frame or nearly in the frame. It is present with any lens I tested. The actual photo was shot at f/8, ISO 200, 1/640 s. I've seen this pattern in photos shot at ISO 100 as well. The photo is in RAW format, so this is not a JPEG artifact.   What is that? How do I avoid it?


I'm aware of the "Heisenberg compensator" plot device to explain how transporters get around the Heisenberg Uncertainty Principle. However, it occurs to me that there is an even more basic (i.e., in terms of classical physics) flaw with their usage: matter spontaneously appearing or disappearing. Wouldn't the sudden infinite pressure differential be, well, problematic to say the least?  Is it ever explained how this is compensated for?  One could imagine that matter is simply swapped betweem the transporter source and destination. However, this still suffers from the same problem; albeit not to the singularity extent. That said, IIRC, transporting into the vacuum of space is a thing.

A fundamental law of physics is, in short, that two things cannot exist in the same space at the same time.  This is easily demonstrated by dropping a relatively large mass, such as pasta noodles, into a container of water, such as a pot.  The water level will rise as it "makes room" for the pasta, and will overflow if you've put in too much of either.  Conversely, if you were to scoop all of the noodles out (presuming you had a way to scoop just the noodles, without taking along any water at all) you would see the water sink down to its original level (or lower, if it had overflown earlier).  Taking this into consideration, I see a problem with transporter technology which I'm not sure I've ever seen addressed:  What happens to the air surrounding a transport subject's origin point, or occupying the destination?  The transporter must have some means of compensating for the displacement, otherwise each transport should in theory be accompanied by a loud pop at each end - at the origin when the air collapses to fill a vacuum left behind, and at the destination when a relatively large volume of air is forced away to make room for the subject.  This effect should be even more pronounced, and perhaps even hazardous, in closed environments such as spacecraft where the air has really no place to go.  One option would be to have the transporter exchange the air (or other matter, such as dust or raindrops) at the destination for the matter of the subject, as it is being transported.  However, this is not seen as we would often notice small portions of dust storms or downpours getting dropped onto the transporter pad when people are transported into adverse weather conditions.  Imagine having that cleanup as part of the Transporter Chief's job duties.  Another option would be to process the matter from the destination through the replicator, so that it is congruous with the same volume of air at the origin.  This would be a fairly complex operation though, and could result in a lag too long to be acceptable by the laws of physics.  Come to think of it, this same (or a similar) issue should affect replicator and holodeck technology as well.  Has any of this ever been addressed canonically, either in a Star Trek episode or in technical manuals?


How can I rewrite, the following triple integrals into different orders?: $$\int^1_0\int^{z^2}_0\int^y_0{f} \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z$$ In the orders $\mathrm{d}z \, \mathrm{d}x \, \mathrm{d}y$ and $\mathrm{d}y\,\mathrm{d}z\,\mathrm{d}x$?  Currently the limits are: $$\begin{split} &0 \le x \le y \\ &0 \le y \le z^2 \\ &0 \le z \le 1 \end{split}$$

How can I rewrite, say: $$\int^1_0\int^{z^2}_0\int^y_0{f}dxdydz$$ In the orders $dzdxdy$ and $dydzdx$?  Would I have to solve this triple integral all the way or is there a simple way to do this?


Many stocks don't pay dividends, and it's not like a shareholder has any direct financial gain from increased company earnings. Plus, they can only benefit from earnings if the company goes bankrupt and has to sell its assets. Then what influences demand for stocks?  I get that investors can make money through dividends and through capital gains, but I don't get how they make those gains. Earnings, or future earnings, can lead to gains because it shows the health of the company. But it seems too arbitrary for investors to just invest in a company just based on earnings alone, since they won't get to enjoy those profits.  I also don't understand how investors are expected to make money since they "have a claim to the company's assets", since they can only enjoy those assets if the company goes bankrupt, and usually what's left over for common stock shareholders is negligible (that is, when compared to what creditors are getting).  So do investors only make money based on arbitrarily following the profits of a company's stocks and by observing analyst estimates of future earnings? This doesn't make sense to me since stock value can sometimes go down even if there is an earnings surprise or the company is reporting an increase in profit...  Is it the appreciation in the stock's book value that attracts investors?

Before recently, Apple Inc. did not give dividend to shareholders.  This makes me curious why people buy Apple Inc. stocks; while it might be due to the expectation of selling stocks at a higher price, this can only be possible if other people are thinking the same, thereby increasing demand. But the stocks themselves do not pay interests - so Apple's amazing revenue/profit records would not matter....


I found this in a book I used to train myself for the Math Olympics a bunch of years ago:     Prove that $$\cos\frac{\pi}{7}-\cos\frac{2\pi}{7}+\cos\frac{3\pi}{7}=\frac{1}{2} $$   I couldn't solve it then and I can't solve it now. As far as I know, polynomials might be involved somehow since it was in the polynomials section of the book, and it's not suposed to use complex numbers since it's in the section previous to that.  Using the double and triple angle formulaes I got the LHS to:  $$4\cos^3\frac{\pi}{7} -2\cos^2\frac{\pi}{7} - 2\cos\frac{\pi}{7}+1 = \frac{1}{2}$$  Using the sum-to-product formulaes I got to the same result.  And I'm pretty much stuck at this point.

Is there an easy way to prove the identity?     $$\cos \left ( \frac{\pi}{7} \right ) - \cos \left ( \frac{2\pi}{7} \right ) + \cos \left ( \frac{3\pi}{7} \right ) = \cos \left (\frac{\pi}{3} \right )$$   While solving one , I am stuck, which looks obvious but without any feasible way to approach.   Few observations, not sure if it would help $$ \begin{align} \dfrac{\dfrac{\pi}{7}+\dfrac{3\pi}{7}}{2} &= \dfrac{2\pi}{7}\\\\ \dfrac{\pi}{7} + \dfrac{3\pi}{7} + \dfrac{2\pi}{7} &= \pi - \dfrac{\pi}{7} \end{align} $$


Does anyone know how to prove that the spectral norm:  $$\left \| A \right \|_{2}=\max\left \{ \sqrt \lambda : \lambda \in \sigma (A^*A)\right \},\; A\in\mathbb{R}^{n\times n}$$ (meaning that $\lambda$ is an eigenvalue of $A^*A$)  is orthogonally invariant?

For any matrix A and an orthogonal matrix Q, I can prove in the standard way that  $$\|QA\|_2 = \|A\|_2 $$ using $$\|QA\|_2^2 = (QAx)^T(QAx) = (Ax)^T(Ax) = \|A\|_2^2 $$  However, I am unable to cancel Q, when the transformation is AQ, i.e. $$\|AQ\|_2^2 = (AQx)^T(AQx) = x^TQ^TA^TAQx$$ After this point I am unable to prove the same that $$\|AQ\|_2 = \|A\|_2 $$


When using the android app the menu organization of all the sites I have pinned appears to be random and not in the same order that I have them pinned on the website or iOs Version. I have tried to edit the list to get it to sync up and show in the proper order but that is not fixing it.  When I am in the list to edit the sites it is showing up there in the correct order but when I save the changes it goes back to the random order and not showing them in the expected order.

In the Android app, left sidebar, there is an editable list of "Your Sites". In the editing pane, the sites are re-orderable (although awkwardly), and the order one places the sites in there is preserved, even after quitting the app and returning to this pane. One expects that order to be reflected in the "Your Sites" portion of the left sidebar when the editing pane is closed, but it is not.  I'm not sure what is determining the order of the sites in the left sidebar, it doesn't seem to be by date they were "pinned" into the list one wants to show, either.


I understand that user contributed content is licensed under cc-wiki but Creative Commons work still requires a copyright holder. So who actually owns Stack Overflow's user contributed content? Stack Overflow or the individual users who contributed the content?  If it's the individual users, then   isn't Stack Overflow breaking the terms of cc-wiki since they are using the content for a commercial purpose? (they generate advertising revenue from user generated content) could a user demand that all his/her contributions be removed from the website? What would happen in the case of content which had been heavily edited by many different users?   If it is Stack Overflow who owns the content then does that mean people using Stack Overflow user contributed content on other websites should, under the terms of cc-wiki, attribute Stack Overflow and not the individual users who wrote the content?  Does Stack Overflow have a Terms and Conditions stating their IP rights with regard to the content they contribute?

What with  today, possibly this is a good time to ask: who actually owns the copyright to questions, answers and comments submitted to StackOverflow and relatives?  Over in , we have the OP reaching the conclusion that SO owns the copyright and is licensing it under CC-Attribution-Sharealike, with no apparent confirmation or denial from staff, and in  we have a moderator asserting that Jeff owns the copyright to SO content.  As I note in a comment on the latter, though (which was met with deafening silence), I'm failing to find any evidence that this is the case.  I've looked for any kind of terms of service I may have agreed to indicating that I am signing over ownership of my words when I hit submit, and I can't find one.  Certainly the fact that I'm agreeing to CC-Attribution-Sharealike licensing is clear enough, but it seems to me as if I am retaining copyright while agreeing to those licensing terms, and S[OFU] is using what I have written under that license.  What's the deal?  Did I forget about something that I agreed to in the signup process (and if so, why can't I find it afterward)?  Do the owners and administrators of S[OFU] believe that they own copyright to the UGC?  Just what is going on here?  Edit as to why this matters (from answer comment thread): If I retain copyright, I can also choose to license the original content to other parties under other terms (such as using a zero-requirements license, using an attribution-required license without sharealike, etc). If SO has the copyright, I can't.


Since one posted a problem that other people can benefit from, one should receive reputation points for every answer, even if the answer doesn't solve your problem.  Sometimes the 'marked as correct' answer is not the right answer for you, so the questioner should receive reputation points for providing a question with multiple solutions.  Why wasn't awarding reputation points based on the number of answers a question received considered?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


In the following sentence:     'cause I know what you been doing on your weekends, girl.   Should the "c" in cause be capitalized or does the fact that the first two letters have been replaced by an apostrophe mean that it stays lower case?

A new Victorian-set British novel begins sentences containing h-dropping with lower-case e's, as in " 'e took my money, 'e did." This seems incorrect but I'm at a loss to find the rule.


I had a thought of constructing a infinite decimal out of prime numbers,like the following: $$0.235711131719...$$ Is there a prove that show it's rational or irrational?

How can I prove that the number formed by concatenating the primes in order i.e. $0.235711131719...$ is irrational.  I know I have to demonstrate that it has no period, but I'll be so thankful if someone can explain very clear, including all cases.


How can I run some script and have print result in console window? Now I have these results only in System Console Window.

I have a button created by my script. I wonder how I can display what the system console displays but inside blender's console. CoDEmanX did this by running a script inside it as shown , but I want to display what happens in the system console inside blender's console.  My .blend file can be found here:


I'm writing a Bash script and when inserting lines to a file using GNU sed, the first new line is inserted as a literal n, while the rest is inserted as new lines. The command is this:  sed '5i\n\n\n' myfile   The output is this:  n     As seen, the first line in the output contains an "n" where it should be none, what am I missing about this behavior? is it possible to make sed insert only new lines with '\n'? Thank you.

While appending some text after a matched pattern, I wanted to add an empty line with a comment to isolate my additions from the rest. However, I have noticed that for the very first \n, I need to escape the \ with an additional \ (makes it \\n) but this is apparently not required for rest of the appended text. Why is this so?  An example that I produced on a SUSE 11 server (bash v3.2.57(2) and GNU sed version 4.1.5) is:  edwdev@hdpedge1:/edw> sed '/test/a \\nNot a test\nJust Playing' <<< test test  Not a test Just Playing   If I do not escape the first \n (right after the a sed command, I get an n printed instead of a newline.  edwdev@hdpedge1:/edw> sed '/test/a \nNot a test\nJust Playing' <<< test test nNot a test Just Playing   Notice that I have intentionally added a space after a command so that it doesn't conflict accidentally with alternate syntax.  Same behavior is observed if I replace \n with \t.Number of spaces after a command do not seem to matter; the first backslash needs to be escaped to print the special character even after multiple spaces.    Same is the case on another environment, where I originally observed this; a Centos 7 x64 VM, bash version is 4.2.46(2) and sed version is GNU sed 4.2.2  sed -i '/\[mysqld\]/a \\n# <<INSERTED MANUALLY>>\ntransaction-isolation=READ-COMMITTED\ninnodb_flush_method=O_DIRECT\nmax_connections=550\n# <<END OF MANUAL INSERTIONS >>\n' /etc/my.cnf   Output:  ... [mysqld]  # <<INSERTED MANUALLY>> transaction-isolation=READ-COMMITTED innodb_flush_method=O_DIRECT max_connections=550 # <<END OF MANUAL INSERTIONS >>  ...   Output Without Escaping first \n:  [mysqld] n# <<INSERTED MANUALLY>> transaction-isolation=READ-COMMITTED innodb_flush_method=O_DIRECT max_connections=550 # <<END OF MANUAL INSERTIONS >>   Is there any particular reason for this behavior? I am unable to find any details while skimming through the docs (), through, admittedly, I haven't read the entire documentation thoroughly.


I want to make the GNOME top panel and dock completely transparent so that desktop wallpaper is completely visible.  I already created my own theme and added the following css rules. My top panel turned transparent but there is still some kind of gradient from the bottom. In addition I cant get to work the dock transparency. Instead of transparent it gets black.   @import url("/usr/share/gnome-shell/theme/ubuntu.css");    #panel {   background-color: rgba(0,0,0,0); }  #dash {   background-color: rgba(0,0,0,0); }  #dash .placeholder {   background-image: none; }

This command  gsettings set org.gnome.shell.extensions.dash-to-dock transparency-mode    can have these values: 'FIXED' 'DEFAULT' 'DYNAMIC' 'ADAPTIVE'.  But none makes the dock bar completely transparent, that is, only the icons are visible.  any ideas?


I am really new to Ubuntu s i don't normally use it but i have to install it on my laptop for my computer course. My laptop runs on Windows 7 and it is pretty new. I downloaded and installed Ubuntu via Windows Installer from the website, however, when i restarted the computer and tried to boot the computer using Ubuntu, the following message appears:  Windows failed to start. A recent hardware or software change might be the cause. To Fix the problem:   1. Insert your Windows installation disc and restart your computer.  2. Choose your language settings, and the click "Next."  3. Click "Repair your computer."  If you do not have this disc, contact your system administrator or manufacturer for assistance.  File: \ubuntu\winboot\wubildr.mbr Status: 0xc0000098 Info: The selected entry could not be loaded because the application is missing or corrupt.   As I said, I am really new to Ubuntu. I have searched up the issue and found some solutions but they sound quite complicate and I have no idea what to do. Can somebody help me please? Thank you very much.

I have installed Ubuntu 12.04 (64 bit) operating system. It supports uefi so I installed it like a normal dual booting now (not like Wubi).  When I try to load Windows 8 it works fine. But when I try to run Ubuntu, I get the following error:  ubuntu winboot wubildr.mbr missing   How to fix the Ubuntu boot-loading issue?  UPDATE: I have tried bootinfoscript on my lap and this is the URL:


#include <stdio.h>  int main() {     int a[5] = {1,2,3,4,5};     printf("%d \n", a[1]);     printf("%d \n", 1[a]);          printf("%d \n", a[2]);     printf("%d \n", 2[a]);     return 0; }  How is the 7th and 10th line of code working?? After executing the program, I got the following result 2  2  3 3

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


In OpenLayers 5, if loading of some tiles has failed (because of temporary network issue, for example), those tile are never attempted to load again.  Is it possible to force OL to retry loading of those tiles?  Workflow:   disable network zoom in (to zoomlevel 2), all tiles fail zoom in again enable network zoom out, you are back in zoomlevel 2 now. No tiles are displayed <- OL should reload those errorneous tiles   Goal is not to reload whole layer - OpenLayers should attempt to reload only failed tiles every time, when those are displayed on map.

I want to display an indoor map. My problem is that when I change to another floor (the URL changes) the tiles are not refetched. The following code is used:  var indoorSource = new ol.source.XYZ({     crossOrigin: null,     tileUrlFunction: parseUrl,     maxZoom: 45 }); var indoorLayer = new ol.layer.Tile({     source: indoorSource });   The parseUrl function is the following:  var parseUrl = function (tileCoords, pixelRatio, projection) {     var url = 'http://127.0.0.1/tiles/{z}/{level}/{x}/{y}';     var innerMap = LocalUserData.currentInnerMap();      url = url.replace('{level}', innerMap.level || 0);     url = url.replace('{z}', tileCoords.z || 0);     url = url.replace('{x}', tileCoords.x || 0);     url = url.replace('{y}', tileCoords.y || 0);     return url; };   Is there a way to force a reload of the tiles?


The question  was never answered, and Windows 10 is being released .  Somewhat worryingly, the most recent ArcGIS Desktop  page doesn't list Windows 10.  Will ArcGIS Desktop 10.x continue to work on Windows 10? Should Windows users upgrade their operating systems from versions 7/8 to version 10?

Will ArcGIS 10 run on the new windows 10 technical preview?  I am setting up an interface on my Mac and there is the free option of downloading the Windows 10 technical preview, some sort of beta version, I'm assuming.   Just wanted to see if 10.1 will run ok on Windows 10 (ignoring the Mac aspect), as this is all I am using my windows interface for?


I was just reading my friend's shell script file and I happen to run within this command  ssh yote@user << EOF   cd tests   tar -xf $TARGET_TEST.tar   rm $TARGET_TEST.tar   cd $TARGET_TEST   *more stuff goes here* EOF   I was just wondering what does the EOF mean in the use case. I only know that it is an initialism for "End-of-file" but there were more lines after the second EOF.

I've just come across the << command, used like so:  cat > outfile.txt <<EOF Multi-line content that will be written to outfile.txt EOF   Now, I've no idea what this is called, but I'd quite like to know it's name, primarily so I can go and search and find out more about its syntax. Sadly, Googling for "<<" just doesn't work.


Consider an infinite chess board. A knight moves 2 squares forward on one direction, then turn left or right, move 1 square further on. Let's denote this a normal knight, or $\langle 2,1\rangle$ knight. And it's known that a knight could reach any square on the board, i.e. denoting the starting square as $(0,0)$, a $\langle 2,1\rangle$ knight can arrive any square $(m,n)$.  Now let's say this knight gets drunk and started to walk $\langle p,q\rangle$...   Of course, if both $p$ and $q$ are even numbers, a $\langle p,q\rangle$ knight won't arrive $(m,n)$ if both $m$ and $n$ are odd numbers.  Then brings to the question, in which situation, a drunk $\langle p,q\rangle$ knight still could reach any square $(m,n)$ ?

An $(a,b)$-knight moves $a$ units horizontally and $b$ units vertically (or $b$ horizontally and $a$ vertically) for each move. For example, the traditional knight is a $(1,2)$- or $(2,1)$-knight. Does there exist general algorithms to the following problems?   Given $a,b$ and an infinite chessboard, can an $(a,b)$-knight reach every point on the chessboard no matter where it starts?  Given $a,b$ and an $m\times n$ chessboard, can an $(a,b)$-knight reach every point on the chessboard no matter where it starts? Here you can make the assumption that $m,n\gg a,b$ so the space won't be too limited for the knight to move.   In an infinite chessboard, it should be simpler, because the knight can reach every point if and only if it can achieve a single-unit up, down, left and right movement. For $m\times n$ chessboards though, I guess there might still be problems (or requirement for special treatment) with the edge or corner points, even when $m,n\gg a,b$?


$$\int_{0}^{\pi /2} \frac{\sin^{m}(x)}{\sin^{m}(x)+\cos^{m}(x)}\, dx$$  I've tried dividing by $\cos^{m}(x) $, and subbing out the $\ 1+\cot^{m}(x) $ with $\csc^{n}(x) $ for some $n$, but to no avail.  I've also tried adding and subtracting $\cos^{m}(x)$ to the numerator, and substituting $x$ by $\pi-y$, but these techniques haven't helped either.

Evaluate the integral $$\int^{\frac{\pi}{2}}_0 \frac{\sin^3x}{\sin^3x+\cos^3x}\, \mathrm dx.$$  How can i evaluate this one? Didn't find any clever substitute and integration by parts doesn't lead anywhere (I think).  Any guidelines please?


Can anyone give me a simple example of a subset of $\mathbb{R}$ which is neither an $F_\sigma$ set nor a $G_\delta$.

I'm looking for subset $A$ of $\mathbb R$ such that $A$ is a Borel set but $A$ is neither $F_\sigma$ nor $G_\delta$.


If $U$ is a neighbourhood of $e$ (identity) in a topological group,show there is a neighbourhood $V$ of $e$ for which $VV^{-1} \subseteq U$.   It's exercise from Basic topology,Armstrong,Promblem 18 of Chapter 4,and my approach get a little problem,so can you help me???

I'm having trouble in proving the following:  If $U$ is a neighborhood of $e$, there exists $V$ neighborhood of $e$ such that $V^{-1}V \subseteq U$  Can someone please verify if what I wrote makes sense? And if possible show the way to go further, because I'm stucked.  My attempt:   Let $G$ a topological group.  (Definition: A topological group $G$ is a topological space with a group structure such that the applications $m: G \times G \to G$ and $r:G \to G$, defined by $m(x,y) = x.y$ and $r(x) = x^{-1}$ are continuous.)  $V^{-1}V = \{ x^{-1}y ; x,y \in V\}$   $U$ is a neighborhood of $e$, then is $V^{-1}V$ a neighborhood of $e$?  Since $r$ is homeomorphism and the right-translation $\delta_y:G \to G, \delta_y(x)=x.y$ is homeomorphism, the application $\delta_y \circ r :G \to G$ is homeomorphism. Let $x \in U$. Then $\delta_y \circ r(x) = x^{-1}y$ is in an open set, because of continuity. Why is it a neighborhood of $e$?


This morning I was greeted with low disk warning on my root partition. So I started with usual investigation path and obviously the result of my first command become the one as shown below.  [root@my-server /]# df -h Filesystem            Size  Used Avail Use% Mounted on /dev/sda3              97G   86G  6.0G  94% / tmpfs                  12G  5.7G  6.1G  48% /dev/shm /dev/sda2             360G   16G  326G   5% /www /dev/sdb1             458G   38G  397G   9% /web /dev/sdc1             458G   42G  393G  10% /server /dev/sdd1             458G   44G  392G  10% /mysql [root@my-server /]# df -i Filesystem            Inodes   IUsed   IFree IUse% Mounted on /dev/sda3            6406144  264687 6141457    5% / tmpfs                3070273     175 3070098    1% /dev/shm /dev/sda2            23928832    1373 23927459    1% /www /dev/sdb1            30457856   52061 30405795    1% /web /dev/sdc1            30457856    1995 30455861    1% /server /dev/sdd1            30457856     793 30457063    1% /MySQL   But I wanted to know who is taking that much space and fired up disk usage and found,  [root@my-server /]# du -shx / 24G / [root@my-server /]# du -h --max-depth=1 / 1.6G /root 4.0G /home 14M /sbin 6.5G /var 0 /misc 12K /.dbus 4.0K /mnt 4.0K /media 5.7G /dev 4.8G /opt 0 /sys 52M /user 35M /etc 0 /net 4.0K /bak 43G /mysql 6.5G /usr du: cannot access `/proc/3633/task/25117/fd/78': No such file or directory du: cannot access `/proc/3633/task/7047/fd/70': No such file or directory du: cannot access `/proc/24882/task/24882/fd/4': No such file or directory du: cannot access `/proc/24882/task/24882/fdinfo/4': No such file or directory du: cannot access `/proc/24882/fd/4': No such file or directory du: cannot access `/proc/24882/fdinfo/4': No such file or directory du: cannot access `/proc/24883': No such file or directory 0 /proc 244M /lib 4.0K /nas 4.0K /selinux 4.0K /srv 27M /lib64 42G /server 49M /boot 16G /www 16K /lost+found 38G /web 100M /tmp 8.9M /bin 168G /   whoops, the actual usage being around 30GB, how do I find what files are eating my disk?  Confirming to the suspicion the culprit was a deleted file, Nothing like find or du could resolve the offending file if the file doesn't exists! well, te actual sequence of actions to find it were,  [root@my-server ~]# lsof / | grep deleted ... java  3633  wwwuser  1w  REG  8,3  66975347588  396715  /home/wwwuser/apache-tomcat-7.0.29/logs/catalina.out (deleted) ...   whoops, a 62GB file, now,  [root@my-server ~]# cd /proc/3633/fd/ [root@my-server fd]# ll | grep deleted [root@my-server fd]# > 1   Well, the above commands I figured out from another SO answer at  but I was wondering wat was that last command? How did it reclaim the orphan disk space?

We had our samba server (ubuntu 8.04 ltr) share fill up the other day but when I went to look at it I cant see any of the shares have to much on them  we have 5 group shares and then each users has an individual share  one users has 22gigs of stuff a few others have 10-20mb of stuff and everyone else is empty  so maybe like 26gigs total  I deleted a few files yesterday and freed up about 250mb of space today when i checked it it was completely full again and i deleted some older files and freed up about 170mb of stuff but i can watch it slowly creep down in free space.  I keep running a df -h  Filesystem           1K-blocks      Used Available Use% Mounted on /dev/sda1            241690180 229340500    169200 100% / varrun                  257632       260    257372   1% /var/run varlock                 257632         0    257632   0% /var/lock udev                    257632        72    257560   1% /dev devshm                  257632        52    257580   1% /dev/shm lrm                     257632     40000    217632  16% /lib/modules/2.6.24-28-generic   /volatile  what can I do to try to hunt down whats taking up so much of my hdd? (im fairly new to unix in general so i apologize if this is not well explained)


Lets say I have a class called Person, that Id like to make a new instance of. From my testing, both of theese examples work. var Mike = new Person();  seems to do the same thing as Person Mike = new Person();  My question is, what is the difference, and which one is "generally better".

After discussion with colleagues regarding the use of the 'var' keyword in C# 3 I wondered what people's opinions were on the appropriate uses of type inference via var?  For example I rather lazily used var in questionable circumstances, e.g.:-  foreach(var item in someList) { // ... } // Type of 'item' not clear. var something = someObject.SomeProperty; // Type of 'something' not clear. var something = someMethod(); // Type of 'something' not clear.   More legitimate uses of var are as follows:-  var l = new List<string>(); // Obvious what l will be. var s = new SomeClass(); // Obvious what s will be.   Interestingly LINQ seems to be a bit of a grey area, e.g.:-  var results = from r in dataContext.SomeTable               select r; // Not *entirely clear* what results will be here.   It's clear what results will be in that it will be a type which implements IEnumerable, however it isn't entirely obvious in the same way a var declaring a new object is.  It's even worse when it comes to LINQ to objects, e.g.:-  var results = from item in someList               where item != 3               select item;   This is no better than the equivilent foreach(var item in someList) { // ... } equivilent.  There is a real concern about type safety here - for example if we were to place the results of that query into an overloaded method that accepted IEnumerable<int> and IEnumerable<double> the caller might inadvertently pass in the wrong type.  var does maintain strong typing but the question is really whether it's dangerous for the type to not be immediately apparent on definition, something which is magnified when overloads mean compiler errors might not be issued when you unintentionally pass the wrong type to a method.


We have a webform that uses a webformhandler to post the submission to our credit card processor.  The webform works correctly when executed by itself, but when the form is embedded in a Secondary page I get a blank screen.  All the pages that use this webformhandler quit working after the last update to the Drupal core 8.7.5  The webformhandler collects data and writes it to the database, it then does the following:  include(drupal_get_path('module', 'xxx').'/redirect.html'); die();   The redirect_form.html is a page that tells the user we are sending them to our payment processor.  The payment processor uses the information we send to create a form that present to the user to collect necessary data.  On submit, the payment processor send us a confirmation code (fail/success).  I have narrowed the error to the statement:  include(drupal_get_path('module', 'xxx').'/redirect.html');   the content of /redirect.html is as follows:    <title>Payment Required</title>
Payment Redirect

We are now redirecting you to our e-commerce partner, xxx. xxx handles secure payments for xxxxxxxxxxx. If you are not redirected within a few seconds, you do not have Javascript enabled. Please enable Javascript, then click the button below to continue to xxx. Javascript must be enabled for you to continue--xxxxxxxxxxx requires Javascript for its processing.
 <form action="https://xxx.xxx.xxx/xxx" method="get" name="mainForm" id="mainForm" > <?php if (!empty($lname)) { ?> <input type="hidden" name="lname" value="<?php echo $lname; ?>"> <?php } ?> <input type="hidden" name="itemcode1" value="<?php echo $glcode; ?>"> <input type="hidden" name="amount1" value="<?php echo $cost; ?>"> <input type="hidden" name="ref1type" value="TRANSID"> <input type="hidden" name="ref1val" value="<?php echo $id; ?>"> <input type="hidden" name="ref2type" value="VALCODE"> <input type="hidden" name="ref2val" value="<?php echo $valCode; ?>"> <input type="submit" name="Submit" value="Continue" id="_s"> </form>

I have a custom module that displays a form.  Upon submitting the form, I want to redirect the user to a different page.  How can I do that?


I have an EC2 node running Ubuntu 14.04. On a deploy this morning, I received the following error message from git fetch:  error: unable to create temporary file: No space left on device   I logged into the server and df -h indicates I have plenty of space:  $ df -h Filesystem      Size  Used Avail Use% Mounted on udev            492M   12K  492M   1% /dev tmpfs           100M  488K   99M   1% /run /dev/xvda1      7.8G  4.9G  2.5G  67% / none            4.0K     0  4.0K   0% /sys/fs/cgroup none            5.0M     0  5.0M   0% /run/lock none            497M  4.0K  497M   1% /run/shm none            100M     0  100M   0% /run/user   Am I misreading df here? My understanding has been that /tmp on EC2 is resident on /dev/xvda1, but maybe I'm wrong?

I have a SCSI disk in a server (hardware Raid 1), 32G, ext3 filesytem. df tells me that the disk is 100% full. If I delete 1G this is correctly shown.  However, if I run a du -h -x / then du tells me that only 12G are used (I use -x because of some Samba mounts).  So my question is not about subtle differences between the du and df commands but about how I can find out what causes this huge difference?  I rebooted the machine for a fsck that went w/out errors. Should I run badblocks? lsof shows me no open deleted files, lost+found is empty and there is no obvious warn/err/fail statement in the messages file.  Feel free to ask for further details of the setup.


Let $f:[0,1]\to \mathbb{R}$.       Part A: Show that:   $$\{a \in [0,1]: f(a)\neq 0\} = \bigcup_{n=1}^{\infty} \{a \in [0,1]: |f(a)|\geq 1/n\}$$      Part B: Assume $M$, a positive constant exists such that for any finitely many distinct numbers $a_1,\dots,a_n\in[0,1]$      $|f(x_1)+...f(x_n)|\le M$      Show that the set $$\{a \in [0,1]: f(a)\neq 0\}$$ is countable.   Attempt:  Part a)   Let $x \in[0,1]$ such that $f(x) \neq 0$ then $|f(x)|>0$ and $n\in \mathbb{N}$ such that  $0<1/n\le f(x)$.  Now there must exist a $x \in\bigcup_{n=1}^{\infty} \{a \in [0,1]: |f(a)|\geq 1/n\}$ $n\in \mathbb{N}$ must then exist such that $|f(x)|\ge1/n>0$.  Part B (I didn't know how to complete this)  Facts: A set $E$ is countable if there exists an injective mapping from $f:E\to\mathbb{N}$ Also, every finite set is countable by definition.  from a) we know:  $0<f(a)\le |f(a_1)+...+f(a_n)| \le M$  Now I'm not really sure if I'm done now? The set seems like its bounded from both sides and $a_1..a_n$ is a finite set by definition? I don't know how to finish  This question is different from my last one in that I forgot to add part b). I'm sorry.

Let $f:[0,1]\to \mathbb{R}$. Show that:  $$\{a \in [0,1]: f(a)\neq 0\} = \bigcup_{n=1}^{\infty} \{a \in [0,1]: |f(a)|\geq 1/n\}$$  I just don't really know how to formulate a proof using definitions? My prof doesn't do examples and this is my first proof based class so I'm really lost. Like I could probably explain a good answer in words but I don't know how to mathematically prove it? Do you have any material I could learn from?


I try to change the rm command into a command that give me backup of the file and remove the file after.  function move_to_trash () {         unset rm;         cp -v "$@" "/home/`whoami`/backup/" &&  rm "$@"; }   alias rm='move_to_trash'   Output:   'file1' -> '/home/dorchester/backup/file1' 'file1' -> '/home/dorchester/backup/file1' 'file1' -> '/home/dorchester/backup/file1' 'file1' -> '/home/dorchester/backup/file1' 'file1' -> '/home/dorchester/backup/file1' 'file1' -> '/home/dorchester/backup/file1' 'file1' -> '/home/dorchester/backup/file1' 'file1' -> '/home/dorchester/backup/file1'   The cp command keep running without starting rm "$@" command, which is something really strange. This seems to be a infinite loop, I would like to know how can this loop happen. Also, I'm aware of existence solution that turn cp command into move to trash command such rmtrash, though I prefer bash scripting method.

I have a function in my .bashrc to automatically sudo to open files that aren't writable by me:  vim() {     if [ -w "$1" ]; then         \vim "$1"     else         sudo env HOME="$HOME" \vim -u ~/.vimrc "$1"     fi }   When the file needs sudo, it works fine. When it doesn't, it recursively calls this function and uses 100% of 1 CPU until I C-C.   I see there are a few options, all of which I've tried. One actually works:  'vim' "$1" #fails \vim "$1" #fails command vim "$1" #Works!   Why do the other options not work as I would expect them to?   (I know this is a duplicate, but it was very hard to find my answer on SO/SE with the current question titles, so I wanted to post a question with a title that I and others could've found by google searching)


Hi guys I installed ubuntu 12.04 (x32) on my system and then side by side I had my windows7 ultimate(x64) running aswell (dual boot).  Last week for some reason I started getting a blue screen crash after running an update on ubuntu. Blue screen said it has a crash with code bCC:0000145, I didnt know what to make of it hence I thought just erase the whole HDD and start over with a fresh copy of windows.  And this where (I feel a major disaster struck, as i'm a noob i've no clue what i did was WRONG!!!) I got into a huge problem, when I put in the Windows OEM cd and set the comp to boot from cd it was going all fine untill I deleted all my partitions into unallocated space and then wanted to make new partions and start fresh - BAMM another blue screen of death.  And this time after the blue screen it's stopped booting from Cd, and directly gave me an error message saying "no such partition; grub rescue"  I've tried everything in my capacity to get it to work but I dont know clearly what to do further please help.

I normally dual-boot with 12.04 and Win XP pro sp3 on a Thinkpad R60.  I needed to reinstall windows because of problems piling up, so I ran the computer's built-in hard-disk recovery software.  I told it not to mess with the other partitions, but somehow it deleted the Linux partition.  That's what I was using to backup all of my windows files, so now everything I have is gone.  I just ran the USB setup with linux, and the partition is deleted - it just shows it as empty space.    Is there ANY way to get all of my files back?


I wonder if it's possible to open a sub-directory using something rather than its names, because some names are long and also sometimes they have meaningless parts(acronyms or etc.). Is there something like an index number(after entering ls) and a special command I can use for this purpose? Or do you have another solutions? Thanks.

In the Ubuntu terminal I find myself spending considerable time to switch to a particular directory every time the computer starts up. Is there some way I can make this process easier? Is there some hotkey or some quick directory change that I can use (like speed dial on a phone)?   eg:     cd 1:Changes to saved directory one


Does anyone know how to number an equation manually? I know using \begin{equation} automatically numbers the equation but I want to number it manually.  Like this:  ax=b                      2.1  ax=b                      2.2   etc.

How to number equations manually? I'm making a presentation on a chapter, so would like my equations to be numbered as in the book, and not necessarily from the first equation in the chapter, for example, if the first equation in my document is numbered (5.23).  Thank you.


When I am choosing my cards for a dig, I know I get three cards. Usually, I end up with three different ones, but I started to wonder - if I have a mission to collect, say, a lot of coal, can I stack card effects to make it easier?  For example, can I use both a Coal Galore card that says "100% more Coal blocks. 12% of Coal blocks are explosive" and a More Coal card that says "100% more Coal blocks", and have the effects combine? Or does it just select the "better" card?

I have a number of cards that grant a % more of a specific block type, if I have more than one of them chosen when I start digging will the effect stack or does it just choose the highest?


There is a simple class:  namespace ConsoleApp5 {     class Program     {         static void Main(string[] args)         {             Test test = null;             int? t;             t = test?.i;  // in this place the overloaded method "operator! =" is NOT called             if (test != null) // in this place the overloaded method "operator! =" is called             {                 t = test.i;             }         }     }     public class Test     {         public int i = 5;         public override bool Equals(object obj)         {             return true;         }         public static bool operator ==(Test test1, Test test2)         {             return true;         }         public static bool operator !=(Test test1, Test test2)         {             return true;         }     } }   In this line:  if (test != null)   called  public static bool operator !=(Test test1, Test test2)   but in this line:  t = test?.i;   none of the overloaded methods are called  How to overload operator "?."

Is it possible to overload the null-coalescing operator for a class in C#?    Say for example I want to return a default value if an instance is null and return the instance if it's not. The code would look like something like this:     return instance ?? new MyClass("Default");     But what if I would like to use the null-coalescing operator to also check if the MyClass.MyValue is set?


I play different versions of Minecraft on the same computer like 1.16.1, 1.16.2 etc. and I would like to be able to use  for Fabric for all of those versions. I downloaded and installed it for 1.16.1 and it worked fine, then when I downloaded and installed it for 1.16.2 it gave an error when I tried to to launch. To get it to work with 1.16.2 I had to remove the map version that works with 1.16.1. How can I install the map so that I can use it with the different Minecraft versions?

I like playing Equivalent Exchange 2 mod, which was only updated for 1.2.5.  It was also an external mod, meaning it was put in the "mods" folder.  The new launcher works great, but I cannot find a way to manage the mods in the mods folder based on the profiles I want to play.    So what I want is to have a "Skytable" version that runs EE2 and a few other external mods, and also have a "Tekkit" version that has a custom layout of mods, some of which are external.  Both are on the 1.2.5 base Minecraft, but I don't want mods from Skytable to work on Tekkit and vise versa.  Is there a way to have the "profiles" the launcher creates look in a subfolder of "mods" for something like '/mods/"Profile name" for external mods? I know moderate Java programming, but have never looked at the code for Minecraft or any mods and etc.


I have a Mac Pro Mid 2010 that since about a week ago only displays a blank white screen after rebooting. It doesn’t respond to various startup options. My reseller advised my to replace the original ATI Radeon 5870 graphics card.   I installed a new Sapphire Pulse RX 580 (so that I can later upgrade the Mac OS from 10.13.6 to 10.15) plus new cable, but see nothing at all on the monitor. I assume the bios doesn’t recognize the card as I could not install any software. How can I solve this?  Could I temporarily install an ATI Radeon 5770 that has been used in a PC just to install software for the RX 580?  Any alternatives?

I've got a PC video card that I'd like to get boot screen support for on my Mac Pro. In particular, it is a Gigabyte R9 270X. The card is supported on the Mac once it boots, but I would like to get boot screen back since my old 8800GT has been baked in the oven a few too many times by now :-)  I've seen numerous guides on the internet about flashing the BIOS on the video cards and also ones that speak about adding the EFI BIOS, but in the haphazard forum approach, it isn't clear how this all works. To some degree, I've recently come away with the notion that you don't get rid of the existing BIOS, but rather add an EFI partition to it that the Mac would recognize. If that assumption is correct, then it would lead me to believe that adding an EFI BIOS that works on a similar card (R9 280X or 7950 which are both close but not quite) should work since I'm assuming that the existing BIOS would be similar enough to hook in. Failing that, I'm not clear how you would get a card-specific EFI BIOS for boot screen support.  Anyone an expert on this? I'm just really having a hard time trying to sift through all this and hoping to get a more direct answer!


I have the following paragraph:     We often write hundreds of lines of code to express simple concepts. This code takes time to develop and maintain - and if you’re writing  tests, then that time doubles.   I've pasted into both Grammerly and Word, but neither offer a correction.   I'm not confident if it should be this or that.

Learning and using English I'm always confused about what word to use for referring to things that have been described by me a few sentences earlier: "that" or "this".   Confusion comes from the fact that only the equivalent of "this" is always used in my native language for such referring. But I've noticed that in English for such referring "that" is used as often as "this" (or maybe even more often).  Some examples for illustrating (just tried to google something appropriate to convey my idea better):     We assess local... the demographics of the local population. What are the natural traffic drivers in the area. Things like cinemas and pubs and retail and office and all that type of things and we now put together a bit of a matrix and actually give a weighted score to each of the things we know help our business. That helps us decide in a more scientific fashion.   or:     The problem of Cervantes' origin became after that into a tough matter. Some experts believed that the Cervantes from Alcázar, in the times of the Lepanto Battle, was in the age of a child, more concerned about gathering nests and that type of things than about fighting as a soldier.   and for "this":     I believe lot of people who involved fishery industries in Mexico Gulf are suffering now but as for economic issues, U.S government and other countries will support them and give an utmost response to it. Important thing is that we learn from this mistake and make sure this type of things will never happen in the future and protect nature environment thus we have to take this technology to get energy from water very seriously. I really hope this technology will be available and used for everybody as soon as possible.   Is there a rule describing proper usage of these words in cases like this? (or should I have written "..in cases like that"?)


I i left porkchops out to thaw i forgotten about them and left them out all night is it ok to cook still

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I am having a file named as new11 and new12 and the path is source=\Users\user.CLPSTPDFC46\Desktop\new11 and dest=\Users\user.CLPSTPDFC46\Desktop\new12  Now I need to copy the content from new11 to new12. how can I approach this ?

How do I copy a file in Python?  I couldn't find anything under .


In page 33 of Pierre Schapira's Algebra and Topology, it is briefly mentioned that given functor $\alpha:I\rightarrow C$, if $i_0$ is initial in $I$, then there is an isomorphism   $\lim_\longleftarrow\alpha \approx \alpha(i_0)$  To try to verify this, I try the following.   First denote $\{\lambda_i\}_i$ as the morphisms associated with limit $L$. For given $i\in I$, associate $\rho_{i}$ as the application of $\alpha$ to the unique morphism from $e_{0}$ to $i$. Then we have by the definition of the limit, a morphism $\mu:\alpha(i_0)\rightarrow L$ such that $\lambda(0)\circ\mu=id$.   How should I prove $\mu\circ\lambda(0)=id$? (if this is the right way to approach the problem)

Suppose $\mathcal{C}$ a small category and $A$ : $\mathcal{C} \rightarrow \mathcal{E} $  where $\mathcal{E}$ is a cocomplete category and $\mathcal{C}$ has a terminal object $1$  When is the colimit of $A$ equal to its image on the terminal object?  I thought something like:  If $A$ is a full functor then $\operatorname{im}(A)$ must be a full subcategory of $\mathcal{E}$ then the inclusion functor $\mathcal{I}$ must be final and $\operatorname{colim} (A \circ \mathcal{I})= \operatorname{colim} A$ and clearly $A(1)$ is the colimit of $A$ in $\operatorname{Im}(A)$  Is this right? Can we find weaker conditions ?


I use LXTerminal 0.20. with XFCE 4.12.2 on Linux Mint 18.2 (upgraded from 18.1).  When I copy text in some desktop app and paste it into an LXTerminal session, I get 0~ and 1~ prepended and appended, respectively, to the text. So,  Hello world   becomes  0~Hello World1~   This doesn't happen with XFCE4's "native" terminal app (xfce4-terminal), so not the same issue as in  - and not resolved by the answer there. It also doesn't happen if I copy the text to apps with GUI (i.e. the text itself, in the clipboard, is fine).  Why is this happening and what can I do to avoid it?

I use xubuntu 14.04, 64 bit. Every now and then, when I try to paste some text in xfce4-terminal, instead of the expected text to be pasted, it is surrounded by 0~ and 1~, such as:  0~mvn clean install1~   The text is supposed to be mvn clean install -- I verified this by pasting the content in various other applications (gnome-terminal, gedit and others). Every application pastes correctly the content, except xfce4-terminal. I couldn't find any references for this on the internet (unfortunately, it is hard to search for text with special characters on google.com...). Why does this happen?


Let's suppose that the speed of light would not be a constant but a function of something. As is quite clear now, universe is expanding exponentially. If the speed of light would actually be a function of this expansion, maybe in terms of cosmological constant... We would never find this out because the measure of distance (definition of meter) is now locked; meaning it is defined in terms of the speed of light! Also, in a way we know that the speed of light may indeed be a function of cosmological constant because very distant targets are escaping us faster than the speed of light? Is it hence indeed so that the speed of light just can't be measured, or defined currently by any independent means?

Could someone judge my (stoner) hypothesis that the speed of light has changed over time -- i.e. as the universe has expanded in volume light has slowed down, perhaps going so far as back to the big bang when it was infinitely fast and there was no time because everything happened at once etc. Thinking that the speed at which information can propagate through the universe is linked to the size of it seems intuitive to me. My question -- is there an easy disproof of this? Would Einstein have to be wrong? Does it violate anything supposedly more fundamental such as quantum or string theories? Do any current experiments invalidate it? If not can you show me in any case why you think its unlikely.   Edit 8/24  I'm accepting Mark M.'s answer but will post this here because there is a character limit on comments  @Mark M thanks, good answer but as someone who has only read some popular physics, and should leave this to the experts, I'm still muddled in my personal theory. I don't see why you should need two units to measure the speed of light. The thing I have a hard time wrapping my head around is the relation of time and distance. They seem like they could fundamentally be the same thing. If you say time is measured fundamentally by the vibration of so and so quantum object in space... why can't we just measure that vibration distance as the constant... I'll repeat myself to try to be clear... there is a certain minimum distance that particles have to go to interact with each other... if it wasn't vibrating there wouldn't be time,its what creates the illusion of time...so instead of talking about speed or c as distance/time.... can't we simply talk about that distance a quantum object vibrates....I'll lead up to my point.....perhaps there can need be only one constant here, and that is the physical size of the universe. a tiny metal tuning fork doesn't appear to be vibrating at all but if you blew it up to the size of the empire state building the metal rods would move from window to window. perhaps as our universe expanded in size the length of that minimum vibration (perhaps infinite at point zero) would have expanded, and therefore created the illusion of time and the speed of light, which, as the universe expands, will continue slowing down. perhaps we are like a big balloon and we have been blown up and all the fields/particles-without-size are vibrating more and more in that space.. am i missing something obvious here?


List all $i$ for which there is a closed orientable $6$-manifold $ M$ with $H_i(M) = \mathbb{Z} \oplus \mathbb{Z} \oplus \mathbb{Z}$.    So, obviously this has to do with Poincare Duality. We can't have $i=0$ or $i=6$ by definition of a manifold. So we are left with the cases $i=1$ through $5$, which reduce to $i=1, 2,$ and $3$, since the rank of $H_1$ is equal to the rank of $H_5$ by Poincare Duality (and thus for $H_2$ and $H_4$, too). I am thinking that setting up the exact sequences here gives me some kind of equation which will lead to a contradiction in some of those cases, but I'm not able to see why yet. Can I get a push in the right direction, and an evaluation of my thoughts so far?

List all $i$ for which there is a closed orientable $6$-manifold $M$ with $H_i(M) =\mathbb{Z}\oplus\mathbb{Z}\oplus\mathbb{Z}$.   I am working on an old exam problem and this one stumped me. Progress so far:  I can take $Y=\mathbb{T}^3 \times \mathbb{S}^3$ and get the desired group for $i =1,5,2,4$ I think. But this construction I believe gives $H_3(Y)=\mathbb{Z}^2$. What to do in this case?


Let $f:M\to\mathbb{R}$. If the sets $\{x:f(x)>a\}$ and $\{x:f(x)<a\}$ are open subsets of $M$ for every rational $a$, show that $f$ is continuous.  My attempt:  I want to prove that $\{x:f(x)>b\}$ and $\{x:f(x)<b\}$ are open subsets of $M$ for every real $b$. Then the problem becomes much simpler.  Let $A=\{x|x>b, x\in\mathbb{Q}\}$ and $B=\{x|x<b, x\in\mathbb{Q}\}$. $A$ and $B$ are countable.  I claim that $\displaystyle\{x:f(x)>b\}=\bigcup_{x_i\in A}\{x:f(x)>x_i\}$    To prove this, let $y\in\{x:f(x)>b\}$.  Then $f(y)>b$.  Let $x_j$ be a rational satisfying $b<x_j<f(y)$. $x_j>b\text{ and }x_j\in\mathbb{Q}\implies x_j\in A$  $\displaystyle f(y)>x_j\implies y\in\{x:f(x)>x_j\}\implies y\in\bigcup_{x_i\in A}\{x:f(x)>x_i\}$  Thus, $\displaystyle\{x:f(x)>b\}\subset\bigcup_{x_i\in A}\{x:f(x)>x_i\}$ ----------------- (1)  Let $\displaystyle y\in\bigcup_{x_i\in A}\{x:f(x)>x_i\}$  $\implies y\in\{x:f(x)>x_j\}$ for some $x_j\in A$.  $\implies f(y)>x_j$ and $x_j\in A\implies x_j>b\implies f(y)>b\implies y\in\{x:f(x)>b\}$  Thus, $\displaystyle\bigcup_{x_i\in A}\{x:f(x)>x_i\}\subset\{x:f(x)>b\}$ ------------------- (2)  From (1) and (2),  $\displaystyle\{x:f(x)>b\}=\bigcup_{x_i\in A}\{x:f(x)>x_i\}$  The RHS is a union of open subsets of $M$ and is therefore open.    Similarly, one could prove that $\{x:f(x)<b\}$ is open for every real $b$.  This would greatly simplify the problem.  Is my proof correct?

I'm trying to prove that $f:X\longrightarrow\mathbb{R}$ is continuous if, and only if, the sets $$\{x\in X:f(x)\geq\alpha\} \text{ and } \{x\in X:f(x)\leq\alpha\}$$ are closed $\forall\alpha\in\mathbb{R}$, where $X$ is a metric space.  I've managed to prove the $\left(\Rightarrow\right)$ direction:  I'm using the negative, that is, supposing that one of the sets are not closed and showing that $f$ won't be continuous. Suppose $A\equiv\{x\in X:f(x)\geq\alpha\}$ is not closed, then there's a limit point $y\notin \{x\in X:f(x)\geq\alpha\}$ and a sequence $y_n\longrightarrow y$. Without loss of generality, let $y_n\in A,\forall n\in\mathbb{N}$, then $f(y_n)\geq\alpha$, but $f(y)<\alpha$.  Therefore, $|f(y)-f(y_n)|\geq\varepsilon >0,\forall n\in\mathbb{N}$, where $\varepsilon = \alpha - f(y)>0$. $\Box$  However, I'm having some trouble with the $\left(\Leftarrow\right)$. Can anyone give me some tips?  Thanks for helping! :D


I had my corned beef in the slow cooker on warm for 2 and a quarter hours before I saw it was not on high.  I then turned it to high and continued to cook it.  Is it still safe to eat?

I put some uncooked stew meat and veggies on this morning and left for 5 hours. When I came home I realized it was only set on warm. Is my meat safe to eat? I have now put it on the stove to cook.


We use the "night owl" idiom for a person who go to sleep late at night, and the "early bird" for those who wake up early in the morning. Is there any idiom for a person who goes to sleep late at night (2 AM) and wakes up early in the morning (6 AM)?

All the words or phrases I know for people who stay up at night merely describe the habit of not sleeping (e.g.: a night owl or insomniac)  I am looking for a word or phrase with an emphasis on working hard at night. These people work are different from insomniacs because they have no problem sleeping but they refuse sleep to work. They are different from night owl because they wake up early in the morning.  To give more context, suppose a nurse with kids who has a normal day life like most people and takes care of the kids but also works most nights in a hospital.