I'm a Java developer and want to buy a new 2013 Retina MacBook Pro.  I'm interested in the 13 inch for portability but I'm worried it has too small display to effectively code using Eclipse.  Has anyone tried using this machine in this way? Do I have to get the 15 inch?

I'm thinking about buying the new MacBook Pro. I will use it mostly to write code when I'm not at home and I've read that non-native apps look horrible due to the resolution. I was wondering if someone has tried using Eclipse or Zend Studio and if they work well.


I have a template function that takes a function pointer from a template class.  However, I am getting an undefined reference.  Here is my header file. template<class T> bool Function(double(T::*func)(),                double(T::*funcderiv)());                class Class { public:     Class();         ~Class() {};          double Func1() { /* does something */ }     double Func2() { /* does something */ } };  Here is my cpp file where I get my compiler undefined reference error. template<class T> bool Function(double(T::*func)(),                double(T::*funcderiv)()) {     /* does something */ }  Class::Class() {     double (Class::*F1)() = &Class::Func1;     double (Class::*F2)() = &Class::Func2;              Function<Class>( F1, F2 ); /* Undefined reference to this function */ }  Thankful for any help.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


We know:   Mutual Independence :   For $n\geq3$, random variables $X_1,X_2,...,X_n$ are mutually independent if $$ p(x_1,x_2,...,x_n)=p(x_1)p(x_2)...p(x_n)$$ for all $x_1,x_2,...,x_n$.  Pairwise Independence :  For $n\geq3$, random variables $X_1,X_2,...,X_n$ are pairwise independent if $ X_i,X_j$ are independent for all $1\leq i<j\leq n$.  Note that mutual independence implies pairwise independence.() show that the converse is not true.  Personally, I think the answer is cleared with the definition of 'Conditional Independence', but any help is appreciated.

The example in question is from Rick Durrett's "Elementrary Probability for Applications", and the setup is something like this:     Let $A$ be the event "Alice and Betty have the same birthday", $B$ be the event "Betty and Carol have the same birthday", and $C$ be the event "Carol and Alice have the same birthday".   Durrett goes on to demonstrate that each pair is independent, since for example,   $P(A \cap B) = P(A)P(B)$.   However, he concludes that $A, B$, and $C$ are not independent, since   $P(A \cap B \cap C) = \frac{1}{365^2} \neq \frac{1}{365^3} = P(A)P(B)P(C)$.  I understand the reasoning here, and that one can generally show that arbitrary events $X$ and $Y$ are not independent by showing that $P(X\cap Y) \neq P(X)P(Y)$.   I am a little new to probability, though, and don't understand why exactly $P(A \cap B \cap C) = \frac{1}{365^2}$.   My progress so far:   I do see why $P(A) = P(B) =P(C) = \frac{1}{365}$, and thus why $P(A)P(B)P(C) = \frac{1}{365^3}$.  It seems like the sample space $\Omega = \{ (a, b, c) \mid a,b,c \in [365] \}$ -- i.e., all of the possible triples of numbers from 1 to 365, where 1 denotes January 1st, 2 denotes January 2nd, etc. From that, I can conclude $|\Omega| = 365^3$, but I'm not sure where to go from here.   It seems like once a single birthday is chosen, the rest are completely determined if they're all equal to each other - is this a good direction to go in?


Define $ Jac(R) = \cap_{\mathfrak{m}, maximal } \mathfrak{m}$ and $Nil(R) = \cap_{\mathfrak{p}, prime} \mathfrak{p}$, where $R$ is a commutative ring. Can someone give me an example of a commutative ring $R$ such that $Jac(R) \ne Nil(R)$. I have ruled out $\mathbb{Z}_{n}, \mathbb{Z}$, and any Artinian ring. Should I be looking at polynomial rings of some sort?

Is there a standard example in commutative algebra of a ring where the jacobson radical does not equal the nilradical?


I have just set up a desktop box with Ubuntu 16.04.  It is working fine, except it locks up when the display shuts off per system settings under brightness & lock.  I researched this a little and found  that suggests editing /etc/default/grub to set   GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"   and  that says the parameter you have to change on recent Ubuntu releases is "autosuspend_delay_ms".  I have tried both using the procedure in the first link, and the autosuspend value remains 2 even after changing the grub conf file and restarting it. I can't find out what the 2 value that is set is supposed to indicate.    The second link suggests some other things to try but it's not clear that these apply to Ubuntu. I don't want to mess around until I know I'm doing the right thing because I don't want to hose my nice clean install.  Other things I've read says this applies to laptops that shut down USB to save power, but this is a desktop so maybe usbcore.autosuspend is not even what is causing the lock up.     Can anyone recommend a way to proceed?

My keyboard stops working for no apparent reason.  After using Ubuntu for 2.5 years as a virtual machine on a Windows host () I finally took the plunge, reformatted my hard disk and built the system with Ubuntu yesterday. This morning I my keyboard stopped working.  I see many posts about Ubuntu and a USB keyboard or mouse ceasing to work randomly. They indicate that it is autosuspend turning off power to USB devices to save power, and when the USB device is not compatible in some, the USB does not 'wake-up' as it should.  I tried the suggestion posted in .  But no luck. I also tried another suggestion which was to boot without the keyboard and then plug it in once Ubuntu had started.  Here are some details:   I used the same Kinesis keyboard with Ubuntu as a virtual machine for the past two years, no problem. The Kinesis has macros and triggering a macro triggers the problem 100% of the time. However, it happens when I am just typing (no macros) as well. I tried the Kinesis on a laptop just now. This is a one-year-old  machine that I put Ubuntu 16.04 on two weeks ago. Using a Kinesis keyboard macro did not reproduce the problem.   Problem Machine   Dell XPS, 6 years old, desktop Installed Ubuntu 16.04 yesterday Using Kinesis Advantage USB keyboard Unplugging/re-plugging the keyboard has worked 9 out of 10 times Rebooting works as well I don't think it is a USB power problem as an LED on the keyboard stays lit and other USB devices keep working. I have both a USB and a Bluetooth mouse attached to the machine. Both keep working even when the Kinesis stops. I normally have a second regular Dell branded keyboard plugged in for non-Kinesis folks who need to use my computer. Earlier today this keyboard stopped working each time the Kinesis stopped working. However now, triggering the problem with a macro, the Dell keyboard keeps working.   The Kinesis, which I have had for 8 year now, has made it possible for me to keep keyboarding. If I can't resolve this I'll have to go back to Windows which would be a real bummer.  Any suggestions on things to try or ways to go about debugging this would be greatly appreciated.  I am digging into USB drivers, which on Linux I know nothing about. However, I have found that the laptop has both USB 2.0 and 3.0 ports. The desktop (with the problem) is USB 2.0 only. Still digging...


There is a easy way to modify only this command   \renewcommand\thesection{\arabic{section}.}   in order to have an arabic counter with just one leading zero instead the original arabic without leading zero?

I can output the value of a counter in a LaTeX document via:  \setcounter{mycounter}{1} \arabic{mycounter}   Which inserts a 1. But how do I format the output by, for example, adding a leading zero if mycounter is less than 10 in a way similar to what  lets you do by specifying %02d as your format string?


$$\lim_{n\to \infty} \left[{\left({{n \choose 0}.{n \choose 1}.{n \choose 2}.\dots.{n \choose n}}\right)^\frac1{n^2+n}}\right]$$ I have tried to solve this question for a decent amount of time but with no avail,so I'd be grateful for any help provided. ALSO:This may seem as a drag/nuisance, but are there any other alternate methods to solve this other than the one provided ?

I am facing difficulty with the following limit. $$ \lim_{n\to\infty}\left(\binom{n}{0}\binom{n}{1}\dots\binom{n}{n}\right)^{\frac{1}{n(n+1)}} $$ I tried to take log both sides but I could not simplify the resulting expression. Please help in this regard. Thanks.


In group $ GL(2,R) $ I have subgroup H, generated by 2 elements: $ a=\begin{pmatrix} 1 & 2 \\ 0 & 1\\ \end{pmatrix}     $ , $ b=\begin{pmatrix} 1 & 3 \\ 0 & 1\\ \end{pmatrix}     $   I have to find group of automorphisms $ Aut H $  So, I have found out that multiplication of this matrix always gives:  $ \begin{pmatrix} 1 & n \\ 0 & 1\\ \end{pmatrix}     $ $ \begin{pmatrix} 1 & m \\ 0 & 1\\ \end{pmatrix}     $ = $ \begin{pmatrix} 1 & n+m \\ 0 & 1\\ \end{pmatrix}     $   Order of matrix gives $ \begin{pmatrix} 1 & n*ord \\ 0 & 1\\ \end{pmatrix}     $   Am I right that subgroup H is infinite cyclic group? And the only one automorphims is $Z2$ ? I dont get this stuff about automorhisms, to be honest.

Is multiplying by a constant m (integer) on group of set of all integers on addition an automorphism?   If so why does the 2nd example in  says that the unique non trivial automorphism is negation?


Does there exist a function $f : I \to \mathbb{R}$ defined on an interval $I \subseteq \mathbb{R}$ that is measurable but not integrable on any compact subinterval $[a,b] \subseteq I$?  One can try to call for : If $m$ denotes the Lebesgue measure then for each $\varepsilon > 0$ there exists a compact set $K_\varepsilon \subseteq I$ such that $m(I \setminus K_\varepsilon) < \varepsilon$ and $f|_{K_\varepsilon}$ is continuous. Now the question is whether for some $\varepsilon > 0$ the compact set $K_\varepsilon$ contains an interval or equivalently has non-empty interior.  In general, a compact subset of $[0,1]$ (or $\mathbb{R}$) can have both empty interior and positive Lebesgue measure and even more: for each $\varepsilon \in (0,1)$ the  is compact, has Lebesgue measure $\varepsilon$ and empty interior.

Could give some examples of nonnegative measurable function $f:\mathbb{R}\to[0,\infty)$, such that its integral over any bounded interval is infinite?


I'd like for my notifications to stay unread until I click them. e.g., if I have 10 notifications, clicking on the notification icon will mark all as read/seen. I'd rather click on them, so that if I have 10 notifications, then clicking on one will reduce it to 9, and only unmark the one I clicked.

Sometimes I'll come back to SO after a few hours (gotta sleep sometime), and I'll have a bunch of comments waiting for me. A lot of my answers lately have spawned mini discussions as I help solve new issues and corner cases, and I'd like to reply to them all if I can.  When I click the global inbox, it sets every message to "read" status. This is fine if I open everything in a new tab, but sometimes I'll only notice the top comment and click on it, and the other replies get lost.  I'd like it if we could have a setting whereby we have to either explicitly say to mark an item as read, or at least click on the item before it gets marked.  This is probably best as a preference, since some folks in chat didn't see this as a problem.


Here is my file, the first line is not part of it (the one with Fname ..)  Fname Lname Age Children  John  Doe   61  2 Mary  Jane  32  5 Delta Cross 30  5 Sui   Ace   24  1   I want to sort this file based on number of children. It should be sorted from most children to least children.  Here is my command: sort -k 4 -n -r file.txt, which says sort based on the 4th column, numeric sort, and reverse. This yields:  Mary  Jane  32  5 Delta Cross 30  5 John  Doe   61  2 Sui   Ace   24  1   The way my text does it is sort -k4nr file.txt. I have two questions regarding this:  Firstly, I thought our options must be separated by spaces (not joined together)? Is this not the case for sort, or not the case for any of the commands?  Secondly, when doing it this way, I get the "right" order, but Delta is first:  Delta Cross 30  5 Mary  Jane  32  5 John  Doe   61  2 Sui   Ace   24  1   Why is this?

The two examples in the title produce very different results. The first (sort -k2,2 -nk6,6 foo) brings back the following results:  153759 townhome 900 2 1 79000 876543 townhome 745 2 1 79000 222999 townhome 850 2 2 83333 759153 condo 850 2 1.5 85000 453215 townhome 1000 3 1.5 86000 646484 condo 890 3 1 93333 444555 condo 930 2 1 99999   etc.   The second (sort -k2,2 -k6,6n foo) brings back:  759153 condo 850 2 1.5 85000 646484 condo 890 3 1 93333 444555 condo 930 2 1 99999 777894 condo 790 3 1 101000 221155 condo 1030 3 1 109500 248624 duplex 1250 3 1 120000 987654 duplex 1100 3 1.5 140000   These are the correct results I'm looking for.  What causes the difference?


Most sources I've seen say that about 90% of humans are right handed, and 10% are left handed. Why is this?  My only guess would be that it has something to do with different parts of the brain developing differently and causing right or left "handedness", but this is coming from my very little knowledge of the brain.  Furthermore, about 2/3 of people are right eye dominant, and more people are right ear dominant than left ear dominant.  Why the right side?!?

Has there been any definitive research about handedness being genetic? Also, why is right-handedness clearly dominant in humans? I'm interested in evolutionary theories, as well as any molecular explanation (if known).


I'm not that old, but when I was a child/teen, stadia was the common term.  As in:        Wembley, the Nou Camp, and the Santiago Bernabeu are football stadia.   The MCG and Lord's are cricket stadia.      But now stadiums is the more common term. Is this shift essentially redundant? I've read some sources say that it better reflects English language pluralisation, but then I think "so what?" Stadia better reflects the Latin root, and English isn't a wholly logical/systematic language (very few languages are). If we call more than one dog dogs, more than one ox oxen, and use cattle both as singular and plural, then why does it matter?

Many 'Latin' words in English have both Latin-style plurals and English-style plurals:         referendum – referendums, referenda.   minimum – minimums, minima.   gymnasium – gymnasiums, gymnasia.    aquarium – aquariums, aquaria.   amoeba – amoebas, amoebae.   antenna – antennas, antennae.   formula – formulas, formulae.   index – indexes, indices.   appendix – appendixes, appendices.      In technical language, generally, Latin-style is the only proper form of Latin plurals.   In all other contexts where both Latin-style and English-style are proper, which style of plural should I use?


My husband and I bought a house in July. During the home inspection, water was run for upwards of 20 minutes with no issues noted. When we moved in August 1st, we instantly noticed issues with the plumbing, such as gurgling in the toilet when the water ran in the shower. We had someone come drain the septic tank and they cleared the drainline as well. About a month later, we had similar issues, so my husband snaked the toilet out 100 ft finding nothing, and we used a drain cleaner. That seemed to work. Now, we're having trouble AGAIN. Same problem: bubbling in toilet when water is drained elsewhere, gurgling in pipes when toilet is flushed. What else can we do? My husband thinks it may be the toilet itself, because it has always been slow flushing. Thoughts?

Recently, the drain in my second floor tub makes a gurgling sound when I flush the toilet, which is located right next to the tub.  They are obviously on the same drain line. I know that there is a vent line going up from the bathroom through the attic, but I am not sure of the exact configuration.  In all other respects, both toilet and tub seem to drain normally.  What could be causing the gurgling?


How do I view my own deleted questions? I deleted a terrible question of mine that I now know how to improve. I cannot find the question under the list of questions that I have asked. Is the question gone forever?

I would really like to see all of my questions and answers on the profile page, even if some of them were deleted, and I don't have enough rep to see them on the site. (Note that some questions are  after 30 days or 1 year, and the author might be oblivious about what happened.)   , the "deleted recent [questions/answers]" links in one's own user profile now list all respective posts that were deleted in the past 60 days, rather than just those that were originally posted in the last 60 days. , users with the "access to moderator tools" privilege (10k+ on designed sites, 2k+ on beta and non-designed sites) can use the search operator deleted:1 to see all their own deleted posts. , deleted questions and answers that were posted in the past 60 days, can be seen using the "deleted recent questions" and "deleted recent answers" links on the questions and answers tabs (at the bottom of the tab) in your user profile. For older posts: as of 2013-04-23 you can  if you already have a link to them, but they still aren't linked from the user profiles (not even just for you). Nor do you see inbox notifications for comments on them if you come back a few hours later. You have to have thought to bookmark your question, or you have to go digging for it in your browser history.


I have herewith a document which is destined to hand notes. It allows to have printed notes on a small sized document. However the size is relatively too small. Since article has not that much options for size changing, which best possibilities might be given to increase sufficiently the size of the whole document for a better readability?  Thank you, With best regards. I wish you a good day!   \documentclass[a4paper]{article} \usepackage{showframe} \usepackage[tiny]{titlesec} \usepackage[textwidth=8cm,textheight=13cm]{geometry}  \titlespacing{\section}{0.2cm}{\parskip}{-\parskip} \setlength{\parskip}{0pt} \leftskip=1.5em \usepackage[utf8]{inputenc} \usepackage{textcomp} \sloppy \usepackage[none]{hyphenat} \usepackage{microtype}   \usepackage[utf8]{inputenc} \usepackage{textcomp}  \begin{document}  \section{Section 1} Hello World   \section{Section 2} Hello World   Bye \end{document}

I'm trying to make a document that has a very small font throughout, I tried this:  \documentclass[0.5mm, a4paper]{article} \documentclass[7pt, a4paper]{article}   But it doesn't seem that they allow me to go anything below 10pt.  This hack make it work, but not for the section headers:  \fontsize{4mm}{5mm}\selectfont   Does anyone know any better ways to do this?


Find an integer $0\leq n<1000$ such that the last three digits of $n^{267}$ are $321$.   I have tried this method:  $n^{267}\equiv 321(\text{ mod }1000)$  So, I break it up into two congruences and thought to apply the Chinese remainder theorem.  $n^{267}\equiv n^3\equiv321\equiv 1(\text{ mod }8)$ $n^{267}\equiv n^{67}\equiv321\equiv 71(\text{ mod }125)$  But it's very hard to solve the above congruences. Therefore, I do suspect that there is another method to solve the above congruence. Please help

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


Normally the load goes between hot and neutral line.  Since neutral is grounded why can't I put a load between hot and the ground line?

So, I've put in or replaced several outlets following wiring instructions online and in the box. Nothing big. I know that if I fail to turn off the breaker then I shouldn't directly touch the black wire, but touching the white wire or the bare copper wire is fine.   From this, I know that the black wire is the supply, power is flowing from it, and will happily flow into me. Since neither the white wire nor the bare copper wire shock me, I don't know the difference between the two, other than "Power flows into these once a circuit is completed" So what is the difference, in detail, between the neutral and the ground connectors in 110V applications?


Assume a point-mass $m$ is travelling in a straight line, and a force $F$ will act on $m$ (in the same direction as $m$'s velocity) over a constant distance $d$; why doesn't $m$'s velocity matter to the calculation of work done on $m$ by $F$? Work is defined such that, in this example, the work done by $F$ on $m$ is equal to $Fd$, but it seems that if $m$ were moving slower, it would spend more time in the field, allowing $F$ more time to act on $m$, thereby doing more work. In fact, if $m$'s velocity were very great, it would hardly spend time in $F$'s field at all (so very little work done). Maybe I misunderstand work; can someone address this confusion of mine?

The change in energy of an object can be determined by the work equation, where work is the change in energy:  $$ W = F \cdot d $$  I conceptualize the transfer of energy as simply a series of small "packets" of energy being transferred at every Planck length. These small "packets" of energy add up to the total energy transferred (i.e. work). I'm not sure if this conceptualization is correct, so correct me if I am wrong.  However, it makes me wonder why the amount of energy transferred is dependent on distance and not time.  $$ m_1 = 10~kg \\ m_2 = 20~kg \\ W_1 = (10~N)\cdot(5~m) = 50~J \\ W_2 = (10~N)\cdot(5~m) = 50~J \\ W_1 = W_2 \\ t_1 \neq t_2 $$  If I apply a constant force on an object, why isn't the energy transferred at a constant rate with respect to time? The energy transfer rate varies dependent on how long it takes to cover the set distance.  In other words: why is the energy transferred consistent per unit of distance, and not per unit of time?


In "The Physics of Star Trek" by Lawrence M. Krauss, he mentions that our universe, by all calculations, should actually be a black hole. I read it a while ago, but I think he mentioned that the mass in our (observable) universe is higher than the size of it, to the point where the observable universe is smaller than the Schwarzschild radius. If that is correct, then our universe should collapse into a singularity. Maybe I don't remember it correctly, or the problem is that we do not "see" the actual size of the universe, but only a small part (however, due to the homogenicity of it all, the density would be the same).  My question is if Krauss is correct in what he says (assuming I remember correctly), and if there is a reference to the original paper?

I was surprised to only recently notice that      An object of any density can be large enough to fall within its own   Schwarzschild radius.   Of course! It turns out that supermassive black holes at galactic centers can have an average density of less than water's.  Somehow I always operated under the assumption that black holes of any size had to be superdense objects by everyday standards.  Compare the Earth to collapsing into a mere 9mm marble retaining the same mass, in order for the escape velocity at the surface to finally reach that of light.  Or Mt. Everest packed into one nanometer.  Reading on about this , it increases proportionally with total mass.  Assuming matter is accumulated at a steady density into a spherical volume, the volume's radius will only "grow" at a cube root of the total volume and be quickly outpaced by its own gravitational radius.  Question: For an object the , what would have to be its diameter for it to qualify as a black hole (from an external point of view)?  Would this not imply by definition that:   The Earth, Solar system and Milky Way are conceivably inside this black hole? Black holes can be nested/be contained within larger ones? Whether something is a black hole or not is actually a matter of perspective/where the observer is, inside or outside?


I'm creating a database for an application social-media-like and I have a column with two sources set with enum type:  "source" enum('comment','post') NOT NULL  If the source is a comment, I want to add a foreign key to the comment ID, otherwise I want to add a foreign key to the post ID.  How can I do this?

Well here's my problem I have three tables; regions, countries, states.  Countries can be inside of regions, states can be inside of regions.  Regions are the top of the food chain.  Now I'm adding a popular_areas table with two columns; region_id and popular_place_id.  Is it possible to make popular_place_id be a foreign key to either countries OR states.  I'm probably going to have to add a popular_place_type column to determine whether the id is describing a country or state either way.


I have ubuntu 16.04 LTS and a mac. I would like to know how could I do to downloads packages on my mac with internet to transfer it to my ubuntu without internet at work. I need packagees like eclipse and git to be able to install them with no internet on my ubuntu computer. I have tried lots of programs like sushi huh or keryx through wine but even by updating packages list I can't find what I want. Thanks for any help! This is not a duplicate post because the how to download packages for offline use thread has no answers for mac users!

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


The laptop power cable consists of two cables with a transformer in the middle. The transformer is making a tiny noise while plugged in. I think it's normal... is it normal? What is it exactly?

I have many different AC adapters and power supplies for a variety of devices, ranging from small 5V/1A USB chargers to laptop power adapters and desktop PSUs. However, I often hear a whining noise from  some of these power supplies. This happens most often when they are not connected to a device or otherwise in use, and stop making noise when I connect a load to it such as by plugging in a device that is not fully charged.  Why do some AC adapters and power supplies make this whining noise? Why do some not make this noise? Is there anything I can do to suppress it?


Let $p$ be a prime $\geq 7$.  $p^2-1=(p+1)(p-1)$. Both $(p-1)$ and $(p+1)$ are divisible by $2$ and they are two consecutive even numbers. So, either one of the two must be divisible by $4$. So, $8 \mid (p^2-1)$. Again, by Euler's theorem, $p^2 \equiv 1 \pmod3$. Thereby, $24 \mid (p^2-1)$, for all prime $p \geq 7$.    To prove that $24$ is the greatest common divisor:  For $p=7$, $p^2-1=48$. So, the only other possible $\gcd$ is going to be $48$. But for $p=11$, $p^2-1=120$ and $48 \nmid 120$.  Therefore $\gcd\{p^2-1: p $  is a prime $ \geq 7 \}=24$.  Is this correct? Kindly verify.

Let $p>3$ be a prime. Prove that $24 \mid p^2-1$.   I know this is very basic and old hat to many, but I love this question and I am interested in seeing whether there are any proofs beyond the two I already know.


Here's an exercise I'm trying to solve as I'm studying topology. Please let me know if my proof convinces you and feel free to otherwise criticise it. Proposition 1. Every finite $T_1$-space is discrete. To be fully precise, let me fix the definitions here. Definition. A topological space $X$ is called $T_1$ iff given any two distinct points $x, y \in X$, both have neighbourhoods that do not contain each other i.e. there exist open sets $U$ and $V$ such that $x \in U$, $y \in V$, $y \notin U$, and $x \notin V$. Definition. A space $X$ is called discrete iff all of its subsets are open. I will also assume the following lemmata. Lemma 1. A space $X$ is $T_1$ iff all of its singleton subsets are closed. Lemma 2. Finite unions of closed sets are closed. Proof attempt for Prop. 1. Let $X$ be a finite $T_1$-space and let $U \subseteq X$ be an arbitrary subset. We need to show that $U$ is open i.e. that the complement of $U$ (which we denote $U^c$) is closed. As $X$ is finite, $U^c$ must have finitely many elements and must therefore be the union of finitely many singleton sets. By Lemma 1, we know that each of these singleton sets are closed as $X$ is a $T_1$-space. By the closure of closed sets under finite unions (Lemma 2), $U^c$ must be closed.

Show that any finite $T_1$-space $X$ is discrete.     My thoughts:- Let $X=${$a_1 , a_2, …,a_n$} and $U$ be any subset of $X$. Let $U=${$a_1 , a_2, …,a_k$} where$k \le n$ thenwe need to show that $U$ is open that is $X \setminus U$ is closed. Now $X \setminus U =$ { $a_{k+1} , …,a_n$ }$ = ⋃_{(k-1)}^{n}a_i$ now each $a_i$ is closed. So the result follows. Does my approach correct?


I am trying to prove that: Given an $f:\mathbb{R} \rightarrow \mathbb{R}$, if $f(f(x))=-x$ then  $f$ is not continuous?  any help?  Thank you!

I've been perusing the internet looking for interesting problems to solve. I found the following problem and have been going at it for the past 30 minutes with no success:     Find a function $f: \mathbb{R} \to \mathbb{R}$ satisfying $f(f(x)) = -x$ for all $x \in \mathbb{R}$.   I am also wondering, can we find $f$ so that is continuous?  I was thinking of letting $f$ be a periodic function, and adding half the period to x each time. I had no success with this, and am now thinking that such a function does not exist.  Source:


Server Side programming languages have workarounds to prevent sql injections  eg:  mysql_real_escape_string("sql query here");   Suppose html returns every quote as \' or \" instead of just ' or " Even if server side language is not being used, JavaScript prints \' as just '. What are other problems that would arise due to this?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I'm setting up an email server, and I'm a bit confused by SPF.  Following some examples, I set my SPF record as follows...  v=spf1 mx ip4:1.2.3.4 mx:mail.mydomain.com ptr:1.2.3.4 -all  I follow what most of that means, but why is MX in there twice?  I assume the second MX means, "This is a mail server for this domain."  Am I right on that?  And either way, what does the first MX mean?  Does it just indicate anyone checking should look at the MX records stored apart from the SPF TXT record?  And, if so, is the MX:mail.mydomain.com redundant with the actual MX records?

This is a  about setting up .     I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook. Email is sent and received by those computers, and some users send and receive email on their mobile phones as well.  I am using  to generate an SPF record and I'm unsure about some of the fields in the wizard, specifically:   Enter any other domains who may send or relay mail for this domain Enter any IP addresses in CIDR format for netblocks that originate or relay mail for this domain Enter any other hosts which can send or relay mail for this domain How stringent should SPF-aware MTA's treat this?   the first few questions i'm fairly certain about... hope i have given enough info.


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

There have been several discussions regarding code-only answers (answers that contain only code blocks with no textual explanation whatsoever):         Personally, I can't see why the quality filter should let such answers through at all. The main problem I have with code-only answers, especially once they're flagged as not an answer or very low quality, is that we can't determine at a glance whether these answers are:   Genuinely attempting to answer the question  answers Trying to correct an error in the question without actually answering it Random code dumps that may or may not relate to the question even by programming language or keyword(s) in the question   In particular, what exactly is an "informative code-only answer"? Does it mean the code is self-documenting? Does it mean the code substitutes code comments for a proper write-up? This is all very fuzzy. From  to the last question above:     I have never seen a code-only answer that couldn't be made better with the addition of appropriate text. They are of lower-quality than the same answer with some text.   This text makes all the difference, IMO, between an answer and a non-answer. Without it, it's often needlessly difficult to tell.  Existing code-only answers that are good-faith attempts to answer the question should be edited or downvoted, yes. But if the quality filter already tries to block code-only questions, why not block code-only answers too? These answers are often low quality, and (almost) always have ample room for improvement, just like questions.


Whats the difference between Query A and Query B. Both table_a and table_b are having 700k+ records. The obvious difference I can see is the speed (performance). Additionally, our Oracle consultants tend to write sql script using Query B.  Query A  select *  from table_a a  inner join table_b b  on a.id = b.id  Query B select *  from table_a a,table_b b  where a.id = b.id

Is there a difference in performance (in oracle) between  Select * from Table1 T1  Inner Join Table2 T2 On T1.ID = T2.ID   And  Select * from Table1 T1, Table2 T2  Where T1.ID = T2.ID   ?


I'm trying to achieve that a div hides if user clicks anywhere except on the element. I've got following code doing toggle() if user clicks on a button. I want the button click to stay plus if the Details element is visible, reacts to other parts of the screen. $('.nav-toggle').click(function() {   //get collapse content selector   var collapse_content_selector = $(this).attr('href');    //make the collapse content to be shown or hide   var toggle_switch = $(this);   $(collapse_content_selector).toggle(function() {     if ($(this).css('display') == 'none') {       //change the button label to be 'Show'       toggle_switch.html('Show Details');     } else {       //change the button label to be 'Hide'       toggle_switch.html('Hide Details');     }   }); });

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


Diversity is a great fun, sometimes puzzling, sometimes embarrassing, often totally absurdous but anyway you can learn a lot about other (sub)cultures and actually your own too.  Same things familiar and clear to you could have completely different "codes" in other (sub)cultures. Note this does not have to be bound to a specific region.  Just a few examples which could make good questions in this context, not only in terms of language disambiguation:   Is it correct that Russians say na zdorovje for cheers? How comes one colleague's name means in other's language exactly "who beats children?" Is it polite or impolite in culture X to tell guests that they should leave as it gets late? Is there a culture where you say "hello" by spitting on people? / Why did my Masai colleague asked to spit at him at our workplace during his afterwork birthday party last night? Every wondered that color of your teen child's shoe laces could express some specific message? Could it be that a friend a colleague behaves in a strange way because of the cultural superstition you never heard of? Is it okay not to have a separate BBQ device for people who are vegan or doing Ramadan?   I am sorry if you might find #3 and #4 embarassing but this is exactly why I've raised this question.  These are real life examples!   To 3. There have been two families in my friend circle who suffered a long night embarrasment because in guests' cultures it was impolite to leave by themselves, and guests' culture expected guests to leave by themselves.  To 4. Check this link:    I think anybody who has lived/worked in international/expat contexts, either has experiences in binational relationships, either compared youth/gender subcultures will think of many other examples and situations.  Based on the answers and votes, I will see whether an Area 51 request would make sense or not.  This question is not a duplicate because the effort for a new site proposal requires in my eyes getting an impression whether it's worth it or not before stepping in a more formal process.

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


Does anyone know how to analytically solve the below expression?  $$\int_{-\infty}^\infty p(x) \times \sigma(ax + b) \, dx $$   where $ p(x) = N(0, 1) = \frac{1}{\sqrt{2\pi}}e^{\frac{-x^2}{2}}$ and $\sigma(z) = \frac{1}{1+e^{-z}}$.  I know that the  is $\pi$. Moreover, the integration of sigmoid alone is,  $$\int \sigma(x) \, df = \int \frac{e^x}{1+e^x} \, dx = x + c$$  But I cant figure out how to integrate the first equation), when they are multiplied together.  Can we use integration by part and solve above equation?  Any help will be appreciated.  Thanks  Edit 1:  Sorry about the complicated notations.  If we simplify the above expression, then we get following equation.  $$ \frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty \frac{e^{-\frac{x^2}{2}}}{1+e^{-x}} dx $$

I'm trying to solve this expression when $b \ne 0$:   $$ \frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty \frac{e^{-{x^2}/{2}}}{1+e^{-(ax+b)}}\,\mathrm dx $$   Using the answers provided to  we can solve $$\frac{1}{\sqrt{2\pi}} \int_{-\infty}^\infty \frac{e^{-{x^2}/{2}}}{1+e^{-x}}\,\mathrm dx=\frac12$$  However, when we change the power of exponential term in the denominator to $-(ax+b)$ from $x$, the expression can not be solved using the same methods used in the . I tried solving by substituting $z=ax+b$ and it also did not work.


Will $Z[X] / (x^2 +1)$ be a PID?  My Try : It is not a PID. If $R$  = $Z[X] / (x^2 +1)$ were a PID then $2$ will be an irreducible element in $R$ and $R/(2)$ is a field. But $x$ will not have an inverse element in $R/(2)$. contradiction  Have I gone wrong anywhere? Please correct me if I have.  Thank You in Advance.

Is $\mathbb{Z}[x]/(x^2+1)$  isomorphic to  $\mathbb{Z}[i]$?   My attempt is that try to define a mapping $g$ from $\mathbb{Z}[x]$ to $\mathbb{Z}[i]$ by $g(f(x))= f(i)$, for $f(x)\in\mathbb{Z}[x]$. If it is possible then $\ker g$ is $(x^2+1)$? Am I on the right track? Please Help.


i only want the ropes shadow to show but there's lots of noise around that shows the thingies.

I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality.  I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration.  Leaving everything in default settings, I started a new project and switched to the Cycles render.  I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader.  I made two windows to emit blue light.  The screenshot has gaps between the walls because of the setup:  I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal?  Furthermore, with default settings or not, I can't change the amount of noise produced.  Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed.  I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring.  My question essentially boils down to is this Cycles' current limit?


I've gone through with many articles to understand exact difference between Responsive and Fluid web design. But couldn't make my understanding differentiate between these two.  Can anyone help me to understand it with my following questions (please pardon me if the same are too silly to ask)!   Does responsive mean, developing a website 'only' for three view-ports i.e. smartphone (320*480 including orientation), tablets (768*1024 including orientation) and desktop (980/960 width). So if there comes any other in-between resolution for eg. from 480 to 768, it is not compulsory for website to have the same perfect look as it would have in three main view-ports resolution?   or in other words, if my client asks me to create a responsive website he is meaning to create a website for three view-ports only i.e. smartphone, tablet and desktop? He doesn't mean any other resolution apart these three?   While in fluid, the website looks perfect on any resolution i.e. from 320 till 1900?   [when I see responsive web samples online and resize my browser width, then their content/layout appears perfect on any width. I don't see any extra space appearing around a content due to shift of other content in next row. How it happens then?]   Another question is, does one use media-queries only while doing responsive web design, and the same don't need to make fluid web design?

What is the exact difference between fluid and responsive design?  I am bit confused about fluid and responsive design. Fluid is the one where we give width in percentages so that design will look good on browsers even if shrink or expand the browser. But what's different about responsive?


i am trying to follow  tutorial to draw basic lime. but there is small gap in center of the lime which you can see . it is very frustrating, what is the worng with me although i follow tutorial carefully?  thanks,

I've followed the same  I mentioned in the question I asked  and my boat hull looks pretty good.  The process is to make 3D B-Splines increase the resolution and then convert them to Mesh Elements.  Then you make a plane and cut it in half along the "Y" axis.    I followed through the process and see a couple issues that I would like one of you to address.  First, I see that the normals are not correct.  The inside of the hull is not important but the outside needs to show materials.  Also the hull is not stitched together along the keel.  I don't know how to do that on a mesh that has had the Mirror Modifier applied to it.    Anyone care to help?


I'm trying to get a limit of $b_n=\frac{n!}{n^{1000}}$. I'm using a ratio lemma, so  $\frac{(n+1)!}{(n+1)^{1000}}\times\frac{n^{1000}}{n!}=(n+1)(\frac{n}{n+1})^{1000}=(n+1)(\frac{1}{1+1/n})^{1000}\rightarrow\infty$.  Now WolframAlpha give me that this tends to 0. What am I missing?

I do not know how to go about finding the limit of this sequence. I know it diverges to infinity yet I can't find terms to use the squeeze lemma effectively.  $a_n = \frac{n!}{n^{1000}}$    $\lim_{n\rightarrow\infty} \frac{n!}{n^{1000}}$  I know that when $n>1000$, the numerator will "run out" of denominators and the expression will grow, yet I don't know how to formally prove this divergence.  In addition to this, since it is a sequence, no series laws can be applied.   Anyone have an idea on how to approach this type of problem?


I had ubuntu 16.04 earlier with gnome environment and apple look alike theme with the help the help of tweak tool . Now I have upgraded to 18.04 . But I am experiencing problems with the apple theme, like some buttons not appear , icon names at the top bar not aligned correctly , etc. How to get default theme for 18.04

I am new in ubuntu, i have installed a large set of themes in ubuntu, i have also installed advanced-system-settings but when i want to change theme in advaced system settings , themes are not in drop down list?


I tried deleting tm snapshots already. I had five of them. Three deleted and I cannot seem to delete the remaining two. Terminal tells me they are deleted, but I still see them when I list.

On a 120GB SSD hard drive in a MacBook only 70GB are available. The missing 50GB are not even shown as free space.  Here is what the output of Disk Utility looks like:        As you can see on the first screenshot the disk has 120GB. However, the partition chart on the same screenshot only shows 70GB. Also the other two screenshots show that only 70GB out of 120GB seem to be available.  The command diskutil list shows that the physical disk0 is 120GB big, but the synthesized disk1 only 70GB:  /dev/disk0 (internal, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *121.3 GB   disk0    1:                        EFI EFI                     209.7 MB   disk0s1    2:                 Apple_APFS Container disk1         70.0 GB    disk0s2  /dev/disk1 (synthesized):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      APFS Container Scheme -                      +70.0 GB    disk1                                  Physical Store disk0s2    1:                APFS Volume Macintosh HD            60.2 GB    disk1s1    2:                APFS Volume Preboot                 21.7 MB    disk1s2    3:                APFS Volume Recovery                509.9 MB   disk1s3    4:                APFS Volume VM                      2.1 GB     disk1s4


I'd like to search all files that are different from a specific extension. So, if I search files by using the string *.doc I'd like to see every files that are not .doc.  I also would like to hidden the sub-folders in the result display by using that search (but the search must of course search into sub-folders) :)  Is it possible this on Windows Vista/7?  SOLUTION  Finded the solution by using this string NOT *.doc AND NOT tipologia:=cartella   This for the italian version. English should be similar, somethings like NOT *.doc AND NOT kind:=folder

Windows 7 Ultimate 64bit:  I'm looking for a way to find all the files in a directory that are NOT of a specific file type or extension.  Example: I'd like to find every file that isn't an .mp3 in my music folder (and all sub folders).


Let $X\sim N(\theta, 1)$ where $\theta \in \mathbb R$. Compute the pdf of $X^2$. Current work: The pdf of X is $f=\displaystyle \frac{1}{\sqrt{2\pi}} e^{-\frac{1}{2}(x-\theta)^2}$. We might try the method of finding the cdf of $Y=X^2$ and then converting that into the pdf. It goes $F(y)=Pr(Y\le y)=Pr(X^2\le y)=Pr(-\sqrt {y}\le X\le \sqrt {y})=...$

If $X$ is distributed $\mathcal{N}\sim(\mu,1)$ then what is the distribution of $X^2$? My try: \begin{align*}     P(X^2<x)\\      P(-\sqrt{x}<X<\sqrt{x})\\     \int_{-\sqrt{x}}^{\sqrt{x}} f(x) \,dx  \end{align*} Then: \begin{align*}     f_{X^{2}}(x)=\frac{d}{dx}\int_{\sqrt{-x}}^{\sqrt{x}} f(x) \,dx\\     =f_X(\sqrt{x})\frac{1}{2\sqrt{x}}+f_X(-\sqrt{x})\frac{1}{2\sqrt{x}}\\     =\frac{1}{\sqrt{2\pi x}} e^{\frac{-(\sqrt{x}-\mu)^2}{2}} \end{align*} How should I continue?


This was a sci-fi book. In it, there was a man that was in space, very far from his family (I think that his family are on Earth but I'm not sure). The man can telepathically communicate with his daughter. She and her twin haven't been born yet; they're fetuses, but she can communicate telepathically with her father.

There's a spaceship, nearing the end of its journey. Everybody on board is in cryosleep. For some reason the wake-up system malfunctions, and the ship will fly on indefinitely. The people at the space port realise this, and try to wake someone up. Their last resort is finding someone on board who is telepathic, and wake this person up. They find one, but it turns out to be an unborn baby.


With minecraft 1.3  were added. Is it possible to find emeralds in a world that was created with an older minecraft version? If yes, does this take effect only on new generated chunks?

I'm a new Minecrafter, and was wondering if new updates are backwards compatible. Specifically, will the new "Adventure Update" features (Beta 1.8) appear in existing worlds created with Beta 1.7 and earlier? Or will I need to create a new world for this version?


I'm finally catching up on the whole "Avengers vs. X-Men" arc, and it seems fairly obvious to me that  is a clone (or something) of . However, upon reading up on her, it seems that Hope "The Mutant Messiah" Summers was born to non-mutant parents living in a town somewhere in Alaska. She was later adopted by , hence the last name "Summers". In my opinion, she seems to be a rather blatant replacement for Jean, but even in-universe the two share too many similarities to NOT be related:     Same physical appearance (seriously, she looks IDENTICAL to the teenage Jean. See?) Same shy, yet fiery personality Both Omega-level mutants (albeit different powers) Both have telepathic/telekinetic powers (Hope has a different primary power but still...) Both have a connection to the Phoenix Force, which is very rare. In fact, so far the only people who have had a natural connection with the Phoenix has been Jean and her "daughters"   It's also important to note that the Summers family, in particular, have a history rife with clones, duplicates, & alternate timelines.   Is there any evidence or hints in-universe that Hope is actually a clone/copy/genetic offspring/etc. of Jean Grey? Or has anyone with Marvel commented on the similarities?

Hope Summers is the supposed Mutant Messiah. She has the surname Summers but I can't figure out why. Is she directly related to Scott Summers (Cyclops) or is it due to her tutelage by Scott/Cable (Scott's son) that she has assumed the surname, or been given it?  Who are her parents, and what relation if any does she have with the Summers?   Bonus Q: Is she related to Jean Grey at all?


I usually write "e.g." when I give an example. But, I just wonder if I have to add comma after e.g. because Some published papers indicate "(e.g.~~~)", and others said "(e.g.,~~~)".  In addition, are parentheses necessary or optional?

It seems that "e.g." is always followed by a comma but "i.e." is not. Why is that?


Why do Math.ceil() and Math.floor() functions return double in Java? Where as their outputs are actually integers! Isn't it an over generalization to make all functions return double? How is it good to be so, if it is at all?

Official Javadoc  that Math.floor() returns a double that is "equal to a mathematical integer", but then why shouldn't it return an int?


In the limitations of Rutherford atom model, it is said that electrons would radiate energy and fall to the nucleus if it rotates in any path other than the allowed circular path.  I want to ask, how does an accelerating electron radiate energy and how does it not radiate energy in allowed paths? I mean , in a circular path , displacement is perpendicular to force and so work done is zero . Then, how does it lose energy ...?  [Any conceptual explanation would be helpful.]

We, as high school students have been taught that-because Bohr's model of an atom assigns specific orbits for electrons-that it is better than Rutherford's model. But what Rutherford failed to explain was why electrons don't emit EM waves & fall into the nucleus. I don't see how the introduction of 'atomic orbitals' overcame this defect. Can't it still radiate EM waves?


In a sentence like this:     I wouldn't even dare to think about the results.   vs     I wouldn't even dare thinking about the results.   Are both of them correct? They seem fine on the surface, but when I say it out loud there seems to be something wrong but I don't know (if it's wrong) which part it is wrong.

What is the difference in meaning when the catenative verb “like” is followed by an infinitive, or by a gerund? For example:      Do you like ski jumping?    vs.      Do you like to ski jump?   Also, what is the difference between:      My brother taught me to read and write.    vs.       My brother taught me reading and writing.


I know there are many questions about this, but none of them worked out for me.    I need to enlarge /home with the space of the "sin asignar" partition.   Everyone says i just got to press "Resize/move" and then move it, well, this is what I see...    Can anyone give me some advice? By the way, the screenshots are taken from my OS, but I always try to do it from a Gparted Live USB.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I have a plan to travel from Doha to Moscow using KLM airlines with transit 2 hrs in Amsterdam, the Russian embassy has already issued a tourist visa and posted it on my passport.  My question, since I'm a Syrian citizen has resident permit in Qatar. Do you think I will face any issue or refused boarding by the airline at Qatar or while transferring planes in Amsterdam since the 2Hrs transit will be in Schengen area and my previous Schengen visa  is already expired??.   Please consider that the Syrian citizens has different consideration than any other nationalities in the airports, because of the civil war situation.

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I would like to buy a new motherboard for my computer since I'm in need of higher ram capacity. My computer is pretty old and my hard-drive is SATA I. All new motherboards I see mention that they have SATA II/ SATA III compatibility. Will my SATA I hard-drive be able to connect?

My motherboard has SATAI and I was wondering if I could buy SATAII hard drives and use it with it. I expect SATA I transfer speeds, but I wanted to make sure to see if that is okay to buy a new hard drive.


I was writing a program for users and Calendars for users.At some point I needed to delete every Calendar whose owner is some person X(Other people can also have this Calendar but the will not be the owner then).I managed to write the following code: void removeCalenderByOwner(String owner){         for(Map.Entry<Integer,Calender> cal:allUserCalenders.entrySet()){             if(cal.getValue().getOwner().equals(owner)){                 getStateByCalender.remove(cal.getValue());                 allUserCalenders.remove(cal.getKey());             }         }     }     static void delete(String name){         for(Map.Entry<String,User> user:UserByUsername.entrySet()){             user.getValue().removeCalenderByOwner(name);         }     }  The first function removes all the Calendars whose owner is "owner" and the second one calls that function for every user.Since the first function modifies alluserCalendar and getStateByCalendar which is parmeters of class user I am getting ConcurrentModificationException for both my functions.Any ideas to fix this? Edit:I used Iterator and again I am getting the same error.I just did it as follows: void removeCalenderByOwner(String owner){         Iterator<Integer> cal=allUserCalenders.keySet().iterator();         while(cal.hasNext()){             Calender calen=allUserCalenders.get(cal.next());             if(calen.getOwner().equals(owner)){                 allUserCalenders.remove(calen.getId());                 getStateByCalender.remove(calen);             }         }     }     static void delete(String name){         Iterator<User> i=UserByUsername.values().iterator();         while(i.hasNext()){             i.next().removeCalenderByOwner(name);         }     }

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


Upon trying to insert Python code in my LateX document I ran into corresponding error message.  Code, which recreates the error message and contains only the most vital parts of my documents:  \documentclass[12pt, a4paper, fleqn]{article} \usepackage{multirow} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[latvian]{babel} \usepackage{geometry} \usepackage{graphicx} \usepackage{amsmath}  \usepackage{listings} \usepackage{color}  \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{mauve}{rgb}{0.58,0,0.82}  \lstset{frame=tb,     language=Python,     aboveskip=3mm,     belowskip=3mm,     showstringspaces=false,     columns=flexible,     basicstyle={\small\ttfamily},     numbers=none,     numberstyle=\tiny\color{gray},     keywordstyle=\color{blue},     commentstyle=\color{dkgreen},     stringstyle=\color{mauve},     breaklines=true,     breakatwhitespace=true,     tabsize=3 }  \geometry{     paper=a4paper,     top=2.5cm,     bottom=3cm,     left=3cm,     right=3cm,     headheight=0.75cm,     footskip=1.5cm,     headsep=0.75cm, }  \begin{document}     \begin{lstlisting}     #Hello, world!     \end{lstlisting} \end{document}

Consider this script:  \documentclass{article}                                                                                %\usepackage[latvian]{babel} \usepackage{listings} \begin{document}                                                                                \end{document}   I get an error   (/usr/local/texlive/2018/texmf-dist/tex/latex/listings/listings.cfg)) (./latvianpres.aux)  ! LaTeX Error: No counter 'chapter' defined.   if I uncomment the line  %\usepackage[latvian]{babel}   What is the problem and how to solve it?


One of my users has managed to leave the domain. I can no longer manage his machine with my domain admin account.  Also for some reason his account name does not show up on the login screen - It just shows the local admin user name - no option to switch users.  He sent me his laptop - so I was planning on logging in with the documented local admin password - but whoever set it up (before I was in my current position) has not documented it correctly.  Any tips on how to get into the machine now?  Whats the best way to get into the machine without the password?  I would re-image it, but he is a remote user in charge of his own backups onto an external hard drive, and he hasn't done it in a month.  I need to get the data on this C: drive by monday.

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


Look at this:

  #d1 {     height: 3000px;     background-color: red; }  #d2 {     background-color: green;     height: 40px;     width: 40px;     position: absolute;     bottom: 0px; }   I want to make div d2 appear at the bottom of d1, not the bottom of the screen.   Why position: absolute doesn't work here?

Say I have the following CSS and HTML code:    #header {   height: 150px; }

Header title
   Header content (one or multiple lines)
     The header section is fixed height, but the header content may change.  I would like the content of the header to be vertically aligned to the bottom of the header section, so the last line of text "sticks" to the bottom of the header section.  So if there is only one line of text, it would be like:   ----------------------------- | Header title | | | | header content (resulting in one line) -----------------------------   And if there were three lines:   ----------------------------- | Header title | | header content (which is so | much stuff that it perfectly | spans over three lines) -----------------------------   How can this be done in CSS?


The PE of Minecraft now has like a server name and IP address does that mean we can join computers and play?

My kids are playing Minecraft on 2 PCs, creative mode.  They are connected by the way of one of them starts a single player game on the other one than joins that game over the LAN.  Can I, using Minecraft PE on my iPad, join their game as well?


I'm attempting to install Ubuntu from a live USB, however it gives me the following error:      error installing   /cdrom//pool/main/c/console-setup/console-setup-linux_1.88_all.c    trying to overwrite '/etc/console-setup/compose.ISo-8859-13.inc',   which is also in package console-setup 1.88.   I have already tried to recreate the live USB. The system previously held a Ubuntu 12.04 installation.   Is there any way around this?   Edit:  it seems that the new installation also damaged the other partitions as I now get   > `error: no such device: 83327c9[long code]` entering rescue mode... grub rescue>   when trying to restart (rather than the "Choose a boot"). However the Ubuntu installation just started with no problems.   and opening the grub rescue, is there any way to restore my Windows 7 boot as well as my old Ubuntu 12.04?

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


I need to remove the automatically installed driver of a device before I can install the proper/required driver. So far, I used the "Delete the driver software for this device" checkbox and I also used pnputil to remove the driver from the windows driver cache/storage. However, the device magically appears with the allegedly deleted driver again after the required reboot. The driver does also appear again in the driver cache. I am at a loss from where  windows restores that driver. How I can prevent that?    Full story: I did a clean Windows 10 installation on a Lenovo Yoga Book Tablet. Lenovo's driver installation/update tool does not work for some reason on my particular device, so I installed all drivers manually. The driver for the so called "Halo Keyboard" has the following installation instruction:  1. You need to uninstall "Goodix Touch HID" first:     a. Right click on the "Win" button on the left bottom corner of the desktop     b. Click Device Manager --> Expand the "Human Interface Devices" tree     c. Double click on the "Goodix Touch HID" item --> choose "Driver" tab     d. Click "Uninstall" button --> select the "Delete the driver software         for this device" --> click "OK"     e. if need restart, please follow the guide.  2. install KeyboardDriver 2.0.7.msi First.(need restart your computer) 3. install HaloKeyboard 2.0.7.msi Next. 4. install Multi-mode service 1.0.2.7.msi last. 5. restart your computer.   The Goodix Touch HID is the driver that is re-installed regardless of the procedure described above.

I've upgraded my PC from Windows 7 Ultimate to Windows 10 Pro; overall it seems to be working fine, with small bugs here and there. One thing that I find really annoying is that Windows seems to think it is OK to install drivers and vendor-specific control panels for me.  I've always installed drivers manually to get around having all the bloatware (i.e., Realtek's audio management panels and other vendor-specific tweaking tools).  How do I stop Windows from automatically installing bloat on my custom PC, so that I can use the drivers I've exported from packages and binaries to get around bloats?  If I uninstall everything Windows automatically installed, it seems as if a reboot persists them and installs again.  Preferably I'd like to perform a clean install and have Windows skip installing any drivers automatically. Is this possible?


Linux has a command to retrieve detailed CPU information using cat /proc/cpuinfo. Using this command, users can get CPU and CPU's core information like below.  processor   : 0 vendor_id   : GenuineIntel cpu family  : 6 model       : 142 model name  : Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz stepping    : 9 cpu MHz     : 3096.000 cache size  : 4096 KB physical id : 0 siblings    : 2 core id     : 0 cpu cores   : 2 apicid      : 0 initial apicid  : 0 fpu     : yes fpu_exception   : yes cpuid level : 22 wp      : yes flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good xtopology nonstop_tsc unfair_spinlock eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti retpoline fsgsbase avx2 invpcid rdseed flush_l1d bogomips    : 6192.00 clflush size    : 64 cache_alignment : 64 address sizes   : 39 bits physical, 48 bits virtual power management:  processor   : 1 vendor_id   : GenuineIntel cpu family  : 6 model       : 142 model name  : Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz stepping    : 9 cpu MHz     : 3096.000 cache size  : 4096 KB physical id : 0 siblings    : 2 core id     : 1 cpu cores   : 2 apicid      : 1 initial apicid  : 1 fpu     : yes fpu_exception   : yes cpuid level : 22 wp      : yes flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good xtopology nonstop_tsc unfair_spinlock eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti retpoline fsgsbase avx2 invpcid rdseed flush_l1d bogomips    : 6192.00 clflush size    : 64 cache_alignment : 64 address sizes   : 39 bits physical, 48 bits virtual power management:   Does macOS/OS X have a command to retrieve detailed CPU and CPU cores information equal to Linux /proc/cpuinfo? I really want to know a CLI command to retrieve the Mac's CPU core ID.  I tried sysctl machdep.cpu, but it didn't retrieve CPU core ID.

I'd like to identify which CPU this notebook is using, in terms of code names such as "Ivy Bridge" and "Haswell". The little Apple logo in the upper left shows some information, but not this.


I have both a GeoJSON and shapefile of volcanoes along the Pacific Ring of Fire. The area I want to render in the map is right around the antimeridian, so Leaflet cuts it in half. I initially tried to use  to wrap the data, but this was messing with the styling so I thought I would try and reproject the data itself in QGIS.   What is the best way to go about this? Duplicate the data and add 360 to each of the longitude values, or is there a more elegant solution?  I don't believe this is a repost, since most of the questions I've seen are asking how to reproject [0 360] to [-180 180].

I wish to display a map in QGIS (world country shapefiles) showing all countries but centered on the Pacific area.   I am not familiar with Proj4, so is there any way this can be done in QGIS?


Is there any concept of an after-life in Tolken's Middle Earth and does it vary for the races?    What I have been able to glean:   The elves can go to the undying lands when they choose but it is not clear if they go there when they are killed?  The care and ritual with which the men seem to treat the dead suggests that there is some form of religion-like concepts for the passage into death.   The existence of wraiths and ghosts seem to indicate that consciousness can exist beyond the physical form but this always seems to be a negative thing.

Three Rings for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die,  In the excerpt above, is there any significance to the bit about "Mortal Men"?  Obviously men of Middle-earth are mortal, but aren't Dwarves mortal as well?


I know how to edit the user and select "change picture" But, when I click on "change picture", I am redirected to gravatar!  The duplicate answer is outdated, since other users on Area 51 have pics]  Also the problem described in the question marked as a possible duplicate differs from the one described here. It appears the other user made the change, but it didn't take effect.

How do I change my profile picture on my main user on Area 51? I successfully changed it on my discuss user (hovered over my profile picture, clicked link "change picture"), but the "change user" link does not appear on my main user profile page.  Thanks!


I would like to be able to cite some articles as superscript, and some not.  The problem is that if I try this :  \documentclass{article} \usepackage[numbers, square, super]{natbib}  \begin{document}  patotos are definetly good for you\cite{who09} and in \cite{who09} they show that they have an harmonious form.  \begin{thebibliography}{0} \bibitem{who09} Who J F. Nice Book. 2009. \end{thebibliography}  \end{document}   I would have all citations as superscripts while I would like the second cite not to be in superscript because I actually mention the article (but I don't want to present all the writters)... =)

I am using natbib with superscript numbered citations as follows:  \usepackage[super,comma,sort&compress]{natbib}    It works great when I have the case This is a reference~\cite{author1999}. My reference appears as a superscript.   However, I occasionally want write something like: As shown by \citet{author1999} where I want the citation written out and not as a superscript. natbib in super mode inserts a superscript when using \citet.  Is there a way to have natbib use \citet in regular mode despite being in super mode? Can one change the mode temporarily to not have super and then switch it back on again?


For example, given the following code, when I first click the parent and then click the child element, the events always seem to fire in this order MOUSEDOWN, FOCUSOUT, FOCUSIN:  html  <div  id="parent"  tabindex="0"  style="background-color: blue; height: 100px; width: 100px;">  <div    id="child"    tabindex="0"    style="background-color: red; height: 50px; width: 50px;">  </div> </div>   js  var node = document.getElementById('parent');  node.addEventListener('mousedown', function () {  console.log("MOUSEDOWN"); });  node.addEventListener('focusin', function () {  console.log("FOCUSIN"); });  node.addEventListener('focusout', function () {  console.log("FOCUSOUT"); });   This appears to be true for IE11 as well. Is this just an implementation coincidence or is there an officially defined order event listeners for each event type will be triggered in? Can I rely on mousedown always coming before focusin or focusout?

What order of precedence are events handled in JavaScript?  Here are the events in alphabetical order...   onabort - Loading of an image is interrupted onblur - An element loses focus onchange - The user changes the content of a field onclick - Mouse clicks an object ondblclick - Mouse double-clicks an object onerror - An error occurs when loading a document or an image onfocus - An element gets focus onkeydown - A keyboard key is pressed onkeypress - A keyboard key is pressed or held down onkeyup - A keyboard key is  released onload - A page or an image is  finished loading onmousedown - A mouse button is  pressed onmousemove - The mouse is moved onmouseout - The mouse is moved off  an element onmouseover - The mouse is moved  over an element onmouseup - A mouse button is  released onreset - The reset button is  clicked onresize - A window or frame is  resized onselect - Text is selected onsubmit - The submit button is  clicked onunload - The user exits the page   What order are they handled out of the event queue?  The precedence is not first-in-first-out (FIFO) or so I believe.


After installing Ubuntu server 12.0.4 LTS from a booteble USB created using Universal-USB-Installer-1.9.5.1.exe I removed the USB to allow it to boot from the disk. But it only booted to a Black Screen with a blinking cursor. Several reboots have not  helped. What should I do? I am new to Linux commands so give me clear step by step guidance. I do have another bootable Slax USB. How can I use this to get to the Hard disk?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Ok here is what I am trying to accomplish,   I want to configure mutliple systems to have a script start when ever any usb stick is mounted and then if a specific folder is on the usb stick copy its contents to a folder on the system.  I have done research and found ways to run a script when a particular usb is mounted, but not any. secondly because I want the script to act on the newly mounted usb stick automatically, i would need its mount point, or path to root be passed to the script or some other workaround.  I actually already have a script made up to look for the dir, and then copy the directorys i want all done up but I dont know how to use it on any usb that is mounted  essentially the practical reason for this is that I want to be able to insert anystick into mutiple systems and automatically copy the files onto each system. I have 2 ubuntu installs and 2 others that are based on libreelec for raspberry pi so not many options to install extra packages, mostly basic systemd and bash scripting I hope  I want a cross linux solution as this will be used with both ubuntu and libreelec. I would prefer to use system d but udev may end up being a better solution.

What is the state-of-the-art method for automatically executing custom scripts upon USB device plug-in under current Linux distributions like Debian/CentOS/Fedora?  For example if you want to automatically mount/copy some files/umount a USB mass storage device based on its UUID (or device ID etc.).


Does the uncertainty principle imply the non-deterministic universe, or just the fact that our model of the universe, the one based on observation, can be at most non-deterministic, since we will not be able to measure with perfect accuracy, even if such would exist (and therefore we will have to provide probability distributions rather than an event which should happen with overwhelming probability (term used by Terence Tao))?

In many physics divulgation books I've read, this seems to be a commonly accepted point of view (I'm making this quote up, as I don't remember the exact words, but this should give you an idea):      is not a result of our lack of proper measurement tools. The fact that we can't precisely know both the position and momentum of an elementary particle is, indeed, a property of the particle itself. It is an intrinsic property of the Universe we live in.   Then this video came out:  (skip to , if you're already familiar with the uncertainty principle).  So, correct me if I'm wrong, what we may claim according to the video is:     the only way to measure an elementary particle is to make it interact with another elementary particle: it is therefore incorrect to say that an elementary particle doesn't have a well defined momentum/position before we make our measurement. We cannot access this data (momentum/position) without changing it, therefore it is correct to say that our ignorance about this data is not an intrinsic property of the Universe (but, rather, an important limit of how we can measure it).   Please tell me how can both of the highlighted paragraphs be true or how they should be corrected.


I took a picture of my new cushion but just realized the puff wasn’t in the right position when I took it. It’s not in the center of the container (?).  I want to say that the puff is a little bit too “high” but I’m not sure if “high” or “not in the center” is the correct expression for this. How would a native speaker describe it?

Is there a word that can describe a geometric figure such as a circle or ellipse that is not centered at origin (0, 0) in cartesian space? I'd like to find an agreed upon mathematical word, but if it doesn't exist then a substitute "non-mathematical" word would do as well.


I just bought Windows 8.1 and I would like to download the ISO file so I can make a bootable key for my new computer. Microsoft provided me an executable file called OSGS14-WindowsSetupBox-32bitand64bit-English-4141408.  Since I have a Mac laptop, I made a virtual machine running Windows 7 64bits, and I tried to run this executable, yet it fails since my screen resolution is too low (and I cannot increase it). It requires 1024x768 and I have 1280x674. Basically, it says I do not meet the standards of Windows 8.1 so I can't continue. My other computer (which I will install Windows 8.1 on) has no operating system to the Mac is my only solution.  Now I am a bit worried, is there any way I get this ISO file from a "sane" source ? I have a key any way, does Microsoft provide a link to this ISO file ?

I obtained a licence key for Windows 8 through DreamSpark. Is there a way to download a Windows 8 ISO image like you could for Windows 7? I am on a non-Windows machine, so I cannot use the Secure Download Manager to download Windows 8 directly using DreamSpark.


I'm trying to get my .sh file to run a Java program for a specific amount of time.     Here's my .sh file:  #Runs Java Repeatedly. #Reset directory cd #Go until src cd Desktop/Lin\ Lab/Java\ Workspace/SandBubbler/src/  for((i = 0; i < 10; i++)) do     java testerPackage.BubblerSimulation     #kill process after x amount of seconds. done   I'm new to Unix/Linux (I started learning it yesterday) so please explain it in a simple way. Thanks!

I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.


I ran across this problem in my Analysis class and can't seem to come up with a good solution. Here's the question: Show that if $\lim_{x\to a}f'(x) = A$ then $f'(a)$ exists and equals $A$. $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$.  I tried applying the Mean Value theorem like this: There exists a $c \in (a, x)$ st $f(x)-f(a)=f'(c)(x-a) \implies \frac{f(x)-f(a)}{x-a}=f'(c) \implies f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{c\to a}f'(c)=A$  However, I think this is wrong. I am pretty sure the Mean Value theorem is needed, but my application of it seems to be incorrect. Would somebody be able to point me in the right direction?

Let $f$ be a real-valued function continuous on $[a,b]$ and differentiable on $(a,b)$. Suppose that $\lim_{x\rightarrow a}f'(x)$ exists. Then, prove that $f$ is differentiable at $a$ and $f'(a)=\lim_{x\rightarrow a}f'(x)$.    It seems like an easy example, but a little bit tricky. I'm not sure which theorems should be used in here.    ==============================================================  Using @David Mitra's advice and @Pete L. Clark's notes I tried to solve this proof. I want to know my proof is correct or not.  By MVT, for $h>0$ and $c_h \in (a,a+h)$ $$\frac{f(a+h)-f(a)}{h}=f'(c_h)$$ and $\lim_{h \rightarrow 0^+}c_h=a$.    Then $$\lim_{h \rightarrow 0^+}\frac{f(a+h)-f(a)}{h}=\lim_{h \rightarrow 0^+}f'(c_h)=\lim_{h \rightarrow 0^+}f'(a)$$   But that's enough? I think I should show something more, but don't know what it is.


So in my lectures we derived the rocket equation which is given by:  $$F = m \cdot\frac{dv}{dt} + u\cdot \frac{dm}{dt}$$  Where m is the mass of the rocket, and u is the speed of the ejected fuel.  But if I use  $$F = \frac{dP}{dt} = \frac{d(mv)}{dt}$$  Where $P$ is the momentum I get  $$F = m \cdot\frac{dv}{dt} + v\cdot \frac{dm}{dt}$$  My question is why are these different? Isn't this a contradiction?

Frequently I see the expression  $$F = \frac{dp}{dt} = \frac{d}{dt}(mv) = \frac{dm}{dt}v + ma,$$ which can be applied to variable mass systems.  But I'm wondering if this derivation is correct, because the second law of Newton is formulated for point masses.   Furthermore if i change the inertial frame of reference, only $v$ on the right side of the formula $F = \frac{dm}{dt}v+ma$ will change, meaning that $F$ would be dependent of the frame of reference, which (according to me) can't be true.   I realize there exists a formula for varying mass systems, that looks quite familiar to this one, but isn't exactly the same, because the $v$ on the right side is there the relative velocity of mass expulsed/accreted. The derivation of that formula is also rather different from this one.   So my question is: is this formula, that I frequently encounter in syllabi and books, correct? Where lies my mistake.


Context:   The  may be the ethically correct thing to do, but there's certainly legal ramifications with it that should not be ignored. While the answer has a bolded disclaimer that points this out, this doesn't change the fact that the content of the answer itself can cause serious harm.  Should such answers be discouraged on this site? Should they be redirected to Law.SE?

If I see an answer that involves some illegal activity, such as breaking license agreements, should I then mark this as Offensive or should I simply down-vote it?


I take an Academia site for an example, but almost any other site is affected. To check the issue just open sites in browser private mode.   I noticed that top banner of main and meta sites are the same except of site names:                    But the right banner for meta says that site is used for discussion of main site. I suggest to reflect this specific in the top banner too:        In particular it possibly can prevent (or at least reduce) posting a question on meta sites instead of main for some newbies than already has 5+ rep to participate on meta. I’ve seen small amount of post on ruSO.meta which should be questioned on main sites instead. And think that same behavior can exists on any SE site.

The hero header contains the same description for the Main and Meta sites. Here's the one for MSO:           Meta Stack Overflow is a question and answer site for professional and enthusiast programmers. Join them; it only takes a minute:    This can easily confuse people who are new to the network, so I feel this should be changed to something Meta specific. Perhaps re-use the text from the sidebar, that has a good description:     This site is intended for bugs, features, and discussion of Stack Overflow and the software that powers it. You must have an account on Stack Overflow to participate.


I used this and others in my Codeigniter website,  ⇾   I encode and decode using HTML entities.  I declared this:   <meta charset="utf-8">   in my header but I kept getting this  â‡¾    any solution?

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


I am using the drupal 7 content type like my form i dont know how write the form validation to that particular form.

I need to add custom validation to a form, lets says add article form.   I was expecting something like hook_FORM_ID_validate() to handle this, but cannot find anything relavant in the API documentation.  What is the way to add custom validation to a form?


I'd love to practice building structures or practicing with weapons without worrying about dying before I get a chance to use said weapons.   The problem is, I don't see a way to "practice" in Fortnite Battle Royale.  There's really no chance to practice in a match since shooting wildly gives away your position, or sometimes you just get bad luck and won't get the various other purple/gold tier weapons.  Is there a way to practice with weapons and buildings in Fortnite Battle Royale? Specifically offline?

Is it possible to be play Battle Royale in some sort of local environment?  I'm not too great at some aspects of the game and would like to practice in my own time and pace and not worry about a sniper bullet or the storm, similarly to how you can play CS:GO or Overwatch on any map, by yourself, with all sorts of various settings changed. Has anything like that been implemented (yet) ?  I haven't bought Save the World, just the f2p game.


I am using a 9-wire RS232-LVTTL device (Iridium 9602N) along with an ATMega2560. There are some PCBs /  out there that passively convert the 9-wire signal to 3-wire TX/RX. The PCB I have that does this comes from a supplier that uses nothing but diodes, resistors, caps, inductors, and 1 IC that says "FK1" on it. I wasn't able to identify FK1, though it looks like an SOT-23 package. How is this being done without the MAX3232 chip??  Thanks!

All the develooment boards I have seen yet with serial communication support usually have MAX232 line trasceiver. However, I have come across this Olimex PIC-LCD development board that does not have it. Rather, it seems to use discrete components to achieve the same aim. Below is the schematic. The RXD and TXD are connected to the PIC:    I am trying to understand how this works. For recieved data we would need to clamp the voltage to Vcc. For transmitted data we need to amplify the signal. I vaguely understand that there would be a simple clamp diode for the received data and a charge pump made up of capacitor and diode for the transmitter. The transistors are resistors are confusing me. What purpose do they serve?


I'm looking for a story that I read as a child. The synopsis is something like: "a science fiction story about scientists who create a personal force field which makes a halo appear around their heads when it is on and they use this like gods or angels to trick a foreign invading military to back down"

I vaguely remember a SciFi novel from my younger days, where scientists discover "alternative" forms of power beside electromagnetism.  I do not remember the specific forms, but it was something along the lines of "electrogravity", "magnetogravity" etc. -- you get the idea. If I remember correctly, the effects of these power forms were basically psionic / magic in nature.  Unfortunately I remember very little of the actual plot, and couldn't put it into words with any coherency. Some treachery from within the group of scientists, perhaps some involvement of aliens? I cannot really remember. I just remember I enjoyed the story very much, and would like to re-read it.  The title could be "The fifth column" or similar -- then again I might be confusing two seperate novels.  I know that's not much, sorry. Anyone remembers this?


I'm a beginner at programming in Java.  I'm aware of the number of topics on this particular message error but I haven't been able to fix this issue. The error is indicated to be in line 23 in the following code.  I'm aware the problem seems to be linked to null references, but I'm failing to see how my method "Recommander" isn't assigning values to all the references.   public class Recommander{  // predetermined array of series  private String[]  serie= {"Friends S1","Friends S2",      "Friends S6","Friends S7", "Friends S8", "How I met your mother S1",     "How I met your mother S2","How I met your mother S3 ","Castle S3",      "Santa Clarita Diet S1", "Modern Family S1","Modern Family S2",     "Family Guy S6", "The Simpsons S5"};   // array of the purchases of one customer   private int[] profil ;   //number of profiles in the database private int nbProfils = 10 ;   // array of all the profiles from the database and the series available private int[][] records ;  // creation of an instance of the object Recommander  public Recommander() {      for (int k=0;k<=nbProfils-1; k++) {         for (int i=0; i<=serie.length-1;i++) {              records[k][i]= (int) (Math.random())*2 ;          }     }  }   // Display of the series available in store public String affichageSerie() {      String Affichage = "" ;      for (int i = 0 ; i<=serie.length-1; i++) {          Affichage = Affichage + serie[i] +  "\n" ;      }      return Affichage  ; }    }

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?


The p-norm is defined as:  $$ \ \|x\|_p=\left(|x_1|^p+|x_2|^p+\dotsb+|x_n|^p\right)^{\frac{1}{p}} $$  When $p<1$, this is no longer a "norm" because it violates the triangle inequality (- it is super additive and not subadditive). However, it is still valid to ask, what is its limit when p goes to 0?  My guess is that:   If all coordinates are 0, then $l_p=0$, and it remains like this when p=0. If exactly one coordinate, say $x_i$, is non-zero, then $l_p=x_i$, and it remains like this when p=0. If more than one coordinate (say, $x_i$ and $x_j$) are non-zero, then $l_p>x_i$, and because the exponent goes to $\infty$, the value of $l_p$ also goes to $\infty$.   Is this correct?  (Note that this is not equal to the  = the number of nonzero elements. This is also not equal to the , in which there is an additional $1/n$ factor).

The $L^p$ norm in $\mathbb{R}^n$ is \begin{align} \|x\|_p = \left(\sum_{j=1}^{n} |x_j|^p\right)^{1/p}. \end{align} Playing around with WolframAlpha, I noticed that, if we define the "scaled" $L^p$ norm in $\mathbb{R}^n$ to be  \begin{align} \| x \|_p = \left(\frac{1}{n}\sum_{j=1}^{n} |x_j|^p\right)^{1/p} \end{align} then \begin{align} \lim_{p \to 0} \|x\|_p &= \left( \prod_{j=1}^{n} |x_j| \right)^{1/n}, \end{align} which is the geometric mean of the coordinates' absolute values. This is interesting maybe because the $L^p$ norm doesn't have a nice limit at zero.  My questions:   How do I prove this? Is this definition of "scaled $L^p$ norm" interesting, or known by another name, or used anywhere? Is there any interesting reason to define the $L^0$ norm as the geometric mean, as above? Further reading?   Thanks!


\documentclass{beamer}  \setbeamertemplate{navigation symbols}{}     \usepackage[utf8]{inputenc} \usepackage[english,greek]{babel}  \usepackage{alphabeta} \usepackage{multicol} \newcommand{\en}{\selectlanguage{english}} \newcommand{\gr}{\selectlanguage{greek}} \author{\textlatin{author}} \usepackage{array,amsmath} \usepackage{amsthm}  \definecolor{UniBlue}{RGB}{83,121,170} \definecolor{frame}{RGB}{2,0,0} \setbeamercolor*{frametitle}{fg=frame}   \useoutertheme{shadow} \usepackage{tikz} \usetikzlibrary{shadings} \colorlet{titleleft}{cyan!75!black} \colorlet{titleright}{UniBlue}  \makeatletter \pgfdeclarehorizontalshading[titleleft,titleright]{beamer@frametitleshade}{\paperheight}{%     color(0pt)=(titleleft);     color(\paperwidth)=(titleright)} \makeatother       \title{}  \begin{document}       \begin{frame}{\textlatin{frametitle}}  \end{frame}  \end{document}

Here is a reduced example of my code.  I am attempting to restyle the background of the section in head/foot and subsection in head/foot in the CambridgeUS theme to a gradient background colour.  Right now the gradient background works if I were to specify say beamer@frametitleshade in my pgf declaration.  I can't find and can't guess the correct keywords to get this to affect the background of the section in head/foot nor the subsection in head/foot, I've tried things like sectioninheadfootshade and variants.    \documentclass[hyperref={pdftex}]{beamer} \useoutertheme{shadow} \definecolor {Burgandy}{HTML}{660033} \definecolor {Crimson}{HTML}{990033} \definecolor {Orange}{HTML}{ff9933}  \usetheme{CambridgeUS}  \colorlet{titleleft}{Burgandy} \colorlet{titlemiddle}{Crimson} \colorlet{titleright}{Orange}  \pgfdeclarehorizontalshading[titleleft,titlemiddle,titleright]       {beamer@frametitleshade}{\paperheight}{     color(0pt)=(titleleft);     color(0.6\paperwidth)=(titlemiddle);     color(\paperwidth)=(titleright)   }  \title[Short Title]{Long title} \subtitle{Sub title} \date{\today}  \begin{document}     \begin{titlepage}     \end{titlepage}      \begin{frame}{Slide 1}           Content     \end{frame} \end{document}


I would like to recursively update the Date Modified field of a directory (and all its subdirectories) so that every folder has the same Date Modified timestamp as the most recently modified file that is contained within the tree.  I have read and tried to utilise the detailed solutions posted here:  but am unable to get them to work.  I am using Mac OS.

I was wondering if anyone knows how to change the timestamps of folders recursively based on the latest timestamp found of the files in that folder.  So for example:   jon@UbuntuPanther:/media/media/MP3s/Foo Fighters/(1997-05-20) The Colour and The Shape$ ls -alF total 55220 drwxr-xr-x  2 jon jon    4096 2010-08-30 12:34 ./ drwxr-xr-x 11 jon jon    4096 2010-08-30 12:34 ../ -rw-r--r--  1 jon jon 1694044 2010-04-18 00:51 Foo Fighters - Doll.mp3 -rw-r--r--  1 jon jon 3151170 2010-04-18 00:51 Foo Fighters - Enough Space.mp3 -rw-r--r--  1 jon jon 5004289 2010-04-18 00:52 Foo Fighters - Everlong.mp3 -rw-r--r--  1 jon jon 5803125 2010-04-18 00:51 Foo Fighters - February Stars.mp3 -rw-r--r--  1 jon jon 4994903 2010-04-18 00:51 Foo Fighters - Hey, Johnny Park!.mp3 -rw-r--r--  1 jon jon 4649556 2010-04-18 00:52 Foo Fighters - Monkey Wrench.mp3 -rw-r--r--  1 jon jon 5216923 2010-04-18 00:51 Foo Fighters - My Hero.mp3 -rw-r--r--  1 jon jon 4294291 2010-04-18 00:52 Foo Fighters - My Poor Brain.mp3 -rw-r--r--  1 jon jon 6778011 2010-04-18 00:52 Foo Fighters - New Way Home.mp3 -rw-r--r--  1 jon jon 2956287 2010-04-18 00:51 Foo Fighters - See You.mp3 -rw-r--r--  1 jon jon 2730072 2010-04-18 00:51 Foo Fighters - Up in Arms.mp3 -rw-r--r--  1 jon jon 6086821 2010-04-18 00:51 Foo Fighters - Walking After You.mp3 -rw-r--r--  1 jon jon 3033660 2010-04-18 00:52 Foo Fighters - Wind Up.mp3   The folder "(1997-05-20) The Colour and The Shape" would have its timestamp set to 2010-04-18 00:52.


Suppose we have one CPU with 2 core , then I need information about no.of.Processes , IO time,IDLE Time, System Time, Name of core for specific core Level and not to CPU Level etc. So I would you like to know is there any api expose for mac.

Suppose we have one CPU with 2 cores. I seek dynamic scheduling information such as Processes, IO time, IDLE Time, System Time as allocated time specific cores as opposed to aggregated or averaged to a multi core CPU.   Below I have prepared a command but it is giving above information on CPU level and not on core level.  sh-3.2# top -l 15 | grep -i "Processes" | tail -2  Processes: 387 total, 2 running, 385 sleeping, 1677 threads  Processes: 386 total, 2 running, 384 sleeping, 1672 threads