How were the solar masses and distance of the GW150914 merger event calculated from the signal?

The  was observed, giving us the frequency and amplitude of the event. Because LIGO has two detectors a  could be derived.  But how do these three factors allow for the mass of the black holes and their distance to be calculcated? If the wave strengths are in a square relationship to distance, then couldn't there be an infinite number of other masses and distances which would give the same signals?


How can/does a mobile phone provide power to pen drive?

Mobile phones with USB OTG are not uncommon today. I am wondering that how can a battery operated device like mobile phone power a pen drive? From what I know, the power consumption of pen drive on 5V VBUS is around 100mA. The 5V can be derived from the battery voltage using boost converters, but are these converters so efficient and offer such a high current?  This question came to my mind when I came across a topic "connecting a pen drive to my android phone" when browsing for USB OTG.  Any thoughts?  Thank you.


This is a MacBook Pro running macOS Mojave 10.14.6 with FileVault enabled.  In my case the problem is that at the login page, when the computer starts, the admin user account doesn't appear but after logging in as standard user I see that there is an admin. My brother who created the admin forgot the password.     I was thinking to press command + S when the Mac starts , in order to create a new admin, but with FileVault enabled single user mode does not work.   Is there still a possibility to recover the admin password?  My question is slightly different than those for which it was marked as duplicate because in those answers are explained:   Single User Mode(Command+S). As I have explained in my question, with  FileVault enabled single user mode does not work. Recovery Mode(Command+R) . When in the terminal, in recovery mode, I type  resetpassword I have not the possibility to choose the admin account but it's choosen standard account and i think that if I reset the password in this way  I will reset the standard user password and not the admin one.


When using symbols instead of words in writing, do I use "an" or "a" before the symbol?

The sentence in question:      Every list item that is marked with an * is optional.   The word "asterisks" isn't spelled out, so I'm not sure if "an" or "a" is the correct word to put before it.


Bogachev's example: $C+C = [0,2]$ and $C-C = [-1,1]$ where $C$ is the Cantor set

It is known, that the Cantor set is the subset of points of the segment $[0,1]$ allowing ternary expansion $0.a_1a_2\ldots$, where $a_i=0$ or $2,\; i\in {\mathbb N}$, neither of those values ($0$ or $2$) in period. In English edition of V.I. Bogachev's fundamental work Measure Theory vol 1, we read. 1.12.60$^◦$. Let $C$ be the Cantor set in $[0, 1]$. Show that $C + C := \{c_1 + c_2 : c_1, c_2 ∈ C\}$ $ = [0, 2]$,  $C − C := \{c_1 − c_2 : c_1, c_2 ∈ C\} = [−1, 1]$. Hint: the sets $C + C$ and $C − C$ are compact, hence it suffices to verify that they contain certain everywhere dense subsets in the indicated intervals, which can be done by using the description of C in terms of the ternary expansion. In ternary expansion $1/2=0.(1)$ (1 in period). The question is: How to show that there exist Cantor set poins $c_1=0.a_1a_2\ldots$, and $c_2=0.b_1b_2\ldots$ (where both $a_i,b_i$ are $0$ or $2$, for all $i\in {\mathbb N}$, none of them in period, such that $c_1-c_2=0.(1)$?


Help with Dual Javascript countdown clock

I am having a little trouble figuring out how to make this work properly, I am trying to put a small countdown clock in the left column and one in the right column, which will show a countdown to two separate dates. I was able to create a single countdown clock using the below code and was hoping to be able to be able to tweak the code enough to allow it to run on a second CEWP with a different date. Is it possible to run two Javascript files on the page without them interferring with eachother? Thank you anyone that can lend a quick hand.

Countdown Clock Left

Days

Hrs.

Min.

Sec.


Intrinsic way of reviewing my unaccepted questions in each SE site

I find it really unusual that (at least as far as I've seen) there is no built in mechanism for viewing questions that I've asked that I have not accepted an answer for. Based on my searches, there is a way to query this manually via search:  user:me hasaccepted:0   However, this is fairly unintuitive since I seem to have difficulty memorizing this and am constantly having to Google for how to do this.  Is there no built in mechanism to do this in the UI? And if not, could one be added?


Ubuntu 13.10 lost layout switch shortcut

After upgrading to Ubuntu 13.10, my keyboard layout switch shortcut not functioning any more. I used to use Caps Lock key.   I tried to redefine it but could not find any. The layout option settings page has changed and it does not seem to have any possibility to define the short cut.   I heavily rely on this feature and it is a pain that each time I need to take mouse on control panel language icon to switch layout. Really appreciate if you help me to resolve this.


If $k|n$, then $D_{2n}/\langle{r^k}\rangle\cong D_{2k}$

I have to show that, given $k|n,$ and  $\langle{r^k}\rangle$ is a normal subgroup of the Dihedral group $D_{2n}$ then $D_{2n}/\langle{r^k}\rangle\cong D_{2k}$  Given this, I know that I need to show that a particular homomorphism is a bijection.  The natural one I was thinking was $$\phi:D_{2k}\rightarrow D_{2n}/\langle{r^k}\rangle$$ $$r^is^j\mapsto r^is^j\langle{r^k}\rangle$$ First I have to show that this is a homomorphism, which is easy, i think, since $$\phi(r^{i_1}s^{j_1}r^{i_2}s^{j_2})=r^{i_1}s^{j_1}r^{i_2}s^{j_2}\langle{r^k}\rangle=r^{i_1}s^{j_1}\langle{r^k}\rangle r^{i_2}s^{j_2}\langle{r^k}\rangle=\phi(r^{i_1}s^{j_1})\phi(r^{i_2}s^{j_2})$$ Now that I have the homomorphism, I need to show bijectivity.  So given $\phi(r^{i_1}s^{j_1})=\phi(r^{i_2}s^{j_2})$ $$\phi(r^{i_1}s^{j_1})=\phi(r^{i_2}s^{j_2})\Rightarrow r^{i_1}s^{j_1}\langle{r^k}\rangle=r^{i_2}s^{j_2}\langle{r^k}\rangle$$ and it's here I'm getting stuck...drawing a blank


Continuous injection of $[a,b]$ is strictly monotonic from Zorich's book

I am reading Zorich's book "Analysis I" and ran into the following statement: Let $f:[a,b]\to \mathbb{R}$ and $f$ is continuous on $[a,b]$. Then $f$ is injective if and only if $f$ is strictly monotonic. Proof: $\Leftarrow$ is quite obvious. The most interesting part is $\Rightarrow$. Suppose that $f$ is not strictly monotonic. Then we can find three points $x_1<x_2<x_3$ from $[a,b]$ such that $f(x_2)$ does not lie in between $f(x_1)$ and $f(x_3)$. In this case $f(x_3)$ lies in between $f(x_1)$ and $f(x_2)$ or $f(x_1)$ lies in between $f(x_2)$ and $f(x_3)$. Question: Suppose $f$ is not strictly monotonic, i.e. $f$ is not strictly increasing and is not strictly decreasing. Then we can find points $x_1,x_2,x_3,x_4\in [a,b]$ such that $x_1<x_2$ with $f(x_1)\geq f(x_2)$ and $x_3<x_4$ with $f(x_3)\leq f(x_4)$. I have spent smth like couple of hours trying to derive that exists three points with the above properties as in Zorich's book but I failed. I'd be thankful if you can help me, please!


Is the minimum non-countable well-ordered set compact?

Let $A$ be a Cardinate product of 2 non-countable sets $C$ and $D$. $$A=C \times D$$ According to the well-ordering theorem, we can define a well-order on the non-countable set $A$. We define a lexicographical order. Take a minimum non-countable subset $B$ of $A$.$ B$ exists because in the interval $[0,x)$ of $A$, we can both find the $x$ such that $[0,x)$ countable or non-countable. Use the supremum and infimum principle(which can be proved in a well-ordered set), we can find a minimum $x$ and $[0,x)$ non-countable. Is this kind of set compact with the order topology?


Is it possible to replace the .config folder in a live iso?

I used Cubic to edit an Lubuntu iso to fit my needs and so far it has worked really well. However now i need to change the default config of some packages. I know that the file that i need to replace is located in the .config directory. But i don't know where this folder is located. Since there is no user account while using cubic only the root account. Sorry for my bad English and thanks in advance.


Does Google take into account page title changes due to JavaScript?

One of my pages is set up so that the initial page title is just some placeholder title, and it changes after an AJAX call.  Here's what the process looks like:   Initial page load AJAX call to retrieve some data Page title changed according to AJAX data   Does Google take page title changes into account? Or does Google only look at what the initial page title is?


Term for a person who is from the same college or university as yours?

If two American strangers (or for that matter any nationals) are compatriot for each other What is equivalent of a person who is from the same college or university as yours?  See below example:  Somboon to Jim: Hi, Do you like the Philippines?  Jim to Somboon: Hi, we liked Philippines a lot. Jack and me are compatriots. We are US citizen. So we like to travel different countries.  Somboon to Jim: Oh you are from the same country, but you look different. I thought you are Filipino.  Jim to Somboon: No I am not. But Jack and me are in fact ___________ (from same college).


Reduce the number of authors in references

I would like more than 3 author citations to show up using et al. rather than with full names.  Example: * were death cases because of the autopsy Rao, Sood, Pathak, and Dongre (2014).*  I need to show >3 author names like (Rao et al., (2014))  Code  \documentclass{UnimasThesis} \usepackage{graphicx} \usepackage[labelfont=bf]{caption} \captionsetup{labelfont=bf} \usepackage{pdflscape} \usepackage{adjustbox} \usepackage{dcolumn} \usepackage{booktabs} \usepackage{amsmath} \usepackage{cases} \usepackage[os=win]{menukeys} \usepackage[paper=a4paper]{geometry} \usepackage{multirow} %\usepackage{enumerate}   \usepackage{listings} \lstset{language=[LaTeX]TeX,columns=fullflexible, basicstyle=\ttfamily,texcsstyle=*\bfseries\color{NavyBlue}, commentstyle=\itshape\color{PaleVioletRed4}, frame=single,framesep=6pt, framexleftmargin=6pt,framexrightmargin=6pt, xleftmargin=12pt,xrightmargin=12pt, breaklines=true,breakatwhitespace=true}   \title{AUTOMATIC SEGMENTATION OF CARDIAC MAGNETIC RESONANCE IMAGES FOR OEDEMA ASSESSMENT} \author{Amajd Khan} \faculty{Faculty of Computer Science and Information Technology } \facultyColour{6c7a8c} %% 6-digit RGB hexadecimal code  \submissionyear{2017} \degreetype{Doctor of Philosophy\\(Computer Science)}  % If using APA bibliography style  \usepackage[natbibapa]{apacite} \bibliographystyle{plainnat} %\usepackage{natbib} %\bibliographystyle{apalike}  \makeatother  \begin{document} \maketitle  \frontmatter    \mainmatter % Each chapter from a separate file \input{chap1-Introduction}  % references are listed in refs.bib \bibliography{refs}  \end{document}   .bib file      @article{rao:2014,     title={Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report},     author={Rao, Dinesh., and Sood, Divya., and Pathak, P., and Dongre, Sudhir, D},     journal={Journal  of Emergency-An Academic Emergency Medicine},     volume={2},     number={1},     pages={12-17},     year={2014} }


My laptop came with Windows 7, probably 6+ years ago. Since then I did the free upgrade to Windows 10. However, the current HDD has a SMART Drive Error. Which, honestly, doesn't seem to affect it at all except for it reminding me every time I boot it up. I haven't been saving anything important on there in case it does blow, though.   Today, I bought a new HDD for it which is completely blank (no bootable device -- insert boot disk). I don't really care about any of the files on the old HDD, just the operating system. Unfortunately, I need a disk to boot from to install an OS onto the new HDD. I have no Windows 10 disks, and have long lost the Windows 7 disks (if it even came with any). It seems Microsoft has discontinued their free upgrade program, so I can't find an ISO of 10 anywhere.  I've searched for tools that can migrate the bad disk over to the good one, but all the ones I have found require both disks being connected at the same time. My laptop only supports connecting a single HDD.  I have a 32gb flash drive I bought to put the ISO on and boot from, but that's hard to do without an ISO.  I've seen some comments various places talking about creating system restores/image backups, but I'm not sure how any of that works and can't seem to find a simplistic guide in doing so that enables me to boot and install an OS.  What are my options here? I don't care about files from the old HDD. All I want is to install Windows 10 on my new HDD, preferably without paying for what I already had.


Is there a Google Earth free WMS service? Can we add the QGIS WMS service and see the current satellite images?


How can I use my iPad Mini and Android tablet as another two monitors for my notebook?

How can I use my iPad Mini and my Android tablet as another two monitors for my notebook? How can I use my iPad mini and android table as a secondary and a third monitors of my notebook? i.e. I want to use another two monitors for my notebook. and the secondary and the tertiary tablets are using different OSs (Android and iOS) Thanks.


Is there any difference between "has gone" and "went" in this context?

Is there any difference between these two sentences?     Mirek went to Europe on business.   Mirek has gone to Europe on business.


Was Q Created in the very first Star Trek Movie?

This question is based off the end of the very first Star Trek Movie, so I will ask it in spoilers in the odd case that you haven't seen it yet.      At the end of the movie Kirk asked Bones and Spock if they had just witnessed the making/creation of a new species.  during the Movie they gathered that the Voyager Satellite/probe had possibly gone through a worm hole that took it to the other side of the universe and possibly through time.  So my thoughts are that the merged species disappeared possibly through time.     could this theoretically have been the beginning of the Q?


Illustrator: how to change the artboard number?

I want to change the order of my artboards when exported to PDF, and the only way i can achieve this is by moving actual artwork from one artboard to another, which doesn't seem right. Is there any way to change the artboard number in Illustrator?


SATA cables: is there a distinction between SATA1, SATA2, etc.?

I just installed a SSD with a SATA3 interface on my SATA2-only motherboard. Since I was out of cables, I had to use a leftover SATA cable from an older SATA1-only mobo (so I assume that it's a SATA-1 only cable, if such a distinction exists). Now, my searches here seem to indicate that things should work without problems, but I'm concerned about whether using an older cable will lead to decreased performance. I'm okay with the SSD topping at 3Gb./s (SATA2 speed), but will the cable make the drive go slower than that?


Convergence of the series $\sum a_n$ implies the convergence of $\sum \frac{\sqrt a_n}{n}$, if $a_n>0$

I need help to solve following problem from Rudin's Mathematical analysis book:    Convergence of the series $\sum a_n$  implies the convergence of $\sum \dfrac{\sqrt {a_n}}{n}$, if $a_n>0$  I tried to construct a suitable convergence sequence $b_n$ such that $\sum b_n$ converges and $a_n \leq b_n$ but, I am not able to find such sequence $b_n$ .  Thanks for the help and sugestions.


Let $\{E_i\}_{i=1}^n$ be finitely many disjoint sets of real numbers (not necessarily Lebesgue measurable) and $E$ be the union of all these sets. Is it always true that  $$ m^\star (E)=\sum_{i=1}^N m^\star(E_n) $$ where $m^\star$ denotes the Lebesgue outer measure? If not, please give a counterexample. The Vitali set is a counterexample in the countable case, but I am not sure whether it is false in finite case.


What is the largest a player character can get using only official material and UA?

I was presented a concept for a one shot session from one of my players. He comes up with some strange ideas, and I'd like to see if this one would be viable:  The scenario goes that the Tarrasque has a prophesied date of awakening, so an elite order was created for the sole purpose of combating the creature to put it back in the ground. Using a combination of training courses over the course of many years (multiclassing into very specific classes), each of the group can become as large, if not larger than the Tarrasque and, for the lack of a better term, wrestle it to death.  My question is: Is there actually a combination of class features and spells that can push a character to get larger than a Tarrasque? And if it is, what kind of bonuses should such a character get upon reaching that size?


Improve VB.NET syntax highlighting - embedded XML issue

Looking at  to this question:      Note: Language hint is correctly applied, so syntax highlighter should know it is exactly VB.NET.  Here is how it looks on StackOverflow:    And this is how it looks in Visual Studio 2013 (please ignore vertical bars):    I think VB syntax highlighter should be brought up to date with today's standards.


I know that, in theory at least, they do. However, I was wondering if there has been any experimental confirmation of this, or any other reasons for perhaps thinking that they do not interact via the gravitational force.


Should there be a copay after "out-of-pocket maximum"

I have individual health insurance and have met my out-of-pocket maximum due to a surgery earlier this year.  I saw my (in-network) PCP this week and was still charged the regular $30 copay. Should that have been waived, will I get a check back, or does it not matter that I've met the "maximum" and still have copays for covered expenses?


What do new Windows 8/10 attributes mean: No scrub file (X), Integrity (V), Pinned (P), Unpinned (U)

I just opened help for ATTRIB command on Windows 10.0.15063, and found out that there are new attributes I didn't know about.  >attrib /? Displays or changes file attributes.  ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+P | -P] [+U | -U]        [drive:][path][filename] [/S [/D]] [/L]    +   Sets an attribute.   -   Clears an attribute.   R   Read-only file attribute.   A   Archive file attribute.   S   System file attribute.   H   Hidden file attribute.   O   Offline attribute.   I   Not content indexed file attribute.   X   No scrub file attribute.   V   Integrity attribute.   P   Pinned attribute.   U   Unpinned attribute.   [drive:][path][filename]       Specifies a file or files for attrib to process.   /S  Processes matching files in the current folder       and all subfolders.   /D  Processes folders as well.   /L  Work on the attributes of the Symbolic Link versus       the target of the Symbolic Link   (specifically, X, V, P, U)  And I can set +X via ATTRIB command, even though it's not listed as modifiable.  I don't know what they do or used for though. And I didn't manage to google out anything useful except lists not much more useful than the help itself. Even Microsoft' own help does not help.


Are "may" and "might" synonyms? They appear to be interchangeable.    What are the infinitives for these two words?  My guess is that "might" is cognate with the German "mögen" (an infinitive). Ich möchte gehen can be translated as would like to go. There is no infinitive in English, though there may have been in the original Anglo-Saxon where it could have meant "to want".


How can I 'cat' a man page like I would 'cat' a file to get just a dump of the contents?


What is the correct output of cat /etc/apt/sources.list?

I have Ubuntu 12.04 LTS. I need the correct output because I edited it because it wasn't working but it has only made it worse.


I have a CakePHP application that in some moment will show a view with product media (pictures or videos) I want to know if, there is someway to include another view that threats the video or threats the pictures, depending on a flag. I want to use those "small views" to several other purposes, so It should be "like" a cake component, for reutilization.  What you guys suggest to use to be in Cake conventions (and not using a raw include('') command)


I have just been assigned the tasks of doing some research and doing some JMeter tests of my own to get familiar with performance testing. As I have never used this tool before, I would just like to know where I can find good JMeter tutorials for beginners?


I try to create bigger table in TeXworks where are different horizontal as well as vertical lines. Everything works fine but it always crash on the \cline command (when I use \hline it works perfectly). Anyone know where should be problem?  I use packages:  \usepackage[czech]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}   \usepackage{array} \usepackage{multirow} \usepackage{hyperref} \usepackage{amsmath} \usepackage{tikz}   Source of the table:  \begin{table}[ht] \centering \begin{tabular}{*{11}{|l}} \hline & & \multicolumn{4}{c}{Longer text} & \multicolumn{3}{c|}{Longer text}\\ \cline{3-9} & & a& b & c & d & ei & f & g \\ \hline \parbox[t]{2mm}{\multirow{3}{*}{\rotatebox[origin=c]{90}{text}}} & description & 2 & 1 & 2 & 0 & 1 & 2 & -1\\ \cline{2-9} & description & 2 & 0 & 1 & 2 & 1 & 1 & 0\\ \cline{2-9} & description & 2 & 2 & 2 & 1 & -2 & 2 & -2\\  \hline \parbox[t]{2mm}{\multirow{4}{*}{\rotatebox[origin=c]{90}{text}}} & description & 2 & 2 & 2 & 2 & -1 & 2 & 0\\ \\cline{2-9} & description & -1 & 0 & 2 & 2 & -2 & 1 & -2\\ \cline{2-9} & description & 1 & 2 & 2 &  & -1 & 1 & -1\\ \cline{2-9} & description & -1 & -1 & 0 & 0 & 0 & -1 & 1\\ \hline \end{tabular} \caption{Multi-row table} \label{tab:multirow} \end{table}


I tried to use a command block to teleport me, but I used a repeating one by mistake, and I'm like three walls away from it facing away so I can't delete it. So I'm stuck and I can't even turn my head and its on my favorite world. What do I do? Minecraft PE on an iPad.


Natbib: don't write the reference's title

Simple question: I'm using natbib with the  and I want the references in the "Reference" section to show with no title. That is, remove the lines:    I know I can just go to the .bib file and remove the title from each entry, but I'd like to know if there's some way to tell natbib to do this without me having to modify the entire .bib file.


I'm breaking my head over this. If (a,b,c) are positive real, show that \begin{align} \sqrt{\frac{2a}{a+b}}+\sqrt{\frac{2b}{b+c}}+\sqrt{\frac{2c}{c+a}}\le3 \end{align}  (There is equality only when $a=b=c$)


How can I still play Flash games/animations after Flash's death?

There's a lot of good animations and games on Newgrounds and many other sites. They all used touse Flash player, too. Unfortunately, Flash has been discontinued on the last day of 2020. However, the Newgrounds player that replaced Flash player on Newgrounds apparently doesn't work on all games because they haven't been converted from Flash yet. Also, other sites still haven't got the message and still use Flash. Any ideas on any workarounds to still access these games/animations? If anybody has asked this question before, please link me to the dupe. By the way, I am using Windows 10 and I either use FireFox or Chrome as my main browsers, so any solutions using them would be preferred. RIP Flash


Prove $\tau$ is cofinite on $X$ iff $(X,\tau)$ is $T_1$-space and any infinite subset of $X$ is dense in $(X, \tau)$

I dont have a clue about the proof in the reverse implication on the iff statement.  I will show what I have by now:  1) A cofinite topology implies that any infinite subset in $X$ is dense. Let $U\in\tau$ and is cofinite topology so $U=X-\bigcup_{k=1}^{n}\{x_k\}$.  Let $V\in X$ an infinite subset then $$V\cap U=V\cap(X-\bigcup_{k=1}^{n}\{x_k\})=(V\cap X)-(V\cap \bigcup_{k=1}^{n}\{x_k\})=V-(V\cap \bigcup_{k=1}^{n}\{x_k\})$$  and cause $|V|\ge\aleph_0$ and $|\bigcup_{k=1}^{n}\{x_k\}|=n\in\Bbb N\,$ we have that $|V\cap \bigcup_{k=1}^{n}\{x_k\}|\le n$. And finally is obvious that $V-(V\cap \bigcup_{k=1}^{n}\{x_k\})\ne\emptyset$ so any infinite subset is dense on $X$.  2) A cofinite topology implies a $T_1$-space. Let $x, y\in X$ and $U\in\tau: U=X-\{y\}$ so $x\in U\land y\notin U$. We can define too $V\in\tau:V=X-\{x\}$ so $x\notin V\land y\in V$ then a cofinite topology is a $T_1$-space.  But my problem is that I dont have a clue to prove the reverse implication i.e. if we have a $T_1$-space where every infinite subset is dense then it is a cofinite topology. Some hint? Some advice or correction in the proof of above? Thank you in advance.    I will complete the proof with the advice of @Cameron Buie.  1) A $T_1$-space implies that any finite subset is closed. Let the singleton $\{x\}\subset X$. Then $\overline{\{x\}}=\{x\}\cup\{x\}'$ where $\{x\}'=\{y:(\forall U\in\tau : y\in U)\land x\in U\}$, but because we are in a $T_1$-space exist some $U$ for any points $x,y\in X: x\in U\land y\notin U$ so $\{x\}'=\emptyset$ then $\overline{\{x\}}=\{x\}$ and is closed.  This means that for every $T_1$-space it cofinite sets are open.  2) If any infinite subset is dense on $X$ it means that the closure of any infinite subset is $X$ so the only closed sets are finite (and $X$ itself), so the topology is cofinite.


Will MySQL be effective when selecting a row from a table with billions of records?

Note: this is a hypothetical scenario  Lets say that:   I'm running MySQL, InnoDB engine, UTF-8 encoding I have a table with 50+ billions of rows The tables primary key is a BIGINT The table also has 4 other columns, 3 of which are indexed (a BIGINT, TINYINT, and a VARCHAR(20)) ... (the unindexed column is type TEXT)   My questions are:   How fast would the queries be when selecting a row via primary key, or via indexed columns? What kind of hardware/server/s would be needed in order to make these queries execute faster than 0.1s? Should I be using some other storage engine for this?


I have a voting system which allows for users to upvote and downvote on items. I am looking to improve the system because users can vote multiple times. Below you can see my code.
 Votes

 Up-Votes	 Down-Votes

 <?php   mysql_connect("localhost", "root", "PASS") or die(mysql_error());   mysql_select_db("DBNAME") or die(mysql_error());    if ( isset( $_POST['Upvote'] ) )  {   mysql_query ("UPDATE reports SET up = up + 1 WHERE reportID = $id");    } else if (isset( $_POST['Downvote'] )) {  mysql_query ("UPDATE reports SET down = down + 1 WHERE reportID = $id");  }  $data = mysql_query("SELECT * FROM reports WHERE reportID = $id") or die(mysql_error());   while($ratings = mysql_fetch_array( $data ))  {   Echo "" .$ratings['up']."	";  Echo "" .$ratings['down']."	";   }   ?>

 <form method='POST'> <input type='submit' value='up' name='Upvote' class="myButton"> <input type='submit' value='down' name='Downvote' class="myButton"> </form>    Does anybody have any suggestions which could prevent duplicate votes?  There are potentially thousands of items on my system, I am unsure as to how I can make a user be exempt from voting on particular reports  Cheers


How to create a custom "confirm" & pause js execution until user clicks button?

Ok, I'm doing a bunch of RIA/AJAX stuff and need to create a "pretty", custom confirm box which is a DIV (not the built-in javascript confirm). I'm having trouble determining how to accomplish a pause in execution to give the user a chance to accept or decline the condition before either resuming or halting execution. (depending upon their answer)   So here's the general flow of logic I'm dealing with:   User selects an item from dropdown and clicks button. In client-side javascript eventhandler for button, I need to check a (this is the key) SERIES of conditions for the item they chose in dropdown.  These conditions could possibly result in not showing any confirmation at all or possibly only some of the conditions may evaluate to true which means I'll need to ask the user to accept or decline the condition before proceeding. Only one confirmation should be show at a time.   To demonstrate the logic:  function buttonEventHandler() {  if (condition1) {   if(!showConfirmForCondition1) // want execution to pause while waiting for user response.      return; // discontinue execution }  if (condition2) {   if (!showConfirmForCondition2) // want execution to pause while waiting for user response.       return; // discontinue execution }  if (condition3) {   if (!showConfirmForCondition3) // want execution to pause while waiting for user response.       return; // discontinue execution }  ...   }    If anybody has dealt with this challenge before and found a solution, help would be greatly appreciated. As a note, I'm also using the MS Ajax and jQuery libraries although I haven't found any functionality that may already be included in those for this problem.


Decorators run before function it is decorating is called?

As an example: def get_booking(f=None):     print "Calling get_booking Decorator"     def wrapper(request, **kwargs):         booking = _get_booking_from_session(request)         if booking == None:             # we don't have a booking in our session.             return HttpRedirect('/')         else:             return f(request=request, booking=booking, **kwargs)     return wrapper  @get_booking def do_stuff(request, booking):     # do stuff here  The problem I am having is, the @get_booking decorator is being called even before I called the function that I am decorating. Output on start: Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator Calling get_booking Decorator [26/Oct/2008 19:54:04] "GET /onlinebooking/?id=1,2 HTTP/1.1" 302 0 [26/Oct/2008 19:54:05] "GET /onlinebooking/ HTTP/1.1" 200 2300 [26/Oct/2008 19:54:05] "GET /site-media/css/style.css HTTP/1.1" 200 800 [26/Oct/2008 19:54:05] "GET /site-media/css/jquery-ui-themeroller.css HTTP/1.1" 200 25492  I haven't even made a call to a function that is decorated at this point. I am just getting started with decorators, so maybe I am missing something.


Is "ing" with this verb (brim) form a gerund or a noun?

I was looking for the definition of "brimming" and I found it "To be abundantly filled or supplied"  And those examples on it A monument brimming with tourists. Workers brimming with pride. according to thefreedictionary.com My question: Is "Brim + ing" a  verb or a noun?


Can the direction of angular momentum and angular velocity differ?

While studying rotational mechanics, I came across a section where it mentioned that angular momentum may not necessarily be parallel to angular velocity. My thoughts were as follows:  Angular momentum ($L$) has the relation $L=I\omega$ where $\omega$ is angular velocity and $I$ is the moment of inertia, so following this relation, it seems they should be in the same direction. Why are they not?


Can we tell how far away is the source of gravitational wave from the chirp alone?

From the analysis of chirp from Ligo and some other similar detector it is possible to tell the mass but can we also find out how far away too? or we need to look up into the sky and compare the energy wavelength of photon vs standard candle? What if the source is binary blackholes merger in a bootes void like region of space?


Responsive not working after converting html theme to Drupal theme

While trying to convert a HTML responsive theme to Drupal 7 theme, it's responsive is not working!!!  Can anyone help me with this to sort the issue? We have copied Bartik theme and removed the CSS and pasted the HTML5 theme CSS and JS that we created. changed the index.tpl into page --front.tpl.php and copied it into the template folder. In the page-- front.tpl.php we give all the path for CSS and JS as:    <?php $path="http://".$_SERVER['HTTP_HOST']; ?> <link rel="icon" href="$path."> <link rel="shortcut icon" href="images/favicon.ico" /> <link rel="stylesheet" href="<?php echo $path.base_path().path_to_theme()?>/css/style.css">.    "As specified we gave path for all CSS and JS files, but don't know where we went wrong!!"


I'm trying create a Map using a name field as key.  Sample code:  Set<String> priceBooksNames = new Set<String>(); priceBooksNames.add('LN-200'); priceBooksNames.add('LN-100');  Map<string,PriceBook2> priceBooks = new Map<string,PriceBook2>([SELECT name,id FROM PriceBook2 WHERE name=:priceBooksNames ]); system.debug(priceBooks.get('LN-100')); //this is returning NULL   I can see on console that setId on map is not getting the name field value.  VARIABLE_ASSIGNMENT [5]|priceBooks|{"serId":1,"value":{"01sb0000000hiqQAAQ":{"serId":2,"value":{"Name":"LN-100 ADULTOS","Id":"01sb0000000hiqQAAQ"}},"01sb0000000hiqGAAQ":{"serId":3,"value":{"Name":"LN-200 EMPRESAS","Id":"01sb0000000hiqGAAQ"}}}}   What I'm going wrong?


Comparison between pointer and integer errors

I have seen  various explanations about pointer and integer comparison issues, however I am still very confused on the matter. I have struggled with pointers ever since I started coding, just something that I can not seem to grasp. And I find myself running in to this similar problem frequently. I have obtained the following "warning" signals, which I believe the solution to each are similar. Can anyone help explain this common pointer problem a little in depth?  Errors  scanner.c: In function ‘delimiters’: scanner.c:14:9: warning: comparison between pointer and integer [enabled by default] if(ch == delimiter[i])      ^ scanner.c: In function ‘operators’: scanner.c:27:9: warning: comparison between pointer and integer [enabled by default]  if(ch == operator[i]){      ^ scanner.c: In function ‘validIdentifier’: scanner.c:43:2: warning: passing argument 1 of ‘delimiters’ makes pointer from integer without a cast [enabled by default] if(id[0] == '0' || id[0] == '1' || id[0] == '2' || id[0] == '3' || id[0] == '4' || id[0] == '5' || id[0] == '6' || id[0] == '7' || id[0] == '8' || id[0] == '9' || delimiters(id[0]) == true || isupper(id[0]) )                                                                             ^ scanner.c:8:6: note: expected ‘char *’ but argument is of type ‘char’ bool delimiters(char *ch){   ^ scanner.c: In function ‘keywords’: scanner.c:51:2: warning: passing argument 2 of ‘strcmp’ from incompatible pointer type [enabled by default]  if(!strcmp(ch, keyword)){  ^ In file included from scanner.c:3:0: /usr/include/string.h:140:12: note: expected ‘const char *’ but argument is of type ‘const char **’ extern int strcmp (const char *__s1, const char *__s2)   code.c  #include <ctype.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include "token.h"  bool delimiters(char *ch){     int i, j;     int len = strlen(ch);     const char delimiter[10];      for(i = 0; i < len; i++){             if(ch == delimiter[i])                     j = true;;             j = false;     }     return (j); }  bool operators(char *ch){     int i, j;     int len = strlen(ch);     const char operator[10];      for(i = 0; i < len; i++){             if(ch == operator[i]){                     j = true;             }             j = false;     }     return (j); }  bool validIdentifier(char* id){     int len = strlen(id);      if((len == 0) || (len > 8)){             printf("Invalid identifier (string) length\n");             return (false);     }      if(id[0] == '0' || id[0] == '1' || id[0] == '2' || id[0] == '3' || id[0] == '4' || id[0] == '5' || id[0] == '6' || id[0] == '7' || id[0] == '8' || id[0] == '9' || delimiters(id[0]) == true || isupper(id[0]) )             return (false);     return (true); }  bool keywords(char* ch){     const char* keyword[12];      if(!strcmp(ch, keyword)){             return (true);     }     return (false); }  bool isInteger(char* ch){     int i;     int len = strlen(ch);      if((len == 0) || (len > 8)){             printf("Invalid number length\n");             return (false);     }      for(i = 0; i < len; i++){             if((ch[i] != '0' && ch[i] != '1' && ch[i] != '2' && ch[i] != '3' && ch[i] != '4' && ch[i] != '5' && ch[i] != '6' && ch[i] != '7' && ch[i] != '8' && ch[i] != '9' && ch[i] != '.') || (ch[i] == '-' && i > 0)){                     return (false);             }     }     return (true); }  char* sub(char* str, int l, int r){     int i;     char* subString = (char*)malloc(sizeof(char) * (r - l + 2));      for(i = l; i < r; i++){             subString[i - l] = str[i];     }      subString[r - l + 1] = '\0';     return (subString); }


Using \newcommand to format numbers/strings according to a pattern

I'm an aspiring LaTeX user and have so far managed the first steps and created my first few documents. Coming from a programming background I've been wondering how you could use \newcommand to create a command that formats numbers or strings in a hard-coded way.  For example, let's say I have the string AB1234567890. Now what I'd like to do is create a command, that used like this  \applyformat{AB1234567890}   should create the output  AB12 3456 7890   I realize something like that can be done with \,  AB12\,3456\,7890   but I would like to define a fixed "layout" in the command to make sure that every string gets formated the same way as I use that command with each string later.  In a programming language I could split strings and such but I'm unaware how to solve that with LaTeX.


Finite group of odd order with elements that are square

The problem I am struggling with is   "Find an example of a finite group G of order n where n is odd and each element of G is a square".  In my understanding this means  "Find a finite group with odd number of elements where each element can be expressed in ( )^2 form".  Am I understanding the question incorrectly?  I can't seem to find any finite group that fits this criteria.  Could anybody help me?


I'm having some trouble solving the following limit: $$\lim_{n \to +\infty} \frac{\sqrt[n] e + \sqrt[n] {e^2} + ... + \sqrt[n] {e^n}}{n}$$ This question is in the "Riemann Sum" section so I think that we're supposed to turn this into an integral, so: $$\lim_{n \to +\infty} \frac{\sqrt[n] e + \sqrt[n] {e^2} + ... + \sqrt[n] {e^n}}{n} = \lim_{n \to +\infty} \sum_{k=1}^n \dfrac{1}{n} \sqrt [n] {e^k} = \int_a^b f(x) dx$$ I think that $n$ is the number of partitions and $1/n$ is the length of each one, so this means that $b - a = 1$ or $b = a+1$, meaning that we only need to find a value for $a$ and $b$ will be that $+1$. But now I can't seem to find the value of  $a$ nor $f(x)$. How can I solve this?


Finitely generated idempotent ideals are principal: proof without using Nakayama's lemma

I am trying to understand Nakayama's lemma. It looks like some "fixed point theorem". Using Nakayama's lemma , I can easily solve the following question. I want another proof. Thanks.     Let $A$ be a commutative ring with identity, $I$ be a finitely generated ideal of $A$, such that $I^2=I$. Show that there exists an element $e\in I$ with $e^2=e$ and $eA=I$.   You can use anything (geometric interpretation are welcomed) except Nakayama's Lemma.


Enumerate with lowercase letters not starting at "a. "

I need an enumerate list that starts at c. instead of a.. Is this even possible? If so how do I do it?   I tried \begin{enumerate}[c. ] but that didn't work. I just got c. before each item.


I have been told that a GFCI receptacle is a "circuit breaker" in the sense that it will trip under overload. Everything I know, have been told, and have read from experts to manufacturers says this is not the case.  So the question stands: Is a GFCI receptacle device a circuit breaker?


Refreshing an answer to a closed question after an edit removes the close message

When a question with answers to it gets closed it displays the close reason with the people that voted for it. However when an answer is edited after the post is closed and you use the inline refresh to get the updated answer, it will remove the close message. Refreshing the page will display the message again.  Steps to reproduce:   Pose a horrible question Get an unfinished answer Get the question locked Wait until the answer gets updated Use the inline answer refresh    Case in point (the Grinch that saved StackExchange):  INITIAL SITUATION         OOPS AN EDIT OCCURRED        WHERE DID IT GO?


When using Airpods with iPhone only everything works great, you put it on and start listening.   When you start to switch between your Mac and iPhone, I have problems. Most of the time, if I open the Airpods and connect them to the Mac, I will have this problem where every few seconds there is a second interrupt on sound (it stops). You can't hear music like that.   I'v tried to turn off Bluetooth on iPhone before connecting to the Mac, but this didn't work. I'v tried to restart the Mac - and sometimes this doesn't work either. I also ensured I have the latest firmware on the Airpots.   The experience is really not fun for a Mac user that switches between the Mac and an iPhone.   Does anyone have any other solutions or suggestions I can try to resolve this issue?


NullPointerException when I try to generate a pdf with with itextpdf

I tried to generate a pdf with two classes, but, I don't get the pdf because I have a NullPointerException in the line where I call the function  that generates the document in the second class. I separate the process to generate pdf´s, because the first class have many other necessary functions. I don't know what causes this problem.  package org.ors.osc;  import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;  import org.ors.osc.Eml2Pdf2; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException;  import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter;  public class Managepdf {    private Eml2Pdf2 eml2Pdf2;    public publishPdf2()  {   Document doc = new Document();   File pdfFile = dataDir.resourcePdfFile(resource.getShortname());   OutputStream out = null;    try {       out = new FileOutputStream(pdfFile);       PdfWriter.getInstance(doc, out);       eml2Pdf2.writeEmlIntoPdf(doc); //In this part get null   } catch (Exception e) {         e.printStackTrace();   } finally {       if (out != null) {           try {                   out.close();                 } catch (IOException e) {                   e.printStackTrace();           }       }   }    }  }   This class call the function writeEmlIntoPdf  package org.ors.oscar;  import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream;   import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException;  import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter;  public class Eml2Pdf2 {      public void writeEmlIntoPdf (Document doc) throws DocumentException, FileNotFoundException {          doc.open();         doc.add(new Paragraph("Hello World, iText!!"));         doc.add(new Paragraph(":D"));         doc.close();      }  }


Need to print an array in a different method

I'm running into an issue with my code and I can't figure out what's wrong.  Basically the project I'm working on wants me to use static methods to perform a few different tasks using arrays.  What I'm stuck on now, specifically, is printing my array.  The first thing I had to do was ask the user for the size of their array, and then have them input the data. After, I'm supposed to take the minimum value and maximum value, and then swap them.  I'm pretty sure my  code it right, but when I call the method I'm running into an error. This is what I have so far and I keep getting an error on lines 42 (beginning of swap method), 66 and 69:  public class ArraysStaticMethods {     static int[] array;     static public int arraySize;     static public int max;     static public int min;      //will create an array with user's input     private static int[] readInputs(int arraySize){         Scanner keyboard = new Scanner(System.in);          System.out.print("Enter the length of your array:  ");         arraySize = keyboard.nextInt();         array = new int[arraySize];          for (int i = 0; i <= array.length - 1; i++) {         System.out.print("Enter an integer: ");             int num = keyboard.nextInt();             array[i] = num;         }            //to test         System.out.println("Your array before:");         System.out.println(Arrays.toString(array));          return array;     }      //finds index of max and min values and swaps them     public static int[] swap(int[] array){         max = array[0];         min = array[0];         int maxIndex = 0;         int minIndex = 0;         for(int index = 1; index < array.length; index++){             if (array[index] > max){                 max = array[index];                 maxIndex = index;             }              if (array[index]<min) {                 min = array[index];                 minIndex = index;             }         }         array[maxIndex] = min;         array[minIndex] = max;          System.out.println("Your array after:");         System.out.println(Arrays.toString(array));         return array;     }      public static void displayOutputs(){         readInputs(arraySize);         swap(array);     }      public static void main(String[] args) {         displayOutputs();     } }


why the code is un deserlaizable ! cannot read serlaizable file?

why the code is un deserlaizable ! cannot read serlaizable file ! it write correctly in file but cannot read it     public ArrayList<customer> read_file(){ ArrayList <customer>file = new ArrayList<customer>(); try {     File f= new File("file.bin");     ObjectInputStream is= new ObjectInputStream (new FileInputStream("file.bin"));     int x=(int) f.length();       while(is.available()!=0){     file.add((customer)is.readObject()) ;      } } catch (FileNotFoundException ex) {     Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException | ClassNotFoundException ex) {     Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex); }  return file ;}


Moving 11.10 complete system to a new bigger Harddisk

I would like to move my current installation of Ubuntu 11.10 to a bigger harddisk, since the old one is failing.  I would like to avoid solutions like dd block copying (since there would be unused space at the end) with something cleaner, but I'm open to suggestions.  Partitions info:  Size  Used Avail Use% Mounted on Partition type Encrypted 19G  9.9G  7.6G  57% /           ext4 59G   50G  6.2G  90% /home       ext4           Yes   What is the best way to accomplish such a task, preferably with advantages/disadvantages of any given approach.


$G$ is a group with $e$ as it's identity element. The commutator group $[G,G] = <[x,y]|x,y \in G>$ such that $[x,y]=x^{-1}y^{-1}xy \: \: \: \forall x,y \in G$  Show that $[G,G]\triangleleft G$  Solution: If $[G,G]\triangleleft G$, then $g^{-1}[x,y]g$ must belong to [G,G].  $$g^{-1}[x,y]g$$ $$g^{-1}x^{-1}y^{-1}xyg$$  I am stuck here. I am not sure how to proceed since we have three elements...  Thanks for the help!


I have a Apex Trigger which makes the callout to the External system when a field in a record is updated. The Apex Trigger and the Callout method are like below trigger updateLocation Account (after update) {    List<String> jSONBody = new List<String>();          if(trigger.isupdate)     {         set<Id> AccountIds = new Set<Id>();         list<Account> acclist = new list<Account>();                  for( Id accountId : Trigger.newMap.keySet() ){             if( (Trigger.oldMap.get(accountId).Location__c != Trigger.newMap.get(accountId).Location__c))             {                 AccountIds.add(accountId);              }         }                  if(AccountIds.size()>0)         {             acclist = [Select id,Location__c from Account WHERE Id IN: AccountIds ];                          for(Account acc : acclist)             {                         handleD365Request.updSubSegJSON js = new handleD365Request.updSubSegJSON();                         js.Location= acc.Location__c;                         jSONBody.add(json.serialize(js));                         handleReq.handleAccountReqs(jSONBody,endPoint);             }}  Apex Class with future method   @future (callout=true)     public static void handleAccountReqs(List<String> jsonBody,String endPoint) {       ...............         for (String str : jsonBody)         {         Http http1 = new Http();         HttpRequest req1 = new HttpRequest();         String d365EndPoint = resource + endPoint;                    req1.setMethod('POST');         req1.setTimeout(20000);         req1.setHeader('Authorization','Bearer '+bearerToken);         req1.setEndpoint(d365EndPoint);         req1.setBody(str);         req1.setHeader('Content-Type', 'application/json;charset=UTF-8');         HttpResponse res1 = http1.send(req1);        }     }    The issue is we have workflow rules on the Accounts so when the update on the field happens the  Trigger is executed twice one from the record through through UI and other time when the workflow rules update the field. I am not here trying to restrict the trigger execute only once instead trying make call the external system when all the transaction is complete on the record.How can I make the callout  only when all the transaction is complete on the record. In the other question it was recommended to use the async callout , I read future callouts are async. I am not sure how I can handle the async callout out of the trigger or using the Continuation object as works with VF page I dont have a VF page here. Any help is greatly appreciated to handle this usecase.


Should Door Trim/Jamb be flush cut with bottom of base for carpet install?

I'm finishing a room that will have new carpet installed. I plan to install the baseboard height about 1/2" off the slab so carpet can flow underneath. The room is all painted (trim/walls), but no base is installed. My question is: should I cut the closet/doors trim/jambs at 1/2" as well (before base install) so the carpet can flow under or is it not a big deal? The carpet will be about 5/8" thick and 1/2" pad, uncompressed.


I am currently reading through a document  from MIT, page 4, and I am a little confused as to one of the concepts that they use.  In this document, there is mention of a . Could someone possibly define this for me please? I can't find anything too clear on the Internet.  Is this synonymous with the first moment of mass?


So I was in my New Leaf house and I accidentally put on a pair of pants instead of displaying them. Then I went and clicked on myself and I have no option to take off my pants. Ever. I swapped them with another pair for the display, but I can't get those off either. And the weird bit is when I put on the pants nothing was swapped back to my inventory.  How do I take off my pants?


Google Webmaster Tools is showing incorrect warnings - blocked by robots.txt

I'm getting a warning when submitting my sitemap to webmaster tools it saying that my pages are blocked by robots.txt when they are not.  Has any one come across this or a way to resolve this before ?  Here is the error message:    Here is my robots.txt file:  User-agent: * Disallow: Sitemap: http://mydomain.co.uk/sitemap.xml


QGIS Extract Nodes with M-Values for Linear Referencing

I have a MultiLineStringZM layer in a sqlite database, and I'm trying to visualize the measures or m-values at the vertexes. I've tried looking up information on how to do this in QGIS, and about all I've been able to gather is that this is not possible directly from the linestring layer and that the points need to be extracted to a separate layer.  I've used Vector --> Geometry Tools --> Extract nodes to create a multipoint layer representing the vertexes of my multlinestring layer, but the process loses the m-values of the vertexes. I need the m-values preserved by either saving the m-value as an attribute of the point, or something else?  Internally we have a command line tool that converts linestrings to a point shapefile with the m-values stored as an attribute on each point, and I've used that to verify that there are m-values assigned to the vertexes, and I could use that if I have to, but if possible it would be nice if this could be done directly inside of QGIS.  EDIT - Repeating what I've said above, but re-emphasizing the fact that we do have a command line tool that can achieve the results that I'm looking for that uses the GDAL libraries, so a solution showing just a partial answer in PyQGIS is not the answer I'm looking for. I'm looking for a built in tool, a plugin ready made for QGIS, or a complete script that can extract (not create/generate) and visualize m-values from a MultiLineStringZM or LineStringZM geometry.


How to update single application like VLC only?

I want to update only one Application like VLC or Firefox instead of upgrading all applications.  sudo apt-get upgrade   above command will update all the application, but I want only one particular application to be update.   Using Ubuntu 18.04 LTS on HP 15 R006TX Notebook PC.


I'm making an adventure map, and at some points I need there to be items on the ground. But when I use the /summon command, it always ends up as a stone block.  Here's what I've used:   /summon Item ~ ~ ~ {Item:{id:276,Count:1,tag:{display:{Name:"Mirage"},Unbreakable:1},Damage:0}}   This did not work, so I tried a simpler command:  /summon Item ~ ~ ~ {Item:{id:276,Count:1,tag:{},Damage:0}}   Which also summoned a stone block. Please note that I am in the Minecraft 1.9 snapshot 16w05b


NullPointerException from trying to get separate RGB components

I am trying to get the separate RGB components from each element in a 2D color array,but it keeps throwing a NullPointerException and I am not sure why.  CODE:             Color[][] grid = new Color[MaxColors][MaxColors];      int R1 = 0;       for(int x = 0; x < N; x++){         for(int y = 0; y < N; y++){               R1 = grid[x][y].getRed();              /* do something with R1*/            }     }   I also tried to first add the colors to a list and and then convert it to a one-dimensional array. But I still get the same error.      List<Color> colorList = new ArrayList<Color>();      for(int x = 0; x < N; x++){         for(int y = 0; y < N; y++){               colorList.add(grid[x][y]);          }     }      Color[] SortColors = colorList.toArray(new Color[colorList.size()]);             for(int x = 0; x < SortColors.length; x++){          R1 = SortColors[x].getRed();        System.out.print(" " + SortColors[x]);        System.out.print(" " + R1);      }   It prints the following:  java.awt.Color[r=98,g=85,b=217] 98 java.awt.Color[r=254,g=110,b=177] 254Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException     at DrawGrid.ColourSorting.sortColours(ColourSorting.java:43)


Where can I buy the German environmental badge while driving to my destination in Germany?

I am driving to Germany today and just noticed that I am traveling to a city which requires a  so called "Umwelt-plakette" or environmental badge to enter. Normally you need to order them in advance. Is it possible to buy them somewhere while on the road?


I have some applications crashing.  The message says  The application XXX (process YYY) has stopped unexpectedly. Please try again.  One of applications who is crashing is Google Maps. It is crashing all the time even if I don't run it. Only uninstallation helps.  What does this crashing mean?


What is the proper way to express the AND NOT operator in C#?

A co-worker and I had a discussion about what style is used to express the AND NOT condition in C#. While both methods work, we disagree about the style of the operator.   He says that && ! is the preferred way. For example:  db.Widget.Where(w => w.Name == "Foo" && !w.IsBlue);   I say that that will work, but &! will work. For example:  db.Widget.Where(w => w.Name == "Foo" &! w.IsBlue);   I used to have a book about C# style, but do not remember seeing this covered. What does SO use?


Where does the momentum exchange happen in a rocket?

Where does the momentum exchange happen in a rocket. Is it in the combustion chamber alone?


Ever since upgrading to Yosemite 2 days ago my notifications no longer work. I can't even open the notification center by clicking the icon in the menubar. Nothing happens when i click it.  Anyone know what's going on or where to look to further investigate the issue?


70’s or older novel about people who do not know the are in a generation ship

I read this novel in french translation at least 40 years ago, but I am positive it was a translation from english.   The main character lives in a jungle of “poniques” (which are revealed at the end to be “hydroponiques”). The are lots and lots of flies. He looks for a mysterious place, almost legendary, supposedly free of flies, called, I think, “l’Avant” (“The Front” ? “Forwards” ? or maybe in english the name was “The Bow”?) but he does not know he is in a ship. This is his entire world.  He is afraid he might meet terrifying “Géants” (probably just Giants in english, but who knows) or worse, normal-looking people, just among the tallest and heaviest, who are supposed accomplices of the Géants. I think the name in french was “Hors-Venus” (“who came from Outside”) though he does not really know of an “Outside”. It is just kind of a legend, again.  The light in this world comes from everywhere, there is nothing like our “sun”, but curiously, lights are off 1/3 of the time, and the length of darkness correspond to a whole waking/sleeping natural cycle of people who therefore are awake in the dark every third such cycle.  I forgot most of the story, but at the end it turns out that they are humans, or rather descendants from humans trapped in a generation ship. After so many generations they grew smaller, their waking/sleeping natural cycle shortened to 8 hours (but the ship kept a 8 hours dark, 16 hours light cycle for all that time). Somehow the ship automatically went back to Earth orbit, but “normal” Earthlings did not want to absorb these returning small people, for which they had a name I forgot (and anyway, even if I remember, it would only be the french translation; I do remember it had to do with speed, because they moved faster than Earthlings). But they did want to help them in their ship. Sometimes they (the Géants) would come for a short time, (for repairs ?), sometimes the shortest and slimmest earthling would made long-term undercover stays (but of course they are still the tallest and heaviest among the people in she ship, the “Hors-Venus”).   This becomes clear to the reader, at some point rather late in the book, where the point-of-view shifts to the earthlings for the first time. But it not yet understood by the main character.   At the end the truth comes out for too many people in the ship. The Earthlings have no choice but to bring everyone back to Earth.


Is C#'s null-conditional delegate invocation thread safe?

This is how I have always written event raisers; for example PropertyChanged:      public event PropertyChangedEventHandler PropertyChanged;     private void RaisePropertyChanged(string name)     {         var handler = PropertyChanged;         if (handler != null)             handler(this, new PropertyChangedEventArgs(name));     }   In the latest Visual Studio, however, the light bulb thingamabob suggested simplifying the code to this:      private void RaisePropertyChanged(string name)     {         PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));     }   Although I'm always in favor of simplification, I wanted to be sure this was safe.  In my original code, I assign the handler to a variable to prevent a race condition in which the subscriber could become disposed in between the null check and the invocation.  It seems to me that the new simplified form would suffer this condition, but I wanted to see if anyone could confirm or deny this.


Argue that the iterated integral of a continuous function is continuous

Suppose that $f : [a, b] \times [c, d] \to\mathbb R$ is a continuous function. Let $$G(y)= \int_a^b f(x, y) \, dx$$ $$H(x)= \int_a^b f(x, y) \, dy$$  Prove that $G$  is continuous on $[c, d]$ and $H$ is continuous on $[a, b]$.  So I know that the function will be uniformly continuous on the interval but I don't know where to go from there


Product of three consecutive positive integers is never a perfect power

I am trying to prove that the product of three consecutive positive integers is never a perfect power. Can anyone point to gaps in my proof and/or post an alternate solution?  Let the three positive consecutive integers be $n - 1$, $n$ and $n + 1$ and let $(n - 1)n(n + 1) = h^k, k \ge 2$. Note that $\gcd(n - 1, n) = 1$ and $(n, n + 1) = 1$ implies that $n$ itself must be a perfect power and of the form $z^k$ (which is apparent once we look at the canonical representation of $h^k$). That means $n^2 - 1$ must be a perfect power itself and of the form $a^k$. If $n$ is odd, $n = 2m + 1$ for some $m \in \mathbb{N}$ i. e. $(n - 1)(n + 1) = 2m(2m + 2) = 2^2m(m + 1) = a^k$. Using the fact that $(m, m + 1) = 1$, $m$ and $m + 1$ must be perfect powers themselves and so $k\leq 2$. Coupled with fact that $k > 1$, we infer $k = 2$. So, $n^2 - 1 = a^2$ which implies $n$ is not a natural number. We are left with the case when $n$ is even. Let $n = 2t + 1$. $(n + 1, n - 1) = 1$ as both are of (by the Euclidean algorithm). That means $n - 1$ and $n + 1$ are perfect powers. So, let $(n - 1) = b^k$ and $(n + 1) = l^k$. So, $l^k - b^k = 2$ for natural $l$ and $p$ and $k>1$. I will prove that the diophantine equation has no solutions. Consider the function $f(k) = l^k - b^k - 2$. $f'(k) = \frac{1}{l}e^{k\log l} - \frac{1}{b}e^{k\log b}>0$ if and only if $e^{k(log\frac{l}{b})}>\frac{l}{b}$. Taking logarithm again, we get an equivalent condition $(k - 1)\log\frac{l}{b}>0$ which is true as $k>1$ and $l>b$ as log is a monotonically increasing function.  Is my proof correct? Please feel free to chip in with your own solutions!


How do I quote a quote that has quotes in it?

The phrase I have to quote is "Did you never hear of the 'Fountain of Youth?' “. First of all, How do I quote this so people know I'm not stealing their work? The sentence I gave is what someone is saying in a short story. I know you can't remove any of the quotes because that is what someone is saying. I think that I would add another set of quotes or something but I'm at a loss. Please help. Thank you all in advance.


An equivalent condition to normality of topological spaces

I wonder if this claim is true: Let $X$ be a topological space. Then $X$ is normal iff for every two open subsets $U,V$ such that $U\cup V=X$, there exist two closed subsets $A\subset U$, $B\subset V$ such that $A\cup B=X$.  Thanks in advance.


Do Blog Post dates really affect Google rankings?

Should I remove them. I've got a blog with evergreen content.


javascript/jquery: hide and uncheck, checked option/options

The following code gets all the values from the checked checkboxes and store them in an array:   function SaveIt(id) {  var arrayCheckedCDs = $('input:checkbox[name="checkCD[]"]:checked').map(function () {             return this.value; }).get(); }   Here's the html:   <form>

      Id	     Artist	     Album	     Select

     1	     Jeff Buckley	     Grace	         <input type="checkbox" value="1|Buckley|Grace" name="checkCD[]" id="checkCD1">

     2	     U2	     Zooropa	         <input type="checkbox" value="2|U2|Zooropa" name="checkCD[]" id="checkCD2">
      .      .

  <input type="submit" onclick="javascript:SaveIt(id); return false;"value="submit">  </form>   After storing the values in arrayCheckedCDs I need to hide the selected rows and uncheck the selected checks.  The hiding is easy:   $('#cdsTable #cd'+id+'').hide();   But I don't have a clue on how to uncheck the selected checkboxes because the following is not working:   $('checkCD'+id+'').attr('checked', false);   Thanks for your help!


Package command line tools into an automator script or app?

I'd like to know if there's a way I could package compiled command line tools together as part of an automator script or an app.   Let's say, for example, I want to use a command line tool called foo and this relies on jpeglib and a few other libs. Am I able to put them in the same folder and somehow pipe this new $PATH to the foo app?  The reason I want to do this is that a client requires something that I usually use a bash script for. In order for them to do the same thing they'd need to installed XCode (to get the gcc compiler) and install the command line tools (through macports, fink, etc...) and of course that's hassle.


How do the Azkaban escapees get their wands back?

Sirius Black and a few Death Eaters escape Azkaban and seem to operate after that with their wands intact.  How come?  If a mere expulsion from Hogwarts entails wand destruction (as happened with Hagrid), shouldn't an Azkaban sentence entail the same?  And even if we imagine that the perceived impossibility of escape from Azkaban made it seem unnecessary to destroy the wand, this would apply to Sirius but not to Death Eaters.  PS: Two comments suggested that the escapees acquired new wands. It would be nice to have a more definitive answer than just a suggestion or a list of possibilities. Thanks.  PPS: Returning the personal property to a released prisoner is one thing, but the wand is a different matter: this is usually the tool of the crime, and I don't see how it can be argued that it should be returned and not destroyed. Again, Hagrid had his wand destroyed and he was not even sentenced to Azkaban.  PPPS: Maybe wand destruction is only done for non-fully-qualified wizards?


Im quite confused over the use of the radical. I can understand its definition in $\mathbb{R}$, with $\sqrt[n]{x}$ being defined for $x>0$ if $n$ an even integer greater than one and $x$ any real number if $n$ an odd integer greater than one. I believe its referred to as the principal $n$th root for even $n$ as it outputs the positive root rather than the negative root. In $\mathbb{R}$ there are no square roots of negative numbers, so on this domain it's undefined. I also know it defines the same function of $x$ as $x^{1/n}$ for $n$ integer greater than $1$.  In $\mathbb{C}$, a principal $n$th root function can be defined using the same radical notation which for me is confusing. The fact there are so many ways to define the principal $n$th root function in $\mathbb{C}$ makes it worse, and is $x^{1/2}= \sqrt{x}$ in $\mathbb{C}$ or do you have to define it that way after you have defined exactly what you mean by $\sqrt{x}$. Should this principal $n$th root function in $\mathbb{C}$ be viewed as a different function altogether from the one in $\mathbb{R}$, or just an extension of the domain?  Thanks


UFW Forwarding on Port 80 to port 3000 on Single VPS

The following is on a Virtual Private Server online and only one machine. I have tried a number of ideas using UFW on Ubuntu 15.10 to forward an incoming request on port 80 to a simple app I have running on 3000. My current ufw status looks like this.  To                         Action      From --                         ------      ---- 22/tcp (OpenSSH)           ALLOW IN    Anywhere 80 (HTTP)                  ALLOW IN    Anywhere 22/tcp (OpenSSH (v6))      ALLOW IN    Anywhere (v6) 80 (HTTP (v6))             ALLOW IN    Anywhere (v6)  162.243.39.90 3000         ALLOW FWD   162.243.39.90 80   To achieve that last line I used  ufw route allow from 162.243.39.90 port 3000 to 162.243.39.90 port 80   I tried several other combinations including  in on eth0    and  out on xxx   But,unless I open port 3000 directly, I can't access the app. My browser just spins it's wheels for a while before returning "web page not available error."  Any ideas?


Is it possible in an interactive bash shell to enter a command that outputs some text so that it appears at the next command prompt, as if the user had typed in that text at that prompt ?  I want to be able to source a script that will generate a command-line and output it so that it appears when the prompt returns after the script ends so that the user can optionally edit it before pressing enter to execute it.  This can be achieved with xdotool but that only works when the terminal is in an X window and only if it's installed.   [me@mybox] 100 $ xdotool type "ls -l" [me@mybox] 101 $ ls -l  <--- cursor appears here!   Can this be done using bash only?


I would like to keep "normal" Skype installed.  I have seen many options for "disabling" it such that it doesn't start online, but is there any way to simply uninstall it completely?   edit: thanks to The_IT_Guy_You_Don't_Like I have stopped it from auto-starting, but I will keep this question open as I would still like to be notified if anyone does come up with a solution for a full uninstall


Have you got a cold? Have you got flu? Have you got the flu?  Why can't we say a flu or the cold in the previous examples?


Projecting a world map on 6 segments to print on ball

Working with QGis and data from Natural Earth I would like to prepare a world map (1:50 000) for a globe that can be printed in 6 segments, which glued together build a ‘sphere’ (ball) according to the following graticule:    What projection would you recommend (Winkel tripel?) and how can I export the result (probably segment by segment?) via the print composer to a vector graphic program that allows me to generate the final printing layout (CMYK)?    I am not (yet) an experienced GIS user; the result will be used as teaching aid in poor South American schools.


UK citizen Entering the UK on a one way ticket and US passport

My son is a UK citizen but holds only a US passport. Will he be able to enter the UK on a one-way ticket? He has his certificate of UK citizenship.  We want to visit family and apply for his UK passport while in Britain. We plan to stay for only a couple of weeks.


How to calculate alcohol without OG reading?

I tested 'brewing' a cider for the first time a few weeks ago. Since this process was so extremely different from what I am used to with brewing beers I completely forgot to take an OG reading. To be honest the amount of alcohol in the brew usually doesn't matter but since the first question from people always is "How strong is it!?" I thought it might be nice to know.  This is a pear cider where the pears are 'centrifuged', liquid is then heated, cooled and then topped off with english cider yeast.  My first thought was to make a new smaller batch and test this, but don't have any more of the same types of pears (from own tree).  Is there any way to calculate the ABV without having taken the OG reading?


Should provide the option for a new close reason when reviewing requests to re-open

Now that the close system is a lot more user friendly and encourages people to edit their questions, I feel like reviewers are missing a crucial option.  When a question has been put on hold, say for "unclear what you are asking", the user may provide more information that clarifies but means that the question is invalid for another reason. When reviewing the request to open, I'm only given the option to leave closed, which presumably gives the impression that the question is still not clear enough, whereas what I actually want to say is that it is off topic or similar.  Related discussion:


I have a very big text file, about 80GB, and I need to cut a part form it that lies between two given lines. The part I need is not big, and I have not enough space left on the hard drive to do things like:  head -n 10000000 filename > auxiliary_part tail -n 1000 auxiliary_part > needed_part   How do I do that?


When I try to drag the frame viewing slider along the frame container while in pose mode, the model deforms. It continues to move even if I drag the slider to it's original position, meaning that the more I move it, the more it twists. When I go to edit mode and back to pose mode, the model resets to the correct position. Why is this happening?


Understanding "Coding to an Interface" to hide implementation details

I'm learning about the "coding to an interface to hide implementation details" design principle, and I'm confused over this idea. In my example, I have a WorkoutRoutine class that has a List of RoutineStep. By following the coding to an interface principle, my getWorkoutRoutine() method will return the List interface so that the implementation details of which list is used is hidden from the client. What if I decide to change the implementation from a List of RoutineStep to an array of RoutineStep, won't disclosing the return type as List reveal to the client that a list was implemented and not an array, tree, graph, or any other data structure? How can I best encapsulate my data structure for holding a collection of RoutineStep, such that I can change the implementation of the data structure without the client code breaking if the List was changed to an array, tree, graph, etc? public class WorkoutRoutine {            private List<RoutineStep> workoutRoutine;       public List<RoutineStep> getWorkoutRoutine() {          //What if I later decide to change the data structure from a List to an array, tree,               //graph, set, map. What approach should I take so that the client code doesn't break          //as they would have already coded to receive a List but after changing the           //implementation from a list to an array or any other data structure, their code would           //break.      } }


When I compile my tex document, I receive some warnings on all bib entries. The warning is   LaTeX Warning: Citation `foo' on page N undefined on input line XX.   The commands I use are   bibtex template.tex  I couldn't open file name `template.tex.aux'   pdflatex template.tex  ....  LaTeX Warning: Citation `foo' on page N undefined on input line XX.   The document is  documentclass[pageno]{jpaper}  \usepackage[normalem]{ulem} \usepackage{array} \usepackage{mathtools} \usepackage{multirow} \usepackage{rotating}  \begin{document}  \title{the tile}  \date{} \maketitle  \begin{abstract} the abs \end{abstract}  \section{Introduction}  .... \bstctlcite{bstctl:etal, bstctl:nodash, bstctl:simpurl} \bibliographystyle{IEEEtranS} \bibliography{references}  \end{document}   And the reference.bib file is   @IEEEtranBSTCTL{bstctl:etal,   CTLuse_forced_etal = {no},   CTLmax_names_forced_etal = {3}, }  @IEEEtranBSTCTL{bstctl:nodash,   CTLdash_repeated_names = {no}, }  @IEEEtranBSTCTL{bstctl:simpurl,   CTLname_url_prefix = {Available: }, }   @inproceedings{foo,   author = "some ones",   title = "{something}",   booktitle = {proc},   year = {2011},   pages = {1-2}, }  ....   What does the warning mean?


How should one interpret the Normal/Gaussian Distribution function?

While studying linear regression, my text book indicates that we account for noise, which is given by the function:  $$ \varepsilon_i \sim \mathcal{N}(0,\beta^{-1}).$$  I know this is a normal distribution and I know through research that noise and error rates usually follow this distribution. However, I am puzzled by how I should interpret this, given that the normal distribution function is represented by:  $$ \mathcal{N}(\mu,\sigma^2).$$  What I do not understand, is what is the significance of the parameters used here? Namely $0$ and $\beta^{-1}$? Should I care about these or is this just standard notation? Does this simply mean that the mean is 0 and the standard deviation is a beta function?


PHP query in MYSQL does not find umlaute

I am trying to find song titles in a MySQL database from PHP like this:  $sql = "SELECT s.* FROM {$this->tableName} AS s WHERE s.song LIKE '%{$value}%'";   If the title is e.g. "über", then searching for "uber" returns a match. But if I type "über" I don't find anything.  The song column is a fulltext column, utf8_general_ci.  I have a slight feeling that the problem is not in MYSQL, but in PHP.  Anyone any ideas?


Is Mordenkainen’s faithful hound considered a magical source?

The spell says it deals piercing damage. But it is a magic spell. Could it be magic piercing damage in case of nonmagic immunity?


How to make an extension method for all integral types?

I've written a static extension method that acts on an int, but I'd like to make it more robust to act on any , such as ushort or char. Is there any way to do this, short of code duplication?  Right now my method signature looks something like this:  public static class ExtensionMethods {     public static T MyCoolMethod<T>(this int value) where T : struct, IConvertible     {         ...     } }   Can I swap out int for some common interface, or do something else with generics to get it so this extension method can apply to any integral type?


Why does $p$ divide $\binom{p}{k}$ where $p$ is prime?

On the , it states that $p$ divides $\binom{p}{k}$ where $p$ is prime. It offers a proof that I don't understand from the very first line. It says that it is true since $\binom{p}{k}$ is  a natural number and $p$ divides the numerator but not the denominator. I don't get how that shows us anything really. Please could you explain why the above statement is true? Many thanks.


I am getting "you don't have enough free space in /var/cache/apt/archives/.I have tried apt-get clean ,apt-get autoclean,apt-get autoremove but nothing works for me.


per process private file system mount points

I was checking unshare command and according to it's man page,     unshare - run program with some namespaces unshared from parent   I also see there is a type of namespace listed as,   mount namespace               mounting and unmounting filesystems will not affect rest of the system.   What exactly is the purpose of this mount namespace? I am trying to understand this concept with the help of some example.


How do I stop SPAM from being sent from my server?

I have a VPS which I rent and it is running Centos 6. The VPS has ZPanel installed which is used to host some websites and emails.  One of my clients has noticed thousands of 'undeliverable' messages in her inbox. (FYI, Roundcube Webmail is used for email).  This lasted for a few days and now her email does not work at all.  I have come to the conclusion that her email address is sending out Spam and now the emails have stopped working because the domain has been blacklisted.  I checked out MXToolbox and I have confirmed that there are many blacklists.  I want to stop all spam from being sent out so here is my action plan:   Complete a virus scan on my server Change my client's webmail password Change all FTP passwords Change my ZAdmin Password Change the server root password Request removal from blacklists   I am nervous about this issue because I do not have a lot of experience with servers and I have heard that if I am black listed too many times it can become permanent. (This is the fourth time however I believe the previous occurrences were from bad reverse DNS settings??)  What further actions would you recommend I take? I need to be 100% sure that my sever is secure.  (FYI, my Antivirus is ClamAV).


Would you say  "The different types of cars"  or  "The different types of car"?  In reality my doubt is about types of event/events but can be more confusing to explain what I mean.  I have many events of the different types.


I would like to ask what the command pip does? Does it install a new application? If the answer is 'yes', so why do we have to type "apt-get install" after using "pip"?


Symbols with optional parameter in glossaries with \newglossary

I am trying to use the approach given in the solution here  (which looks really neat) for an application where i am having more than one glossary; in the original i have only a symbolslist and abbreviations, but here's an mwe adapting the symbolslist to the main list provided in the solution of the link above  \documentclass{scrbook} % \usepackage[acronym,toc]{glossaries} %this line is new \newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols} \makeglossaries \glsnoexpandfields  \newcommand*{\glsarg}{i}  \newglossaryentry{BetragVektor}{      name=\ensuremath{|\overline{u_i}|},      text=|\overline{u_{\glsarg}}|,     description={ABC}} \newglossaryentry{s:tP}{     name=\ensuremath{T_p\mathcal M},     text=T_\glsarg\mathcal M,     description={},     type=symbolslist %in own list } % modify the entry's format  \defglsentryfmt{%   \let\orgglsarg\glsarg   \ifdefempty\glsinsert   {}%   {%     \let\glsarg\glsinsert     \let\glsinsert\relax   }%   \glsgenentryfmt   \let\glsarg\orgglsarg }  \begin{document}  $\gls{BetragVektor}[1]$  $\gls{BetragVektor}$  $\gls{BetragVektor}[1]$  $\gls{BetragVektor}[2]$  $\gls{BetragVektor}[]$  $\gls{s:tP}[1]$  $\gls{s:tP}$  $\gls{s:tP}[1]$  $\gls{s:tP}[2]$  $\gls{s:tP}[]$  \printglossaries \end{document}   As mentioned, the only thing new is that I introduce a second list. The solution still seems to work for the main list as the result shows.    So somehow the new argument gets added in the and and \glsarg stays the same. How can I solve this, such that my new glossary also can have optional parameters on their entries?


What is the rationale for passing reference by const?

Maybe this question has been asked before but I just do not know how this question should be asked  I have the following code. I do not know what is the rationale for the parameter being passed in as const modifiers and then passed into internal constructor.   bool somefunction(const cv::Vec4i& l1_c, const cv::Vec4i& l2_c) {    cv::Vec4i l1(l1_c), l2(l2_c);    // why code it in such a manner?                                      // what the advantages?    ...... other codes but l1 and l2            is used as values ........  }   Isn't it more simple to use as cv::Vec4i& l1c as follows  bool somefunction(cv::Vec4i& l1_c, cv::Vec4i& l2_c) {        ...... other codes and l1_c and l2_c        is used as values .........  }   Regards


measure theory question about complete measure spaces

suppose that (X,M,\mu) is a measure space that is not complete. Show that there is a sequence of measurable functions on X that converge to a function that is not measurable.   I'm lost here!! is giving an example is enough or I need to show the question in general? if there is a proof I'd like some comments and/or hints. Thanks in advance.


How to know if a camera lens is for micro 4/3 cameras?

Hey guys  but I'm not sure if it's for my micro 4/3 camera:


How do I get a YN560 III flash to work on a canon 4000d camera

How do I get the Yongnuo YN560 III flash to work with a canon eos 4000d camera?


Weird unwanted multiple line break in ShareLaTeX

It's my first time using LaTeX and I've encountered something very strange. I have some mathematical/logic stuff that I wanted to put inside a verbatim tag (in order to enforce linebreaks and for formatting reasons), and somehow it gets surrounded by massive multiple-line linebreaks.   The LaTeX code is basically:  ...random text...  \begin{verbatim} logic stuff \end{verbatim}  ...some more text...   And for some reason, while formatted, the stuff inside the verbatim tags is separated to the other two columns by 3 or so blank lines, and I have no clue how to remove them as I don't know why they're even there in the first place. I've used the same exact formatting at other places in the document with no weird blank lines at all, and I can't find anything that's different from those cases either. This is how it looks in practice:


Regex matching end of string without using `$`

I was doing a  the other day, and the task was to match 'u' at the end of the string without using $. The goal was to match "fu", "tofu" and "snafu" but not "futz", "fusillade", "functional" or "discombobulated".   I came up with fu[^tsn], which worked on ; however, it does not pass the test as it does not match any of "fu", "tofu" and "snafu" for some reason. I'd like to know why it is not working, and if there is a smarter way to work around this (bonus: is there any real-life situation where not using $ would be better).


How to determine whether to use "with whomever" or "with whoever"

In these sentences, should I use whoever or whomever?  I'm going to the park with whomever/whoever. I'm going to the park with whomever/whoever I want.  Thanks!


In this sentence, is there an error?  In the name of revamping the law, investigation and trial should not be altered in a way which undermines the principles on which the judicial system was founded.  My book says that 'which' should be replaced by 'that. If yes, why is that?


How is it valid to compare p-value vs alpha-value?

We know that a p-value can be interpreted as the probability of seeing the same response given that the null hypothesis is true.   p-value is not the probability of making a type 1 error. (as emphasized here: )  However, the significance level, alpha, we know corresponds to the probability type 1 error.  How does it make sense to make comparison with alpha and p-value? They represent to different probabilities.


Dnd 5e Green flame blade and Flames of Phlegethos stacking

I’m playing an eldritch knight, and I’m looking to optimize the damage of green flame blade. The feature “flames of Phlegethos” states that “When you roll fire damage for a spell you cast, you can reroll any roll of 1 on the fire damage dice, but you must use the new roll, even if it is another 1. Whenever you cast a spell that deals fire damage, you can cause flames to wreathe you until the end of your next turn. The flames don’t harm you or your possessions, and they shed bright light out to 30 feet and dim light for an additional 30 feet. While the flames are present, any creature within 5 feet of you that hits you with a melee attack takes 1d4 fire damage” would both the 1d4 fire damage and the re-roll 1’s on fire damage trigger when using green flame blade? Or is this meant for spells of level 1 and higher?


I want to show that Aut$K_4\cong S_3$, where $K_4$ is the Klein's 4-group. I have shown that there exist 6 automorphsms from $K_4$ to $K_4$. But how to show that Aut$K_4$ is nonabelian?


Making a live USB with persistent storage

I'm trying to make a Ubuntu live USB, but I have run into some problems:   Used LiveUSB install on my Lubuntu laptop. Breaks USB drive until reformatted, does not boot. Used Startup Disk Creator on Lubuntu. Makes bootable drive, but not persistant storage Used UNetBootin on Lubuntu, puts Ubuntu on USB stick but does not make it bootable Tried to use Universal USB Installer with WINE, but it didn't work. The first time it could only see the floppy disk drive not the USB, the next time it threw an NSIS error. Tried to use Universal USB Installer on Windows, but it needed admin permissions   I have a laptop with Lubuntu installed* (that I have the sudo password for), a Windows 8 desktop without administrator permissions and a 32GB sandisk USB stick. Is there anything else I can do to get it to work?  *IBM T-42 Thinkpad with 1GB ram and an intel Centrio mobile processor that I had to force PAE to get Lubuntu to install if it is relevant.  As requested:     sudo lsblk -f  NAME   FSTYPE  LABEL                    MOUNTPOINT sdb    iso9660 Ubuntu 16.04.2 LTS amd64 2017-02-15-21-44-13-00                ├─sdb2 vfat    Ubuntu 16.04.2 LTS amd64 E561-C446                             └─sdb1 iso9660 Ubuntu 16.04.2 LTS amd64 2017-02-15-21-44-13-00                sr0                                                                    fd0                                                                    sda                                                                    ├─sda5 swap                             d571c534-8cb6-4e61-889c-6289f5a33421 [SWAP] ├─sda1 ntfs                             F8E0DED8E0DE9BE6                      └─sda6 ext4                             b14a062d-7884-494c-99fe-ddfe5bd5f4b4 /   sudo lsblk -m  NAME    SIZE OWNER GROUP MODE sdb    28.7G root  disk  brw-rw---- ├─sdb2  2.4M root  disk  brw-rw---- └─sdb1  1.5G root  disk  brw-rw---- sr0    1024M root  cdrom brw-rw---- fd0       4K root  disk  brw-rw---- sda    37.3G root  disk  brw-rw---- ├─sda5 1022M root  disk  brw-rw---- ├─sda1   14G root  disk  brw-rw---- └─sda6 22.3G root  disk  brw-rw----


Print screen img - png/eps loses quality with no scaling

I am trying to include image to LaTeX, but I loose quality.  It is a print-screen with image and little bit of text and it looks awful after the conversion to PDF.  I guess that DPI of the image is 90, it was taken in windows 8 with it's snipping tool.  I can convert the image with no visual cost to EPS but not PDF.  ANY suggestions, please ?  EDIT: it almost looks like the image is rescaled to 99.99%  I have tried to use pdflatex, ps2pdf, dvipdfm... nothing helped


I installed Ubuntu 20.04 on my MSI laptop. This is not a dual boot. I installed it to my SSD drive. I also have HDD drive for storage. But I can not write to it now (copy,paste,making file is impossible) In Disks application, I have my HDD drive is shown, it has two partitions i guess. Here is the screenshot of the Disks app:  Partition 1 size is 17 MB, Directory is /dev/sda1, Partition type Microsoft Reserved Contents Unknown. Partition 2 size is 1 TB, Directory /dev/sda2 UUID 88525363525354D2, Partition type is Basic Data Contents NTFS - mounted at /media/shamsiddin/Shamsiddin. I also have free space, don't know why. Free space size 1.8 MB, Directory /dev/sda Contents Unallocated Space. What should I do to make it writable?


pyplot.show() not working on pycharm on ubuntu

I have installed matplotlib but still when I run the program it shows:  Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. plt.show()  How to resolve this issue?


I'm wondering why, in a standard house, instead of using many low power AC-DC rectifier, there isn't a big (like 12V 20~50A) AC-DC rectifier which supplies some wall socket with a DC voltage? In the long run this should be less expensive, given the fact that AC to DC in one big apparatus is done better than in many low-quality transformers, right?  Also, modern chip DC voltage regulators have efficiency of >90%, so smaller (or even larger) voltages are still efficient and possible.  So we could use a 12V socket to charge a phone, desktop computer, laptop, radio etc... and still have an AC socket to move washing machine engine and other things that work better with an AC supply.  Why isn't this done?  edit: real question is: is it convenient, given a standard family (2 laptop, 1 desktop, 4 smarthpone, 1 big tv and some minor electonic) to do so?


If $Q$ is an ideal whose radical is a maximal ideal, then $Q$ is a primary ideal.   I wanted to prove this using these facts:   $Q$ is primary if and only if every zero divisor in $R/Q$ is nilpotent. Lattice isomorphism theorem: $R/J \cong (R/I)/(J/I), \ I \subset J$. $R/J$ is an integral domain if and only if $J/I$ is prime. If $R/\text{rad } Q$ is an integral domain, then every zero divisor in $R/Q$ is nilpotent.  Proof: When $I \subset J$, there is a surjective hom $R/I \to R/J$ given by $\bar{x} = x + I \mapsto x + J = \bar{x}$. So if $\overline{xy} = 0$ in $R/Q$ with $\bar{x}, \bar{y} \neq 0$, then $\overline{xy} = 0$ in $R/\text{rad } Q$, which means $\bar{x} = 0$, wlog, since we're in an integral domain.  But $\bar{x} = 0 $ in $R/ \text{rad } Q$ iff $x \in \text{rad } Q$ iff $x^n \in Q$ for some $n \geq 1$, which means then that $\bar{x}^n = 0 $ in $R / Q$.   To complete the proof we need to show that $(\text{rad } Q) / Q $ is prime.  But by the correspondence of ideals of $R$ that $\supset Q$ and ideals of $R/Q$, $\text{ rad } Q $ is maximal, hence prime and so then must $(\text{rad } Q)/ Q$ be prime.  But isn't $(\text{rad } Q) / Q$ also maximal and hence $R/\text{rad } Q $ is a field as well?  But I haven't seen any mention of this.


Quote unquote (or end-quote), unseparated by the actual quotation

In spoken English, people often say "quote-unquote" (or "quote-endquote") to indicate that part of what they are saying is a quotation (scare or otherwise). Sometimes the quoted material will go between quote and unquote, and occasionaly it will precede the quote-unquote. Often, though, "quote unquote" introduces the quoted material.  Why does quote unquote precede the quotation?  It would seem that quote opens the quoted text and that unquote closes it, but then why would we close the quotation before actually providing it. It would be the equivalent of writing your quotation marks together, "", rather than around the quoted text.  What are the origins of this construction?  Three years ago ChrisR asked  on whether it is correct to use quote, unquote. The answers did not deal with origins, but one commenter suggested that quote-unquote is a corruption of quote-on-quote, but he provided no evidence, nor any real explanation.


I'm trying to work through LaTeX Beginner's Guide by Stefan Kottwitz. Here's where I got stumped:  \documentclass{article} \newcommand{\keyword}[2][\bfseries]{{#1#2}} \begin{document} \keyword{Grouping} by curly braces limits the \keyword{scope} of \keyword[\itshape]{declarations}. \end{document}   The output adds boldface to "Groupings" and "scope," while "declarations" is italicized. I do not understand this syntax. I vaguely get that \bfseries is the "default" and \itshape got specifically subbed in for "declarations" but I cannot follow Kottwitz's explanation:     Let's look again at the bold marked line in the code. By using [\bfseries], we introduced an optional parameter. We refer to it with #1. Its default value is \bfseries. Since we used a declaration this time, we added a pair of braces to ensure that only the keyword is   affected by the declaration. Later in the document, we gave [\itshape]   to \keyword, changing the default formatting to italics.   Can I get a second opinion/explanation of what is going on here?


Why are cryptography algorithms not exported to certain countries?

There have been strict laws about the export of crypto software to certain countries. I can understand the intent, but never gauged the fact that there is nothing stopping these countries from developing their own crypto software. So why limit the export?   And in light of the recent NSA revelations, of backdoors being engineered into crypto algos, wouldn't the export of such compromised algorithms have helped to unravel secrets?


sufficient and necessary conditions for matrix to be diagonalize or triangular

There are many sufficient and necessary conditions that derive from the fact that a matrix can be diagonalize means it is similar to a diagonal matrix.  Is there a list of all of conditions?


I want to set up Java in my PC running Ubuntu 12.4 LTS with 64 bit architecture. I followed different posts on this site to do the same but I am confused, whilst I try to navigate to usr/lib/jvm I see a lot of folders at this point. Which one to set as path? I have attached  a screen shot to explain my issue:     EDIT: I have java installed but I am stuck at setting the Home for Java. I executed Java -version on my terminal and I had the following output:   root@pc-dev-a147:/# java -version java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.4) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) root@pc-dev-a147:/#    EDIT:  I think I solved the problem. These are the steps I took to gain the know how of how to do it:   1)   2)   3)   Now if I do echo $JAVA_HOME I get:  root@pc-dev-a147:/home/Johndoe/Downloads/Softwares/FlashTool# echo $JAVA_HOME /usr/lib/jvm/java-1.6.0-openjdk root@pc-dev-a147:/home/junaid/Downloads/Softwares/FlashTool#    However I am stuck in a different issue now which is explained


A function has at least 4 critical points on $[0,1]\times[0,1]$

Define a smooth function $f(x,y)$ on $\mathbb{R}^2$,which satisfies the following condition:$$f(x,y)=f(x+1,y);\quad f(x,y)=f(x,y+1)$$ (i.e.$f$ can be defined  on a torus)then hotw to proof that there are at least 4 critical points($f_{x}=f_{y}=0$) on the unit cube $[0,1]\times[0,1]$ (obviously,it has at least 2 critical point)?  I'm also like to know other examples of thhis kind(the topology implies some properties of the function defined on that space)  *Edit*I think there are  2 different proffs of this question,one only need some use of calculus techniques(which I tried but failed),another one may include some topological statements like Neal said.


Why does Cage visit the camp after the Omega is dead?

At the end of , if the Omega is killed and the war won, why does Cage go to the camp to meet Rita? Is he not in the camp only because he was arrested?


Looking for a word to describe a person who is all talk and no action

With all that's going on with EA and Star Wars Battlefront II right now, I've been trying to think of a word... For the last decade gamers have been complaining about lack of originality and microtransactions and day 1 DLC, and yet they still buy these games anyway. There's a picture of a Steam group for boycotting Modern Warfare, and almost everyone in the group is actively playing Modern Warfare.  So what what would be a good word to describe these people who complain about games with day 1 DLC, and then they buy the game and the DLC the day it comes out? People who say they want to boycott a game, and then immediately buy it and can't put it down? People who are all talk and no action.  I was thinking of the word hypocrite, that's close but I don't think that is quite what I'm looking for.


What are some suggestions for helping with potty training?

I have been potty training my daughter over the past few days and its not going to well.  How can I figure out if she is just not ready for it or I should try other techniques.  We came up with a sticker chart to give her motivation and prizes for going but no luck so far.    She is 2 1/2 years old and she seems to comprehend what we are saying but its not triggering when she has to go.  Any advice would be great.  What is interesting, she seems to have the pooping part down but for some reason doesn't recognize peeing.


I recently saw Andrew Price's tutorial on how to do realistic texturing.  At the end of the tutorial he said something along  the lines of needing to just "add scratches" to increase the realism.  How do you simply add scratches?  I understand that there are probably multiple methods, and I am interested in hearing as many as possible.  Thank you.