I'm running Kubuntu 14.04 and my machine is nearly locked up. I apparently have a canary problem.  Here is the log just before the bird started chirping:  May 10 21:38:06 Morchella NetworkManager[1010]: <info>   gateway 192.168.0.1 May 10 21:38:06 Morchella NetworkManager[1010]: <info>   nameserver '192.168.0.1' May 10 21:38:07 Morchella wpa_supplicant[1160]: wlan0: CTRL-EVENT-SCAN-STARTED  May 10 21:38:07 Morchella dbus[799]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper) May 10 21:38:22 Morchella NetworkManager[1010]: <warn> Dispatcher failed: (4) Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. May 10 21:38:38 Morchella dbus[799]: [system] Failed to activate service 'org.freedesktop.nm_dispatcher': timed out May 10 21:40:28 Morchella wpa_supplicant[1160]: wlan0: CTRL-EVENT-SCAN-STARTED  May 10 21:43:14 Morchella wpa_supplicant[1160]: wlan0: CTRL-EVENT-SCAN-STARTED  May 10 21:45:17 Morchella CRON[13724]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime)) May 10 21:45:19 Morchella wpa_supplicant[1160]: wlan0: CTRL-EVENT-SCAN-STARTED  May 10 22:00:44 Morchella wpa_supplicant[1160]: message repeated 6 times: [ wlan0: CTRL-EVENT-SCAN-STARTED ] May 10 22:03:28 Morchella rtkit-daemon[2228]: The canary thread is apparently starving. Taking action. May 10 22:03:28 Morchella rtkit-daemon[2228]: Demoting known real-time threads. May 10 22:03:28 Morchella rtkit-daemon[2228]: Demoted 0 threads. May 10 22:03:55 Morchella rtkit-daemon[2228]: The canary thread is apparently starving. Taking action. May 10 22:03:55 Morchella rtkit-daemon[2228]: Demoting known real-time threads. May 10 22:03:55 Morchella rtkit-daemon[2228]: Demoted 0 threads. May 10 22:04:10 Morchella rtkit-daemon[2228]: The canary thread is apparently starving. Taking action. May 10 22:04:11 Morchella rtkit-daemon[2228]: Demoting known real-time threads. May 10 22:04:11 Morchella rtkit-daemon[2228]: Demoted 0 threads. May 10 22:05:47 Morchella wpa_supplicant[1160]: wlan0: CTRL-EVENT-SCAN-STARTED    I tried to use top to see what was going on, but under the circumstances it wouldn't run.  The older thread on this topic suggested two possible causes: rtkit misbehavior and buffer overflow. But it offers no information about determining which is the cause and what to do about it. Naively looking at the log, it seems to me that rtkit isn't the culprit; it's merely responding to something else going on.  In fact, that older thread is almost useless, except for explaining the "canary" reference.  If the problem is indeed a buffer overflow, how does knowing that help anyone? Indeed, it doesn't even tell you what system component is misbehaving.  And for anyone other than a knowledgeable system maintainer, knowing what is misbehaving still isn't helpful.  As to rtkit-daemon, that doesn't look like a prime causality either -- and if it is, what can anyone do about it?  Further addendum:I suspect that the cause might be Dropbox hogging bandwidth.  So using Dropbox's bandwidth setting, I've throttled back the upload bandwith that Dropbox can use.  Time wil tell if that makes any difference.

The following occasionally appears in /var/log/syslog:  rtkit-daemon[1145]: The canary thread is apparently starving. Taking action. rtkit-daemon[1145]: Demoting known real-time threads. rtkit-daemon[1145]: Successfully demoted thread 1431 of process 1368 (n/a). rtkit-daemon[1145]: Successfully demoted thread 1430 of process 1368 (n/a). rtkit-daemon[1145]: Successfully demoted thread 1368 of process 1368 (n/a). rtkit-daemon[1145]: Demoted 3 threads.   What's going on here?


I have this plot with the intersections of the functions f(x) & g(x) marked as P1, P2 and P3. How can I write its coordinates instead of the texts "P1", "P2" and "P3" calculated with tikz, without having to put them by hand? This is the latex code %% LyX 2.3.5.2 created this file.  For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage{lmodern} \renewcommand{\sfdefault}{lmss} \renewcommand{\ttdefault}{lmtt} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc}  \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \usepackage{tikz} \usetikzlibrary{intersections} \usetikzlibrary{positioning} \usetikzlibrary{calc}  \makeatother  \usepackage{babel} \begin{document}  \section*{Intersecciones}  \begin{tikzpicture}[     scale=0.5,     declare function={f(\x)=\x*\x*\x-2*\x*\x-\x+4;}, % FUNCION f(x)     declare function={g(\x)=2*\x+1;}]                % FUNCION g(x)  % DIBUJAMOS SOLO EN ESTE CUADRO %------------------------------     \clip(-10,-10) rectangle (10,10);  % REJILLA Y EJES %---------------     \draw[densely dotted, help lines] (-10,-10) grid (10,10);     \draw[<->, thick] (0,-9.5) |- (9.5,0) node[above] {$x$};     \draw[<->, thick] (-9.5, 0) -| (0, 9.5) node[right] {$y$};     \foreach \x in {-9,...,-1} {\node[below=2pt, fill=white, inner sep=0] at (\x, 0) {\tiny \x};}     \foreach \x in {1,...,9} {\node[below=2pt, fill=white, inner sep=0] at (\x, 0) {\tiny \x};}     \foreach \x in {-9,...,-1} {\node[right=2pt, fill=white, inner sep=0] at (0, \x) {\tiny \x};}     \foreach \x in {1,...,9} {\node[right=2pt, fill=white, inner sep=0] at (0, \x) {\tiny \x};}  % GRAFICAS DE LAS DOS FUNCIONES %------------------------------     \draw[blue, samples=200, name path=path1] plot(\x, {f(\x)});     \draw[blue, samples=200, name path=path2] plot(\x, {g(\x)});  % DIBUJAMOS UN PUNTO ROJO EN LAS INTERSECCIONES DE LAS DOS FUNCIONES %--------------------------------------------------------------------     \fill[red, name intersections={of=path1 and path2, name=i, total=\t}]     \foreach \s in {1,...,\t} {(i-\s) circle(2pt) node[above right=2pt, fill=white, inner sep=0] {\tiny P\s}}; \end{tikzpicture} \end{document}

In axis environment I have a curve and a line intersecting it. How can I get components of (intersection-1), (intersection-2) etc. in axis units?  \documentclass{minimal}  \usepackage{pgfplots} \usetikzlibrary{intersections}  \begin{document}   \begin{tikzpicture}  \begin{axis} \addplot[name path global=GaussCurve] gnuplot[domain=48.00:56.00,samples=100] {exp(-0.5*((x-52.64)/1.82)**2)/(sqrt(2*pi)*1.82)}; \path[name path global=HelperLine] (axis cs:48,0.13288) -- (axis cs:56,0.13288); \draw[dashed,name intersections={of=GaussCurve and HelperLine}] (axis cs:48,0.13288) -- (intersection-2); \fill[red] (intersection-2) circle (.1cm); \end{axis}  \end{tikzpicture}  \end{document}   e.g. how to get the x component of red circle (intersection-2)?  This code generated by program from some data, so I can't use the presented values, it's just example.


Why would my SO question (which has a tag that is under my favourites) not be contained in the default "interesting" list?  It's had very low viewing numbers and I'm wondering it's being excluded from the list for everybody?   (To be honest, it's probably more to do with the standard of my title - people are probably just ignoring it!)  It is visible if you list posts based on the tags.  I'm in two minds about linking to the question, because I don't want to artificially inflate the views off the back of this post.

According to the tooltip of the 'interesting' tab, interesting questions are     "questions that may be of interest to you based on your history and tag preferences"   Does Stack Overflow use a recommendation engine or just some sql sort/filter?


I want to ask if I can run Kubuntu properly on my laptop. I have a Toshiba Satellite A200-1MD from 2007 with 4GB RAM, Intel core i5 running at 2 GHz processor speed and 128 storage.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


In FMA Brotherhood we can see a lot of text on the Gate of Truth. What does the text mean? I'm especially interested to find out what "Corona" on the top means.

In Fullmetal Alchemist the door in the Truth realm has a huge symbol with all kinds of things on it:    I've seen the opening of Neon Genesis Evangelion today and noticed that the same symbol is shown in the beginning of the opening around 0:10 - 0:13.  I first thought that it was just a random symbol in FMA, but now that I've seen it in the opening of NGE, I believe that it must come from something else since there is no connection between those anime.   What is this symbol, where does it come from and what does it describe?  Here is a more detailed picture of the symbol:


Let $G$ be a connected planar graph with a planar embedding where every face boundary is a cycle of even length. Prove that $G$ is bipartite.   It is quite easy to prove the converse, but how to do this? My line of thought is to assume an odd cycle and show a contradiction, but I don't know where to head? This is homework, so please give hints only, not a full solution.

Let $G$ be a connected planar graph with a planar embedding where every face boundary is a cycle of even length. Prove that $G$ is bipartite.  Any hints/tips will be greatly appreciated.


We have hadoop cluster  We notice that on many DB servers, that the THPs are disabled ( include HDFS servers )  Can you explain why it is so important to disable THP on DB servers?  what could be if THP is enabled?, on DB servers.

I've been struggling with transparent huge pages performance issues of late, and noticed many database systems recommend turning it off. I am talking Oracle, Postgresql, MySQL, Cassandra, NuoDB, Redis, Hadoop, and more.  For examples:   Peter Zaitsev (2014-07-23). .  Percona. Michele Casey (2013-09-17). .  Oracle. Adam Abrevaya and Oleg Levin (2014-05-15).  .  NuoDB DevCentre.   So I am wondering: what kinds of workload do benefit from this feature?


Could anyone guide me on how can we measure the curvature of nonlinear models?  I have to know the methodology to measure nonlinearity (both intrinsic and parametric) for nonlinear regression model. For example, if we have the nonlinear model y = f(x)+e  then how we can say which type of nonlinearity  exists and what is the degree/amount of nonlinearity in the given model?

For plot 1, I can test the association between x and y by doing a simple correlation.   For plot 2, where the relationship is nonlinear yet there is a clear relation between x and y, how can I test the association and label its nature?


I need your advice.  I purchased a ticket with my Brazilian passport in January, and since then I received my Australian Passport that has a different 'first name', 'last name'. I called Qantas to change the name, and they said I would have to cancel my flight, get the refund, and purchase a new ticket with the current available price. They said that the Qantas ticket flight is not transferable, even though I'm not transferring the ticket, I'm changing my name to match the Australia Passport. Any advice? What can and should I do?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


The Crouton should ideally display underneath the toolbar, for context-sensitive updates that don't block content actions.  I apologise if this is a double-post, because I think I initially submitted it to the wrong community.


I wanted to shorten a sentence: "Let the procedures leave in their original state." I wrote "Let the procedures leave  as-is." Is it correct or I had to use "Let the procedures leave  as-are." Has the expression as-is plural?  Thanks    Frank

Let’s say I write: “Just send me those documents as is”. Is that correct? Should the "as is" idiom be pluralised into “as are”, which sounds so wrong to me? Or are they both incorrect, in which case I may write “as they are”?


In my Dell notebook I had installed Windows 10. When I installed Ubuntu 17.04, I can't run Windows from Ubuntu grub/that violet window/. It shows that I have Windows 10 in last row, but when I choose Win10 it doesn't run, only shows grub after dark screen. When I installed Ubuntu I chose the first option: Install with windows 10. How can I solve this problem?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I am attempting to number my sections with the English words: one, two, three, etc. For instance, the command \section{Hello} would produce:  One Hello  Is this even possible in LaTeX?   As an additional question, it would be great if I could put a colon after the number also, i.e.,  One: Hello

In LaTeX, how do I change the chapter number to display as text? eg:  CHAPTER ONE not CHAPTER 1;  CHAPTER THIRTEEN not CHAPTER 13.


I have some values i have stored in mysal table. basically, they are some strings that hold the value up or down.  I want to fetch the data in my table and compare if they are equal to up or down  This is the code  String up = "up"; String down = "down";  @SuppressWarnings("deprecation") Query query = currentSession.createSQLQuery(            "select * from trades where trade_session_status=:trade_session_status AND trade_profit_worker_status=:trade_profit_worker_status"); query.setParameter("trade_session_status", "DONE"); query.setParameter("trade_profit_worker_status", "UNDONE"); @SuppressWarnings("rawtypes") List < Object[] > result = query.list();  for (Object[] objects: result) { Integer id = (Integer) objects[0]; String trade_prediction = (String) objects[10]; String trade_result = (String) objects[11];   if(trade_prediction.equals(up) && trade_result.equals(up)) { }   The code works and i can test if the strings are equal but somewhere down the line, i get an error on this line   if(trade_prediction.equals(up) && trade_result.equals(up)) {   but the program still works.  I get this error     SEVERE: Unexpected error occurred in scheduled task.   java.lang.NullPointerException           at com.boilerplate.components.Scheduler.profit_cron(Scheduler.java:396)   This is the line 396     if(trade_prediction.equals(up) && trade_result.equals(up)) { }   What could be causing the error?

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?


Flight TOM137 flying from Dalaman airport 16/05/2019 This flight was originally due out from Dalaman airport at 01.30....but actually left at 5am  It was a  TUI Dreamliner  plane which takes an hour off the 4 and a half flight time flight  Tui  are saying that according to their logs the flight was only delayed by 2hrs 48 mins .? How is this possible..so does not bridge the 3 hrs delay ..Anyone help on this .thanks

The question  only deals with flights in the US sourced from the  . Is there some similar source for EU, Asia etc?


On , there are three different ISO images listed:  debian-7.7.0-i386-DVD-1.iso        2014-10-18 14:23  3.7G   debian-7.7.0-i386-DVD-2.iso        2014-10-18 14:23  4.4G   debian-7.7.0-i386-DVD-3.iso        2014-10-18 14:23  4.3G     What is the difference between these different ISOs?

I'm planning to install Debian on my home server. It will be running some services like Teamspeak 3, gaming servers, Samba, etc... No business services like DHCP, DNS, ... needed.  So as this is my first time installing Debian I found this site where you can download dvd's and cd's for installation (amd64):   Now I see there are a whole bunch of different CD's and DVD's. I know that only the first DVD / CD is required for basic / core installation and that the others contain additional optional features.  What I am searching for now is something like a list, which DVD / CD contains what. I could not find anything on this topic in the internet.


Hi stackers,         System.out.print("Enter your first name:  ");   firstName = keyboard.nextLine();   if(firstName!="Mike"&&firstName!="mike"&&firstName!="Diane"&&firstName!="diane")   {       System.out.println("derp");   }   else       discount=true;   however, this is the result:  Enter your first name:  diane derp   if anyone can tell me what I'm doing wrong that would be great thank you very much!

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I neglected to update my ARM system from raring to saucy in time. Now I can't install update-manager-core; things are missing.  Is there a way to manually update sources.list to point to some sort of archive so that I can get the update to saucy?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


So I'm very new to Blender and was looking to use it to create some sword fight/lightsaber fight actions scenes. However, I'm running into issues with separating body parts for models.  For example, let's say Luke's hand gets cut off by Darth Vader. How do I go about detaching his hand from the rest of his body so that it can be lying on the ground, separate from the rest of his model? I believe that essentially I'd be creating a new model or mesh, but I'm not certain how to do this from an existing mesh.  Any help or links to tutorials would be appreciated. Thanks!

I've just made a set of armor by using a male body mesh model I downloaded and selecting certain faces from the model and duplicating them to create viable armor pieces.   Since the pieces are just duplicated from the same mesh male model, then it's still part of the same object.   How do I separate the armor piece from the model to make the pieces separate?


I am using Ubuntu 18.04.1 I have installed Cubic. I used the latest Ubuntu 18.04.1 iso to customize with Cubic. I could install git, make, but not able to install gnome-tweak-tool Any ideas?

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


I am simply going to write my question here. I have a feeling it would be rejected on StackOverflow.  To learn iOS development, there is that great free Stanford iTunes-U course. I am looking for something similar for Android development.

Recommendations are a recurring topic on multiple Stack Exchange (SE) sites. Some sites allow recommendations (ex: ), some do not (ex: ). There are many reasons for that and I can still remember animated discussions on this subject on the Gaming meta. Then there is that existential problem with Sci-Fi SE, "What problems does answering a question on this site solve?"  The only common problem I can think of is What to read/watch next?, which obviously led to a big number of recommendation questions, later slightly disguised as list question. And the main trouble with these questions isn't objectivity at all, some of them aren't even subjective. It's the fact that they don't have an answer - they are open ended. -  Those questions are monstrously popular because:  There's an actual problem to be solved,  or  This problem is quite common.  In view of the  blog post, a recommendation question fails the "real questions have answers, not items or ideas or opinions." criteria. But it's still a "practical, answerable questions based on actual problems that you face. " and it requires expertise to answer. The problem is that there are multiple acceptable answers, and the asker is not the best person to evaluate the best answer because he doesn't know which one is the best compared to the others, and he cannot test it in short term. Even the need to accept an answer is questionable. So, is a recommendation question an acceptable kind of list-type question or should it be closed just like any other list-type questions?


I download video list and format to mp3 audio, i use this command  youtube-dl -x --audio-format mp3 [url/vedio]   but if you stop cannot resume download Because the media is formatted. problem is download start from begin  how to use youtube-dl to download video and format to audio mp3 and resume if stop? what option use for it?  thanks for help  Clarification : after formatted rename from .webm to .mp3

I have downloaded youtube videos using youtube-dl. But due to network problem or other problem sometimes I am not able to download video completely. Later, I need to download that video from beginning.  Is there any way to pause and resume download? I use both Chromium and Mozilla.


I’m looking for a way to reproduce a similar effect in Photoshop. Is there a filter that can produce this?

For lack of a better name, I'm trying to create a decreasing stippling effect like this:   My first inclination was that this could be created in Photoshop with some sort of filter effect. I was thinking along the lines of creating a smart object, applying a filter effect, then using a gradient on the filter mask to decrease the effect. This would allow for the possibility of a curved edged like you see in the image. No dice though, there doesn't seem to be an effect that quite does this.   The problem with searching for this effect is that I don't know what it would even be called. I've seen it implemented all types of posters though, so it seems to be generally used.


The question pertains to the question in the title. That is,     Show that if $n$ is not prime then $\Bbb Z /n\Bbb Z$ is not a field.   I realise that this has many duplicates, but my question is rather this;     Why does it not suffice to say that if $n$ is not prime then $\lvert\Bbb Z /n\Bbb Z \rvert = n \neq p^m$ for some prime $p$ and integer $m$ and so is not a field by definition?   I realise this somewhat misses the reason why it's not a field, but would it suffice as an answer to this question?

Let $n \in ℕ$. Show that the ring $ℤ/nℤ$ is a field if and only if $n$   is prime.   Let $n$ prime. I need to show that if $\bar{a} \neq 0$ then $∃\bar b: \bar{a} \cdot \bar{b} = \bar{1}$. Any hints for this ?  Suppose $ℤ/nℤ$ is a field. Therefore: for every $\bar{a} \neq 0$ $∃\bar b: \bar{a}\cdot \bar{b}=1$. How can I show that $n$ must be prime ?


help me find unknown integer number n such as  LCM(n,50) = 200  and  GCD(n,50) = 10  how do you solve?  I tried factoring each numbers such as   $200 = 2^3*5^2$  $10 = 2*5$  $50 = 2 * 5^2$  but idk whats next...  edit:   ok thanks for the help I am now able to solve this type of question:) thanks a lot!

I'm trying to prove that $\operatorname{lcm}(n,m) = nm/\gcd(n,m)$ I showed that both $n,m$ divides $nm/\gcd(n,m)$  but I can't prove that it is the smallest number.  Any help will be appreciated.


Is there any benefit in using UEFI GPT instead of Legacy MBR?  Many thanks in advance!

I am a Linux user. I don't have Windows on my laptop. Also the hard drive size is less than 2 TB. Then why should I use GPT tables? Can't I go with old fasioned MBR?  I will be having two root partitions, two home partitions, and a swap space. So when a partition is not primary, but is extended, does that make any performance difference?


I need to measure the exact size of some installation.  For example, I need to know the disk usage of apt install vim.  My idea is to install a clean Ubuntu first, then I measure the size of its filesystem (x KB); After that, I do apt install pkgname and measure the size of its filesystem (y KB) again.  So the disk usage of apt install pkgname = y - xKB.  However, there are some virtual directories, such as /proc, so I don't know how to measure the exact size of the filesystem. Also, when we do apt install pkgname, a deb file will be downloaded in /var/cache/apt/archives/, so I don't know how to measure exactly the disk usage for pkgname.

I recently learned that GIMP is a Photoshop replacement in Ubuntu world and Photoshop that I knew was a huge application around 500MB. Before downloading gimp, I wanted to know the size of application. I ran  $ apt-cache --no-all-versions show gimp | grep '^Size: ' Size: 3611842   Assuming that those are bytes, that roughly converted to 3.61 Mega Byte. 3.61 MEGABYTE? I mean is that it or are there some hidden dependencies which are gonna eat my internet allocation away?     And if it is 3.61 megabytes then how can Linux apps be this small?


I'm having an issue with a SQL Server log file which will not maintain a steady amount of space held on a HDD which it has been issued. The drive is ~50GB and the log file is growing to occupy this quite often.   The database is set to FULL recovery mode, with hourly differential backups. I understand that this should allow the log file to truncate and use space already allocated to it?   When checking the status of the log file using DBCC LOGINFO it returns that the status of most VLF's within the files are set to '2' which shows them as being active? We've 537 VLF's in the log file. I don't know why all these would be active at one point using 15GB of space?    I've checked the replication through DBCC OPENTRAN and it reports that there are no actively open transactions on the file.   Is there a method of maintaining this file I may of overlooked?   Is there anywhere I can go to determine exactly what the log file is doing?   Would replication interfere with truncating/shrinking the log file?   At present, it grows around 1.67GB per day. I've ~18 days before having to perform some emergency work on shrinking the file. I'd like it to stay below 25GB if possible so there is plenty of room to grow if this has a sudden need for space.

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


I need to install ubuntu alongside with windows 7. But when I clicked on "Install ubuntu alongside with windows 7" there is a msg  "write previous changes to disk and continue". There was two options "Go back" and "Continue". I've three drives C:,D: and one is Recovery Drive. Will it affect the other drive when I click on continue?

I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.  Could someone please provide clear instructions?


It is customary in big works like books or user manuals to split content in several separate files and \include them in the main document: usually each file contains a chapter, an appendix or more generally a unit of text which not nested in any of the remaining others. I tried to extend the use since, writing a user manual of a complex system, I have several parts which remains unchanged even for different systems and thus different manuals: therefore I tried and succeed in including single paragraphs or groups of such sections/subsections, which are naturally nested inside a single chapter, in the sense that the index numbering so generated is more than correct. However, as Mittelbach and Gossens say at page 19 of "The LaTeX Companion" (2nd ed.),     Note that each document part loaded via \include starts on a new page and finishes by calling \clearpage; thus, floats contained therein will not move outside the pages produced by this part. So natural candidates for \include are whole chapters of a book but not necessarily small fractions of text.   I would like to know if there is a way to inhibit this behavior, namely to avoid that chosen parts included with \include will start on a new page.

There are two different commands to incorporate another file into the source of some document, \input and \include. When should I use one or the other? What are the differences between them? Are there more things like them to be aware of?


Let $p$ be prime and $n = p^2$. Show that the polynomial $1+px$ has a multiplicative inverse in $\mathbb{Z}_n[x]$. Is this polynomial invertible if $n = p^k$ for arbitrary $k>0$?

Show that $4x^2+6x+3$ is a unit in $\mathbb{Z}_8[x]$.  Once you have found the inverse like , the verification is trivial. But how do you come up with such an inverse. Do I just try with general polynomials of all degrees and see what restrictions RHS = $1$ imposes on the coefficients until I get lucky? Also is there a general method to show an element in a ring is a unit?


Consider a hollow cylinder with a dense 1kg weight affixed to one point on the inside.  If placed on an inclined plane, the cylinder will not roll down if there is sufficient friction.  If we gradually reduce the density of the weight toward the volume of the cylinder (edit: alternately, if we advance the cylinder's rotation), there will reach a point where it will begin to roll.  What factors determine this point?  I presume it has to do with the center of gravity with respect to the rotating axis?  Edit: This is not homework.  I'm a high school dropout.  I am considering the construction of a robot that is essentially a heavy box hung between parallel bike wheels on a single axle.  I am considering the rollover condition, i.e.: how far can the box tilt before rolling over given a known center of gravity.  The box would lean forward if climbing a slope.  If the climb is too great, the box would turn too much and roll over.  I would limit the tilt with software to prevent a rollover if I knew the limit.  Edit 2: My question is essentially this one, which has been answered:   Thanks to commenter below who gave me the correct search terms.

A cylinder whose cross section is represented below is placed on an inclined plane. I would like to determine the maximum slope of the inclined plane so that the cylinder does not roll. The mass centre (CM) of the cylinder is at a distance r from the central axis. The cylinder consists of a cylindrical shell with mass $m_1$ and a smaller cylinder with mass $m_2$ placed away from the axis and rigidly attached to the larger cylinder. What is the influence of friction? Is it possible to establish the law of the movement? I think that the piece may roll upwards until it stops.  The figure was copied from Projecto Ciência na Bagagem --       EDIT: Depending on the initial conditions is it possible to find the highest point the cylinder rolls to, before stopping?  EDIT2: From Institute and Museum of the History of Science --  [another cylinder]     "When placed on the inclined plane,   [another] cylinder  tends to   roll upward, coming to a halt at a   well-determined position."


I have a Western Digital external HDD of 1 TB.  I accidentally used the following commands in diskpart onto my HDD:   select disk 2 (my HDD partition)  select partition '1'  clean  create partition primary  active format fs=fat32 and then cancelled at 00% because I was supposed to apply these commands on to my pendrive and by mistake I did it on my HDD. Now I am left with a RAW drive but not yet formatted. Windows detecting it but tells me to format it.   Can I repair the drive to state in which it was before? the disk is still not formatted i.e I just initiated and canceled.  P.S. No physical damage in the drive also data is not overwritten.

When I reinstall Windows XP by mistake I deleted all five partitions. I did not format them yet though.  How can I recover the partitions? When I attach the hard disk to another PC it just says that the partition is unformated and asks "Would you like to format it?".


The book I'm looking for was about a ship launched from a dying earth to colonize another planet. The story is told in flashbacks and the main character has dreams about past lives while hibernating.

I read this story/novella at least 15 years ago, probably 20 or more. It is about a ship, travelling through the universe, looking for habitable planets. Why, I can't remember. People are held in Cryo Stasis and I think they are wearing nothing in the chamber but some kind of mesh. Every time the ship gets close to a planet it wakes one or two of the people (one woman, one man?) to check it out but they never find anything good. I think in the end they wake up and discover, that they have arrived back at Earth. Other details are very vague but I seem to recall there was lots of stuff about a (blue?) light, dreaming/dreams and something about the cold, or cold blue lights or similar. Does that ring a bell for anyone?


I am trying to apply SSL to a staging server.  At the moment, we already have an ssl installed by an "unknown" guy in the production server.  While going through prd server's apache settings, I found this in   <VirtualHost *:80> section  RewriteRule ^/(.*) https://%{HTTP_HOST}/%1 [NC,R,L]   It seems like redirection rule to HTTPS but I want to understand what this means fully. What does this mean exactly?

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I sometimes   removing question marks from the end of the questions. Should question subjects have question mark at the end?

Seems strange (and not in a good way) to me that when I click "Questions" and very few (about 1 in 8) of the titles end in question marks. So I'm curious to get some opinions:  Is there some simple change to the site that would encourage actually asking a question in the title?  Is this a worthwhile aim?


What I want to do is customize Ubuntu through OEM, then, flash said OEM installation to an ISO so I can install it on others computers without having to redo my customization later. (also so that other can download said ISO and install it with my customizations)

I am working on created a customized version of Ubuntu (with certain NEEDED customizations) that will, aftewards, need to be installed on others computers. I know about OEM install, but how do I customize the ISO with the packages and setup files I need?


I have a holomorphic function $f$ defined on a neighborhood of the closed unit square.  Further $f(z+i)=f(z)$ on $[0,1]$ and $f(z+1)=f(z)$ on $[0,i]$.  How do I show that $f$ is constant?

I have a holomorphic function $f$ defined on a neighborhood of the closed unit square.  Further $f(z+i)-f(z)$ is real and not negative on $[0,1]$ and $f(z+1)-f(z)$ is real and not negative on $[0,i]$.  How do I show that $f$ is constant?


What is the process for reporting moderator behavior that is inappropriate or unhelpful?  I have a moderator who is:   acting passive-agressive by being argumentative in comments as he effectively answers my question, while refusing to bother to actually answer it (we've all seen that in regular users), is making "suggestions" designed to provoke rather than help, and is being snide and confrontational.   Is there a productive way to draw attention to this without escalating too much or being confrontational?    Note that the question here isn't (at least not quite yet) about  as much as it is about being a regular old badly behaved user.

One or more of the following things happened to me on a Stack Exchange site:   My post(s) were wrongly deleted or locked by a moderator A moderator posted a wrong comment on one of my posts I was suspended, but did not do anything wrong I asked a meta question, but the question was closed and/or deleted A moderator discredited me in public ...   I think a moderator has abused their power, but I feel powerless against them.  What recourse do I have now? What can I do when I feel that a moderator has abused their power, and has been repeatedly unfair in their dealings with me?


I had deleted many files from recycle bin I want to know if I could recover them .can you tell me the procedure.

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


The VGM's Banderhobb can grapple and restrain enemies with his attacks. The Tongue attack allows him to do a Bite attack as a bonus action.     Bite. Melee Weapon Attack: +8 to hit, reach 5 ft., one target.   Hit: 22 (5d6 + 5) piercing damage.      Tongue. Melee Weapon Attack: +8 to hit, reach 15 ft., one creature. Hit: 10 (3d6) necrotic damage, and the target must make   a DC 15 Strength saving throw. On a failed save, the target is   pulled to a space within 5 feet of the banderhobb, which can   use a bonus action to make a bite attack against the target.   He can also use his Shadow Step to teleport, and make an attack as part of the teleport, before or after teleporting.     Shadow Step. The banderhobb magically teleports up to 30   feet to an unoccupied space of dim light or darkness that   it can see. Before or after teleporting, it can make a bite or   tongue attack   Can the Banderhobb use Shadow Step to: Tongue an enemy, Bite him as a bonus action, and then teleport?

Specifically, I'm wondering if a Way of Shadow Monk can use Shadow Step, while being the controlling creature in a grapple, in order to move the target of the grapple. Secondly, is the 60' range of Shadow Step affected by the halved speed caused by grappling? In other words, can a Monk (1) run in, (2) grapple a creature, and (3) teleport away while bringing the creature with them. It seems like it to me, but I'm somewhat unsure. These are some points I've considered:   Grappled The condition ends if an effect removes the grappled creature from the grappler ...  (PHB 290)   Shadow Step [..] as a bonus action, you can teleport up to 60 feet to an unoccupied space that you can see...  (PHB 80)   Moving a grappled creature: When you move, you can drag or carry the grappled creature with you, but your speed is halved, unless the creature is 2 or more sizes smaller than you.  (PHB 195)


I am facing is strange behavior inside my sharepoint 2013 on-premise farm. here is my problem:-   i have created a custom list , and i added many site columns to it . i name the list "Projects". i created a new event receiver based on the custom list templete, and it is scoped at the web level. inside the event recevier i have methods for ItemAdding,ItemAdded,ItemUpdating,ItemUpdated. now i tested the event receiver on the Projects lists and it is working well. now i saved the Projects list as template (without content). then i created a new list based on the list template, i name it ProjectsNew. now i tested the event receiver on the new list and i have noted that the event receiver will be firing twice !! now i tested the original list and the event receiver will fire only one time correctly.    so not sure why the event receiver will be firing twice on the list created using my list template?. while the original list will be working fine in respect to the event receiver. now i knew that the event receiver will be firing twice on the new list since inside my event receiver i have added some logging (where the event receiver will write to a logs list which i have created), and i can see that duplicate logs entries will be added!! can anyone adivce on this please. at this stage i do not want to share code.. to see if this is a common problem inside sharepoint on-premise farm ??

I'm trying to do some treatement after creating an item but the treatement is done twice because in my code after creating the item, I'm updating it , so the event reciever get fired twice: first when I add the element and the second when I updated it. Here's the code :  if (Mode == OperationMode.New) {     item = ListeActions.AddItem();     item["Client"] = new SPFieldLookupValue(myClient.ID, myClient["Name"] as string).ToString();     //the Event Reciever ItemAdded is fired here } if (Mode == OperationMode.Edit) {     item = ListeActions.GetItemById(ActionItemID); } TextField ACObject = (TextField)Page.GetControlById("ACObjectID"); UserField ACAssignedTo = (UserField)Page.GetControlById("ACAssignedToID"); NoteField ACDetails = (NoteField)Page.GetControlById("ACDetailsID");  item["Object"] = ACObject.Value; item["AssignedTo"] = ACAssignedTo.Value; item["Details"] = ACDetails.Value;  item.Update();  //if we're in the case of adding new item then the event //reciever ItemAdded is fired here for the second time //while ItemUpdated is not fired   So how can I stop the second fire of itemAdded resulting on the item.Update() yet keep the first fire since I need to keep applying my treatement?  PS: in the case of updating an existing ListeActions.item the itemUpdated is fired twice too !!  BTW : This Code isn't written in the itemadded method nor in the itemupdated method, actually it's the code in a user control for a webpart development.


I just wanna know if I can put ubuntu on my Galaxy Mega 6.3. I like how it's works and the difference between android and ubuntu.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I have an iPhone 5s and it's connected to a Wi-Fi network. I have a personal hotspot set up. I'm currently using this hotspot on my laptop and am just wondering if it is uses my phone's data or the Wi-Fi connection.

I have an iPhone 4 with iOS 6.1.3. I turn on cellular data + 3G and Wi-Fi constantly.  I was at a site office today and my iPhone automatically connected to the office's Wi-Fi. The tech guy was not around to provide me with the Wi-Fi password to use on my Windows laptop. I then connected my iPhone to my Windows laptop using the USB cable and turned on Personal Hotspot on my iPhone.  At that point, is my laptop using cellular data through iPhone, or the Wi-Fi access point my iPhone is connected to?  I noticed that my iPhone has the 3G symbol in the status bar. But when I disconnect the cable from my laptop, it switches to Wi-Fi.


This is part of the exercise, I'm stuck with it.  $A$ is a commutative ring with unit.  1) Suppose we have an homomorphism $\phi : A^{m} \to A^{n}$ surjective. Is true that $m \geq n $ ?  2) Suppose we have an homomorphism $\phi : A^{m} \to A^{n}$ injective. Is true that $m \leq n $ ?

If $\varphi:R^{m}\to R^{n}$ is an epimorphism of free modules over a nontrivial commutative ring, does it follow that $m \geq n$?  This is obviously true for vector spaces over a field, but how would one show this over just a commutative ring? -----Edit Is there any way to use the following? If $\varphi : M \to M'$ is an epimorphism of left $S$-modules and $N$ is any right $S$-module then $id_N \otimes \varphi $ is an epimorphism.


I began having the infamous "system running in low graphics mode" error after my daughter turned off the power so she could boot into Windows.  Looking at the lightdm log in in /var/log/lightdm/ showed that the greeter was failing to be created.  The greeter log showed that the greeter could not create its .Xauthority file.

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


I have read  and  but I still don't understand how to use this one:     Does anyone has a dog in their home?   Should I use their or something else?

I often use  to keep my sentences gender neutral. Many of my friends (none of them are native speakers), however, consider this to be grammatically incorrect, and suggest me not to use it in formal English exams.  My questions are:   Is singular they widely accepted in English speaking countries such as America and Britain? Is it formal enough to be used in formal situations, such as a public speech? Is it casual enough to be used in informal situations, such as gossiping among friends?


Let be $a, b$ in $(0,1)$ such that $a+b>1$. I need to prove that:  $$2^a+3^b<3a+4b$$  I'm looking for an elementary proof that doesn't resort to the calculus tools.


Does somebody know how to register punch with commands? I want to execute a function when player punch other player or mob

I would like to detect when a player attacks/hits/hurts another player or entity. I have tried to use the AttackTime tag, but it doesn't work. Here is what I have tried (on a 20HZ clock):  First command block:   scoreboard players set @a Attack 0 {AttackTime:0s}   Second command block:  scoreboard players set @a Attack 1 {AttackTime:1s}   Third command block:  tellraw @a[score_Attack_min=1] "Nice shot!"


I was wondering if there's a known reason behind the use of .. to represent the parent of the current directory in most operating systems.  The reason I ask this question is because I think that the colon character (:) could have been a better idea instead. For one, it uses one character less. Also, it can visually represent the concept of "the directory above this directory", since a colon is a dot above a dot, and a dot represents a directory.  But whether you agree with me or not, I'm just curious about the history of .. in operating systems. That's all.

After reading this question , next obvious question on my mind was why '.' and '..' was used to represent current directory and parent directory.  It seems so intuitive now, but any particular reason?


Logged in to 20.04 and a screen appeared 'distribution update' which I clicked (I'm only on LTS updates so not sure why this came up). I was on 20.04 and still on 20.04 so I presume this might be a point update to 20.04. When I tried to update after it said could not load repository information. Upon looking it said 'The repository 'http://archive.canonical.com/ubuntu wily Release' no longer has a Release file.' As such I deleted this update path. I left the remaining ones in below and tried to remove anything from Wily/Bionic. My question is - the update paths in the image, are these all the ones I need or should I add (or remove) anything else for 20.04? Thanks

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


I'm counting the probability of staying on an N by N chessboard after K steps, given that the starting position is r, c. Here's my code:  def knightProbability(self, N, K, r, c):     # dfs.     answer = 0     dp = [[[-1] * N]*N] * (K+1)     # dfs with memoization.     self.dic = {}     return self.dfs(N, K, r, c, dp) # Starting at r, c, what's the probability of staying on board after k moves.    def dfs(self, N, k, r, c, dp):     offsets = [(-1, -2), (-1, 2), (-2, -1), (-2, 1), (1, -2), (1, 2), (2, -1), (2, 1)]     answer = 0.0      if k == 0:         return 1.0      '''if dp[k][r][c] >= 0:         return dp[k][r][c]'''     if str(k) + ":" + str(r) + ":" + str(c) in self.dic:         return self.dic[str(k) + ":" + str(r) + ":" + str(c)]      for offset in offsets:         new_r = r + offset[0]         new_c = c + offset[1]         if new_r > -1 and new_r < N and new_c > -1 and new_c < N:             answer += self.dfs(N, k-1, new_r, new_c, dp) * 1.0 / 8 # with k-1 steps, what's the probability?     '''dp[k][r][c] = answer'''     self.dic[str(k) + ":" + str(r) + ":" + str(c)] = answer     return answer   It's a simple dfs. When I use a dictionary to store and retrieve visited states (k, r, c) like I'm doing now, it works. However, if I use a k by N by N array to store and retrive them, I'm not getting the correct answers. Any ideas why? The commented part is the storing/ retrieving from the array parts I'm talking about, which should be doing the same thing as the current code.

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


I toggle between Vertex, Edge, and Face Select mode constantly. In a speed modeling session, this adds a lot of clicks.  I couldn't find any place to set a hotkey to change this setting. Is there one?

Is there a shortcut for switching between these three modes?


I have my plugin which works for QGIS 2.8.2. I want to migrate the same for QGIS 3.0. I resolved initial error of pyqt4 to pyqt5 and so on.  Now I get following error for resources file.  TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has  unexpected type 'str'   My existing resource file is compiled with pyrcc4 command. I need to compile it again with pyrcc5 command.  I went to my plugin folder from command prompt and did  pyrcc5 -o resources.py resources.qrc  'pyrcc5' is not recognized as an internal or external command, operable program or batch file.   I have pyrcc5.bat in "C:\Program Files (x86)\QGIS 3.0\apps\Python36\Scripts" When I try to run this batch file I get:    pyrcc5.exe not found anywhere in the folder.

I installed QGIS 3.0 on Windows 10. I get this error everytime i run the pyrcc4 or pyrcc5 command:  'pyrcc4' is not recognized as an internal or external command  Even if I find a place with a pyrcc4.exe file or a place with apyrcc5.bat file and add the path to the environment variables I get the same error. In the previous installation of osgeo4w i had a pyqtdev folder or something similar appear I think it was on C/. Was there supposed to be such a folder, do I need to download pyqt separately?


I'm really in trouble. As the Java 7 support and built are not available anymore on the web. I have gone through many of resources and question answering websites online but unable to resolve this issue.  I'm a non-technical person and recently have installed the Ubuntu 16.04. I want to unzip the files of my data backup. The size of files is 60 GB and 80 GB. The default archive manager in Ubuntu is unable to unzip the files or I am using the wrong method to do that.  Can anyone please help me in this case?

I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?  Before release Java 7, I followed  to install Java 6.  But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?


I have a simple comments page a user enter a text into a textarea and the hit comment button to send the comment to a php page :  <?php $reply = strip_tags($_POST['reply']); $comment_id = strip_tags($_POST['id']); $id = strip_tags($_POST['user_id']); $date = strip_tags($_POST['date']); $time = strip_tags($_POST['time']); $server_root = "./"; if(file_exists("{$server_root}include-sql/mysql.class.php")) {     include_once("{$server_root}include-sql/mysql.class.php"); } include_once("{$server_root}config.php"); $db1; $db1 = new db_mysql($conf['db_hostname'],                     $conf['db_username'],                     $conf['db_password'],                     $conf['db_name']); $db1->query("SET NAMES utf8"); $current_server_date =  date('Y-m-d H:i:s');// Your local server time date_default_timezone_set('Asia/Istanbul'); $current_pc_date = date('Y-m-d H:i:s');  $sql = $db1->query(     'INSERT INTO replies1 (reply, comment_id, date, time, timestamp, user_id)      VALUES ("$reply", $comment_id, "$date", "$time", "$current_pc_date", $id)'); ?>   the problem is : when a user enter any comment with apostrophe it does not store it in the database ? why does that happened? Is my code has something wrong? I added everything the double quotes and stripe_tags.? did i miss something?

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 looking for a sci-fi book I read some time ago, where items improve with use in an alternate universe that was discovered in a lab.  A scientist goes to this universe not knowing this, and all of his technology improves over time. The people in this world don't have guns, and don't have the wheel.  I remember the main character learns a zipper into a saw, and breaks out of jail.

This book is about an explorer (with robot companion) who walks through a "gateway" into the future/parallel world. In this world, things that are created do not fall into disrepair, instead things get better.  The main character is kidnapped early on in the story and forced to labor by beating the outside of a castle with a spear. It is explained to him that this makes the wall better and able to resist attacks by these weapons. In his cell, he meets a man wearing an extravagant shirt and asks about it and the man explains to him that the shirt has been in his family for several generations, which is why it looks so nice.   To escape from the jail cell, the man tears one of his zippers from his jump suit and uses it like a saw to cut a hole in the wall. He escapes with the man in the fancy shirt and a woman.   The woman, is something special in this world. (She can focus on the change that is happening to an item and somehow enhance or speed up the process)  The man makes a wheeled cart for them to escape in. While the wheels are at first rough and wobbly, they soon "become better" and spin better.


Pretty much the same question as   The answer is from 2014 and says an update then would fix this, but I can't find anything related to this. Does anyone know if an update released anything regarding this? I couldn't find anything in the manual

I was wondering if there is a way to allow for line breaks within product lists of the siunitx package:  \documentclass{article}  \usepackage{showframe} \usepackage{siunitx}  \begin{document} This is a very long line and with a long list of numbers like this \SI[product-units=brackets-power]{128 x 256 x 512 x 1024}{\mm}.  This is a very long line and with a long list of numbers like this \SI[product-units=repeat]{128 x 256 x 512 x 1024}{\mm}.  This is a very long line and with a long list of numbers like this $(128 \times 256 \times 512 \times 1024)\,\si{\mm\tothe4}$. \end{document}     The third option does the right thing but I would really like to keep the possibility to globally define the layout of product lists in the preamble (e.g. \sisetup{product-units=brackets-power}) across the whole document. The allow-number-unit-breaks option in siunitx does not really help as I would need a way to "allow-output-product-breaks".  Any ideas how to do this? Thanks.


Would you please tell me the right choice to this question:  Liverpool's players are known to be skilled. They (are going to win / will win) the match easily.

I know several questions were asked about the difference between "going to" and "will". Based on several answers (see, for instance, ,  and ), I understood that "will" is more spontaneous and "going to" is used with more planned actions.  So, it seems that everything is pretty fine. However, in , Kosmonaut has an answer in which he states: "Let's say that tomorrow you will walk your dog from 7 - 8 AM".  On the one hand, you probably planned to walk your dog long before and thus I should use "Let's say that tomorrow you're going to walk your dog from 7 - 8 am".   On the other hand, since I'm saying "let's say...", I'm deciding right now (thus, unplanned) that you will walk your dog. So, even though in this hypothetical situation you made a plan, I'm in a more spontaneous mood deciding right now that that's what you will do tomorrow, and, thus, I should use "will".  Which one (if any) of the above explanations is right?


I can't find the answer to this problem  Find $y$ when $y=\sqrt{5+\sqrt{5+\sqrt{5+\sqrt{5 + \ldots}}}}$  Any help is appreciated. Thank You

Assuming convergence of the following series, find the value of $\sqrt{6+\sqrt{6+\sqrt{6+...}}}$  I was advised to proceed with this problem through substitution but that does not seem to help unless I am substituting the wrong parts. If i substitute the $6$, well then i am just stuck with above.   Any ideas on how to proceed. Also, what is the purpose of stating that it is convergent.


I am working on a text classification problem. My data is highly imbalanced. For example, one category has 700 documents while the other has 30. I have around 30 categories. I tried different classifiers and the performance is consistently poor.  What is the best way to tackle this issue? Thanks

We already had multiple questions about unbalanced data when using , , ,  and a number of other similar questions, what makes it a very popular topic! Unfortunately, each of the questions seems to be algorithm-specific and I didn't find any general guidelines for dealing with unbalanced data.  Quoting , dealing with unbalanced data     (...) heavily depends on the learning method. Most general purpose   approaches have one (or several) ways to deal with this.   But when exactly should we worry about unbalanced data? Which algorithms are mostly affected by it and which are able to deal with it? Which algorithms would need us to balance the data? I am aware that discussing each of the algorithms would be impossible on Q&A site like this, I am rather looking for a general guidelines on when it could be a problem.


In D&D 4th Edition, one can only get to a state of Dying after getting Bloodied first. If - for example - I have a Feat which gives me the ability A to do something as a Minor/Move/Standard action while I'm Bloodied, while at the same time I'm currently in a Dying state and I have another Feat that allows me to be conscious: Can I perform A? Practical examples:   Unnatural Vitality: Whenever you drop to 0 hit points or fewer, you are dying but you can choose to remain conscious until your first death saving throw. If you remain conscious, you can take only one standard action before you attempt your first death saving throw.    Wounded Resurgence (21st level): If you are bloodied, you can spend a healing surge as a minor action to restore your current hit points to your bloodied value. Also, you don't take a death penalty when you are returned to life by the Rise Dead ritual.

There are some powers that allow you to keep fighting when dying. Do you still count as bloodied if your HP are at 0 or less?


I have a text file containing a very long text extracted from a book. I want to iterate over each sentence of the text and then, iterate again over every word of each sentence.   The idea is that if the word falls within category 1, it will be replaced by 'determiner', and if it falls within category 2, it will be replaced by 'non-determiner'. The for loop will then print each sentence (one sentence per line) with all the words replaced accordingly.  This is what I have tried so far:  import my_books  for sentence in my_books.sents("book1"):         for word in my_books.words("book1"):             if word == "the":                 print("determiner")             else:                 print("non-determiner")   However, my output is a list with one word per line:  determiner non-determiner non-determiner non-determiner ...   This is what I want instead:  determiner non-determiner non-determiner non-determiner non-determiner non-determiner determiner non-determiner non-determiner non-determiner non-determiner determiner ...   What can I do to get the output as I want it? I think the problem has to do with the for loop, since there's a print statement after each word is classified into a category.

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


I'm having trouble understanding why this code doesn't work when using a double/float. Most results from searching this error give me some sort of linkage error, but the code does sometimes work, so I'm not sure how to change how it's linked.  In a file header.h, I have:  template<typename any> void validInput(any &myInput, int=std::numeric_limits<int>::max());   This is a function that checks user input to make sure it's valid, and if it is, less than the given int (ex. validInput(variable,5) has the user input a value for variable, and checks if it's between 0 and 5)  I then define my function in a file like functions1.cpp:  #include <iostream> #include <limits> #include "header.h"  template<typename any> void validInput(any &myInput, int maxnum){     while((!(std::cin>>myInput))||myInput<=0||myInput>maxnum){     std::cout<<"\nInvalid input.\nEnter new number: ";     std::cin.clear();     std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');     } }   Then, in another function, say functions2.cpp , I want to use my validInput function, so I write something like this:  #include <iostream> #include "header.h"  void className::function(){     double checkThisValue;     std::cout << "Enter value to be checked: ";     validInput(checkThisValue); }   (I'm purposely not including the second 'int input' because I want it to default to std::numeric_limits<int>::max())  This code gives me the error: undefined reference to 'void validInput<double>(double&,int)'  But if I instead define checkThisValue as an int, then the code compiles and works correctly.  Why can't I pass doubles or floats to my function? How should I properly link the files?  Edit: I can't answer the question because it was closed, but I needed to "explicitly instantiate" the template. The duplicate question deals with classes, so the syntax was a little different. The solution was adding the following line in the functions1.cpp file:  template void validInput<double>(double &myInput, int maxnum);

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.)


What textbook would you recommend for a bachelor in theoretical physics to study ? I don't want to focus too much on chaos, just having a broad view of every interesting characteristic is enough. Physical meaning behinds equations should be explained.  Some related resources:   , but obviously those are math-y.  While there are some overlaps, the evolution of a simple oscillator can evoke interesting dynamics characteristics. , but I'm not sure if studying only fluid dynamics is too narrow for me.

I'm rather interested in getting my feet wet at the interface of  and . Can anybody give me references to some good books on these topics? I'm looking for very introductory technical books.


I have small function logically output should be 1 but i am getting 10 .. Can any one help me out with this logic.  var a=1; function foo() {     if(!a){         var a=10;     }     console.log(a); } foo();   Output is coming 10 not 1 . how.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


Is walking the only option to hatch eggs? Will they also hatch if I drive by car, train or bycicle?

I have a couple of eggs that I've picked up from some Pokestops (I'm lucky enough to live above one).   I walk a lot. I get to work through a 2 mile walk / train journey every day, so I should be picking up loads of steps for the eggs I have. However, because I'm normally always running late... for everything, I have to rush everywhere, so I walk at an above average pace.   Today I've walked around 5 miles, but the game has registered 100 metres. Is this because I walk too fast, or because of something else?  It's worth pointing out that I have the app open when walking... mostly because I have to catch them all. (This made me miss a train this morning... luckily I was early :D)


When displaying a message to a user from our software, is it better to say:  "Choose the case note that you want to delete, and then try again."  or   "Choose the case note you want to delete, and then try again."  Ie. is the word "that" required?  Thanks! Chris

First sentence:     I contribute to projects I love.   Second sentence:     I contribute to projects that I love.   I used to use the first one, but I am not sure if it is right or wrong when omitting "that".


Let  $f\colon\mathbb R\to \mathbb R$ be a differentiable function such that $\displaystyle \sup_{x\in \mathbb R}|f'(x)|<\infty$. Then which are correct?  (A) $f$ maps bounded sequence to a bounded sequence.  (B) $f$ maps Cauchy sequence to a Cauchy sequence.  (C) $f$ maps convergent sequence to a convergent sequence.  (D) $f$ is uniformly continuous.  Attempt :  Since $\displaystyle \sup_{x\in \mathbb R}|f'(x)|<\infty$ so $f$ is uniformly continuous. (D),(B).  As $\mathbb R$ is complete and (B) is TRUE so (C) is also TRUE.  But I am unable to prove or disprove the option (A).

(UGC CSIR-2015, DECEMEMBER, MATHEMATICAL SCIENCES)        $f$ maps a bounded sequence to a bounded sequence.   $f$ maps a Cauchy sequence to a Cauchy sequence.   $f$ maps a convergent sequence to a convergent sequence.   $f$ is uniformly continuous.      I choose all of the options as possible answers because the condition $\sup_{x\in \Bbb R}|f'(x)| \lt \infty$ forces $f$ to be uniformly continuous.(Because $f$ becomes Lipschitz and Lipschitz condition implies uniform continuity)  i.e. $\frac {|f(x)-f(y)|}{|x-y|} \le \sup_{x\in \Bbb R}|f'(x)|$ $ \forall x,y$.  Hence all other options are bound to be true.  Am I correct?


I'm making an addon where I auto generate a spline with a bevel and taper object. The taper object serves as profile of the thickness along the spline R(t). So it would be very nice to have this in a 2D graph, so that it can be manipulated in the panel instead of having to find it in the 3D world viewport. Like in the figure below. Is this in any way possible?

Question The title says it all. I want to be able to make this in Blender's UI, and sample it at specific points :  Problem There is very insufficient documentation on this, and I can't find any examples for how to create a . I have worked with templates before, and , but it requires a curve mapping prop. Extra Info I found a few threads about this, and one gives me the impression that this cannot be done at all, but it is also very old.   This similar question has been asked here before, but it didn't even get a comment:  Is this even possible to access in python (as in only accessible in C)?


I would like something to enable me to comment out large blocks of my preamble when I've specified that my document is a draft.  The comment environment provided by the verbatim package works well for commenting out a large block of my preamble. The problem I am having is that I'm not sure how to make the comment enviroment active only when the draft option is specified in \documentclass[draft]{article}.  How do I make the inclusion/activation of this comment environment conditional upon the specification of the draft option? If that is not possible, is there some work around, perhaps through the creation of new booleans and something like \ifbool?

To "comment out" a line, I need to insert a % at the beginning of the line (so that the line will not be compiled). Is there a way to comment out a large section without having to manually place % in front of each line?


Is there any reason to disable VR in Nikon lenses? Perhaps it is safer to storage/carry lenses with VR disabled? Or, maybe with very small shorted speed VR decrease quality of picture?

When I got my DSLR, I took a lot of pics and all of them came excellent, even though I had VR at the "Off" position.   Since those came out so well, I wonder when should I turn VR on, and when I should just leave it off.   I found  which answer this question in detail, but that's too much for me to understand easily. Can someone explain the strict rules in short?  Should I use VR with tripod? When should I use it when I'm not using a tripod, and when should I leave it off?


I recently installed Ubuntu 20.04 and I am trying to install Cisco packet tracer but i keep on getting a unmet dependency   packettracer : Depends: qt-at-spi but it is not installable   I am completely new to this and Don't know what to do. Thank you for your time

When I tried to install Cisco packet tracer from deb file it gave the following error:   Unpacking packettracer (7.3.0) ... dpkg: dependency problems prevent configuration of packettracer:  packettracer depends on libdouble-conversion1; however:   Package libdouble-conversion1 is not installed.  packettracer depends on qt-at-spi; however:   Package qt-at-spi is not installed.  dpkg: error processing package packettracer (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.32.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu1) ... Processing triggers for mime-support (3.63ubuntu1) ... Processing triggers for shared-mime-info (1.10-1) ... Errors were encountered while processing:  packettracer    Then I tried installing libdouble-conversion1 using command sudo apt-get install libdouble-conversion1 . It gives the following error  Package libdouble-conversion1 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'libdouble-conversion1' has no installation candidate


I usually charge my phone through a USB connection. Due to Ubuntu 13.04 detecting and mounting it, Nautlius automatically opens the mounted folder. Can I stop Nautlius from automatically opening the folder of some mounted devices?

Every time I plug a USB stick in, nautilus opens a new window with the contents of the drive. I would like to disable this auto-opening of the nautilus window, but I would like the actual auto-mount to keep working. Is this possible?


I saw the Fellowship of the Ring. Nine rings were forged for the kings of men.  I saw the entire series, the nine are on the side of Sauron.  I am watching the Hobbit : Desolation of Smaug. Gandalf mentions,      The nine only answer to one master   But in Fellowship of the Ring, it is deemed necessary for the one ring to have control over all others (One Ring to rule them all, One Ring to find them, One Ring to bring them all and in the darkness bind them).  My question is why do the wraiths of the Kings do Sauron's bidding? He clearly does not have the One Ring to maintain control. Should they not be outside of the influence of the ring and Sauron?

The One Ring gave Sauron control of the Nine, yet when it was taken from him he still possessed the power to control them (or, at least he regained it towards the end of the third age).  Why is this?   mentions that he drew the Nine to him, but not how.


In Star Trek: The Next Generation, the first Borg were shown to Jean Luc Picard because Q decided to tamper with the fate of Humanity and show them how grosly unprepared they are for what lies in the unknown. If Jonathan Archer had an encounter with the Borg, Jean Luc Picard should've already had prior knowledge or at least had some reference to go on when encountering the Cube.  So how is it that the Federation has no information on the Borg in TNG? It's been said that Star Trek: Enterprise was not in an alternate timeline.

In  Starfleet learns about a culture that we (as audience) know as The Borg. According to TNG, the Federation doesn't seem to know anything about these beings when . Although Archer's crew doesn't learn the name of the Borg, it would be reasonable that the Federation would inherit the information about such a menacing enemy and it would also be reasonable to assume the crew of the Enterprise-D to be able to match their encounter with their databases' information.  Obviously, out-of-universe the explanation is that the scripts weren't written in chronological order, but how can the apparent obliviousness about the Borg be explained in-universe?


I believe Dichotomizing(also called bucketing/binning) of continuous variable is not always a good idea. My colleague while building regression model always bins continuous variables and only keep dichotomous variable in the final model. My counter arguments to him   Lose lot of valuable information and reduce predictive power of variable May cause some customers to get probability score just based on intercept   His arguments   Dont have to worry about non-linearity and no need to transform variables   How can I convince him its not a good practise, is there any good research paper on this? What are the drawback of having only dichotomous variables in the final model?

I have two groups of participants and they all took the same measurements.    When I perform a median split on one of the measurements to test my hypothesis about an interaction, the dependent variable fails Levene's test for equality of variances.  When I perform a teritary split, it passes Levene's test - both when I am comparing only high and low thirds and when I compare all three thirds too.     There are main effects and interaction effects in all of the ANOVAs that I have run, but only the 2x2 ANOVA fails Levene's test for significance, neither of the 3x2 ANOVAs fail.    How is this possible?


I have a fairly simple expression that I want to evaluate which is ZoomLevel = ZoomLevel - 0.1 where ZoomLevel is declared as a double.  I have called the routine multiple times:   1.5 - 0.1 = 1.4 1.4 - 0.1 = 1.3 1.3 - 0.1 = 1.2   Then it is time to execute the same statement where ZoomLevel equals 1.2:   Then I step over the statement:    Why does this statement evaluate to 1.09 and not 1.1?  (I guess it have something to do with lack of precision in the double implementation.)  EDIT: This is what I get when printing the content of ZoomLevel before and after execution of that statement.  ?string.Format("{0:N20}", ZoomLevel); "1,20000000000000000000" ?string.Format("{0:N20}", ZoomLevel); "1,09000000000000000000"

What's going on?! Subtraction works fine until I get to 0.1 - 0.1. I'm in visual c# 2008 using the nonoba.com API.  Console.WriteLine("hit! " + Users[targetNum].character.health + " : " + player.character.profile.attackPower);  Users[targetNum].character.health -= player.character.profile.attackPower;  Console.WriteLine("health! " + Users[targetNum].character.health);   output:  hit! 0.1 : 0.1 health! 1.490116E-08   Thanks all - I might use the decimal type, as I'm normally adding/subtracting nice "round" numbers. For now I'll just go with:  if (Users[targetNum].character.health <= 0.00001)   By the way I knew this wasn't really going to be a "bug" in c# - I thought it would either by a bug in my code or some lack of understanding, which it was.  Having read all the recommended reading, I'm going to conclude that my folly was due to normally using the ActionScript Number type, which maybe has a decimal rather than binary floating point - anyway, it would never give this output.


Copyediting this sentence:     Create a new, integrated and dynamic platform   I'm unsure if the comma after "new" is needed or not, or if one should go between "integrated and dynamic".  Is the quoted statement correct grammatically, or if not how should it be changed to correct its grammar?

to reach a mutually-agreed long-term comprehensive solution that would ensure Iranˈs nuclear program will be exclusively peaceful.   As I see, in the noun phrase a mutually-agreed long-term comprehensive solution, all the three adjectives describing the head noun are coordinate. Then, shouldn't there be commas between them making it look like a mutually-agreed, long-term,/and comprehensive solution? Is putting a comma between coordinate adjectives a must? If so, what has happened here?


I already set-up my root password in Ubuntu. But for some reasons now I need to set it back to default as when Ubuntu is freshly installed. I no more need my set root password. How can I set it back to default? I know my root password. When I supply with empty password to set it back to default it says "Cannot be empty"

I was asked for root credentials to setup my printer in Ubuntu. This seemed to be caused by a bug. And the suggested workaround is to create a root password. Since it is default that no root password is used in Ubuntu, i wonder how i could revert this changes.  Once i have set a password for root, is there a method to disable it again?


I am looking for a method to transform my dataset from its current mean and standard deviation to a target mean and a target standard deviation.  Basically, I want to shrink/expand the dispersion and scale all numbers to a mean. It doesn't work to do two separate linear transformations, one for standard deviation, and then one for mean.  What method should I use?


Last time I brought  up, the best answer featured an image that looked something like this:    The argument here is that as the distance increases between the eye and the object, the angle gets smaller. It's not even a physical phenomenon: it's a geometrical phenomenon.  Fine. Let's look at this from a different angle, no pun intended.  The diameter of the human eye lens is roughly 10 mm. According to the above logic, an object whose size is smaller than that (say a raindrop) should NEVER decrease in size while the distance increases, and should remain visible no matter how far away it is (Pluto's orbit and beyond):    What am I missing?

Why does the apparent size of an object change when it is farther away from me compared to when it is closer to me?  Can someone perhaps explain this through an optics perspective?


I am trying to model the probability of a binary outcome with the independent variable being an hour variable. I understand that linear regression is not the correct method for this type of task (I wont go into my simplified understanding of why, if someone wants to add a succinct explanation I'm all for it).  The problem I am running into is that logistic regression does not seem to accurately capture the trend in my data, which is inverse parabolic (low probability early, increasing to a peak at the middle of day and decreasing at the end).  My test data is as follows, I just supplied the ggplot and stat_smooth() curve I am looking at vs. the model itself:  testset <- data.frame(              hour=c(rep(100,100),rep(200,100),rep(300,100),rep(400,100),rep(500,100)),                data=c(rbinom(100,1,.25),rbinom(100,1,.3),rbinom(100,1,.5),                       rbinom(100,1,.25),rbinom(100,1,.1)))  ggplot(data=testset,aes(hour,data))+stat_smooth(method=glm,family=binomial)   Notice that is I allow the stat_smooth function to default to a fitting/smoothing method (loess in this case), the representation is closer to the actual data.  I know I am missing something terribly simple, or misunderstanding something in a silly way, but that is why I am asking the question, search didn't help.  ggplot(data=testset,aes(hour,data))+stat_smooth()

How can I account for a nonlinear independent variable in a logistic regression?  For example, consider this data set:  b1  b2  b3  b4  b5 1   1   0   0   20 0   1   0   0   20 1   0   0   0   13 1   1   1   0   8 1   1   0   1   5 0   1   0   1   4 1   1   0   1   5 0   0   0   0   8 0   0   1   0   13 1   0   0   1   20 1   0   0   0   29 1   1   0   1   40 1   0   0   0   53 0   1   1   0   68   Suppose I gathered some data like the above (suppose I had 10,000 rows) and I want to use them to predict future sets of similar data with an equation generated by a logistic regression. I get the above data. My independent variables are b1 through b5. By looking at the data, I can clearly see that independent variables b1 through b4 are binary (maybe they are male/female, rent/own, etc).   However I see that b5 is clearly not binary. Upon graphing it and looking at the numbers I determine that the b5 variable has a bathtub shaped U curve with an equation of b5=(x-4)^2+4.   I understand that using the b5 variable as it is would screw up my logistic regression - since any interval independent variables must have a linear relationship with the dependent variable.   Yet, I must account for the variable b5 in my data set while doing a logistic regression for it to be accurate and predict well (right?).  Given the above data, how would I go about making a predictive model with a logistic regression? Any references online or in books would greatly be appreciated as I am having trouble finding a good explanation of the above.  Cheers =)  EDIT:  Sorry if my question is unclear.  Consider this: Suppose we had the following data on many people:  Y: Whether they had a stroke before the age of 50 or not 1. Whether they own a pet or not. 2. Whether they graduated college or not. 3. Whether they are male or female. 4. The number of hours they exercise every week.  We want to train a logistic regression model based on historical data to predict if someone in the future with the same data will be more apt or not to have a stroke before the age of 50.  The problem I am having is with the last variable. A continuous ratio variable like "number of hours exercised each week."  Exercising more each week may have diminishing returns on health and thus having a stroke. For example decreasing an increasing rate. Or maybe (totally made up) exercising a little bit is really good for you, exercising a moderate amount is really bad for you, and exercising a lot is really good for you again. We might have a U shaped curve like (x-4)^2+4 for example when plotting health to exercise.   I would image that having a curved, non-linear independent variable in a logistic regression like the one I described above would cause problems. Am I right? And if so, what kinds of things can you do to still include the variable in the logistic regression. Perhaps a transformation? Is that all?


This Python script is supposed to make a CGoL Glider, but matrix just outputs [[1, 1, 1], [1, 1, 1], [1, 1, 1]] instead of [[0, 1, 0], [0, 0, 1], [1, 1, 1]] as intended.  I added a print statement after the if to display the cell and block when the if is flipped, and that showes the appropriate value, but the matrix assignment still does not work.  #!/usr/bin/python3  matrix = [[0] * 3] * 3  def chunks(in_list, size):     out_chunks = []     for item in range(0, len(in_list), size):         out_chunks.append(list(in_list[item:item + size]))     return list(out_chunks)  for block in range(len(matrix)):     for cell in range(len(matrix[block])):         if chunks(range(9), 3)[block][cell] in [1, 5, 6, 7, 8]:             print(f"Block: {block}\nCell: {cell}\n")             matrix[block][cell] = 1

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


please see the code below myduplicates = iterationProc(2, [1, 2, 3, 1]); console.log(myduplicates);  function iterationProc(curItem, currArr) {   let duplicates = -1; // line A   currArr.forEach((item, index) => {     if (curItem === item) {       duplicates += 1; // line B     }   });   return duplicates; // line C }  I am having some difficulty understanding scoping concepts. I have commented three lines A,B, and C. At line B the variable duplicates is getting the value from line A due to lexical scoping in javascript. I understand this. But in my understanding since line C is an outer block as compared to line B so variable duplicates at line C should not get value from line B but retain the value from line A. However at line C the variable does get the value from variable at line B. What am i missing ?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I want to change gnome shell theme, I use ubuntu 14.10 and user extensions don't work, can anybody help me ?

I've installed the GNOME Shell in Ubuntu 12.04 and I want to change the "Shell Theme", But it doesn't allow me to do that.  The alert says something like: "The GNOME-Shell extension is not activated", and I want to install it with the console, But it returns me an error.  How can I solve this problem?


Every time I have come upon a discussion of the geometric sequence, I have often wondered (in vain) about the qualifier 'geometric' since such sources never explained the origin of the term. Naturally, I have wondered about the related terms 'arithmetic' and 'harmonic' in the name of their respective sequences too; while I have been able to find some plausible explanation of the origin of these latter two terms, I have however wondered on end about the historical origin of the 'geometric' in the term geometric progression, without appreciable success.  You might have come across, or thought of, a plausible connection between exponential sequences and geometry that gave such sequences their collective name. Please share these below.  Thanks plenty.

Just curious about why geometric progression is called so. Is it related to geometry?


I was wondering if stackoverflow had a badge when the following interactions happen between two users:   user A answered a question from user B, user B answered a question from user A.   And if such a badge existed are there statistics available for this (just curious about this metric). For example, how much time is separating event 1 from event 2.

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I am working on a register user form and I have two tables in mysql. What I want to do is when a new user has registered, take the id (which primary key) of that user and insert it into another table. What is the best way to do that?  Thanks in advance.

I have mysql database and I want to get the last ID from field in a table .  example : -   id   Value 1    david 2    jone 3    chris   I want a function return 3 if this table exist .


I am going through the book  and I'm finding it extremely terse. I have a background in probability but not statistics so perhaps that is why. Anyway, in Chapter 3, section 3.2 (p.47), they discuss the unbiased estimator of the variance of the $y_i$. They write,      Typically one estimates the variance $\sigma^2$ by   $$ \hat{\sigma}^2 = \frac{1}{N − p − 1} \sum_{i = 1}^N ( y_i − \hat{y}_i)^2.$$   The $N − p − 1$ rather than $N$ in the denominator makes $\hat{\sigma}^2$ an unbiased estimate of $\sigma^2$.   Here the $y_i$ are the observations which we assume are distributed like  $ x_i^T \beta + \zeta_i$, where $x_i$ are the inputs, $\zeta_i$ are independent of everything, mean zero, variance $\sigma^2$, and $\beta$ is fixed. $\hat{y}_i$ are the estimated output from the linear regression we have constructed. Ie., $\hat{y}_i = x_i^T \hat{\beta}$ with $\hat{\beta}$ the linear multiplier, $\hat{\beta} = (X^T X)^{-1}X^T y$.  They make this comment without any explanation. Can someone explain why this is true. And even better, why this should be obvious.   Edit: Thanks to @gung for the link but I found that calculation still unclear and missing details. I'm putting down my calculation here just for completeness.  Some notation: Let $X$ be the $N \times (p+1)$ matrix of samples by characteristics (the extra $1$ is for the column of all ones!). Let $y = (y_1,...,y_N)$ and $\hat{y} = (\hat{y}_1,...,\hat{y}_N)$.   Under these conditions, $\hat{y} = X \hat{\beta}$ and $y = X \beta + \zeta$ where $\zeta$ is an $n\times 1$ vector of independent Gaussians with common variance $\sigma^2$. Using our formula for $\hat{\beta}$ above this gives $$ \begin{align} \hat{\beta} = (X^TX)^{-1}X^T y = \beta + (X^TX)^{-1}X^T \zeta \\ \end{align} $$ And so,  $$ \begin{align} y - \hat{y} & = X\beta + \zeta - (X\beta + X(X^TX)^{-1}X^T \zeta) \\ & = (I_N - X(X^TX)^{-1}X^T) \zeta \\ & := (I_N - B) \zeta, \end{align} $$ with $B:= X(X^TX)^{-1}X^T$. Therefore, $$ \begin{align} \sum_{i=1}^N \mathbb{E} (y_i - \hat{y}_i)^2 & = \mathbb{E} \left[(y-\hat{y})^T(y-\hat{y}) \right] \\ & =\mathbb{E} \left[ \zeta^T (I_N-B)^T (I_N-B) \zeta \right] \\ & = \sigma^2 Tr((I_N-B)^T(I_N- B)) . \end{align} $$ The last equality follows because the $\zeta$ are independent with common variance $\sigma^2$.  Finally, $$ \begin{align} (I_N-B)^T(I_N-B) &= I_N - X(X^TX)^{-1}X^T. \\ \end{align} $$ Therefore, $$ \begin{align} Tr((I_N-B)^T(I_N-B)) & = Tr(I_N) - Tr(X(X^TX)^{-1}X^T) \\ & = Tr(I_N) - Tr(I_{p+1}) \\ & =N-p-1 \end{align} $$

I am unable to find the bias of the sample variance estimator in this problem. Unfortunately I keep coming up with   Question: Suppose that the true linear model is   $y = X_1\beta_1 + X_2\beta_2 + e$,   where $e \sim MVN(0,\sigma^2 I)$, $X_1: N \times p_1, \beta_1: p_1 \times 1, X_2: N \times p_2, \beta_2: p_2 \times 1$. But we wrongly fit the model  $y = X_1\beta_1+e$ and calculate the estimators of $\beta_1$ and $\sigma^2$ as:  $\hat{\beta}_1 = (X_1'X_1)^{-1}X_1'y$,  $s^2 = \large \frac{y'[I-X_1(X_1'X_1)^{-1}X_1']y}{N-p_1}$.  (a) Show that, in general, $\hat{\beta}_1$ is a biased estimator with  Bias$(\hat{\beta}_1) = (X_1'X_1)^{-1}X_1'X_2\hat{\beta}_2$  Under what condition on $X_1$ and $X_2$ is $\hat{\beta}_1$ unbiased?  (b) Show that, in general, $s^2$ is a biased estimator with   Bias$(s^2) = \frac{1}{N-p_1}\beta_2'X_2'[I-X_1(X_1'X_1)^{-1}X_1']X_2\beta_2$  Is the bias positive or negative? Under what condition on $\beta_2$ is $s^2$ unbiased?  Attempt:  For part (a):  Bias$(\hat{\beta}_1) = E((X_1'X_1)^{-1}X_1'y - \beta_1)$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'E(y) - \beta_1$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'(X_1\beta_1 + X_2\beta_2) - \beta_1$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'X_1\beta_1 + (X_1'X_1)^{-1}X_1'X_2\beta_2) - \beta_1$  $\hspace{15mm}= I\beta_1 + (X_1'X_1)^{-1}X_1'X_2\beta_2 - \beta_1$  $\hspace{15mm}= \beta_1 + (X_1'X_1)^{-1}X_1'X_2\beta_2 - \beta_1$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'X_2\beta_2$  If $X_1$ and $X_2$ are orthogonal, then $\hat{\beta}_1$ is unbiased.  For part (b), I am unable to figure out how to derive:  Bias$(s^2) = \frac{1}{N-p_1}\beta_2'X_2'[I-X_1(X_1'X_1)^{-1}X_1']X_2\beta_2$  I can get   $\frac{1}{N-p_1}\beta_1'X_1'+\beta_2'X_2'[I-X_1(X_1'X_1)^{-1}X_1']X_1\beta_1+X_2\beta_2$  after taking the expectation of y on both sides.   Any help would be much appreciated.


I have tried several times to add the user's name in a comment to alert him of the comment, but it disappears everytime I save the comment.  Here's the link:   I tried entering @Brian, @BrianHinchey but the username is removed no matter how I type it.  What am I doing wrong?

How do the comment replies (aka "pinging users") work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about "pinging" another user?  Related:


I am looking for a way to compress jpeg images on a Mac from Terminal. Basically, a library like pngquant, except it is for jpeg format.  Are you aware of a software that does that?

I’m using a terminal script to capture my screen at set intervals. However, the resulting .jpg files are rather large. I’d like to control the quality of .jpg files being generated by this script:  while [ 1 ];do vardate=$(date +%d\-%m\-%Y\_%H.%M.%S);  screencapture -t jpg -x ~/Desktop/AutoScreenCap/$vardate.jpg;  sleep 600; done   How can I control the .jpg quality of the resulting files?


"All my posts" unavailable? There is only "top posts". An option as basic as this should be there from the beginning. Or maybe I'm missing something?

I want to see all my Questions and Answers in a particular SE site -  - profile page through Stack Exchange Android App. How can I see that? When I tried to see that I found only Top Posts(5) and Top Tags.


Earned at least 200 reputation in a single day   will be the qualification for Mortarboard badge.  Last 25th Jun(2013) I earned 249 reputation. But I was not getting Mortarboard badge. Why is that?

This is my total reputation for today:    I just started my carreer as an active member on the StackExchance sites, so I don't have the Mortarboard badge yet:    I am assuming either the 100 rep bounty or the 100 rep association bonus did not count towards the daily reputation badge. Is this intended? If so, I think the user should get some information about this - for example in the notification he gets.  I found something that actually makes me think this is a bug. When hovering over my account name I get this:    The reputation is displayed there but the sum isn't right in the column today.