Where is my lock file? mysql
Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?
I'm trying to enable alsa on different prefix than default through winetricks.  More specifically, the prefix that has Rosetta Stone on it, as it cannot see my microphone.  When I open winetricks, it only lets me select default.  I tried anyway, on default, and it did not resolve the issue.  I saw some answers online, through the terminal, but that didn't work either.  Maybe I have the syntax wrong?  steve@stevelap:~$ WINEPREFIX=~/.PlayOnLinux/wineprefix/Rosetta sh winetricks alsa sh: 0: Can't open winetricks steve@stevelap:~$ sudo WINEPREFIX=~/.PlayOnLinux/wineprefix/Rosetta sh winetricks alsa [sudo] password for steve:  sh: 0: Can't open winetricks   Could anyone please offer assistance?  Thanks! Is there a canonical explanation for how Ant-Man's weight works when he shrinks down that's consistent with the various events depicted in the film?    I think the explanation given in the film is roughly "the suit compresses the space in-between atoms, so your size decreases, your density increases, and your total mass stays the same", however it seems to be portrayed in contradictory ways.  For instance:   He can float in water, and even be sent shooting through the air by a relatively gentle flow of water filling a bathtub.  This wouldn't happen if he retained his original mass, as he'd essentially be the densest thing on the planet and should sink like a stone even in a vat of molten lead. Upon landing after being ejected from the bathtub, the ceramic tile underneath him shatters.  That takes a significant amount of force, and similar effects are used at other points in the movie where he falls onto (or straight through) various things. He's able to get sucked into a vacuum-cleaner.  One that didn't even appear to be a high-end, extra powerful vacuum-cleaner, let alone one capable of sucking up a 200 pound piece of dust.   He can run along the barrel of a gun as someone shoots it, apparently without causing them to drop the weapon or even have trouble continuing to aim it.     Does a more consistent explanation exist in other media, that would fit with the above examples?  Or is this simply a case of the power being made to do whatever happened to be most convenient at the time? I have to format my entire disk and reinstall Ubuntu.  I have installed a lot of software on my current system. And I will have to reinstall all those updates, drivers and applications too.  Is there any way I can make an .iso image of my installed Ubuntu along with all the software, preferences, drivers etc in it ?  Is there any way I can back up my whole OS along with all its software, drives, updates and all ? I'm calculating the covariance of a distribution in parallel and I need to combine the distributed results into on singular Gaussian. How do I combine the two?  Linearly interpolating between the two almost works, if they are similarly distributed and sized.   provides a forumla at the bottom for combination but it doesn't seem right; two identically distributed distributions should have the same covariance, but the formula at the bottom of the page doubles the covariance.  Is there a way to combine two matrices? VMware won't work after Ubuntu Upgrade I upgraded to Ubuntu 15.10 and now if I want to open VMware Player it doesn't do anything. I also uninstalled and installed it again, still nothing.  What can I do? Nested indenting issue How to get correct indentation after entering a nested list? I am writing a code review and I could not figure this out by googling. Here is an example of the three formatting styles I tried to use (but none of them works as I would like):  Case 1  The task is to align the last line (see below) "In the first line you use camelCase..." with the last line above the numbered list. In my first attempt, I added a new line (empty line) after the second numbered list item, and then indented by 4 spaces:     Variable name casing: See  on "Snake Case". In Perl, we use "snake_case" instead of "camelCase", and be consistent. Example:   Line 14: my $testType  Line 18: my $right_frame   In the first line you use camelCase, whereas in the second you use     snake_case.     As you can see, this gives the correct indentation but it introduces a blank line above the first numbered item.  Case 2  In this case I do not add the blank line after the second numbered list item ( but still indent by 4 spaces ):     Variable name casing: See  on "Snake Case". In Perl, we use "snake_case" instead of "camelCase", and be consistent. Example:   Line 14: my $testType  Line 18: my $right_frame In the first line you use camelCase, whereas in the second you use     snake_case.      In this case the line is considered as part of the last list item  Case 3  In this case, I try to add two blank spaces (invisible) at the end of the second list item:     Variable name casing: See  on "Snake Case". In Perl, we use "snake_case" instead of "camelCase", and be consistent. Example:   Line 14: my $testType  Line 18: my $right_frame In the first line you use camelCase, whereas in the second you use     snake_case.      In this case the line is considered part of the second item, and hence not correctly indented.  How to achieve the correct indentation? Adding only specific text from a file to an array list, part 2 - Java Why are so many different types of objects white, yet appear gray when they are wet? There are many things with different textures that appear white – salt, beer foam, paper, shaving cream, snow, talcum powder, white paint, etc. The most common answer is all of the frequencies must be reflected in order for us to perceive white, which I already know. There must be more underlining details why such a huge variety of things are white. Furthermore, if you wet paper, snow or talcum powder, they appear off-white or gray. Why is this? Characterization of short exact sequences The following is the first part of Proposition 2.9 in "Introduction to Commutative Algebra" by Atiyah &amp; Macdonald.     Let $A$ be a commutative ring with $1$. Let $$M' \overset{u}{\longrightarrow}M\overset{v}{\longrightarrow}M''\longrightarrow  0\tag{1} $$ be sequence of $A$-modules and homomorphisms. Then the sequence (1) is exact if and only if for all $A$-modules $N$, the   sequence  $$0\longrightarrow \operatorname{Hom}(M'', N)  \overset{\overline{v}}{\longrightarrow}\operatorname{Hom}(M,  N)\overset{\overline{u}}{\longrightarrow}\operatorname{Hom}(M', N)  \tag{2} $$ is exact.   Here, $\overline{v}$ is the map defined by $\overline{v}(f)=f\circ v$ for every $f\in\operatorname{Hom}(M'', N)$ and $\overline{u}$ is defined likewise.   The proof one of direction, namely $(2)\Rightarrow (1)$ is given in the book, which I am having some trouble understanding. So assuming (2) is exact sequence, the authors remark that "since $\overline{v}$ is injective for all $N$, it follows that $v$ is surjective". Could someone explain why this follows?  Given that $\overline{v}$ is injective, we know that whenever $f(v(x))=g(v(x))$ for all $x\in M$, we have $f=g$. I am not sure how we conclude from this surjectivity of $v$.  Thanks! After installing Windows 10 on my  it took my user name 'Jeremy' and created a user folder named C:\Users\jerem.  I want to rename the folder C:\Users\Jeremy.  does not work. There are a couple of reasons.   OneDrive is now a fully integrated part of the OS, and it completely breaks.  A find/replace in the registry seems to work, but it's hard to be confident in that approach. When the computer is rebooted, the TabletInputService writes a TextHarvester.dat file to the old user profile location (creating it if needed). This makes it impossible to keep the folder deleted. An old  doesn't work. This issue also causes an error message to pop up every time the computer boots. A required field that isn't really required? ...the email field in my clients data entry system is required but users of the system are allowed to enter na@na.com if the customer refuses or doesn't have an email address. Is this best practice? Have any suggestions or workarounds for their solution? Find all continuous functions satisfying $\int_0^xf=(f(x))^2+C$ for some constant $C \neq 0$. Find all continuous functions $f$ satisfying   $$\int_0^xf=(f(x))^2+C$$ for some constant $C \neq 0$, assuming that $f$ has at most one $0$.  I have a question about the solution to this problem. It says that   Clearly $f^2$ is differentiable everywhere, its derivative at $x$ is $f(x)$ (I'm assuming that this is because the left hand side is differentiable, the right hand side must be differentiable as well). So $f$ is differentiable at $x$ whenever $f(x) \neq 0$, and  $$f(x)=2f(x)f'(x),$$ so $f'(x) = \frac{1}{2}$ at such points. Thus, $f= \frac{1}{2}x+b$ for some $b$ on any interval where it is non-zero; if $f$ has a zero, this gives two possible solutions, with two possible values of $b$, but since $f$ is assumed continuous, they must be the same. So we need $$\int_0^x(\frac{1}{2}t+b)dt=(\frac{1}{2}x+b)^2+C$$  so we must have $b=\sqrt{-C}$ or $-\sqrt{-C}$, leading to two solutions for $C \lt 0$.  I don't understand the bolded statements. First, how does the differentiability of $f^2$ guarantee that $f$ is differentiable, and why only at $x$ where $f(x) \neq 0$?  Next, why are there two possible solutions if $f$ has a zero, but since $f$ is continuous they must be the same?  Finally, does the last statement mean that if $C \gt 0$, then there is no solution, since we're restricted to real numbers here?  I would appreciate it if anyone answers my questions. How to vertically center content with variable height within a div? What is the best way to vertically center the content of a div when the height of the content is variable.  In my particular case, the height of the container div is fixed, but it would be great if there were a solution that would work in cases where the container has a variable height as well. Also, I would love a solution with no, or very little use of CSS hacks and/or non-semantic markup. US citizens travelling to Cuba are restricted to a set of "reasons" for travel, of which tourism is not one. I have US-Philippines dual citizenship, and both passports. Would I just buy the ticket using my Filipino passport? What kind of documentation/proof would I need to return back to the US? And as a US citizen travelling with a foreign passport, where would I go for US customs?  Thanks. MySQL strip non-numeric characters to compare If I simply wrap my query with:  BEGIN TRANSACTION    COMMIT TRANSACTION   If anything fails inside of that, will it automatically rollback?  From looking at other code, they seem to check for an error, if there is an error then they do a GOTO statement which then calls ROLLBACK TRANSACTION  But that seems like allot of work, to have to check for IF( @@ERROR &lt;> 0) after every insert/update. Size of the universe This is really a follow up to the  question.  In the first answer to the question, Ted Bunn says:     However, the best available data seem   to indicate that the Universe is very   nearly spatially flat. This means   that, if we do live in a 3-sphere   Universe, the radius of the sphere is   very large, and the distance you'd   have to travel is much larger than the   size of the observable Universe.   My question is, can the available data be used to set a lower bound to the size of the Universe?   In other words, suppose the Universe was actually shaped like a 3 sphere. Then based on our best data, what would the "radius" of that sphere be? How much larger is that than the observable universe? Get last n lines of a file, similar to tail I'm writing a log file viewer for a web application and for that I want to paginate through the lines of the log file.  The items in the file are line based with the newest item at the bottom. So I need a tail() method that can read n lines from the bottom and support an offset.  This is hat I came up with: def tail(f, n, offset=0):     &quot;&quot;&quot;Reads a n lines from f with an offset of offset lines.&quot;&quot;&quot;     avg_line_length = 74     to_read = n + offset     while 1:         try:             f.seek(-(avg_line_length * to_read), 2)         except IOError:             # woops.  apparently file is smaller than what we want             # to step back, go to the beginning instead             f.seek(0)         pos = f.tell()         lines = f.read().splitlines()         if len(lines) &gt;= to_read or pos == 0:             return lines[-to_read:offset and -offset or None]         avg_line_length *= 1.3  Is this a reasonable approach?  What is the recommended way to tail log files with offsets? What is the amplitude of a light wave? Referring to this question   I'm curious about what is a amplitude of a light wave. Especially for light from a thermic source. How to record how much time user has spent on my node? I want to record the time a user has spent on my particular node so I could show a pop up to the user to register once the user has read 3 article. But the user must have spent at least 30 seconds on each node.   There is the  module available, but I wonder if I can merge it with another (custom) module I have created (which records the number of nodes user have visited)?