Sean Carroll states the Einstein's Equivalence Principle (EEP) as "In small enough regions of spacetime, the laws of physics reduce to those of special relativity; it is impossible to detect the existence of a gravitational field by means of local experiments."  Local flatness theorem says that there exists a class of coordinate transformations such that any general metric can be brought into the Minkowskian form (special relativity form). So isn't a proof of the local flatness theorem is (almost) a proof of the EEP?

I'm looking for a rather intuitive explanation (or some references) of the difference between the metric of a curved space-time and the metric of non-inertial frames.  Consider an inertial reference frame (RF) with coordinates $\bar x^\mu$, in flat spacetime $\eta_{\mu \nu}$ (Minkowski metric).   If I have well understood, on one hand, I can go to an accelerated RF by change of coordinates $x^\mu(\bar x)$. The metric is given by: $$\tag{1}g_{\mu \nu}(x) = \frac{\partial \bar x^{\alpha}}{\partial x^{\mu}} \frac{\partial \bar x^{\beta}}{\partial x^{\nu}} \eta_{\alpha \beta}$$ On the other hand, I know that a curved space-time with metric $q_{\mu \nu}$ cannot be transformed to Minkowski $\eta_{\mu \nu}$ by coordinate transformation. In other words there does NOT exist any coordinate $x^\mu(\bar x)$ such that (in the whole coordinate patch): $$\tag{2}q_{\mu \nu}(x) = \frac{\partial \bar x^{\alpha}}{\partial x^{\mu}} \frac{\partial \bar x^{\beta}}{\partial x^{\nu}} \eta_{\alpha \beta}\qquad \leftarrow \text{(does not exists in curved space)}$$   So far, everything is more or less ok... But my question is:    What is the difference between $q_{\mu \nu}$ and $g_{\mu \nu}$? I mean, in both cases a particle would "feel" some fictitious forces (in which I include the weight force due to the equivalence principle).  What physical situation can $q_{\mu \nu}$ describe and $g_{\mu \nu}$ cannot?   I additionally know that by change of coordinates $q_{\mu \nu}$ is locally Minkowski. But still, I can't see clearly the difference.


I have a read-only file, F.   A program, P, that I'm not the author of, needs to read F.  I want the content of F to come from another 'generator' program, G, whenever P tries to read F (taking F to be an ordinary file) and not any earlier.  I tried doing the following:  $ mkfifo /well-known/path/to/F    # line #1 $ G > /well-known/path/to/F       # line #2   Now, when P starts up and tries to read F, it appears to be able to read the output generated by G just as I wished it to. However, it can do so only once, since G after all gets to run only once! So, if P had a need to read F again later in its execution, it would end up blocking on the fifo!   My question is, other than bracketing line #2 above in some sort of an infinite loop, is there any other (elegant) alternative for the above?   What I'm hoping for is, some way of registering a 'hook' program into the file-open system call such that the file-open would result in the launching of the hook-program and the file-read in the reading of the hook-program output. Obviously the assumption here is: the read will happen sequentially from file beginning to file end, and never in random seeks.

Is there any way to create a virtual file, such that reading from the file actually reads from the stdout of a command; writing to the file is acually writing to the stdin of a command?  So far I have kludged this with an inotifywait on a file, which calls a command when the file is modified, taking it's input from the file and writing back to it.  I don't like that the inotifywait has to be constantly restarted though (and I have to ensure that it is always running). I only use this file perhaps twice a week.


I've followed  to install phpMyAdmin on the server which uses ubuntu 14.04. I've entered all commands and restarted apache, but when I open this path through the browser:  http://domain_name_or_IP/phpmyadmin // I replace my real IP with domain_name_or_IP   It throws:  Not Found  The requested URL /phpmyadmin was not found on this server.  Apache/2.4.7 (Ubuntu) Server     Also here is the result of this command:  root@ubuntu:/etc/apache2/conf-available# ls     See? there is not any file related to phpMyAdmin. Does anybody know what's wrong?

When I go to localhost/phpmyadmin I get the apache "Not Found" error (404). However, I can load html pages, and run php pages (such as <?php phpinfo(); ?>). And phpmyadmin is installed.  balter@homedevbox:~$ aptitude search phpmyadmin i   phpmyadmin                                               - MySQL web administration tool   I also installed the standard ubuntu LAMP stack and set passwords for mysql and all that.  What could be the problem?  EDIT: Here is where my phpmyadmin files are.  balter@homedevbox:/var$ cd / balter@homedevbox:/$ sudo find . -type d -name phpmyadmin ./var/lib/mysql/phpmyadmin ./var/lib/phpmyadmin ./etc/phpmyadmin ./usr/share/phpmyadmin ./usr/share/dbconfig-common/scripts/phpmyadmin ./usr/share/dbconfig-common/data/phpmyadmin ./usr/share/doc/phpmyadmin


I am running into an issue when trying to run apt update on 19.10. I am getting the following error:  E: http://us.archive.ubuntu.com/ubuntu eoan-security/multiverse amd64 c-n-f Metadata is not (yet) available (Could not open file /var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_eoan-security_multiverse_cnf_Commands-amd64.xz - open (13: Permission denied) [IP: xxx.xxx.xxx.xxx 80])   I checked that file and it is owned by root with 644 permissions.  Any pointers?  EDIT  I am running this as root, for those who asked.

Greetings from Bangladesh. I am an intermediate user of Ubuntu OS. I am facing problem with apt update. I have searched online but could not find any answer to my problem so I am posting this question please help me.  Err:20 http://archive.ubuntu.com/ubuntu eoan-updates/restricted amd64 c-n-f Metadata   Could not open file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_eoan-updates_restricted_cnf_Commands-amd64.xz - open (13: Permission denied) [IP: 91.189.88.152 80] Ign:35 http://archive.ubuntu.com/ubuntu eoan-updates/multiverse amd64 c-n-f Metadata Err:37 http://archive.ubuntu.com/ubuntu eoan-backports/main amd64 c-n-f Metadata   Could not open file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_eoan-backports_main_cnf_Commands-amd64.xz - open (13: Permission denied) [IP: 91.189.88.152 80]   Reading package lists... Done E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/eoan-updates/restricted/cnf/Commands-amd64  Could not open file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_eoan-updates_restricted_cnf_Commands-amd64.xz - open (13: Permission denied) [IP: 91.189.88.152 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/eoan-backports/main/cnf/Commands-amd64  Could not open file /var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_eoan-backports_main_cnf_Commands-amd64.xz - open (13: Permission denied) [IP: 91.189.88.152 80] E: Some index files failed to download. They have been ignored, or old ones used instead.   I have tried with         removing partial folder's content completely.   Cleaning apt by sudo apt clean   moving the lists to lists.old   then updating the apt      But without luck.


I have the following AWK command which works well. awk -v RS="\n+?[$]{4}\n+?" '/HMDB0000008/' test.xt  However what I want is to be able to call it from the command line and pass an argument so that it can find what I want. For example, something like this: awk -f var=HMDB0000008 RS="\n+?[$]{4}\n+?" '/$var/' test.txt  However this does not seem to work. Can you tell me what would be the best way? Thank you

Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l >> "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l >> "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally.


In the movie Predestination:     Jane is born as a result of John and Jane having sex. John and Jane are the same people from different timeline.    Is Jane's birth because of a predestination paradox or bootstrap paradox?  which one is it?

In Predestination starring Ethan Hawke, the idea is plain and simple. However, I do find something very hard to digest:   How could the loop about Ethan Hawke the time travel agent, could meet himself and then conceive himself without some sort of help to initialize the loop?  What I want to say is that, in the first loop of the story, there is only one Ethan Hawke. He then travels back in time and after meeting his past self, he gives birth to himself. But who was responsible for the birth of the first Ethan Hawke?   As a developer this bugs me more than it should. Any theories?


I just learn one theorem which says If "$f^{'}$ exists and is monotonic on an open interval (a,b),then $f^{'}$ is continuous on (a,b)."I got the proof but now I am looking for one example in which if I relaxe the hypothesis of monotonic-ness then resulting $f^{'}$ is not continuous.I am thinking but unable to get such example. Thanks.

Could someone give an example of a ‘very’ discontinuous derivative? I myself can only come up with examples where the derivative is discontinuous at only one point. I am assuming the function is real-valued and defined on a bounded interval.


If we treat a column vector $a$ as an $n \times 1$ matrix, or a row vector $a^T$ as a $1 \times n$ matrix, how would one write out the reduced singular value decomposition of $a$?

(a) Given the column vector $a$ as an $n\times 1$ matrix. Write out its singular value decomposition, showing the matrices $U, \sum$, and $V$ explicitly.  (b) Given the row vector $a^T$ as an $1\times n$ matrix. Write out its singular value decomposition, showing the matrices $U, \sum$, and $V$ explicitly.  I currently get stucked on this question, since I couldn't find the eigenvalues of the $n\times n$ matrix $aa^T$ in part (a), and $a^Ta$ in part (b) to find the columns of $U$ and $V$, respectively. Can someone please help me on this problem?


About six years ago, UK interest rates hit the historic low of 0.5%. In keeping with all the finiancial advice at the time that this was a once in a lifetime circumstance I rushed out and got a fixed rate mortgage. For ten years. The interest rates have not increased at all that whole time, and I've lost money every single month.   The terms of this mortgage are very strict. There is a substantial penalty  (£1,000 per year remaining) to get out of it. I can only overpay up to double the monthly amount of the mortgage. If I do it makes zero difference to the actual amount I will pay overall - the only result will be to end the mortgage early.  I could afford to overpay each month if I wanted to. However, to my mind this is the least logical thing to do in this situation. As I said, I've lost money on this every month. The only chance I have to make up what I've lost is if interest rates rise during the remaining term of the mortgage. It seems likely this is going to happen within the next 12 months, and it's possible there may be further rises in the remaining 3 years.  When friends and family quiz me about this, they seem amazed that I'm not overpaying. And when I explain the above, they seem unable to understand why I think overpaying is the last thing I should be doing. It's happened so many times now that I'm starting to doubt the wisdom of my decision. So - am I right not to overpay?

My mortgage came up for renewal right at the time in 2009 when UK interest rates hit rock bottom. This was unprecidented, and most financial advice was to take out a fixed-rate mortgage. So I perhaps went overboard and got one for ten years.  Five years on, interest rates haven't moved and I'm losing money on it to the tune of £100 a month. Obviously, this is ongoing: so that decision has cost me about £5000 in real terms so far. It'll come to a lot more by the end of the mortgage, unless interest rates rise.  Being fixed rate, it's been designed so you can't get out early. If I decide to end the mortage, it'll cost me £1,000 per year of the mortgage remaining - which is roughly what I'm losing anyway, so that seems a bad idea.   I can overpay by up to £500 per month. However, doing this doesn't help pay down the mortgage at all: the total is just added up and will cause the mortgage to end early, by a period dependent on the overpayment total.   This seems to me to be a very bad idea because hoping interest rates rise over the next five years is the only hope I have of making good on some of the losses that I've made.   Is this sensible thinking? If so, is there anything at all I can do to try and ameliorate the financial pain this product is causing me?


I installed a Wordpress plugin "All In One Schema.org Rich Snippets." To show rich snippets in search results. When I publish items, it shows a rich snippet area below the article. Can I hide that area and Google will still show rich snippets? Thanks.

I want to add some piece of data to rich snippets (for example, breadcrumps), but this information is not visible on the page (for example, because the designer has not yet prepared the sketches)  Is there a way to tell search engines to index this data?


I have defined an environment called \equ, which is an aligned equation environment to save time when writing a thesis with lots of equations.  However, after using this environment there is a small indent, which is not there if I just use the \begin{equation} and \begin{aligned} commands directly (see MWE):  \documentclass{book} \usepackage{mathtools}  \newenvironment{equ}[1] {\begin{equation} \label{equation:#1}     \begin{aligned} } {     \end{aligned} \end{equation} }    \begin{document} \chapter{Test Chapter} This is the first paragraph of text in the document. It is not indented, as expected.  This is the second paragraph of text in the document. It is indented, as expected.  \begin{equation}\label{equation:1} \begin{aligned}     F &= m a\\     E &= m c^{2} \end{aligned} \end{equation} This is the paragraph after an equation. It is not indented, as expected. \begin{equ}{1} F &= ma\\ E &= m c^{2} \end{equ} This is the paragraph after an equ. It is indented with a small indent, and the vertical spacing around the equation looks slightly different, but I don't know why?!  \end{document}     I am fairly new to this; I'm sure it's something obvious so any help would be appreciated!

If I create a custom environment based on the equation environment, I get a spacing issue: the next line of text after my environment closes doesn't start on the left margin.  Example code:  \documentclass{article} \begin{document} \newenvironment{myenv}{\begin{equation}}{\end{equation}} \noindent $| \leftarrow$ this is the left margin. \begin{myenv} e ^{i \pi} + 1 = 0 \end{myenv} $| \leftarrow$ this isn't the left margin. \end{document}   Output:    Removing the newline after \end{myenv} solves the spacing problem, but the resulting code is not readable.  Of course, in this example I could just use the equation environment itself. My real issue involves a more complex custom environment that suffers from the same problem, and which also includes an equation environment within it.


I'm trying to find if my database has a column named sort_method. I have had a look around the forums but don't seem to be able to find the right answer. My database has over 300 tables so manually looking for it is not an option.  I'm using phpMyAdmin - SQL query

I have 2-3 different column names that I want to look up in the entire DB and list out all tables which have those columns. Any easy script?


The patient had been waiting in the emergency room for almost an hour before a doctor finally treated her.  (an) goes with a,e,i,o,u  (a) goes with the other letters  why do we use an hour ? instead  of a ?

Which indefinite article should precede hour — a or an?        an hour     a hour      Does the usage of an vs a depend on the pronunciation — a history, a hobby, but an hour, an honor?


CREATE TABLE emp (    empno      NUMBER (4, 0),    ename      VARCHAR2 (10),    job        VARCHAR2 (9),    mgr        NUMBER (4, 0),    hiredate   DATE,    sal        NUMBER (7, 2),    comm       NUMBER (7, 2),    deptno     NUMBER (2, 0),    CONSTRAINT pk_emp PRIMARY KEY (empno) );   This is the table creation, obviously   This is the table output  Now what i need to do is find the sum of Sal + Comm for the Salesman rows, and then find the max of those sums, then display that max plus the corresponding ename  Here is my code       SELECT ename, MAX (SUM (sal + comm)) max_sal     FROM emp    WHERE job = 'SALESMAN' GROUP BY ename   I know this nowhere near correct, but I'm brand new to SQL so I'm very stuck (using SQL live btw)

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


I just bought a Google Chromebook HP 14 and I am very happy to be honest.  But I do miss my Ubuntu OS :), and the options available to use aren't a real native OS system but adaptations that sometimes do not work :(  Does anyone have an idea how to install with dual boot Ubuntu alongside Chrome OS?

I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well.  Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook?  It seems that the Crouton/Ubuntu is not 100% the real thing.  The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS.


I need to create generic method which returns greater of two params. Operators > and < don't work. Here is signature of my method:  public static T Greater<T>(ref T a, ref T b) {     if (a > b)      {        return a;     }     else      {        return b;     } }   I'm quite rookie in C# and totally new in generic types.

Possible Duplicate:          I've coded something like this:  public bool IsDataChanged() {                T value1 = GetValue2;     T value2 = GetValue1();      return (valueInDB != valueFromView); }   Right now the function doesn't compile with the error "Operator '!=' cannot be applied to operands of type 'T' and 'T'". What do I have to do to make this function work ?


Is   $$\sum^\infty_{n=1}\frac{2n^2}{5n^2+2n+1}$$   Convergent or Divergent? If convergent, find the sum. If Divergent, explain why.   Since it is continuous, positive, and decreasing I used the integral test:  $$\int^\infty_1\frac{2n^2}{5n^2+2n+1}\Rightarrow \int^\infty_1 \frac25dn +\int^\infty_1ndn+2\int^\infty_12n^2$$  $$\frac25\bigg[n\bigg]^\infty_1+\frac25\bigg[\frac{n^2}{2}\bigg]^\infty_1+2\bigg[\frac{n^3}{3}\bigg]^\infty_1$$  $$\infty+\infty+\infty=\infty; \text{Divergent by the Integral Test}$$  Did I do this correctly?

Is this convergent or divergent? if convergent, find the sum. If divergent explain why.  $$\sum _{n=1}^{\infty }\:\frac{2n^2}{5n^2+2n+1}$$  I want to use the divergent test which is $\mathrm{If\:}\lim _{n\to \infty }a_n\ne 0\mathrm{\:then\:}\sum a_n\mathrm{\:diverges}$   $\frac{2n^2}{5n^2+2n+1}$  I would assume to take out the largest $n$ in both the top and bottom   $\lim _{n\to \infty }\left(\frac{n^2}{n^2}\cdot \frac{2}{5+\frac{2}{n}+\frac{1}{n^2}}\right)\:$  having the $n^2$ cancel  $\lim _{n\to \infty }\frac{2}{5+\frac{2}{n}+\frac{1}{n^2}}$ after taking the limit  $\frac{2}{5+0+0}$  so $\frac{2}{5}$$\ne $ $\:0\:$ so it's divergent?


I need to convert existing MP4 files to the XVID format with the .AVI extension.  Specifically to something like this:      I've tried Camtasia, Handbrake and VLC, but they don't seem to support this format - I guess its really old.  Everything else I've googled seems like something that will install a ton of spyware on my PC.

What is the best way to reencode a video with Xvid? I used FFmpeg in the past (I havent tried using FFmpeg with Xvid however - does FFmpeg keep up with Xvid releases?).  With FFmpeg I either need to figure out the bitrate of the video then reencode it slightly below or I use -sameq (I think it's same quality), however - that produces a file thats bigger and not better then a slightly less bitrate file.  Whats a good way to reecode these videos? (By the way - they are all on my HD as FLV1)


Given positive $a$ and $b$ with $a < b$, define two sequences recursively with $x_0 = a$, $y _0 = b$, $y_{n+1} = G(x_n, y_n)$, $x_{n+1} = H(x_n, y_{n+1})$. Prove that both sequences converge. $G$ and $H$ are the geometric mean and harmonic mean, respectively.   Probably need to start off with proving both sequences are monotone and have an upper bound, but have no idea where to take the proof from that point. Any hints would be greatly appreciated.

Let $a_1$ and $b_1$ be any two positive numbers, and define $\{ a_n\}$ and $\{ b_n\}$ by   $$a_n = \frac{2a_{n-1}b_{n-1}}{a_{n-1}+b_{n-1}},$$  $$b_n = \sqrt{a_{n-1}b_{n-1} }.$$  Prove that the sequences $\{a_n\}$ and $\{b_n\}$ converge and have the same limit.   Source: Problem Solving Through Problems by Loren C. Larson.   Hint:      Use the squeeze principle.


On 18/06/2015 I bought a windows 7 ultimate key. I activated it, connected to microsoft, updated, and everything was nice.  However, to my surprise, today it started saying that its not genuine.  My first reaction was "I'm going to contact the seller! I'm sure he can help me!". Nope. Website doesn't exist anymore. I now think my Windows is actually not genuine indeed.  If I try to apply the activation backup, it doesn't work.  If I try to insert the key again, it says that the key is blocked by microsoft.  If I say I want to buy a new license, it doesn't offer me the option for windows 7, only windows 10.  I use some acessibility things, so I can update for free to windows 10. However when I try to install it, it says my windows need to be activated in order to install it.  What are my other options? 2016 is here to say "I'm not over yet". Dammit.  I'm from Brazil, and the automated call is not an option.

I've set up a Windows 7 guest machine under Windows 7 using oracle virtualbox 4.2. This Windows Guest has its own product key which corresponds to the boxed set I purchased for the sole purpose of running it in virtualbox. A few months ago I backed up my Windows 7 virtual box virtual disk image on an external hard drive. Now that the Windows 7 started to malfunction, I deleted it, and copied it back from my external hard drive.  However now it's telling me that the version of windows is not genuine. How can it be. There is nothing else using the same product key, unless someone hacked into my backup folders and stole the protuct key from there and used it on a machine of their own.  Thanks.


I am using this Power Resistor  and I am trying to put it in my layout. The Problem is I can't find any .lib (TO-263  or D2PK) file in Eagle or at least a similar package.  Any Help?

I'm making a PCB in Eagle. First I found my components, and now I have to put them in Eagle so I can draw the actual board.  Now the problem is, I have found  power resistor (I need 0.5 Ohm dissipating at least 4.5W. This one dissipates more, but is apparantly the cheapest I could choose from).  As you can see, there is no CAD design associated with this component. In the  there is a recommended pad layout, but this would mean that the resistor is layed down on the pcb, whilst al other transistors that might need  a heat sink are placed vertical on the PCB.  So my question is - how must I orient this component (horizontal/vertical/doesn't matter), and how an I find a CAD design to add this to Eagle?


Hi I am Ashraf from Eygpt I have schengen visa type c multiple entry from Switzerland for 5 years I already used it 2 time for going to Switzerland but now I need to go for Germany to Hanover and its long traveling from Swiss so my question is that if I can go directly to German or I need to go throw Swiss?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I am trying to install debconf since it seems to be broken on my computer.   I ran the command:   apt-get -f install debconf   I got the following error message:  dpkg: error: unable to create new file '/var/lib/dpkg/info/format-new': No such file or directory E: Sub-process /usr/bin/dpkg returned an error code (2)   I don't understand this error message and I don't know what to do.   Thank you for your help.

When I try to sudo apt-get upgrade I get:  Preconfiguring packages ... dpkg: error: unable to create new file '/var/lib/dpkg/info/format-new': No such file or directory E: Sub-process /usr/bin/dpkg returned an error code (2)   What should I do to fix it?


Find all integer pairs $(x,y)$ that satisfy the following equation:   $$ 21x+47y=1. $$   I know the solution with modular arithmetic:  \begin{align} 0x + 5y &= 1 \pmod{21} \\    5y   &= -20 \pmod{21}\\  y = -4 \pmod{21} &\Longleftrightarrow y = -4 + 21c \\ 21x + 47(-4 + 21c) &= 1\\  21x &= 189 - 21 * 47c \\   x &= 9 - 47c. \\ \end{align}  Therefore  $$(x, y) = (9 - 47c, -4 + 21c)$$   Is there a way to do this without modular arithmetic? Thanks in advance!

Can you help me to prove? Should I prove it  by contradiction and suppose that $x$, y are solutions ?


Is it possible to remove a known password from an excel sheet if excel isn't installed on the machine? We receive uploaded excel files (2007 and 2010 format) and we know the password for those excel files. Is it possible to remove the KNOWN password on the webserver without having to install Excel there?

I am going to get batches of 200+ Excel files with a blank password, one just needs to press enter when asked for the password. The system I am loading these files into cannot handle password protected Excel sheets. Is there a command line or other solution where I can just open those Excel sheets with the known blank password and then re-save them without a password?  This password is to open the file.    UPDATE: I followed the recommendation in  and used DocRecrypt. I am no longer prompted for a password for these files when opening them. Awesome.


I have a  that I want to convert from flat bars to drops.  Can anyone suggest brake levers that:   will be compatible with the BR-M355 calipers that came with the bike will be compatible with the hoses fitted to the bike are of standard brake hood construction and can be used as a comfortable hand position on drops (i.e. I'm not looking to somehow bodge installation of MTB levers) are easily available in the UK are not crazy expensive (< £200) don't involve/require a cable to hydraulic conversion mechanism   Ideally, I'd prefer the levers don't include an  derailleur gear shift mechanism, because the bike has an Alfine hub, for which I'll make separate provision for shifting. However, provided any derailleur shift system can be left disconnected without impacting comfort and braking performance, I could live with it.  If I absolutely have to, I could replace the levers, hoses, calipers and disks, but I'd rather not spend the money replacing the whole brake system if I can get away with only replacing the levers.  I understand the geometry of drops on this bike might not be ideal, and some may feel I would be better off simply replacing this bike with a road bike. That's not an option for me, and neither is owning a second bike.  Thanks!

I have a gravel bike with an MTB setup. SRAM GX rear mech, SRAM XO shifter, 1x11 system, Shimano disc brakes. How would I go about replacing my flat handlebars with road bars?  Alternative 1 Get a hold of a Shimano 11-speed shifter, a brake lever and a Jtek Shiftmate to convert from Shimano ratio to SRAM.  Alternative 2 Get a hold of SRAM 11-speed road shifter and brake lever. Also need new hydraulic brakes which are not compatible.  Alternative 3 Get new mechanical disc brakes. Get SRAM shifters with mechanical levers.   So what is the best alternative? Or do I have more options?   And can I use SRAM GX rear mech with SRAM Apex or Rival shifters without a ratio adapter like Jtek Shiftmate?   Much appreciated. Cheers!


While digging in a C++ project, I encountered a strange usage of C++'s new operator:  int arr[5]; ClassA* a = new(arr) ClassA();   Would you please help me understand this syntax?

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


While I don't doubt that this question is covered somewhere else I can't seem to find it, or anything close enough to which I can springboard. I however am trying to prove $$\frac{1}{1^2} +\frac{1}{2^2}  + \cdots + \frac{1}{n^2} + \cdots = \sum_{n=1}^\infty \frac{1}{n^2} < 2$$ by induction.  I have seen it many times and proved it before but can't remember what it was I did.  I see that for the first two terms $n = 1, n=2$ I get:  for $n = 1$, $\frac{1}{1^2} = 1 < 2$ for $n = 2$, $\frac{1}{1^2} + \frac{1}{2^2} = \frac{5}{4} < 2$  Now I am stumped, I know I want to show this works for the $n+1$ term and am thinking, let the series $\sum_{n=1}^\infty \frac{1}{n^2} = A(n)$ Then look to show the series holds for $A(n+1)$ But $A(n+1) = A(n) + \frac{1}{(n+1)^2}$  But now what?  If I tried $A(n+1) - A(n) = \frac{1}{(n+1)^2}$ , but would have to show that this is less than $2 - A(n)$.  I am stuck.  Thanks for your thoughts,   Brian

I need to prove that the sequence $a_n=1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}$ converges. I do not have to find the limit. I have tried to prove it by proving that the sequence is monotone and bounded, but I am having some trouble:  Monotonic:  The sequence seems to be monotone and increasing. This can be proved by induction: Claim that $a_n\leq a_{n+1}$ $$a_1=1\leq 1+\frac{1}{2^2}=a_2$$  Need to show that $a_{n+1}\leq a_{n+2}$ $$a_{n+1}=1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}+\frac{1}{(n+1)^2}\leq 1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}+\frac{1}{(n+1)^2}+\frac{1}{(n+2)^2}=a_{n+2}$$  Thus the sequence is monotone and increasing.   Boundedness:  Since the sequence is increasing it is bounded below by $a_1=1$. Upper bound is where I am having trouble. All the examples I have dealt with in class have to do with decreasing functions, but I don't know what my thinking process should be to find an upper bound.   Can anyone enlighten me as to how I should approach this, and can anyone confirm my work thus far? Also, although I prove this using monotonicity and boundedness, could I have approached this by showing the sequence was a Cauchy sequence?  Thanks so much in advance!


i am dividing the number & want output only with one decimal like 4.1 or 4.2  "SELECT  count(*)/6 as s from t1 ";     <% out.print(rs.getDouble("s")); %>	   Please help, I am new to jsp

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


Find an example of a unital commutative ring $R$ and an $R$-module $M$ such that $\text{Ass}(M)=\emptyset$.   Recall that   $\text{Ass}(M)=\{p\in\text{spec}(R):\exists 0\ne m\in M:\text{ann}(m)=p\}$. $\text{ann}(m)=\{r\in R:rm=0\},\forall m\in M$.   I thought of $R=\mathbb Z$ and $M=\mathbb Z/n\mathbb Z$, which doesn't work.

I'm currently reading up on Associated Primes and localization. I came across the following theorem. Let $M$ be an $R$ module.  If $M = 0$ then $Ass(M)$ is empty. The converse is true if $R$ is a Noetherian ring. I understood the proof of this result.   Now I'm trying to come up with an example of $M$ being a non-zero $R$ module with $R$ NOT Noetherian but $Ass(M)$ is empty. Is there an easy example to show that the converse fails to hold when $R$ is not Noetherian? Thank you so much for any assistance! :)


I have to detect outliers on 3 variables. On the internet I found the mahalanobis distance but I understood I can use it only on multivariate normally distributed data, and my data isn't. So, do you have any suggestions? And, for you is a correct way detect univariate outliers first, then bivariate and then trivariate outliers? Thanks in advance for any suggestions :)

Robust PCA (as developed by  or better yet ) is , but Mahalanobis distance can also be used for outlier detection given a . I'm curious about the (dis)advantages of using one method over the other.  My intuition tells me that the greatest distinction between the two is the following: When the data set is "small" (in a statistical sense), robust PCA will give a lower-rank covariance while robust covariance matrix estimation will instead give a full-rank covariance due to the Ledoit-Wolf regularization. How does this in turn affect outlier detection?


This question has already been asked but the solution was not satisfactory  Suppose $f$ is a function satisfying the equation $$f(x+y)=f(x)+f(y)+x^2y+xy^2$$ for all real numbers $x$ and $y$ Suppose also that $\lim \limits_{x \to 0}\frac{f(x)}{x}=1$  Find $f'(x)$  By using the definition of derivative,I obtained $f(0)=0$ and $f'(0)=1$  How will I get $f'(x)$?

How can I find $f(0)$, $f'(0)$, and $f'(x)$ given that  $f(x+y)=f(x)+f(y)+x^2y+xy^2$  and  $\lim_{x\to0}\frac{f(x)}{x}=1$.


I'm thinking of installing kernel 5.8 on my 20.04 build.  Currently I'm running kernel 5.4. Does Canonical's Livepatch service support hwe kernel 5.8 on 20.04 LTS?

Since live patching has been released only LTS kernels were supported with a note that live patching for HWE is in the works and likely to be available in 2017. I thought there would be an announcement when HWE support is ready but I must have missed it. I'm certain that there was no support for the 17.04 based HWE kernel, but I had to use mainline kernels for a while on this machine in the past months.  I just installed 4.13.0-16.19~16.04.3-generic through linux-image-generic-hwe-16.04-edge but I'm not exactly sure if this kernel is supported by canonical-livepatch:  $ canonical-livepatch status client-version: "7.23" architecture: x86_64 cpu-model: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz last-check: 2017-11-08T21:16:29.971688844+01:00 boot-time: 2017-11-08T19:16:12+01:00 uptime: 2h54m26s status: - kernel: 4.13.0-16.19~16.04.3-generic   running: true   livepatch:     checkState: checked     patchState: nothing-to-apply     version: ""     fixes: ""   How do I know if a kernel is supported? Is there a support or wiki page where I can look this up? Or did someone find a URL in their networking logs showing some kind of hierarchy where these updates are fetched from?


We know that inverse limit is a "left" exact functor on the category of modules in the sense that whenever $r:(A_i,α_j^i )→(B_i,β_j^i )$ and $s:(B_i,β_j^i )→(C_i,γ_j^i )$ are transformations of inverse systems over an index set $I$ between modules, and $0→A_i→B_i →C_i→0$ is exact for each $i∈I$, where the first function is $r_i$ and the second is $s_i$, then there is an induced (left) exact sequence $0→\varprojlim A_i→\varprojlim B_i→\varprojlim C_i$ . I search for a counterexample to the latter to be not "right" exact. Thanks very much in advance!

Let $A_n, B_n, C_n$ be directed systems in some abelian category. Denote by $A \times_C B$ the fibre product of $A$ and $B$ over $C$.  Is it true that $(\varprojlim A_n) \times_{\varprojlim C_n} (\varprojlim B_n) = \varprojlim (A_n \times_{C_n} B_n)$, if $\varprojlim (A_n \rightarrow C_n)= (A \rightarrow C)$ and similarly for $B$?  I know that "morally" limits preserve limits, but I don't know the exact statement I need here (i.e. limits in which categories?)  Edit: Analogously, what can we say after replacing filtered limits with filtered colimits? Edit2: I think in the case of filtered colimits, I just checked the universal property of a colimit. In case I didn't make a mistake, the statement holds. The other case (filtered limits), and arbitrary colimits/limits are not as important for my purposes, but if you have a nice statement, please feel free to post it.


I am trying to validate date in js ("yyyy/mm/dd") format. After googling I found other date format checked but I can't get in this format.  Any one plz can help me out.  Here is my code.  function dateChecker() {     var date1, string, re;     re = new RegExp("\d{4}/\d{1,2}/\{1,2}");      date1 = document.getElementById("visitDate").value;      if(date1.length == 0)     {         document.getElementById("showError").innerHTML = "Plz Insert Date";         document.getElementById("showError").style.color = "red";     }     else if(date1.match(re))     {         document.getElementById("showError").innerHTML = "Ok";         document.getElementById("showError").style.color = "red";     }     else     {         document.getElementById("showError").innerHTML = "It is not a date";         document.getElementById("showError").style.color = "red";     }  }

I saw a potential answer here but that was for YYYY-MM-DD:   I modified the code code above for MM-DD-YYYY like so but I still can't get it to work:  String.prototype.isValidDate = function()  {      var IsoDateRe = new RegExp("^([0-9]{2})-([0-9]{2})-([0-9]{4})$");      var matches = IsoDateRe.exec(this);      if (!matches) return false;      var composedDate = new Date(matches[3], (matches[1] - 1), matches[2]);      return ((composedDate.getMonth() == (matches[1] - 1)) &&       (composedDate.getDate() == matches[2]) &&       (composedDate.getFullYear() == matches[3])); }   How can I get the above code to work for MM-DD-YYYY and better yet MM/DD/YYYY?  Thanks.


This is what I remember from the blurb on the back- two teens come back from a vacation or outing and find at first nobody in their hometown, evenutally they 'find the whole world empty' (I think that's how it's phrased). The only other live people they come across are a group of other teens; the only thing all of them have in common is they once knew a girl who wrote dark poetry and eventually committed suicide- the end of the blurb suggests there might have been something supernatural about this girl, questioning whether she was even human.

I have vague memories of reading this in the 90s. It was a paperback, possibly an R.L. Stine book (it seems like the right sort of plot and I have this vague memory of it being similar cover art). The main character is a girl who's pregnant. She and her boyfriend go to an abortion clinic (a legal one, not back-alley). That's where things get a little jumbled in my head. I remember the girl bleeding out on the operation chair due to a botched procedure. I also remember her and her boyfriend being stalked by a girl of the same age including a part where the protagonist gets stabbed through the stomach with a pitchfork. I want to say that the sequence of events was that they got stalked by the girl, she got stabbed, and the scene then cut to her bleeding out on the chair with the implication being that it was either just a dying dream, or that the girl who killed her was the unborn baby trying to get revenge.  The reason I see it as either sci-fi or fantasy was that the scene played out like a nightmare where no matter where they turned, their pursuer was behind them with the scenery changing malevolently against them. I want to say that they died a few times during the story, each time with them waking up from a seeming nightmare only to get killed again in a different way.


iam making easy battleship game. but there is something that doesnt make sense for me. when there is strictly append in the first loop it has different output than if i wrote the same thing with variable..  import random  BOARD = []  for i in range(5):     BOARD.append(["O"]*5)  x = random.randint(1,5) y = random.randint(1,5)  while True:     for i in BOARD:         print(" ".join(i))      row = int(input(": "))     column = int(input(": "))      if x == row and y == column:         print("you win")     else:         BOARD[x - 1][y - 1] = "X"   in case of miss there is output like this  O O O O O O X O O O O O O O O O O O O O O O O O O   but if i wrote this code.. which is similar to previous.. only difference is a variable in the first loop... it has totaly different output..  import random  BOARD = []  Q = ["O"]*5  for i in range(5):     BOARD.append(Q)  x = random.randint(1,5) y = random.randint(1,5)  while True:     for i in BOARD:         print(" ".join(i))      row = int(input(": "))     column = int(input(": "))      if x == row and y == column:         print("you win")     else:         BOARD[x - 1][y - 1] = "X"   but there is output like this.. it doesnt make sense for me  O x O O O O X O O O O x O O O O x O O O O x O O O   is there on this site anyone who can explain this ??? nobody can help

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


In my opinion, auto-conversion to community wiki status has a nasty habit of ruining great posts on Stack Overflow. You pose an interesting question, and people post a bunch of copycat answers hoping to catch a ride on the reputation train. You work to maintain an answer over time, and you're punished by having it expropriated by "community wiki."  As I understand it (and I may very well misunderstand it, since the whole feature has never made sense), community wiki is to encourage more collaboration on posts by lowering the reputation threshold for editing. However, the suggested edits feature provides a better mechanism for allowing low reputation users to contribute to existing posts.   I think community wiki is obsolete.  Could we have some data on how many edits on community wiki posts were made by users under the normal reputation requirement? How do those compare to the number of suggested edits?  There are still plenty of problems with auto-conversion to community wiki. I'd like to see it go away.

The FAQ says that Community Wiki works:     by transferring ownership of the post   from the original author to the   community. They make the post easier   to edit and maintain by a wider group   of users, but they do not contribute   to any user's reputation.   But using the new edit suggestion system, everyone can edit. It's no longer true that community wiki makes a post easier to edit.  Does community wiki still serve a function?    What are good examples of community wiki mode doing what it's supposed to do?


Can any one help me with the code for adding some number of days to any date..?  For example  today is 11-04-2014.   I want 15-04-2014 + 3 days  output:18-04-2014.  My question is not adding dates to current date..

I'm working with a date in this format: yyyy-mm-dd.  How can I increment this date by one day?


I have an issue with UTF-8 symbols, such as ☃ - this is being displayed as Â˜Ƒ on the site.  The database, table and column charset is UTF8 and utf8_unicode_ci collation.   I have a header   Content-Type => text/html; charset=utf-8   and a meta tag  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   php.ini has a default encoding of utf-8  I have the following lines in my my.cnf file  [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 default-character-set=utf8 default-collation=utf8_general_ci character-set-server=utf8 collation-server=utf8_general_ci init-connect='SET NAMES utf8'  [client] default-character-set=utf8  [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid   All files are with a UTF-8 encoding.  When I output the same data in the Mysql Cli everything's OK, but when its displayed on the page, symbols are messed up.  I'm out of options here, please help :(

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I am getting Â characters in my HTML page where a space should be even though I have included:  <meta charset="UTF-8">   in my <head> tag; which seems to be the common solution to this issue.  I have googled around a lot and have been unable to reach any solution. I have seen a few people run into this issue due to their IDE or editor saving their project with the wrong encoding.   I use IntelliJ on this project but I have been unable to find a reason to believe that the IDE is causing my issue.  Has anyone seen or resolved this issue before?


I've seen some previous posts on return 1 and return 0, and here is what I understand:  For the user (someone who won't look at the source code) of the program, there is no distinction between return 1 and return 0.  For the programmer, return 1 implies error, and return 0 implies normal execution.  Am I understanding this correctly?   Hi, sorry, I didn't think this mattered, but I am talking about in the context of main().

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 had created an abbreviation (abv) shortcut using the newcommand. However the command did not render as expected. Specifically, there is a gap between the abv and punctuation marks (See line 1 of the attached Figure). To address this, I manually add spacing between the last two curly bracket. While this did solved the aforementioned problem, but it removed spacing between the abv and text, especially in the middle of sentence (See line 2 of the attached Figure).  May I know how to solve this issue.  Thanks in advance  Updated: Solved using   \usepackage{xspace}  \newcommand{\STTbSpace}{STT\textsubscript{b}\xspace}   &&&&&&&&&&&&&&&&&&&&&&&   \documentclass[a4paper,12pt]{report}    \newcommand{\STTbSpace}{STT\textsubscript{b} } % Spacing between the last two curly bracket   \newcommand{\STTbNoSpace}{STT\textsubscript{b}} % No spacing between the last two curly bracket  \newcommand{\Fm}{F\textsubscript{1}-m }   \begin{document}       When the \STTbSpace in the mid of sentence versus at the end \STTbSpace.       When the \STTbNoSpace in the mid of sentence versus at the end \STTbNoSpace.       Similarly \Fm.  \end{document}

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


I want to read a text file line by line. I found how to read line by line by searching but not how to call a specific line in a text file. Basically, i want to do something with particular lines( like the first line, the second line, the third line, etc):  if particular_line is something: ....   Also, how can i do something like this:  if return_from_another_function in file: ....   Basically, i want an example of how i could do that if it's possible.

Are there any alternatives to the code below:  startFromLine = 141978 # or whatever line I need to jump to  urlsfile = open(filename, "rb", 0)  linesCounter = 1  for line in urlsfile:     if linesCounter > startFromLine:         DoSomethingWithThisLine(line)      linesCounter += 1   If I'm processing a huge text file (~15MB) with lines of unknown but different length, and need to jump to a particular line which number I know in advance? I feel bad by processing them one by one when I know I could ignore at least first half of the file. Looking for more elegant solution if there is any.


Recently, the number of visits per day on Beta sites dropped extremely down from thousands to units. Here are examples from  and . Is it a bug?  It seems like the values are missing the last three digits.

In the ,  can monitor some things like the total traffic on the site. However, it seems to be broken at the moment, all figures are almost zero. This is how it looks for Meta Stack Exchange (other sites show similar pictures):


I have tried several solutions that I found on this forum, but I still haven't been able to install the 32-bit packages that I need for Android Studio. I get the following errors:     The following packages have unmet dependencies:    lib32bz2-1.0 : PreDepends: libc6-i386 (>= 2.9-18) but it is not going to be installed    lib32ncurses5 : Depends: lib32tinfo5 (= 5.9+20140118-1ubuntu1) but it is not going to be installed                    Depends: libc6-i386 (>= 2.4) but it is not going to be installed    lib32z1 : Depends: libc6-i386 (>= 2.4) but it is not going to be installed   E: Unable to correct problems, you have held broken packages.   I tried most of the suggestions described in here and several other places already -    I am looking for answers that might not have been captured in that article.

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


What if the dimensionality was something like 3.0001 or 2.999? Would we be able to tell the difference? I heard about fractional dimensionality in 3b1b and was wondering about its implications for physics

The following image serves to aid the reader in understanding the "privileged character" of $3+1$-spacetime.    The wikipedia article on , and the  "The priveleged character of $3+1$-dimensional spacetime" in particular, made me think a bit about the possibility that we might live in a non-integer amount of spatial and/or time dimensions.   The notion of attaching a non-negative real number to a metric space has at least mathematically already been described by such concepts as "" and "".   This may sound silly/ignorant/absurd to professional practicing theoretical physicists. To me (a layman), however, it doesn't sound much stranger than the idea of wrapping up six extra dimensions (which is, from what I understand, considered to be a serious possibility by those who study $10$-dimensional String Theory) into intricate shapes called "Calabi-Yau Manifolds".   Has any research on $(a +b)$-dimensional spacetime (where $a,b \in \mathbb{R}_{\geq 0} $) ever been done? If so, what where the findings? If not, why not?


Let $B$ be an $n \times n$ matrix. Does $B^3 = O_n$ imply $B = O_n$? If so, why?

This is a proof question and I am not sure how to prove it. It is obviously true if you start with $A = 0$ and square it.   I was thinking:  If $ A^2 = 0 $  then $ A A = 0 $  $ A A A^{-1} = 0 A^{-1}$  $I\,A = 0 $   but the zero matrix is not invertible and that it was not among the given conditions.  Where's a good place to start?


How is it better to say      Sometimes it's hard to believe that you could ever achieve your   goal...   Or     Sometimes it's hard to believe that you would ever achieve your   goal...

could have vs would have  I know could means indicating a possibility or ability, and would means the past of will or something about that is uncertain.  Which of the following is correct?      If you had told me, I would have used the other route.   If you had told me, I could have used the other route.   Both of the above sound correct and similar to me.  Are these also possible?      If you had told me, I would use the other route.   If you tell me, I would use the other route.     Please clear my confusion.


I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


       <input type="text">ADD

   $(document).ready(function(){     $("#add").click(function(){         $("#addnew").append("
<input type=\"text\">delete
");     });     $('#ab').click(function(){        alert();      }); });   I clicked #add. Append
<input type=\"text\">delete
 later click #del. No function.  I have two  ajax functions. Call PHP include html code

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


The book "The Dancing Wu Li Masters" page 189 talking about General Relativity says "A geodesic is not always a straight line".  Is that true? What is a definition of "straight line" that makes sense in this context?   The naive definition of "straight" is a three dimensional Euclidean sense. However, that is problematic. You'd need to project our four dimensional universe onto a "flat" three dimensional space. Presumable this would be done by choosing a pretty big inertial frame of reference and setting the Time axis to a constant. But choose a different frame, or different constant, and suddenly "straight" means something different.  Perhaps it makes more sense to define "straight" by projecting our four dimensional universe onto a four dimensional Euclidean space. But I think this will not work. Consider how difficult it is to project a curved 2D space onto a flat 2D space, such as making a map of the Earth. Except in special cases, the "straight lines" on the map do not correspond to any useful concept of "straight" on the globe. So I think in 4D the result will be not any better.  I am starting to think that the statement "A geodesic is not always a straight line" is simply nonsense, because there is no concept of "straight" except for the geodesic itself.  Perhaps five dimensions? Is there a projection of our four dimensional universe onto a five dimensional Euclidean space that would give us a sensible definition of "straight"?  Sorry if this is off-topic or too "philosophical".

With only a limited knowledge of , I usually explain space-time curvature (to myself and others) thus:  "If you throw a ball, it will move along a parabola. Initially its vertical speed will be high, then it will slow down, and then speed up again as it approaches the ground.  "In reality, the ball in moving in a straight line at constant velocity, but the space-time curvature created by the Earth's gravitation makes it appear as if the ball is moving in a curved line at varying velocity. Thus the curvature of space-time is very much visible."  Is this an accurate description, or is it complete     nonsense?


It has been confusing me for a long time.  Say, an Intel 4th Gen dual-core i5-4200U which clocks at 1.6 GHz and up to 2.6 GHz and an Intel 4th Gen dual-core i3-4160 which clocks at 3.6 GHz. As I see that they are both 4th Gen (Haswell), dual-core processors. Can I judge their processing speed based on the GHz given? I was told that i5 would be faster than i3, but it wasn't explained in detailed. Each of the core of i5 has a maximum of 1.3 GHz while each of the core of i3 has a speed of 1.8 GHz. If they can't represent the precise speed, what are they for?

Why, for example, would a 2.66 GHz dual-core Core i5 be faster than a 2.66 GHz Core 2 Duo, which is also dual-core?  Is this because of newer instructions that can process information in fewer clock cycles? What other architectural changes are involved?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this question. Feel free to edit the answers to add additional details.


Let $X$ be a completely regular Hausdorff space. Such a space is also known as , or a $T_{3.5}$-space. Furthermore, let's assume that $X$ is not compact. Question. Does $X$ admit a continuous function $f: X\to \mathbb{R}$ with unbounded image? Context. It is known that if $X$ is a non-compact metric space, then $X$ admits an unbounded continuous real-valued function. This was discussed thoroughly in . Note that the same conclusion holds if $X$ is a non-compact normal space (also known as $T_4$-space).  This is because the proof using Tietze extension theorem (see the answer in the linked MSE thread by the user Espace' etale) still works. This is the motivation for asking the current question. In general, Tietze extension theorem fails for $T_{3.5}$-spaces (for example, consider ), so one cannot apply the trick above; of course, it is possible that the question has a negative answer, in which case I'd love to see a counter-example.

It is well known that compactness implies pseudocompactness; this follows from . I know that the converse does not hold, but what is a counterexample?  (A  is a topological space $S = \langle X,{\mathfrak I}\rangle$ such that every continuous function $f:S\to\Bbb R$ has bounded range.)


Hi I would like to write a python script so that if i run that script it should open couple of applications and run some commands in console.Can any one guide me through it. Like example scripts and location to place it etc . P.S: I use Ubuntu as 17 as my OS.  Thankyou

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


Show that the series $$\sum_\text{p prime}\frac{1}{p}$$ is divergent.   I know that $\sum_{p=1}^\infty \frac{1}{p}$ is a p-series with $p=1$, it is a Harmonic series and is divergent, but in this case $p$ are only the prime numbers. Is it still valid?

Is this series known to converge, and if so, what does it converge to (if known)?  Where $p_n$ is prime number $n$, and $p_1 = 2$,  $$\sum\limits_{n=1}^\infty \frac{1}{p_n}$$


I'm trying to come up with an example of a curve that has constant curvature and torsion, both exactly 1.     Let $\vec{r(t)}$ be a parametrization for the curve $\gamma$. By calculating with formulas for curvature $\kappa$ and torsion $\tau$ I got that the length of the second derivative $\dot{\vec{r}} $ must be the square of the length of the first derivative. Similarly, I got that the length of the third derivative must be a cube of the first derivative. But I couldn't get this any further. I'm guessing it could be something like a spiral... that would give us a constant curvature. And this spiral should bend...    What would be such an example?    (For definition of the curvature and torsion: )

I need some help on the following problem:      Given that a curve $\mathbf r:I\to \Bbb R ^3$ has constant curvature $k(s)=k$, for all $s$, and constant torsion $\tau(s)=\tau$, for all $s$. Find the curve $\mathbf r$.    I only know that, according to the fundamental theorem, this curve exists and is unique. But, how practically find the parametric equation of the curve?   Thanks.


It was the first time we had been to Brasil or It was the first time we had been in Brasil.

In the following two examples, what is the difference between the usage of been to and been in? They seem like they have the same meaning but I’m not sure.     -Have you ever been to Florida?   -Yes, I’ve been to Florida many times.              -Have you ever been in Florida?   -Yes, I’ve been in Florida many times.


I am drawing a figure which shows several tetrahedrons in Illustrator. I have drawn all the line segments and connected them at the endpoints. Now the figure has been like this.  Now I want to fill the areas surrounded by the line segments. I did this as follows: first selected 3 line segments, join them and fill the color.  However, I found another problem. Since there are dashed lines in this figure, if the 3 line segments contains one which is dashed, the join operation will cause all the lines dashed. That is what I don't want.  So What is the correct operation if I want to meet my purpose?

In Illustrator, if you want to fill in areas surrounded by multiple line segments, you can first select all the line segments and use Live Paint Bucket (K) to fill the color. However, if you want to change the opacity of the area, you may find the borders also become transparent, like this:  My question is, is there any way to avoid the border changing its transparency when we change the transparency of its internal area?  Note: there are 3 line segments, with endpoints connected. An extended question, what if one of the line is dashed? This question originally comes from the fact that I want to fill the triangles as the bottom figure shows.


My attempt:  If we take $n$ to be finite, since $\mathbb Z/n\mathbb Z$ is cyclic, there is a distinct subgroup of order $d$ for each divisor $d$ of $n$.   Any subgroup of a cyclic group is cyclic. Any subgroup of order $d$ is isomorphic to $\mathbb Z/d\mathbb Z$, as it is a cyclic group of order $d$.  Cyclic groups are abelian, and $gh=hg$ leads to $gH = Hg$, so all subgroups are normal.  Thus we can view $\mathbb Z/d\mathbb Z$ as the kernel of some homomorphism from $\mathbb Z/n\mathbb Z$ to a group $H$. By the first isomorphism theorem, we have $(\mathbb Z/n\mathbb Z)/(\mathbb Z/d\mathbb Z)$ is isomorphic to the image of that homomorphism.  It is at this point I've become stuck, as I'm not sure what I can say about the image of this homomorphism. I feel like it should be $\mathbb Z/k\mathbb Z$, where $k$ is the integer such that $kd = n$, and this would prove the quotient group is cyclic, as it is isomorphic to a cyclic group. However, I am not sure if this is right or how to justify this?  Any direction is greatly appreciated!

If $G$ is cyclic, then $G/H$ is cyclic?   The proof I got goes like this: $G$ is cyclic, so $G=<g>$ for some $g\in G$. So any coset in $G/H$ would be of the form $Hg'=Hg^n$ for some $n$. So $Hg$ is an generator of $G/H$. Thus, $G/H$ is cyclic.  I might just be confusing myself, but we have only shown that $Hg'$ is in form of $(Hg)^n$. But what if we are missing some $n\in\mathbb{N}$? That is, there is no quotient group of the form $Hg^2$, for example.  To make myself a little bit clearer, I think what the above proof has done was showing that $\forall Hg'\in G/H, Hg'\in <Hg>$, thus $G/H \subset <Hg>$. I feel that this is not a complete proof.


I was playing around with setuid perl for command execution (insecure).   I learned from another question, that env - /usr/bin/perl -e 'system("...")' doesn't reset the EUID to RUID, like it's the case for modern implementations of /bin/sh.  However, I cannot execute multiple commands, separated by && or ;, using the above command without perl resetting the EUID?  kube@ctf4-deploy1-65d9686c54-7x2zh:~$ ls -la /usr/bin/perl -rwsr-xr-x 1 root root 3197768 Mar 31  2019 /usr/bin/perl kube@ctf4-deploy1-65d9686c54-7x2zh:~$ env - /usr/bin/perl -e 'system("id")' uid=1000(kube) gid=1000(kube) euid=0(root) groups=1000(kube) kube@ctf4-deploy1-65d9686c54-7x2zh:~$ env - /usr/bin/perl -e 'system("id && id")' uid=1000(kube) gid=1000(kube) groups=1000(kube) uid=1000(kube) gid=1000(kube) groups=1000(kube)

I'm hardening a Linux system and wanted to test (setuid-based) shell escapes using common binaries, like awk, vim, etc., supporting command executing.  However, all binaries I've tested except sh and bash don't respect their setuid bit.  In particular, awk continues to execute as a normal user:  $ ls -lL /usr/bin/awk -rwsr-xr-x 1 root root 121976 Mar 23  2012 /usr/bin/awk $ id uid=1000(bob) gid=1000(bob) groups=1000(bob) $ awk 'BEGIN{system("id")}' uid=1000(bob) gid=1000(bob) groups=1000(bob)   In contrast, bash executes as root when given the -p option:  $ ls -la /bin/bash -rwsr-xr-x 1 root root 1168776 Apr 18  2019 /bin/bash $ /bin/bash -p # id uid=1000(bob) gid=1000(bob) euid=0(root) groups=1000(bob)   Is there any way to make awk, vim, less, etc. respect the setuid bit and execute the command as root?  OS:  # cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"   Update:  parallels@debian-gnu-linux-vm:~$ ls -la /proc/self/fd/0 /dev/fd/0 /dev/stdin lrwx------ 1 parallels parallels 64 Mar 26 08:15 /dev/fd/0 -> /dev/pts/1 lrwxrwxrwx 1 root      root      15 Mar 20 19:56 /dev/stdin -> /proc/self/fd/0 lrwx------ 1 parallels parallels 64 Mar 26 08:15 /proc/self/fd/0 -> /dev/pts/1


How I can list all packages a apt repository serves? Specifically before adding the repository to my system would be preferred.

I want to list all the files from a source, say  from the command line. What is the command for that?  dpkg --list lists all files or just the filename.


First I would just like to clarify I understand that the Riemann Zeta Function is only defined for $s>1$ and that we have to use other formulas that use analytic continuation to "define" the other values of $s$. What I don't understand however is why does the analytically continued function give us zero when $s$ is a negative even integer. I couldn't seem to find any proofs online and I would love to know the answer.

A question that has been puzzling me for quite some time now:  Why is the value of the Riemann Zeta function equal to $0$ for every even negative number?  I assume that even negative refers to the real part of the number, while its imaginary part is $0$.  So consider $-2$ for example:  $f(-2) =  \sum_{n=1}^{\infty}\frac{1}{n^{-2}} =  \frac{1}{1^{-2}}+\frac{1}{2^{-2}}+\frac{1}{3^{-2}}+\dots =  1^2+2^2+3^2+\dots =  \infty$  What am I missing here?


The title is horrible, sorry. I´m redding form a text file that has a bunch of dates in this format:   30/5/2015   and also can appear obviously with 2 numbers in the month:  21/12/2014   this is pure text, is not formatted as a date. What i have to do is to control that the month section does not exceds the number 12. This is because sometimes the date changes it´s format and appear like :  2/15/2015--- meaning that the second place turns to days and the first one to months   This are the dates that i do not need. From the text i´m getting all this dates like this:  fechas = list(set(re.findall(r'\b(\d+/\d+/\d{4})\b', data))) --- i use set() because sometimes the dates appear more than one time   I tried something like this:  for fecha in fechas:     month = fecha[2:3]   trying to slice the string, but this wouldn´t work because of the fact that if i do this i´m getting 1 number and sometimes i need 2  Does anyone have any idea on how o do this?  Any help will be really appreciated

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


I have noticed that when I'm using the Stack Overflow mobile website, it is impossible to tap number of votes to get more details about it (upvotes & downvotes).  I don't know if this feature is not implemented, or the size of votes count element is too small to be tapped.

It seems we can't view the number of up-votes and down-votes a question has from the mobile site. Can this be added or is there a reason it isn't available?


I am not sure. I want to say 'Jane's and Sarah's etc' but the 'etc' being both's, is it written 'Jane and Sarah's etc.'? And is this always the case or are there exceptions?   Thanks

Which option is grammatical?        There will be readings from Nikki Giovanni’s and Alice Walker’s writings.   There will be readings from Nikki Giovanni and Alice Walker's writings.      Saying it out loud the latter sounds right, but looking at it the former looks better.


After installing Steam in Ubuntu 15.04 x64 it won't start.   After trying this command in terminal steam I get this output:    Running Steam on ubuntu 15.04 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0_client) libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast   And also steam --reset command gave this output:   mv: cannot stat ‘/home/[USER]/.steam/registry.vdf’: No such file or directory Installing bootstrap /home/[USER]/.local/share/Steam/bootstrap.tar.xz Reset complete!   I tried this and nothing else. I have AMD graphic card with Xorg drivers.

Actually I have installed the new Ubuntu 15.04 64bit, and when I'm trying to install Steam on it, there is a problem. In fact I have downloaded the deb package from steam website, installed it and when I start it nothing happens. I tried to start it from terminal and what I've got  $ steam Running Steam on ubuntu 15.04 64-bit STEAM_RUNTIME is enabled automatically Installing breakpad exception handler for appid(steam)/version(0_client) libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast


I think I just observed a glitch which I'm unable to reproduce.   I was watching  and the answer was edited. When I clicked the notification to reload the answer, the migration notice disappeared.

I've come across a small issue which occurs when a question has been closed but the question itself or one of its answers are being edited.  Steps to reproduce:   Visit a closed question. (even closed years ago)   In a different tab or browser, edit the question or one of its answers. "an edit has been made to this post; click to load" message will appear above the edited post in the first tab/browser, click it. The .question-status div becomes hidden, which includes the closed notice below a question and, for a duplicate-closed question, the list of duplicates above the question body. This gives the appearance that the question is no longer closed (until you refresh).   Some screenshots:                I know it isn't common/important but it did confuse me when looking at a particularly bad question - I thought it had been reopened.   Is this an intentional feature? If so, what was the thinking behind it?    Another example  Before    After


As a newcomer to StackOverflow, I recently asked my first . I wanted to start with a fairly safe general question, to get the feel for how the site worked. My question was intended to be programming-related, but my original wording was not clear enough, so another user decided to close it.  I've re-phrased my question, and had received one useful answer before the question was closed, but I'm not sure what the procedure is after your question is closed to allow people to post answers again...  I've checked the FAQ and About pages, searched the SO questions, but have had no luck. Could someone point me in the right direction as to how I get my question re-opened, or if it is possible to do at all?

To reopen a closed question,  must agree that the question is suitable for the site and cast votes to reopen the question. But:  How does one actually vote to reopen? Is there a reputation level that you must have before you can see this function? Or do I just leave a comment along the lines of, "I vote to reopen"? What happens if someone with less than 3000 reputation leaves a comment that they wish to vote to reopen? How can one draw attention to their closed questions? Is it done via a posting new question? Or do you edit the closed question?   Related:  For more information, see "" in the .


I understand the classic definition of a sentence is one that contains a predicate and a subject, but is it okay to have shorter sentences that don't follow this structure for effect?  For example, if I was to write something like the following:      Inside was something ancient. Something powerful. Something mysterious. Something that...   I realize I could put the 'Something ancient' and 'Something mysterious' between commas, but would it be okay to use them as stated (between periods) for a kind of more dramatic effect even though they don't fit the classic definition of a full sentence?

One of the interesting aspects of the Maori language, as I understand it, is that it includes a class of sentences which not only have no verb, it is positively wrong to form them with a verb.  Does standard English include any non-trivial sentences which have no verb, and are not simply ellipses of sentences which do include a verb?  African-American Vernacular English includes sentences like, "Where you at?", that have no verb. The corresponding sentence, "Where are you at?", doesn't sound like African American Vernacular English. Adding the verb "are" seems to transform it into White American English.  Phrases like, "Hey!" are interjections, and don't meet my threshold of being non-trivial. Answers like "Tomorrow." to "When will you file your story?" seem to be ellipses; in this case, of the verb-laden "I will file my story tomorrow."  I found a related question here in in EL&U, . The title notwithstanding, the question actually seemed to be asking for an explanation why a certain phrase was in fact not grammatical.  I realise that "standard English" is a bit of a contradiction. Sorry. I refer to any of the mainstream English language dialects, steering clear of pidgins and creoles, where no doubt lurk all manner of interesting grammatical structures.


This is my .  I feel my sub-question's answer is best fit for me. But this question did not include my title.  I am not sure if I should accept this answer because both answer are suitable for acceptance. If I accept my title-related answer, I guess my sub question's answer is more important then my original question's answer.  How can I do it?

For the apple.stackexchange question  a 2nd answer was given, which relates to the question, but IMHO does not answer a majority portion of the question. Here some details:   The question is about, how to set the PATH variable in a unified manner. The  details how to change the file /etc/launch.conf. It is to note, that changing this file is needed for the overall answer. The author of the answer does make the valid point that, when he searched for, how to change /etc/launch.conf, the question came up. The  does not detail the change of /etc/launch.conf enough.   So, the general problem is: What to do when an additional answer explains only a small (but unique portion) of the question, while an earlier answer explains more (but not what the additional question explains).  Finally, I think I should note that I am the initial asker and poster of the 1st answer.


I'm having issues trying to extract values from object list, this is the flow:  button gets clicked click calls a callout function get response from response.getBody()  at this point, I have two options:  Use JSON2Apex, that for some reason always return: "Apex Type unsupported in JSON: Object  if (response.getStatusCode() == 200) {        //Where, TicketJson is JSON2Apex class        TicketJson ticketResponse = TicketJson.parse(response.getBody());        System.debug(ticketResponse);   Use JSON.deserializeUntyped(), this my favorite approach, but when I manage to reach the Object List that I need, I'm unable to get it's Object values as MAP  if (response.getStatusCode() == 200) {     Map<String, Object> obj = (Map<String, Object>) JSON.deserializeUntyped(response.getBody());     Object ticketTypeData = obj.get('ticket_group');     Map<String, Object> TicketData = (Map<String, Object>)ticketTypeData;     List<Object> Data = (List<Object>) TicketData.get('_data');  Any help is welcome. Best regards. JSON2Apex class public class TicketJson {  public Integer x_total {get;set;} // in json: _total public Event_template event_template {get;set;}  public Ticket_group ticket_group {get;set;}  public Ticket_type ticket_type {get;set;}   public class Ticket_group {     public Integer x_count {get;set;} // in json: _count     public List<Data_Z> x_data {get;set;} // in json: _data     public Integer x_total {get;set;} // in json: _total      public Ticket_group(JSONParser parser) {         while (parser.nextToken() != System.JSONToken.END_OBJECT) {             if (parser.getCurrentToken() == System.JSONToken.FIELD_NAME) {                 String text = parser.getText();                 if (parser.nextToken() != System.JSONToken.VALUE_NULL) {                     if (text == '_count') {                         x_count = parser.getIntegerValue();                     } else if (text == '_data') {                         x_data = arrayOfData_Z(parser);                     } else if (text == '_total') {                         x_total = parser.getIntegerValue();                     } else {                         System.debug(LoggingLevel.WARN, 'Ticket_group consuming unrecognized property: '+text);                         consumeObject(parser);                     }                 }             }         }     } }  JSON Example { "ticket_group": {     "_count": 21,     "_data": [       {         "_rank": 1,         "additional_info_spec": null,         "admission_end_offset": "2h",         "admission_start_offset": "-10m",         "capacity": -1,         "description": "",         "duration": null,         "duration_new": null,         "event_template_id": "4549294f-bc7a-1679-7797-90c5a9180c90",         "exclude_from_event_capacity": false,         "handler": "tickets",         "hidden_type": "public_browsable",         "id": "0e038e0e-24f2-5186-3c6c-adae2727d29d",         "max_redemptions": 1,         "max_tickets_per_order": 15,         "member_role_id": null,         "min_tickets_per_order": 1,         "name": "Free Admission by PNC",         "oversell_capacity": 0,         "portal_id": "605f5cc3-3892-4c6f-bed0-4910cecd82b0",         "sales_end_offset": null,         "sales_start_offset": null,         "sells_out_event": false,         "start_policy": "immediate"       }, }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag.  This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it.  I have a specific JSON structure in mind. I need to either deserialize this structure that's coming in from a web service, or I need to serialize data into this structure to transmit it to another system. How should I get started on this project in Apex?


function MyFunc() {      var msg = 'hello';      this.speak = function() {          console.log(msg);      } }  var obj = new MyFunc(); obj.speak();     The weird thing about the above code is that it works. Yet 'msg' is not part of the object. So how is 'msg' kept in memory. I would more understand if I did:  this.msg = 'hello'; console.log(this.msg);   because then it's a part of the instantiated object. but how are regular variables like 'var msg' getting saved with this object?  edit: this question is not the same as closure because this is a specific use case.

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


We know that it was he. Is this sentence correct? Or should I swap 'he' by 'him'?

When telling a story about myself from the past, I have found myself in an internal debate over whether the correct way to segue into the present is:     That was me twelve years ago.   Or:     That was I twelve years ago.   My instincts tell me the first is correct (object pronoun after a verb and it sounds better to my ears). But, I'm not sure if pronouns after linking verbs should be object pronouns. Which is correct?


The question basically explains itself. I want to take an audio file (I can use any format really) and have Java output sound from it when called on.

I want to be able to play sound files in my program. Where should I look?


I am looking for a simple screenshot annotation tool with the following features:   Crop Resize Blur Draw shapes and lines Add text

I have noticed that many people use images in their Ask Ubuntu answers. What software are people using?


I just changed my Minecraft gamertag and it was all ok, then when I try to join a server it says this "Failed to join server Error: Authentication to Minecraft.net Failed"

I don't understand this and I'm now worried as I have donated to a lot of servers and I don't want to lose this account. On the launcher it says my new username but when I log on it says "Account not Authenticated with minecraft.net" and "Non-Valid Username".  How can I regain the ability to use my account online?


I was working on a project which was committed on GitHub. I made some changes and tried to commit it to the repo, But I got the error saying Your branch is ahead of 'origin/main' by 3 commits. So I tried to go back to the branch origin/main and I did git reset --hard origin/master Now I was on the main branch. So I pushed the code on Github. Code got pushed but it was not reflected in the repo. And When I came back to the editor all the changes I made on Local machine were gone it is not there. I need my changes made codes back on my local machine. Please Help!

Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1


One of the premises of the classic sci-fi show Farscape is that a person could travel through black holes, I'm curious as to what exactly would happen to a person body if you were to enter a black hole and how far out the premise of traveling through black holes really is?

I've heard many scientists, when giving interviews and the like, state that if one were falling into a black hole massive enough that the tidal forces at the event horizon weren't too extreme, that you wouldn't "notice" or "feel" anything, and so forth.  Thinking about this for a few minutes, it seems to be quite wrong.  If you're falling feet first for example, as your feet cross the horizon, your brain can no longer receive any information from them, as the information would have to travel faster than light.  Once you are entirely within the horizon, no part of your body closer to the singularity can send any sort of signal to any part of your body that is further away, for the same reason.  Even bloodflow would stop, as blood that is pumped downward towards your feet could never be pumped back up again.  In other words, inside the event horizon is a series of even more event horizons, like the layers of an onion, infinitely thin.  Am I missing something important?


#!/bin/bash filename=../deleted/$1 #Testing condition before deletion of file if [ "$1" = "" ] ; then echo "No filename provided" elif [  -f "../deleted/$1"  ] ; then echo "File doesnot exist" str=$(fgrep "$1" ../.restore.info | cut -d ":" -f2) path=${str%/*} mv "../deleted/$1" "${path}" newname=$(fgrep "$1" ../.restore.info | cut -d "_" -f1) mv -i "$1" "${newname}" else echo "file does not exist" fi ----------   ( I have written script to move file from the deleted folder to its original path and its working fine. But now i have to check if there is already a file with same name then it should give alert user "do u want to overwrite " if yes then overwrite if no or anything else then do not restore)

I want to pause input in a shell script, and prompt the user for choices. The standard Yes, No, or Cancel type question. How do I accomplish this in a typical bash prompt?


There is a very cool foam effect rising on the shore in this low poly water asset made in Unity:   And here:   Is it possible to create a similar effect in Blender?  I have the water material down, I just want a cool foam effect!

so I'm trying to recreate this effect   and I've gotten as far as having the white area around a rock, but I've been struggling with animating the area where the brush touches the canvas. Eris gives a few notes on how he did it, but I haven't been able to follow them. Does anyone have a more detailed step on how to use noise texture to only affect the Brush area of effect?  Thank you


I just discovered that a python exception can be indexed directly very similarly to a Sequence type object, like so:  >>> e = Exception('msg') >>> print e[0] msg >>> e = Exception(1,2,3) >>> x,y,z = e   It looks like BaseException contains methods for example __getitem__ and __getslice__ that implement this syntax.  However, what surprise me is that I can not find any relevant description about this behavior in the documentations I can think of looking into, e.g., related sections of  and .  Is this a documented syntax and where is it documented?

I have been bitten by something unexpected recently. I wanted to make something like that:  try :      thing.merge(iterable) # this is an iterable so I add it to the list except TypeError :      thing.append(iterable) # this is not iterable, so I add it   Well, It was working fine until I passed an object inheriting from Exception which was supposed to be added.  Unfortunetly, an Exception is iterable. The following code does not raise any TypeError:  for x in Exception() :     print 1   Does anybody know why?


I know there's a ton of questions about this topic but I'm not being able to find the right answer. I have GNOME Version 3.22.2 running on a Debian GNU/Linux 9 (stretch) 64-bit.  The problem:  I'm trying to set up a shared folder (say thefolder) such that multiple users of a group (say thegroup) on the same machine can work on it. To do that I changed the ownership of the folder to thegroup and set the setgid bit of the folder.  $ ls -l drwxrwsr-x 6 me thegroup 4096 Oct  1 20:29 thefolder   The only problem now is that the default umask in Debian is 0022 and this prevents other users to write on any subfolders or files that I create on thefolder.   What I've done so far:   My first (naive) try was to set the umask in one of the shell configuration files. I added the line  umask 0002   in all of the files /etc/profile, /etc/bash.bashrc, ~/.profile and ~/.bashrc (each one at a time obviously) until I realized that this worked only for the shell (GNOME Terminal and TTYs) but not for other applications like Files or Gedit. I then deleted all these lines and tried something else. I added the line  session optional pam_umask.so usergroups   at the end of the file /etc/pam.d/common-session and restarted the computer. It is worth noting at this point that the options UMASK 022 and USERGROUPS_ENAB yes are both enabled in the /etc/login.defs file. Having done that I noticed that the umask was correctly set as 0002 for TTYs but not for the GNOME session (the GNOME Terminal and all other programs accessed through the graphical interface still worked with a 0022 umask) After that I tried to set the umask in the Xsession script of the GNOME Display Manager. I wrote the line   umask 0002   at the begining of the file /etc/gdm3/Xsession but the problem persisted. I made a little experiment and wrote instead the following line   echo "umask: $(umask)" > $HOME/Desktop/debug   and after log out and log in again the debug file contained the line  umask: 0002   which means that at that point the umask was still correct and that it is overwritten somewhere else after the Xsession script.   The question  Can someone explain to me where is the umask for the GNOME session defined and how can I change it?

Using Gnome 3.18. I share files between other family members, but the default umask on my distro (archlinux) is 0022. So every file/directory created is not writable for our common group.  I tried to put umask 0002 in /etc/profile but the gnome session is still using 0022. It's working for a login bash shell, though.  I also tried to add this line in /etc/pam.d/system-auth:  session   required  pam_umask.so umask=0002  It has the same effect as the one in /etc/profile. I tried  If I change the umask manually in a gnome-terminal shell, then I launch an application from it, say gedit, then the files created by it have the wanted permissions. If I launch gedit from the gnome menus, it doesn't. So my matter is really to set the umask for the gnome session, and I can't find where to do it.  EDIT (to answer Gilles' comment): I'm using gdm 3.18 as the DM. I also tried to add the pam_umask line into /etc/pam.d/gdm-launch-environment. All other gdm-* files contains includes of session from the system-auth file, so they should not need more. It doesn't change anything.  /etc/login.defs contains UMASK 077 but also USERGROUPS_ENAB yes which should set the umask to either 0077 or 0007 for users whose primary group is the username.  The only file that contains 022 for umask in /etc is /etc/profile but that was my first try.  As for /etc/Xsession.d, I don't have this directory. Besides, as wayland is now the default display server, I'm not sure the umask should be set as part of X initialisation, even if I'm still using it myself.


I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray intersects a polygon.  We have some direction for how to do this, but all of the class materials as well as my Googling of the subject have not helped.  These are the functions we must complete:  bool polygon::Intersect(const ray &R, intersection &inter) {     // To Do: If you have implemented the "CalculateNormal" method      // below, should already be calculated and placed in the member      // "n".     //     // Now, using n, you need to calculate the intersection of the     // ray with the plane containing the polygon.  Then, once you      // have that point, you need to loop through each edge in the     // polygon and make sure the point is to the left of that edge.     //     // If it is to the left of every edge, then fill the structure     // inter with all of the data for the intersection and return      // true, if not, return 0.      //      // Don't forget to check to see if the t you calculate for the     // ray is > 0.      return false; }  void polygon::CalculateNormal(void) {     // To Do: Use the edges of the polygon to calculate the normal     // of the polygon. You should be careful to take care of the      // case where two edges give you a zero normal.  Place the      // normal into the member "n" so that the intersection method     // can use it when called.     //  }   Could someone please explain this in a bit further detail?  Note: I am not asking for anyone to write the code or do my homework for me, but instead help me understand what exactly is going on here.  Thank you.

I'm developing a picking system that will use rays that intersect volumes and I'm having trouble with ray intersection versus a plane. I was able to figure out spheres fairly easily, but planes are giving me trouble. I've tried to understand various sources and get hung up on some of the variables used within their explanations.  Here is a snippet of my code:     bool Picking()  {   D3DXVECTOR3 vec;   D3DXVECTOR3 vRayDir;   D3DXVECTOR3 vRayOrig;   D3DXVECTOR3 vROO, vROD; // vect ray obj orig, vec ray obj dir   D3DXMATRIX m;   D3DXMATRIX mInverse;   D3DXMATRIX worldMat;                  // Obtain project matrix   D3DXMATRIX pMatProj =   CDirectXRenderer::GetInstance()->Director()->Proj();                 // Obtain mouse position   D3DXVECTOR3 pos = CGUIManager::GetInstance()->GUIObjectList.front().pos;                  // Get window width & height   float w = CDirectXRenderer::GetInstance()->GetWidth();   float h = CDirectXRenderer::GetInstance()->GetHeight();                  // Transform vector from screen to 3D space   vec.x =  (((2.0f * pos.x) / w) - 1.0f) / pMatProj._11;   vec.y = -(((2.0f * pos.y) / h) - 1.0f) / pMatProj._22;   vec.z = 1.0f;                  // Create a view inverse matrix   D3DXMatrixInverse(&m, NULL, &CDirectXRenderer::GetInstance()->Director()->View());                  // Determine our ray's direction   vRayDir.x = vec.x * m._11 + vec.y * m._21 + vec.z * m._31;   vRayDir.y = vec.x * m._12 + vec.y * m._22 + vec.z * m._32;   vRayDir.z = vec.x * m._13 + vec.y * m._23 + vec.z * m._33;                  // Determine our ray's origin   vRayOrig.x = m._41;   vRayOrig.y = m._42;   vRayOrig.z = m._43;     D3DXMatrixIdentity(&worldMat);   //worldMat = aliveActors[0]->GetTrans();   D3DXMatrixInverse(&mInverse, NULL, &worldMat);     D3DXVec3TransformCoord(&vROO, &vRayOrig, &mInverse);   D3DXVec3TransformNormal(&vROD, &vRayDir, &mInverse);   D3DXVec3Normalize(&vROD, &vROD);   When using this code I'm able to detect a ray intersection via a sphere, but I have questions when determining an intersection via a plane. First off should I be using my vRayOrig & vRayDir variables for the plane intersection tests or should I be using the new vectors that are created for use in object space?   When looking at a site like this for example:   I'm curious as to what D is in the equation AX + BY + CZ + D = 0 and how does it factor in to determining a plane intersection?  Any help will be appreciated, thanks.


I'm stuck on a astriod and there is no oxygen so I die really fast I can't mine fast enough help.I've tried coal but I don't have enough.

I'm stuck on a planet with no wood trees and no resources that are easy to exploit, and I want to get off of it as quickly as possible.  What do I need to do to get my spaceship enough fuel to go to another planet?


Please. I need a new screen recorder so I can record my emulated games. (PS1, SNES) Please suggest me ones that are simple and require no hard to understand sudo code.

How can I record my screen on Ubuntu?   The app I'm looking for has ideally all of these features:   Can record in a format that can be played back easily on any platform and/or accepted by YouTube or another popular video site Can record just a window (instead of the whole screen), possibly selecting it with a mouse click Can start recording after a configurable delay (e.g., I launch the app and have time to do arrangements to my desktop/window before actual recording starts)


Just got a new iPAD air 2, iOS 9.1. It says I should update it to iOS 9.3.1.  I might be interested to jailbreak it later on, so I'd like to preserve that option for me possible.  I hear jailbreak for 9.3.1 is not available yet, and on the other hand, apple stopped signing iOS 9.1 and it is impossible to install or downgrade to iOS 9.1. I want to know how I can back up the current state with iOS 9.1, and later after I updated the iOS, when ever I wanted I could restore to the iOS 9.1.  I know that I should backup shsh blobs using Tiny Umbrella. but I cannot find the official download file in their website. Also I don't know how to backup APTicket.  Thanks

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?