For more than 3 months now I get frequent notifications stating:     Mouse battery low   Wireless mouse is low in power (10%)     I use a Logitech M705 mouse with Unifying Receiver in my living room with a tiny desktop which is connected to my tv. It appears that these notifications seem to appear most frequent when wireless reception is not optimal (although distance is only 2,5m). They appear 4-5 times successively, reappearing rapidly after dismissing them.  If batteries are indeed low they should be completely dead by now.  Does anyone know how I can turn this off?  This question is different as this has been going on for months now, previous question was about a mouse running on 0% batteries and notifications appearing about that for a few days. Mine are at 10% now, for at least 3 months. There's nothing I have to do te reproduce this problem as it happens automatically all the time.  I want to know how I can turn this off as there's no solution offered.  The suggestions from the answers to the linked question are for the battery of a laptop, not for the mouse and therefore it doesn't work:   Jetblackster says: "For ubuntu 17.10 go to org --> gnome --> settings-daemon --> plugins --> power Alter the "percentage-low" setting to what you want. I changed from 10% to 4%."  See this post about laptop battery notifications (not what I need)

Countless times over the past few weeks I have been notified about the low battery in my wireless mouse. Every time it wakes up from sleeping mode and reconnects over Bluetooth I get a notification. I have gotten hundreds of notifications. I do not want them and I do not need them. Yes, battery is low, but at 0% (as reported) it will go on for another week at least. The notification has no timer and will stay visible until I close it.  How do I disable this torture?    Realizing I might sound like a grumpy old man I am not going to replace my batteries that are good for another month as a workaround. I am running Ubuntu 17.10 with GNOME Shell. I have no clue what is causing this. Pointers and suggestions will be greatly appreciated!  UPDATE: It turns out the mouse ran for another ten days or so after the initial notification.  With the OS constantly reminding me that it will soon stop working. Wasting fine batteries is not a very good design. People should care about that and have an option to turn the notifications off.  UPDATE 2018-10-22: I asked some time ago. The marked correct answer might not apply anymore. It appears to be a bug in the gnome-settings-daemon. See the report for updates revolving .


I could use some help with this.  I know that  $\mathbb{Z}[\sqrt{-5}]=\{a+b\sqrt{-5\} }|a,b\in\mathbb{Z}\}$. I then put $$0=(a+b\sqrt{-5})(c+d\sqrt{-5})=ac-5bd+(ad+bc)\sqrt{-5}$$ which leaves me with $$0=ac-5bd$$ and $$0=(ad+bc)\sqrt{-5}$$  now how do I proceed from here? I know that I have to prove $a+b\sqrt{-5}=0$ for $c+d\sqrt{-5}\neq0$.

I'm considering the ring $\mathbb{Z}[\sqrt{-n}]$, where $n\ge 3$ and square free. I want to see why it's not a UFD.   I defined a norm for the ring by $|a+b\sqrt{-n}|=a^2+nb^2$. Using this I was able to show that $2$, $\sqrt{-n}$ and $1+\sqrt{-n}$ are all irreducible. Is there someway to conclude that $\mathbb{Z}[\sqrt{-n}]$ is not a UFD based on this? Thanks.


Let r be the zero of multiplicity 2 of the polynomial p(x), how do I prove that $x_{n}$ converges quadratically to r? I only know the basic Newton's Method which is $x_{n+1} = x_{n} - \frac{f(x_{n})}{f'(x_{n})}$, I can't think other way to prove that from this. I tried to googled, but couldn't find any reference for this. Thanks in advance.

I've got a problem with a modified Newton's method. We've got a function $f \in C^{(k+1)}$ and $r$ which is it's multiple root of multiciplity $k$. Also $f^{(k)}(r) \neq 0$ and $f'(x) \neq 0 $ in the neighbourhood of $r$.  The modified Newton's method is $$x_{n+1} = x_n - k\frac{f(x_n)}{f'(x_n)}$$ How to prove that $x_n$ converges to $r$ quadratically?  I found one method using a function $G(x) = (x-r) f'(x) - kf(x)$ but then it's said that $ G^{(k+1)}(r) \neq 0$ but it comes from the fact that $f^{(k+1)}(r) \neq 0$, but it doesn't necessarily have to be true, am I right? We know that $f^{(k)}(r) \neq 0$, but we have no information about the $k+1$st derivative. I would appreciate if somebody explained to me precisely, why it quadratically converges.


I have a table:  CREATE TABLE [dorkOrder] (      [doId] int identity(1,1)  NOT NULL,     [shId] int NOT NULL,     [mopId] int NOT NULL,     [dorkOrderNo] varchar(20) NULL,     [doDate] date NULL );   Now when I am inserting data into it instead of generating doId in this manner 1,2,3,4,5,6,7 it is generating it in following weird manner:  1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 2002 2003 2004 2005 2006 2007 2008 2013   Please help me solve this issue.

I would like to have a nice template for doing this in development. How do I reset an increment identity's starting value in SQL Server?


Find $$\int_0^2\frac{\arctan x}{x^2+2x+2}\,dx$$   Any hints on how to approach this problem in the first place? The answer should be: $$\frac{1}{2}\arctan(2)\arctan\left(\frac{1}{2}\right)$$  I tried parts, and using $x=\frac1t$, but to no use. I also tried using an integral calculator, but it uses complex analysis, which I haven't learned yet.

This question: got some attention, but I didn't understand anything of it. Now I looked at the solution of the book and there is given the hint to use the change of variable $$x=\frac{1-t}{1+2t}$$ Could you please explain how one could think of such substitution? Is there some intuition behind this? Also after I used the substitution I got: $$\int_{-1/5}^1\frac{3\arctan\left(\frac{1-t}{1+2t}\right)}{5t^2+8t+5}dt$$ How can I finish this using the hint from the book?


I know that  is a great place to get feedback on programs and examine code. But, I would love to see a place on Stack Exchange that keeps a comprehensive list of complete programs that are voted on by a number of characteristics such as readability, concept illustration, elegance, programming classics, etc.    Reading others' code and playing with it really helps me to understand new concepts. Does anyone think that is a good idea?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I am trying to wire an electrical panel in a standard manner.  I have several automation devices that take 120 Vac power.  In order to protect them, I have purchased a 2-pole circuit breaker, .  I am now trying to wire it to an outlet.  I plan to put the breaker on L and N of the 120 Vac source.  The circuit breaker's schematic is shown in the below image.  Pins 1 + 3 connect to an X, pins 2 + 4 connect to what looks like a SPST switch.  Questions   What do the X's mean? Where should I put power inlet?  On pins 1 + 3, or pins 2 + 4?   Any additional advice is welcome, I am looking to comply with industry standards.  Thank you in advance for your help!

Any clue? Or is it just there for better visual?


I am using color package in latex to highlight some of my text in specific red color using RGB format. my code is something like this :   \documentclass[10pt,letterpaper]{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \cfoot{\hspace{55mm}CV $|$ \thepage} \renewcommand{\headrulewidth}{0mm} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{marvosym} \usepackage{lipsum} \usepackage{microtype} \usepackage{siunitx} \usepackage{ifsym} \usepackage[colorlinks=false, pdfborder={0 0 0}]{hyperref} \usepackage{multicol} \usepackage[width=18.00cm, height=22.00cm]{geometry} \usepackage{plain} \usepackage{csquotes} \usepackage{enumitem} \usepackage{array} \renewcommand{\labelenumi}{[\arabic{enumi}]} \usepackage{afterpage} %\usepackage{setspace} \usepackage{titlesec} \titlespacing{\section}{0mm}{1.2mm}{1.2mm} %\titleformat{\section}{\bfseries}{\thesection}{1em}{\setstretch{0.01}}  %%%%%%%%%%_____________Color Text Box Packages______________%%%%%%%%%%% \usepackage{blindtext} \usepackage{tcolorbox} \usepackage{graphicx} \definecolor{mycolor}{rgb}{0.122, 0.435, 0.698}    %%%%%%%%%%_____________Color for Text ______________%%%%%%%%%%% \usepackage[usenames, dvipsnames]{color} \usepackage{graphicx} \definecolor{myred}{RGB}{139,0,0}      %%%%%%%%%%_____________Start of main document______________%%%%%%%%%%% \begin{document} \textcolor{myred}{     \setcounter{secnumdepth}{0}\section{Education}}  \begin{tabular}{p{23mm}p{118mm}r}     Undergrad&\href{http://www.buet.ac.bd/}{Bangladesh University of Engineering and Technology}, Dhaka&[2013-Present]\\     &B.Sc. in Mechanical Engineering, CGPA-3.36/4.00\vspace{1.5mm}&[February, 2017]\\     Higher School&\href{http://www.soshgcdhaka.edu.bd/}{SOS Hermann Gmeiner College}, Dhaka&[2010-2012]\\     &Higher Secondary Certificate (HSC), CGPA-5.00/5.00\vspace{1.5mm}&\\     &\href{https://www.acps.edu.bd/}{Adamjee Cantonment Public School}, Dhaka&[2003-2010]\\     &Secondary School Certificate (SSC), CGPA-5.00/5.00&  \end{tabular}   \end{document}   But when i try to compile, it shows error message and does not compile :      Option clash for package color. \usepackage   how can i solve this problem?

I want to draw some coloured circles, so I loaded tikz in my preamble. However, now xcolor is telling me that it has an "option clash". How should I fix this?  \documentclass{article} \usepackage{tikz} \usepackage[table]{xcolor}  \begin{document} Hello world. \end{document}   The error message is this:  ! LaTeX Error: Option clash for package xcolor.  See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  ...                                                l.4   The package xcolor has already been loaded with options:   [] There has now been an attempt to load it with options   [table] Adding the global options:   ,table to your \documentclass declaration may fix this. Try typing  <return>  to proceed.


I now have a list of over twenty serious flaws with iOS7. It is driving me nuts that this new iOS is so riddles with flaws it should never have been released in this state, and Steve Jobs wouldn't have permitted it so. And this site just helped me resolve the mystery of why all my contacts vanished this morning. (thank you!) when the iOS decided to suddenly and for no apparent reason turn off contact syncing sometime overnight. I've hesitated to do a blog post as I'm sure no one at Apple would read my blog though it is a high trafficked blog in my market and would certainly hurt Apple sales, which isn't my desire, I'm a mac fan boy - but frustrated with all the problems and it seeming like after 4 updates, they aren't fixing them.  Thanks! I'd happy list them here if this is the place. If not, just delete this post. But I'd like to be helpful and note a complainer, but at a dead end on how/where to post up to 25 critical flaws that are hindering the practical use of the iPhone now. (despite the fact I still prefer it over the other options)  How do you get Apple to hear and address these things?

Inspired by  I became curious about what is the current preferred mechanism for submitting bug reports and feature requests to Apple. I'm aware that they have the internal RDAR bug tracking system, and that there is an  project to crowdsource the tracking of issues, but I'm at a loss as to the preferred channel to submit something.    Is there a public-facing portal for submitting issues?


hi Guys i'm working on a website in which some of the text is in Spanish but when i tried to fetch them in browser they look like this    is there any way to solve this with php or html meta tags..i tried using php function and meta tags below here but No diffrence at all  header('Content-Type: text/html; charset=utf-8' ); mysqli_query("SET CHARACTER_SET_CLIENT='utf8'",$connect); mysqli_query("SET CHARACTER_SET_RESULTS='utf8'",$connect); mysqli_query("SET CHARACTER_SET_CONNECTION='utf8'",$connect); ini_set('default_charset', 'utf-8');  htmlspecialchars_decode(); html_entity_decode();  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />   please help!

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


Let's say I have two independent networks net1.local and net2.local each of which is connected to a bigger network local through a router.  Each of 3 networks have their own independent DNS server. Now, a host in net1.local tries to resolve a name from net2.local. Something like this:  nslookup host1.net2.local   The DNS server located in net1.local does not know anything about net2.local hosts, and the DNS server located in the bigger network only knows the top domain names as it contains these records:  net1       IN A      192.168.10.1 net2       IN A      192.168.20.1   What would be the best practice to configure DNS servers to achieve this??

I'll try to explain this as best I can...  I'm on ubuntu 13.04, and I am running a local BIND instance at 127.0.0.1 for access to basic wild-card DNS for development (i.e. "*.dev == 127.0.0.1" - yes, I know, don't create fake tlds, etc. This is entirely local to my machine, though).  I also have clients who have their own DNS servers set up through a VPN (at 192.168.140.111 or something similar).  My problem is that if my resolv.conf has their DNS server listed first, I can't access my *.dev, and if I have my DNS server listed first, I can't access their *.vpn records.  Currently, this is my resolv.conf:  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.140.111 search ns1.vpn nameserver 127.0.0.1 nameserver 127.0.1.1 search fritz.box   The first three lines of the config are in /etc/resolvconf/resolv.conf.d/head, so they'll survive through a resolvconf -u.  Essentially what I want to know is this: is there a way for me to set this up so *.dev goes to my dns server, and *.vpn goes to theirs, (and everything else goes off to my ISP).


If I was to buy a PSN online membership card and activate it on my brother's PS4, could I play online on my PS4? (It's two different consoles).

Both myself and my boyfriend have PS4s.  Can I just get a single PSN account and sign both consoles into the same account, or do I need to get two separate accounts?


I am a player in a group of 5 +1 dm. Three of them are wonderful, as well as the DM. They role play, provide commentary, and are great sports when it comes to the game.  The last two are a bit more problematic. They don't seem to know how good the game is when you actually act, rather than simply stating "I.. [generic action]" followed by an immediate die roll without prompt from the DM. Allow me to clarify.  The first one is energized, and is the kind of person that is always everything everywhere just because. Normally I don't have a problem with those who won't stop talking, but he will not stop cracking inappropriate jokes (usually on the subjects of porn and the like), even after every player collectively has told him it's an issue. Simply put; one who does not take the game seriously, and is rather crude.  The second one is a phone-looker. The ONLY time that he looks away from his phone is when it's his turn in combat. I'm not embellishing at all, most of the time, he's not even at the table. I talked to the DM and he agrees it's a problem, but the DM is far too shy and frankly a big pushover to speak up.  With the two types of players above, how do I, as a player, NOT a DM, shape them up to enjoy the game more via more serious participation? Please note I'm not looking for suggestions to give to my DM, but rather actions that I as a player can take initiative on. Answers involving both me and the DM are applicable, but they should hinge on an integral part by the player.  For reference, we're running Dungeon of the Mad Mage in D&D 5e.

About two month ago I got interested in D&D and I decided to start playing it. I read the rules, found an adventure and got four of my friends to play with me. They always show up to play and we have fun, but I think the game could be a lot better and fun than it currently is.  I think my main problem is that the players don't seem to care that much, mostly about RP. I know you shouldn't force RP, but they never ever speak in character (Instead they choose "I ask him if..." "I try to intimidate him..." and come up with the simplest stuff when I ask them what they're saying exactly).  They don't seem to take most of the NPCs, the world, or the challenges seriously, and they don't take initiative at all no matter how I try to make them. I have to ask "What do you do?" every 5 minutes, and most of the time they say they don't know or very vague stuff, like they just wanna get the story going.    It annoys me because I like DMing, but I would also really like to be a player so I could immerse myself in the world and RP.  My players, on the other hand, don't seem interested in that, and so the only moments where anything seems to be happening are during fights.  Another problem I have is pacing. We play something like 2-3 hour sessions, and all we can do is a very tiny bit of roleplaying and at most 2 fights, or one fight and one skill challenge.    In the end I'm really frustrated, because the story doesn't move very quickly, the players don't seem to care that much about it anyway, I kinda have to hold their hands if I want something to happen, and while I was excited to roleplay with them and let them discover this awesome world that I created on my own, they don't really do that.  I really like them, they're my best friends, but sometimes it's really unsatisfying to play with them.  However, they're the only players I've got.    Oh and one last thing which may be one of the causes of the problem:  we play on Roll20, not IRL, so sometimes they just mess up with the drawing tool and sometimes they just don't answer and are kinda lost.


Let $f:\mathbb R \to \mathbb R$ be a differentiable function . If $\exists r \in \mathbb R $ such that $|f'(x)|\le r<1 , \forall x \in \mathbb R$ then using Lagrange's theorem one can show $f$ is a Lipscitz contraction and then use Banach contraction principle to conclude $f$ has a unique fixed-point. My question is what happens if $f'(x)\le r<1 , \forall x \in \mathbb R$ ? Then does $f$ even have a fixed point ?

For a differentiable function $f:\mathbb R\to\mathbb R$ I need to choose the correct statement(s):  $f'(x)\le r<1~\forall~x\in\mathbb R\implies f$ has at least one fixed point.  $f'(x)\le r<1~\forall~x\in\mathbb R\implies f$ has a unique fixed point.    My attempt:  $g:\mathbb R\to\mathbb R:x\mapsto f(x)-x$ is differentiable on $\mathbb R.$ The search is for the number of roots of $g.$ Now $f'(x)\le r<1~\forall~x\in\mathbb R\implies g'(x)\leq r-1<0~\forall~x\in\mathbb R\implies g$ is decreasing everywhere on $\mathbb R.$ Can I say something from this observation$?$


Will my Window OS overwrite after Ubutun OS downloaded and installed ?  Thanks and Best Regards Jacky Loh

I would like to see a full how-to guide on how to install Ubuntu.


I know only one nontrivial solution of this equation: $6!\cdot 7!=10!$. There is also a series of trivial solutions: $n!(n!-1)!=(n!)!,\ \forall n\in\mathbb{N}$. So my question is how to find any other solutions of the equation  $$a!b!=c!,\ a, b, c\in\mathbb{N}\quad(1)$$  I'm also interested in the solutions of more complex equations:  $$\prod\limits_{a\in A}a!=b!,\ A\subset\mathbb{N}\quad(2)$$  $$\prod\limits_{a\in A}a!=\prod\limits_{b\in B}b!,\ A,B\subset\mathbb{N},\ A\cap B=\varnothing\quad(3)$$  Update: as it is noted in comments both (1) and (2) equations have already appeared here. So the main question now is whether anything is known about equation (3).

I was playing around with hypergeometric probabilities when I wound myself calculating the binomial coefficient $\binom{10}{3}$. I used the definition, and calculating in my head, I simplified to this expression before actually calculating anything $$ \frac {8\cdot9\cdot10}{2\cdot3} = 120 $$ And then it hit me that $8\cdot9\cdot10 = 6!$ and I started thinking about something I feel like calling generalized factorials, which is just the product of a number of successive naturals, like this $$ a!b = \prod_{n=b}^an = \frac{a!}{(b-1)!},\quad a, b \in \mathbb{Z}^+, \quad a\ge b $$ so that $a! = a!1$ (the notation was invented just now, and inspired by the $nCr$-notation for binomial coefficients). Now, apart from the trivial examples $(n!)!(n!) = n!$ and $a!1 = a!2 = a!$, when is the generalized factorial a factorial number? When is it the product of two (non-trivial) factorial numbers? As seen above, $10!8$ is both.


I forgot my charger at home but really need to get my pc running. I have a charger from a friend of my my pc has an output of 19V / 7.1 A and the friends has 19V/ 4.3 A. I know that the charger might overheat but what if I only charge when my pc is turned of will it still draw as many electricity when it is turned off? And I have a bit of a problem finding the polarity of my pc I found the one on the charger though  Edit: Found another one 19,5 V and 6,7 A should that one work

Possible Duplicate:             Let's say I have my laptop charger that uses 19.5V and 3.9A and I want to use it in other laptop that has no charger but it needs just 19V and 3.16A, I've studied a little of electtronics and I know that the amperage doesn't affect because the computer will use just the necessary, but I'm not really sure about the voltage.  I read  post and I know the polarity is the same and the connector fits, but it doesn't say anything about voltage, I also know if the voltage of the charger were lower than the specification it'll not be a problem, but what about this little almost insignificant difference??


I've been trying to find the radius lock in 2.8 and i just can't find it anywhere  [![enter image description here][1]][1]  [1]:

Where did the brush size lock go for sculpt mode in 2.8???


I know that any rational number can be expressed as a continued fraction, but what about irrational numbers? For example, what is the continued fractional representation of Pi, or e for that matter? Can all real numbers be expressed as continued fractions? For example, can the following number be expressed as a continued fraction?  0.1234567891011121314...

Every infinite continued fraction is irrational.  But can every number, in particular those that are not the root of a polynomial with rational coefficients, be expressed as a continued fraction?


I have tried many things using many different calculations, but unfortunately I can not figure out a periodic function that can calculate daylight hours of any given city at any given day.

I'm looking for a formula that will return the number of  given a specific location. I was thinking that can be calculated as a difference of sunrise and sunset, but I see that there are some other ways, like in this .  What is the best, fast and correct way to calculate this?


From my (limited) understanding, a category is just a class of objects (which form the "vertices") and a class of morphisms between those objects, plus the requirement that associativity and identity hold.  Whenever I see them drawn, all I see are multi-digraphs.  This being the case, it seems that "category theory" boils down to graph theory.  I'm assuming this isn't actually true.  What can be expressed by category theory that can't be expressed just by interpreting a multi-digraph in a particular way?

The following :     Roughly speaking, category theory is graph theory with additional structure to represent composition.   My question is: Is Category Theory similar to Graph Theory?


I want to know a word or a phrase that would describe a person who "intentionally" (because some people hate themselves even when they don't want to, or some people are insecure - making some generalizations, forgive me if I miss out something.) insults themselves to make others try to make them feel better by complimenting them. Here is an example of a conversation :  A: Hello B, how is it going?  B: Nice. I just wish my purple dress didn't make me look even uglier.  A: That isn't the case babe, I think you are amazing. You are really soo beautiful.  B: NO I am HIDEOUS, and I know it, don't lie to me.  A: No, I promise. I won't lie you're my BFF. You Rock girl.

What word could be used to describe a person who seeks and seems to depend on constant positive feedback from the people around him.


We have a legacy site that offers courses/training. We would like to improve SEO without changing most of the legacy code.   Based on my research, these are the quick/easy things we can do:   Put the company name at the end of the Page Title Make sure links are keywords instead of "click here"  Review content to see if it can focus on search phrases: ("Our technology training" instead of "Our Training") Always link to the "domain name" instead of the "default" page ( instead of ) Create a blog and publish content regularly  Use keyword rich captions on images   Things that are not helpful:   Meta keywords/descriptions Friendly urls   Does anyone have any other quick/easy suggestions we can do to improve SEO?

What are the best ways to improve a site's position in the Google search results?


i am trying to call a method in string from sharedpreference but when i am calling i am facing method invocation getText may produce 'nullpointerexception' warning public class RetrofitClient  {             Sharedpreference sharedpreference;         private final  String token = sharedpreference.getTEXT();  following is my sharedpreference code from where i am calling my method getText where i returning a string which is TEXT   public class Sharedpreference  {                  public static String TEXT = "text";         public static final String Otp = "1234";               SharedPreferences prefs;      SharedPreferences.Editor editor;          public Sharedpreference(Context context){         prefs=context.getSharedPreferences("App_key",0);         editor=prefs.edit();         editor.apply();     }    public  void setTEXT(String prize) {                  editor.putString(TEXT,prize);             editor.commit();              }              public  String getTEXT() {             return prefs.getString(TEXT,"");         }         public  void setotp(String otp) {                  editor.putString("otp",otp);             editor.commit();              }         public  String getotp() {             return prefs.getString("otp","");         }           }

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?


So far I've $(x^2+2)(x^2+2x-1)+4-2x$   but the options for the remainder are: $2x+1$, $2x$, $x+1$, or $x$.

How is it works ?  What is different between divide with remainders in a ring and without ?  e.g I have this question:  Calculate $\frac{6x^5+2x^4+5x^3+x+2}{5x^3+x^2+6}$ in the ring $\mathbb{F}_{7}[x]$.  So I how do I do this ?  Because the way I calculated, the result is:   $1.2x^2+0.16x+0.968$ with the reminder: $-9.128x^2 +x -3.808$  So what is the differences ?  I know I probably wrong but this is what I know


I have one sample and several features.  I calculate a z-score for various features, and for various combinations of features.  Is there a way to quantify the significance of the difference between two z-scores?  For example, suppose I calculate a z-score for the combination of features (male, homeowner) and also for the combination (male, homeowner, married).  For one scenario, suppose the first z-score is 3.0, and the second z-score is 6.0.  For a different scenario, suppose the first z-score is 25.000, and the second z-score is 25.001.  I'm trying to determine whether or not (male, homeowner, married) is a better predictor than (male, homeowner).  Is there a generally applicable formula to quantify the significance of the difference, perhaps taking into account the sample size?  I have no training in statistics, and am trying to implement a software program.  A cookbook formula accompanied by some beginner-appropriate explanation would be ideal and greatly appreciated.  Thanks

This seems to be a basic issue, but I just realized that I actually don't know how to test equality of coefficients from two different regressions. Can anyone shed some light on this?   More formally, suppose I ran the following two regressions:  $$ y_1 = X_1\beta_1 + \epsilon_1 $$ and  $$ y_2 = X_2\beta_2 + \epsilon_2 $$ where $X_i$ refers to the design matrix of regression $i$, and $\beta_i$ to the vector of coefficients in regression $i$. Note that $X_1$ and $X_2$ are potentially very different, with different dimensions etc. I am interested in for instance whether or not $\hat\beta_{11} \neq \hat\beta_{21}$.   If these came from the same regression, this would be trivial. But since they come from different ones, I am not quite sure how to do it. Does anyone have an idea or can give me some pointers?   My problem in detail: My first intuition was to look at the confidence intervals, and if they overlap, then I would say they are essentially the same. This procedure does not come with the correct size of the test, though (i.e. each individual confidence interval has $\alpha=0.05$, say, but looking at them jointly will not have the same probability). My "second" intuition was to conduct a normal t-test. That is, take   $$ \frac{\beta_{11}-\beta_{21}}{sd(\beta_{11})} $$  where $\beta_{21}$ is taken as the value of my null hypothesis. This does not take into account the estimation uncertainty of $\beta_{21}$, though, and the answer may depend on the order of the regressions (which one I call 1 and 2).   My third idea was to do it as in a standard test for equality of two coefficients from the same regression, that is take  $$ \frac{\beta_{11}-\beta_{21}}{sd(\beta_{11}-\beta_{21})} $$   The complication arises due to the fact that both come from different regressions. Note that   $$ Var(\beta_{11}-\beta_{21}) = Var(\beta_{11}) + Var(\beta_{21}) -2 Cov(\beta_{11},\beta_{21}) $$ but since they are from different regressions, how would I get $Cov(\beta_{11},\beta_{21})$?  This led me to ask this question here. This must be a standard procedure / standard test, but I cound not find anything that was sufficiently similar to this problem. So, if anyone can point me to the correct procedure, I would be very grateful!


Every time i run any junit or any job [ spring-batch ] from eclipse. It hangs for around 10-15 mins. After that everything goes fine. Now, i would like to know in such cases what are the steps you take or what are the tools you use to rectify the problem.  Till now i am unable to resolve the problem. Please help. Should i post the Thread dump here?

I'm launching a Weblogic application inside Eclipse via the BEA Weblogic Server v9.2 runtime environment. If this were running straight from the command-line, I'd do a ctrl-BREAK to force a thread dump. Is there a way to do it in Eclipse?


I need to make some kind of form item factory with javascript. The idea is that you get the data from backend and produce the forms which need to have different event handler which is taking same argument but different contents.  const updateHandler = (dispatch, formName, section) => {     return (value) => {      //do some stuff with value      //... this part is different for the each different form        //call function that handles updating redux and url      updateUrl(dispatch, formName, section, value, ...)      //taking same argument    }  }   I am wondering if I can memorize 3 shared argument for sub function so that i do not have to pass same thing again.  I thought about currying or apply but i do not i can achieve that with currying or apply.

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I am a beginner at PHP and SQL.  I was asking a question here unrelated to sql injection and user MarcB said that this code was vulnerable to injection.  function create_group($name, $description, $invites){ global $link;   $name = mysqli_real_escape_string($link, $name);   $description = mysqli_real_escape_string($link, $description);   $names = mysqli_query($link, "SELECT `group_name` FROM `groups` WHERE `group_name` = '$name'"); $descriptions = mysqli_query($link, "SELECT `group_description` FROM `groups` WHERE `group_description` = '$description'");   if(mysqli_num_rows($names) == 0 && mysqli_num_rows($descriptions) == 0) {     mysqli_query($link, "INSERT INTO `groups` (`group_name`, `group_description`) VALUES ('$name', '$description')");   } else {     echo 'Group with that name/description already exists.';   }    $result = mysqli_query($link, "SELECT `group_id` FROM `groups` WHERE `group_name` = '$name'");    foreach($result as $resul) {     foreach($resul as $resu) {       $group_id = $resu;     }   } foreach($invites as &$invite) {   $idres = mysqli_query($link, "SELECT `user_id` FROM `users` WHERE `username` = '$invite'");     foreach($idres as $idarr) {       foreach($idarr as $id) {         mysqli_query($link, "INSERT INTO `group_members` (`group_id`, `user_id`, `confirmed?`) VALUES ('$group_id', '$id', 0)");       }     }   } echo 'Group created!'; }   I think I am in the (quite large) set of people who are beginners and know what sql injection is but find it very hard to spot vulnerabilities that are not HUGELY obvious (like a username and password being sent purely over a GET request).  I wondered if anyone could offer tips to these people and also help me with this bit of code.  Obviously, the latter is less important than the former as I, and many others, will want to know how to spot them ourselves.  Thank you in advance.  I hope this is helpful to other people.

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?


It says let (G, <.,.>) be an euclidean space. Show that for all x, y belonging to G:   modulus<x,y> <= sqrt<x,x> * sqrt<y,y>   and in the mark scheme they put: for all x and  y and a real C: 0 <=  =  -2C + C^2.  if y = 0, there is nothing to prove (the two members of the inequality are 0). if y =/= 0, then  > 0 (this is the only part i get lol). the minimum of this polynomial of degree 2 in C is found by C = /. We get,  0 <=  - (^2)/   apologies for the terrible writing i literally translated it as it was in french. i dont understand how we're supposed to know that we are supposed to use a constant C to prove it. I am really bad with proofs, can someone explain why they did what they did in the mark scheme? Thanks!!!!

I was looking at a number of different proofs of the cauchy schwarz inequality in an inner product space ($\mathbb{R}^n$ or $\mathbb{C}^n$).  All of them used the idea of  $||x-sy||$ where $s$ was selected in particular fashion which in the real case, s would be the value that minimized the function $f(s) = ||x-sy||$  The thing I am confused on is that the books say "s was selected so that $||x-sy||$ would be minimized". I don't understand how beforehand minimizing $||x-sy||$ would be known to be relevant to the inequality.  What is the inuitive link between the minimum of $f(s) = ||x-sy||$ and the Cauchy Schwarz inequality?


I have no idea how to check this?  Could someone give a hint?

How do I prove that there exists (or does not exist) bipartite graph with this degree sequence: $(3,3,3,3,3,5,6,6,6,6,6,6,6,6)$ ?   The sum of the degree sequence is even and simplfied it looks like this: $(1,1,1,1,1,1)$ => it's a degree sequence of a graph.  The simplified degree sequence might suggest that it could be bipartite graph, but I have no idea how to prove it.


I'm having trouble installing MySQL Server. Everytime I try to connect to local server with MySQL Workbench I get this message:  "Your connection attempt failed for user 'root' from your host to server at localhost:3306: Access denied for user 'root'@'localhost' Please: 1 Check that mysql is running on server localhost 2 Check that mysql is running on port 3306 (note: 3306 is the default, but this can be changed) 3 Check the root has rights to connect to localhost from your address (mysql rights define what clients can connect to the server and from which machines) 4 Make sure you are both providing a password if needed and using the correct password for localhost connecting from the host address you're connecting from"  I'm running a freshly installied Ubuntu 18.04. These are the packeges I have installed on my system: libmysqlclient20:amd64 libmysqlcppconn7v5:amd64 mysql-client mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 mysql-utilities mysql-workbench mysql-workbench-data    python-mysql.connector               I've tried this: mysql -u root -p Then I'm prompted to enter a password, but during installation I was never asked to create one to begin with. And then I get the error no matter what pass I give: ERROR 1698 (28000): Access denied for user 'root'@'localhost'

I have followed this  to install MySQL but after successfully installed MySQL, I could not access database.     ERROR 1698 (28000): Access denied for user 'root'@'localhost'


The Late Show host, Stephen Colbert (an American talk show host, don't mind that, just think of him as some random guy you don't have to care about) quite often uses a type of joke whereby he describes one thing to mislead you, then name the other thing that you've thought the preceding description described but in fact didn't. For example:   "Some people are buying the wrong 'Fire and Fury'", instead picking up 'Fire and Fury: The Allied Bombing of Germany, 1942-1945' (...)   This is amazing, this is the meeting of Disney and Beyonce.   Disney isn't buying all of Fox (...) "not included in the acquisition: Fox News," which really is surprising, cause you'd think that     Is there a term for this kind of joke?

Comedians seem to use phrases that employ this type of sentence structure - is there a name for it?  Examples of Groucho Marx's one liners seem to fit this pattern — and if memory serves, Emo Philips.       One morning I shot an elephant in my pajamas, how he got in my pajamas, I don't know.     I've had a perfectly wonderful evening, but this wasn't it.


NOTE: I want a hint only.     A compass and a straightedge construction:Given a hypotenuse and the sum of lengths of the legs,we need to construct a right triangle.   MY TRY: From any ray $BE$, ,let us cut off $BC$ equal to our hypotenuse.Now we draw a circle with the hypotenuse as diameter.Now,if we take any point on the circle and join it with the end points of the hypotenuse,we will have a right triangle by Thales' theorem.  BACKTRACKING: As is often the case,first assuming that we have constructed our figure and then trying to reverse-engineer the steps helps in construction of the required figure.Suppose we have $\Delta ABC$ inscribed in a circle with $\angle A$ the right angle.We extend one of the legs $BA$ to $K$ such that $BK$ is equal to the sum of the legs of our triangle.Then $AK=AC$ and therefore $\angle AKC=\angle ACK$. Similarly,we extend $AC$ to $L$ such that it is equal to the sum of the legs.Then we can argue about angle equality the same way.But this is not helping me in constructing the right triangle.  A hint will be appreciated.

It's a high school level question which we can't seem to solve. Here it is:      Given $2$ lines, one of the length of the hypotenuse and the other with the length of the sum of the $2$ legs, construct with straightedge and compass the corresponding right triangle   I didn't make much progress. It seems that there's a theorem or a few basic facts about right triangles that I'm missing. What path do you suggest I take?  Thanks for your help.


We have two systems of linear equations $$a_1x_1+b_1x_2 = 0\\a_2x_1 + b_2x_2 = 0\\\qquad\qquad\vdots\\a_nx_1 + b_nx_2 = 0$$ and $$m_1y_1+n_1y_2 = 0\\m_2y_1 + n_2y_2 = 0\\\qquad\qquad\vdots\\m_ny_1 + n_ny_2 = 0$$ It will be enough to prove that a linear combination of the first system is equal to any equation from the second system as the same process can be repeated. Now if we multiply $n$-th equation by some $c_n$ then the linear combination will be $$x_1(a_1c_1 + a_2c_2 + \cdots a_nc_n) +x_2(b_1c_1 + b_2c_2 + \cdots b_nc_n) = m_1y_1 + n_1y_2$$ The two systems having the same solutions mean $x_1=y_1$ and $x_2=y_2$ so $a_1c_1 + a_2c_2 + \cdots a_nc_n = m_1 $ and $b_1c_1 + b_2c_2 + \cdots b_nc_n = n_1$. As $a_1,a_2,\cdots,a_n$ and $b_1,b_2,\cdots,b_n$ are constants we now have two equations with $n$ unknowns ($c_1,c_2,\cdots,c_n$), which is undetermined so there are infinitely many $c_1,c_2,\cdots,c_n$. This shows that as long as the solutions to the systems are the same, at least one (if there are two equations in each system) or infinitely many (more than two equations) ways to linearly combine the system, which in turn proves they are equivalent.   Is my reasoning correct, if not is there any way to correct it? Are there any simpler/more elegant proofs to this? In my textbook, definition of equivalency is this: If each equation in a system of equations is the linear combination of the equations in the other system, then the systems are equivalent.

I've just begun to work learn Linear Algebra on my own through Hoffman and Kunze's book and the first problem set already has a question that I can't solve:  Prove that if two homogeneous systems of linear equations in two unknowns have the same solutions, then they are equivalent.  I can't seem to figure out how to prove this without resorting to case work where you account for the cases where one of the coefficients are zero and when both are.  Is there an elegant way to prove in general that when two systems of linear equations have the same solutions, they are equivalent? The converse is obvious enough though.  Definition of equivalence from the text :     Let us say that two systems of linear equations are equivalent if each equation in each system is a linear combination of the equations   in the other system.


For some holomorphic function $f$ show that    $$\lim_{t\to0} \frac{cr(f(ta),f(tb),f(tc),f(td))-cr(a,b,c,d)}{t^2cr(a,b,c,d)}=\frac{(a-b)(c-d)}{6}S(f)(0)$$   where $cr(a,b,c,d)$ is the cross-ratio of four points in $\Bbb C$ and $S(f)$ is the Schwarzian derivative of $f$.   I am unsure on how to really make any progress after inserting the definition of the cross-ratio and turning it all into one fraction (rather than fractions in a fraction). I tried working from the other side but made even less progress, since I don't even know how I am supposed to get the factor $(a-b)(c-d)$ in there, since this is nowhere in the fraction.   Any help would be greatly appreciated.


I am trying to clear my doubts about various terms: tautology, contradiction, contingent, satisifiable, unsatisfiable, valid and invalid. I have read on them from various sources and was thinking about them. I am putting all my understanding below in points. Some points are definitions straight up from other sources, so they must be correct. Some points I have prepared from understanding I got after reading and thinking. I need confirmation whether they (below text in quotes / highlights) are correct or not.      These are definitions:         Tautology:  a formula or assertion that is true in every possible interpretation (that is, for all assignment of values to its variables).    Contradiction:  a formula or assertion that is false in every possible interpretation.   A formula that is neither a tautology nor a contradiction is said to be logically contingent.   Such a formula can be made either true or false based on the values assigned to its propositional variables.   A formula is satisfiable if it is true under at least one interpretation.   So, its either contingent or tautology.    If a logic is a contradiction then it is said to be unsatisfiable.   A formula is valid only if it is tautology.    A formula is invalid if it is contradiction or contingent.      Based on these definitions, I tried preparing diagram highlighting how these concepts overlap:        Based on this diagram, I tried to give answers to some problems.   For example, what is negation of tautology? From above diagram, I felt that it could be either contradiction or contingent. But seems that I was wrong. Above diagram means:  "Given an assertion, if it is not tautology, it can be either contradiction or contingent."  But it does not means:  "Negation of assertion which is tautology can be contingent or contradiction"  I . As pointed out by J.G. in , that I was simply negating definitions above, where I should have actually tried investigating how model (set of values assigned to variables of formula) satisfying given formula behaves for negation of that formula. It took a while for me to grasp that. However I feel I understand it now. I have come up with  following relations of nature of any given assertion and nature of its negation:         Purpose of above table: Given any assertion, above table gives nature of its negation. Purpose of below table: Given fact that certain assertion is not of certain nature, below table tells what could be possible nature of that assertion. (I have given examples in brackets to support the facts.)        Can someone please confirm that my understanding which I put above in various points in yellow highlights / quotes is indeed correct. I dont know if I am overthinking. But I just want exhaustive understanding and know all possibilities, especially because in exam, they ask truthfulness of subtle fact and check out understanding. So trying to know and think exhaustively beforehand.

Couple of days back I asked  question. And after reading comments and answer there, even though I knew the definitions of the different terms (tautology, contradiction, contingent, satisfiable, unsatisfiable, valid and invalid) involved, I was quick to realize that I dont know a lot of subtleties, especially connection between these terms. I didnt find one place discussing all these connections. So I spent some time reading comments and answers on that and other linked post and come up with some understanding which I have put below and want your confirmation for it.     First some quick definitions (you may skip this as this super basic. I have put it to avoid any possible ambiguity):         Tautology: a formula that is true in every possible interpretation   Contradiction: a formula that is false in every possible interpretation   Satisifiable: a formula that is true under at least one interpretation   Unsatisfiable: a formula is unsatisifable if it is contradiction   Valid: a formula is valid if and only if it is true under every interpretation   Invalid: a formula is that is false under at least one interpretation      Doubt  Now to get hold of the connection between all these terms. I prepared below figure:    Next as stated in  comment, "Not a typeX" has two meanings: (1) "The negation of a typeX" and "Not a statement that can be categorized as a typeX".   So, with this in mind, I came up with following relations:   $¬$ tautology $=$ $¬$ valid $=$ contradiction $=$ unsatisfiable $¬$ contradiction $=$ $¬$ unsatisfiable $=$ tautology $=$ valid Not a tautology $=$ not a valid $=$ invalid $=$ can be either contradiction or contingent Not a contradiction $=$ not an unsatisfiable $=$ satisfiable $=$ can be either tautology or contingent $¬$ satisfiable $≠$ (unsatisfiable $=$ contradiction) $=$ invalid $=$ can be contradiction or contingent  $¬$ invalid $≠$ (tautology $=$ valid) $=$ satisfiable $=$ can be tautology or contingent Not an invalid $=$ valid $=$ tautology Not a satisfiable $=$ unsatisfiable $=$ contradiction   Above,    $\neg$ means "negation" (or I dont know if it will be more correct or will add more sense if I say a "Boolean negation") "Not a TypeX" means statement "cannot be categorized as TypeX" $=$ simply means "is" $\neq$ simply means "is not"   I know these are pretty much basic stuff but was source of a lot of confusion for me and I wanted all these related things noted down at one place in correct way. Can anyone confirm if above bullet points and figure are correct?


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 was running Shimano RS on my road bike (not sure the width) and switched to Bontrager Paradigm Comp. A sticker says 622x19 - I'm guessing 19 is the rim width. It's definitely wider than my old wheel. The tire is 25 mm.  On the old wheel, I had zero flats in over 3500 km - same tire and tube models. Since the replacement, I had two flats in about 100 km travelled. After the first one, I figured I must have pinched it, but I was super careful with the replacement and it happened again.   If it matters, I'm quite a heavy rider. My guess is that there is just a risk of a pinch when I hit a bump.  I'm wondering if my tire is just too narrow for the new rim? I can probably still return the wheel (although I'm happy with it other than the flats) - or should I just swap my tire for a 28 mm one?

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


I'm trying to call pdftex.exe from the command-line with a simple document that looks as follows  \documentclass{article} \begin{document} test \end{document}   But instead of my PDF I get the following output  This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) entering extended mode (c:/temp/1884874639.tex ! Undefined control sequence. l.1 \documentclass                   {article} ? ! Emergency stop. l.1 \documentclass                   {article} !  ==> Fatal error occurred, no output PDF file produced! Transcript written on c:/temp/1884874639.log.   Is there some command-line switch that I'm missing? My invocation is pdftex.exe -output-directory="c:\temp" 123.tex.

First of all I would like to thank you because you helped me out a lot with all your answers to the already online questions.  Now, here is my problem. I am trying to do a bibliography file with TeXworks but I get this error when I try to compile (pdfLaTeX+MakeIndex+bibTeX):      This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     ****PATH here******     ! Undefined control sequence.     l.1 \documentclass         [a4paper,11pt]{report}   I've been reading some similar questions but I don't find the way to fix it (maybe I am missing something). I found one that says that I am trying to compile a LaTeX file using TeX compiler but I don't know how to change the configuration.  This is the .bib fiel content:      \documentclass[a4paper,11pt]{report}     \usepackage[english]{babel}     % faire de l'anglais     \usepackage[latin1]{inputenc}   % accents dans le source     \usepackage[T1]{fontenc}        % accents dans le DVI     \usepackage{url}     \begin{document}      @Article{ref11, author={Danihelka, Jiri and Kencl, Lukas}, journal={Cloud Futures Workshop 2012 }, title={Colaborative 3D Environments over Windows Azure}, year={2012}, month={May}, pages={}, note={}     }      @book{ref12, author = {Lee, Henry and Chuvyrov, Eugene},     title = {Beginning Windows Phone 7 Development},     publisher = {Apress},     volume = {},     number = {},     series = {},     address = {},     edition = {Second edition},     year = {2011},     month = {July},     note = {}     }      @Article{ref13, author={}, journal={}, title={Cloud computing}, year={}, month={}, pages={}, url={\url{http://en.wikipedia.org/wiki/Cloud_computing}}     }      \end{document}


I encountered this snippet of code in a book and it looks very strange to me since the convention is to release always the lock but when notify_all() gets called it is not.   My question is whether the lock called from unique_lock gets released automatically after the block gets exited? I know this is released by using RAII lock_guard but that is not my concerned.  class Logger {     public:     // Starts a background thread writing log entries to a file.     Logger();     // Prevent copy construction and assignment.     Logger(const Logger& src) = delete;     Logger& operator=(const Logger& rhs) = delete;     // Add log entry to the queue.     void log(const std::string& entry);      // Gracefully shut down background thread.     virtual ~Logger();      private:     // The function running in the background thread.      void processEntries();     // Mutex and condition variable to protect access to the queue.     std::mutex mMutex;     std::condition_variable mCondVar;     std::queue<std::string> mQueue;     // The background thread.     std::thread mThread;      std::atomic<bool> mExit;     // Other members omitted for brevity. };  Logger::Logger() {     // Start background thread.     mThread  = thread{ &Logger::processEntries, this};   }  void Logger::log(const std::string& entry) {     // Lock mutex and add entry to the queue.     unique_lock<mutex> lock(mMutex);     mQueue.push(entry);     // Notify condition variable to wake up thread.     mCondVar.Notify_all();      // the lock should be released? }  void Logger::processEntries()  {     // Open log file.     ofstream ofs("log.txt");     if (ofs.fail()){         cerr << "Failed to open logfile." << endl;         return;     }      // Start processing loop.     unique_lock<mutex> lock(mMutex);      while (true){         // Wait for a notification.         mCondVar.wait(lock)         // Condition variable is notified, so something might be in the queue.         lock.unlock();  // I am pretty sure the moment lock.unlock() is called the other threads will acquire the lock and the instruction will not jump directly to while(true) which kind of defeats the purpose of the application. // Code continues...         while (true){             lock.lock();             if (mQueue.empty()) {                 break;             } else {                 ofs << mQueue.front() << endl;                 mQueue.pop();             }             lock.unllock();         }     } }   void logSomeMessages(int id, Logger& logger) {     for (int =0; i < 10; ++i){         stringstream ss;         ss << "Log entry " << i << " from thread " << id;         logger.log(ss.str());     } }  int main() {     Logger logger;     vector<thread> threads;     // Create a few threads all working with the same Logger instance.     for (int i=0; i <10; ++i){         threads.emplace_back(logSomeMessages, i, ref(logger))     }  }

Does C++ support '' blocks?  What is the ?  What is the difference between C++'s RAII idiom and ?


String a = "devender"; String b = "devender"; String c = "dev"; String d = "dev" + "ender"; String e = c + "ender";  System.out.println(a == b);     //case 1: o/p true  System.out.println(a == d);     //case 2: o/p true  System.out.println(a == e);     //case 3: o/p false  a & b both are pointing to the same String Literal in string constant pool. So true in case 1 String d = "dev" + "ender";  should be internally using something like: String d = new StringBuilder().append("dev").append("ender").toString();  How a & d are pointing to the same reference & not a & e ?

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?


How can I create a point that identifies the outer most point/corner of a polygon (one point per polygon)?.   It is easy to identify the centre point, but I cannot find options for the outer most corner.

I have a polygon and the polygon's centroid. I want to select the most distant vertex from centroid (picture: point A). I used arcpy.FeatureVerticesToPoints_management to create a feature class containing points generated from polygon, but I don't know what to do next. Could you help me?  Also I want to find intersection point (point B) of the outline of polygon and line created by centroid and the most distant point (line OA).    I would be very grateful for any help.


I was reading  and it got me wondering - does the average Web user know about tool tips and use them?   For me if I don't know what an icon does on a site, my default is to roll over it and see if it has a tool tip. But I am a Web developer.  Are tool tips just by Web developers for Web developers or does the average user actively know about and use them?

I know I use them, and my peers use them, but how much does the average user actually use tooltips to figure out functionality?


Let $K$ and $K_0$ be two isomorphic fields and let $F$ and $F_0$ be two isomorphic fields such that $K / F$ and $K_0 / F_0$ are two extensions. I have furthermore that $K_0 / F_0$ is monogenic and his degree is $n \in \mathbb{N}$. Can I state that $[K : F] = n$? Thank you very much in advance.

What are the simplest examples of situations where in a field $F$ there are two subfields $L_1$ and $L_2$ such that extensions $F/L_1$ and $F/L_2$ are finite, degrees are different $$ [F:L_1] \neq [F:L_2], $$ but fields $L_1$ and $L_2$ are isomorphic as abstract fields.


I've been experimenting with small games to learn design concepts, LibGDX, and Box2D. I am wondering how you would implement "responsiveness," so to say. For example, this is the rendering part of my game and its just drawing to coordinates.   For example I'd like it to look good on Android phones of different resolutions or if the user resizes it on desktop. I am asking about design patterns or practices that would make this possible. Any solutions I can think of seem like they wouldn't scale or would over-complicate the game.  If you know of any articles or design practices that cover this topic, or have any of your own knowledge, or example LibGDX/Java games, I'd love to see them.

For instance, the Motorola Droid is as wide as the G1, but has more height.  Should I try to spread the UI out across the extra height found on the Motorola Droid?  How do others handle this problem?  I'm not using OpenGL, but a SurfaceView for a 2D game.


I want to give the player a random dye when a player steps on a . For eg   /give @p dye   gives the player only the Ink Sac dye but I want to give a random dye to the player.  Optional: Better if it requires only one command block. Also helps if I can extend it to heads(/give @p skull).

I want to make a mini game in Minecraft were I need a random command generator for 9 commands. I need a random command to give the player a random item. I can't do the command block in the dispenser any more because it will just drop out instead of being placed. What different ways are there for generating randomness in commands, and which one would be best for my use? This question is similar to the one about , but I am specifically attempting to get randomness when using commands - the redstone solutions do not apply here.


So I have an odd bug which instead of making console clear writes that character. That issue doesn't occur in C, and everything works normally when I write cls in command prompt window. (I am not an advanced programmer, but I suppose that system() is related with it.) Edit: (When I use clear, it does completely nothing.) Perhaps that problem is not related to wrong keyword (I use Windows), it just didn't do what I was expecting because of drawing that weird arrow character. Edit2: I reinstalled whole vs with phyton, and it doesn't worked Edit3: resolved :   from os import system  while True :     print(" #")     system("cls")

Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.  Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times.  I'm wondering if, and how, to clear the Python interpreter console.  I've heard about doing a system call and either calling cls on Windows or clear on Linux, but I was hoping there was something I could command the interpreter itself to do.  Note: I'm running on Windows, so Ctrl+L doesn't work.


Why can't I see my tweets? My profile says I sent 46 (and I did), but when I click on Tweets, I cannot see them and Twitter says:     Send your first Tweet!   Why is that?  (one of my tweets is from yesterday, so not the issue you refer to about old tweets)

Twitter says I have some ~1.000 tweets, but I can’t load/see them, neither on the website, nor through the desktop app—it stays in the “loading” state forever. And they don’t appear in the downloaded archive either. Why does this happen and how can I overcome it?    I should mention that these are some two years old tweets and that this has happened for quite some time now (months).


When printing references in a block only the first reference number is printed, whereas all subsequent citations are printed without their number. (MWE below)  This seems to be exactly the same problem as in the following question, which was resolved a few years ago:   The problem at the time was traced back to a center environment somewhere in TikzPoster. I think the problematic environment was removed in later versions. Unfortunately, I don't know where to look this up myself. Does anyone know if they recently changed it back to include the center environment? Everything worked fine for me during another project earlier this year.  I would be very happy if someone could suggest a workaround to fix this. Or if it's only a problem for me, help me figure out where things go wrong.  The following MWE for me reproduces the error described above (using backend=biber and compiling with LuaLaTex)  \documentclass{tikzposter}  \usepackage[backend=biber,style=numeric]{biblatex} \addbibresource{biblatex-examples.bib}  \begin{document}  \block{Block 1}{     Lorem ipsum \cite{ctan,companion} and \cite{aristotle:physics} }  \block{References}{     \printbibliography[heading=none] }  \end{document}

When attempting to print references in a block, there are no reference numbers to link to the citations.  main.tex  \documentclass[25pt, portrait, margin=0in, innermargin=1in, colspace=1in, subcolspace=1in, blockverticalspace=1in]{tikzposter}  \usepackage[backend=bibtex,style=numeric,sorting=none]{biblatex} \addbibresource{references.bib}  \title{\textbf{Title}} \author{Person Name} \institute{Institution Name}  \usetheme{Wave}  \begin{document} \maketitle  \block{Introduction}{            blah blab \cite{mycitation1}. blah blah blaaaaah \cite{mycitation2}. bleeeep blooooop \cite{mycitation3} }  \block{References}{     \printbibliography[heading=none]     }  \end{document}   references.bib  @article{mycitation1,     author = {some guy},     title = {paper name 1},     journaltitle = {some journal},     date = {2013}, }  @article{mycitation2,     author = {some guy2},     title = {paper name 2},     journaltitle = {some journal2},     date = {2014}, }  @article{mycitation3,     author = {some guy},     title = {paper name 3},     journaltitle = {some journal3},     date = {2015}, }   Where I should see a bibliography like this:  [1] My citation1. (2013).  [2] My citation2. (2014).  [3] My citation3. (2015).  I only see a citation like this  [1] My citation1. (2013).  My citation2. (2014).  My citation3. (2015).  Any ideas? Thanks in advance!


Let say I choose diamond block, I wanna place the block randomly all over the surface within a radius of 100 blocks. Is there a mod or command to do this kind of work?


I am trying to do some chrome console coding to implement a calendar in javascript, but I am facing a very basic problem.     a = new Date(2017, 9, 9); // Mon Oct 09 2017 00:00:00 GMT+0530 (IST) b = new Date(2017, 9, 9); // Mon Oct 09 2017 00:00:00 GMT+0530 (IST) console.log(a == b);     But they are not equating:  a == b  false   It has to be some stupid mistake I am making but can't seem to find out, Any help please??

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


My objective is to find out the distribution of $A/B$ given $A \sim N(a,b); B \sim N(c,d)$.   I set $Z_1$ equal to $\frac{(A-a)}{\sqrt{b}}$ and $Z_2$ equals $\frac{(B-c)}{\sqrt{d}}$ such that $Z_1$ and $Z_2$ are both $N(0,1)$.   Then I let $U=\frac{Z_1}{Z_2}$ and try to find out $g(U)$ (standard Cauchy distribution).   Could someone please let me know whether I am on the right track or not?

I have two non centered independent normally distributed variables $X$ and $Y$.  Specifically $$ X \sim N(\mu_1, \sigma_1)$$  $$ Y \sim N(\mu_2, \sigma_2)$$   I am interested in sampling from the ratio $X/Y$. I know that the ratio is Cauchy distributed if the denominator distribution is centered at 0 which mine is not. My question is is there an approximate distribution that I can sample the ratio $X/Y$ from using the means and standard deviations from the normal distributions?


I have a big number, more then 100K, objects and would like to select all lying inside a path (big circle in my case). I don't want a clipping mask because I will end up with partial objects. I need whole ones. Any clues?

Illustrator CS6's "direct selection" tool allows you to draw a rectangle which selects select objects that overlap or are contained in the selection rectangle.   But what if I want to only select objects which are fully contained in the rectangle, without including other objects that are not fully contained in that rectangle?   For example, if I have 10 small red circles on top of a large background gradient, how can I select only the circles without the background gradient?


At the LHC, researchers smash particles into each other at speeds close to speed of light. Photons, on the other hand, already move at the speed of light. Do they ever smash into each other? Or do they just go through each other? Why?

Could someone explain to me what the collision of two photons would look like? Will they behave like,   Electromagnetic waves: they will interfere with each other and keep their wave nature Particles: they will bounce like classical balls   I assume that energy of that system is too small to make creation of pairs possible.


I have a code that is really long, the function what it does is that it builds a list of values based in comparing both values.  I am now however limited by time, I must send every 0.5 seconds or less data  which can be done in the function bbut  at the cost of precision. The data is sent using another function that pushes the data serially  to a device I want to know if its possible to have a clock or time scheduler that every 0.4 seconds runs the function that p ushes the data serially, either using  the values of my list after comparing both values, or if that is not ready, a dummy list with 0's . example of my code: limit=0 def mainfunction ():      #main function       reading1=scan.distance      reading2=scan.sector      dictionaryofdata(reading2).append(reading1)      #create 2 lists of 2000 variables each, compare them , discard values of low trust.      limit+=1      if limit == 2000:       #bunch of code to create a list of lowest values for each sector.       if limitcount == 0:        list1= lowestvalues        limitcount += 1       if limitcount == 1:        list2= lowestvalues        limitcount += 1       if limitcount ==2:        #processing and comparing list1 vs list2 and if comparison is ok,          for X in range (index size of list 2):          if valuesaretrusted:            list3[X]= list2[X]            for x in range (index size of list3):             functionsenddata(list3)          This example is crude, and may have errors but the code is roughly like that. a mess of nested if statements  and for loops since I am not that good at python and it seemed more time efficient to handle values directly.,  so my idea would be that if I could run a clock,  and as long as 0.5 seconds have passed without sending data, I force send dummy data with a function, if data is send the clock resets, but that would require multithreading at least in my opinion. In short I want to add an if condition where if time after last data sent was more than 0.45 seconds, send dummy data and reset limitcount variable to reset data recording. The reason being that the way the sensor works and my code works, i send 8 to 9 bursts of data at 0.05 seconds , then I collecto more data to compare and then send again  the burst, however if I try to get data serially and ignore data with a certain property, I now must wait between 0.3 and 0.6 seconds before sending bursts and going over 0.5 causes issues in the device I send the data after.

I want to repeatedly execute a function in Python every 60 seconds forever (just like an  in Objective C). This code will run as a daemon and is effectively like calling the python script every minute using a cron, but without requiring that to be set up by the user.  In , the solution appears to effectively just  for x seconds. I don't need such advanced functionality so perhaps something like this would work  while True:     # Code executed here     time.sleep(60)   Are there any foreseeable problems with this code?


dpkg: error processing package linux-signed-generic (--configure):  dependency problems - leaving unconfigured Errors were encountered while processing:  linux-image-3.16.0-52-generic  linux-image-generic-lts-utopic  linux-generic-lts-utopic  linux-image-3.13.0-66-generic  linux-image-3.16.0-031600-generic  linux-image-extra-3.16.0-52-generic  linux-signed-image-3.13.0-66-generic  linux-image-generic  linux-image-extra-3.13.0-66-generic  linux-generic  linux-signed-image-generic  linux-signed-generic

dpkg --configure -a  Setting up linux-image-3.13.0-35-generic (3.13.0-35.62) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.13.0-35-generic vmlinuz(/boot/vmlinuz-3.13.0-35-generic ) points to /boot/vmlinuz-3.13.0-35-generic  (/boot/vmlinuz-3.13.0-35-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-3.13.0-35-generic.postinst line 491. Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-35-generic /boot/vmlinuz-3.13.0-35-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-35-generic /boot/vmlinuz-3.13.0-35-generic update-initramfs: Generating /boot/initrd.img-3.13.0-35-generic  gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.13.0-35-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.13.0-35-generic.postinst line 1025. dpkg: error processing package linux-image-3.13.0-35-generic (--configure):  subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-extra-3.13.0-35-generic:  linux-image-extra-3.13.0-35-generic depends on linux-image-3.13.0-35-generic; however:   Package linux-image-3.13.0-35-generic is not configured yet.  dpkg: error processing package linux-image-extra-3.13.0-35-generic (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-image-generic:  linux-image-generic depends on linux-image-3.13.0-35-generic; however:   Package linux-image-3.13.0-35-generic is not configured yet.  linux-image-generic depends on linux-image-extra-3.13.0-35-generic; however:   Package linux-image-extra-3.13.0-35-generic is not configured yet.  dpkg: error processing package linux-image-generic (--configure):  dependency problems - leaving unconfigured Errors were encountered while processing:  linux-image-3.13.0-35-generic  linux-image-extra-3.13.0-35-generic  linux-image-generic


Show that $\mathfrak{so}(4) \simeq \mathfrak{su}(2) \oplus \mathfrak{su}(2)$. How do I proceed to show that it is true? I know that the basis of $\mathfrak{su}(2)$ is the Pauli-matrices multiplied by i. I really don't know what to do next.

Show that the Lie algebras of $SO(4)$ and $SU(2) \times SU(2)$ are isomorphic.  I managed to show that $so(4) = \{A \in M_4(\mathbb{R}) \mid A^T = -A\}$ and $su(2) = \{A \in GL_2(\mathbb{C}) \mid A^\dagger = -A, \text{tr}(A) = 0\}$ with $su(2) \times su(2)$ being the Lie algebra of $SU(2)\times SU(2)$. However I am not able to find any mapping that preserves the Lie bracket structure. I am aware of the Pauli matrices being the generators of $su(2)$ but I can't find similar generators of $so(4)$ that preserve the bracket.


I have the following code:  var str = "abcabcABCABC" var chars = str.split(""); var lettersCount = {}; for (var i = 0; i < chars.length;i++) {     if (lettersCount[chars[i]] == undefined )         lettersCount[chars[i]] = 0;     lettersCount[chars[i]] ++; } for (var i in lettersCount) {     console.log(i + ' = ' + lettersCount[i]); }   This code is counting how many same letters are in a word. What am I trying is to convert the uppercase letters to lowercase so it should show like this: a - 4, b -4, now it shows: a - 2, A - 2. I've just started with Js so please be good with me. :)

How can I convert a JavaScript string value to be in all lower case letters? Example: "Your Name" to "your name"


is there any way to export and import nodes programmatically...? While import if the node already exists then it should be updated without creating a new node.

I have two Drupal 7 sites running a very similar structure (views, content types, etc) but with a different theme and a few other changes.  I need to have all the nodes of specific content types that are created in site A to be copied to site B. If it is possible, it should work automatically or by running a script. For example, the sync would run as a scheduled cron job.  I do not need both sites to run in the same database, they must have their own separate database, just the same nodes for specific content types.  I've been investigating, and I see that I can use Node Export, Feeds and even a drush command (ne-export/ne-import). I'm not sure yet about how to put all the pieces together. Has anyone done this already?


For which values of $x\ge 1$ does the expression $x^{x^{x^{x^{.^{.^{.}}}}}}$ make sense? To tackle this, define  $f_1(x)=x$ and $f_{n+1}(x)=x^{f_n(x)}$ for $x \ge 1$ and $n\ge1$.    a) Show that $f_{n+1}(x) \ge f_n(x)$ for all $n\ge1$.    b) When $L(x) = \lim_{n\to\infty} f_n(x)$ exists, find an equation for $L(x)$. Use it to find an upper bound for $x$.  c) For these values of $x$, show by induction that $f_n(x)$ is bounded above by $e$ for all $n\ge1$. What can you conclude?  d) What happens for larger $x$?    I'm having trouble showing it is increasing for a).  I solved b) with the fact that $\lim_{n\to\infty}f_n(x)=L(x)=x^{L(x)}\implies x=L(x)^{\frac{1}{L(x)}}$  Maximizing on $L>0$: $$\frac{d}{dL}L^{1/L}=\frac{d}{dL}e^\frac{\ln(L)}{L}=\frac{d}{dL}\left(\frac{\ln(L)}{L}\right)e^\frac{\ln(L)}{L}$$ $$=\frac{1-\ln(L)}{L^2}L^{\frac{1}{L}}=L^{\frac{1}{L}-2}(1-\ln(L))$$ $$=-L^{\frac{1}{L}-2}(\ln(L)-1)=0\iff\ln(L)-1=0 \text{ so } L=e$$  Therefore $\max\{L^{1/L}\}$ happens when $L=e$ so $x\le e^{1/e}$ and I now have bounds for $x$  It then follows for c):  Since $f_n$ is increasing on $[1,e^{1/e}], \max\{f_n(x)\}=f_n(e^{1/e})$  Base case: $f_1(x)=x\le e^{1/e}<e$.  Assume $f_n(x)<e$, consider $x^{f_n(x)}\le x^e$ $\implies f_{n+1}(x)\le f_{n+1}(e^{1/e})<x^e<(e^{1/e})^e=e$ therefore by principle of mathematical induction, $f_n(x)<e$ for $x\in[1,e^{1/e}]$

I got this problem from my teacher as a optional challenge. I am open about this being a given problem, however it is not homework. The problem is stated as follows. Assume we have an infinite tetration as follows $$x^{x^{x^{.^{.^.}}}} \, = \, a$$ With a given $a$ find $x$. The next part of the problem was to discuss the convergence radius of a. If a is too big or too small the tetration does not converge. Below is my humble stab at the problem.  My friend said you would have to treat the tetration as a infinite series, and therefore could not perform algebraic manipulations on it before it is know whether it converges or diverges. However my attempt is to first do some algebraic steps, then discuss the convergence radius. I) Initial discussion At the start it is obvious that the tetration converges when $a=1$ (just set $x=1$) Now after some computer hardwork it seems that the tetration fails to converge when a is roughly larger than 3. II) Algebraic manipulation $$ x^{x^{x^{.^{.^.}}}} \, = \, a$$ This is the same as $$ x^a \, = \, a$$ $$ \log_a(x^a) \, = \, \log_a(a)$$ $$ \log_a(x) \, = \, \frac{1}{a}$$ $$ x \, = \, a^{\frac{1}{a}}$$ Now, if we let $a=2$ then $x = \sqrt{2}$. After some more computational work, this seems to be correct, which makes me believe this formula is correct. III) Discsussion about convergence By looking at the derivative of $ \displaystyle \large a^{\frac{1}{a}} $ we see that the maxima occurs when $a=e$, which also seems to correspond to the inital computational work. Now I think, that the minima of $\displaystyle \large a^{1/a}$ is zero by looking at its graph, studying its derivative and the endpoints. So that my "guess" or work shows that it converges when $$ a \in [0 \, , \,  1/e] $$ VI) My questions Can my algebraic manipulations be justified? They seem rather sketchy taking the a`th logarithm and so on . (Although they seem to "magically" give out the right answer) By looking at Wikipedia it seems that the tetration converge when $$ a \in \left[ 1/e \, , \, e \right] $$ This is almost what I have, why is my lower bound wrong? How can  I find the correct lower bound?


Updating my Linux server is mostly a stressed part for me. Like today. With yum update i see a new version of NodeJS, but from what i can remember nodejs has been used by a program which needs to be carefully altered.  So i thought, there should be a command how to find out which program is using NodeJS, but unfortunately I can't find such command.  Is there a yum command which tells me who is using NodeJS on my system? So i can check if it is ok to update?

I am trying to install a 3rd-party RPM package on RHEL5 which depends on version 3.4 of sqlite. According to Yum I already have 3.3.6 installed.  Is there a way to list the installed packages that depend on sqlite 3.3.6?


Does LaTeX allow to draw Use Case Diagrams, UML Diagrams and E-R Diagrams. How to implement these? What packages to use?

What's the best way to draw UML class diagrams in LaTeX?


There are only two clause in \ifthenelse—<then clause> and <clause>. If more than two test conditions are needed, the \ifthenelse has to be nested. This will make code awful and be hard to maintain. Is there a better way, for example, switch-case marco like this(like C language):  \switchconditon   {<case 1> <clause 1>}   {<case 2> <clause 2>}   {<case 3> <clause 3>}   an example by \ifthenelse:  \ifthenelse{\equal{#1}{ul}}%ul=upper left         {\let\position\AtPageUpperLeft}         {}     \ifthenelse{\equal{#1}{ll}}%ll=lower left         {\let\position\AtPageLowerLeft}         {}     \ifthenelse{\equal{#1}{pc}}%pc=paper center         {\let\position\AtPageCenter}         {}   Can you give a code to achive the last code function? Thank you.

I'd like to have command built around a switch-case environment in LaTeX, much like the example below:  \documentclass{article}  \usepackage{xstring}  \newcommand{\dothis}[1]{% \IfStrEqCase{#1}{{a}{so you typed a}     {b}{now this is b}     {c}{you want me to do c?}}     [nada] }  \begin{document}  \dothis{a}  \dothis{b}  \dothis{c}  \dothis{e}  \end{document}   My problem with it is that it requires the xstring package. Is there any other way to do this? Preferably without loading additional packages and avoiding disgraceful thickets of \if-\else-\fi statements?


Why is it that $$ab=ba$$ for positive integers $a,b$? Is there an intuitive explanation or we just need to accept it as a given fact?

$ab = ba$  This is, inherently, true. Some texts drop it like an axiom without any justification. But I'm a bit curious where it stems from or basically why/how it works. If anyone could enlighten me a bit further, I'd be most grateful. Peano axioms? From set theory? Help.  What bugs me with this definition is it's real world "application":  Let's say I have a power output of 5 W ( $kg\cdot m^2 \cdot s^{-3}$) and I want 30% of that power output (to have some units and natural context).  Naturally, 30% is 30 1/100 (% is the unit). For simplicity, let's express that as:  $30$%$ = 30/100 = 3/10 = 3d$ where $d = 1/10$, a simpler unit (because %W would look... Wrong?).  So 30% of power is then $5 W \cdot 3d$, and we can force it to "make sense" if we associate d with W or basically scale the unit of power by d (which is intuitively understood as being 10 times smaller then the output of 1 W) $dW$. And we want to scale these 5 units of $dW$ three times.  $5 dW \cdot 3$  But the commutative property says it is the same as scaling 3 units of $dW$ 5 times or:  $3 dW \cdot 5$  And the result is the same. This is the bit that hurts my head, the fact it is the same. I try to interpret the same as, for example 50 J of work, it's either applying 50 N over 1 m of distance or 1 N over 50 m of distance.    Down here is additional stuff I think I have (you don't have to read it if you know how to answer immediately). I don't claim it's correct, if anyone parses this information, feel free to correct me.  $m\sum\limits_{i=1}^{n}{1} = n\sum\limits_{i=1}^{m}{1}$  This is how I've been trying to break it down, as it is repeated addition. It is repeated $n$ times and multiplied by $m$, and reverse on the right side. There is $x = m - n$, so when I multiply $n$ $m$ times, each repeated addition of $n$ lacks exactly $x$ to $m$.  $mn = nm$  $x = m-n$  $m(m-x) = (m-x)m$  $m^2 - mx = m^2 - mx$  $ true $  And yes, sadly, I realise that I am using the very property I'm trying to prove ($xm$ shifted as $mx$ on the right-hand side.)  And it even calls in the distributive property of multiplication over addition which I derive (for myself, informally) from the very nature of multiplication and the way we "process" numbers:  For example, number $55$ times $2$  $55 = 5 \cdot 10^1 + 5 \cdot 10^0 = 5 \cdot 10 + 5 \cdot 1$  $(5 \cdot 10 + 5 \cdot 1) \cdot 2$  This is the basis of our positional notation which appends digits of varying orders of magnitude or units together in a way it makes "sense". Each one is b times bigger than the one to the right. Basic stuff. It is why I expressed 10 and 1 explicitly, those are what I consider units in this case.  Now, from the definition of multiplication, which is at its heart just repeated addition, it is truly the same if you add together $2$ $50$ times and then again $5$ times or "all at once" (figuratively, we are always doing the former mentally) $2$ $55$ times.  That added together gives 110, which is true.  To me, the distributive property (in case of integer multiplication) is a repercussion of the very definition of multiplication which is repeated addition (evading strict concepts). I am not certain whether this is a good way to look at it.


I'm talking about a big difference between output current of the power supply and rated current of the device here. Would it burn up?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


How would you go about showing that $p(x)=\frac{x^5-1}{x-1}=x^4+x^3+x^2+x+1$ is irreducible over $\mathbb{Q}$. I'm having trouble seeing how one can show whether this kind of polynomials are irreducible or not  Thanks for your help.

As opposed to the generic polynomial form for utilizing the Eisenstein Criterion ($a_nx^n+a_{n-1}x^{n-1}+\dots+a_0\in\mathbb{Z}[x]$ is irreducible in $\mathbb{Q}$) how do we prove that if $p$ is a prime, $x^{p-1}+x^{p-2}+\dots+x+1$ is irreducible over $\mathbb{Q}$?


I have python2.7 installed on ubuntu 16.04. It's showing strange behavior. If I check for (5/4), it will just display 1 as output.  for (6/7) it is showing 0  Can anyone help me to fix this?

Is there a benefit to using one over the other? In Python 2, they both seem to return the same results:  >>> 6/3 2 >>> 6//3 2


I have a simple C program as follows: #include <stdio.h> #include <stdlib.h> #include <ctype.h>  void convertToUpperCase(char* sPtr);  int main(int argc, char** argv) {     char myString[] = "cHaRacTerS aND $32.95";     char* anotherString = "cHaRacTerS aND $32.95";          convertToUpperCase(myString); // THIS IS OK!     convertToUpperCase(anotherString); // THIS CAUSES RUNTIME ERROR                                         // (ie. build success but run fail)!      return (EXIT_SUCCESS); }  void convertToUpperCase(char* sPtr) {     while (*sPtr != '\0') { // current character is not null (ie. end of string).         *sPtr = toupper(*sPtr); // turns valid characters into upper case         ++sPtr; // point to next character within the string.     } }  It seems like passing anotherString into the function that expects a char* is the problem. From my understanding, both myString and anotherString are char* in C. It seems to me the problem is how they are defined. For myString I defined it as an array of characters with a null terminator at the end. For anotherString it is a character pointer to a string literal somewhere. But I can't figure out why the way they are defined matters in this situation. Thanks in advance :) edit: used specific terms as suggested by answers.

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


What happens if Ana boosted D.va just before she uses her ultimate? Can the boosted mech destroy shields and kill tanks?

In Overwatch, there are several ways to buff the damage dealt by a hero: the alternate fire of Mercy's Caduceus Staff, Ana's Nano Boost, and Orisa's Supercharger. Are they all governed by the same rules? What can they affect, or not affect?  This question exists to have a single reference point for the many, many questions that have been asked, instead of having to update each answer individually when game mechanics change


Let $f(n)=\varphi(n)/n$, where $\varphi$ is the totient function. Since $0<\varphi(n)\le n$ and $$\lim_{n\to \infty}f(p_n)=1$$ (where $\{p_n\}$ is the increasing sequence of primes) and $$\lim_{n\to\infty}f(n\#)=0$$ we know that $\limsup f(n)=1$ and $\liminf f(n)=0$. But is the set $\{f(n):n\in\Bbb N\}$ dense in $[0,1]$?  Warning: this is not a problem from a book, so it might be very hard (honestly, I have no idea).

suppose that $\phi(n)$ is Euler function. prove that, $\{\frac{\phi (n)}{n}\}_{n \in \Bbb N}$ is dense in $[0,1]$  (if $A_n=\{1 \leq m \leq n \mid m \in \Bbb N ; \gcd(n,m)=1\}$ then $\phi(n)=|A_n|$)  I think : If $p$ is prime then $\phi(p)=p-1$. for any $ \varepsilon > 0 $ there is a prime number $p$ such that $1-\varepsilon \leq \frac{p-1}{p} \leq 1$. for other elements i don't know what can i do.


How can I install Any Desk in Ubuntu 18.04.4 LTS?  I am trying to install the anydesk in the ubuntu, so what is the terminal command to install. I try to install from the software Updates and also from the terminal but I can't get to install so, what is the best and easy way of installing the needed software.

How can I download, install and open Anydesk? From the homepage of Anydesk to the Software Center of Ubuntu and installation / download everything is fine but then I couldn't open it.


I love the ease of correcting misspellings, typos, and grammatical errors in SO.  Certain errors catch my eye and annoy me - and the wikiness of SO is a great blessing; I don't have to live with the errors, I can simply fix them.  But...  It can be useful to know how sloppy the OP is.  A question that reads, "plz hlep me fix this" can be safely ignored - safely, in the sense that if it wasn't worth the OP's time to express him/herself, it may not be worth our time to help out with answers.  It can also be useful, say, when it's clear the OP isn't a native English speaker - we can calibrate our answers to make them more readable.  And a healthy edit obscures all that useful information.  So, where's the balance?  Personally, I'm on the side of "Fix it!", but I can certainly see the case for leaving it alone.

Question says it all:  Should users edit other users' posts to correct grammar and spelling problems?  I've seen arguments both ways, and lean toward yes...but...


I was solving a problem and noticed that conversion of Float value to Int gives wrong result. Below is peice of code which involves the conversion  while(height >= 0.0){         height = (v * t) - (0.5*g*t*t)         if(height >= maxHeight) {             d_time = t             maxHeight = height             print(d_time)         }         t += 0.1     }     let time = d_time * 10.0     print(d_time, Int(time)) // it prints 2.4, 23     return time   However if I tried converting literals it works correct.  For example  let time = 2.4 * 10.0 print(time) // prints 24 as expected.   I tried to figure out the issue but not able to get it.  Please help in understanding this behavior.  Thanks.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


In the Unix programming world there's a command called . It stands for Change Directory.  From what I can research it's at least 35 years old.  I often hear at my job "Then we'll cd into ".  With that usage established I was wondering if there's an established standard for how to specify a past tense use for this term.  I've tried using Target directory couldn't be cd'd but I'm unsure how that sounds to a general audience.

asked about pluralising acronyms, abbreviations and initialisms, but is there a standard way to add verb endings e.g. -ing and -ed (what are these called?), at least in informal English?  For example, which of these is/are best?   I'm SMSing her. I'm SMS-ing her. I'm SMS'ing her.   I know I can rephrase it to "I'm sending her an SMS." but I wish to use SMS as a verb.  Similarly,   He FUBARed. He FUBAR-ed. He FUBAR'ed. He FUBAR-d. He FUBAR'd.   In the latter set, as the verb is actually the F ("foul", or something more explicit) — the expanded sentence being "He fouled up beyond all recognition." — should it even be "He FedUBAR." or similar?


When I try and search for something using spotlight, all application results show the .c file extension icon instead of the actual app icon you would expect to see for FireFox, Safari, Mail etc.  Very annoying.  I have tried Cmd + I to change the file association there, but it does not address the problem correctly.  Any ideas?

How do I stop Numbers from being the default program when a financial file is downloaded or imported?


I've been trying many options for my citations and references. I used natbib package and plainnat style, but I discovered biblatex and it seems better for customizing citations and bibligraphy styles. My problem is that I can't make it works.  My code:  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry} \usepackage[citestyle=authoryear,bibstyle=authortitle]{biblatex} \usepackage[none]{hyphenat}  \addbibresource{C:/Users/usuario/Documents/6_Latex_Files/References} \usepackage[brazil]{babel}  \begin{document} Hi \parencite[i.e.][page 2]{Alamri2010}\\  Another citation \parencite{Bouvy1999,Ho2008,Ho2012c}\\  In line citation \parencite{Bar-Yosef2010}   \printbibliography \end{document}   The result:    Why the citations are not correct?  Why the pre and postnotes is not appearing?  Why the bibliography is naor appearing?  Observation (if helps): When I compile appears the following messages:  This is BibTeX, Version 0.99d (MiKTeX 2.9.6200 64-bit) The top-level auxiliary file: document.aux I found no \citation commands---while reading file document.aux I found no \bibdata command---while reading file document.aux I found no \bibstyle command---while reading file document.aux (There were 3 error messages)

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


I have whole genome aligned sequences of four beetle populations of same species. I wish to construct a phylogenetic tree with the four. However, I am unable to find a suitable outgroup of the species, so I cannot use an outgroup to root the tree. Is there a particular method that one can use to construct a tree without an outgroup? I found that the MEGA software does this well. What is the theory and understanding of constructing a tree without an outgroup? what are the implications of constructing a tree without an outgroup? Ar the distances between trees measured relative to one another?

I understand that rooted and unrooted phylogenetic trees are similar in structure  But how can they be easily identified as one or the other?  Is it simply based on the presence or lack of a named root (the root is identified as a particular ancestor) or outgroup?


I am curious to know how much having high rep helps in getting a good job. Does it even play a role or it's just only for one's own satisfaction?  I joined Stack Exchange 2 months back and am only active on SharePoint Stack Exchange, I did realize that having High Rep there is quite difficult but to be honest it doesn't matter because while solving a problem you learn 10 more things.  Does gaining reputation plays any role getting a better job?

While this is half tongue in cheek, this website and community may end up being the premier site that over half the world's programmers regularly attend - especially if Jeff and Joel create localized versions (with automatic translation, please).  The rep doesn't have a 1:1 correlation with experience, ability, etc. It does strongly hint at the ability to quickly comprehend and answer a variety of questions (check out the top 25 - few of them strongly specialize in any one type of question or answer).  It also strongly hints at an obsession and perhaps spending more time on this site than working, but there may be a balance point with optimal rep - enough to indicate expertise, not so much to indicate wasted time.  At some point Stackoverflow may hit a critical mass where hiring managers will understand and use it as a hiring resource - checking out not only one's rep, but the types of answers and questions the potential hire posts, and seeing how their peers respond to them (comments, votes, etc).  I can't see what the tipping point would be though, assuming it exists in the future.   At what point would you seriously consider adding a link to your SO user page in your resume? At what point would you seriously consider putting your rep number on the resume itself?  (before you say never, first imagine a world where this is commonplace, and then work backwards to see what drastic, unimaginable changes would have to occur before you felt it was useful) If you knew your future employer is going to be looking at your questions and answers, would you review them in advance and consider closing/deleting/modifying anything? Ancillary - Reputation represents time, and time can also be represented by money.  At what point will we see financial transactions involving rep?  This certainly would happen before rep became a resume option.