I have a conjecture that any two positive coprime integers $a$ and $b$ can be added to form any integer greater than or equal to $(a-1)(b-1)$.   This is true for $3$ and $5$, which can form any integer greater than or equal to $8$, where $8=3+5, 9=3+3+3, 10=5+5; k=3n+8$ or $3n+9$ or $3n+10$.  It is true for $4$ and $7$, which can form any integer greater than or equal to $18$, where $18=4+7+7, 19=4+4+4+7, 20=4+4+4+4+4, 21=7+7+7$, etc. How can it be proven that this will work for any two coprime numbers?

I am asked to prove that:       For integers $n, x,y > 0$, where $x,y$ are relatively prime,        every $n \ge (x-1) (y-1)$ can be expressed as $xa + yb$, with nonnegative integers $a,b \ge0$.   How should I approach this? I have very limited knowledge in number theory.


When I run these commands:   sudo add-apt-repository ppa:bitcoin/bitcoin sudo apt-get update sudo apt-get install bitcoin-qt   I get this:   E: Unable to locate package bitcoin-qt.   I am writing it completely correctly; is the PPA not updated for 14.04? Why can't I install the program?   Even if I write apt-cache search bitcoin it doesn't show up.  I'm on Lubuntu 14.04 fresh installation.

when i run these: sudo apt-get install bitcoin  OR sudo apt-get install bitcoin-qt  i get "E: Unable to locate package" what do i do?


I am trying to compute the integral closure of $\mathbb{Z}$ in $\mathbb{Q}[i].$ I have managed to show that $\mathbb{Z}[i]$ is inside the integral closure, and I suspect it is the entire thing. Can someone give me a nudge in the right direction?

I've just learned what the integral closure is.     I would like to find what is the intergral closure of $\mathbb{Z}$ in $\mathbb{Q}[i]$.   Let $\mathcal{R}$ the integral closure of $\mathbb{Z}$ in $\mathbb{Q}[i]$. To determine $\mathcal{R}$ I started to note that $$\mathbb{Z}[i]\subset \mathcal{R}.$$ Indeed if $\alpha = x+iy\in \mathbb{Z}[i]$, $\alpha$ is a root of the monic polynomial $$f(X)=X^2-2xX+x^2+y^2\in\mathbb{Z}[X].$$  And we know that since $\mathbb{Z}$ and $\mathbb{Q}[i]$ are rings so is $\mathcal{R}$.  From there I'm not sure, is it true that there exist no ring $A$ such that $$\mathbb{Z}[i] \subsetneq A \subsetneq \mathbb{Q}[i] \text{ ?}$$ I've assumed that and show that $1/2\notin \mathcal{R}$ for example, otherwise it exists a monic polynomial $f\in \mathbb{Z}[X]$ such that  $$f\left(\frac{1}{2}\right) =\frac{1}{2^n}+a_{n-1}\frac{1}{2^{n-1}}+\cdots+a_1\frac{1}{2}+a_0 =0$$  So  $$2^n f\left(\frac{1}{2}\right) =0 \iff -1=2\underbrace{(a_{n-1}+\cdots +2^{n-2}a_1+2^{n-1}a_0)}_{\in \mathbb{Z}}$$  which is impossible.  In conclusion $\mathbb{Q}[i]\not\subset\mathcal{R}$ so $\mathcal{R}=\mathbb{Z}[i]$.     Is my proof correct ? Is there an other (easier) way to prove that ? And the most important, is there exist a general method to find the integral closure please ?   Thank you for your help.


I am working on a character and the mouth looks like this so far:    My problem: The upper and lower teeth booth go beyond the black part. My goal is to neaten the mouth up so that it has a linear form and no parts stick out into the brown part as the teeth do now.   My idea was to take the black shape, copy it in front and somehow to achieve that all parts outside the shape's form vanish. I just want to neat up the mouth. But I haven't found out how to do this. Any ideas?

I'm struggling to find a way in Illustrator to do something which is very simple in Photoshop.  Here's an example:   I draw a plane. Now I want to draw stripes on it and a cockpit.  In Ps, I clip these two layers to the plane, and continue to edit the shape of the plane afterwards. The stripes and cockpit stay overlapping whatever the plane shape becomes.  In Ai, I've tried all the Pathfinder options, and although I can achieve the opposite effects to what I want, I can't simply 'clip' the details to the plane.   Here is a picture of what I mean:   What's the easiest way to do this in Ai? Do I need to find a different drawing flow to the way I do it in Ps?


I'm trying to make a deep copy of objects in Javascript:  let test = {     myProp: "Hello All" }  let testCopy1 = Object.create(test); let testCopy2 = JSON.parse(JSON.stringify(test));  // {} console.log(testCopy1);  // { myProp: 'Hello All' } console.log(testCopy2);   Why does Object.create() not copy this object? Or was this not the correct way of making a deep copy and there was another "less hacky" alternative to JSON.parse(JSON.stringify(myObject))  ?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


If I have Oracle Java SE JDK 8 installed on my mac, how can I upgrade to Open JDK 8 and be sure it will be used by default?  Motivation: Android build tools seem to need JDK 8, but according to the following links Oracle JDK 8 will not receive free updates after January 2019 for commercial use, not even security updates:

How do I install OpenJDK 8 on High Sierra or newer macOS? It looks like support for the Java Oracle JDK version 8 will be deprecated after January 2019  Additionally, it looks like publishing and distributing Docker containers with the Oracle Java JDK may not be legal


Have the following query:  consider test/auto/gen/init.py has a version field set as 1.1.1  Now start the script which contains:  Step 1: from test.auto import gen as auto_gen  Step 2: open the file test/auto/gen/__init__.py   Step 3: write __version__=1.1.2 to this file  Step 4: now use auto_gen to check the content          auto_gen.__version__ this still points to 1.1.1  But when i exit the script and comeback again then i see after importing the auto_gen.__version__ gives me updated value as 1.1.2  I also tried importing again after writing to the file but still the same problem. (from test.auto import gen as auto_gen)  So this problem i see as a generic one. In the sense if i am running a script and it generates a python file on the fly the object does not get updated.  Exit from the ipython or the script excecution and then running again solves this.  Can any please give some suggestions to this problem.

I have a long-running Python server and would like to be able to upgrade a service without restarting the server. What's the best way do do this?  if foo.py has changed:     unimport foo  <-- How do I do this?     import foo     myfoo = foo.Foo()


Is there any tool for  for Ruby (1.9)? , but maybe there is another tool.  I'm aware that a  has been asked here, but it was a couple years ago and I hope that something has changed.

I'm currently using  to get C0 code coverage analysis for a rails project that I'm working on.  However, those results are practically meaningless- I have 100% coverage according to rcov (as it only covers C0 analysis) and I've barely written half the test cases for the functionality that exists thus far.  I'm used to the useful results from the code coverage in Visual Studio 2008 Team, which has C1 coverage.  Are there any tools that provide similar coverage for ruby?


I am playing Fallout Shelter, and I do not know how to make everyone happy. I have tried getting a lot of Food, Energy, and Water, but that did not work. I have also gave them pets and bigger rooms but that does not work either. Do you have any advice?

All my vault dwellers look really unhappy and bummed out and aside from making babies I'm not sure how to make them happier.  Am I missing something really obvious?


If a Graph has a sub graph which is not  Hamiltonian, Will the Original graph also non Hamiltonian?  For Example, K3,4 is not Hamiltonian. What is I connect 10 K3,4 graphs in a way to makeup Meredith Graph? Can I say since K3,4 is on Hamiltonian, the super graph is also not?

I need to find out why  is not Hamiltonian  Meredith Graph is so complex to analyze in this regard. Can anyone help me wih their expertise?


In set theory I read that the sets are either finite or infinite. If they are infinite then there are also two categories countably infinite or uncountable. Natural numbers $\Bbb{N}$, integers $\Bbb{Z}$, rational numbers $\Bbb{Q}$ etc. are examples of countably infinite sets , whereas real numbers $\Bbb{R}$, irrational numbers are very well known examples of uncountable sets.  Today I was thinking about counting objects in our day to day life. That time I realize that we can count each and every object.   For example :   1) Suppose I decided to count number of sand particles on a beach, even though the number is huge but one can count them one by one. ( I also want to know that are they infinite or just finite ( a big natural number will be representing their quantity )).  2) Same thing when I think about number of leaves on big tree, they are definitely finite.  3) Stars in the sky ( I read on internet that there are approx $10^{24}$ stars in universe). etc.  Similarly many objects seems to be finite ( or countably infinite* ( * please correct me if I'm wrong)) .  So my question is do we have any object in real world which is uncountable.   Thanks in advance !

Can we even find examples of infinity in nature?


I remember reading a Science Fiction book during my youth (1980 ish) that was multiple books, had some Native American themes and the end puzzle all revolved around using twelve rings in a specific order to unlock some great machine or something.  I cannot remember the name or the author.  I am hoping someone here can help me out.

I recall that it might have been the second book of a series. It takes place in the future - not sure if in our universe - and there are robots who kill for the government (I think).  Story of a group of escapees from a prison that go to a massive ship and start a community.  The prisoners have tattooed faces.   I remember more the characters:   A lady that absorbs people and becomes them. A young girl who is a genius but has to be pregnant to be balanced. Two people from the prison they kidnapped and took with them.   Also I remember they terraformed the inside of their ship.


"It might be different if he were flagging down a passing car or trying to phone for help, but typing, in and of itself, is not an inherently dramatic activity."  In this sentence, I do not understand the phrase "in and of itself"  There should be some difference between the prepositions "in" and "of" in this context.   Please explain in as much detail as possible!

"In and of itself" is a phrase I find myself using all the time. But in and of itself, the phrase "in and of itself" has no meaning. That is, the individual words don't seem to contribute to the whole meaning of the phrase.


Iam about to configure roles and permissions now i saw a fuction called  "INTERACTION STUDIO" what is the so called "Interaction Studio" I never heard of it before!  Could you kindly explain?  Thank you

I've noticed that a new Interaction Studio app has magically appeared in our Marketing Cloud account today.     There's no documentation on this (at least I can't find any) and there aren't any  either. I note that existing Interactions (created in Journey Builder) don't appear in this app. I'd be grateful if someone could enlighten me exactly what this new app is for.   Does this replace Journey Builder? It appears to. That is, you can build and run an Interaction directly from Interaction Studio without the need for Journey Builder. However, I note that Interactions that I create in this app are available in Journey Builder. So, perhaps this isn't the end of Journey Builder. At least, for now.


I am trying to find the Galois group of $(x^2-2)(x^3-2)(x^3-3)$ over the field $\mathbb{Q}(i\sqrt{3})$. The roots of this polynomial are $\pm \sqrt{2}$, $\zeta_3^k \sqrt[3]{2}$, and $\zeta_3^j \sqrt[3]{3}$ for $j,k=0,1,2$, so that the splitting field over $\mathbb{Q}(i\sqrt{3})$ is $\mathbb{Q}(i\sqrt{3}, \sqrt{2}, \sqrt[3]{2}, \sqrt[3]{3}, \zeta_3)$.  Can someone help me find:   The Galois group over $\mathbb{Q}$ The Galois group over $\mathbb{Q}(i\sqrt{3})$

Determine the Galois group of the polynomial $(x^3-2)(x^3-3)(x^2-2)$ over $\mathbb{Q}(\sqrt {-3})$.   I tried to decompose the splitting field into a tower, but then it is very complicated in each step and since the degree is large, I cannot determine the group by guessing. It seems to me that Kummer theory might work, but there are $2$-degree and $3$-degree factors.


I was instantly intrigued by what this site has to offer in the way of the revelation of information uncovered by its members or users. I am, however, convinced that my very limited knowledge of the inner sanctum in information technology may well force me to recognize the unpleasant understanding that I may indeed be in over my head. At the risk of annoying the other users, I am asking for their patience and kindness for those of us who learned the workings our PC's by working with them for the most part and may therefore not be cognizant of some of the most basic IT terminology.   So, what is meant by META? As I stumble around the site I promise to leave it alone if I am unable to get the hang of it. I've always been quick to grasp concepts but this is worlds away from my professional area of expertise.

A guest at my house over the weekend stood puzzled next to my driveway. "What is that for?" she asked, pointing to a framework of 2x4s and hardware cloth perched on an old tire amid piles of sand. "Sifter." I said. "For what?" "For sifting gravel." "Why?" "To line walking paths, such as the one you're standing on..." Spend enough time working with something, and it's easy to forget how strange and unnatural your makeshift tooling can appear to those unfamiliar with it.  Such is the nature of these meta sites. For 5 years, we've been directing folks to them for discussion and feedback, to commune with their community, hash out misunderstandings, propose changes and document the current state of things. And... We haven't always been good about helping them get past the initial shock and confusion of dealing with this system. This has manifested in several unfortunate behaviors:  Downvoting of legitimate support questions - those that are not duplicates and reflect an actual bug or honest misunderstanding of how the system operates. Folks who are acting in good faith should be treated as such - , not shutting them down.  Closing questions that seek input and discussion from the community - in hindsight, adding "primarily opinion based" as a close reason on meta sites was... a terrible idea. The old "not constructive" close reason made some sense for rants and so on, but for a discussion site closing down questions that solicit opinions is just silly. Here on MSE, we prefer the following off-topic reason instead:  This question does not appear to seek input and discussion from the community. If you have encountered a problem on one of our sites, please describe it in detail. See also:    The perception that Stack Exchange is disrupting the normal operation of the site by talking about future plans - even when those plans involve the community. I talked about this a bit more on , but seeing this kind of backlash toward folks at the company who were trying to be open and receptive to discussion about what they were doing was kinda disheartening - we need to be doing more of that, not less.  A reluctance to ask questions about asking questions - which is about as meta as you can get, and yet we probably get more of these via email than we see on meta, while being the least-qualified to answer them well.   After an increasing number of complaints from both core users and moderators on a number of sites, we're taking a hard look at how we can improve this situation... Starting with a change to :  Meta is for...  ...$SiteName users to communicate with each other about $SiteName (asking questions about how the websites work, or about policies and community decisions) ...$SiteName  users to communicate with Stack Exchange the company (posting bugs, suggesting improvements, or proposing new features), and ...Stack Exchange to communicate with the community (soliciting feedback on new ideas or features, or discussing policies that affect the whole network)  Lots of topics are fair game, as long as they are about the Stack Exchange family of Q&A sites in some way. Any issue that concerns the core Stack Exchange engine that runs all Stack Exchange websites is welcome here.  This replaces the previous bullet list of specific topics, and aims to outline broad purposes with examples for clarification rather than constraining the scope to those examples. So... that's a start. But a documentation change isn't going to change misconceptions that've already built up among newer users. So I'm asking y'all for help: What do you think meta should be used for, and how can we better communicate this intent to new users?


Few months back, when I asked some question at stackoverflow.com, it used to appear on its main page questions list, in just few minutes. But for my last 2 questions, (during last 20 days) I've noticed that my question do not appear on main page. I even see other questions time stamps as 1s ago, 3s ago, 1hour ago, etc. Then, how come my question do not appear? Is there something changed? Or am I missing something?

I just asked a question on Stack Overflow. Often I notice my questions coming through on the front-page, but this one isn't there, even after I gave it some time. Why is this?


I am having an issue with code snippets. I am using babel as I am writing in Greek and when I want to use latin characters I type  \textlatin{} . Now I need to insert code in my document and latex prints the code with Greek characters. The problem is not solved using the above command outside of the;       \begin{lstlisting}             $ sudo apt-get install qemu-kvm     \end{lstlisting} which I want to print.  What I get is this:   I am using Miktex and TeXstudio on Win7. My preamble is this    \documentclass[12pt]{article} \usepackage{mathptmx} \usepackage{fullpage} \usepackage[titletoc,toc,page]{appendix} \usepackage{setspace} \usepackage{titlesec} \usepackage{blindtext} \usepackage{graphicx} \usepackage[english,greek]{babel} \usepackage[utf8]{inputenc} \usepackage[labelfont=bf]{caption} \usepackage{kerkis} \usepackage{url} \usepackage[titles]{tocloft} \usepackage[top=2.5cm, bottom=2.5cm, left=2.8cm, right=3cm]{geometry}  %-------------code snippets \usepackage{listings} %-------------hyperlinks \usepackage{hyperref} \hypersetup{     colorlinks=true,     linkcolor=black,      filecolor=blue,      urlcolor=blue,      citecolor=black} \urlstyle{same}  %------graphics------- \usepackage{float} \usepackage{wrapfig} \usepackage[export]{adjustbox}  \usepackage{enumerate,enumitem} \usepackage[autostyle=true,italian=guillemets]{csquotes} \MakeOuterQuote{"} \usepackage[style=numeric,sorting=none,url=false,isbn=false,doi=false,backend=bibtex,bibencoding=auto,autolang=other]{biblatex} \addbibresource{scholar} \renewcommand\cftsecfont{\normalfont} \renewcommand\cftsecpagefont{\normalfont}  \titlespacing*{\subsection} {0pt}{2.5ex plus 1ex minus .2ex}{0.3ex plus .2ex} \titlespacing*{\subsubsection} {0pt}{2.5ex plus 1ex minus .2ex}{0.3ex plus .2ex} \pagenumbering{gobble} \begin{document} ..... \end{document}   How can I solve this so code appears normally in latin characters? Thank you in advance.

I use the babel package in order to write in greek with font "kerkis".  I want to add code in english ("courier new" font) to my latex document but I get some difficulties.  Can anybody help me, please. Thank you in advance.  \documentclass[12pt]{article} \usepackage[english,greek]{babel} \usepackage[utf8x]{inputenc} \usepackage{graphicx} \usepackage{fancybox} \usepackage{verbatim} \usepackage{courier} \usepackage{kerkis} \usepackage{float} \usepackage{geometry} \usepackage{fancyhdr} \usepackage{titlesec} \usepackage{tocloft} \usepackage{hyperref} \usepackage{afterpage} \usepackage{color}    \usepackage{listings}  \renewcommand{\lstlistingname}{Κώδικας}  \lstset{  %matlab   backgroundcolor=\color{white},     basicstyle=\normalsize,    % COURIER NEW?        commentstyle=\color{green},    % comment style   escapeinside={\%*}{*)},           extendedchars=true,               frame=single,                              keywordstyle=\color{blue},       % keyword style   numbers=left,                     numbersep=5pt,                     numberstyle=\normalsize\color{black},    rulecolor=\color{black},           stepnumber=1,                      stringstyle=\color{magenta},     % string style }   \begin{document}  \selectlanguage{greek} Ελληνικά: \textlatin{this word means greek}  \selectlanguage{english} Now I write in english  \selectlanguage{greek} Ελληνικά  %\selectlanguage{english}???  \begin{lstlisting}[caption = \textlatin{example1.m}] { % Entropy E = 0; for i = 1:J     if p(i) ~= 0         E = E + p(i)*log2(1/p(i));     end end } \end{lstlisting}  \end{document}


the series of terms $\frac{1}{P_n}$, where $P_n$ is the $n^{th}$ prime number, is divergent, I know only one proof using logarithm, is there another proof?

How can the following equation be proven?     $$ \forall n > 2 : \sum_{p \le n}{\frac1{p}} = C + \ln\ln n + O\left(\frac1{\ln n}\right), $$  where $p$ is a prime number.   It's not homework; I just don't understand from where should I start.


STATEMENT: Let $H$ be a subgroup of a finite abelian group $G$. Show that $G$ has a subgroups that is isomorphic to $G/H$.  QUESTION: Could someone offer a proof using dual groups. I have found one use the fundamental theorem of finitely generated abelian groups, but I cannot seem to find on using dual groups.

Let $G$ be a finite abelian group of order $n$ and let $H$ be a subgroup of $G$ of order $m$. Show that $G$ has a subgroup isomorphic to $G/H$.   Here are my thoughts:  Define $\mu_n := \{z \in \mathbb{C}|z^n=1\}$ and $\mu:=\bigcup_{n=1}^{\infty}\mu_n$.  Since a finite abelian group is self-dual, we have $G/H \cong \operatorname{Hom}(G/H,\mu)$.   By the structure theorem for finite abelian groups, we have $$G \cong \mathbb{Z}_{n_1}\times \cdot \cdot \cdot \times \mathbb{Z}_{n_s}$$ where $n_{i+1}|n_i$ for $1 \leq i \leq s-1$ and $n_1\cdot \cdot \cdot n_s=n$, and $n_i \geq 2$ for all $i$.  Also, we have $$H \cong \mathbb{Z}_{m_1}\times \cdot \cdot \cdot \times \mathbb{Z}_{m_l}$$ where $m_{i+1}|m_i$ for $1 \leq i\leq l-1$ and $m_1 \cdot \cdot \cdot m_l=m$, and $m_i \geq 2$ for all $i$.   I want to somehow write $G/H$ as a product of cyclic subgroups of the $\mathbb{Z}_{n_i}$, for now denote this product by $A_1\times \cdot \cdot \cdot \times A_s$, where $A_i \leq \mathbb{Z}_{n_i}$, so that then I can write $$\operatorname{Hom}(G/H,\mu) \cong \operatorname{Hom}(A_1, \mu)\times \cdot \cdot \cdot \times \operatorname{Hom}(A_s, \mu).$$  Then, since $\operatorname{Hom}(A_i,\mu) \leq \operatorname{Hom}(\mathbb{Z}_{n_i},\mu)$ and (by an already known result) $\operatorname{Hom}(\mathbb{Z}_{n_i},\mu) \cong \mathbb{Z}_{n_i}$, I will have $$\operatorname{Hom}(G/H, \mu) \leq \mathbb{Z}_{n_1}\times \cdot \cdot \cdot \times \mathbb{Z}_{n_s}. $$  My problem is I cannot see how to write $G/H$ as such a product or if it's even possible. I appreciate any guidance and suggestions. Thanks.


Good morning. If I wanted to extract the LaTeX code from a pdfLaTeX document, what should I do? Thank you so much.

I know that hardly any information is passed to the PDF when a .tex file is compiled.  But is there a tool that can convert a PDF document back to (La)TeX?


Because I have 40.3K rep across all Stack Exchange sites, I get that blue orb above my avatar whenever someone flags something in chat, with the options to validate or invalidate a chat flag.  I don't want that pressure. I don't have the social capabilities to judge whether a flag is valid or not, especially in those cases where there is no clear violation of chat rules. Something like curses or offensive language I can just about judge that it's a valid flag. But more often than not, I simply cannot personally judge whether the flag is valid or invalid, and I feel like it's a waste of a potential flag judging to let me judge them. Especially considering the "Not sure" option actually is closer to "a little bit invalid" than it is to "don't ask me".  On top of that, there is the issue of emotional instability. Due to the inherent nature of a feature used to moderate offensive messages, nearly every message which appears in a blue orb is offensive content. People who use offensive language, or who voice racist or sexist opinions, or showcase political extremism.  I don't want to see stuff like that. The world right now is going through some rough patches, with terrorism, political extremism and highly flammable rhetoric from many sides. I'm already emotionally much more susceptible to bad news, and my happy/sad scale rarely measures above the neutral level. I'm not depressed, mind you, but I'm not happy either. I use the Bridge, the chat room I am a regular of, as a sort-of refuge from the worst of what's happening out there.   Having those offensive messages from the flags appear on my screen on a regular level confronts me with the negative sides of the world, and it moves my scale closer to the sad level. I fear that too much of that negative stuff will make me sad, and eventually depressed. I obviously don't want that.  Is there a way that I can say "stop giving me flag requests, because I can't handle them, both in the "I don't know what to do with them" and the "they're too much for me to handle mentally" senses"?

I'm not a moderator. I have ~50k rep on Server Fault. I am a regular in chat.  Because chat allows all 10k+ users across the network to act on chat flags, I (and many other regulars in SF chat) see some problematic users from other chats flagging things that aren't actually offensive.  I disagree with the current chat moderation model where anyone from any community with enough rep can vote on small snippets of text that provide no context. I think that's a bad system. It's been brought up time and again that there must be a better way to handle it, but nothing has happened to date.  If the global chat moderation system won't be re-thought, I would like to be given a way to opt out of seeing chat flags that originate from outside rooms that I'm currently in.   I was never elected as a mod, I never asked to be able to see them, and they get on my nerves.    TL;DR - I don't want to see chat flags from rooms that I'm not in. Let me opt out of seeing them.


I have two lists on names, first list of names just under 140k (Column A), second under just over 7k (Column B).  I want to see if there any matches from column A & B.  My Excel skills are basic at best. Any way I can do this?

I have 2 columns in Excel: the first contains a list of employee names who perform function A, and the second contains a list of employee names who perform function B.  What I want is to identify, in one cell, if there is one employee whose name appears in both the first and second columns. It does not have to show which name(s) appears in both columns, it just needs to identify IF there are any names that appear in both columns.


I've read of solutions, with let's say points $P(1,2,3)$, $Q(3,1,2)$, $R(2,3,1)$, where one subtracts point $P-Q$ and $P-R$ to get two vectors:  $\begin{pmatrix}1\\2\\3\end{pmatrix}-\begin{pmatrix}3\\1\\2\end{pmatrix}=\begin{pmatrix}-2\\1\\1\end{pmatrix}$  $\begin{pmatrix}1\\2\\3\end{pmatrix}-\begin{pmatrix}2\\3\\1\end{pmatrix}=\begin{pmatrix}-1\\-1\\2\end{pmatrix}$  to now get the cross-product:  $\begin{pmatrix}-2\\1\\1\end{pmatrix}\times\begin{pmatrix}-1\\-1\\2\end{pmatrix}=\begin{pmatrix}2\\-1\\2\end{pmatrix}$  hence the equation is $2x-y+2z=d$   by inserting, for example, point P we get  $2\times1-2+2\times3=d=6$  and thus  $2x-y+2z-6=0$  which can be transformed to  $z=-x+\frac12y+3$  so when I put in any point it should work right? When I put in R though, I get:  $1=\frac52$  So, what did I do wrong?

I have to find the equation of the plane that passes through $(0, 0, 0), (4, 0, -2), (0, 8, -6)$.   I have done the following:   The equation of the plane is of the form $$ax+by+cz+d=0$$   Since the points $(0, 0, 0), (4, 0, -2), (0, 8, -6)$ are points o fthe plane, we have that $$d=0 \\ 4a-2c=0 \Rightarrow a=\frac{c}{2} \\ 8b-6c=0 \Rightarrow b=\frac{3c}{4}$$   So $$\frac{c}{2}x+\frac{3c}{4}y+cz=0 \Rightarrow \frac{1}{2}x+\frac{3}{4}y+z=0$$   Is it correct??   Is there also an other way to find the equation of the plane??   Maybe using the cross-product??


Me and my girlfriend would like to go to Cuba from Denmark. We would like to go to Miami for a few days before going to Cuba and then spend the rest of the vacation in Cuba. So our flights are as follows:  Denmark-Miami  Miami-Havana  Havana-Denmark  My question is, if this is legal? I have read something about new regulation and that you can not go to Cuba from the USA as a tourist. But it is not easy to figure out, so du any of you know the answer to this?

I may be visiting the US soon for both work (conference) and leisure (sight-seeing) but was wondering whether it is possible to pay a visit to Cuba, as I see that direct commercial flights have been restarted. From what I can tell, it is still not permitted for US citizens to travel to Cuba as tourists (from the ).  What is the legal status of European citizens - would it be permitted for me to travel as a tourist from, say, Florida to Cuba on a commercial flight? Would this cause problems for me on my return to the US?  I understand that the question has been asked before () but the situation has changed and I believe it warrants asking again.


I know I didn't come up with this but I can't remember where it's from.  The story is that I think some soldiers or knights maybe were walking through a forest and were attacked by someone/something. Their hearts were ripped out but they didn't die so now they walk around the forest, carrying and pumping their hearts, not living or dead.   I feel like it was a story told to the main character, probably in a book but maybe not, as a sort of incidental/local colour tale that was not relevant to the plot.  Please help, where have I got this from?

It's a series of fantasy books in which the inhabitants of the world, from the time when they're children, get to somehow have an accompanying small animal that represents their soul or their personality.


I use LyX with classicthesis. I just switched from natbib/bibtex to biblatex/biber, because I need some of the functionalities. Everything works fine, but now the word "Bibliography" does not appear as "BIBLIOGRAPHY" in all capital letters in the headline as it should in classicthesis.  How can I change this behaviour?

I'm using classicthesis and have a problem with the header of my bibliography: instead of small caps I receive normalfont letters. I don't know how to make a reproducible MWE, because when I load a bibliography with   \begin{thebibliography}{99} \bibitem{example} \bibitem{example} \bibitem{example} \end{thebibliography}   the problem doesn't occur. And in the classicthesis-package itself, the bibliography is too short to show the problem (header starts at the second page).  So here's what I'm doing:   \documentclass[ twoside,openright,titlepage,numbers=noenddot,headinclude,footinclude=true,              cleardoublepage=empty,             fontsize=11pt, ngerman,american]{scrbook} \input{classicthesis-config}  \bibliography{bibliography} % change to your own bibliography \renewcommand*{\bibname}{Bibliography} \setbibpreamble{}  \begin{document} \tableofcontents \pagestyle{scrheadings} \part{Introduction} \include{Chapters/test} % insert chapter with lots of citations  \manualmark \markboth{\spacedlowsmallcaps{\bibname}}{\spacedlowsmallcaps{\bibname}} % work-around to have small caps also \refstepcounter{dummy} \addtocontents{toc}{\protect\vspace{\beforebibskip}} % to have the bib a bit from the rest in the toc \addcontentsline{toc}{chapter}{\tocEntry{\bibname}} \printbibliography   \end{document}   I'm not sure if this is working... if not you might have an idea anyway what I can try


Why is this code not working? Is there any rule to put a script tag at the end of the body (when I put the script tag at the end of the body, the code works).   I tried putting the script tag in the head, still not working. Shouldn't the script tag work anywhere inside the body?

When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered completely (or something like that). This seems to leave the end of the <body> section as a logical place for <script> tags.  So, where is the right place to put the <script> tags?  (This question references , in which it was suggested that JavaScript function calls should be moved from <a> tags to <script> tags. I'm specifically using jQuery, but more general answers are also appropriate.)


How can I configure emacs so that when I press the the Tab key it inserts spaces?

I want to make emacs insert either 4 spaces or a tab when I press the tab key. Nothing else. I don't want smart indentation, I don't want it to auto-align itself or try to do anything smart. I just want it to output 4 spaces (or a tab). =


I am writing sed expression which tries to print the text within a range of patterns:  apt-cache showpkg gdm | sed -n '/Reverse Depends:/,/Dependencies:/ p'   This basically works, current output is:  Reverse Depends:    libgdm1:i386,gdm 3.8.3-3~   ...   ...   gnome-control-center-data,gdm 3.0 Dependencies:    But I don't want the lines containing the patterns themselves, I want:    libgdm1:i386,gdm 3.8.3-3~   ...   ...   gnome-control-center-data,gdm 3.0   I know I can just just pipe the output to grep with -v option:  grep -v "Reverse Depends:"   But I hope sed has an option for it. I have tried  $ apt-cache showpkg gdm | sed -n '/Reverse Depends:/-1,/Dependencies:/-1 p'   But it doesn't work:  sed: -e expression #1, char 19: unknown command: `-'

I'm going to submit form using cURL, where some of the contents is come from other file, selected using sed  If param1 is line matching pattern from other file using sed, below command will works fine:  curl -d param1="$(sed -n '/matchpattern/p' file.txt)" -d param2=value2 http://example.com/submit   Now, go to the problem. I want show only text between 2 matching pattern excluding the matching pattern itself.  Lets say file.txt contains:  Bla bla bla firstmatch It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. secondmatch The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English.   Currently, lots of "beetween 2 matching pattern" sed command won't remove firstmatch and secondmatch.  I want the result to become:  It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.


#!/bin/bash export DISPLAY=:0 state=$(upower -i $(upower -e | grep BAT) | grep --color=never -E "state" ) stat=${state:25:32} batperct=$(upower -i $(upower -e | grep '/battery') | grep  -E "percentage:") bat=${batperct:24:26} intbat=$(echo $bat | cut -d'%' -f1) if [ "$intbat" -lt "15" -a "$stat" == "discharging" ]; then     notify-send 'battery low..! please plugin charger..... charge is only' "$intbat"     fi     The script runs fine when run as a normal user (bash script.sh). The desktop notification is displayed.  If I run it as root with sudo bash script.sh, the desktop notification is not displayed.  How can I use notify-send to notify users as root?  I am using Arch Linux.

I am using Arch Linux with KDE/Awesome WM. I am trying to get  notify-send to work with cron.   I have tried setting DISPLAY/XAUTHORITY variables, and running notify-send with "sudo -u", all without result.  I am able to call notify-send interactively from the session and get notifications.  FWIW, the cron job is running fine which I verified by echoing stuff to a temporary file. It is just the "notify-send" that fails to work.  Code:  [matrix@morpheus ~]$ crontab -l * * * * *  /home/matrix/scripts/notify.sh  [matrix@morpheus ~]$ cat /home/matrix/scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority echo "testing cron" >/tmp/crontest sudo -u matrix /usr/bin/notify-send "hello" echo "now tested notify-send" >>/tmp/crontest  [matrix@morpheus ~]$ cat /tmp/crontest testing cron now tested notify-send  [matrix@morpheus ~]$    As you can see the echo before & after notify-send worked. Also I have tried setting DISPLAY=:0.0   UPDATE: I searched a bit more and  needs to be set. And after hardcoding this using the value I got from my interactive session, the tiny little "hello" message started popping up on the screen every minute!   But the catch is this variable is not permanent per that post, so I'll have try the the named pipe solution suggested there.   [matrix@morpheus ~]$ cat scripts/notify.sh #!/bin/bash export DISPLAY=127.0.0.1:0.0 export XAUTHORITY=/home/matrix/.Xauthority export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-BouFPQKgqg,guid=64b483d7678f2196e780849752e67d3c echo "testing cron" >/tmp/crontest /usr/bin/notify-send "hello" echo "now tested notify-send" >>/tmp/crontest   Since cron doesn't seem to support notify-send (at least not directly) is there some other notification system that is more cron friendly that I can use?


My understanding is that once you use all your RAM, your PC will start using parts of the hard drive for temporary RAM and this is what slows your PC.  Say someone's PC has 4GB of RAM, but they never use more than 3GB, will they ever notice a speed increase if they install more RAM?  *I've seen threads with a similar question, but no direct answer.

Apparently, you can speed up your computer by adding more RAM. Is the amount of ram to be added is directly or indirectly related to the amount of hard-disk  space, processor speed, Motherboard etc... Can the memory of a RAM be compared with Virtual Memory and Cache Memory?  Note: About my PC Configuration: Intel core i5 processor, Motherboard DP55WB 4GB RAM, 700 GB Hard-disk space.


I'm using beamer class and I want to add a figure to my slides, however I keep getting this error :       ! Illegal parameter number in definition of \iterate.      <to be read again>                 1       l.229 \end{frame}           ?   This is my code :  \begin{frame}  \begin{figure}  \centering  \begin{tikzpicture}[   node distance = 0pt,   shorten <>/.style = {shorten <=#1, shorten >=#1},   start chain = going right,    box/.style = {shape=rectangle, draw, fill=#1,             minimum width=6mm, minimum height=9mm, outer sep=0pt,             node contents={},             on chain},    box/.default = none,     arrow/.style = {draw=blue!60!black, thick, shorten <>=1mm,              out=90, in=90, looseness=3,             -{Straight Barb[bend]}},      arbox/.style = {inner sep=0pt, minimum size=5pt},   %crbox/.style = {inner sep=0pt,           %  node contents={\scriptsize\color{red}$\boldsymbol{\times}$}            % },     label distance = -3pt,      sx/.style = {xshift=#1pt}                     ]    \node (n0) [box,dashed];       \foreach \i in {1,2,3}           \ifnum\i<1               \node (n\i) [box]                   \else               \node (n\i) [box=gray!25]             \fi;            \node (n14) [box,dashed];  \draw[ultra thick,dotted,shorten <=1mm]  (n0)  -- + (-9mm,0mm); \draw[ultra thick,dotted,shorten <=1mm]  (n14) -- + (+9mm,0mm);    %\fill[black!75]      \end{tikzpicture}        \end{figure}        \end{frame}   I don't know exactly why figures inside a frame make a problem ? I would appreciate it if anyone could help me with that.

So I am trying to insert a functioning tikz image into a beamer project and it keeps giving me an error.  \documentclass{beamer} \usetheme{Warsaw} \usepackage{tikz} \usetikzlibrary{shapes,trees,positioning} \begin{document} \begin{frame}{Examples} \begin{center} \begin{tikzpicture}[level/.style={sibling distance=60mm/#1},minimum size=20pt,scale=.8, every node/.style={transform shape}] % If you want to scale the picture insert ``scale= (something), every node/.style={transform shape}'' Ex:[level/.style={sibling  distance=60mm/#1},minimum size=20pt,scale=.8, every node/.style={transform shape}] would  scale to 80% of original size \node [circle,draw] (z){\textbf{$u$}}   child {node [circle,draw,fill=black,text=white] (a) {\textbf{$v$}}     child {node [circle,draw,fill=black,text=white] (c) {}}     child {node [circle,draw] (d) {}     }   }   child {node [circle,draw,fill=black,text=white] (b) {\textbf{$w$}}     child {node [circle,draw,fill=black,text=white] (e) {}}      child {node [circle,draw] (f) {}}   }; \end{tikzpicture} \end{center} \end{frame} \end{document}   The error I keep getting is:   ./SDN Presentation.tex:61: Illegal parameter number in definition of \iterate. <to be read again>                     1 l.61 \end{frame}   If I delete the /#1 at the beginning of the picture I get an image though not the one I am looking for.  Not sure how to fix this issue since the code works for the amsart document class.


I want the positions of texts in the last row (2\pi and 4\pi) to be in the middle of the row. Everything else is fine and should be kept unchanged.    \usepackage{array,bm,amsmath} \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}   \begin{table} \caption{Comparisons between the 0-$\pi$ qubit and the non-compact transmon/CPB.}   \centering   \begin{tabular}{|P{3.5cm}|P{2.2cm}|P{2.2cm}|}     \hline      & \textbf{Qubit potential periodicity}          & \textbf{Gate potential periodicity} \\ \hline     \textbf{The 0-}$\bm{\pi}$ \textbf{qubit [7,18]}                 & $\pi$ & $2\pi$   \\ \hline     \textbf{The non-compact transmon/CPB}                      &  $2\pi$  & $4\pi$   \\ \hline   \end{tabular}   \label{table:compare}   \end{table}   How can I do that?

How can I vertically center the content in the cells of the left table (marked 1) so that it looks like the cells of the right table (marked 2):    My code thus far:  \begin{table}[H]     \setcellgapes{5pt}     \makegapedcells     \caption{Local Area Network vs Wide Area Network.}     \label{tab:lanvswan}     \centering     \begin{tabular}{         >{\centering\arraybackslash}p{3.5cm}         |>{\centering\arraybackslash}p{4.5cm}         |>{\centering\arraybackslash}p{4.5cm}         }         \thead{Características}     & \thead{LAN}                           & \thead{WAN}                                                       \\  \hline         Extensión Geográfica        & Pequeña                               & Extensa                                                           \\  \hline         Dispositivos                & Host, Switches (L2 y L3) y Routers    & Especializados de ATM y Frame Relay, Switches (L3) y Routers      \\  \hline         Tecnologías                 & Ethernet                              & MPLS, ATM, Frame Relay y X.25     \end{tabular} \end{table}


I'm having a massive issue with trying to install the Netflix desktop app.  I have added the repository (roughly four times, with updates) and everytime I get the following message    azazel@azazel-Aspire-5733Z:~/Downloads$ sudo apt-get install netflix-desktop  Reading package lists... Done  Building dependency tree         Reading state information... Done  Some packages could not be installed. This may mean that you have  requested an impossible situation or if you are using the unstable  distribution that some required packages have not yet been created  or been moved out of Incoming.  The following information may help to resolve the situation:   The following packages have unmet dependencies:  netflix-desktop : Depends: wine-browser-installer (= 0.8.1~saucy) but it is not         going to be installed                Depends: wine-silverlight4-installer but it is not going to be installed  E: Unable to correct problems, you have held broken packages.   I would really like to be able to watch Netflix, as my virtual machine isn't working.  Any ideas on how to fix this?

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I am trying to traverse a 2d array with a nested for loop, and it has different values when I graph it, but when I try to access the data, it the elements are all the same. I have tried different styles of for loops but get the same errors. This is more of an error that I don't understand coming from Java.  predicted_values = 2*[2*[0]] #  number of lines *[ number of data points *[0]]  for row in predicted_values:      #last given price     row[0] = adj_close[len(adj_close)-1]       for index in xrange(1,len(row)):          random_float_0_1 = random.random()         drift = meanPDR -variance/2         random_offset = standard_deviation*norm.ppf(random_float_0_1)         t = drift + random_offset         predicted_stock_price = row[index-1]*math.exp(t)         row[index] = predicted_stock_price         print predicted_values      plt.plot(range(0,len(row)),row)   This outputs  [[152.186905, 149.88609120889242], [152.186905, 149.88609120889242]] [[152.186905, 151.0754945683822], [152.186905, 151.0754945683822]]   when I want it to output  [[152.186905, 149.88609120889242], [152.186905, 0]] [[152.186905, 149.88609120889242], [152.186905, 151.0754945683822]]   What happened to overwrite the previous data that it shouldn't have access to.

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


I have the following formula and need to prove it with natural deduction:  $$p \to (\neg q \leftrightarrow (r \lor s)), \neg s \vdash (p \land \neg q) \to r$$  I was able to get the below finished but can't fill in what is missing.  1.   p -> (~q <-> (r v s)) 2.   ~s 3.  | (p ^ ~q)              (assumption) 4.  | p                    (elim ^) 3 5.  | ~q                    (elim ^) 3 6.  | (~q <-> (r v s))      (elim ->) 1. 7.  | (r v s)              (elim ->) 6.  n-1.| r   n.  (p ^ ~q) -> r

I am having trouble applying Natural Deduction rule and solving these two questions. How do I start this.  \begin{align} \{(p\lor q)\to r\}&\vdash_{\sf ND} p\to r\\ \{p\to\neg q\leftrightarrow(r\lor s),\neg s\}&\vdash_{\sf ND} (p\land\neg q)\to r \end{align}


From a single account, one is rate-limited in how many votes can be cast per day (depending on privilege level for some vote types). Similarly, there is a rate-limit on how many reviews can be performed in the review queues. An active curator may have the time, energy, and inclination to review enough posts that they run into these rate-limits somewhat regularly. While creating a sock puppet account for the purposes of voting on one's own content is strictly prohibited, it's not clear to me whether it's prohibited to create a sock puppet to get around these rate-limits on voting for the purposes of curation. I understand that the sock puppet can't vote on the same posts as the primary account, but this could be ensured manually, or with a userscript. Also, the sock puppet would need to reach around 3k, without any help from the primary account, in order to cast close/reopen votes, but this could reasonably be achieved in 6 to 8 weeks. It seems ok to me, but it is technically doing something that is not possible from a single account (and is the point, in fact), so I'm not sure if there's something that I'm missing here that makes this a problem. Reading through  this case is neither mentioned in the list of things that are allowed, nor in the list of things that are disallowed. Of course, neither of those lists are meant to be exhaustive. So, is it acceptable to create a sock puppet for the purposes of increasing the amount of curation one can do?

A high-reputation, highly-active user has already been dinged once for a sockpuppet, and I just dinged him again. He probably has another sockpuppet as well.   What are the guidelines for handling users who game the system in this fashion? Specifically,   How can I be sure I'm looking at a sockpuppet? When should sockpuppets be considered a problem? How should moderators handle problematic sockpuppets once they've been identified? I was suspended for sockpuppetting and feel this is unfair


I attack with  and other creatures and they choose to block all of my creatures.   Would I, as the attacker, get to assign combat damage, and can choose Bellowing Aegisaur's attack to be first making its Enrage go into effect placing +1/+1 counters on my other creatures before their damage is calculated?   Conversely, if I block with it can I ask them to assign damage in order and if they choose Bellowing Aegisaur before some of my other blockers would they receive their counters before their damage calculation?

If I attack with  and another creature with lifelink, is Karlov getting 2 counters before he deals his damage this turn? Or are both damages dealt at the same time?


How to get all possible combination of cases as well as letters for a string in python?  Example   input:'ab'   output:aB', 'Ba', 'BA', 'Ab', 'AB', 'bA'  input : 'dan'    output:aND', 'ANd', 'Dna', 'naD', 'DaN', 'aDn', 'Adn', 'dnA', 'NdA', 'anD', 'DnA', 'NAD', 'nAD', 'Dan', 'NDA', 'nAd', 'AdN', 'DAn', 'AnD', 'And', 'DNA', 'daN', 'adN', 'nDa', 'dAN', 'dNa', 'aDN', 'ADN', 'dNA', 'Nda', 'AND', 'DNa', 'NaD', 'Nad', 'aNd', 'nDA', 'dAn', 'NAd', 'ndA', 'NDa', 'ADn', 'DAN'

How do you generate all the permutations of a list in Python, independently of the type of elements in that list?  For example:  permutations([]) []  permutations([1]) [1]  permutations([1, 2]) [1, 2] [2, 1]  permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1]


Is this by-design or some mistake? I see a Facebook icon on the . It is really not looking great if it is the new design.

The changes have now been rolled out across the network!    Most of these changes are cosmetic.  We moved the list into the main content area, increased the font size a little, and used the check marks from badges to show progression.  Each privilege gets a one sentence summary so that you can easily browse the list, and we have added categories and filters to help you get a better idea of what kind of privileges there are.  Finally, we have added a progress bar to the right sidebar instead of showing simultaneous progression for all of the privileges.


An object is missing when rendered. It is not restricted, clickable, and can be seen in the 3D View. I have searched the internet, and this forum as well but found nothing.  I have provided 2 screenshots if I ever did something wrong Please tell me when you need another screenshot of something.

I have a model which you can see here (camera perspective).    In the second image, you can see how the render turned out.    I'm at my wit's end trying to figure our why it's not showing up in the render. If anyone needs more information, just ask and I'll get it to you. I've already checked the normals and they're not the cause.


I'm not sure if this is a bug, or something else.  I have a number of different objects, that are all placed in the same collection, and whose origins are all at 0,0,0.   For some reason, this makes it so when I try to move, or scale, or rotate them, they all do it.   I want only one of these objects to do so. What should I do about this?

My problem is that I sometimes lose the ability to independently translate or otherwise transform any parts of a single mesh. If I try, for example, to just translate several faces, edges, or vertices, then the entire mesh will stretch and displace itself in order to follow the translation. Or, alternatively, if I try to translate just one face then the whole mesh will move as if I'm translating in Object Mode.  I'm not really sure I know how to describe this problem properly. I don't even know how to reliably reproduce it. It seems to happen to any given mesh at random, and it doesn't stop happening to that mesh unless I delete and remake it.  I assume that I must be doing something wrong to cause this to happen. Does anyone have any ideas? Thanks.


There was a sword and shield by the lion. There were a sword and a shield by the lion. Which of the two is correct? Both sound awkward.

All he had were bruises and cuts.      All he had was  bruises and cuts.   What are the differences between these sentences? Are they both grammatical and, if so, which one is more natural?


I am trying to understand buffer, endl vs \n and why the latter is more efficient than endl. Specifically, I am reading this  The following code is supposedly output 1,2,3,4,5 at once #include <iostream> #include <windows.h> using namespace std;   int main() {    for (int i = 1; i <= 5; ++i)    {       cout << i << " " ;      Sleep(300);    }      cout << endl;     return 0; }  whereas the following will output each integer one at a time: #include <iostream> #include <windows.h> using namespace std; int main() {    for (int i = 1; i <= 5; ++i)    {       cout << i << " " << flush;       Sleep(300);    }    return 0; }  However, both looks exactly the same during the time of execution, they appear one  a time. Is my understanding wrong? I'm also confused why endl is less efficient compared to \n. From what I read, endl adds a \n and then flushes. Isn't this more efficient, since it waits for the buffer to be full then output everything at once, compared to \n? Please correct my flawed understanding, thank you.

Many C++ books contain example code like this...  std::cout << "Test line" << std::endl;   ...so I've always done that too. But I've seen a lot of code from working developers like this instead:  std::cout << "Test line\n";   Is there a technical reason to prefer one over the other, or is it just a matter of coding style?


Is there anyway I can look for all the methods available under the components and how to use it? Like, what are the methods available under component, event objects?  EDIT: I need methods under component objects like Component, event for which I cannot get method list similar to $A through browser.

The  lists a few common $A functions and the  references some others that are useful for certain situations.  I can view the $A object in the JavaScript console and get a list of a whole lot more, including some nested such as the $A.util functions.    Is there documentation on the $A functions that are part of the published API (i.e., safe to use)?


I just learned ffmpeg accepts .txt files and renders the content. See:  ffmpeg -i bees.txt -r 2 bees.gif     Where can i find more information about this behavior (docs/sourcecode ?), and are there other "magic" file endings like this ? It looks like ffmpeg ignores the file ending in almost all other cases.

I'm trying to extract a subtitle from a Blu-ray disc and it is an hdmv_pgs_subtitle. So I try  ffmpeg -i file.m2ts -map 0:3 -scodec copy rip3/test.sub    and get   Could not write header for output file #0 (incorrect codec parameters ?):  Operation not permitted   Then I do   ffmpeg -i file.m2ts -map 0:3 -scodec copy rip3/test.sup  ffmpeg -i file.m2ts -map 0:3 -scodec copy rip3/test.srt   and a bunch of other different extensions, until I give .mkv a shot, which works.   How can I find what extensions ffmpeg allows? I haven't found one place that e.g. names .mkv as an extension  ffmpeg -formats mentions matroska, but doesn't say that .mkv is the extension. So is there a way to find all supported file extensions for ffmpeg?  EDIT: After reading the answer from slhck I found the extensions by doing this command in the sourcefolder.     find . -type f -iname "*.c" -exec egrep -H ".extensions" {} \;   The filename will give some information about what kind of format it is.


I downloaded a video using Chrome in Ubuntu by giving empty name, i.e.  .mp4  only. I can play using Chrome when I click on it in the download section in Chrome but I can not find this video in the folder.  How to locate this video?

I wanted to add classpath to my JDK. While searching a way to do it I noticed everyone open .profile file using terminal. But when I want to open and edit it with a text editor I couldn't see that file in Home folder.  Can someone tell me why is this. And also if possible how can I access .profile in home folder the GUI way.


I want to use madrid theme and I want to achieve the horizontal shading effect in the frametitle with the colors like the following picture    I try as follows by using the following two answers (, ):  \documentclass[xcolor=dvipsnames]{beamer} \usecolortheme[named=blue]{structure}  %------------------------\AtBeginSubsection[]---------------------- \AtBeginSubsection[]{        \begin{frame}<beamer>[noframenumbering,plain]{Outline}         \transsplitverticalout         \tableofcontents[currentsection,currentsubsection]     \end{frame} }  \usetheme{Madrid}  %-----------------------------footline----------------------------- \setbeamertemplate{footline}{     \leavevmode%     \hbox{%         \begin{beamercolorbox}[wd=.3\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}%             \usebeamerfont{author in head/foot}\insertshortauthor         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}%             \usebeamerfont{title in head/foot}\insertshorttitle %            \hspace*{3em} %            \insertframenumber{} / \inserttotalframenumber\hspace*{1ex}         \end{beamercolorbox}%         \begin{beamercolorbox}[wd=.1\paperwidth,ht=2.25ex,dp=1ex,center]{page number in head/foot}% %            \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em}             \insertframenumber{} / \inserttotalframenumber         \end{beamercolorbox}%             }%     \vskip0pt% }  \setbeamercolor{author in head/foot}{bg=black} \setbeamercolor{title in head/foot}{bg=blue} \setbeamercolor{page number in head/foot}{bg=black}  \title[The essential numerical range and the Olsen problem]{The  essential numerical range and the Olsen problem} \author[{Student} (University of ....)]{Student}     \useoutertheme{shadow}       \usepackage{tikz}      \usetikzlibrary{shadings}      \colorlet{titleleft}{red!70!black}      \colorlet{titleright}{white}       \setbeamercolor*{frametitle}{fg=white}     \makeatletter    \pgfdeclarehorizontalshading[titleleft,titleright]      {beamer@frametitleshade}      {\paperheight}{%      color(0pt)=(titleleft);    color(\paperwidth)=(titleright)}   \makeatother \begin{document}  \begin{frame}{linear relation}  \end{frame}  \end{document}     However I remark that I loss my previous botom

This question is similar to . I want to achieve the horizontal shading effect in the frametitle and when I use  \setbeamertemplate{frametitle}[horizontal shading] [left=red, right=white]   I get compilation errors:  LaTeX Error: Missing \begin{document}. [[]   Vertical shading seems to work just fine.


The store says WINE is installed, but I don't see it in my apps, or an option to use WINE to open a .exe file.

Can .exe and .msi files (Windows software) be installed in Ubuntu?


The down key on my laptop is broken.  I want to map shift+up to down.  My original layout had (from xmodmap -pke)  keycode 111 = Up    NoSymbol Up keycode 113 = Left  NoSymbol Left keycode 114 = Right NoSymbol Right keycode 116 = Down  NoSymbol Down   To be on the safe side, let us set up+all mods to down:   keycode 111 = Up    Down Down Down Down Down   Indeed, xev shows keysym down when I press up while holding shift (xev output from pressing down, then shift+up is included below); but applications do not react properly (e.g., Firefox acts as to normal shift+up, in the terminal I get [1;2B which is different from unmodified shift+up ([1;2A)).  It does not work with other modifier combinations either.  I also tried keysym Down = Down Up as suggested , but that did not work either.    Edit for clarification: My approach and the answer to the linked question do not work for me because some applications (Firefox and Thunderbird for example) react to the re-mapped shift*down as if shift+up had been pressed, not up alone.  In addition, my terminal emulator prints [1;2B instead.  Alternatively, I tried remapping the left shift and control keys to down; this works in the terminal, but e.g. Firefox still responds as to shift+up or control+up, respectively.    xev output:  KeyPress event, serial 32, synthetic NO, window 0x1e00001,     root 0x80, subw 0x0, time 4024962, (-429,376), root:(215,396),     state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,     XLookupString gives 0 bytes:      XmbLookupString gives 0 bytes:      XFilterEvent returns: False  KeyRelease event, serial 32, synthetic NO, window 0x1e00001,     root 0x80, subw 0x0, time 4025234, (-429,376), root:(215,396),     state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,     XLookupString gives 0 bytes:      XFilterEvent returns: False  KeyPress event, serial 32, synthetic NO, window 0x1e00001,     root 0x80, subw 0x0, time 4027956, (-429,376), root:(215,396),     state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,     XLookupString gives 0 bytes:      XmbLookupString gives 0 bytes:      XFilterEvent returns: False  KeyPress event, serial 32, synthetic NO, window 0x1e00001,     root 0x80, subw 0x0, time 4028076, (-429,376), root:(215,396),     state 0x1, keycode 111 (keysym 0xff54, Down), same_screen YES,     XKeysymToKeycode returns keycode: 116     XLookupString gives 0 bytes:      XmbLookupString gives 0 bytes:      XFilterEvent returns: False  KeyRelease event, serial 32, synthetic NO, window 0x1e00001,     root 0x80, subw 0x0, time 4028150, (-429,376), root:(215,396),     state 0x1, keycode 111 (keysym 0xff54, Down), same_screen YES,     XKeysymToKeycode returns keycode: 116     XLookupString gives 0 bytes:      XFilterEvent returns: False  KeyRelease event, serial 32, synthetic NO, window 0x1e00001,     root 0x80, subw 0x0, time 4028228, (-429,376), root:(215,396),     state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,     XLookupString gives 0 bytes:      XFilterEvent returns: False

I would like to rebind some keys on Linux via Xmodmap. Left and up cursor on my Acer (yes, I know) laptop have broke. I would like to map shift+down to up, and shift+right to left. Struggling to determine the syntax for this from man pages. This syntax is wrong, throws bad modifier, but captures the intent:  add Shift_L+Down = Up


I have multiple Hboxes in JavaFX like this:  HBox hb = new HBox(10); HBox hb2 = new HBox(10); HBox hb3 = new HBox(10); HBox hb4 = new HBox(10); etc..   I want to put the hbox creation in a loop, but I am not really sure how to do that.  I've tried it like this:  HBox[] array = new HBox[4]; for (int i = 0; i < 3; i++){     array[i] = new HBox(10); }   But I'm getting this error when I try to add some content to the hboxes:  Exception in Application start method Exception in thread "main" java.lang.reflect.InvocationTargetException     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.RuntimeException: Exception in Application start method     at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)     at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException     at OptieScherm.start(OptieScherm.java:74)     at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)     at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)     at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)     at java.security.AccessController.doPrivileged(Native Method)     at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)     at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)     at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)     ... 1 more`   Thanks,

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I recently installed Ubuntu 19.04 and am new to Ubuntu.  Everything seems to be working 100% correctly as far as I can tell.   When I insert a USB external drive, I can go to Files, see it, browse it and copy files to it.  My question is - is it possible to configure Ubuntu to show volumes like USB drives on the desktop?   I am migrating over from the Mac and I'm accustomed to that behavior. Thanks in advance.... Bob

I upgraded Ubuntu today and everything works smooth except that Ubuntu doesn't detect any other storage devices. My / and /home partitions work fine, but my other partitions are just not detected. I wouldn't mind, except the same problem goes with USB sticks.  When I plug in a USB stick, the light goes on, but the computer detects nothing. Just to be clear, my mouse and keyboard are connected via USB and work fine.  Any idea how to solve this issue? None of the suggestions I found on the internet have any effect.


Why does my Xbox freeze when I play in my Minecraft world for about two minutes? The whole Xbox freezes but I can still hear music and in-game sound.  If I take out the game it sends me to the dashboard and it all happens again if retry with the disc. It is not the console because I have also played Skyrim, Far Cry 3 and Thief and none of those crash my Xbox. My hard drive also has 195 GB remaining.

My wife and I are playing Minecraft on the the Xbox 360, and it will randomly freeze. We have called Microsoft twice, and both times they have said that it "must be over heating." We know that this isn't the case because it doesn't happen on Mass Effect or on Final Fantasy, and it will happen when the world loads. Are there any patches or updates that will help with this?  Note: it is the Xbox 360 disk.


Recall that $$\sum_{j=1}^nj^2=\frac{n(n+1)(2n+1)}{6}.$$ When is this quantity a perfect square? It appears that the only solutions are $n=0,1,24.$ By setting $x=12n+6$, the problem reduces to finding rational points on the elliptic curve $$ y^2=x(x+6)(x-6), $$ but I do not know where to go from here. How can I show that these are the only solutions?

This question comes from trying to see why 24 is the only non-trivial value of $n$ for which $$1^2+2^2+3^2+\cdots+n^2$$ is a perfect square. To this end, let $m,n \in \mathbb N$ be such that $1^2+2^2+3^2+\cdots+n^2 = m^2$, or $$n(n+1)(2n+1) = 6m^2.$$ When $n=24$ the left hand side is $24\times 25 \times 49$ and there are two things that make it work as a solution: $$7^2+1=2\times5^2$$ $$7^2-1=12\times2^2.$$ We can write these algebraically as $$x^2=2y^2-1$$ $$x^2=12z^2+1$$ and solve them simultaneously (with $x,y,z\in \mathbb N$).    These are instances of Pell's equation and each individually has an infinite number of solutions. How do we show there is only one (non-trivial) value of $x$ that is common to the solutions of both equations?


So, I currently have BOSS Linux and I am going to install debian (currently installing right now)  And I want my older OS (BOSS linux), on the first position and the debian, (freshly installed) to be on the second. Please tell me how to do that

So, I currently have BOSS Linux and I am going to install Debian (currently installing right now)   And I want my older OS (BOSS linux), on the first position and the debian, (freshly installed) to be on the second. How do I do that?


On running  nano /etc/apt/sources.list ,  the text editor opens the sources.list file but it is completely empty! How to get the default sources.list file as I am unable to update debian (apt-get update).

to edit sources.list, on doing from root user,   nano etc/apt/sources.list   nano text editor appears as a new file and on saving, it throws an error:-     etc/apt/sources.list : no such file exist**      How to edit this to update debian? (apt-get update not working).


How can I compute this limit of the sequence?  $$\lim_{n\to\infty}{(\sqrt[n]{e}-\frac{2}{n})^n}$$

Can anyone help me with this limit:  $$ \lim_{n \to \infty}{\left(e^{\frac{1}{n}} - \frac{2}{n}\right)^n}$$  I think that I should expand $e^{\frac{1}{n}}$ as the sequence $1 + \frac{1}{n} + \frac{1}{n^{2}2!} + \frac{1}{n^{3}3!} + \dots $. But I can't see how it helps me.  Edit: or maybe use logarithm?


Let $V$ be an inner-product space, finite-dimensional over $\mathbb{C}$. Let the operator $T:V\to V$ satisfy $$T^2 = \frac{1}{2}(T+T^*)\,.$$  I'd like to prove that $T$ is normal, i.e., $T^*T = TT^*$, and that $\,T^2 - T = 0\,$ holds.  So I've tried the obvious: $$ \langle T(v), T^*(v) \rangle = \langle T^2(v), v \rangle = \frac{1}{2} \langle (T+T^*)(v), v \rangle = \frac{1}{2} \left(\langle T(v),v \rangle + \langle T^*(v), v\rangle \right) $$ I don't see we can infer something smart from those equalities. Any ideas?

Let $T:V\to V$ be a linear map, where $V$ is a finite-dimensional inner product space. Given $T^2=\frac{T+T^{*}}{2}$, I would like to prove that $T$ is normal and that $T=T^2$. The first part, to prove that $T$ is normal, is quite easy: from $T^2=\frac{T+T^{*}}{2}$ we'll have $\,T^{*}=2T^2 - T$, and as $TT^{*} = 2T^3 -T^2 = T^{*}T$. Now, I need to prove that $T=T^*$, then $T = T^2$ is immediate. I have been thinking about this question for some days and I can't figure out in what technique to prove that $T = T^{*}$.


When an electron revolves around the nucleus in P or d-orbitals why does not it collide with the nucleus. I mean to say that the shape of the orbital narrows near the nucleus , so shouldn't it collide with the nucleus?

We all learn in grade school that electrons are negatively-charged particles that inhabit the space around the nucleus of an atom, that protons are positively-charged and are embedded within the nucleus along with neutrons, which have no charge. I have read a little about electron orbitals and some of the quantum mechanics behind why electrons only occupy certain energy levels. However...  How does the electromagnetic force work in maintaining the positions of the electrons? Since positive and negative charges attract each other, why is it that the electrons don't collide with the protons in the nucleus? Are there ever instances where electrons and protons do collide, and, if so, what occurs?


I am building a web app and I use am using a lot of include files to build most of my pages.   For example:  The page profile.php includes about.php, timeline.php, photos.php  Now, I want to send a user to my 404 page if they try to go to one of my include files directly. How can I do this?  Going to localhost/timeline.php should redirect the user to the 404.  My thought was to write an IF Statement in those include files that checks to see if the file is being opened directly, is that even possible?

I have a php file which I will be using as exclusively as an include. Therefore I would like to throw an error instead of executing it when it's accessed directly by typing in the URL instead of being included.  Basically I need to do a check as follows in the php file:  if ( $REQUEST_URL == $URL_OF_CURRENT_PAGE ) die ("Direct access not premitted");   Is there an easy way to do this?


A friend would like to use Ubuntu 14-4 or 15-10, but the OS on his laptop in Windows 10. When I put the ISO from one or the other in his dvd-drive, it starts up, but after a short while Windows overrides it. I want to install Ubuntu without Windows. I can not find any solution for this problem, also because I'm not used to Windows. I did take the hard-drive out of the laptop and connected it with my pc with a usb-tool. It appeared, that the drive can not be opened with anything, so I can not delete the files on it. Please tell me how to proceed.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I want to use Tikz bar chart, but want to avoid showing it as 1.8*10^5. How can i do it?   % Bar charts % Author: Stefan Kottwitz % https://www.packtpub.com/hardware-and-creative/latex-cookbook \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[title  = Contributions per category                       at LaTeX-Community.org, xbar, y axis line style = { opacity = 0 }, axis x line       = none, tickwidth         = 0pt, enlarge y limits  = 0.2, enlarge x limits  = 0.02, symbolic y coords = {LaTeX, Tools, Distributions, Editors}, nodes near coords, ] \addplot coordinates { (180000,LaTeX)         (190000,Tools)                      (2193,Distributions)  (11106,Editors) }; \addplot coordinates { (14320,LaTeX)         (1615,Tools)                      (560,Distributions)   (3075,Editors)  }; \legend{Topics, Posts} \end{axis} \end{tikzpicture} \end{document}

A chart with data in the range of 200,000 and small difference between max and min values, will be assigned a 10^5 multiplier to the entire axis. This results in the ticks becoming meaningless, since all become 2.   Example:-  \begin{tikzpicture} \begin{axis}   \addplot coordinates {   (100,200001)   (200,200003)   (300,200005)   };     \end{axis} \end{tikzpicture}   When this is plotted the y-axis has 5 ticks, all of which are 2. The y-axis has a multiplier of 10^5. This has effectively removed all information from the graph.  I may use the below to set the explicit value of the tick values but this does not implement change in the display "style" of the axis ticks.  ytick = {200000, 200005, 200010}   I have also tried increasing the precision of the tick label to 5. However this only results in the graph showing labels such as 2.00000, 2.00005, 2.00010 with a 10^5 axis multiplier.  yticklabel style={precision = 5,}   My question is "How do I remove/change this 10^5 multiplier, such that the y-axis ticks are displayed in the form 200000, 200005, 200010.


i want to find isomorphism between $k[[x]]$ and $\varprojlim_n k[x]/(x^n)$ but I cant.please help me to find this.

I know the inverse limit of $k[x]/(x^n)$ is $k[[x]]$ but i can't show the homomorphism between these is onto.   For example $\alpha:k[[X]]\to\varprojlim k[x]/(x^n)$ by F(x)=family of$ F(x)+(x^n)$. for example $(1+(x),0,5+7x^2+(x^3),3+11x+132x^2+(x^4),0,...)$ is image of things in k[[x]]?


I am working on my app and i confuse in between singleton class     object and object from my base class, both provide that single    instance  use again and again. what is actually difference and     advantage of singleton?      and which approach is best.

The glorified global variable - becomes a gloried global class. Some say breaking object-oriented design.  Give me scenarios, other than the good old logger where it makes sense to use the singleton.


I used the sklearn.metric roc_auc_score,it gave me a value 0.91.  What is the does this number mean?   I am interested to learn how this is calculated,could someone please direct me to some information on this?

Searched high and low and have not been able to find out what AUC, as in related to prediction, stands for or means.


Could you give me advice how should I properly structure my code? I am trying to sort students, and to do it I need access to Database object and also private member of Student - index. Now I get error:      error: ‘Database’ has not been declared            friend void sortStudents(Database db);   but If I reorder classes I will get:     Student’ was not declared in this scope            std::vector  data;   What is the proper solution?  class Student {     private:         int _index {0};     public:         friend void sortStudents(Database db); };  class Database {     private:         std::vector <Student> data;     public:         friend void sortStudents(Database db); };   void sortStudents(Database db) {     std::sort((db.data).begin(), (db.data).end(),               [](const Student& leftSide, const Student& rightSide)              { return leftSide._index < rightSide._index; }              ); }

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


I have two main explanatory variables of interest in the model I use. It is only when I include them both that the coefficients are significant. The correlation between them is 0.98 and the vif-value is high, indicating collinearity. May this bias the results? I read somewhere that multicollinearity only inflates standard errors, which make p-values too large, and that it doesn’t bias coefficients. So it shouldn’t alter the interpretation of the coefficient unless they lose statistical significance.   Is this true? Do you think the model still could be valid despite high correlations?   My objective of the model is not to make predictions but to see how particularly one central factor, which I measure through two similar explanatory variables, affects the dependent variable.

I am reading Greene's textbook Econometric Analysis where he says that, if there's multicollinearity, then:   Small changes in data lead to large swings in parameter estimates. Coefficients have high standard errors even though they're jointly significant. Coefficients have the "wrong" sign or implausible magnitudes.   I have three question:   What are the consequences for the unbiasedness and consistency of the OLS estimators in the presence of multicollinearity? Is the efficiency of the estimators reduced in the presence of multicollinearity? Do Greene's points hold (yet to a lesser extent) for slightly correlated independent variables? For example, would all three points hold (to a small extent) if the correlation between the regressors is $\rho = 0.1$, for example?


Can we use "a" after "many"? What does it mean, then?  Example:     Every living thing (and perhaps many a dead one as well) pays heed to that call.

Can someone please elucidate the difference between "many" and "many a"? In what context of usage should we add an extra "a" beside the word "many"?  For example:         Many times, I had seen that . . . .   Many a times, I had seen that . . . .      I do not know if the example is accurate enough to support my question, but I would like to know the difference between how they are used.


I hope someone can shed some light on this.  My brother in law applied for a visitor visa along with his wife and daughter as dependents (separate applications). However, my brother-in-law's visa application was rejected and because of that the other two applications were rejected too.  Below is the refusal letter he received.  To prove the intention to leave the UK at the end of their visit, we provided letters from both his and his wife's employers and a letter from their daughter's play school.  With regard to funds, we provided a savings account statement. This isn't the account where he receives his monthly salary and there aren't a lot of transactions in this account. We didn't provide his salary account.  Can they re-apply including his salary account statement?  Any help much appreciated.      UPDATE We applied for another family (my sisters) around the same time, and their visa was approved. Almost all of the documents submitted were similar, except for the circumstances around the account. The account shown by my sisters family belongs to her husband and it's where he receives his salary as well as the account he maintains as savings. In my brother-in-law's case, his account is not the same account he receives his salary to. I never knew that we have to show the account where the salary goes. Why can't a person show a saving account where they don't put money into anymore.

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I have a PS3 and a PS4 with the same PSN account. Given from the information released by Sony with one PSN account I can have up to two PS3s and one PS4. Am I able to play online simultaneously with both consoles? Is it also possible to play online against each other?

I have two ps3's and wanted to know if I can connect them to the same PSN account as when I try to log the second one onto the account I created on the first one it says you cannot log onto someone eses account (or something like that).  I set up a psn account on the second ps3 but want to use the same one as the first.  The first machine was switched off at the time; I want to be able to download purchases onto both my machines.


Could someone go through a step-by-step proof of:     Let $\theta:R\to S$ be a surjective ring homomorphism. Show that if every ideal of $R$ is principal, than every ideal of $S$ is also principal.   I really just have the assumptions.  Take an ideal $I$ in $S$ and show that it is principal.  Could someone help please?

I was working on a worksheet for class and came across this problem:      Let $\varphi:R\to S$ be an onto ring homomorphism with the property that every ideal of $R$ is principal. Show that the same must be true for $S$.    I honestly do not know how to do this one!


Here is what i am trying to do:  i created a classmethod that returns either an object of dict if not params are added to this method or an object made of list of dicts if any params are added, as code below:   @classmethod def make_attr(cls, **kwargs):     """     code: do something, generate either a tuple      """      if :         data = {}         """         add k, v in data         """         return cls(**data)     else:         data = []         for k, v in kwargs.items():             _d = {}             _d[k] = v             data.append(_d)         return cls(*data)    Code as above, and the problem i met is if the classmethod returns object of dict, i can use object.attr to get its value, but if the classmethod returns objects of list, i find no way to unpack it or get its attribute or value, such as:   >> result = Class.make_attr(login_name="test") >> print("age: ", result.age) >> age: 25  >> result = Class.make_attr() >> print(result) >> <model._class.Class object at 0x104020358>  >> for i in result: >>     print(i) >> TypeError: 'Class' object is not iterable   So, how can i make this object iterable?

How would one create an iterative function (or iterator object) in python?


I have added one button "btn". I have set onclicklistener, inside the button "btn" I have added another button "btnYes" to show display custom dialog when I add these "btnYes" apps get crash.  When I remove the "btnyes" button app is working.  Can we add onclicklistener for two button inside one button for different work?  Java Code  public class MainActivity extends AppCompatActivity {     private Button btn, btnYes, btnNo;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          btn = findViewById(R.id.click);         btnYes = findViewById(R.id.yes);         btnNo = findViewById(R.id.no);         btn.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 AlertDialog.Builder dialogBox = new AlertDialog.Builder(MainActivity.this);                 LayoutInflater inflater = LayoutInflater.from(MainActivity.this);                  View myView = inflater.inflate(R.layout.custom_dialogbox, null);                 dialogBox.setView(myView);                 final AlertDialog mybuilder = dialogBox.create();                 mybuilder.setCancelable(false);               btnYes.setOnClickListener(new View.OnClickListener() {                   @Override                   public void onClick(View v) {                       mybuilder.dismiss();                    }               });               }         });     } }      Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference           at com.example.customdialog.MainActivity$1.onClick(MainActivity.java:33)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


There is a human settlement, and there seems to have been an alien invasion, but it's long over. I've read this in a German anthology, but am sure it's British or American. It begins with a man at home, a circular door pops up in his room. On the other side he finds strange, giant buildings and a giant empty pit. He finds some screen-device and makes it play back some imagery. This shows some alien lifeform in the pit. The images are so horrifying, that he almost goes mad and only after some time he barely recovers. He leaves the compound and finds a human settlement, with very healthy but somehow primitive people. They seem to worship him. He returns home by the teleporter door, picks up some books and returns to stay as their leader. I read this about 30 years ago, but I´m quite sure the story is from the fifties or sixties. Unique detail at the end: He grabs all the books about agriculture and leadership he can get his hands on and jumps back through the circular opening to the other end. He then learns, that a part of his book stack was cut in half by touching the rim of the circle, one of the ruined ones being Hitler´s Mein Kampf, which he then applauds as all for the better being ruined. I remember this especially, because that book is forbidden for sale in Germany, you can only get it legally for scholarly reasons at university or such places, and by this story I first learned that drivel seems to have been received elsewhere in the world as well and seemingly even recognized as a legitimate work of political literature, which I found appalling at the time but also fascinating. So maybe the story was from the fifties, if that book was still in circulation there at that time...

Years ago I read short story about a man sitting in his room. Suddenly appears the same man but from the future and gives him an advice about the future. Original man seems to agree to follow that advice. Man from the future goes away. Then another version of that man from another future comes and gives a completely opposite advice and begs original man to follow it. Then this second version of this man from future also left. Original man stays alone not knowing which advice from future he must follow.


"Needs closed", "needs resolved", "needs done"... I have never seen this before and it sounds totally incorrect, grammatically speaking. However, I have been hearing this so often, at work and even in written work documentation, that I am starting to doubt that I am right about this not being correct. Could anyone please help with that? Thank you.

I'm from Central Pennsylvania, and apparently, we have a strange language construct in this area. I was recently talking about how "my car needs washed" to a friend from NJ, and she told me that my sentence was grammatically incorrect.   I realize she's right, and I realize my options are "my car needs to be washed" or "my car needs washing". But I'm not clear on the precise rule being invoked.


I have a Bash script that needs to know its full path. I'm trying to find a broadly-compatible way of doing that without ending up with relative or funky-looking paths. I only need to support Bash, not sh, csh, etc.  What I've found so far:   The accepted answer to  addresses getting the path of the script via dirname $0, which is fine, but that may return a relative path (like .), which is a problem if you want to change directories in the script and have the path still point to the script's directory. Still, dirname will be part of the puzzle. The accepted answer to  (OS X specific, but the answer works regardless) gives a function that will test to see if $0 looks relative and if so will pre-pend $PWD to it. But the result can still have relative bits in it (although overall it's absolute) — for instance, if the script is t in the directory /usr/bin and you're in /usr and you type bin/../bin/t to run it (yes, that's convoluted), you end up with /usr/bin/../bin as the script's directory path. Which works, but... The readlink solution , which looks like this:  # Absolute path to this script. /home/user/bin/foo.sh SCRIPT=$(readlink -f $0) # Absolute path this script is in. /home/user/bin SCRIPTPATH=`dirname $SCRIPT`   But readlink isn't POSIX and apparently the solution relies on GNU's readlink where BSD's won't work for some reason (I don't have access to a BSD-like system to check).   So, various ways of doing it, but they all have their caveats.  What would be a better way? Where "better" means:   Gives me the absolute path. Takes out funky bits even when invoked in a convoluted way (see comment on #2 above). (E.g., at least moderately canonicalizes the path.) Relies only on Bash-isms or things that are almost certain to be on most popular flavors of *nix systems (GNU/Linux, BSD and BSD-like systems like OS X, etc.). Avoids calling external programs if possible (e.g., prefers Bash built-ins). (Updated, thanks for the heads up, ) It doesn't have to resolve symlinks (in fact, I'd kind of prefer it left them alone, but that's not a requirement).

How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application


I have a list with this kind of values:     list[0] = "myvalue_8"    list[1] = "myvalue_9"    list[2] = "myvalue_15"   list[3] = "myvalue_12"   When I sort my list like that:  Collections.sort(myList);   The result is:     list[0] = "myvalue_12"    list[1] = "myvalue_15"    list[2] = "myvalue_8"   list[3] = "myvalue_9"   instead of:     list[0] = "myvalue_8"    list[1] = "myvalue_9"    list[2] = "myvalue_12"   list[3] = "myvalue_15"   Thank you very much

I need to write a Java Comparator class that compares Strings, however with one twist.  If the two strings it is comparing are the same at the beginning and end of the string are the same, and the middle part that differs is an integer, then compare based on the numeric values of those integers.  For example, I want the following strings to end up in order they're shown:   aaa bbb 3 ccc bbb 12 ccc ccc 11 ddd eee 3 ddd jpeg2000 eee eee 12 ddd jpeg2000 eee   As you can see, there might be other integers in the string, so I can't just use regular expressions to break out any integer.  I'm thinking of just walking the strings from the beginning until I find a bit that doesn't match, then walking in from the end until I find a bit that doesn't match, and then comparing the bit in the middle to the regular expression "[0-9]+", and if it compares, then doing a numeric comparison, otherwise doing a lexical comparison.  Is there a better way?  Update I don't think I can guarantee that the other numbers in the string, the ones that may match, don't have spaces around them, or that the ones that differ do have spaces.


So, there's a modification to a question and I was curious what the change was:        But when I got to the question, there was no 'last activity' on the right hand side:        Though you could see it if you scrolled down to the last edit:        I was expecting something like this on the side:        Note the 'active today'  The question in question with the lack of active activity is

I can't see the 'last activity' field after editing my question.  I mean the field on the right-hand-side that lists your question as active today, active yesterday , active 2 days ago, etc.    As you can see there is no such field on .  But there is such a field on :    Can anyone tell me why it isn't there? Is this a bug perhaps?


Does $(p(0)  \wedge (P(n) \implies P(n-1))) \implies P(n) \forall n\leq 0$?  In other words, what I'm asking is, can I use the axiom of induction for negative numbers? Why/why not?  E: This is not a duplicate from that other post, I ask nowhere about having a negative argument for the base case.

I'm reading the text Discrete and Combinatorial Mathematics by Grimaldi, and he puts forth the theorem of the principle of mathematical induction as such:  Let $S(n)$ denote an open mathematical statement that involves one or more occurrences of the arable $n$ which represents a positive integer. $\textbf{a)}$ If $S(1)$ is true, and $\textbf{b)}$ if whenever $S(k)$ is true ( for some particular, but arbitrarily chosen, $k \in\mathbb{Z^+}$), then $S(k+1)$ is true, then $S(n)$ is true for all $n \in \mathbb{Z^+}$.  He then states that:  All that is needed is for the open statement $S(n)$ to be true for some first element $n_{0}\in \mathbb{Z}$ so that the induction process has a starting place. We need the truth of $S(n_{0})$ for our basis step. The integer $n_{0}$ could be $5$ just as well as $1$. $\textbf{It could even be zero or negative}$ , because the set $\mathbb{Z^+}$ is in union with $\{0\}$ or any finite set of negative integers is well ordered.  The negative part confuses me specifically. Won't this mean that the theorem can be false or would require changes both in premises and conclusion, since if the base case $n_{0}<0$ there could be some integer $m<k$ for instance, such that $S(m)$ is false? Also, can anyone direct me or provide an example of an induction proof that uses a negative base case?


I am working with c# winfroms and what I need is to immediately get returned value of what I have inserted. So I have statement like this:  INSERT INTO MESSAGES (MESSAGEID, SENDER, RECEIVER, TITLE, MESSAGE, STATUS)  VALUES (     ((SELECT MAX(MESSAGEID) FROM MESSAGES) + 1),      @Sender,      @Receiver,      @Title,      @Message,      0)   and after this i need messageid i just inserted for my code.  Here is full function and where it needs to appear:  private void send_btn_Click(object sender, EventArgs e) {     using (FbConnection con = new FbConnection(Properties.Resources.connectionString_EB))     {         con.Open();         using (FbCommand cmd = new FbCommand("INSERT INTO MESSAGES (MESSAGEID, SENDER, RECEIVER, TITLE, MESSAGE, STATUS) VALUES (((SELECT MAX(MESSAGEID) FROM MESSAGES) + 1), @Sender, @Receiver, @Title, @Message, 0)", con))         {             cmd.Parameters.AddWithValue("@Sender", EB.CurrentUser.userId);             cmd.Parameters.Add("@Receiver", FbDbType.Integer);             cmd.Parameters.AddWithValue("@Title", title_txt.Text);             cmd.Parameters.AddWithValue("@Message", message_rtxt.Text);              foreach(Int_String c in receiver_clb.CheckedItems)             {                 cmd.Parameters["@Receiver"].Value = c._int;                 cmd.ExecuteNonQuery();                  if(EB.Users.Logged(c._int))                 {                     //Get sent message id                 }             }              MessageBox.Show("Message successfully sent!");         }         con.Close();     } }

What is the best way to get IDENTITY of inserted row?  I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDENTITY but don't understand the pros and cons attached to each.  Can someone please explain the differences and when I should be using each?