PostgreSQL - join statement duplicate row data combine to single row

I am joining 3 tables and getting some duplicated data for certain columns. I want to combine the data to a single row.  The following is the database structure and data.  CREATE TABLE customers (     id integer NOT NULL,     fname character varying(50),     lname character varying(50) );  COPY customers (id, fname, lname) FROM stdin; 1   Thomas  Jefferson 2   Benjamin    Franklin \.     CREATE TABLE customers_products (     id integer NOT NULL,     customers_id integer,     products_id integer,     account_info json );  COPY customers_products (id, customers_id, products_id, account_info) FROM stdin; 1   1   1   {"account_number":"000001", "date":"05/28/15"} 2   1   2   {"account_number":"000002", "date":"05/28/15"} 3   2   1   {"account_number":"000003", "date":"05/28/15"} 4   2   3   {"account_number":"000004", "date":"05/28/15"} \.     CREATE TABLE products (     id integer NOT NULL,     name character varying(128) );  COPY products (id, name) FROM stdin; 1   checking 2   savings 3   credit card \.      This is the query I'm using.  SELECT     c.id,     c.fname,     c.lname,     p.name,     cp.account_info FROM     customers c INNER JOIN     customers_products cp ON     c.id = cp.customers_id INNER JOIN     products p ON     p.id = cp.products_id    This is the resulting dataset.    How would I get the dataset back in 2 rows with the account information combined into single rows? This is the data structure I would like to end up with.  [     {         "id": 1,         "fname": "Thomas",         "lname": "Jefferson",         "account_info": [             {                 "name": "checking",                 "account_number":"000001",                 "date":"05/28/15"             },             {                 "name": "savings",                 "account_number":"000002",                 "date":"05/28/15"             }         ]     },     {         "id": 2,         "fname": "Benjamin",         "lname": "Franklin",         "account_info": [             {                 "name": "checking",                 "account_number":"000003",                 "date":"05/28/15"             },             {                 "name": "credit card",                 "account_number":"000004",                 "date":"05/28/15"             }         ]     } ]      The solution was:   SELECT     c.id,     c.fname,     c.lname,     string_agg(p.name, ', '),     json_agg(cp.account_info) FROM     customers c INNER JOIN     customers_products cp ON     c.id = cp.customers_id INNER JOIN     products p ON     p.id = cp.products_id GROUP BY     c.id, c.fname, c.lname ORDER BY     c.id;


What are the differences between proofs based on simulation and proofs based on games?

what are the main pros and cons of proving the "security" of a crypto scheme under simulation proofs instead of game based proofs?


I don't have a background of stochastic calculus.   It is known  that definite integral of standard  from $0$ to $t$ results in another Gaussian process with slice distribution that is normal distributed with mean equal to $0$ and variance $\frac{T^3}{3}$ i-e  $$ \int_0^{t} W_s ds \sim \mathcal{N}(0,\frac{t^3}{3})    $$  Question:  What if we square the standard Wiener process and then integrate i-e $$ \int_0^{t} W_s^2 ds \sim ?    $$  Would that be scaled Chi-square distributed ?


An "elementary" approach to complex exponents?

Is there any way to extend the elementary definition of powers to the case of complex numbers?   By "elementary" I am referring to the definition based on $$a^n=\underbrace{a\cdot a\cdots a}_{n\;\text{factors}}.$$ (Meaning I am not interested in the power series or "compound interest" definitions.) This is extended to negative numbers, fractions, and finally irrationals by letting $$a^r=\lim_{n\to\infty} a^{r_n}$$ where $r_n$ is rational and approaches $r$.  For a concrete example, how would we interpret $e^i$ in terms of these ideas?


How can I get a revoked IPSW to install?

I need to get the IOS 10.2 IPSW to install on my iPod Touch to jailbreak it, but there is no JB for IOS 10.3.2, which I recently downgraded to from IOS 11. How can I get it to install?


I am a Pakistani National traveling to Canada to study and will transit through schengen countries. Do I need transit visa?

My Canadian study permit request was approved and I have a visa in my passport for it.  My transit are in Frankfurt and Zurich.  Will I need a transit visa to transit through these countries.  Transit time is 2  hours and 3 hours.


Explain why it's impossible for the graph with degrees (n-2, n-1, ..., 1,0) when n is greater than or equal to 2 without using sequence algorithms

It's pretty obvious why it doesn't work using the sequence algorithms.  So the way I thought of it:(n is the number of vertices)  at n = 1: you get 0, which is the graph of just one vertex  at n =2: you get 1, 0 which is two vertices with one having a degree of 1, but the other vertex has no edges so this is impossible.  this continues on for n greater than 2 as well. Not sure if this is enough to answer the question.  Edit: possible new solution, there are n possible degrees for n vertices which is impossible when $n\geq2$


I was caught cheating on an exam, how can I minimize the damage?

I got caught cheating in a two-hour engineering exam consisting of 100 multiple choice questions which was done online through the  e-learning software. I feel like my life is almost over.  Having not studied well and having no time to study, I decided to cheat. I know there are no excuses for cheating. Before the exam I dug up research about moodle exams, and it turned out you can take the exam anywhere you want to as long as you have the quiz password. Taking advantage of this, I went up to my engineering library and asked a close friend who was taking the exam to send me the quiz password before he starts.  What I had prepared:   Calculator (was not allowed during the quiz). Printed material (consisted of more than 200 pages). Google search engine (on a laptop ready to help). Whatsapp (to ask questions for a friend who took the quiz last year).   As I sat down, I did the first 50 questions, suddenly the quiz froze and moodle told me:      you are not allowed to take the exam from this location.   While I was leaving, one instructor responsible for the course (there are 5) came and found me. She accused me of cheating, took my mobile and made come with her to a huge office where two instructors searched all my mobile (took the name of my friend who gave me the password), and started talking to me, asking for all details of this crime. They took and confiscated my phone and looked at everything: Whatsapp conversations, all my emails, and images. The instructor took the mobile from my hand without asking me and kept it with her. It seems that the instructors are going to report me as well as my friend who sent me the password for the exam.  The university's Student Code Conduct said that cheating will result in one of the following: a Dean's Warning, Suspension, or Expulsion. If any of that happens, my future is over. A dean's warning will cancel my financial aid. A suspension would be for at least two years, and coming back would require a lot of work. An expulsion will be definite.  I've learned the lesson about cheating, now how can I fix this? How can I prevent the five instructors from reporting me? It's obvious that I should speak to them, but what should I say? What can I do? My future is almost over, but many of you are teachers and instructors here, what can I do to fix this?    EDIT: Wow, it has been almost 3 years. I would like to update on how I dealt with the situation.   Lesson: It was obvious to never ever cheat under any circumstances, and it was not whether you'd get caught or not.    Consequences: I received a Dean's warning but the financial aid wasn't revoked. However, I couldn't stay in the department as engineering was not for me and I was even ashamed to stay in the university.  What happened next: I transferred to an ABET-accredited Computer Science institution and I graduated with distinction in 2.5 years. It was extremely stressful as I had taken 6 major courses (18 credits) in one semester, but I had to do it.  Future plans: I'm going for an MSc in Computer Science in St Andrews next year.


Consider this code  \documentclass{report} \usepackage{graphicx} \begin{document} \begin{figure}[htp] \includegraphics[width=0.4\textwidth]{imageA.png} %\includegraphics[width=0.4\textwidth]{imageB.png}                                                                                \end{figure} \end{document}   Compilation works fine with pdflatex. With xelatex however imageA.png is displayed blank while imageB.png appears normally.   I don't see any warnings what might be wrong with imageA.png nor anything specific in the .log files. Nor do I see any warnings referred to in   Any clues?


What is an equivalent for ntrights.exe on Windows 7?   I need it to be able to be run from the command line.


As far as i know, introns do not encode protein products, but living creatures still have them. So what’s their function ?  P/s: Sorry for my grammar


Can someone explain the node shown in this screen capture?

I trying to recreate a material by looking at an image that appears to show "nested" nodes. I tried every stock node but was unable to produce this setup.   These two "nodes" are used as components in this one, in the section named "marble pattern":


How to recover lost partition after diskutil erasevolume?

I have the same problem as   The op in that post solved by going into Internet Recovery. I did that but problem remains. Reinstall of MacOS didn't work either.  Here's my output for relevant commands:  $ diskutil list /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *121.3 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:                 Apple_APFS Container disk1         96.2 GB    disk0s2    3:         Microsoft Reserved                         16.8 MB    disk0s3  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +96.2 GB    disk1                                  Physical Store disk0s2    1:                APFS Volume Macintosh HD            74.5 GB    disk1s1    2:                APFS Volume Preboot                 43.7 MB    disk1s2    3:                APFS Volume Recovery                517.1 MB   disk1s3    4:                APFS Volume VM                      1.1 GB     disk1s4  $ diskutil cs list No CoreStorage logical volume groups found  $ sudo gpt -r show /dev/disk0       start       size  index  contents           0          1         PMBR           1          1         Pri GPT header           2         32         Pri GPT table          34          6                   40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B      409640  187824088      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC   188233728      32768      3  GPT part - E3C9E316-0B5C-4DB8-817D-F92DF00215AE   188266496   48711647            236978143         32         Sec GPT table   236978175          1         Sec GPT header  $ sudo fdisk /dev/disk0 Disk: /dev/disk0    geometry: 14751/255/63 [236978176 sectors] Signature: 0xAA55          Starting       Ending  #: id  cyl  hd sec -  cyl  hd sec [     start -       size] ------------------------------------------------------------------------  1: EE 1023 254  63 - 1023 254  63 [         1 -  236978175] <Unknown ID>  2: 00    0   0   0 -    0   0   0 [         0 -          0] unused        3: 00    0   0   0 -    0   0   0 [         0 -          0] unused        4: 00    0   0   0 -    0   0   0 [         0 -          0] unused  I think there's about 20-24gb in that lost partition  additional info: - macOS Mojave v10.14.2 - MacBook Pro (Retina, 13-inch, Early 2015)  I'd really like to recover it and join into my main partition (I think is disk0s2)


This question has an accepted answer at        I have a PHP file named as otp.php.  When URL in the URL bar is   http://localhost/college/otp/MTA=/teacher   It should be treated as   http://localhost/college/otp.php?user=MTA=&role=teacher   For this, I created .htaccess file in :  RewriteEngine On    # Turn on the rewriting engine RewriteCond %{HTTP_HOST} localhost  [NC] RewriteRule    (.*otp)\/([A-Za-z0-9-]+=)\/([A-Za-z0-9-]+)  $1.php?user=$2&role=$3  [NC,L]   But, otp.php file says:     Notice: Undefined index: role in C:\wamp\www\college\otp.php on line   11      Notice: Undefined index: user in C:\wamp\www\college\otp.php on line   11       Created question here after  Comment.  Two Different Results:


shorter proof of generalized mediant inequality?


Passing parameters in SQLite in Python/Flask

I have a very dumb issue which I've been absolutely breaking my head over for a while now  ##########CODE 1 (STATIC)############## @app.route('/fromdb', methods=['GET']) def printall():  data = g.db.execute("SELECT TeacherInfo.Name, TeacherInfo.PhoneNo, TeacherInfo.HourlyRate, SubjectTable.SubjectName, SubjectTable.Grade, SubjectTable.Syllabus FROM SubjectTable JOIN TeacherInfo on SubjectTable.TeacherID = TeacherInfo.TeacherID WHERE SubjectName = 'Comp'").fetchall()    print(data)    return jsonify(details=data) ##########END CODE1###################   ##########CODE 2(DYNAMIC)############# @app.route('/fromdb', methods=['GET']) def printall():     x = request.json     p = x['SubjectName']     data = g.db.execute("SELECT TeacherInfo.Name, TeacherInfo.PhoneNo, TeacherInfo.HourlyRate, SubjectTable.SubjectName, SubjectTable.Grade, SubjectTable.Syllabus FROM SubjectTable JOIN TeacherInfo on SubjectTable.TeacherID = TeacherInfo.TeacherID WHERE SubjectName = ?", p).fetchall()    print(data)    return jsonify(details=data) ##########END CODE2###################   In the link above, there are two codes Code 1 works perfectly fine, I'm focusing on the 'WHERE SubjectName = 'Comp'' and WHERE SubjectName = ? here  I hard code the subject name into the query, and I get a JSON object with the results of the query  Now, in code 2, the variable 'p' contains the subject name and I'm able to retrieve it and print it. But the query isn't working, I'm getting a 500 error and I'm not sure how I pass it as a parameter in the query.  Could someone please help me out with this?


I have created a block named 'xyz'. I also created a form whose id is 'form-type-node-form' and i want this form to display in that block. How can i do this? please help me to get solution.


Is it correct that "etc." can not be used together in a sentence with "for example" and "such as"?

I just read an article from a Chinese website for English teaching which mentions  that point. For instance, one can't say:     "I can play quite a few musical instruments, for example, the flute, the guitar, the piano, etc.".    The correct one should be:     "I can play quite a few musical instruments, for example, the flute, the guitar, and the piano."    Is it possible to find any references to prove that?


What to do with the remaining balance in a prepaid debit card?

If I have a $20 MasterCard prepaid debit card, and I use it to buy a $19.99 item, the card will have $0.01 left. What can I do with the remaining balance? Can I transfer it to my bank account? Can I convert it into cash? If so, how?


True or False  $A - C = B - C $ if and only if $A \cup C = B \cup C$   I am in an introduction to proofs class.  I think this is a true statement. I have began the proof and realize I have to do this both directions.  I am stuck on the second part of the proof.  Assume $A - C = B - C$ Let $x \in A$ then $x \in A$ but $x\notin C$ By the assumption $x \in B - C$ then $x \in B$ and $x\notin C$  If $x \in A$ then $x \in A \cup C$.  If $x\in B$ then $x \in B \cup C$. Therefore,  $A \cup C = B\cup C$.   Assume $A \cup C = B \cup C$. Let $x \in A \cup C$. Then $x \in A$ or $x\in C$.  If $x \in A$ then $x \in A - C$  If $x\notin A$ then $x \in C$.   This is where I get stuck... I know I am trying to show $A-C = B-C$ for the second part but I don't know how to get there... Am I on the right track?


Do I need a transit visa in Zurich on the way to Vietnam?

I am Vietnamese and I am flying from Dusseldorf to Vietnam, and I will take the transit in Zurich within 15 hours. I want to go to the Zurich center. Any transit visa or any special documents I should have? I don't have any Schengen visa.


$F(x,y) =x^2 y /x^2+y^2 , (0,0) $. The answer is that F is  not continues at $(0,0)$ because    $\lim (x,y)>(0,0) ~ f(x,y)$ does not exist  $(0,0) \in D_f$   where $D_f$ is the domain of $f$.  I try a method where you let $y=g_1(x)=x$ And $y=g_2(x)=x^2$ which is it to curves that pass the point $(0,0)$ etc  And the limit is equal which means that the function is exist !   And why does point $(0,0)$ belong to $D_f$ ?


I recently upgraded to Ubuntu 20.04. After reboot audio is not working. I tried to reinstall pulseaudio and alsa but still not working:  sudo apt-get install --reinstall alsa-base pulseaudio  sudo alsa force-reload     Still not working.


Story where the protagonist is turned off from an automated system of professional attribution and instant learning

In the story I'm trying to recall, everybody on their thirteenth birthday (?) is assigned by some kind of brain analysis method a profession and given some kind of pill (?) that instantly (?) grants them the required knowledge and skills to start working immediately. Some professions are more sought after than others, especially in view of the olympic (?) games regularly held on a profession-by-profession basis.  The protagonist, however, is turned down from this system and dismissed with some general reason and has to work his way to adulthood the boring old way: studying from books. Eventually he rejects from his status as a "special" student and goes on the run, hiding from the teachers and envying the normal people.      Eventually, it turns out that the protagonist was actually smart enough that being spoonfed premade information was a waste. What he actually was assigned to was advancing the bundles of knowledge themselves, as well as being front line in the technological progress.  "Somebody has to write those textbooks! You can infuse knowledge about how to use today's technology, but you can't do that for tomorrow's - people that get assigned a profession become tied with their assigned technology and are only as relevant as that. If you want more, you must learn how things actually work, and there's no shortcut for that." (not an actual quote, but a specific passage as I remember it.)  The troubles the protagonists underwent were actually planned and necessary for him to acknowledge and accept his role in society.   This story was certainly longer than a couple pages, but it wasn't very long either. If it's a short story, it was probably written by Asimov, but I can't be sure. It rings me of Brave New World given the theme of government-issued population planning, but it certainly doesn't fit with anything else in the actual plot. Any idea?


Isomorphism between $T$ and $O$ - Abstract Algebra

Let $D$ an integer such that it is not a perfect square in   $\mathbb{Z}$.       If $D \equiv 1$ mod $4$, the set $$T:= \{\left( \begin{matrix} a & b  \\ \frac{(D-1)b}{4} & a+b \\ \end{matrix} \right) : a, b \in  \mathbb{Z} \}$$ is a subring of $M_2(\mathbb{Z})$ which is isomorphic   with the ring $$O := \{a+b\frac{1+\sqrt{D}}{2}: a, b \in \mathbb{Z} \}$$   My problem is to find a such isomorphism. However, I find this relation : $$\det \left( \begin{matrix} a & b  \\ \frac{(D-1)b}{4} & a+b \\ \end{matrix} \right)$$ $$= a(a+b)-\frac{b^2(D-1)}{4}$$ $$= (a+b\frac{1+\sqrt{D}}{2})(a+b\frac{1-\sqrt{D}}{2})$$  and $D \equiv 1$ mod $4$ $\iff$ $(\frac{1+\sqrt{D}}{2})(\frac{1-\sqrt{D}}{2}) = -k$ for some $k \in \mathbb{Z}$  Does someone could give me a little hint to help me complete this problem?


There seems to be an inconsistency in my inbox. There has been a message from a user (under the form of a @reply comment) that I can see under the post and in the "responses" tab in my profile, but it is not showing up in my inbox:    It seems the post in question has been quickly deleted, then undeleted (see ), so this is probably what caused the issue.


Firefox is using too much memory and is freezing my machine

I have some 40 machines in our company. They are running Ubuntu 14.04 with 4Gigs of RAM. Very recently I noticed that almost on all machines Firefox browser is using around 1.2 to 1.5 GB of RAM and making my computer freeze. Can someone help me in resolving the issue?


Refugee in France; can I apply for a US tourist visa with a titre de voyage?

I am a refugee in France with a residence permit and a titre de voyage (refugee travel document). I want to visit the United States as a tourist. Will my documents be sufficient to be issued a tourist visa for the USA?


Is java generic code copied at run-time for each type used OR java uses type casting?

I was reading about how monomorphisation works in Rust, does java work in same way.  Lets say I create below file.  public class DummyDTO<T> {     T data;      public T getData() {         return data;     }      public void setData(T data) {         this.data = data;     } }   and use new DummyDTO<Integer>() & new DummyDTO<Float>() will java compiler create two different files for each, Integer and Float or it will Simply replace T with Object and will do casting everywhere?


Prove $u\left( x\right)=W\left( x\right)+W'\left( x\right)+W''\left( x\right)+ \cdots \ge 0.$

Let $W\left( x\right) \ge 0$ for $x \in \mathbb{R}$ be a polynomial.  Prove $$u\left( x\right)=W\left( x\right)+W'\left( x\right)+W''\left( x\right)+ \cdots \ge 0.$$ Is there a simple way?


VLC player cannot open files or directories out of "/home"

I'm using Ubuntu 20.04 with VLC player 3.0.11. The player works well on files and directories within /home (for both /home/myname and /home/test), but cannot open files or directories located in other directories. Some information about my environment: Main output of mount: /dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro) /dev/sda3 on /work type ext4 (rw,relatime) /dev/sda2 on /home type ext4 (rw,relatime)  I try to add the following two lines in /etc/apparmor.d/usr.bin.evince and reload apparmor, but it doesn't work: /work/ r, /work/** rw,  Thank you very much for your help.


apostrophe that goes with a noun which precedes a relative clause

Suppose you wanted to place a possessive apostrophe in this sentence: Billy, who goes to my school, favorite game is tag.  I know it's not standard, but I can hear kids (or older) saying an s sound after "school" to make the possession clear. So I'd like to know if this could be written in the way that it's spoken (albeit not spoken in standard English).  Obviously, the sentence could be reworded, but that's not what I'm after.


Chromatic polynomial of connected graph $ \leq x(x-1)^{n-1}$

Number of proper $x$-coloring, $x \in {1,2,3,4,...}$ of connected graph with $n$ vertices is less than or equal to $x(x-1)^{n-1}$ for $n \geq 1 $.   I think there are two cases that I need to consider  $Case[1]$ If G is connected and has no cycles, then it follows that G is a tree, where chromatic polynomial is just equal to $x(x-1)^{n-1}$  $Case[2]$ If G is connecteded and has some cycles  For second case, I am just not sure how to start proof that chromatic polynomial is less than $x(x-1)^{n-1}$  Also, would it suffice to consider above two cases to prove the claim?


I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values, whereas a normal test only uses a single static value.  I've given him a number of different reasons against this, the main ones being:   random values means the test isn't truly repeatable (which also means that if the test can randomly fail, it can do so on the build server and break the build) if it's a random value and the test fails, we need to a) fix the object and b) force ourselves to test for that value every time, so we know it works, but since it's random we don't know what the value was   Another coworker added:   If I am testing an exception, random values will not ensure that the test ends up in the expected state random data is used for flushing out a system and load testing, not for unit tests   Can anyone else add additional reasons I can give him to get him to stop doing this?  (Or alternately, is this an acceptable method of writing unit tests, and I and my other coworker are wrong?)


Change color of all occurences of particular character in entire document

Is it possible to change color of all the occurrences of a particular character in entire document ?   link provide solution for changing color of a "word" but I am looking for changing color of "a character".  Note : A character can be can be inside a word or separate.


True /False question about Compact sets and continuous functions

I am trying some assignment questions and I am unable to think on how can I solve this problem.  Question: Let K be subset of $\mathbb{R^{n} }$ such that every real valued continuous function on K is bounded. Then is K compact?  I think this statement is true as if it were false then it would be impossible to give a counterexample as it has to be verified for every real valued function ( continuous) . But I have no clue on how can I prove it. Please give hint.


In Sql-Server Based On Id Show multiple Rows in Single Column

Hi i have a table like some "Demo" in that i have two Columns (ID,Name),   I have table:    I want to get table like:    How Can i write sql query for this ?  --TIA


Hyperlink in excel not redirecting to correct page

I have reviewed a similar question that was asked previously on here but couldn't find my answer.    I am hyperlinking to  from a cell in Excel, but it is taking me to  which is a sub page.  I am using Chrome, deleted cache and tried IE and Firefox, but without success.  Can anyone help?


What is the difference between invoking the help using a --help key compared to invoking a "man command"?   When should I choose one over another.


I have an image saved as a pdf file, and I would like to include this image in one of my latex documents. In the preamble of m document, I included \usepackage{pdfpages}; and here is the formatting I used to inser the pdf file:  \begin{figure}[h] \centering  \includepdf{figure_1.pdf} \end{figure}   And this is the error I receive, 'File `pdfpages.sty' not found." What have I done wrong?


Choosing a Composition of n and then choosing a Composition of each of its components

I'm working through Stanley's enumerative combinatorics textbook and am stuck on the following problem:   Fix $ n \in \mathbb{P}$. In how many ways (as a function of n) can one choose a composition $\alpha$ of $n$, and then choose a composition of each part of $\alpha$.  My approach was to use that there are $2^{n-1}$ compositions of $n$, and then the composition is $n=a_1+...+a_k$ so that I can pick $2^{a_i-1}$ compositions for each one, so that I have a total of 2^{2n-(k+1)} compositions.   The only thing is that I have this k inside of my function which is independent of n.   Any ideas on how I can fix this?


How do I interpret the results of the `ls -l` command?

I want to learn about the meaning of values for example first line;  drwxr-xr-x 2 ataka root 4096 2008-11-04 16:58 ataka   is ataka here the owner of directory ?  kioutsovkm@orkide:/users/lnxsrv2/ee$ ls ataka  aydinoglu  izgordu  kioutsovkm  kocaogluo kioutsovkm@orkide:/users/lnxsrv2/ee$ ls -l total 20 drwxr-xr-x 2 ataka     root 4096 2008-11-04 16:58 ataka drwxr-xr-x 2 aydinoglu root 4096 2008-11-04 16:58 aydinoglu drwxr-xr-x 3 izgordu   root 4096 2009-09-29 11:59 izgordu drwxr-xr-x 2 root      root 4096 2008-11-04 16:58 kioutsovkm drwxr-xr-x 4 kocaogluo root 4096 2010-06-10 03:41 kocaogluo kioutsovkm@orkide:/users/lnxsrv2/ee$


Getting a symbol from database is outputting �

This is a very strange problem I have never experienced before.  I perform these following stataments  //Grabs the currency from the bank account $stmt = $db->prepare("SELECT * FROM accounts WHERE account_id = '$accountid'");         $stmt->execute();         $result = $stmt->get_result();         if($result->num_rows > 0) {             while($row = $result->fetch_assoc()) {                 $bankcurrency = $row['currency'];             }         }         $stmt->close();  //Finds the symbol of the speicific currency         $stmt = $db->prepare("SELECT * FROM currencies WHERE currency = ?");         $stmt->bind_param("s", $bankcurrency);         $stmt->execute();         $result = $stmt->get_result();         if($result->num_rows > 0) {             while($row = $result->fetch_assoc()) {                 echo $symbol = $row['symbol'];             }         }         $stmt->close();   The output of the symbol from these statements are � The output should have been $  You would think I have something wrong with my database input, but no, because if I try:  $stmt = $db->prepare("SELECT * FROM currencies WHERE currency = 'USD'");         //$stmt->bind_param("s", $bankcurrency);         $stmt->execute();         $result = $stmt->get_result();         if($result->num_rows > 0) {             while($row = $result->fetch_assoc()) {                 echo $symbol = $row['symbol'];             }         }         $stmt->close();   This then outputs $ This makes no sense as the data and statements are exactly the same.  You don't need to declare strings or variables in PHP which is why it makes no sense to me?  My database structure is simply:  accounts database:  name: currency Type: TEXT Value: USD   currencies database:  name: symbol Type: TEXT Value: $   Of course I have other rows, but these are the affected ones  You could say my database is the problem, but since the second statement works fine out outputs $ that is clearly not the problem.  I can't understand what is wrong  EDIT: If I add in $bankcurrency = 'USD'; it also displays USD as you would expect, so there is a problem with my first statement


An operator has closed range if and only if the image of some closed subspace of finite codimension is closed.

Let $B$ be a Banach space, $H,K$ be closed subspaces and let $K$ be finite dimensional.  Suppose $B = H\oplus K$ and $T:B\to B$ is a bounded linear operator.  How do I show that $T(B)$ is closed $\iff$ $T(H)$ is closed ?


How is the question?sort=frequent/faq search sorted? How can I find frequent questions?

I see this on :    I would like to know how is this sorted actually as the amount of "views" apparently doesn't mean that it's frequent.


What is the electric field in a parallel plate capacitor?

When we find the electric field between the plates of a parallel plate capacitor we assume that the electric field from both plates is $${\bf E}=\frac{\sigma}{2\epsilon_0}\hat{n.}$$ The factor of two in the denominator comes from the fact that there is a surface charge density on both sides of the (very thin) plates. This result can be obtained easily for each plate. Therefore when we put them together the net field between the plates is $${\bf E}=\frac{\sigma}{\epsilon_0}\hat{n}$$ and zero everywhere else. Here, $\sigma$ is the surface charge density on a single side of the plate, or $Q/2A$, since half the charge will be on each side.   But in a real capacitor the plates are conducting, and the surface charge density will change on each plate when the other plate is brought closer to it. That is, in the limit that the two plates get brought closer together, all of the charge of each plate must be on a single side. If we let $d$ denote the distance between the plates, then we must have $$\lim_{d \rightarrow 0}{\bf E}=\frac{2\sigma}{\epsilon_0}\hat{n}$$ which disagrees with the above equation. Where is the mistake in this reasoning?  Or more likely, do our textbook authors commonly assume that we are in this limit, and that this is why the conductor behaves like a perfectly thin charged sheet?


Probability of drawing duplicates of a card in magic

Was trying to figure this out, and realized I don't know the exact math:  In the card game magic you have a deck of 60 cards. You can have 4 copies of any individual card, and you are dealt a starting hand of 7. Each turn, one additional card is drawn.  What are the odds of drawing more than one of a card (2, 3, or 4 of the same card) on turns 1, 2, 3 etc...  If anyone knows how to break this down, I'd love to see the math behind it.  Cheers


How can I resolve duplicate content issue for my 2 pages

Here is scenarios :  URL 1 :   URL 2 :   Some of top topic we are displaying in home page[URL 2] as well and that is necessary for us.  Google consider it as duplicate content. How can I resolve this issue.  I know that it can be resolve by assign rel=canonicalbut which URL from 2 I should declare as canonical?


Dell PE2950 - slow IO rates for writing and reading locally

I'm having a serious issue with dell server PE2950. The server has really slow IO rates, so slow that I'm not able to use it anymore  I tried few things to solve this:     changing disks to new disks (configured them as raid1)   changing perc card + perc cables   reinstalling the OS of course, had to cause of changing of disks, centos 5.5 x64bit   firmware update to everything   virtual disks policy: No Read Ahead,Write Back, disk cache policy disabled.   openmanage doesn't alert about anything, also i ran dell's diag tests, everything passed, also dell didn't see anything in deset log.   dell offered to reseat everything, including the cpu, we did that as well, still io rates are slow     I have several PE2950 servers, and I never had such a thing with any of those. All have similar or exact hardware as this one, all configured the same, with the same os centos 5.5 x64, same disks, same raid, same policy.  Just for comparison:   the problematic PE2950 server:  [root@bad ~]# time sh -c "dd if=/dev/zero of=/tmp/ddfile bs=8k count=200000 && sync"    200000+0 records in   200000+0 records out   1638400000 bytes (1.6 GB) copied, 27.7946 seconds, 58.9 MB/s    real    0m33.968s   user    0m0.531s   sys     0m26.000s   good PE2950 server (with the exact same hardware):  [root@good ~]# time sh -c "dd if=/dev/zero of=/tmp/ddfile bs=8k count=200000 && sync"    200000+0 records in   200000+0 records out   1638400000 bytes (1.6 GB) copied, 3.19999 seconds, 512 MB/s    real    0m7.694s   user    0m0.053s   sys     0m4.057s    Hopefully you will have an idea what can cause the problem.


is based on the presumption that Force Lightning, like regular lightning, is composed of electricity.  I'm not sure about that.  Every written description I've seen of the phenomenon calls it "dark side energy" or something similar. What is Force lightning, exactly?  Is it electricity, or something else?


Is it bad practice to answer with just code and no explanation?  I had someone complain about this once but everyone seems to do it.


rank of the free group: $\mathrm{rank} F_X=|X|$

This question is an extension of .  Let $F_X$ denote the free group on the set $X$. For any group $G$ and subset $S\!\subseteq\!G$, $\langle S\rangle$ denotes the subgroup generated by $S$ and $\mathrm{rank}(G) :=\min\{|S|;\:S\!\subseteq\!G, \langle S\rangle\!=\!G\}$.  PROPOSITION: a) $F_X\cong F_Y\:\Leftrightarrow\:|X|=|Y|$ b) $\mathrm{rank}(F_X)=|X|$  Thus for every cardinal number $c$, there is (up to isomorphism) exactly one free group of rank $c$.  Proof:    a) $(\Leftarrow)$: If $f\!:X\rightarrow Y$ is the bijection, then $\varphi(x_1\ldots x_k):=f(x_1)\ldots f(x_k)$ is the isomorphism.  $(\Rightarrow)$: $F_X\!\cong\!F_Y$ $\Rightarrow$ $\mathrm{Ab} F_X\!\cong\!\mathrm{Ab} F_Y$ $\Rightarrow$ $\oplus_{x\in X}\mathbb{Z}\!\cong\!\oplus_{y\in Y}\mathbb{Z}$, so $|X|\!=\!|Y|$, since rank is known to be an invariant of free modules.   Alternatively, $\big(\oplus_{x\in X}\mathbb{Z}\big)\otimes_\mathbb{Z}\mathbb{Q}$ $\cong$ $\oplus_{x\in X}\big(\mathbb{Z}\otimes_\mathbb{Z}\mathbb{Q}\big)$ $\cong$ $\oplus_{x\in X}\mathbb{Q}$, so $\oplus_{x\in X}\mathbb{Q}$ $\cong$ $\oplus_{y\in Y}\mathbb{Q}$, even as $\mathbb{Q}$-modules, but isomorphic vector spaces are known to have equipollent bases.  b) Since $\langle X\rangle\!=\!F_X$, $\mathrm{rank}(F_X)\leq|X|$. Suppose we have $Y\!\subseteq\!F_X$, $\langle Y\rangle\!=\!F_X$, $|Y|\!<\!|X|$.  QUESTION: how can I finish the proof of b), i.e. prove that $F_X$ can't be generated by a subset with smaller cardinality than $|X|$?


Specific question: Let $F$ be a field and assume that $\mathbb{Q}$ is a proper subfield of $F$. Can $F$ be isomorphic to $\mathbb{Q}$?      Studying the foundaments of field theory I have to ask: Can a field be isomorphic to one of its proper subfields?


If $G$ s.t. $|G|=15$ has only one subgroup of order $3$ and only one of order $5$, then $G$ is cyclic. Generalize to $|G|=pq$, for $p,q$ primes.

Let $G$ be a group where $o(G)=15$. If $G$ has only one subgroup of order $3$ and only one of order $5$, prove that $G$ is cyclic. Generalize to $o(G)=pq$, where $p$ and $q$ are primes.


Definitions and usage of Covariant, Form-invariant & Invariant?

Just wondering about the definitions and usage of these three terms.  To my understanding so far, "covariant" and "form-invariant" are used when referring to physical laws, and these words are synonyms?  "Invariant" on the other hand refers to physical quantities?  Would you ever use "invariant" when talking about a law? I ask as I'm slightly confused over a sentence in my undergrad modern physics textbook:     "In general, Newton's laws must be replaced by Einstein's relativistic laws...which hold for all speeds and are invariant, as are all physical laws, under the Lorentz transformations." [emphasis added]      ~ Serway, Moses & Moyer. Modern Physics, 3rd ed.   Did they just use the wrong word?


I have checked a very basic condition but there is a strange result.  print(sum([0.6, 0.3, 0.1]) == 1.0) // false print(sum([0.6, 0.3, 0.1])) // 0.9999999999999999


"What questions [is/are] your data team hoping to answer?"

Over at stats.stackexchange we are having a minor kerfuffle over whether a title is using incorrect grammar. It has been edited and re-edited several times. It would be great to get some arbitration and a clear explanation.   The original title was "What questions is your data team hoping to answer?" which was edited to "What questions are your data team hoping to answer?", then edited back. See the question .


I need help making sure all necessary drivers are installed and working Help?

I'm setting up a desktop for the first time and having issues with making sure all the drivers for sound and graphics work.  I looked for any troubleshooters and there are none to be found.  I am new to Ubuntu and using 16.04


90s live action TV show about college kids who become fighting robots in a virtual reality

This TV show was somewhat a ripoff of Power Rangers, in that the kids go into giant robots that fight, and those robots can merge together into a giant super-robot. It seemed like a competitor. Like Power Rangers, it was an ordinary cable show, but I don't remember which network.  The kids lived in real life and (I think) went to college, but all their robot fights happened virtually. I don't remember how they make the transition, but I think they get "sucked in" to a laptop.  The villain is a guy with a laptop. Possibly the laptop that the heroes get sucked into, when they fight in virtual reality. I think that, while the heroes were in virtual reality, the villain used his laptop to communicate with them (generally to deliver stereotypical cartoon villain trash talk).  This show commercialized heavily by selling toys that are very similar to Transformers toys.   It ran in the 90s. I believe it was popular for a very brief period of time, after which it basically plummeted into obscurity.


Supersymmetric Localization (Mirror Symmetry)

I'm reading Chapter 9 of . As you can see in eq. (9.30) his model for SUSY is  $$\begin{align} \delta_\epsilon X &=\epsilon^1\psi_1 + \epsilon^2\psi_2\\ \delta\psi_1 &= \epsilon^2\partial h\\ \delta\psi_2 &=-\epsilon^1\partial h.  \end{align}\tag{9.30}$$  I understand that if $\partial h\neq 0$ it is possible to see that partition function vanishes, in particular, there is a total divergence:  $$ \int \mathrm{d}\hat{X}e^{\frac{1}{2}(\partial h(\hat{X}))^2}\frac{\partial^2 h(\hat{X})}{(\partial h(\hat{X}))^2}. \tag{*} $$  The implication that a total divergence yields vanishing integral, it is a bit strange, because, since every function that admit a primitive is a total derivative. What is the meaning of that implication? Then why $(*)$ vanishes? It seems to me that, in general, $$ \int \mathrm{d}(h')\frac{e^{\frac{1}{2}(h')^2}}{(h')^2}\neq 0. $$  Then, again, when he claims that if there is a $x_0$ such that $h'(x_0)=0$ we can use again the argument of the total divergence, why doesn't he keep in account that, removing a small neighborhood of $x_0$, give us some contribution at the border of that neighborhood (two points)?


What exactly happened in between Ragnarok and Infinity War?

At the end of Ragnarok, the ship with the surviving Asgardians is stopped by Thanos.  In the beginning of Infinity War, we see that Thanos has killed a large number of Asgardians in his effort to kill half of the universe's population.  However, in this scene, their ship is destroyed and we only see one Asgardian (Thor) who is spared.  We later learn in Endgame that a number of Asgardians were presumably saved by Valkyrie and brought to Earth. The killings of the Asgardians looked total - we didn't see Thanos sparing half of them in IW.  I remember seeing people assume that Valkyrie saved the half of the Asgardians that Thanos spared, but in retrospect that wouldn't make sense.  How would that have gone - did Thanos just appear and say that he'd kill half of them and he'd give the other half the chance to escape, so Valkyrie left with them?  It definitely doesn't look like things went that smoothly.  Or did Thor and Loki see Thanos coming and convince Valkyrie to escape with whoever she could bring?  Why, then, did Thanos kill all of the Asgardians?  Did he?  What exactly happened in between these two movies?


I'm trying to install the Virtual Box extentions to add USB 2.0 functionality. While I install, a box pops up and asks for the administrative password.  When I enter the password, it tells me it was incorrect and I can't install.  I only have Ubuntu installed on my laptop, and I'm the only user, so the admin password is my password.   Any help, or is this just a bug? I've got 13.04 btw.


Is it legal to add your publications to ResearchGate?

I recently created a profile on . And to add your publications list it requires you to upload the paper. Is it legal to upload published journal articles on public servers, where everyone can download it for free?


Doesn't the Bohr's atomic model violate Maxwell's theory of electromagnetism?

According to Bohr's atomic model, the electrons do not radiate energy when they revolve in the predefined orbits. But according to Maxwell's theory of electromagnetism, an accelerated charge produces electromagnetic waves and loses energy.  In Bohr's atomic model of an atom the electrons are in a circular motion so they are essentially accelerating thus they should lose energy due to the reasons mentioned above and eventually collapse into the nucleus. But it doesn't happen, so isn't it a violation of the EM theory?  Edit: The question is related to consensus of Bohr and Maxwell rather than Rutherford and Bohr.


Showing that projection map on Cartesian products is surjective requires axiom of choice?

I'm studying Halmos' Naive Set Theory. In Section 9, Families, he mentions of the generalized Cartesian products of families of sets, and considers the projection maps as defined below. Let $\{X_i\}_{i\in I}$ be a family and $J\subset I$. Then the map $f:\Pi_{i\in I}X_i\to\Pi_{j\in J}(X|J)_j$ defined by $f(x) = x|J$ for all $x\in \Pi_{i\in I}X_i$. Halmos call this map as projection from $\Pi_{i\in I}X_i$ onto $\Pi_{j\in J}(X|J)_j$ (page 36). This is before the axiom of choice is introduced. However, I think that without AC, we can't conclusively say that $f$ is indeed a surjection (even if $\forall i(X_i\neq\emptyset)$). Am I correct?  For a function $g:Y\to Z$ and for $X\subset Y$, $f|X$ denotes the restriction of $f$ to $X$.


If centrifugal force isn't real then why am I being pushed on a merry go rournd?

I just finished my class on circular acceleration and I learnt that centrifugal force (outward force) is a psuedo force. It doesn't really exist.   Now suppose I am going round in my car or a merry go round or whatever. I feel like a force is pushing me from the center and towards the window of my car which is in the opposite direction from center. Now how this be explained?   I asked this to my teacher but he gave an explanation with inertial reference frame which I didn't really understand.   Pardon my grammatical and spelling mistakes.


Unable to stylize raster data as pseudocolor render type on MAC OSX

In a raster layer's Style Properties, I can choose pseudocolor render type, and choose a color ramp and classify the raster.      However, when I click the 'Apply' button, or click 'OK', the visualization of the raster never changes.  I was able to output a 'colorized' version of the same raster using GRASS plugin.  I also reinstalled QGIS 2.8, and was able to adjust and see a raster stylings using the steps I outlined above.  So, can anyone confirm this as an issue, or confirm that there's a mistake somewhere in my process?  I should note that I'm on a Mac, 10.10.4, and I'm using the QGIS provided by , 2.10.1-1 .  Update 1: Here's a screenshot of the rest of my settings.      I have Grayscale set to off in the Style setting.  Also, I don't believe grayscale/color-blind Preview is available on the Mac version of QGIS.  They're does't appear to be the option where it , in the Menu Bar under View / Preview / Photocopy (grayscale) etc.  Either way-- I added a shapefile to show color.  Update 2: I've experimented with setting color interpolation to discrete, linear, and exact, but still am not able stylize using Singleband pseudocolor.  I've also confirmed that the 'Render' box on the the main map view is checked.  Also, I am able to adjust Color Rendering settings, like Hue, Blending Mode, etc., and see the results when clicking 'Apply' or 'OK'.  Update 3: As other Mac users are confirming this, I think it may be a bug. I've created a bug report at the official .


Will the new Ubuntu Phone support VoIP through the operating system when out of range of the network the user has? This would be a great way to steal market share from Apple which doesn't support VoIP except through complicated apps.


I have currently decided to test my double monitors in the vertical configuration, and I came across a problem that I had never had before:  the input line on my terminal is too far down the screen!  I was wondering if there is a way to make the output scroll downwards, so that the input line stays at the top.  e.g., a normal terminal view looks like this:  PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_req=1 ttl=46 time=28.3 ms 64 bytes from 8.8.8.8: icmp_req=2 ttl=46 time=13.7 ms 64 bytes from 8.8.8.8: icmp_req=3 ttl=46 time=19.1 ms 64 bytes from 8.8.8.8: icmp_req=4 ttl=45 time=20.8 ms 64 bytes from 8.8.8.8: icmp_req=5 ttl=45 time=15.6 ms 64 bytes from 8.8.8.8: icmp_req=6 ttl=46 time=15.3 ms 64 bytes from 8.8.8.8: icmp_req=7 ttl=46 time=15.3 ms 64 bytes from 8.8.8.8: icmp_req=8 ttl=45 time=14.3 ms 64 bytes from 8.8.8.8: icmp_req=9 ttl=45 time=14.3 ms 64 bytes from 8.8.8.8: icmp_req=10 ttl=45 time=15.5 ms 64 bytes from 8.8.8.8: icmp_req=11 ttl=45 time=16.9 ms 64 bytes from 8.8.8.8: icmp_req=12 ttl=45 time=16.3 ms 64 bytes from 8.8.8.8: icmp_req=13 ttl=45 time=20.0 ms ^C --- 8.8.8.8 ping statistics --- 13 packets transmitted, 13 received, 0% packet loss, time 12017ms rtt min/avg/max/mdev = 13.773/17.391/28.343/3.812 ms me@my_computer:~$    and instead I would like to have something like this:  me@my_computer:~$  rtt min/avg/max/mdev = 13.773/17.391/28.343/3.812 ms 13 packets transmitted, 13 received, 0% packet loss, time 12017ms --- 8.8.8.8 ping statistics --- ^C 64 bytes from 8.8.8.8: icmp_req=13 ttl=45 time=20.0 ms 64 bytes from 8.8.8.8: icmp_req=12 ttl=45 time=16.3 ms 64 bytes from 8.8.8.8: icmp_req=11 ttl=45 time=16.9 ms 64 bytes from 8.8.8.8: icmp_req=10 ttl=45 time=15.5 ms 64 bytes from 8.8.8.8: icmp_req=9 ttl=45 time=14.3 ms 64 bytes from 8.8.8.8: icmp_req=8 ttl=45 time=14.3 ms 64 bytes from 8.8.8.8: icmp_req=7 ttl=46 time=15.3 ms 64 bytes from 8.8.8.8: icmp_req=6 ttl=46 time=15.3 ms 64 bytes from 8.8.8.8: icmp_req=5 ttl=45 time=15.6 ms 64 bytes from 8.8.8.8: icmp_req=4 ttl=45 time=20.8 ms 64 bytes from 8.8.8.8: icmp_req=3 ttl=46 time=19.1 ms 64 bytes from 8.8.8.8: icmp_req=2 ttl=46 time=13.7 ms 64 bytes from 8.8.8.8: icmp_req=1 ttl=46 time=28.3 ms PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.   I could not find any such documentation or question on the forums. If anyone has an idea, please let me know! (also if you think it's not possible)  Thanks!  PS: I'm using Ubuntu 12.04


java.lang.RuntimeException: Unable to start activity ComponentInfo and Caused by: java.lang.NullPointerException: Attempt to invoke virtual method

There is one project on github:  I downloaded this project and launched it into Android Studio, but it did not work. I'm not a java programmer and I can not understand what the error Android Studio gives is related to:  E/AndroidRuntime: FATAL EXCEPTION: main               Process: ru.adonixis.lightbox, PID: 21749               java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.adonixis.lightbox/ru.adonixis.lightbox.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStreamWriter.write(java.lang.String)' on a null object reference                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)                   at android.app.ActivityThread.-wrap12(ActivityThread.java)                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)                   at android.os.Handler.dispatchMessage(Handler.java:102)                   at android.os.Looper.loop(Looper.java:154)                   at android.app.ActivityThread.main(ActivityThread.java:6119)                   at java.lang.reflect.Method.invoke(Native Method)                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)                Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStreamWriter.write(java.lang.String)' on a null object reference                   at ru.adonixis.lightbox.MainActivity.onCreate(MainActivity.java:230)                   at android.app.Activity.performCreate(Activity.java:6679)                   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)                    at android.app.ActivityThread.-wrap12(ActivityThread.java)                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)                    at android.os.Handler.dispatchMessage(Handler.java:102)                    at android.os.Looper.loop(Looper.java:154)                    at android.app.ActivityThread.main(ActivityThread.java:6119)                    at java.lang.reflect.Method.invoke(Native Method)                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)    What does this error pertain to and how it could be eliminated?


how can I reinstall ubuntu while using it by formating whole hard disk?

I want to reinstall the Ubuntu and install it again by formating my whole hard drive please help


when given p=5, q=19, e=5 solution:-      n=5*19      =95     φ (n)=4*18          =72  de=1 modφ (n) d(5)=mod(72) using euclidean algorithm  72=14(5)+2 5=2(2)+1  back substituition  1=5-2(2) 1=5-2[72-14(5)] 1=15(5)-2(72)  now what how to calculate the value of 'd'


Why time is attached with space and how apple fall according to Einstein?

As per Einstein space is flexible it means it can be curved with mass but I am not able to visualize the relationship between space and time (space-time continuum). According to Newton Apple falls because earth pulls the apple towards it and it is easy to visualize but As per Einstein Apple remains at that place but time passes so it appears to be falling(how can I visualize the same)?


I accidentally deleted the theme presets in user preferences and I would like to be able to restore them. How can I do this?


Write/retrieve special characters ⓄⒼקร to Database

I have a form that needs to accept special font characters and write them to the database table. I believe the encoding is set correctly at the page/form level but when the field is written to the database the characters get changed to some other encoding. Other SO answers seem to indicate setting encoding to UTF-8 is the answer, which i've done.  Now, if I copy paste the characters below, direct to the database table, it holds them just fine as shown. Its only when I write it to the table from the form or when i retrieve it for display in web page.  Example characters:   ⓄⒼקร  The web page is set as: <meta charset="utf-8">  The form tag includes attribute: accept-charset="UTF-8"  Php just before the INSERT has: $_POST['tag']=utf8_encode($_POST['tag']);  I have not had to write/encode those types of font/special characters before, so what am i doing wrong here?


Consider:  All cases involving children are treated as urgent. The man was described as tall and dark, and aged about 20.  How "as" can collocate with adjectives here? If I omitted "as" or replaced "as" with "to be", would these two examples still be correct and acceptable?


What does an Input layer of shape=(None,) or (None,12) actually mean?

Is this telling the model that there are two dimensions (i.e. it’s a matrix) but we don’t yet know the size of that particular dimension? If so, how can the model be compiled? Doesn’t the size of each dimension affect the number of nodes in middle layers?


Proving that two real functions are equal

Let $f : \mathbb{R} \to \mathbb{R}$ and $g : \mathbb{R} \to \mathbb{R}$ be continuous functions. Suppose that $D ⊆ \mathbb{R}$,   and that $D$ is dense in $\mathbb{R}$. Suppose that $f(x) = g(x)$ for every $x ∈ D$. Prove that   $f(x) = g(x)$ for every $x ∈ \mathbb{R}$.   Any tips for where I can start here?  I'm pulling up blanks for this.  EDIT: there is a very similar question asked, but I have no idea what a metric space is so the whole thing didn't mean a ton to me unfortunately.


Invalid command 'SSLEngine' when updating virtualservers

I added a virtualserver to my apache config file so I can use SSL on my site like this:  <VirtualHost *:443>  DocumentRoot "/var/www/html/site"  ServerName mysite.net  SSLEngine on  SSLCertificateFile /etc/webmin/letsencrypt-cert.pem  SSLCertificateKeyFile /etc/webmin/letsencrypt-key.pem  SSLCertificateChainFile /etc/webmin/letsencrypt-ca.pem </VirtualHost>   but as I restart Apache I get this error:  Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration  I consulted similar topics on this site and I installed mod_ssl but no use. The topics are like 8 years old now so maybe something has changed. What am I missing?  Thank you.


New to coding and struggling to understand this exercise

Here is the exercise: Create a class called SortingTest. In it, create a method that accepts an array of int values as a parameter, and prints out the elements sorted (smallest element first) to the terminal.  Part of this questions is also taking about using HashSets which are supposed to be used. How??   Here is what I have got so far  import java.util.Arrays; import java.util.HashSet;  public class SortingTest {    public void sortArrays(int numbers[]) {     Arrays.sort(numbers);     System.out.println(numbers);    } }   I think I am just not understanding the concept of what it is asking me to do.


How can i change a bolt head to pan type?

On the left it's my bolt options/properties and the bolt it self. On the right it's what i need to have the option Pan to change the bolt head to Pan. But i don't have this options.   The bolt is after enabled the add-on Mesh BoltFactory.


How to disallow one domain path in robots.txt without any modules?

How to disallow one domain path in robots.txt? (there is a module which allows to do that but it is better to avoid it because of performance issues) For example, onedomain.com/path1/* must be disallowed. Is it right to type like this in robots.txt (there is another domain twodomain.com for the same website):  Disallow: onedomain.com/path1/*  Twodomain path must be allowed to be crawled and Onedomain path must be disallowed to be crawled (both of them are pointing to the same path).


Shillelagh and Polearm Master Interaction

Shillelagh imbues a quarterstaff with magic for a minute. This allows a caster to attack with the quarterstaff using his casting ability.  Polearm Master allows a player who attacks with a quarterstaff to get a second attack with the haft as bonus action.   Can I use my casting ability for the quarterstaff haft bonus attack?  I think so, but I am not sure. A good answer should include rule text and discussion to show why this is possible or why not.


Power analyses of 5 populations of infection data (binomial data)

I am PhD Biologist. I have 5 populations of infected moth larvae (3 inbred, and 2 outbred). The infection in this case is spread vertically (from mother or father to offspring). Normally the virus is spread horizontally.  Analyses through GLM, GLMMs and (arcsine transformed) LMMs reveals that there is no significant difference between these populations. (Note: as block and day larvae were analysed for infection through PCR where ordered events, it could be argued that they are fixed or random effect hence GLM and GLMM analysis. Arcsine tranfomed LMMs are occasionally used for proportional data when events or very rare or very common.)   I suspect that the generally low infection rate may mean that although the number of larval hosts is high, the number of infected hosts is low, leading to a small sample size. Hence the non-significant result. Would it be the case that if the experiment were repeated, an unfeasably large sample size would be needed to show any difference between the populations? Therefore, would looking at a similar moth virus, with a greater rate of vertical transmission be a better idea, than pursuing it in this system?  I want to do a power analyses of the to verify this, for the write up. I understand that power analyses is done in the planning of experiments. Could it give you an idea of whether an unfeasably large sample size is needed to show an effect?  I have had no experience of doing this, so if anybody could point me to books or webpages that could help I would be grateful.   The data is available under the name fulldata .


A few questions about infinite derivative.

I've been having a few questions about infinite derivative for a long time now. I think to answer these questions involves dealing with properties of limit, hope someone can help. Thanks!  1). Does writing the derivative of a function as a function lose information? For example, the function $y = x^{1/3}$ has a derivative that evaluates to infinite at $x = 0$. But its derivative is undefined at the point, we only know it $\lim_{x\to0} y$ is infinite.   2). I know that most calculus textbooks consider having an infinite derivative to be not differentiable at that point, which means we are not allowed to apply chain rule and product rule. However, am I guaranteed to get a wrong answer if I apply them to cases where derivatives are infinite, or are there cases where it is still legal to do so(by the nature of dealing with infinite limits)?  3). The slope at $t = c$ on a curve defined by parametric equations $y = f(t)$ and $x = g(t)$ is $dy/dx = (dy/dt)/(dx/dt)$. When both $dy/dt$ and $dx/dt$ equals $0$ at $t = c$, the textbook applies l'Hospital's rule to find $\lim_{t\to c} dy/dx$ and thereby determines the slope at $t = c$. But why should we turn to find the limit of the derivative as $t\to c$ instead of the derivative itself at $t = c$?


Today I went over to my grandma because she had some problems with her computer, running Xubuntu 12.04LTS. After fixing 'the problem' (Firefox was set fullscreen..) I ran the usual apt-get update && apt-get dist-upgrade to immediately update everything. Instead I was greeted by an error that some packages where not correctly installed. So I ran dpkg --configure -a. My guess is that, because Firefox was fullscreen, she couldn't figure out how to turn of her computer and had simply turned it of, probably at the exact moment when it was installing automatic security updates. Running dpkg --configure -a however only left me with an error message about unmet dependencies for linux-generic. When running apt-get dist-upgrade again, it told me the same and I should try the -f option. However, even while trying to force the upgrade it still wont install them.  This is the output from the commands (added LANG=C because default language is Dutch).  jeroen@Bomma:/home/bomma$ LANG=C sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  linux-generic : Depends: linux-image-generic (= 3.2.0.37.45) but 3.2.0.38.46 is installed                  Depends: linux-headers-generic (= 3.2.0.37.45) but 3.2.0.38.46 is installed E: Unmet dependencies. Try using -f.   Running it with -f:  jeroen@Bomma:/home/bomma$ LANG=C sudo apt-get -f dist-upgrade  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done Calculating upgrade... Done The following packages will be upgraded:   linux-generic 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0 B/1.722 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]?   dpkg: dependency problems prevent configuration of linux-generic:  linux-generic depends on linux-image-generic (= 3.2.0.37.45); however:   Version of linux-image-generic on system is 3.2.0.38.46.  linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however:   Version of linux-headers-generic on system is 3.2.0.38.46. dpkg: error processing linux-generic (--configure):  dependency problems - leaving unconfigured No apport report written because MaxReports is reached already     Errors were encountered while processing:  linux-generic E: Sub-process /usr/bin/dpkg returned an error code (1)   I'm out of ideas on how to solve this (other than quickly reinstalling her pretty default xubuntu)? Trying to remove and reinstall the linux-generic package seems rather risky, but maybe that would solve it?


I am trying to change the permissions for a folder outside my home directory in Ubuntu 14.04. by mistake I run the command "sudo chmod -R -777 /" in the terminal and my system crashes. Nothing is appearing on the screen. I have restarted it several times by but always a purple blank screen appears.  What can I do to recover from this. It contains lot of data related to my project.please help me.


Why does `journalctl --list-boots` only show the current boot?

My kernel update crashed this morning and I had to boot to an older kernel. I wanted to see the journal log for the crashed boot so used:  journalctl --list-boots 0 336aa03f15d3443d95e079ad17b6dc77 Fri 2018-02-02 05:49:03 MST—Fri 2018-02-02 17:57:50 MST   It's only showing the current reboot on the older kernel not the kernel update(s) that crashed a few times 10 minutes before.  How can I get persistence across reboots to view previous boot journals?


How to compare (probability) predictive ability of models developed from logistic regression?

I know some well-known measures are $c$ statistic, Kolmogorov-Smirnov $D$ statistic. However, as far as I know, those statistics take into account only of the rank order of the observations, and is invariant under changing the intercept of the logistic regression model (e.g. in oversampling-correction exercise).  In my current application, I need to depend on the accuracy of the logistic regression to predict probability of event. I know only of qualitative way of assessing models for probability prediction ability, namely by plotting "QQ-plot" of the actual vs predicted probability of event:   Score the validation dataset using the developed model. Rank the observations according to the predicted probability and group into $n$ buckets according to their rank of predicted probability. (First 1/n would go to the first bucket, next 1/n would go to the next ...) Calculate the average predicted and actual probability of Event for each bucket. Create a scatter plot of Predicted vs Actual - one point for each bucket.   I am wondering:   Is the "Q-Q plot" I mentioned above a legitimate way to assess predictive performance of models developed from logistic regression? If so, where may I find more reference for that? Is there any known quantitative way to assess the probability prediction ability of this kind of model?


I am preparing a simple program that is supposed to take a file and then check for instances of certain characters ( spaces, some sentence delimiters and so on ).   In the code below, I have the file open. I was able to get delimiters working by using strtok, but then I was not able to count them properly. It didn't work well when I tried using it for counting other things ( syllables, spaces ). In other words, not good for what I am trying to do ( unless there is a way ).  I am stuck. I know I have to use getline() to parse the file, but I can't seem to make it happen. I just a need push in the right direction.  #include <iostream> #include <cstring> #include <fstream>  using namespace std;  int main(int argc, char* argv[]) {     int space_count = 0;     int sentence_count = 0;     int word_count = 0;     int syllable_count = 0;     int enter_count = 0;     string syll = "aeiou";      char delim[] = " ";     char* token;     char const* const fileName = argv[1];      // check we have at least 2 command line     // arguments     // that argv[1] is valid     if (2 > argc) {         cout << "Correct usage <file> path>" << endl;         return 0;     }      ifstream infile;     const int INPUT_SIZE = 10000;     char input[INPUT_SIZE];      infile.open(argv[1]);     if (!infile.is_open()) {         cout << "could not open file!" << endl;         return 0;     }      while (infile.getline(input, INPUT_SIZE)) {         // check input to see if it matches given char or a string         //         //    if (input[INPUT_SIZE] = 'a'){         space_count++;     }      // word count by using spaces set in delim     token = strtok(input, delim);     cout << token << endl;      word_count++;      // file print     while ((token = strtok(NULL, delim)) != NULL) {         cout << token << endl;         word_count++;     } }  cout << word_count << endl;  return 0; }


WinRE password reset, or a similar method?

As it happens, I lost the password to my admin account on win7. It was the only admin account on the machine, so logging in with another account isn't an option.  Now, normally this would't be an issue: I'll either use a livecd or the sethc backdoor. Having no livecd at hand (just when I need it), I go into the recovery option on boot, and discover there is a password set. Ugh.  As there is no accessible admin account, I can't even remove it through the registry. Is there another way to get an elevated console like through WinRE, or remove the WinRE password requirement?


Are there any sites that let me book 7 or more multi-city flights?

I have a project that is requiring me to travel to seven different locations and I need to find a travel site that will allow me to book more than six multi-flights in order to accommodate for this need. does anyone know of any sites that will allow me to do this?


Strong Induction Proof: Fibonacci number even if and only if 3 divides index

The Fibonacci sequence is defined recursively by $F_1 = 1, F_2 = 1, \; \& \; F_n = F_{n−1} + F_{n−2} \; \text{ for } n ≥ 3.$ Prove that $2 \mid F_n \iff 3 \mid n.$   Proof by Strong Induction : $\bbox[5px,border:1px solid green]{\color{green}{n = 1 }}$ $2 \mid F_1$ is false. Also, $3 \mid 1$ is false. The implication [False $\iff$ False] is vacuously true.  $\bbox[5px,border:1px solid green]{\color{green}{\text{Induction Hypothesis}}}$ Assume that $2 \mid F_i \iff 3 \mid n$ for every integer $i$ with $1 ≤ i ≤ k$.  $\bbox[5px,border:1px solid green]{\color{green}{k + 1 \text{th Case}}} \;$  To prove:  $\quad 2 \mid F_{k + 1} \iff 3 \mid k + 1.$   $\bbox[5px,border:1px solid green]{\color{green}{n = k + 1 = 2}} \;$ $2 \mid F_2$ is false. Also, $3 \mid 2$ is false. So [False $\iff$ False] is vacuously true.  Hence assume that $k + 1 ≥ 3.$ We now consider three cases:  $\bbox[5px,border:1px solid green]{\color{green}{\text{Case 1: } k + 1 = 3q}}$ Thus $3 \require{cancel}\cancel{\mid} k$ and $3 \require{cancel}\cancel{\mid} (k − 1)$. By the ind hyp, $3 \require{cancel}\cancel{\mid} k    \iff F_k$ odd & $3 \require{cancel}\cancel{\mid} (k − 1) \iff F_{k - 1}$ odd. Since $F_{k+1} = F_k + F_{k−1}$, thus $F_{k+1}$ = odd + odd = even.  $\bbox[5px,border:1px solid green]{\color{green}{\text{Case 2: } k + 1 = 3q + 1}}$  Thus $3 | k$ and $3 \require{cancel}\cancel{\mid} (k − 1).$ By the ind hyp, $3 | k \iff F_k$ even & $3 \require{cancel}\cancel{\mid} (k − 1) \iff F_{k - 1}$ odd. Thus $F_{k+1}$ odd.  $\bbox[5px,border:1px solid green]{\color{green}{{\text{Case 3: }} k + 1 = 3q + 2}}$ Thus $3 \require{cancel}\cancel{\mid} k$ and $3 | (k −1).$ By the ind hyp, $3 \require{cancel}\cancel{\mid} k \iff F_k$ odd and $3 \mid (k − 1) \iff F_{k - 1}$ even. Thus $F_{k+1}$ odd. $\blacksquare$  $\Large{1.}$ Does the proof clinch the $(\Leftarrow)$ of the $(k + 1)$th case?   $\Large{2.}$ Since the recursion contains $n, n - 1, n - 2$, thus the recursion "time lag" is $3$ here. So shouldn't $3$ base cases be checked?   $\Large{3.}$ Further to #2, shouldn't "assume $k + 1 \geq \cancel{3} 4$" instead?   $\Large{4.}$ Shouldn't the $n = k + 1 = 2$ case precede the induction hypothesis?  I referenced . Source: Exercise 6.35, P152 of Mathematical Proofs, 2nd ed. by Chartrand et al    Supplement to peterwhy's Answer:  $\Large{1.1.}$ I wrongly believed that all 3 Cases proved the $\Leftarrow$. I now see that Case 1 is $\Leftarrow$ via a Direct Proof. Cases 2 and 3 are $\Rightarrow$ via a Proof by Contraposition. Nonetheless, how would one foreknow/prevision to start from $3 \mid n$  for both directions of the proof?


I need to prove Lagrange Identity for complex case, i.e. $$ \left( \sum_{i=1}^n|a_i|^2 \right)\left( \sum_{i=1}^n |b_i|^2 \right)-\left| \sum_{i=1}^na_ib_i \right|^2=\sum_{1\leq i<j\leq n}|\bar{a}_ib_j-\bar{a}_jb_i|^2 $$ The proof should use summation directly and without something like vectors or induction.


I've noticed that there's been far lower costs for flights that include stops in Istanbul. I assume its because of the bombing recently.  I want to fly from Australia to Albania. Many of the flights include Istanbul as a flight stop. Is it safe to stop there?


Is it possible to add multiple enchantments in one try?

I'm making a mini game (bomb squad) and the armor needs to be enchanted. I know that armor can be enchanted through command blocks and that is what I intend to do. I am wondering if it is possible to enchant armor twice in one command block or should I need multiple command blocks as I have done in the past?


New to pointers, what's the difference between these?

Both of these functions rewrites the original value right? Is there any benefit to doing it one way over the other?  #include <iostream> using namespace std;  void passptr(int *p) {     *p = 7; }  void passaddy(int &a) {     a = 7; }  int main() {     int a = 5;     int *p = &a;      passptr(p);     cout << a << endl;      a = 5;     passaddy(a);     cout << a << endl;      return 0; }


There is a sentence:     No sooner had he sat down than he fell asleep.   I just do not understand, is this an inversion? And if so, I still do not understand the sentence.


Is there a hotkey to move the 3D Cursor back to X=0 Y=0 Z=0?


Variation of the metric with respect to the metric

For a variation of the metric $g^{\mu\nu}$ with respect to $g^{\alpha\beta}$ you might expect the result (at least I did):  \begin{equation} \frac{\delta g^{\mu\nu}}{\delta g^{\alpha\beta}}= \delta^\mu_\alpha\delta^\nu_\beta. \end{equation}  but then to preserve the fact that $g^{\mu\nu}$ is symmetric under interchange of $\mu$ and $\nu$ we should probably symmetrise the right hand side like this:  \begin{equation}\frac{\delta g^{\mu\nu}}{\delta g^{\alpha\beta}}= \delta^\mu_\alpha\delta^\nu_\beta + \delta^\mu_\beta\delta^\nu_\alpha.\end{equation}  Is this reasonable/correct? If not, why not?  It seems that I can derive some weird results if this is right (or maybe I'm just making other mistakes).


Sum of square $i^2+j^2 = x^2+1$ with $\gcd(i, j) = 1$

I would like to solve the equation : $$i^2+j^2 = x^2+1$$ for $x, i, j \in \mathbb{N}$ and $\gcd(i, j)=1$  It's obvious that $(i, j, x) = (x, 1, x)$ and $(i, j, x) = (1, x, x)$ are solution yet are there other solutions ?  Is it possible to list them ?


Assign result of DateTime.TryParse or null

I'm not sure why I cannot perform such a action  my logic behind this:  if parsing of string to datetime failed then assign null, otherwise outed value  using System;  public class Program {        public class Test     {         public DateTime? Date { get; set; }     }      public static void Main()     {         var test = new Test         {             Date = DateTime.TryParse("string", out var dt) ? dt : null         };     } }      Type of conditional expression cannot be determined because there is no implicit conversion between null and DateTime   But my type is DateTime?, so what's wrong?


Normality test with p-value equal to zero

I have an array dataset of about 650.000 points. I want to test if the dataset follow a normal distribution or any other distribution. The first thing I did was to split the data in groups, find the frequency of each one and then create a simple chart. Here is the result:  LogY axis:   Normal axis:   Then, I tried to apply a statistic package in Python for Hypothesis null.  The first one:  with result (26576.286833062259, 0.0)  The second one:  with result (1.0, 0.0)  Both of them have p-value equal to zero which means that the data doesn't follow a normal distribution. Do you think that that this is valid or am I doing something wrong?  I tried it also with all the different distributions from this  and here is the results:  anglit (1.0, 0.0) arcsine (1.0, 0.0) cauchy (0.97256179317853242, 0.0) cosine (1.0, 0.0) expon (0.99998329829920973, 0.0) gilbrat (0.99251782771674257, 0.0) gumbel_r (0.99998329843868239, 0.0) gumbel_l (1.0, 0.0) halfcauchy (0.94812454120633505, 0.0) halflogistic (0.99996659715630376, 0.0) halfnorm (1.0, 0.0) hypsecant (0.9999893673670458, 0.0) kstwobign (1.0, 0.0) laplace (0.99999164914960492, 0.0) logistic (0.99998329857815205, 0.0) maxwell (1.0, 0.0) norm (1.0, 0.0) rayleigh (1.0, 0.0) semicircular (1.0, 0.0) uniform (1.0, 0.0) wald (0.99981187008374384, 0.0)


How to set auto-replies for certain days in Microsoft Outlook?

I have a lazy colleague who always forgets to put her Out of Office on two days during the week when she is not at work. My question is, Is there a way in Microsoft Outlook via VB or a rule to send the auto replies on on certain days during the week?  For example person A is not in Tuesday, therefore a script triggers and the OOF is activated.  Is this possible?


My old modem was malfunctioning and I had to get a new one. However, now my girls can't join each other's games in Minecraft PE. Their iPods are both connected to the new wifi and they can sync apps. It is only in Minecraft PE that they get the message "Server Outdated" or "Outdated Client". They spent a lot of time creating some of these worlds and are pretty devastated that they can't join together. Any ideas?


This was one of my exam questions, I wanted to know what does it represent?  The question was:  What is the equivalent of running chmod 789 a.txt?   chmod u=rw,g+w,o-x a.txt chmod a=rwx,u+s a.txt chmod u=rwx,g=rwx,o=rx a.txt other


Define specific internet routing with Network Manager

I have a wireless internet that goes out to the Internet, but I have Ethernet set up for a private internal non-Internet-facing network.  When I connect my Ethernet on this private static configuration, I lose Internet access as it tries to use Ethernet as the route.  Is there a way to manually specify that the default route for internet traffic should be via the wifi instead of via the ethernet?  NOTE: This is on a Laptop - it uses MULTIPLE Wireless networks with DIFFERENT IPs/Gateways.  Setting the default gateway by hand on the command line is not feasible for this setup.  It is also unfeasible because I sometimes VPN my data over my home VPN connection when off-site.


Meaning of "t=canonical" in Firefox URL after search?

When I enter a search term in the firefox address bar, I noticed that "t=canonical" is always inserted in the URL where the search results are displayed. What exactly does this do? Does it have any implications for my privacy?  Note: In debian 9, I get 't=ffab' in the search url instead.


How do I call shell commands from inside of a Ruby program? How do I then get output from these commands back into Ruby?


Why is there a NullPointerException in this function call?

public class Bar {   private Foo m_foo;   private int getNumbers(){    m_foo=new Foo();    return 5;  }    public void test1(){    m_foo.print(getNumbers());  } }  public class Foo {   public void print(int x){    System.out.println(x);  } }  public class Main {   public static void main(String args[]){   new Bar().test1();  } }   The NullPointerException occurs in test1()call, but I can't understand the reason behind. Isn't the m_foo supposed to be instantiated in the getNumbers() which should get evaluated first?


How to change a singleplayer world into a multiplayer world

I really want to know how to make a singleplayer world turn into a multiplayer world. I need to know the things needed to make it change. I found a YouTube videos about it but it didn't make much sense.


What is correct here?   it could pay your mortgage and car payments it could pay your mortgage and car payment   The monthly payments are separate and distinct so #1 sounds right, but in #2, mortgage and car modify payment, a single payment—a single mortgage payment, and a single car payment. Instead of saying 'your mortgage payment and car payment' the sentence just leaves out one 'payment'.   If 'or' was used, then payment, singular, would be correct:   it could pay your mortgage or car payment


Should questions removed automatically for inactivity really be non-undeletable?

The question  is about a question that was deleted due to inactivity. There was discussion in the comments about community members casting undelete votes, and the post in question was finally undeleted (and remains so today).  Something appears to have changed though. I recently stumbled upon a different question that was also deleted by Community for inactivity, , and my initial reaction upon seeing it was to cast an undelete vote. But, since Community is a moderator, it said "A moderator has deleted this post and it cannot be undeleted".  So it seems like Community-deleted posts used to be undeletable, but no longer are. Was this an intentional change? It seems to me that since Community isn't a real moderator and inactivity is an imperfect hueristic for questions that should be deleted, then if someone cares enough to want to undelete one of these question that they ought to be able to try to get it undeleted. I've classified this as "bug", assuming this was the unintentional side-effect of another change, but I don't know, it might be considered "feature request".    Note: This quesiton was inspired by another question I just asked:


Regular Expression To Validate Email Address

I'm trying to create a regular expression to check to see if a valid email address has been entered.  There is something wrong with my regular expression.  Here is the source code I'm using:   if (!Pattern.matches("^[\\w-\\+]+(\\.[\\w]+)*@[\\w-]+(\\.[\\w]+)*(\\.[a-z]{2,})$", s)) {                     et.setError("Enter a valid Email Address"); }   What am I doing wrong?


Proper usage of a global variable in Python

I'm working on a simple password generating script and i'm essentially trying to use a global string variable called password but i'm unsure if i'm using it properly because i'm getting this error:     File "C:\Users\bkrause080\Desktop\Free Time Projects\LearningPythonProjects\passwordGenerator.py", line 34, in <module>     if __name__ == "__main__": main()   File "C:\Users\bkrause080\Desktop\Free Time Projects\LearningPythonProjects\passwordGenerator.py", line 32, in main     print "Your strong password is: ", strong(lowercase, uppercase, numbers, specials)   File "C:\Users\bkrause080\Desktop\Free Time Projects\LearningPythonProjects\passwordGenerator.py", line 22, in strong     password += random.choice(lowercase).rstrip('\n') + random.choice(uppercase).rstrip('\n') + random.choice(numbers).rstrip('\n') + random.choice(specials).rstrip('\n') UnboundLocalError: local variable 'password' referenced before assignment   Here is my source code:  import random  lowercase = ['a', 'b', 'c', 'd','e', 'f', 'g', 'h', 'i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] uppercase = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] numbers = ['1','2','3','4','5','6','7','8','9','0'] specials = ['~','!','@','#','$','%','%', '^', '&','&','*','(',')','?','<','>','[',']'] password = ""  def weak():     with open("EnglishWords.txt", "r") as f:         weakWords = f.readlines()     password = random.choice(weakWords).rstrip('\n') + random.choice(weakWords).rstrip('\n')     return password  def medium(lowercase, numbers):     for i in range(0,4):         password += random.choice(lowercase).rstrip('\n') + random.choice(numbers).rstrip('\n')     return password  def strong(lowercase, uppercase, numbers, specials):     for j in range(0,3):         password += random.choice(lowercase).rstrip('\n') + random.choice(uppercase).rstrip('\n') + random.choice(numbers).rstrip('\n') + random.choice(specials).rstrip('\n')     return password  def main():     passStrength = raw_input("What strength password would you like? (weak/medium/strong): ")     if passStrength == 'weak':         print "Your weak password is: \n", weak()     elif passStrength == 'medium':         print "Your medium password is: ", medium(lowercase, numbers)     elif passStrength == 'strong':         print "Your strong password is: ", strong(lowercase, uppercase, numbers, specials)  if __name__ == "__main__": main()   I'm very new to python and only really have experience in java and C so any info would be very appreciated!


How to know attributes vs methods in Python object?

How do you know attributes vs methods in Python object?  When using the dir method it only list everything for example dir('string').


For some reason i can not understand,a TypeError occures when using min and max functions..  Here is the code: import random from typing import List, Any, Union  list1 = []  for i in range(0,200):     x = random.randint(1,50)     list1.append(x)  list2 = [ j for j in range(0,51)]  list1.append(list2) print(list1)  del list1[99:130]  print(len(list1))  print(min(list1))   And this is the error:TypeError: '<' not supported between instances of 'list' and 'int'  Thank you :)


I've created the following table:  \begin{table}[htb] \centering \begin{tabular}{cc|c|c|c|c|} \cline{3-6} &                                          & \cellcolor[HTML]{3166FF}{\color[HTML]{FFFFFF} Col1 }  & \cellcolor[HTML]{3166FF}{\color[HTML]{FFFFFF} Col2 }  & \cellcolor[HTML]{3166FF}{\color[HTML]{FFFFFF} Col3 }  & \cellcolor[HTML]{3166FF}{\color[HTML]{FFFFFF} Col4 }  \\ \hline \rowcolor[HTML]{FFFFFF}  \multicolumn{1}{|c|} {\cellcolor[HTML]{3166FF}{\color[HTML]{FFFFFF} }}                        & sub-row-1                    & -                                                        & -                                                         & -                                                      & -                                                               \\ \cline{2-6}  \rowcolor[HTML]{CEE3FF}  \multicolumn{1}{|c|} {\multirow{-2}{*}{\cellcolor[HTML]{3166FF} {\color[HTML]{FFFFFF} row-1}}}  &  {\color[HTML]{000000} sub-row-2} &  {\color[HTML]{000000} -}                                &  {\color[HTML]{000000} -}                                 &  {\color[HTML]{000000} -}                              &  {\color[HTML]{000000} -}                                        \\ \hline  \end{tabular} \caption{} \label{} \end{table}  As you can see from the picture below, when I compile the document in PDF, in the cell "row-1" there is a white row due to the merge of two cells.  How can i remove this line? The command that I'm using to compile the document is: pdflatex <document_name>  Thank you in advance


Is there any way to produce doc/docx files from LaTeX?


What is the shortcut key for Run to cursor in Visual Studio 2008?


How to create a label combining different font sizes or types?

I would like to place the elevation-number of a point in a different front size and centred under its name:    Is that possible?  (That is my actual labeling: label || '\n' || elevation)


Science fiction short story about God being an Artist and erasing his work

The part I remember is where the man is driving and rolls down his car window and everything outside his car is grey. It's like a fog, but inside the car things look normal through the windows. God is the artist and he's erasing his work, this guy is supposed to be saved by being in his car with the windows up.


iPhone can send iMessages without a SIM card?

I gave my old iPhone 3GS (iOS 5.0) to a friend, and after removing the SIM card, we noticed a peculiar behavior. My friend is able to send texts via iMessage from the old phone number. Likewise, I can receive texts from this number.  Has anyone else noticed this? I am assuming the iMessage servers register phone numbers for compatible devices. But what happens if someone else claims this number?


Where do I find out how a command/environment is defined?

Say I want to redefine the itemize environment, or make a modified version of it. I want to know how it is currently defined. Where do I find this information? If it's some particular package command, I can just look at the .sty file for that package, but if it's something more basic, I don't know where to look...  Is there a reference manual of where all this stuff is explained? Or is there a file in the depths of my texmf tree I should poke around in?


I upgraded to Ubuntu 15.10 and now if I want to open VMware Player it doesn't do anything. I also uninstalled and installed it again, still nothing.  What can I do?


What's the interpretation of the coefficient of a categorical variable?

I am learning about MLR and I was wondering: if I have a linear regression with only two predictors and one of them is a categorical value (let's say: tall vs short), how do I interpret the β of that variable? In this case: $$ Y=\beta_0 + \beta_1X_1 + \beta_2X_2. $$ Let's say X2 is the categorical value and in my summary in R, it appears that variable (tall). How can interpret the β2?


How to Mock Sealed class with RhinoMocks

I want to write tests for the code below.  For this I want to inject in a mocked HttpContext using RhinoMocks.  HttpContext is sealed though.  How should I handle this?  Thanks      public PaxiumPrincipal CreatePrincipalFromCookie(HttpContext context)     {         HttpCookie authCookie = context.Request.Cookies[FormsAuthentication.FormsCookieName];          if (authCookie == null)         {             return null;         };          var authTicket = FormsAuthentication.Decrypt(authCookie.Value);          if (authTicket == null)         {             return null;         };          var userPrincipal = new PaxiumPrincipal(new GenericIdentity(authTicket.Name), null);          return userPrincipal;     }


There is a standard pile of cards with 52 cards that is mixed randomly. Every time I pick a card randomly. Afterwards, I put the card back. I continue to do so until I see all the different ace cards (When I see each ace card I still put the cards back in the pile). What is the Expected value $E(x)$ of the cards I chose randomly?   So to take a random card each time is $1/52$, but  every time I see an ace it's getting lower ($1/53$)? But I'm not sure how to compute the $E(x)$ from that.


How do I refer to all the properties of one document among many documents?

There are many documents, and each document has many properties.  I am trying to say "the properties of one of the documents" I believe that it is correct to say     One of the documents' properties is...   But I am not sure which form of the possessive to use for 'documents'     One of the document's/documents' properties is...   Is this the right way to phrase it?


Install Ubuntu alongside Windows 10 with legacy bios?

Ubuntu won't detect windows 10 when I try to install it, so I'm assuming it is because my BIOS is not in UEFI mode, but rather, in Legacy mode. Is there any way for me to still be able to install ubuntu alongside my windows installation?


Is there way to move one vertex and make another move with it proportionally?

I'll try to explain in this gif. I am doing this manually in 2 steps - rotate, scale. And I select all vertexes. Is there instrument rotate them in one step or can I move one and make other move too?


How do I adjust for covariates using Kruskal Wallis in SPSS?

Do i need to do another test after KW to account for covariates or is there a way to account for covariates when doing the initial KW test in SPSS?


Ubuntu installed in VirtualBox has blurred screen

I tried to install Ubuntu in VirtualBox on my laptop (Windows 10 Home). I selected the ISO file I downloaded: ubuntu-16.04.1-desktop-i386.iso, and started it up from VirtualBox. But after starting, the interface became blurred and showed macroblocking like this :    I wondered if my ISO file goes wrong, but after using winMd5Sum it shows that the MD5 is the right one. I cannot find relevant messages. Could anyone tell me how to fix the problem?


I am currently making a presentation using Beamer. I have section, subsection, subsubsections in my presentation. I want to achieve the following:   The TOC at the starting of the presentation won't show subsubsections. Starting of a subsection, I need a TOC of that subsection as well as subsubsections.   I know the first can be achieved using \setcounter{tocdepth}{2}. But I can't get the second one. It would be better if the subsubsections of the current subsection is highlighted and others are faded.  Please help me out.   note: I have checked this: . However, the difference is I want a TOC at the starting of subsections.  I also have checked this:  However, the difference is this shows the whole TOC (although shaded) at the starting of each subsection. I wanted a mini-TOC, particularly for the current subsection. If a subsection doesn't have a subsubsection, no TOC should be generated.


Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop?

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field.   Is there a way to do this?


Closure of image is subset of image of closure

Let $A \subset \mathbb{R}^{n}$ be a bounded set and $f$ be a continuous function,  $ f:\mathbb{R}^{n}\to\mathbb{R}^{m}$. How do I show that $\overline{f(A)} \subset f(\overline{A})$?  What I have tried so far: $A \subset \overline{A}$, so $f(A) \subset f(\overline{A})$ and $\overline{f(A)} \subset \overline{f(\overline{A})}$. Since, $A$ is bounded we have a closed ball $B$ such that $A \subset B$. I'm not sure where to go from here. Any suggestions?


Pros and cons of a Single Page site versus a Multi page site

I am working on trying to re-design the site for the agency I work for and a recommendation was made that we should move to a single page site with a vertical scroll which which walks through all the work that has been done. I am not a big fan of that since I am not sure how intutive that would. Is there research into what are pros and cons of a single page and when they should/should not be used as opposed to using a multipage site.


Include tags in answers entries on search results

When I perform a search, the result entries display the relevant tags, but only if it is a question link. If it's an answer link, there are no tags displayed. Sometimes I can easily infer the language, platform or technology, by reading the title and the excerpt -- but sometimes not, requiring me a visit to the question page. I suggest that when answers are displayed as search result entries, these entries include the tags of the parent question.


iphone design in photoshop which PPI has to be set 326? or 72?

i am working with 72PPI  for both android and iphone ..but some has been reffered 326 has to be set for iphone can i know what difference will occur? i am getting same result in 72 itself


Computing Multiplicative Character Values over Finite Fields

Let $\mathbb F_q$ be the finite field of order $q$, where $q\equiv 1\pmod 4$ is some prime power. Let $\chi_4\colon\mathbb F_q^\times\to\mathbb C^\times$ be a multiplicative character of exact order 4 (so $\chi_4(\theta)=i$ for some generator $\theta$ of the cyclic multiplicative group $\mathbb F_q^\times$). In Neal Koblitz's "Introduction to Elliptic Curves and Modular Forms," Exercise 3 in Section II.2 says to show that $\chi_4(-4)=1$. To do this, it suggests showing that $\chi_4(4)=\chi_4(-1)=1$ if $q\equiv 1\pmod 8$ and $\chi_4(4)=\chi_4(-1)=-1$ if $q\equiv 5\pmod 8$.   I first tried proving that $\chi_4(4)=1$ if $q\equiv 1\pmod 8$. It would be nice if I could prove that $2=u^2$ for some $u\in\mathbb F_q^\times$ so that I could say $\chi_4(4)=\chi_4(u)^4=1$, but I got stuck with this. It dawned on me that I really don't know how to do computations in finite fields. How can I prove the given problem. More generally, is there any nice technique for handling computations like this?


Can't insert data into table from a txt file with php

I have a text(.txt) file as shown in below.  0   1   1       1   30  2014-08-30 14:38:40 1   1   1       1   30  2014-08-30 14:41:55 2   1   1       1   30  2014-08-30 14:47:54 3   1   1       1   30  2014-08-30 14:53:04 4   1   5       1   30  2014-10-02 14:29:42   I want to insert some of the data from that file into database. And here is the structure of staff_detail table:  id(int32) primary key no(int32) staff_id(int32) date_time(datetime)   So, I read the data from the .txt file and try to insert into database as shown in below:  <?php     include('dbconfig.php');     $handle = fopen($_FILES['record']['tmp_name'], "r");     while(!feof($handle)){         $row = fgets($handle);         if( strlen(trim($row)) > 0 ) {             $data = explode("\t",$row);             $no = $data[0];             $staff_id = $data[2];             $date = $data[6];             echo "No: $no | ID: $staff_id | Date: $date <br/>";             $query = "INSERT INTO staff_detail(`no`,`staff_id`,`date_time`)VALUES($no,$staff_id,$date)";             $rsl = mysql_query($query) or die(mysql_error());         }     } ?>   When I run this file, I get error like this:  You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1  But, I can see all data in echo and just only can't insert into database.   When I check the text file data in Firebug. I see the data as shown below:  �0� �1� �1� �   �1� �3�0�   �2�0�1�4�-�0�8�-�3�0� �1�4�:�3�8�:�4�0� � �1� �1� �1� �   �1� �3�0�   �2�0�1�4�-�0�8�-�3�0� �1�4�:�4�1�:�5�5� � �2� �1� �1� �   �1� �3�0�   �2�0�1�4�-�0�8�-�3�0� �1�4�:�4�7�:�5�4� � �3� �1� �1� �   �1� �3�0�   �2�0�1�4�-�0�8�-�3�0� �1�4�:�5�3�:�0�4� � �4� �1� �5� �   �1� �3�0�   �2�0�1�4�-�1�0�-�0�2� �1�4�:�2�9�:�4�2� � �5� �1� �5� �   �1� �3�0�   �2�0�1�4�-�1�0�-�0�2� �1�4�:�3�7�:�4�4� � �6� �1� �7� �   �1� �3�0�   �2�0�1�4�-�1�0�-�0�2� �1�4�:�4�6�:�2�2� � �7� �1� �8� �   �1� �3�0�   �2�0�1�4�-�1�0�-�0�2� �1�4�:�4�7�:�5�6�   So, I try to check $no with var_dump($no) when $no value is 0.(I mean is test with the first line of txt file).   And I get the result like this: string(3) "0". I think it was wrong because it has just only one string as "0". But it shows string(3).  So, I guess it may be white space and so I try with str_replace and change $no and $staff_id type to int and try to insert into table again.  But it shows the same error and I have stuck with this problem. And now, I have no idea to solve it. I'm very appreciate for any answer and suggestion.


Travelling through the Schengen area with a Refugee Travel Document issued by the USA

I just want to double check to make sure I won't run into any issues at the border of entry.  I'm a permanent resident of the USA with a green card and I have a travel document issued by the USA (I-571). Will I have any issues traveling around in the Schegen countries?  Do I need a visa? Do I have to pay any fees?


I am running Ubuntu on my computer and I plugged in my tablet to flash TWRP to it. I enter adb devices and here is the output:  juniorRubyist@juniorRubyist-iMac:~$ adb devices List of devices attached  ????????????    no permissions  ...   Why is it doing this. I have a Kindle Fire 1st Generation, it says that it will ask to authorize ADB, but it will not. It has ADB enabled (I think) and everything.