I have a character A center within a box. I want to move A to the center of this box.

 A

   .flex-container{     display: flex;     flex-direction: column;     font: Tahoma;     align-items: center; }  .flex-container > div{     font-size: 40px; }  .box1{     background-color: grey;     margin: 5px;     height: 100px;     width: 100px; }  I can wrap A with the tag p then change the margin of this tag to set the position of A. But then one has to calculate how to set the margin size. Is there any more straightforward way to achieve this goal?


Can the coefficient of static friction be less than that of kinetic friction?

I was recently wondering what would happen if the force sliding two surfaces against each other were somehow weaker than kinetic friction but stronger than static friction. Since the sliding force is greater than the maximum force of static friction, $F > f_s = \mu_s F_N$, it seems that the surfaces should slide. But on the other hand, if the force of kinetic friction is greater than the applied force, there'll be a net force $\mu_k F_N - F$ acting against the motion, suggesting that the surfaces should move opposite to the direction they're being pushed! That doesn't make sense.  The only logical resolution I can think of is that the coefficient of static friction can never be less than the coefficient of kinetic friction. Am I missing something?


Windows Server 2008 R2 automated reboot everyweek

I'm rather new with Windows / Windows server administration. I heard that rebooting Windows servers everyweek is required to keep it functioning well. So here, we reboot every Virtual Machine running Windows everyday at a specified time, automatically.  Coming from a Unix background, I find that rather surprising. But since I don't know much about Windows (actually, I know absolutely nothing about managing Windows Servers) , I was wondering, is there really a use for that?  Thank you,


Can I cast hex on a bug, kill it, rest, and have hex and my spell slots?

Based on the idea that hex can persist across short rests (see )  if I cast hex on a bug and killed it, then took a short rest for an hour, would I have hex up for the day (until I broke concentration) and my two spell slots?


Copying files from Ubuntu guest to Windows host

I want to transfer files from my Ubuntu (installed on VirtualBox Version 5.1.26) to Windows 7 host. I'm able to copy files from my host to guest using Shared Clipboard but I want to copy the other way round. I already installed Guest Additions as mentioned in   I've been through many other posts on the Internet but none worked for me. I can use WinScp or Putty or any other file transfer applications but that's not what I want, I don't want to use any alternative file sharing software for this.


Recursive feature elimination and dropping dummy features

Is it advisable to use RFE for linear or logistic regression when we have some dummy features. Reason I am asking this is: in RFE we will eliminate some features which will also include dummy features and as per this  for a categorical variable which is dummy encoded we should not keep some features & drop others, we should keep all dummy features of a categorical feature.   Reasoning given is :  "You should leave all five indicator variables in. Dropping predictors because they are non-significant leads to biased estimates for regression coefficients and inflated p-values."  "The problem with dropping the indicator is that you'll change the p-values of the remaining levels as well, as you're shifting the intercept (aka the reference group.)"  If ideal thing to do is keeping all levels/dummy features of a categorical variable then how do you use RFE for dummy features or how do you eliminate unimportant dummy or categorical features?


Is it normal for an Inner tube to bulge when inflated?

I recently bought a pair of inner tubes and when I partially inflated one of them before putting it into the tire (only a few pumps with a floor pump), I noticed a portion of it was bulging out considerably. It looked like a snake who had swallowed a giant mouse, there was a huge bulge on one section of the tire. I went to get my camera to take a photo of it, but it then burst before I could take a photo.   Went back to the LBS and got a replacement tube, and when I partially inflate this one it also bulges quite a bit too, although not nearly as extreme as the last one that popped.   Is it normal for an inner tube to bulge out as much as this? I'm just worried this one will pop as well.


I have heard many physicists (ex:- Michio Kaku) saying "Warp speed" from Star Trek doesn't violate any known physical laws. But doesn't it violate causality?  Say, we make warp drive possible and travel towards Alpha Centauri (4.22 light years away) in warp speed and reach there, say, within a year (+/- few months) and blow it up. Now using Special Relativity, we could devise a frame of reference wherein the observer would see the Star blow up before we ever left planet Earth. Wouldn't that violate causality and make warp speeds unattainable?


What justifies the age of Albus Dumbledore?

I was wondering about Dumbledore's age. What justifies that he's so old, as described in the books and websites. My first guess was that he owns one of the Hallows, but then, how could Abelforth be that old ans alive too? Then I came across this question  and notably the first answer, stating that JK Rowling says that "Wizards have a much longer life expectancy than Muggles. (Harry hasn't found out about that yet.)". This would render Dumbledore longevity not that impressive at all... Do we have any more information about Wizards life-span? And how come that every pure blood kid seems unaware of that too?


Strange characters with polish letters in PHP

I've got this piece of code:       if (self::$username == "Borsucza Łapa.") {         die("tak");       } else {         echo self::$username . "<br />";         echo "Borsucza Łapa.";       }  The condition is not valid, and the output from else statement is: Borsucza Łapa. Borsucza �apa.  What's that sign and how to turn it to an Ł sign?


Binomial coefficients for infinite cardinalities

Let’s define $C_\alpha^\beta$ as the cardinality of the set of all subsets with cardinality $\beta$ of a set with cardinality $\alpha$:  $$C_\alpha^\beta = |\{T \subset S| |T| = \beta \}|$$  where $|S| = \alpha$.  It is easy to see, that $C_\alpha^\beta$ is well defined, and if $\alpha$ and $\beta$ are finite, then $C_\alpha^\beta$ becomes classical binomial coefficients.  It is also true, that $C_\alpha^\beta = 0$ for all $\beta > \alpha$.  Now one can see, that for infinite $\alpha$ and finite $\beta$ we have $C_\alpha^\beta = \alpha$.  It is also true, that for infinite $\alpha$ $C_\alpha^\alpha = 2^{\alpha}$:  $|\{T \subset S| |T| = |S| \}| \geq |\{T \subset S| |T| < |S| \}|$, as if $|T| < |S|$, then $|S \setminus T| = |S|$, for infinite $S$.  $$2^{|S|} = |\{T \subset S \}| = |\{T \subset S| |T| = |S| \}| + |\{T \subset S| |T| < |S| \}| \leq |\{T \subset S| |T| = |S| \}| \leq |\{T \subset S \}| = 2^{|S|}$$  However, I do not know the values of $C_\alpha^\beta$, where $\alpha$ and $\beta$ are both infinite and $\beta < \alpha$. Is there a way to find them too?


Should linked websites with dynamic content be replaced with a screenshot?

I was looking at  'question', which appears to link to a website which could change in the future (I'm not sure it does, but that's neither here nor there), and I thought that if the content of that webpage changes in the future, the question would make less sense.  Another example of this is this question right here (and other meta questions) which link to Stack Exchange questions, as often a meta post will arise about an issue in a question, and subsequently the issue will be fixed, and anyone looking at the meta question will have no idea what it's really about.   Should websites with dynamic content where the important information is what it says right now be replaced with screenshots of the webpage, or also include a screenshot?   Is it worth the extra space?         This takes up much more space now, and the question looks worse.


I am a Android greenhorn, and seems like there are a lot of jargon that float around. Example:  Android OS Android Kernel Rooting Recovery Partition ROM Boot locked BIOS SIM Locked stock android   etc.  Could any one point me to resource(s) that would clarify these core concepts to me? I am not looking for easy answers; but rather I need right approach to read and understand these concepts.


You have to draw 10 cards. What is the probability you will not drawn any repeated cards?

Assume you have 52 cards in a deck, and you have to draw 10 cards. Assuming you have to put back the card after each draw, what is the probability that you will not draw any repeated cards?  Here's what I was thinking...   Draw 1: $\frac{52}{52}$ since first card is allowed to be any card. Draw 2: $\frac{51}{52}$ since you don't want to draw the first card, you're now allowed to draw 51 of the remaining cards.  ... Draw 9: $\frac{44}{52}$ since you don't want to draw the last 8 cards, you're now allowed to draw 44 of the remaining cards. Draw 10: $\frac{43}{52}$ since you don't want to draw the last 9 cards, you're now allowed to draw 43 of the remaining cards.   So $\frac{52}{52} \times \frac{51}{52} \times ... \times \frac{44}{52} \times \frac{43}{52} = 0.397$ or $39.7\%$ chance of not getting a repeat.  Just wanted to check if this is the correct approach to the problem or not.


Should I get a Famous Question for this?

I just noticed  got 10k views. Does this mean it's a Famous Question?


Upgrading from 18.04 to 19.10 to fix Internet Issue

I am currently running Ubuntu 18.04.3 LTS. Recently, my laptop crashed during a Kernel upgrade (I did it via apt update then apt dist-upgrade). I then ran dpkg --configure -a after it told me that I had broken the automatic update process.  Afterward, I ran apt update && apt dist-upgrade && apt autoremove, which I always do, but I guess for that reason I can't revert back to the older Kernel version. It ran fine, but since reboot, my Internet doesn't work anymore. It's not the wifi adapter, which is a common issue. Also, LAN doesn't work - the cable is shown as unplugged.  I figured, since updating the system/installing an older Kernel version Etc. is gonna mess up the tweaks I made to my system over time anyway (Is that correct?), I might as well update to Ubuntu 19.10, which I can do directly from 18.04, right? Which should hopefully fix the issue. Do you share my optimism about that helping?


Why does the /winsxs folder grow so large, and can it be made smaller?

A Vista virtual machine I use only has a 10 GB virtual hard disk -- and I'm worried about it running out of space over time. I used  to check for the culprits..  And the primary culprit is that /winsxs or "Windows Side-By-Side" folder.  What is the Windows Side By Side folder? Well, that's .  All of the components in the operating system are found in the WinSxS folder – in fact we call this location the component store.  Each component has a unique name that includes the version, language, and processor architecture that it was built for.  The WinSxS folder is the only location that the component is found on the system, all other instances of the files that you see on the system are “projected” by hard linking from the component store.  Let me repeat that last point – there is only one instance (or full data copy) of each version of each file in the OS, and that instance is located in the WinSxS folder.   So looked at from that perspective, the WinSxS folder is really the entirety of the whole OS, referred to as a "flat" in down-level operating systems.  This also accounts for why you will no longer be prompted for media when running operations such as System File Checker (SFC), or when installing additional features and roles. That explains why the folder starts off big, but not why it gets larger over time – the answer to that question is servicing.   In previous versions of Windows the atomic unit of servicing was the file, in Windows Vista it’s the component.  When we update a particular binary we release a new version of the whole component, and that new version is stored alongside the original one in the component store.  The higher version of the component is projected onto the system, but the older version in the store isn’t touched.  The reason for that is the third part of why the component store gets so large.  Lots of other people :  A coworker recently received his every two year work laptop refresh and was in the middle of loading his new laptop with Vista. For some reason, his hard drive C: was partitioned to only 25GB and the rest of the space reserved for a much larger drive D:. Anyway, after loading many Windows Updates, he was left with hardly any drive space left on C:, and for some reason, the WinSxS directory had ballooned to over 8GB. While I knew what the WinSxS (Windows Side-by-Side) directory was for, I wasn't quite sure why that directory would explode in size so fast with normal operating system updates.  I don't really care about having all these duplicate files for safety, but I do care about the VM exploding due to an out of disk space error. So.. can /winsxs be safely pared down in any way? ..  Administrators should not, for any reason, take it upon themselves to clean out the /winsxs directory - doing so may prevent Windows Update and MSI from functioning properly afterwards.  Preventing accidental deletion from the directory is accomplished by putting a strong security descriptor on the directory that inherits to its children.  If this /winsxs folder gets any larger, I'm going to have to re-image this virtual machine.. which I really don't want to do!


When dealing with small projects, what do you feel is the break even point for storing data in simple text files, hash tables, etc., versus using a real database?  For small projects with simple data management requirements, a real database is unnecessary complexity and violates YAGNI.  However, at some point the complexity of a database is obviously worth it.  What are some signs that your problem is too complex for simple ad-hoc techniques and needs a real database?  Note:  To people used to enterprise environments, this will probably sound like a weird question.  However, my problem domain is bioinformatics.  Most of my programming is prototypes, not production code.  I'm primarily a domain expert and secondarily a programmer.  Most of my code is algorithm-centric, not data management-centric.  The purpose of this question is largely for me to figure out how much work I might save in the long run if I learn to use proper databases in my code instead of the more ad-hoc techniques I typically use.


Help needed in finding the value of $f(2001)$ in the given functional equation

Let $f:\mathbb N\to \mathbb N$ be a strictly increasing function such that $f(f(n))= 3n\ \forall\ n\in \mathbb N$ Find the value of $f(2001).$  Now I tried to solve this by myself but I'm stuck somewhere in the middle of my solution. Please help me with my solution. Also my solution is a bit long as I'm writing almost every observation I made, so please be kind enough to bear with me. My Approach: We know that $f$ is strictly increasing. Suppose for some $n_1$ and $n_2$, we have $f(n_1)=f(n_2)$. Thus $f(f(n_1))=f(f(n_2))\Rightarrow 3n_1=3n_2$ hence $n_1=n_2$. (I just realized that his step was actually not required) $\therefore f$ is an injective strictly increasing function. Suppose for some $n\in \mathbb N$, we have $f(n)\leq n$, then $f(f(n))\leq f(n)\leq n$ as $f$ is strictly increasing. This gives us $3n\leq n$ which isn't true for any $n\in \mathbb N$. $\therefore f(n)>n\ \forall\ n\in \mathbb N $ Now suppose $f(1)=l>1$. Thus $f(f(1))=3=f(l)>f(1)=l\Rightarrow 1<l<3$ and since $l\in \mathbb N$, we know that $f(1)=2$. This means that $f(f(1))=f(2)=3$ and $f(f(2))=f(3)=6$ and so on. A few such values are: $f(1)=2$$f(2)=3$$f(3)=6$$f(6)=9$$f(9)=18$$f(18)=27$$f(27)=54$$f(54)=81$ Now here a pattern can be observed. Claim: $f(3^n)=2\cdot3^n$ Proof: Suppose the above claim is true. Then $f(f(3^n))=f(2\cdot3^n)=3^{n+1}$. Now $f(3^{n+1})=f(f(2\cdot3^n))=2\cdot3^n\cdot3=2\cdot3^{n+1}$ $\therefore f(3^n)=2\cdot3^n$ and $f(2\cdot3^n)=3^{n+1}$ One more thing can be observed here that if $3^n<k<2\cdot3^n$, then $2\cdot3^n<f(k)<3^{n+1}$ and since there are exactly $3^n$ permitted values for both $k$ and $f(k)$ and $f$ is strictly increasing, the unique function satisfying the given condition can easily be found. But unfortunately $2\cdot3^6<2001<3^7$, thus a unique function cannot be found using the observation stated above. Now this is where I am stuck. Firstly, is this question solvable using my approach? If yes, the what should I add more to my aproach in order to reach to the solution? Please help. THANKS


Are mixed geometry types allowed in shapefiles?

Does the shapefile support mixed geometry types (ie. point and polygon all in the same file)?


How to SSH an outside server from a computer which is behind a proxy firewall?

I access the Internet through an HTTP proxy firewall at college. And I need to login to a computer, via SSH, which is outside our network. I tried it as Linux command and on Windows using PuTTY. I also configured PuTTY to use our server's address. But still, "Proxy error: 403 forbidden" pops up. They must've blocked SSH access to outside systems. (college systems as accessible).  I can SSH a web server (not the proxy server) at the college, which I use to browse proxy-free by tunneling. Now this server allows to browse restricted sites, but still no SSH.  Any workaround, please?


First order PDE $u_t - u^2u_x = 0$ with piecewise initial conditions

I have an initial value problem:  $$ u_t - u^2u_x = 0 \quad \text{with} \quad u(x,0) = g(x) = \begin{cases}           -\frac{1}{2}, & x\leq 0 \\          1, & 0 < x <1 \\          \frac{1}{2}, & x \geq 1           \end{cases} $$  The characteristic system is  \begin{align*}    \frac{\partial t}{\partial\tau} = 1, \hspace{30pt} \frac{\partial x}{\partial\tau} = -u^2, \hspace{30pt} \frac{\partial u}{\partial\tau} = 0 \end{align*}    with the initial curve given by \begin{align*} t(0) = 0, \hspace{30pt} x(0)=\xi, \hspace{30pt} u(0)=g(\xi) \end{align*} Note here that $u_{\tau}=0$ implies that the solution will be constant along the characteristics, and the characteristics will be straight lines. We have, \begin{align*} t = \tau, \hspace{30pt} u = \xi, \hspace{30pt} x = \xi-g(\xi)^2\tau \end{align*} Now, \begin{align*} x = \begin{cases}  \xi - \frac{\tau}{4}, & \xi\leq 0 \\ \xi - \tau, & 0 < \xi <1 \\ \xi - \frac{\tau}{4}, & \xi \geq 1  \end{cases} \end{align*} Therefore the base characteristics are, \begin{align*} x &= \xi_0-\frac{\tau}{4} \hspace{10pt} \text{for } \xi_0 \leq 0 \\ x &= \xi_0-\tau \hspace{10pt} \text{for } 0\leq\xi_0 \geq 1 \\ x &= \xi_0-\frac{\tau}{4} \hspace{10pt} \text{for } \xi_0 \geq 1  \end{align*}  I can plot the base characteristics no problem, and I know that there are missing characteristics. My problem is finding them. I get, $$ u(x,t) = g(\xi) = \begin{cases}           -\frac{1}{2}, & x\leq -\frac{t}{4} \\          1, & -t < x <1-t \\          \frac{1}{2}, & x \geq 1-\frac{t}{4}           \end{cases} $$  First of all, I can get my missing characteristics for $1-t<x<1-\frac{t}{4}$. Also my cases overlap, so I know $u(x,t)$ will be multivalued, but finding these missing characteristics is proving trouble some. Any ideas would be appreciated.


Can we give a definition of $\int_{-\infty}^{\infty} xdx$,or why this integral is divergent?

I know that $\int_{-\infty}^{\infty} x dx= \int_{-\infty}^{0} xdx + \int_{0}^{\infty} xdx$ and both of these integrals is divergent, so the previous integral is divergent too, but I think it is easy to see that $\int_{-\infty}^{\infty} xdx=0$, what is wrong what is wrong with my intuition?


Understanding find(1)'s -exec option (curly braces & plus sign)

Using the following command, could someone please explain what exactly is the purpose for the ending curly braces ({}) and plus sign (+)?  And how would the command operate differently if they were excluded from the command?  find . -type d -exec chmod 775 {} +


How do I invite people to like my company's page?

One of my friends on Facebook did a mass invite that I am interested doing myself. I got a message in my notification section which linked his page. I could click on that link and directly "like" the page. The text in my notification's list read, "[Name of friend] has invited you to like his new page [name of page with a link]."  I would like to do this for my own business's page. I have hit "Share" which makes the site show up on my profile, but people are liking my share, which doesn't give me the result I want. I would like people to be invited to like my site directly so they can get status updates and see our pictures and promotions. I'm fairly certain that these friends are interested in such a thing, they just aren't Facebook savvy enough to know how to do that. I'm hoping the notification to directly like the page will help them understand and streamline the process so the friends who want to connect with my business can "like" the site and I can leave my other friends alone.


I'm a sophomore and I'm taking my introductory real analysis course this summer.  What I'm not sure about is the proper textbook to use in order to learn it properly, at MIT they jump to Rudin at once, they don't bother studying any lowered down books before it so I know that I do not have to study mathematical analysis from lowered down books before I jump to the real deal.  Courses I have taken so far:    Calculus (although I'm bad at the multivariable calculus I still can revise anything I need whenever needed). Elementary Set Theory Abstract Algebra (Group Theory)   and I'm taking topology this semester as well. I know nothing of linear algebra though but I do not think its really necessary. So what do you think is the proper textbook to use?   Is it Rudin/Pugh/Apostol or Do I have to learn from books like Abbott/Kenneth Ross/Bartle first? I have already studied few sections from Bartle regarding Continuity and Differentiation and I find the exposure to the material quite weak, doesn't matter if I do all the problems I still do not taste the beauty of analysis from this *hit textbook because all I can find in it is just a bunch of definitions with no explanation on why are they there or what is the point of having them and the problems are just direct random applications so if I do them I still feel like I learned absolutely purely nothing new just calculus written in a different way really.


What is the difference between Network Manager and 'ifconfig' 'ifup', etc?

Ubuntu seems to provide at least two network "toolsets" (for lack of a better term). I'm running into conflicts between these two.    Something which is more like the  (e.g. ifconfig, 'ifup',    I am often running into conflicts between these different sets of tools. For example, I'm running Ubuntu Desktop at home and I'm using software like KVM/libvirt which recommends that I , but disabling Network Manager causes other things to break.  What is the difference between Network Manager and the traditional network tools? Can these two suites run side-by-side or must I stick with one or the other? Is there a document which summarizes the difference between these different tools? I have been unable to find one.  (Forgive the vagueness of this question. I've searched and searched for an answer, but I have only found many vague answers which don't seem relevant to Ubuntu 10.04/Lucid, and I may not fully understand the purpose of NetworkManager. However, this seems to be a frequently asked question. If you have advice for clarifying this question, please post a comment.)


Let me ask something about separable polynomials. I found the following definitions:   A polynomial over $F$ is called separable if it has no multiple roots  (i.e. all its roots are distinct). (Dummit & Foote) A polynomial over $F$ is called separable if every irreducible factor has not multiple roots (the irreducible factors may not be distinct. (Rotman)   My question is: Are these two definitions equivalent? Let me give an example which looks strange:  Lets take the polynomial $f(x)= (x^2-2)^n \in \Bbb{Q}[x]$, with $n\in \Bbb{N}^{\geq 2}$. Then, according to def. 1 $$f(x)=(x-\sqrt2)^n(x+\sqrt2)^n $$ so the roots are multiple, so it is not separable over $\Bbb{Q}$. But, according to def. 2 $$f(x)= \underbrace{(x-\sqrt2)(x+\sqrt2)\cdots (x-\sqrt2)(x+\sqrt2)\,}_\text{$n$ times} $$ so no one of the irreducible factors has root with multiplicity $=1$. So, it is separable over $\Bbb{Q}$.  How can this happen? Do I misunderstand something?


How successful would one be in switching fields from PhD in computational biology/neuroscience to postdoc in computer science?

How successful would someone be who completed his PhD in something such as computational biology or neuroscience but wanted to pursue post-doctoral training and beyond in computer science?   I say computer science because, presumably, dissertation work in computational X involves programming and a working knowledge of data structures and algorithms.


Prove that a continuous function has a minimum value if $\lim\limits_{x\to +\infty} f(x) = \lim\limits_{x\to -\infty} f(x) = +\infty$.

Let $f\colon \mathbb R \to \mathbb R$ be a continuous function such that $\lim\limits_{x\to +\infty} f(x) = \lim\limits_{x\to -\infty} f(x) = +\infty$.  Prove that there exists $x_0$ in $\mathbb R$ such that $f(x_0) \le f(x)$, $\forall x \in \mathbb R$.


Is there a way to start with a higher counter within the tasks package.  I tried counter-format = (tsk[c]) but that did not work.


Updating JavaScript object-attributes from another object

I want to update an object that could look like this:  currentObject = {     someValue : "value",     myObject : {         attribute1 : "foo",         attribute2 : "bar"     } };   .. with an object that contains some changes i.e.:  updateObject = {     myObject : {         attribute2 : "hello world"     } };   At the end I would like to have currentObject updated so that:  currentObject.myObject.attribute2 == "hello world"   That should be posible for other objects as well.. As a solution I thought about iterating over the object and somehow take care of the namespace. But I wonder if there is an easy solution for that problem by using a library like jQuery or prototype.


I'm new to linux and the terminal. As I learn how to use the terminal to navigate through directories, I like to use the gui file explorer to mirror my terminal navigation. The icons and file extension info in the gui file explorer help me figure out what everything is. However, I can't access the root folder via the gui, I can only access it via the terminal. Is there a way to enable access to the root folder outside of the terminal?


SQL server license has expired and I am not able to log into the server now

I need to take backup but I am not able to login due to expired license


Can the new "Following" feature be expanded to show up on the Activity page?

I really like the new "Following" feature! In addition, it would be helpful to see a list of those questions being followed for easy reference, should I come across answers when studying.  On the Activity page, there is a line that includes:  Summary  Answers  Questions  Tags  Badges  Favorites  Following   Would it be possible for "Following" to be added to this line showing posts followed? I realize, now, that I could have clicked "Favorite" also when choosing to "Follow", but it's too late for the several already selected.


Is it possible to only increment a Lead field only in specific instances?

Currently we have 2 custom fields on Lead. Lead Number, which is just an auto incrementing number. And then a Round Robin ID which is an equation.   MOD(VALUE({!Lead_Number__c}) ,3) +1   We use this Round Robin ID to assign the lead to a specific salesperson with our Lead Assignment rules.   Only problem is we have one lead source that is the best and hottest leads. The sales guys want those leads to be assigned Round Robin independant of the other leads.   And that is the problem. Their turn in the Round Robin is being used up on an ok lead. So what is currently happening:   Best Lead Source - assigned to Salesguy 1 Ok Lead Source   - assigned to Salesguy 2 Ok Lead Source   - assigned to Salesguy 3 Best Lead Source - assigned to Salesguy 1   But we want this to happen:  Best Lead Source - assigned to Salesguy 1 Ok Lead Source   - assigned to Salesguy X (doesn't matter) Ok Lead Source   - assigned to Salesguy X (doesn't matter) Best Lead Source - assigned to Salesguy 2   Is it possible to make another auto-incrementing field that only increments when the Lead Source is set to something specific?   Or is there a way to setup a workflow to increment a field when another field is set?   I found this  at asks for something similar but it doesn't even need to be auto-incrementing. Just need it to count up only a certain type of lead.


A book using advanced science to act as magic

I'm trying to identify a book I read a long time ago.  The premise was that far in the future humans had technology that could accomplish just about anything (teleportation, body manipulation creating elves and dwarves, force fields, etc),  but due to their extremely long lives, the population had decreased to where there's just a few thousand people left.  Then, there is a war in the ruling council that basically ties up all the energy people were using to run their technology causing the world to drop back to a roughly medieval level.  There's also a world wide "Mother" AI that prevents any explosive energy from being used, so the best you might get is steam powered engines.  I do remember it being the first book in a series.


CPanel: how to whitelist the access of the website?

I have to fix a website overloaded. The website doesn't load most times with a 503 error. I want to temporally stop it to everybody but me, so I want to deny all the IPs but mine.  The server has several WordPress sites within the same hosting and domain. I have found the possibily of deny the access of the IPs I want (black listing). Unfortunatelly, I have not find how to white list the access to it. Is it possible?


How to install JDK8 on Ubuntu 18.04 64Bit

i have the package jdk-8u171-linux-x64.tar.gz  on my pc how to install it on Ubuntu 18.04 LTS


How to connect a GUI button to function?

I am developing a new Roblox game where you can setup and control you're own virtual machine using SurfaceGUIs on a modeled screen. I am trying to make a confirmation GUI where if you click YES, then it starts the VM, and if you click NO, then it closes the GUI and doesn't start a VM. But when I click on NO, nothing happens! Here is my code: local gui = script.Parent.Parent local button = script.Parent  local function cancel()     gui.Visible = false end  button.Activated:Connect(cancel())  Please help! P.S: The confirmation frame is in the ScreenGUI, the button is in the frame, and the LocalScript is in the button.


Windows desktop background: how to have system info displayed

Some Windows machines can be configured with a desktop background that will query the local system for its hardware configuration, OS, configuration, statistics, etc.    What program do you need to install to acquire this type of desktop background?


Cannot open table mysql/innodb_index_stats

After a fresh install of XAMPP and import from my linux live db that is working to the windows Dev-stage, I started encountering problems with INSERT. Everything else seems to work well.  The errors I get in the mysql_error.log are:  2013-08-15 12:44:49 16c0 InnoDB: Error: Table "mysql"."innodb_table_stats" not found. 2013-08-15 12:44:49 16c0 InnoDB: Recalculation of persistent statistics requested for table "sizaradb"."pages" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead. 2013-08-15 12:44:59 16c0 InnoDB: Error: Table "mysql"."innodb_table_stats" not found. 2013-08-15 12:44:59 16c0 InnoDB: Recalculation of persistent statistics requested for table "sizaradb"."translations" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.   I cannot open table mysql/innodb_index_stats from the internal data dictionary of InnoDB though the .frm file for the table exists  I tried to fix it by googling the errors and trying to see fixes of other people, but it is still not working. I have been working on this for 2 days now.  Please help me solve it.


How to prevent pgfplots from using the 10^n notation for axis ticks

When creating a plot like this one  \documentclass{article}  \usepackage{pgfplots}  \begin{document} \begin{tikzpicture}          \begin{axis}                  \addplot coordinates {                 (0.01,0.01)                 (0.09,0.09)                 };         \end{axis} \end{tikzpicture} \end{document}   pgfplot uses the following xticklabels:    Is there any way to make pgfplots create labels as 0.01,0.02,... without specifying them all manually using xticklabels and yticklabels?


Let $x,y,z\ge 0$, show that $$\dfrac{y}{xy+2y+1}+\dfrac{z}{yz+2z+1}+\dfrac{x}{zx+2x+1}\le\dfrac{3}{4}$$  I had solve $$\sum_{cyc}\dfrac{y}{xy+y+1}\le 1$$ becasuse After some simple computations, it is equivalent to  $$(1-xyz)^2\ge 0$$


How to search for a string from all pdf files in a folder?

I am looking for GUI tools to search for a string from pdf file contents in a given folder, like what we get in Windows Explorer. Nautilus does not have that function.


Can you go back from 18.10 to 18.04 LTS?

Must I reload to go to 18.04 from 18.10 or is it more or less the same?


At high school we were told that a function has a domain and a range, the function maps from the domain to the range. Such that the domain contains all and only the possible inputs and the range contains all and only the possible outputs.  Now at University I'm told a function has a domain and a codomain, and that the codomain contains all the possible outputs but may also include other numbers. What is the point of having values in the codomain that can not be output by the function, how does that aid in describing the function? Does this also mean that the domain can include numbers that the are not inputs to the function?  Surely this means you could say the codomain of any function (that outputs numbers) is the complex set (so all numbers)?   EDIT:  the function $f : x \rightarrow x^2$ has codomain $\mathbb{R}$ but it's image (what I guess I knew as range in high school) is $\mathbb{R}^+_0$, so why not just say the codomain is $\mathbb{R}^+_0$.  EDIT2: And is it also then true that is a function is "onto" the codomain is the same as the image? So surely any function can be "onto" if you just change the what the codomain is?  What I'm really trying to ask I guess is the range/image of a function is defined by the function, what defines the codomain?


Thor's hammer left in a elevator...could I move it?

If Thor left his hammer on the floor of an elevator and then he stepped off the elevator, would I then be able to send the elevator to different floors?  Thereby moving the hammer in a vertical direction?


Index of specially defined subgroup in $SL_2\left(\Bbb{Z}\right)$

Let $SL_2\left(\Bbb{Z}\right)$ denote the group (under usual matrix multiplication) of $2\times 2$ matrices with integer entries and determinant $1$.Let $H$ be the subgroup of $SL_2\left(\Bbb{Z}\right)$ consisting of those matrices such that: $\bullet$ the diagonal entries are all equivalent to $1$ mod $3$. $\bullet$ the off diagonal entries are all divisible by $3$. What is the index of $H$ in $SL_2\left(\Bbb{Z}\right)$? $\bf{Try}:$ The elements of $H$ look like $\begin{pmatrix} a & b \\ c  & d\end{pmatrix}$ where $b$ and $c$ are entries form $\Bbb{Z} $ mod $3$.And a$a$ and $d$ are equivalent to $1$ mod $3$.Hence $b$ has $3$ choices and $c$ has $3$ choices. So there are $9$ closets. They look like $\begin{pmatrix} 1 & {0/1/2}\\ {0/1/2} & 1 \end{pmatrix} +H$ Am I correct? If not please show me the way. Thanks in advance.


What is the potential energy of the spring?  On the left side there is a gravitational force $mg$ acts on the spring, same on for the right side. So, If force $mg$ streches the spring $x$ units then $2mg$ will strech the spring $2x$. Therefore,  $$F=kx$$  $$2mg=kx$$  $$\frac{2mg}{k}=x$$  $$U=\frac{1}{2}k{x}^{2}=\frac{1}{2}k(\frac{2mg}{k})^{2}$$  $$U=\frac{2{m}^{2}{g}^{2}}{k}$$  Is my interpretation correct?


Why are these two random variables identically distributed?

Let $(X_1, X_2, \ldots, X_i, \ldots, X_k)$ be $k$ independent, normally distributed random variables with means $\mu_i$ and variances $1$. Then the random variable $$ \sum_{i=1}^k X_i^2$$ is distributed according to the noncentral chi-squared distribution with  parameters: $k$   and $ \lambda=\sum_{i=1}^k \mu_i^2$.  If $(X_1', X_2', \ldots, X_i', \ldots, X_k')$ are also independent normal distributed with variances $1$, and means $\mu'_i$'s s.t. $\sum_{i=1}^k \mu_i'^2 = \lambda$, why are $$ \sum_{i=1}^k X_i'^2$$ and $$ \sum_{i=1}^k X_i^2$$ identically distributed? Thanks.


Is it possible to ungroup an imported Wavefront(.obj) object? I have created the object in EasyToy and would like to finish it with Blender due to it's better functionality.  The object looks like this:     But I can't select just for example an ear or eyeball. So my question is: is it possible to do this or do I have to select the single parts by selecting faces, edges etc.?


C++ Returning and Inserting a 2D array object

I am trying to return an array Data Member from one smaller 2D Array Object, and trying to insert the array into a larger 2D array object. But when attempting this, I came into two problems.  First problem is that I want to return the name of the 2D array, but I do not know how to properly syntax to return 2D Array name.  This is what my 2D Array data member looks like   private: int pieceArray[4][4]; // 2D Smaller Array   and I want to return this array into a function, but this one causes a compiler error:   int Piece::returnPiece() {     return pieceArray; //not vaild     // return the 2D array name }   I tired using this return type and it worked:   int Piece::returnPiece() {     return pieceArray[4][4]; }   But I am unsure if this is what I want, as I want to return the array and all of it's content.  The other problem is the InsertArray() function, where I would put the returnPiece() function in the InsertArray()'s argument.  The problem with the InsertArray() is the argument, heres the code for it:   void Grid::InsertArray( int arr[4][4] ) //Compiler accepts, but does not work {     for(int i = 0; i &lt x_ROWS ; ++i)     {          for (int j = 0; j &lt y_COLUMNS ; ++j)          {              squares[i][j] = arr[i][j];          }     } }   The problem with this is that it does not accept my returnPiece(), and if i remove the "[4][4]", my compiler does not accept.  Mostly all these are syntax errors, but how do I solve these problems?   Returning the whole pieceArray in returnPiece() The correct syntax for the argument in InsertArray() The argument of InsertArray() accepting the returnPiece()   These 3 are the major problems that I need help with, and had the same problem when I attempt to use the pointer pointer method. Does anyone know how to solve these 3 problems?


When will L1 regularization work better than L2 and vice versa?

Note: I know that L1 has feature selection property. I am trying to understand  which one to choose when feature selection is completely irrelevant.   How to decide which regularization (L1 or L2) to use? What are the pros & cons of each of L1 / L2 regularization? Is it recommended to 1st do feature selection using L1 & then apply L2 on these selected variables?


How to set visudo to use a different editor than the default on Fedora?

Fedora 14 uses vi by default when one runs visudo. Is there a way to change this to something else?


How to use String and if statement correctly?

I'm new to Java and i decided to experiment, however I'm having hard time trying to understand what is the problem. What my program is supposed to do is to receive login and login2, password and password2, and if they match then program says "You may enter", if not then program says "You may not enter", however, it says it even when login and login2, password and password2 are the same. Any ideas what to do?  public static void main(String args[]) {     Scanner input = new Scanner (System.in);     System.out.println("In order to register type your login");     String login = input.nextLine();     System.out.println("And password");     String password = input.nextLine();      System.out.println("Enter Login");     String login2 = input.nextLine();     System.out.println("Enter password");     String password2 = input.nextLine();       if (login == login2 && password == password2){         System.out.println("You may enter");     }     else{         System.out.println("You may not enter");     } }


Integration of $\int_{0}^{1} \frac{x^k}{1-x} dx$

Solving this using integration by parts and by letting $u = x^k$ and $dv = (1-x)^{-1}$, it follows: $$\int_{0}^{1}\frac{x^k}{1-x} dx = -x^{k}\ln(1-x) + k\int_{0}^{1} \ln(1-x)x^{k-1} dx$$ It is known that $$\ln(1-x) = (1-x) - (1-x)\ln(1-x)$$ But doesn't this make the integration more complicated. Can I obtain a recursive formula for such an integration?


(Riddle) Captain Kirk versus the Monster

So there is a question which was aked to me a long while ago (and I don't remember what was the answer) so here goes:  Captain Kirk is on a remote planet again and there is a monster trying to eat him. Fortunately, captain Kirk has a super-shielding device with him. The device casts a perfectly circular 10 meter around it. Captain Kirk uses it to protect himself from the monster. The problem is that while he is inside the protective range of the device, captain Kirk cannot be beamed away. As soon as he leaves the shield, he can (instantly) be beamed away.  What is the highest ratio $\dfrac{\text{speed of the monster}}{\text{speed of Kirk}}$ so that Kirk still has a chance to escape?  So in math terms:   the prey is inside a circle of radius $r$ (the actual value does not matter, so say it's 1). the predator is outside the circle and cannot enter. if the predator is at the point of exit of the prey, then the predator wins. otherwise, the prey wins. The answer should hold independently of the starting positions. (In other words, assume a worst-case scenario for the prey).   The answer is not $\pi$!  A first thought of many (including me) is to say the answer is $\pi$. This turns out to be wrong.  First, one can assume that the prey begins at the center of the circle and the monster on the boundary. This case encompasses the worst-case scenario: if the prey is not in the center, then it can go to the center; if the predator is not on the boundary of the circle, then it's only better for it to be on the boundary.  Next, consider the following strategy. The prey start to run for the point on  the boundary opposite to the predator. The predator will then start to run along the circle either in clockwise or counterclockwise manner. Once the prey is at the middle of this radius, it makes an angle (about 37°) to go a point which is further away form the predator. Note that the angle is too small (so it's not worth for the predator to start to run in the opposite direction). Both the predator and the prey have now a longer way to go, but the predator more so. With the given data, the predator would need a speed of at least 3.3.  Even better  Here is a better strategy. Decompose the motion of the prey as radial and angular. Note that when the prey is closer to the center a small speed is sufficient to get a large angular speed.   Assume for simplicity that the speed of the prey is $1$ and that of the predator $v$. Then the prey can run to some point on the border (and the predator will start to run around the circle). As long as the prey is inside a smaller circle of $\tfrac{1}{v}$ the radius, it may have a higher angular speed than the predator. This means it can use parts of its speed to move radially until it gets as close as possible to this radius all the while haveing the predator on the opposite side of the circle.   After a very long time, being as close as desired to the circle of radius $\tfrac{1}{v}$ the prey can try to dash for the point opposite the predator.  This means that the prey has $1-\tfrac{1}{v}$ time units to the boundary while the predator would need $\tfrac{\pi}{v}$. This shows that as long as $v < \pi +1$ the prey can win.  Now obviously, you can still improve upon that later strategy (for example, by using the former strategy at some point). But in the end, I still don't know what is the actual supremum of the speed ratios.


Setup a cronjob for PHP script in ubuntu & PHP

I want to setup a cronjob for PHP script in ubuntu  I have a script just I want to know how to set it.  * 3 * * * /var/www/html/booking_cron.php


How to toggle Scroll Lock in Excel 2010 without a Scroll Lock key in the keyboard

I have a notebook with no Scroll Lock key (or any shortcut using the 'Fn' key).  Somehow Excel 2010 got the Scroll Lock on. I see it left down in the status bar and now I can't navigate through cells using the arrow keys, which is pretty annoying. It wasn't turned on some hours ago, so I think I must have hit some Scroll Lock toggle shortcut in Excel 2010 by mistake.  Anyone knows what hot to turn off Scroll Lock in Excel (shortcut or menu option)?


Countable ordinals are embeddable in the rationals $\Bbb Q$ -- proofs and their use of AC

Yesterday, Asaf Karagila's  sparked an extensive discussion on ways of proving that all countable ordinals are embeddable in $\Bbb Q$, and whether particular solutions to this use the Axiom of Choice.  Since the arguments used to prove this can be shady on their use of Choice when formulated tersely, fully fleshed out answers are appreciated.  To be concrete, this question asks for proofs of the following fact:     All countable ordinals $\alpha < \omega_1$ are order-embeddable in the rationals $\Bbb Q$.   Especially answers avoiding the Axiom of Choice are appreciated.    Of relevance and related interest is  (but it's not a duplicate, since that question asks for explicit embeddings).


Installed  by using install script and something crashed. Now I'm only member of my own group and lp.  Which are the default groups for users in for example Ubuntu 12.10? ?  Out of curiosity, is there some place where this information is logged? For example, some log file showing which groups my user was on previous boot? Is this information, (which groups are default), documented somewhere?


Proving the sum of the first $n$ natural numbers by induction

I am currently studying proving by induction but I am faced with a problem.  I need to solve by induction the following question.  $$1+2+3+\ldots+n=\frac{1}{2}n(n+1)$$      for all $n > 1$.  Any help on how to solve this would be appreciated.    This is what I have done so far.  Show truth for $N = 1$   Left Hand Side = 1  Right Hand Side = $\frac{1}{2} (1) (1+1) = 1$  Suppose truth for $N = k$  $$1 + 2 + 3 + ... + k = \frac{1}{2} k(k+1)$$  Proof that the equation is true for $N = k + 1$  $$1 + 2 + 3 + ... + k + (k + 1)$$  Which is Equal To  $$\frac{1}{2} k (k + 1) + (k + 1)$$  This is where I'm stuck, I don't know what else to do. The answer should be:  $$\frac{1}{2} (k+1) (k+1+1)$$  Which is equal to:  $$\frac{1}{2} (k+1) (k+2)$$  Right?  By the way sorry about the formatting, I'm still new.


I have a huge list of layers in a project that are named in a foreign language. I want to translate and add the English title to the name.  When I right click on a layer and choose Properties -> General and change the layer name, it is visualized in the layer tree but the original file stays the same.  Is there a way to change the name of the original file from QGIS?   There are so many that searching them all in my folders would take too long.


I have defined a new counter that keeps increasing each time I call the macro that's using it. How can I print the counter value minus one? Something like \value{\theCounter-1} but formatted for text?  MWE  \documentclass{article} \usepackage{parskip} \newcounter{myCount} \setcounter{myCount}{1} \newcommand\newSec[1]{\par\underline{\textsc{newSec}~\themyCount}\hspace{0.5em}{\footnotesize(#1~number)}\stepcounter{myCount}\par}  \begin{document}     \newSec{2}     Some text      \newSec{5}     Here I refer to the counter used before it was incremented: \themyCount. Should print 2.  \end{document}


Adding 24, 48, 72 hr highlights to cell for tracking purposes

I am trying to add conditional formatting that turns yellow after 48 hours from the date in the cell, turns orange after 72 hours from the date in the cell, and red after 96 hours after the date in the cell.


I am still figuring out the basics here... I can't figure out how to have my leaves come out from a vertex of my branch.  My leaf image is always centered to the branch, instead of the end of the leaf naturally coming out from the branch.  What am I missing here?  Thanks!  Blend file:


How do I enable Remote Desktop connection on Xubuntu 11.10? I do not find any options such as those present in Ubuntu?


Difference between "in contrast to" and "in contrast with"

I am just wondering about the difference between:     in contrast to   and      in contrast with


Asymptotic expansion of the complete elliptic integral of the first kind

The complete elliptic integral of the first kind is defined as $$K(k) = \int_0^{\pi/2} \frac{d x}{\sqrt{1 - k^2 \sin^2 x}}.$$ I would like to derive (at least the first term of) the asymptotic expansion for $k = 1 -\epsilon$. This is certainly not trivial due to lack of uniform convergence which implies that I can't use the Taylor expansion of the integrand. What is the best way to proceed?


Flame shape and size (length) depending on gravity

How would the shape and size of a flame, e.g. from a simple candle depend on gravity? Suppose all the relevant information is known, including candle dimensions and chemical composition, atmosphere properties (chemical composition, pressure etc.), and anything else.


Why is my code not able to search for files with class loaders?

I came across the code given below which reads text from a file & converts it to a string. I have never used this approach for reading files. Is it advisable to read a file like this ? Can someone please help me to understand how to debug this ?  package com.temp;  import java.io.File; import java.io.IOException;  import org.apache.commons.io.FileUtils;  public class Junk {      public static void main(String [] args) {         String filePath = "sample1.txt";         try {             fileToString(filePath);         } catch (IOException e) {             e.printStackTrace();         }     }      public static String fileToString(String filePath) throws IOException {          String actualFilepath = Thread.currentThread().                 getContextClassLoader().                 getResource(filePath).                 getPath();         File file = new File(actualFilepath);         String fileContents = FileUtils.readFileToString(file);          return fileContents;     }  }   I get the following exception: It looks like the parent class loader for "Launcher$AppClassLoader" is null & might be causing the issue. How do I solve this problem ?  Exception in thread "main" java.lang.NullPointerException     at com.temp.Junk.fileToString(Junk.java:24)     at com.temp.Junk.main(Junk.java:13)   This is my maven project structure:


What tags exist by default on child metas?

Some tags are automatically created when a new child meta is spawned, including mod-only tags like  and mandatory tags like , as well as some ordinary tags like , , and .   Using  as an example: if you look at the  tag there, you can see that it exists even though there are no questions there, since it asks you if you would like to create a tag wiki for it. On the other hand, the hypothetical  tag does not exist at all, and hence does not ask you about creating a tag wiki.   I would like to know which tags, like , exist by default in the system. It would be particularly nice if this information was available in SEDE or the API, but if not, an answer here would work, too. Knowing this would help me know which tags on meta sites need to have tag wikis added to protect them from the script that deletes single-use tags after 6 months.   I could, I suppose, glean this information by inspecting the tag list on 's meta right after it launches, but I think it would be good to have this information on Meta.   EDIT: The  is no longer accurate. At minimum, it claims that delete is a tag that should be present on all child metas; however, as you can see at Meta.Japanese, .


How to solve the integral of a rational function

I would like to solve the following integral: $$\int\frac{1}{x^3-1}dx$$ I apply the rule to integrate a rational fanction and I decompose the integrand as follows: $$\frac{1}{x^3-1}dx=\frac{1}{3}\Big(\int\frac{1}{x-1}dx+\int\frac{x-2}{x^2+x+1}dx\Big)$$. I know that $$\int\frac{1}{x-1}=\log |x-1|+C$$ but I dont know how to solve $$\int\frac{x-2}{x^2+x+1}dx$$. Could someone help me? Thank you.


I have some special delimiters that I want to add to a glossary, those get hyperlinks and colors etc. However when i want to use those delimiters, using \left, \right and \middle becomes impossible. I think with the following question fixed I can create my hyperlinked delimiters:  How to color delimiters:  As a minimal working example I have:  $\left\textcolor{red}{(}a\right)$   What i would like to have is (Created without \left \right):    This gets the error: ! Missing delimiter (. inserted).    Trying this :   $\textcolor{red}{\left(}a\right)$   results in ! Extra }, or forgotten \right.  Who can help me?


I am centering inner div insTabsContainer using margin: 0 auto but it's not getting center. Will you guys tell me what's I did wrong here.  HTML    .insTabsContainer {   margin: 0 auto; }  .insTabs {   position: relative;   float: left;   width: 32%;   height: 25px;   background-color: #E5E7E9;   text-align: center;   line-height: 20px;   text-transform: uppercase;    font-size: 13px;   color: #2C3E50;   border-radius: 6px;   margin-right: 5px;   cursor: pointer; }

Text

Text

Text


Trying to setup environment for android ROM development, but the libgl1-mesa-glx:i386 package is not installing. Getting error:   Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.  The following information may help to resolve the situation:  The following packages have unmet dependencies: libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed                Depends: libcogl15 (>= 1.15.8) but it is not going to be installed libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed           Depends: gstreamer1.0-clutter but it is not going to be installed libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed                 Depends: libcogl15 (>= 1.15.8) but it is not going to be installed libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-0ubuntu0.4)                     Recommends: libgl1-mesa-dri:i386 (>= 7.2) E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   I'm on Ubuntu 14.04.2. Need help...      Update: Meanwhile I installed libglapi-mesa-lts-saucy:i386    Is it fine now?


What is the difference between static and class methods in Python?

I definitely understand the difference between instance methods and class/static methods in Python. Sometimes you don't want an actual instance of an object to perform some operations. Maybe it's getting certain information that's stored across all instances. However, I can not for the life of me understand the difference between class and static methods.  I understand that class methods take a class argument (usually cls) and that refers to the current class. Then static methods don't need to take any arguments. However, the only main difference I've seen online is that class methods have access to read/change "class states". I cannot find a good explanation on what a "class state" is.  Here is some code I ran with the output below.  class Person:     SPECIES = "homo sapien"      def __init__(self, name, age):         self.name = name         self.age = age      def __str__(self):         return f"{self.name} is {self.age} years old"      def get_species(self):         print(f"species: {Person.SPECIES}")      def change_species_instance_method(self):         Person.SPECIES="homo sapien (instance)"      @classmethod     def change_species_class_method(cls):         cls.SPECIES="homo sapien (class)"      @staticmethod     def change_species_static_method():         Person.SPECIES="homo sapien (static)"  me = Person("Kevin", 20) sam = Person("Sam", 20)  me.get_species() sam.get_species()  me.change_species_instance_method() print()  me.get_species() sam.get_species()  me.change_species_class_method() print()  me.get_species() sam.get_species()  me.change_species_static_method() print()  me.get_species() sam.get_species()   OUTPUT  species: homo sapien species: homo sapien  species: homo sapien (instance) species: homo sapien (instance)  species: homo sapien (class) species: homo sapien (class)  species: homo sapien (static) species: homo sapien (static)   So, if both class and static methods can modify class variables (SPECIES in this case), then what is the difference between them, apart from the definition of class methods requiring cls? Thank you!  Also, another difference people have said is that class methods are used to create new instances of the class, but I've been able to do that with static too. So for something in the relative complexity of the code I'm writing (i.e. so no class inheritance) is there any functional difference between static and class methods?


I have seen the following questions: ,  or  In all of them, the plural of in the extended form goes in the end:  One compact disk, two compact disks One automated teller machines, two automated teller machines  My question is, what about acronyms (or initialisms...) such as  One rotation per hour: 1 RPH Two rotations per hour: 2 ???  (Note that RPH is a home-made acronym.) Obviously RsPH is not an appropriate choice, but RPHs seems a bit strange (I would be fine for rotation per hours, but maybe not for rotations per hour). Any piece of advice?


Through browsing questions asked in the past about Godel's completeness and imcompleteness theorems, I've come to see that the sense of completeness in both of the theorems are different. However, I can't see how they are different!   Does this distinction boil down to that of truth and proof? Is it the case that the completeness theorem talks about the relationship between truth and proof, while the incompleteness theorems only relate to provability?  Could someone please elaborate on the sense in which both notions of completeness are different?


Switch Debounce Topology for Rotary Encoder

I'm looking to debounce the output of a rotary encoder I'm using as a switch to ground with a pull-up. Looking online I saw the debouncing circuit in Figure 2 and read about it . However, I also saw the first image below and read about it . Is one better than the other for my application? According to the datasheet, the GPIO of the imx6sl I'm using has a Schmitt trigger and input hysteresis, so I'm assuming having a capacitor connected to it is okay.  Figure 1


How about a "Vote not to close" option to counter the "Vote to close"?

My request is simple: Many times, there will be a question where some people feel like it should be closed. At the same time, I'll feel like it's a perfectly legit question, and it should therefore NOT be closed. Right now, I have to wait till it gets enough close votes (which it always does for some reason, as soon as 1 or 2 people vote to close, e/o else decides to vote as well) and then vote to re-open. How about, as soon as there's one vote to close, there should be an option to counter the close vote, something like "vote not to close" or whatever. This would then bring the "Vote to close" number down by one. Only when the vote to close outnumbers the vote not to close by 5, that's when a question is indeed closed. Any thoughts?


How to delete whole object by knowing only its base-pointer

I'm trying to implement autorelease pool in c++, and have trouble with deallocating. So we have root-class object:  class object {  public:     object() {         retainCount_ = 0;     }     ~object() {         std::cout << "object " << Description() << " is dealocated" << std::endl;     }     /* code with retain/release here */     int retainCount() {         return retainCount_;     }     std::string Description() {         std::stringstream ss;         ss << this;         return ss.str();     }  private:     int retainCount_; };   And some realization:  class Integer : public object {  public:     int i;     Integer(int ii) : i(ii) {}     ~Integer() {         std::cout << "Integer " << Description() << " is dealocated" << std::endl;     } };   And of course release pool class, which works with root-class pointers:  class release_pool {  public:     void insert(object* obj) {         pointers_.insert(obj);     }     void flush() {         std::set<object*>::iterator it = pointers_.begin();         std::set<object*>::iterator tmp;         const int N = pointers_.size();         for (int i = 0; i < N; i++) {             tmp = it;             it++;             if ((*tmp)->retainCount() == 0 ) {                 object* obj = *tmp;                 std::cout << "delete obj: " << obj->Description() << std::endl;                 pointers_.erase(tmp);                 delete obj;             }         }     }  private:     std::set<object*> pointers_; };   main.cpp code for test:  int main () {     release_pool pool;      Integer* obj = new Integer(5);     pool.insert(obj);     std::cout << "before flush: " << obj->i << "\n";      pool.flush();      std::cout << "after flush: " << obj->i << "\n";         return 0; }   After build, I get next:  before flush: 5 delete obj: 0x7f9a84c025d0 object 0x7f9a84c025d0 is dealocated after flush: 5   At the end: destructor of root-class is invoked, but of Integer not. Hence, we have leaked memory, which is allocated for Integer object. Have you any ideas to fix it? How i can delete whole object, not root-part of it.


How come everyone easily takes or say the name of "Voldemort" without any fear in Scorpius's world?

In Harry Potter and The Cursed Child, everyone is using "Voldemort"'s name freely in present day as he is dead and there is no fear of his available death eaters either.   However when Albus and Scorpius try to humiliate Cedric Diggory in Second task of Tri-wizard tournament and while coming back to the present only Scorpius makes it to the present. Here it is complete Voldemort's rule. Voldemort is alive and so is his fear.   But still how come everyone easily takes or say the name of "Voldemort" without any fear? Like "Voldemort and Valour"? Has Voldemort allowed everyone to take his name?


What is the PDF of the product of two exponentially distributed iid random variables?

The commom probability density of the $X$ and $Y$ RVs are as follow: $$f_X(x)=  \begin{cases}     e^{-x}& \text{if } x> 0\\     0,              & \text{otherwise} \end{cases}$$ The question is to estimate the PDF of $XY$. My attempt: $$Z = XY$$ $$f_Z(z) = \int_{-\infty}^{\infty}\frac{1}{|x|}f(x, {z \over x})dx$$ Since given RVs are iid in nature, hence $$f_Z(z) = \int_{-\infty}^{\infty}\frac{1}{|x|}f(x)f({z \over x})dx$$ $$f_Z(z) = \int_{0}^{\infty}\frac{1}{x}\exp\bigg(-x-{z \over x}\bigg)dx$$ Now I'm stuck at this point. How can I solve this integral?


I have only one variable in bash script ${PHP_V} and trying to pass in nginx config file like:  cat <<'EOF' > /etc/nginx/sites-available/default server {     listen 80 default_server;      listen [::]:80 default_server;       listen 443 ssl default_server;      listen [::]:443 ssl default_server;       root /vagrant/webroot;       index index.php;       server_name _;       ssl_certificate /etc/nginx/certs/vagrantbox.crt;      ssl_certificate_key /etc/nginx/certs/vagrantbox.key;        location / {          try_files $uri $uri/ /index.php?$args;      }       location ~ \.php$ {          try_files $uri =404;          include fastcgi_params;          fastcgi_pass unix:/run/php/php${PHP_V}-fpm.sock;          fastcgi_index index.php;          fastcgi_intercept_errors on;          fastcgi_param SCRIPT_FILENAME          $document_root$fastcgi_script_name;      } } EOF   but without success. How to do?


If you are not satisfied with answers on someone else's question, should you ask your own?

Suppose you had a question, and you really want a good answer that would solve your problem, but noticed it was already asked by someone else. Now, a lot of answers had been posted and upvoted, and maybe one was accepted. However, none of the answers solved your problem. The system does not promote the question very much because it is not considered "unanswered", and a lot of users who would otherwise bother to give a correct answer will probably skip the question completely as there are already many highly-voted answers.  Now, what should you do in this case?  One idea is to ask a new, completely identical question, but now you're in control to decide when it is answered. But would that go against SE policy?


Creating geodatabase feature class using geodatabase table schema with ArcPy?

Is there a way in ArcPy to create an empty polygon geodatabase feature class that will acquire the schema of a geodatabase table?  I know that it's possible in ArcCatalog (New -> Feature Class and then import all the fields from a table) but I wonder if it can be written in a Python script.  The CreateFeatureclass_management tool allows only Feature Layers as schema templates.


Why do floating point numbers in c# and python not calculate correctly

If we use a double in c# or a float in python, simple calculations using variables of 1 decimal place seem to not be correct.  In both python and c#, if I perform the calculation 5.2 - 5.1, I get the answer 0.10000000000000053, when it should obviously be 0.1.  Can someone please explain to me why this is?  Also, in c#, we can use the decimal type to avoid this issue. Is there a similar type in python I can use?


Let $~f~$ be a non-negative continuous function on $~\mathbb{R}~$ such that $~\int_{0}^{∞} f(x)~dx~$ is finite,then $~\lim_{x\to ∞} f(x) = 0~$.

Let $~f~$ be a non-negative continuous function on $~\mathbb{R}~$ such that $$~\int_{0}^{∞} f(x)~dx~$$ is finite,then $$~\lim_{x\to ∞} f(x) = 0~.$$   Is this statement true? I am trying to find a counter example. And I don't know how it is false.


why there is no AND operator in regular expression?

there is an OR operator | in regular expression (re module), but why there is no AND operator?


Recently i am facing a strange issue that when i am trying to install anything or update  via terminal I am getting the following error.  E: The package linux-image-extra-4.4.0-80-generic needs to be reinstalled, but I can't find an archive for it.   I have searched everywhere but couldn't find it anywhere. Screenshot attached.


but I`m not indubitably sure. AM-GM doesn`t work. Karamata`s inequality doesn`t work too.   Prove that inequality holds $$ \sum_{k=1}^n (\frac{a_1+\ldots +a_k}{k})^2 \leq 4 \sum_{k=1}^n a_k^2$$


How to internal redirect from one virtualhost to another Apache

I'm upgrading my application to new PHP version.   For that I created two virtualhosts one server PHP 5.3 application and another with PHP 5.6.   My virtualhosts are like,  <VirtualHost *:80>   ServerName php53app.com    DocumentRoot /var/www/php_53/public    <Directory />    Options FollowSymLinks    AllowOverride All    AddHandler php-cgi .php    Action php-cgi /cgi-bin-php/php-cgi-5.3.0   </Directory>   ErrorLog /var/log/apache2/error.log   LogLevel warn   CustomLog /var/log/apache2/access.log combined </VirtualHost>   and  <VirtualHost *:80>   ServerName php56app.com    DocumentRoot /var/www/php_56/public    <Directory />    Options FollowSymLinks    AllowOverride All    AddHandler php-cgi .php    Action php-cgi /cgi-bin-php/php-cgi-5.6.0   </Directory>   ErrorLog /var/log/apache2/error.log   LogLevel warn   CustomLog /var/log/apache2/access.log combined </VirtualHost>   I'm planning migrate each url by url.   For example :  When I'm migrating /login to new app, it should show php53app.com/login instead of php56app.com/login.  So my need is to serve all URLs in same domain name whether it is new or old.  Is there any possible way by using apache's mod rewrite or something?


Let $(X, \mathcal{T})$ be a metrizable space. Prove that $X$ Lindelöf   implies that $X$ is separable.   My attempt:  Let $d$ be the metric that induces the topology $\mathcal{T}$.   For every $n \geq 1$, consider the open cover: $$\{B_X(x,1/n)\mid x \in X\}$$  Because the space is Lindelöf, this implies that for every $n \geq 1$, there is a countable (or finite) subcover given by $$\mathcal{B}_n:= \{B_X(x,1/n) \mid x \in I_n, |I_n| \leq |\mathbb{N}|\}$$  Now, define $D:= \bigcup_{n\geq 1} I_n$. Let $y \in X$. Let $\epsilon > 0$. Choose $m$ a positive integer so large that $1/m < \epsilon$.  Because $y\in X =\bigcup\mathcal{B}_m$, it follows that there exists $x \in D$ such that $y \in B_X(x,1/m)$, meaning that $d(x,y) < 1/m < \epsilon$, such that $x \in B_X(y, \epsilon) \cap D$. Hence, $y \in \overline{D}$ and it follows that $D$ is a dense countable set in $X$, such that $X$ is separable.  Is this correct?


Got a reputation mark as user removed and unable to understand it properly

I am sorry to ask this question to moderators but I am unable to find any help for my query, I need to know why I have been given by -5 points which shows that user has been removed. What that exactly means? Does that mean I am no more part of the Stack Overflow community? Also I am not getting any replies for my question, is it because I am not part of this community according to user removed remark as per my understanding?


Why is Cat5/Cat5e Ethernet cable rated 100MHz?

As the questions says, is there any specific reason why Ethernet cable is rated 100MHz?  For a 100Mbps Ethernet the data rate is 100Mbps, and the baud rate is 125Mbaud, because of the specific line coding that it uses. What is the relationship between 125Mbaud rating of data transfer and 100MHz rating of cable?  Thank you.


C++ unordered_map/map [] operator default initialization value

I am wondering if this is a standard that calling [] without assignment will initialize the value of this key-value pair to be 0, if value is of type int?      // the way I did before, can I skip the if() checking?     std::unordered_map<std::string, size_t>  word_map;     for (const auto &w : { "this", "sentence", "is", "not", "a", "sentence",                            "this", "sentence", "is", "a", "hoax"}) {         if (!word_map.count(w)) {             word_map[w] = 0;         } else {             ++word_map[w];         }     }   Can i do the following instead:      std::unordered_map<std::string, size_t>  word_map;     for (const auto &w : { "this", "sentence", "is", "not", "a", "sentence",                            "this", "sentence", "is", "a", "hoax"}) {         ++word_map[w];     }   Thanks.  /*------------- --------------- -------------*/   UPDATES:  I just checked out this page about en.cppreference.com/w/cpp/language/default_initialization it seems that if we reply on the default initialization int x; the value of x will be indeterminate. So I guess word_map[w] does not necessarily == 0 when first called?


Let's say I have a video running in an application.  If I hover my mouse over the taskbar, it shows a little popup windows that diplays the video  (aero peek).  Sometimes I'm running a maximized window and I want to have this little screen always popped up.  (Kind've like when your using the TV Guide menu, you still see a little clip of the video)


Is there a difference between foo(void) and foo() in C++ or C?

Consider these two function definitions:  void foo() { }  void foo(void) { }   Is there any difference between these two? If not, why is the void argument there? Aesthetic reasons?


is horizontal swipe intuitive enough on mobile

Working on a mobile checkout page and would like to know if you'll think its intuitive enough that the user knows there are more products on the right side that could be reached by swiping using the 2 following ways  -showing half of the next item in the cart partially faded to white  -a horizontal scroll bar    are both of these really needed or is one of these enough for the user to get it. if so which one?


The "z" hypothesis test is derived from the fact the mean estimator $\hat\Theta$ is distributed normally. If we don't know the variance, we just estimate it ($\widehat{se}$).  The Wald test, derived from the fact that the fisher information of the MLE is distributed chi squared.  We basically get the same result with the two tests.   I just want to make sure that the Wald test is the generalization of the "z" test - or is there any difference?  Thanks!


I am a Romanian citizen.  Our co-national friends who are established in Canada will provide me and another person free accommodation and food. We are both EU citizens and we will stay in Canada 1 month.  These days we are gathering documents for our online visa application and we need to prove that we have enough money to spend there.   How much money is generally required in order to be sure we are eligible? We don't plan to spend more than 1000 EUR, but I intend to bring at least 2000 CAD. Is it enough?


Can I skip the first of a set of connecting flights?

I have an itinerary which consists of two flights. It's ended up being more convenient for me to skip the first flight and just catch the second. Is this something that airlines will always let you do? I'd call and ask the airline, but it's an Indian airline and, quite honestly, I don't expect them to give me a reliable or comprehensible response.


When do surjections split in ZF? Two surjections imply bijection?

We have that the Axiom of Choice is equivalent to the principle that every surjection has a right inverse. However, without the Axiom of Choice we can determine for some $X$ that $X\succeq Y\implies Y\preceq X$. Some immediate instances are when $X$ is finite (by the Principle of Finite Choice) and even when $X$ is countable (put in bijection with $\mathbb{N}$ and then choose the least element of the preimages).  I was wondering for what other $X$ does this hold? Clearly it holds for well-orderable sets, but does the principle extend to sets like $\mathcal{P}(\mathbb{N})$ or any other set that ZF can 'sanely' construct (as in be created without Choice)?  That is my first question. My second question is whether the following principle is equivalent to the Axiom of Choice: $$X\succeq Y\wedge Y\succeq X\implies X\simeq Y$$ This principle somewhat mirrors Schroeder-Bernstein, and can be derived with the Axiom of Choice; however, I've never seen a proof (not even a remark) that it is equivalent to or weaker than Choice.  These questions are just out of personal curiosity.   Notation: $X\succeq Y$ means $X$ surjects onto $Y$, and $Y\preceq X$ means $Y$ injects into $X$.


I am going to build a new computer and don't want to install/buy Windows as the OS.  I'd like to install the latest version of Ubuntu.  Is this possible or will still need to have a copy of Windows?  And if it's possible do I just follow the Ubuntu installation guide as normal?


What are good strategies for booster drafts?

I know that doing a booster draft can be somewhat complicated, because to really be good you need to know a lot about the set you're drafting (or be really good at evaluating cards quickly) and to pay attention to signal cards.    Besides going into the whole complicated strategies of knowing the set and paying attention to signal cards, what are some relatively simple/basic guidelines for drafting?


How to reverse the sign of factor loadings in factor analysis?

I'm doing a factor analysis and using the resulting factors in a regression. I'm using SAS. A number of the variables load positively on a factor. In order to make it easier to interpret in the final regression, it would be better if the loadings were negative.  Is there a way I can rotate the factor so the loadings are negative? Could the factors be multiplied by $-1$?


Proving that $Aut_{\mathbb{Q} } { \mathbb{R}} $

The following question is from my Field Theory assignments.  Prove that  $Aut_{\mathbb{Q} } { \mathbb{R}} $  is identity group.  I took $f:\mathbb{R} \to \mathbb{R}$ be an automorphism. Now  which result I should use to prove that all the automorphism which are $\mathbb{Q}$ -module homomorphisms are identity. Let $f'$ be such an automorphism and q belongs to $\mathbb{Q}$. So, $f'(q) = qf'(1) =q$.but how to prove that $f'(q) =1$ . Kindly guide.


This semester I will be taking a masters degree course on combinatorics and I am looking for a book that covers the material of the lecture and some more advanced stuff so I can gain some deeper insights. More specifically the topics will be the theory of species, polya theory (i.e., enumeration of objects with symmetries), partially ordered sets and asymptotic enumeration. Additionally I am also interested in graph theory so if the book also has some chapters about that it would be nice too. There is also a  for the lecture with a more detailed list of contents if that helps. It would be awsome if it is written not too dense, i.e. not in a theorem-proof kind of fashion like hartshorne's algebraic geometry for example, but rather has a lot of examples and explanations in it and possibly also covers the prerequisites or at least refers to them in some way. Thanks in advance for any help!


I'm creating a php script that will use another php script (login.php) file to store database login information. This file will sit within the public_html directory of the website to interact with the mysql database.  I'm wondering what the best approach to file security would be, so that someone can't access the login.php file containing the login credentials.


I have two files namely file1 and file2. I need to replace 16th line of file2 with 10th line of file1


Location and how to recover cache from Google Chrome from an Android phone?

I'm wondering if it's possible to recover files from the Google Chrome cache from an Android phone, specifically, an HTC One S running Android 4.0.2.  I'm trying to recover the stylesheet from a site whose data has been partially lost, and of course this phone is the only device to have accessed it today before the crash.


How to write vertical text in html like a banner?

I need to write vertical text. I just want the text to look like one below other.  Required Output:     A      P      P      L      E   I cannot use rotate property. And I dont want to modify my html. What could be the best way? Please help!  Thanks!


How to callout inside finish method of Apex batch?

I need to send some data to API when APEX execute success. When I put a callout method inside the finish method of the batch. There is always error shown: Too many future calls: 1 Example code: global with sharing class MyBatch implements  Database.Batchable<sObject>, Database.AllowsCallouts, Database.Stateful {          List<string> lines = new List<string>{'BuildingName'};      global Iterable<sObject> start(Database.BatchableContext bc) {         return [SELECT Id, BuildingName__c, Exported__c  FROM Account WHERE Exported__c = false AND LastModifiedDate = TODAY];     }      global void execute(Database.BatchableContext bc, List<Account> records){         for(Account cp : records) {            string row = cp.BuildingName__c ;            cp.Exported__c  = true;                       lines.add(row);         }         if(records.size() > 0) {             update records;         }     }          global void finish(Database.BatchableContext bc){         string result  = JSON.serialize(lines);        lines = null; //free memory        BE_Config__c beConfig = BE_Config__c.getInstance();        string url = beConfig.Url__c  + 'api/export/';        HttpRequest req = new HttpRequest();        req.setEndpoint(url);        req.setMethod('POST');        req.setBody(result);        HttpResponse res = http.send(req);      }     }


How to run Unix shell script from Java code?

It is quite simple to run a Unix command from Java.   Runtime.getRuntime().exec(myCommand);   But is it possible to run a Unix shell script from Java code? If yes, would it be a good practice to run a shell script from within Java code?


Linear Algebra Problem on a Symmetric Matrix

Let $n$ be an odd integer and  $A$  an $n \times n$  symmetric matrix with integer entries such that all diagonal entries are zero. Show that $detA$ is even. My Attempt Since all the entries of $A$ are integers its characteristic polynomial $p(x)\in Z[x]$ with the constant term of $p(x)$ being the determinant of $A$. If I can show that 2 is an eigenvalue of $A$ then we are done. But I can't exhibit such an eigenvector. Please Help.


How do I clear the console in BOTH Windows and Linux using C++

I need a cross platform solution for clearing the console in both Linux and Windows written in C++. Are there any functions in doing this? Also make note that I don't want the end-user programmer to have to change any code in my program to get it to clear for Windows vs Linux (for example if it has to pick between two functions then the decision has to be made at run-time or at compile-time autonomously).


Why is PWM used to control DC motor speed instead of using a variable resistance?

My question is at the end (to change the speed) we are controlling the input voltage of a DC motor in both PWM (pulse width modulation) and variable resistance cases. Is the only reason for choosing PWM to obtain a better precision or not consuming extra power? If it is the only reason it seems odd to use PWM equipment for simple demonstrations.


Is it okay to use code from users answers?

Let's say I have this  code. It has an issue, so I'm going to ask about it on Stackoverflow.  >>> print "Hello SyntaxError: EOL while scanning string literal.   Them user  comes along with the code for the solution to the issue.  >>> print "Hello"   Then let's say this code is part of a "big" project I've been working on. This project will eventually be published. Is it okay to use the improved/fixed code from the user who answered your question?


I just registered an account at Stack Exchange.com. So far I only joined two network sites (meta, and cross validated). I somehow understand how the login system works for the network sites. What I don't get is why I get automatically logged in although I explicitly logged out of all sites.  It goes like this: I log out explicitly of any site and of Stack Exchange.com. When I now click on 'log in' at Stack Exchange.com and choose 'log in with Stack Exchange account' it automatically logs in without asking for my password. The only thing I can do is to delete my browser history.  I find this very troublesome, since this makes using a shared or public computer (which I do from time to time) very unsafe.  Does anyone know what's up with this?


How can I learn basic anatomy/proportions good enough to where I can sculpt a basic head from scratch

I did this but I got frustrated and quit.


I need to have a banner printed for a back lit header on a shelving unit in a retail store with the following dimensions 2’-11" x 1’-0", how many DPI would you recommend printing at?  Thanks in advance for your assistance.


LAMP server with remote MySQL on CentOS 6.4

I am pretty new to linux and LAMP setup. I want to setup a LAMP environment with AP on one linux server and M on a different linux server. I have a hard time finding a relevant document with such a configuration.  I have done the following steps so far:  server1:  yum install -y httpd /sbin/service httpd restart yum install -y php php-mysql sed -i "s/Listen 80/#Listen 80/g" /etc/httpd/conf/httpd.conf yum install -y mod_ssl openssl /sbin/service httpd restart service iptables stop   I changed the ServerName in /etc/httpd/conf/httpd.conf from  #ServerName www.example.com:80   to  ServerName 172.32.35.14 (ip address of server1) /sbin/service httpd restart   server2:  yum install -y mysql-libs yum install -y mysql yum install -y perl-DBI yum install -y perl-DBD-MySQL yum install -y mysql-server /sbin/chkconfig mysqld on /sbin/service mysqld start mysql -u root  -e "CREATE USER 'mysqluser' IDENTIFIED by 'password'"  mysql -u root  -e "CREATE USER 'mysqluser'@'localhost' IDENTIFIED by 'password'" mysql -u root  -e "GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'localhost' WITH GRANT OPTION" mysql -u root  -e "GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%' WITH GRANT OPTION" mysql -u mysqluser -p password -e "CREATE DATABASE mysqldb"  mysql -u mysqluser -p password mysqldb < /tmp/mysqlinstaller/world.sql service iptables stop   Then I had these post configuration steps:  On server 2, where my mysql is installed, I did the following in /etc/my.cnf under the tag [mysqld]  bind-address = 172.32.35.14 (ip of server 1 where apache/php are installed) service mysqld restart  service mysqld start MySQL Daemon failed to start. Starting mysqld:                                           [FAILED]   I am facing these issues...    When I run the url  on my browser to check the apache installation, I am not able to get the default apache homepage. Instead it says Problem loading page. When I run - service mysqld restart - on the server where mysql is installed, I get the following error:   service mysqld start MySQL Daemon failed to start. Starting mysqld:                                           [FAILED]   Can you point out what I am missing and guide me please


using wp_remote_get instead of file_get_contents

have run my theme through the Theme checker plugin and it seems upset about use of file_get_contents to get a json url. I've found posts saying i should use wp_remote_get. I'm currently decoding the url with the following:   $url = 'url' . $var; $json =   file_get_contents($url,0,null,null); $output = json_decode($json,true);    The message I get from the Theme Checker is:     WARNING: file_get_contents was found in the file.php possible file operations.   Is it just saying this because there is a function I could possibly use by wordpress or any other reasons? Also how would I use wp_remote_get. I tried a few variations, mostly replacing file_get_contents with wp_remote_get with no luck. Doesn't seem to decode the url at all.


Unable to upgrade from 17.10 to 18.04. Package libgd3 not found

I tried to upgrade from 17.10 to 18.04 using both software updater and 'do-release-upgrade' command. I am getting below error message. My internet connection is working fine. How can i correctly upgrade to 18.04 release.  Could not download the upgrades   The upgrade has aborted. Please check your Internet connection or  installation media and try again. All files downloaded so far have  been kept.   Failed to fetch  http://ubuhttps://askubuntu.com/users/login?ssrc=head&returnurl=https%3a%2f%2faskubuntu.com%2fquestions%2f1028787%2fuse-old-ppa-if-new-ppa-is-not-available-for-new-ubuntu-versionntu.mirrors.tds.net/pub/ubuntu/pool/main/libg/libgd2/libgd3_2.2.5-4ubuntu0.2_amd64.deb  404 Not Found


how to change the size of one block in beamer

I am preparing a presentation of proposal thesis and I need to know how I can change the size of one block in beamer. I can not use this command. I need to personalize the size for each block  \addtobeamertemplate{block begin}{%  \setlength{\textwidth}{0.9\textwidth}% }{}


Can anyone understand/explain this String Extension?

We have a file called "StringExtensions" which works as a "class" which can be used for multiple datasets/models I assume.  Can anyone help understand what this ToSafeString does to a string?  public static string ToSafeString(this object source) {     return source?.ToString() ?? string.Empty; }


$x^2+y^2-1$ irreducible in $\mathbb{Q}[x,y]$?

I want to show that $p(x,y)=x^2+y^2-1$ is irreducible in $\mathbb{Q}[x,y]$. There is already a similar problem posted:    but this question uses the irreducibility of $p(x)$ to show that it is prime and therefore an integral domain. The part of the problem I am stuck on is showing that $x^2+y^2-1$ is irreducible over $\mathbb{Q}$ in the first place.  I have considered taking the approach used in the above link except for backwards, but I am unsure of whether or not the converses of the theorems used still apply.  Edit: I see that this question has been marked as a duplicate, but I think I have explained how I am asking a different question than the one that was posted previously.


How to get fields definitions of a vocabulary in drupal 8/9?

I needed the field list related a vocabulary item.I was able to list the fields related to a content type by using like this: \Drupal::entityManager()->getFieldDefinitions('node', 'article');  But I can't find a way for the vocabulary items.


How to install from an unknown source with my AT&T Galaxy S phone?

I have an AT&T Galaxy S phone, but I can't find install from an unknown source. How can I install apps I receive?


Understanding SUSY, Lie groups, gauge theory, etc

We are currently learning about the Standard Model, but we had no lectures on the above topics, therefore it is very hard for me to understand how symmetries play a role in the Standard Model and why they  are important. So I'm asking for books or videos or PDFs that help me understand things like Lie groups, gauge theory, super symmetry, continuous and discrete symmetries, symmetry breaking, and so on and also explain how these concepts are related to each other, offering a fundamental understanding of these concepts, and also a geometrical interpretation for them if possible.


Merge Conflict : while pulling a single file from a branch

I have a master feature branch in which all the feature development are merged during the development cycle. In case of any changes to the file, I want to pull the file from the master feature branch to avoid merge conflict. I tried the below approach but facing issue. git checkout <Branchname> git fetch git checkout <masterfeature branchname> -- file1 <modify the code<file1> in local repo> git add file1 git commit -m "<msg>" git push  The changes are successfully reflected in Remote Feature branch but I am getting a merge Conflict when trying to merege to Master Feature branch. Please suggest how to proceed. The file was not even present in the feature branch and I pulled it from the Master feature branch and modified. Still it is giving me Merge Conflict issue. Please Help! Thanks in Advance


Is it possible in 14.04 to save the current system settings?   I want (yet again) to install NVidia drives, but I'd like to save the current state of my settings and be able to roll back to the current state in case the drives don't work.


Problem with \thesistitle in Masters/Doctoral Thesis template

I have downloaded the fantastic template for doctoral thesis available in .  I have used it before I had already adapted the contents for my thesis. However, when I tried to compile it with MiKTeX after the last update I got this problem:  ("C:\Users\XXXX\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\atbegshi.sty")) ! Missing number, treated as zero. <to be read again>                 - l.81 ...end of thesis title}                                                % Your thesis title, this...  ?    The problem seems to be within the \thesistitle command. However I have checked the .cls file and I can't see any problem with it. I downloaded the original from LaTeXtemplates and got the same results:  ("C:\Users\XXXX\AppData\Local\Programs\MiKTeX 2.9\tex\latex\csquotes\csquotes.cfg")) ! Missing number, treated as zero. <to be read again>                 - l.70 \thesistitle{Thesis Title}                             % Your thesis title, this is used in the tit...  ?    This is a minimal working example that gives the same error. I couldn't get rid of the class dependency though:  \documentclass[11pt, english, singlespacing, headsepline]{MastersDoctoralThesis}  \usepackage[utf8]{inputenc} % Required for inputting international characters \usepackage[T1]{fontenc} % Output font encoding for international characters  \thesistitle{Resilience of wastewater resource recovery to multiple stress conditions}   \begin{document} \begin{titlepage}  \HRule \\[0.4cm] % Horizontal line {\huge \bfseries \ttitle\par}\vspace{0.4cm} % Thesis title \HRule \\[1.5cm] % Horizontal line  \end{titlepage} \end{document}    Crosspost on LaTeX.org  UPDATE: The provisional solution would be to replace the \thetitle command part in the .tex file, with:  \newcommand{\ttitle}{Thesis title} \makeatletter \renewcommand{\@title}{Thesis title} \makeatother


Table caption on top of page - remove vertical space

I guess my problem is related to the caption. When a table (with the caption on top) appears on top of a page, there is always sone vertical whitespace before. Figure however (caption below) align with the top perfectly. I guess this is because of the caption? Can I somehow globally remove this whitespace? Caption offers some option to tell it whether the caption is on top or bottom, but this doesn't help... Here is my code:  \documentclass[ 12pt, pdftex, a4paper, parskip=half, ]{scrreprt}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{showframe} \usepackage{blindtext}  \begin{document}  \begin{table}[t]     \centering     \caption\textbf{Fancy table}     \begin{tabular}{ccc}         This is & a fancy & table \\     \end{tabular} \end{table}  \Blindtext[5]{5}  \end{document}


decalre a hight rage char array but no RAM usage - only use when there are characters inside it

i have question about C language (memory). this is my source  #include <unistd.h>  int main() {      char ___storage___[1073741824];      sleep(30);      return 0; }   RAM Usage : 10 Bytes when i run this program i expected this program get 1 GB from my pc ram for 30 seconds. but it's get nothing from my PC ram !!! but for example if i copy the characters into this array like this  #include <stdio.h> #include <unistd.h>  int main() {      char ___storage___[1073741824];      for (int i = 0; i < 536870912; i++) // 512 Mb characters !         ___storage___[i] = 'h';      sleep(30);      return 0; }   RAM Usage : 512 MB for this program when i run it, this program get 512 MB of my ram ! but i declared a variable with (1GB) size ! why ? if this get our PC ram only when we insert something inside it, why we have dynamic variables !? for example we give a dynamic variable high range and insert inside it with out dynamic allocation or reallocation !


What to do when toddler keeps using the potty to stay awake at bedtime?

We are working on potty training our two year old girl and it is interfering with our bedtime routine.  She will often keep requesting to use the potty, knowing that we will take her out of bed to go to the bathroom, sometimes as many as four times in a night.  It became obvious pretty quickly that she was just delaying bedtime because she would just try and talk with us while on the potty and make jokes.  We have been trying to make it as boring as possible, by standing out in the hall so that she does not have someone to directly interact with while on the potty.  How can we reduce the number of times we take her to the potty after putting her to bed without giving her a complex about the toilet?  I am afraid to deny her the extra potty runs since sometimes she actually does go on the extra times (thought more often not).


I have noticed that "Help" button on  is not working.    Also there is no link to Help in the footer, and  leads to "Page Not Found".  May I assume "Help" button should be removed from top navigation menu?


Why am I not allowed to downvote my own post?

It's alright that users aren't allowed to upvote their own posts. But, what about downvote?  Users can mis-use upvote, but users can't mis-use downvote.  Add this feature.. With it, a user can downvote his question/answer at later point of time when he finds that it's poor. Today, I was trying to do that, but failed.


A sequence converges if and only if every subsequence converges?

I want to prove this and intuitively it makes sense. But I'm having a hard time coming up with a proof. So if a sequence converges, then we have a natural number for which the distance between all terms after it and the limit point get arbitrarily small. So how can I show that this also holds for every subsequence (which is like a subset of a sequence)?  (are subsequences always infinite?)  Could I suppose that there is a subsequence that doesn't converge to that limit, and find a contradiction? (and do the same for the other direction?)


How to find the table name based on a value in Oracle

How to find the table name based on a value I pass in Oracle ? The query should check all the tables in the schema to check if the given value exists in any of the tables


Let $m$ and $n$ be infinite ordinal numbers  Which of the following is true  a) $m<n \Rightarrow |m|^{|m|}<n^{|n|}$  b) $m+n$= Max{$m,n$}  c) $m=n \Rightarrow |m|=|n|$  d)$|m|=|n| \Rightarrow m=n $  e)  Max{$m,n$} <$|m|+|n|$  I could only understand that d) is false due to the cardinality of the two different ordinals can be the same and c is true! Please help on the rest of the statements


I ran Ubuntu 13.10 with a startup script that had three xrandr commands in it to add a screen resolution that Ubuntu couldn't detect. After upgrading to Ubuntu 14.04, the system freezes on startup. All I can do is enter terminal mode and type commands.  I think the problem is in the startup script. How do I disable my startup script from the command line?  I tried deleting the original shell file but apparently Ubuntu copied the file elsewhere when I defined it as one of my startup scripts, and the system still freezes on startup.


Estimating the sum using Leibniz' estimate

How to estimate the sum of the alternate series to within 0.1 of its true value?  I am given $\sum_{n=1} \frac{(-1)^{n+1}}{n}$. It is understood that the sequence converges but I am specifically looking for how to set up and use Leibniz' estimate to find the sum.