I got this  drwxrwxr-x 3 root tunnel 100 date and time . drwxr-xr-x 33 root root 860 date and time … -rwxrwxr-x 1 root tunnel 0 date and time enable-updates drwxrwxr-x 2 root tunnel 40 date and time interface -rwxrwxr-x 1 root tunnel 151 date and time resolv.conf   Then I run   sudo chown --recursive root:tunnel run/resolvconf sudo chmod --recursive 775 /run/resolvconf   Then I get this  drwxrwxr-x 3 root tunnel 100 date and time . drwxr-xr-x 33 root root 860 date and time … -rwxrwxr-x 1 root tunnel 0 date and time enable-updates drwxrwxr-x 2 root tunnel 40 date and time interface -rwxrwxr-x 1 root tunnel 151 date and time resolv.conf   but after few second or reboot all is OVERWRITTEN flags and file resolv.conf and I get this again  ls -al /run/resolvconf total 4 drwxrwxr-x  3 root tunnel 100 date and time . drwxr-xr-x 33 root root   860 date and time .. -rw-r--r--  1 root root     0 date and time enable-updates drwxrwxr-x  2 root tunnel  40 date and time interface -rw-r--r--  1 root root   151 date and time resolv.conf   and I cant chattr  chattr: Operation not supported while reading flags on /etc/resolv.conf   here is cat for resolv.conf  # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN


How to change output of Python program so that it is on one line?

By one line, what I mean is something like the output of this Ruby code: def ask()   puts("What is your name?")   name = gets().chomp   if (name == "Tilly")     puts("Awesome name!")   else     print("#{name} is a ")     index = 0     while (index < 50)       print("silly ")       index += 1     end     puts("name!")   end end  ask()  Basically, I don't want a new line for each time the word silly is printed. Here's the Python code: name = input("Welcome! Enter your name. ") print(name, "is a") i = 0 while (i < 50):     print("silly")     i = i + 1  print("name!")  How do I fix this? In Ruby, there is print() for situations like this, and puts() for everything else. Python doesn't seem to have anything like this. Please be gentle, this is my first ever Python program.


Validity of proof for surface area of a sphere

On a geometry test I forgot the formula for the surface area of a sphere so I derived it and ended up being right. But it seems like my derivation is wrong. I got the surface area formula by taking the derivative of the volume formula, $\frac{4}{3}\pi r^3$. My reasoning was that taking the derivative is equivalent taking the volume of a sphere with radius $r+h$ minus the volume of a sphere with radius $r$ and then dividing by $h$ as $h$ goes to $0$. I figure that if you took the part of the larger sphere that is not in the smaller sphere and laid it flat it would be a prism with height $h$, so its base area (i.e. surface area of the sphere) would be the volume divided by $h$. So my questions are: First, why must $h$ go to $0$? First I tried it with $h = 1$ thinking, since the height is $1$, the base area (i.e. surface area of sphere) would equal the volume. But when $h=1$ you get the wrong formula. Secondly, is the rest of the reasoning correct? Thanks,  Elliot


I need some help to modify the \gear macro of  in order to be able to fill the drawn gear with a solid color.  I've tried to move the \draw command outside the loop, but it does not work as expected (missing semicolon???):  \newcommand{\gear}[3]{%     \def\modu{#1}     \def\Zb{#2}     \def\AngleA{#3}      \pgfmathsetmacro{\Rpr}{\Zb*\modu/2}     \pgfmathsetmacro{\Rb}{\Rpr*cos(\AngleA)}     \pgfmathsetmacro{\Rt}{\Rpr+\modu}     \pgfmathsetmacro{\Rp}{\Rpr-1.25*\modu}     \pgfmathsetmacro{\AngleT}{pi/180*acos(\Rb/\Rt)}     \pgfmathsetmacro{\AnglePr}{pi/180*acos(\Rb/\Rpr)}     \pgfmathsetmacro{\demiAngle}{180/\Zb}     \pgfmathsetmacro{\Angledecal}{(\demiAngle-2*\AnglePr)/2}      \draw[fill=black!20] \foreach \zz in{1,2,...,\Zb}{          ({(\zz))/\Zb*360-\Angledecal}:\Rb)             -- (\zz/\Zb*360-\Angledecal:\Rp)             to[bend right=\demiAngle] (\zz/\Zb*360+\Angledecal:\Rp)             -- plot[domain=-0:\AngleT,smooth,variable=\t]                 ({{180/pi*(-\t+tan(180/pi*\t))+\zz/\Zb*360+\Angledecal}:\Rb/cos(180/pi*\t)})             %              to[bend right=\demiAngle]                  ({{180/pi*(\AngleT+tan(180/pi*-\AngleT)) +(\zz+1)/\Zb*360-\Angledecal}:                     \Rb/cos(180/pi*-\AngleT)})         %              plot[domain=-\AngleT:-0,smooth,variable=\t]                 ({{180/pi*(-\t+tan(180/pi*\t)) +(\zz+1)/\Zb*360-\Angledecal}:                     \Rb/cos(180/pi*\t)})     } -- cycle; }   Edit: add missing fill color


Why diodes can be used to create a current-independent voltage drop?

How is current independent of the voltage drop in a diode?


Why can't I get the file name under the if statement?

I am iterating over an entire directory with more than 5k .xml files and I want the file name only if it contains the string 'stop' under the tag <name> which itself is a child of the tag <object>:  import xml.etree.ElementTree as etree import os path = '/home/devf12/Documents' listofnames = []  for filename in os.listdir(path):     if not filename.endswith('.xml'): continue     fullname = os.path.join(path, filename)     tree = etree.parse(fullname)     root = tree.getroot()     objects = [tag for tag in root.findall('object')]     for tag in objects:         objname = tag.findtext('name')         print filename # this is the last place that it will print the filename         if objname is 'stop': # but I need to narrow it down if it meets this condition             print filename # why wont it print here?   Does anyone know why my current code doesn't achieve this and how it can be done?


What is the mechanism by which $\lim_{x\rightarrow\infty}e^\frac{\ln{x}}{x}=e^{\lim_{x\rightarrow\infty}\frac{\ln{x}}{x}}$ is allowed?

I've encountered a number of problems in my coursework that require me to find $\lim_{x\rightarrow\infty}x^{\frac{1}{x}}$, the solutions to which apply the following identity:  $$\lim_{x\rightarrow\infty}e^\frac{\ln{x}}{x}=e^{\lim_{x\rightarrow\infty}\frac{\ln{x}}{x}}$$  What principle allows us to move the limit operator into the exponent?  Are there any conditions (aside from the limit not existing) under which this is not allowed?


What to put up during development? "Coming Soon" page is bad for SEO

I've purchased a domain. I'm in the process of creating the website for that domain. This may take about a month.  In the mean time, what is the smartest thing to do with that domain, in terms of SEO?  For example, should I send a 204 No Content HTTP header? I know that's not the right thing to do but what is? I know that simply having a "Coming Soon" page is also bad for SEO.  Any advice?


Pass Variable to Custom Block template file

I want to create my custom block with custom content in Drupal 8,in start I create  Block with just simple text on it, and work correctly, my Problem is how can I pass my custom variable to it? I saw some tutorial about it , my Module name is tcdev and this is content of .module file.  function tcdev_theme($existing, $type, $theme, $path) {     return array('tcdev' =>         array(             'variables' => array(                 'title' => 'Default title',                 'description' => null             ),             'template' => 'block--sliderblock'         )     ); }   and my SliderBlock.php       namespace  Drupal\tcdev\Plugin\Block; use Drupal\Core\block\BlockBase;   /**  * Provides a 'SliderBlock' block.  *  * @Block(  * id = "slider_block",  * admin_label = @Translation("Slider Block"),  * )  */  class SliderBlock extends BlockBase{     /**      * {@inheritdoc}      */     public function build(){         return array(             '#title' => 'my title ',             '#description' => 'my custom desc'         ); } }   and finally my template file block--sliderblock.html.twig
My Custom Block{{ title }}-{{ description }}
   But Result is only "My Custom Block-" . The problem is variables not getting passed to template file,where is my fault?  appreciate any help


Installation Of ruby on rails in ubuntu14.04

How to install ruby on rails on Ubuntu 14.04? Which versions are better to install, and how to install   ruby (version) rubygems, rubygems_update -v (version), mysql_server libmysqlclient-dev mysql2, rails -v=(version), rake --version (version),


I'm installing a new ceiling fan. I have 2 black and 2 white wires coming from the ceiling. 1 black wire is not a power source. The 2 white wires are capped together. I've left the non power black wire source capped and left the 2 white wires capped together. After hooking up everything the fan and light works. Yay!! However, there is a wall switch that should turn on and off the fan and it's not working. I'm assuming it has something to do with the non ground black wire. If so, how do I connect it to the fan switch? Thank you for your time.


I've looked in the Software Center, and there is an entry under Accessories for Ubuntu One, but I'm not sure if that'll actually remove Ubuntu One. On Ubuntu One's website, it gives a bunch of terminal commands to remove it, so should I use those or use the entry in the Software Center?  The reason I'm trying to remove Ubuntu One is because its sync doesn't work with my comp for some reason. It keeps saying that its trying to sync files in the client window, then it stops with the red X next to it after a few seconds. If Ubuntu One is this useless, I see no use for having it on my computer.


How to unmount and mount pen drive in ubuntu via command line

How to unmount and mount pen drive in Ubuntu 14.04?   Thanks


How add a classic start menu in Ubuntu 15? Like the LinuxMint start menu.


References for quasi finite and proper implies finite

Does anybody know a reference for a proof of:  Let $f: X \rightarrow Y$ be a quasi-finite proper morphism of varieties. Then $f$ is finite.  Is there one in Hartshorne? I could not find it.  Thanks!


Limit of $f_{n+1} = \sqrt{12 + f_n}$ with proof by contradiction

Consider the following recursive sequence:  $$ \begin{cases} f_{0}=\sqrt{12}\\ f_{n+1}=\sqrt{12 + f_{n}} \end{cases} $$  for $n \geq 0$. How can I prove that this sequence is bounded above by $4$ and thus its limit is also $4$?


So we have to evaluate $\int\frac{x^2+1}{(1-x^2)\sqrt{1+x^4}}dx$.  My work-  We can write the integrand as $\frac{(x+1)^2-2x}{(1-x)(1+x)\sqrt{1+x^4}}dx$.  So we wish to deduce $\int\frac{(x+1)}{(1-x)\sqrt{1+x^4}}dx-\int\frac{2x}{(1-x^2)\sqrt{1+x^4}}dx$  So lets write it as $I_1+I_2$.  I tried and I can't evaluate $I_1$.  For $I_2$, I took $x^2=t;\ 2xdx=dt$.  The integral becomes $\int\frac{dt}{(1-t)\sqrt{1+t^2}}dt$.  Okay, now we do $t=\tan\theta; \ dt=\sec^2\theta d\theta.$  $\int\frac{\sec\theta}{1-\tan\theta} d\theta$  Now what to do? Please guide me.?


How do I modify SELinux to allow OpenDKIM to write to /var/tmp?

I tried this answer () but it still gives an error.     Jan  7 23:56:33 ip-172-31-15-65 opendkim[24223]: AF15521407: dkim_eoh(): resource unavailable: can't create temporary file at /var/tmp/dkim.AF15521407.ennuJK: Permission denied   Here are some of the audit.log  type=AVC msg=audit(1483827348.024:363280): avc:  denied  { write } for  pid=22334 comm="opendkim" name="tmp" dev=xvde ino=40961 scontext=unconfined_u:system_r:dkim_milter_t:s0 tcontext=system_u:object_r:tmp_t:s0 tclass=dir type=SYSCALL msg=audit(1483827348.024:363280): arch=c000003e syscall=2 success=no exit=-13 a0=7f7eecd1f910 a1=c2 a2=180 a3=0 items=0 ppid=22035 pid=22334 auid=0 uid=495 gid=495 euid=495 suid=495 fsuid=495 egid=495 sgid=495 fsgid=495 tty=(none) ses=4038 comm="opendkim" exe="/usr/sbin/opendkim" subj=unconfined_u:system_r:dkim_milter_t:s0 key=(null)     # cat opendkim.te  module opendkim 1.0;  require {         type tmp_t;         type dkim_milter_t;         class dir write; }  #============= dkim_milter_t ============== #!!!! The source type 'dkim_milter_t' can write to a 'dir' of the following types: # dkim_milter_data_t, cluster_var_lib_t, cluster_var_run_t, root_t, cluster_conf_t  allow dkim_milter_t tmp_t:dir write;  # semodule -i opendkim.pp  # ls -ldZ /var/tmp drwxrwxrwt. root root system_u:object_r:tmp_t:s0       /var/tmp  # service opendkim restart Stopping OpenDKIM Milter:                                  [  OK  ] Starting OpenDKIM Milter:                                  [  OK  ]   I don't know what else to try.   Reference: I used this guide:   CentOS release 6.8 (Final)


For any prime number $p$, let $A_p$ be the set of integers $d\in \{1,2,\dots, 999\}$ s. Then what is the cardinality of $A_p$?

For any prime number $p$, let $A_p$ be the set of integers $d\in \{1,2,\dots, 999\}$ such that the power of $p$ in the prime factorization of $d$ is odd. Then what is  the cardinality of $A_p$?  I have used to the following result, but failed to show the required result. The largest exponent $e$ of a prime $p$ such that $p^e$ is a divisor of $n!$ is given by  $$ e=\left\lfloor \dfrac{n}{p} \right\rfloor + \left\lfloor \dfrac{n}{p^2} \right\rfloor + \left\lfloor \dfrac{n}{p^3} \right\rfloor $$ How can I do next?


Explicit formulas for Stirling numbers of second kind

I have seen some recursive formulas for Stirling I and II kind but I am especially interested in explicit formulas.  I was thinking and get: $$ \left\{ {m \atop n} \right\} =  \sum_{k_i>0 \wedge k_1+k_2+...+k_n = m} \frac{m!}{n!}\cdot \frac{1}{k_1! \cdot k_2! \cdot ... \cdot k_n!}$$ I am not sure if it is ok but supposedly it is (I created it with combinatorics interpretation)  Can somebody look at that and tell me if it is ok/wrong?  By the way,if you have some nice formulas, I will be grateful for sharing that.


Ramanujan's notebooks contain the result $$\prod_{k=1}^{\infty} \Big( 1 + \frac{1}{k^3}\Big) = \frac{1}{\pi} \mathrm{cosh}\Big( \frac{\pi \sqrt{3}}{2}\Big).$$ It doesn't seem like this is proved there but I guess it is well-known. How could you show this?


How to add points to points in polygon function

I have downloaded my shapefile and also a CSV file with the population of each location. Each population is associated to a meshblock (district) that has coordinates. I need to put this population onto a map but I can't seem to make these population's into points.  I tried using points in polygon function, but the drop down has no points to select from?


Assume you have an arbitrary set A, let RA be the relation defined on A × Power Set(A) by, for all a ∈ A and B ⊆ A,  "a RA B iff a ∈ B"  1.Let A = {0, 1}. Is RA a function? Justify?  2.Find a set A such that RA is a function.  does anybody have an idea of what to do? Im confused on trying to show its a function  The powerset(A) = {{0},{1},{EmptySet},{0,1}}   is RA a function then? because the X value is connected to a Y value?


how to strictly prove $\sin x<x$ for $0<x<\frac{\pi}{2}$

$$\sin x<x\,(0<x<\frac{\pi}{2})$$ In most textbooks, to prove this inequality is based on geometry illustration (draw a circle, compare arc length and chord ), but I think that strict proof should be based on analysis reasoning without geometry illustration. Who can prove it? Thank you very much.    ps:   By differentiation, monotonicity and Taylor formula, all are wrong, because $(\sin x)'=\cos x$ must use $\lim_{x \to 0}\frac{\sin x}{x}=1$, and this formula must use $\sin x< x$. This is vicious circle.  If we use Taylor series of $\sin x$ to define $\sin x$, strictly prove $\sin x<x$ is very easy, but how can we obtain geometry meaning of $\sin x$?


In forest (tikz) for syntax trees, how do I create an arc above one node separating it off from the rest of the tree?

's a picture example of what I want:     I'm able to make the type of arc that I want with this command:  \draw (-2,-2) [black,thick,dashed,domain=45:180] plot ({cos(\x)}, {sin(\x)}) ;   But it always creates the arc at the very top of the tree, even when I put the command inside the tree in the node where I want the arc. Here's the code I'm using:  begin{forest} [TP [T\textsuperscript{0}] [vP [DP\textsubscript{???},circle,draw] [v' [v\textsuperscript{0}] [VP,tikz={\draw[black,thick,dashed,domain=45:180] (2,2) plot ({cos(\x)}, {sin(\x)}) ;} [V\textsuperscript{0}] [DP\textsubscript{???},circle,draw] ]]]] \end{forest}


How to solve the integral $\int \frac{1}{e^x}\,dx$ step by step?

I'm primitive in integrals and derivatives and I'm trying to solve the integral $\int \frac{1}{e^x}\,dx$, but especially this integral was hard to me to solve it.  So I tried:  $$\begin{align} \int\frac{1}{e^x}\,dx&=\int \frac{1}{\color{Red}{e^x}}\color{Blue}{e^x\,dx}\\&=\int \frac{1}{\color{Red}{u}}\,\color{Blue}{du}\\&=\ln\left(|u|\right)\\&=\ln \left(|e^x|\right)+C \end{align}$$  But my solution is wrong while I used the integration by substitution method ?!    Correct answer:  $$\begin{align} \int\frac{1}{e^x}\,dx&=\left(-e^{-x}\right)+C \end{align}$$


Short story about scientist aliens destroying Earth

I'm looking for a short story about how scientist aliens look at earth from afar and see a violent race bent only on killing each other. The aliens decide to destroy earth as to eradicate the threat to the galaxy/universe.  The weapon (a laser) takes some time (hundreds of years?) to reach Earth, meanwhile, the aliens see that humanity has evolved and has become peaceful towards itself and start to regret their impending doom.  After Earth is destroyed, most(?) of the planets of our system light up in mourning and a human fleet is sent towards the source of the laser.  The last thing I remember is a quote that is sent to the aliens at the end stating "We see you" or something along those lines.


Channels and keys of animated bones do not appear on Graph Editor

So I animated bones on an armature, things were normal for a long time. Today I decided to mess with the animation and to my surprise the keys are gone! The animation still plays normally, and the keys appear on the timeline, but channels and keys are nowhere to be found on the Graph Editor when selecting a bone.  I tried:  *Copying and pasting the same keys on the same channels on the same place or different places on the timeline to see if they would magically appear but it didn't work (by the way it works when copy-pasting keys from a bone to another, just create a key first then paste on the same channel)  *Messing with some controls on the Graph Editor that makes curves visible or hidden, and they didn't work  *Creating keys for the armature works but the keys are hidden too  *Creating keys for different objects, and it works. So the problem is not general, it's specific for the armature's bones  Can't provide the file right now but I guess that's enough info. By the way I am using version 2.79b. Researched a little bit to see if someone also had the problem. It seems to be a new thing.


There are $6n$ flower of one kind and $3$ of another kind. Show that number of different garlands made of using all these flowers is $3n^2+3n+1$.  My approach is divide garland in form of $a+b+a=6n+3$. As it is circular but could not go ahead of it


Generate a sequence of exposure time options mathematically

Is there a way to generate a sequence of usual/standard exposure time options mathematically? Something like 1/5000, 1/2500, 1/1500, 1/1000...1/500, 1/250/ 1/125...1/60...1/30...1/8, 1/4, 1/2, 1, 2, 3, 4...8, 16, 32 (all in seconds).  Note that the sequence above is just an example to describe what I mean. The gap between different options does not have to be the same as above, nor the actual values.  Also, the sequence might be a combination of different sequences generated differently.


I use xubuntu 16.04,  After starting the os the display is 75% corrupted:    After that, if I suspend (sleep) the Netbook and then awake it, it shows everything correctly. It happened only on    xubuntu 17.10 xubuntu 16.04 (only if I do an upgrade, in original version it doesn't happen) xubuntu 14.10 (I think same like 16, without upgrade it works normally)   My netbook is .


Why is that? repulsive forces and attractive forces

These are the upper and lower discs A and B.  There is a small hole in the center of A, and a pipe is connected to the small hole.  The pipe is connected to compressed air.  We use B to approach A.  When the distance between A and B is far enough, A and B are repulsive forces.  However, when A and B are close enough, A and B are attractive forces.  Attractive force can even be greater than the gravity to which B is subjected.  Why is that?   shows this.


Understanding the calculation of the independent samples Cohen's d from t & df

It seems that for calculation of Cohen's $d$ (an estimate of effect size), you should use the difference in means (or in one-sample case, from baseline), divided by $SD$, if that information is available: $$ \frac{\bar X_1 - \bar X_2}{SD} $$ However, when you only have the $t$-statistic and the degrees of freedom ($\rm df$) available, what is the formula for Cohen's $d$? In the one-sample / paired-sample case, it's intuitive how to derive $d$ from $t$, since $t$ is calculated as the difference in means over standard error: $$ t = \frac{\bar X_1 - \bar X_2}{SE} = \frac{\bar X_1 - \bar X_2}{\frac{SD}{\sqrt{N}}} $$ so $d$ equals: $$ d = \frac{\bar X_1 - \bar X_2}{SD} = \frac{t}{\sqrt{N}} $$ And that's what you find in online articles such as . But for independent samples, the equation is listed instead as: $$ d = \frac{2t}{\sqrt{\rm df}}  $$ as seen , or even:  $$ d = t \sqrt{\frac 2 N} $$ So where does the "$2$" come from? Is it related to the formula for pooled SD?


static object intialization and compilation c++

can someone exlpain this code to me  size_t count_calls() {     static size_t ctr = 0;  // value will persist across calls      return ++ctr;  } int main() {     for (size_t i = 0; i != 10; ++i)         cout << count_calls() << endl;  }   how can ctr not restet to zero after calling the count calls function many times? As you can see the object ctr intelizes to 0 after the function call. shouldnt ctr be 0 when reentering the function count_calls as it passes the first line static size_t ctr = 0;?  I understand that a static variable holds its value thoughout the function calls until the program terminates but here, every time the functions is called shouldnt the first linee reset the the ctr value to zero or does the intialization work only the first time and thus become ignored the rest of the calls?  can someone please explain how this works?


Why, oh why, does R automatically eliminate variables from my dataset when running lm?

First of all, forgive my moronosity (new word I made up).   I am running R on data from trees in burn areas. Simple, straightforward dataset. And yet, R for some reason hates chestnut oak. My species are NRO, WO, and CHO. It will not report on CHO, no matter what I try. What gives? Examples of what I see in the console:  data.frame':    72 obs. of  4 variables:  $ site  : Factor w/ 24 levels "Arbutus Ridge 1 Low/Moderate",..: 1 1 1 2 2 2 3 3 3 4 ...  $ burn  : Factor w/ 4 levels "Control","High",..: 2 2 2 4 4 4 3 3 3 4 ...  $ sp    : Factor w/ 3 levels "CHO","NRO","WO": 1 2 3 1 2 3 1 2 3 1 ...  $ seedba: num  NA NA NA 1.85 NA ...  Call: lm(formula = seedba ~ burn + sp + burn * sp, data = data)  Residuals:     Min      1Q  Median      3Q     Max  -5.1287 -1.0779 -0.3294  0.1242 12.4723   Coefficients: (1 not defined because of singularities)                    Estimate Std. Error t value Pr(>|t|) (Intercept)          0.7720     1.8144   0.426    0.675 burnHigh             0.1979     2.7715   0.071    0.944 burnLow              1.1491     2.7715   0.415    0.683 burnModerate         2.1360     3.1426   0.680    0.505 spNRO                1.1394     2.5659   0.444    0.662 spWO                -0.2964     2.5659  -0.116    0.909 burnHigh:spNRO      -1.4967     4.1901  -0.357    0.725 burnLow:spNRO        4.4422     3.6887   1.204    0.243 burnModerate:spNRO  -2.5252     5.1318  -0.492    0.628 burnHigh:spWO            NA         NA      NA       NA burnLow:spWO        -1.3814     4.9133  -0.281    0.782 burnModerate:spWO   -2.6117     5.1318  -0.509    0.617  Residual standard error: 3.629 on 19 degrees of freedom   (42 observations deleted due to missingness) Multiple R-squared:  0.4196,    Adjusted R-squared:  0.1141  F-statistic: 1.373 on 10 and 19 DF,  p-value: 0.2644   It still won't show CHO:  Call: lm(formula = seedba ~ -1 + burn + sp + burn * sp, data = data)  Residuals:     Min      1Q  Median      3Q     Max  -5.1287 -1.0779 -0.3294  0.1242 12.4723   Coefficients: (1 not defined because of singularities)                    Estimate Std. Error t value Pr(>|t|) burnControl          0.7720     1.8144   0.426    0.675 burnHigh             0.9700     2.0951   0.463    0.649 burnLow              1.9212     2.0951   0.917    0.371 burnModerate         2.9080     2.5659   1.133    0.271 spNRO                1.1394     2.5659   0.444    0.662 spWO                -0.2964     2.5659  -0.116    0.909 burnHigh:spNRO      -1.4967     4.1901  -0.357    0.725 burnLow:spNRO        4.4422     3.6887   1.204    0.243 burnModerate:spNRO  -2.5252     5.1318  -0.492    0.628 burnHigh:spWO            NA         NA      NA       NA burnLow:spWO        -1.3814     4.9133  -0.281    0.782 burnModerate:spWO   -2.6117     5.1318  -0.509    0.617  Residual standard error: 3.629 on 19 degrees of freedom   (42 observations deleted due to missingness) Multiple R-squared:  0.5712,    Adjusted R-squared:  0.323  F-statistic: 2.301 on 11 and 19 DF,  p-value: 0.05338


How do XBox Live Achievements Work if You're Offline?

If you're offline when your game would normally assign you an achievement, what happens? Are you notified, and it syncs to your profile later when you are online? Do you just miss out on it?


How can I make a perfect sweep with bevel object in Bezier curve(3d) (Pipe)

I can't create a Pipe 3D without annoying shrinkage in the corner of my bezier curve using bevel object. Those are my step.  I create a bezier curve (on 3 axes) transforming two corner in Vector corner (to have a perfect angle)  I generate a circle and using bevel object I sweep the circle along the bezier (3d).  Easy...BUT I can't undestand how to solve the shrinkage in the corners. Other artifacts (such as compenetration) comes when instead using a Vector corner I use a normal (automatic) corner and model it in 90 degree shape.     Thanks


Why CNN input images are often square shaped?

Why it's so that in convolutional neural networks we generally take the image dimensions of input image to be generally a square? We even do padding to make it happen. Why not different dimensions?  What I understood is that computer computes multiplication and division (by 2) much faster than the rest.  Can someone shed some light on this?   Any link or reference will be appreciated. I already have CS231n notes and lecture slides.


What is the best way to prove that the theorem is tight? In other words, how do I find a sequence of length $ n^{2} + 1 $ that does not contain any non-decreasing or non-increasing sub-sequence of length $ n + 2 $?


Multiple Java versions running concurrently under Windows

We have a couple of applications running on Java 5 and would like now to bring in an application based on Java 6. Can both java versions live together under Windows?   Is there any control panel to set the appropriate Java version for different applications, or any other way to set up, what version of Java will be used to run that particular application?


How to prove $\sum_{i=0}^{n} \binom{n}{i}=2^n$

I need to prove this equality,  $$\sum_{i=0}^{n} \binom{n}{i}=2^n$$  but I don't know how to start and what even to do


How to create an array of circles within a circle?

I'm looking to place exactly 750 filled circles in a random array within a circular shape, essentially a static version of    I've considered scatter graphs (but that seems as painful as manually placing each circle), the transform effect and blend tools (but these seem linear, or require going along, rather within a path). I wonder whether I need to script this, but I've never done that before so would love it if you could step out exactly how I should go about this?   One user has suggested making a custom brush, however this does not allow me to specify an exact number of circles (I need to be sure there are 750). One thing I didn't mention earlier is that I want to select and alter the colour of 162 of the circles once they've been drawn, so they need to remain editable.


Do there exist whole number solutions to $27y + 23 = 32x$ and $81y + 85 = 128x$?

So I think I found these  $$27y + 23 = 32x$$ $$81y + 85 = 128x$$ in a text-book or something, and it was a graphing problem. (These are not simultaneous equations, they are separate.)  I tried to find integer solutions to this and after putting in some numbers I still couldn't find any.   I used some graphing software and still could not find any integer solutions for $x, y \in \Bbb Z$.  So I wonder, do any solutions exist? But more importantly, is there a technique for checking if equations like these actually have integer solutions, if so what is the technique.  This isn't overly important, but if there was such a technique that would be helpful.  Thank you.


Hi I am unable to download a python module dm.smlsec.binding 1.0b3. The following error is what I get. I have attached my log file please help me sorting out  ------------------------------------------------------------ /usr/local/bin/pip run on Thu Jul 18 12:23:36 2013 Downloading/unpacking dm.xmlsec.binding Running setup.py egg_info for package dm.xmlsec.binding Traceback (most recent call last):   File "<string>", line 16, in <module>   File "/tmp/pip-build-student/dm.xmlsec.binding/setup.py", line 199, in <module>     **setupArgs   File "/usr/lib/python2.7/distutils/core.py", line 112, in setup     _setup_distribution = dist = klass(attrs)   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 260, in __init__   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 284, in fetch_build_eggs   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 569, in resolve     dist = best.get(req.key) pkg_resources.VersionConflict: (lxml 2.3.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('lxml>=3.0')) Complete output from command python setup.py egg_info: Traceback (most recent call last):   File "<string>", line 16, in <module>   File "/tmp/pip-build-student/dm.xmlsec.binding/setup.py", line 199, in <module>     **setupArgs   File "/usr/lib/python2.7/distutils/core.py", line 112, in setup     _setup_distribution = dist = klass(attrs)   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 260, in __init__   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 284, in fetch_build_eggs   File "/usr/local/lib/python2.7/dist-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 569, in resolve     dist = best.get(req.key) pkg_resources.VersionConflict: (lxml 2.3.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('lxml>=3.0')) ----------------------------------------  Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-student/dm.xmlsec.binding  Exception information: Traceback (most recent call last):   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/basecommand.py", line 139, in main     status = self.run(options, args)   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/commands/install.py", line 266, in run     requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 1057, in prepare_files     req_to_install.run_egg_info()   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/req.py", line 236, in run_egg_info     command_desc='python setup.py egg_info')   File "/usr/local/lib/python2.7/dist-packages/pip-1.3.1-py2.7.egg/pip/util.py", line 662, in call_subprocess     % (command_desc, proc.returncode, cwd)) InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-student/dm.xmlsec.binding


Isomorphic ring with the $R / I $ for $R =\{ a+b \sqrt2 \vert a \in \mathbb{Z}, b \in \mathbb{Z}\} $ and $I= \langle 4+\sqrt2 \rangle$

Let the Ring, $R = \{ a+b \sqrt2 \vert a \in \mathbb{Z}, b \in \mathbb{Z}\}$(Euclidean domain)  Say $I = \langle 4+\sqrt2 \rangle \lhd R$   Find the number of the idempotent(I.e. $a^2 = a$ ) in $R/I$.    All the $\vert R/I \vert$ and $char(R)$ would be $14$. But I can't find the next step to find the isomorphic ring with the $R/I$. Any help would be appreciated.  p.s) My guess is $R/I \simeq \mathbb{Z}_{14}$. So the number of the idempotenet is $4$ (By $C.R.T$)


Open-source virtual machine apps supporting larger VRAM than 256 MB

I have tried Virtual Box  running Windows 10 with it, but all i get is 256 MB of video memory, while I have a 4 GB VRAM video card.   When I try with VM Ware the video memory is increased to about 3GB and Windows runs much faster and better.   VM WARE cost around 190 GPB and that's a lot.   Are you aware of any better open-source solutions ? Is there like another virtualization tool that runs smooth as VM ware but free or cheaper


How can I move a discussion to chat before being prompted?

I posted an answer to a question, and a user posted a comment that I feel is better handled in chat.  In a previous question, I was prompted to move the comment to chat when it went over a certain limit.  Can I move comments to chat without having hit that limit?


Is there an irrational number $a$ such that $a^a$ is rational?

It can be proved that there are two irrational numbers $a$ and $b$ such that $a^b$ is rational (see ) and that for each irrational number $c$ there exists another irrational number $d$ such that $c^d$ is rational (see ).  My question is: Is there an irrational number $a$ such that $a^a$ is rational (and how could you prove that)?


How to change the value of a parameter on a loop?

I want to change the value of the parameter sumOfCorrect. For some reason it isn't changing. Any suggestions? Basically the program asks ten simple mathematic questions and i want it to print how many of those did the user anwsered correctly.  import java.util.Scanner; import java.util.Random; public class HardEx3{     public static void main(String[] args){         Scanner scanner = new Scanner(System.in);         Random random = new Random();         int sumOfTimes = 0;         int sumOfCorrect = 0;         do{             int n1 = 1 + random.nextInt(9);             int n2 = 1 + random.nextInt(9);             multiplication3 test = new multiplication3();             test.question(n1,n2,sumOfCorrect);             sumOfTimes += 1;             System.out.println(sumOfCorrect);         }while(sumOfTimes < 10);     } } class multiplication3{     Scanner scanner = new Scanner(System.in);     Random random = new Random();     int question(int n1, int n2,int sumOfCorrect){             System.out.println("Με τι ισούται " + n1 + " " + "επί " + n2 + "?:");             int rightAnswer = n1 * n2;             int answer = scanner.nextInt();             if (rightAnswer == answer) {                 int positiveM = 1 + random.nextInt(4);                 switch (positiveM){                     case 1: System.out.println("Πολύ καλά!");                         break;                     case 2: System.out.println("Εξαιρετικά!");                         break;                     case 3: System.out.println("Καλή δουλειά!");                         break;                     case 4: System.out.println("Συνέχισε το ίδιο καλά!");                         break;                 }                 sumOfCorrect += 1;             }             else{                 int negativeM = 1 + random.nextInt(4);                 switch (negativeM){                     case 1:System.out.println("Όχι, παρακαλώ προσπαθήστε ξανά.");                         break;                     case 2:System.out.println("Λάθος, προσπάθησε άλλη μία φορά.");                         break;                     case 3:System.out.println("Μην τα παρατάς!");                         break;                     case 4:System.out.println("Όχι, συνέχισε την προσπάθεια.");                         break;                 }             }             return sumOfCorrect;     } }


Is it possible to find the index of a list in a for loop without using a generator?  for character in string:     if character == "a":         print(get_index_somehow)   I am aware that you could use a generator in a for loop and get the index that way  for i in range(len(string)):     character = string[i]         if character == "a":             print(i)   Just curious if it's possible


Shall we capitalize the word after colon?  For example:     The question is: S/shall we capitalize "s" in "shall"?   Another example,      For example:          E/every marginal distribution of a multivariate normal distribution must be a univariate normal distribution.   S/so it is for the multinomial distribution (which is the multivariate generalization of binomial distribution).   S/so it is for Dirichlet distribution (which is the multivariate generalization of beta distribution)   N/not sure  for multivariate t distribution.      (In other words, should each of those individual bullets be capitalized, or not?)


Reverse two finger scroll direction (natural scrolling)?

Two-fingered scrolling is working fine, but is there a way that I can reverse the direction (natural scrolling)? It seems backwards opposed to the way OSX does it.


I am a totally new Ubuntu user.  I had Windows 7 and Ubuntu 14.04LTS side by side.I have 2 HDD- one 160 GB and 1TB.   I decided to delete ubuntu and change to ubuntu 12.04 as 14.04 does not have much softwares.. I opened Disk Management and deleted two partitions which were unnamed(so they belonged to Ubuntu).(Three of the local disks changed to dynamic) I forgot to proceed to the further steps which said to fix MBR(I got no idea what it is). I restarted the machine and I got this:  error:no such device .........  Entering rescue mode...  grub rescue>_ I tried to use Boot Repair and upgrade grub,but Boot Repair is giving an error and grub update says there is not enough space.   I don't know what to do.  Please help me .. Please !!


apt-get: How to find link for packages being installed (and skip them)?

I want to use  on Ubuntu 16.04, which requires CUDA 9.0, not the latest 9.1. However, I previously had CUDA 9.1 installed. After running  sudo apt-get remove --purge cuda* && sudo apt-get autoremove   I confirmed that /usr/local contained no cuda folders. Then,  I followed the  to install CUDA 9.0 using the .deb. However, when I sudo apt-get install cuda, the confirmation message begins with:  The following NEW packages will be installed:   cuda cuda-9-1 ...   and other references to CUDA 9.1.  Question: Why is this 9.1 version being installed? Where is this being linked from?  Here is the output from apt-key list, if helpful:  /etc/apt/trusted.gpg -------------------- pub   1024D/437D05B5 2004-09-12 uid                  Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com> sub   2048g/79164387 2004-09-12  pub   4096R/C0B21F32 2012-05-11 uid                  Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>  pub   4096R/EFE21092 2012-05-11 uid                  Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>  pub   1024D/FBB75451 2004-12-30 uid                  Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu.com>  pub   1024D/7FAC5991 2007-03-08 uid                  Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com> sub   2048g/C07CB649 2007-03-08  pub   4096R/D38B4796 2016-04-12 uid                  Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com> sub   4096R/640DB551 2016-04-12 [expires: 2019-04-12] sub   4096R/997C215E 2017-01-24 [expires: 2020-01-24]  pub   4096R/48457EE0 2016-05-24 [expires: 2018-05-24] uid                  Bazel Developer (Bazel APT repository key) <bazel-dev@googlegroups.com> sub   4096R/43FF45F9 2016-05-24 [expires: 2018-05-24]  pub   4096R/7FA2AF80 2016-06-24 uid                  cudatools <cudatools@nvidia.com>  /etc/apt/trusted.gpg.d/graphics-drivers_ubuntu_ppa.gpg ------------------------------------------------------ pub   4096R/1118213C 2015-08-12 uid                  Launchpad PPA for Graphics Drivers Team  /etc/apt/trusted.gpg.d/webupd8team_ubuntu_atom.gpg -------------------------------------------------- pub   1024R/EEA14886 2010-05-04 uid                  Launchpad VLC


Markdown bug (HTML code right after numbered list)

If I add a numbered list then empty line, then paste HTML and mark this HTML as "code" by adding indentation - the HTML becomes invisible. Like this:   1.blah  2.blah  3.blah     Workaround: add some non-empty text between list and HTML code.  It was just reproduced at Stack Overflow.


I am working with an Azure SQL Server database in SSMS 2016. I have Intellisense enabled in Tools -> Options -> Text Editor -> Transact-SQL -> Intellisense, however I have never had Intellisense working on this computer. Any advice on how to resolve this would be appreciated.


Prove that for positive real numbers $a,b,c$ we have $\frac{a}{b+c}+ \frac{b}{a+c}+\frac{c}{a+b} \geq \frac{3}{2}.$

Prove that for positive real numbers $a,b,c$ we have $$\dfrac{a}{b+c}+ \dfrac{b}{a+c}+\dfrac{c}{a+b} \geq \dfrac{3}{2}.$$   Attempt  I tried using AM-GM and got $ \dfrac{a}{2\sqrt{bc}}+\dfrac{b}{2\sqrt{ac}}+\dfrac{c}{2\sqrt{ab}} \geq \dfrac{a}{b+c}+ \dfrac{b}{a+c}+\dfrac{c}{a+b}$ but that doesn't seem to help since that gives an upper not lower bound.


Removing some hostile creatures in minecraft

Is it possible to remove some of the enemies that spawn during the night but retaining some? I actually like playing on a non-peaceful mode but I don't like those creatures (enderman, creeper) that can destroy my structures and other works of art while still retaining some threats during the night and cave exploration.


"I have already [seen]" vs "I already [saw]"

I have already (past participle) I already (simple past)  I feel like when I'm reading literature or any serious writing, the present perfect is always used with "already". I would guess that this use is preferred, and I always make the effort to use it over the alternative. However, I often hear the simple past used with "already" in conversation, as in "I already saw the movie." What is the status of this usage? Is it "acceptable", colloquial-only, really bad? It sounds really grating to my ears, but I'd like to make sure.


Context has null objects in support class

I try add method in another class which need help me processing errors. And when I need get toast, I get error. How can I decide this situation? Please, help me and explain me how use contexts. Thank you.  This my error:     java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference   And this my code:  public class DataHelper extends BaseAppCompatActivity { protected Intent intent;  /**  * Выводит сумму услуги  * @param price цена  * @param discount скидка  * @return  */ public static Double Sum (double price, double discount){     Double sum = null;     if (price == 0 && discount == 0){          return null;     } else if (price == discount){          sum = price;     } else if (price > discount || price < discount){          sum = price - discount;     }     return sum; }  /**  * Обработка ошибок  * @param errorCode код ошибки  * @param errorDescription описание ошибки  */ public void processingError(String errorCode, String errorDescription){     switch (errorCode){         case "inside":             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "method_not_found":             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "method_access_denied":             intent = new Intent(this, AuthorizationActivity.class);             startActivity(intent);             finish();             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "bad_authorization":             intent = new Intent(this, AuthorizationActivity.class);             startActivity(intent);             finish();             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "bad_client_secret_or_id":             intent = new Intent(this, AuthorizationActivity.class);             startActivity(intent);             finish();             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "app_access_denied":             intent = new Intent(this, AuthorizationActivity.class);             startActivity(intent);             finish();             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "wrong_params":             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "wrong_param_value":             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;         case "object_not_found":             Toast.makeText(getApplicationContext(), errorDescription, Toast.LENGTH_SHORT).show();             break;     } }   }


Why is there no 32 bit ISO for the new Ubuntu 18.04?


how to convert ajax returned json C# datetime in date in javascript

I have the following problem.  using ajax the return in json is  "/Date(1540522800000)/"   In the backend the data is  DateTime? and I using this code to convert it to a something that I human can read.  if (resultado.Prazo) {             var today = new Date(resultado.Prazo);             var dd = today.getUTCDate();             var mm = today.getUTCMonth() + 1; //January is 0!              var yyyy = today.getUTCFullYear();             if (dd < 10) {                 dd = '0' + dd             }             if (mm < 10) {                 mm = '0' + mm             }             date = dd + '/' + mm + '/' + yyyy;         }   But the result I getting is NaN/NaN/Nan  Any ideas in how to do it?


Undefined reference to constructor in a generic class?

FYI I am using eclipse CDT on ubuntu. I am getting started with c++. I don't know what the issue is. One of my friends has shown me how to create a generic class with a different example. This is how he did it. I tried going through many other Stack Overflow questions but all of them had errors that my program didn't have. Thanks in advance.  Set.h:  #ifndef SET_H_ #define SET_H_  #include <vector>  template <typename T> class Set { private:     std::vector<T> _set_arr;  public:     Set();     ~Set();     void Add(T);     void Remove(int);      // FRIENDS     template <typename S>     friend Set<S>& operator +(Set<S>, Set<S>); };   #endif /* SET_H_ */   Set.cpp:  #include "Set.h"  template <typename T> Set<T>::Set()     : _set_arr{} {}  template <typename T> Set<T>::~Set() {}  /**  * Adds a value to the Set  */ template <typename T> void Set<T>::Add(T val) {     _set_arr.push_back(val); }  /**  * Removes a value from the Set  */ template <typename T> void Set<T>::Remove(int index) {     _set_arr.erase(_set_arr.begin() + index); }  template <typename S> Set<S>& operator +(Set<S> &a, Set<S> &b) {     Set<S> *_set_1 = new Set<S>;     // Pre-reserve     _set_1->_set_arr.reserve(         a._set_arr.size(), b._set_arr.size() );     // Insert     _set_1->_set_arr.insert(_set_1->_set_arr.end(), a._set_arr.begin(), a._set_arr.end() );     _set_1->_set_arr.insert(_set_1->_set_arr.end(), b._set_arr.begin(), b._set_arr.end() );     return *_set_1; }   Driver:  #include <iostream> #include "Set.h" using namespace std;  int main() {     Set<int> *s1 = new Set<int>;      return 0; }   Error Messages:  /home/ajay/code/eclipse_workspace/GenericSet/Debug/../src/main.cpp:14: undefined reference to `Set<int>::Set()' makefile:45: recipe for target 'GenericSet' failed /home/ajay/code/eclipse_workspace/GenericSet/Debug/../src/main.cpp:14: undefined reference to `Set<int>::~Set()'


How get rid of -bash: /usr/{package}: No such file or directory

First, when I never had installed sl:  diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   traslaction: "The program 'sl' is not currently installed. You can install it by typing:"  But when I'm tired of it and I remove it by typing sudo apt-get remove sl per example...  I get this when I type sl:  -bash: /usr/games/sl: Ficheiro ou directoria inexistente   translate: "-bash: /usr/games/sl: No such file or directory" instead of:    diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   This appears with others packages too...  How I get rid of this: -bash: /usr/games/sl: Ficheiro ou directoria inexistente ?  I want see the original:  diogosaraiva@Ubuntu:~$ sl O programa 'sl' não está instalado actualmente. Pode instalá-lo escrevendo: sudo apt-get install sl   Output of type sl  sl está hasheado (/usr/games/sl)


In Pokemon X and Y, a new Pokemon called Vivillion was released. It is a butterfly, but the interesting part about it is its patterns. It seems like for each region, it has a different pattern. How many are there that can be obtained? I want to collect all of them for fun.


Image Alpha Background Renders Black when using "Import Images as Planes"

I must be missing something here.  I'm doing an extremely simple Import Image as Plane using the AddOn and the imported image has an alpha background but it renders (and even previews in the material preview) as black where the alpha background should be.  When I import, I select Emission & Transparent so the material setup is automatic.  I've read similar issues but people are typically missing the transparent node and connecting the Alpha channel from the image into the Mix Node factor.  But this is all here.  I must be missing something really stupid but I've wasted so much time trying to fix this thing.  Any help would be greatly appreciated.  Not sure if it matters but I'm using 2.74 RC2.  Many thanks!  I created this dummy blend file to test outside my project but problem still exists.  Here is the simple .blend file:


What would be a viable design alternative to nesting an interface inside a concrete class?

When I read about nesting an interface inside of a class, the intention appears to be to encapsulate the abstract behavior of the interface through composition. However, to me it makes more sense to create the interface outside the class, then use a getter/setter and return an instance of the interface type. There must be a benefit that I'm not seeing. Is this simply a matter of "choice".


Is there a way to select multiple sprites from a sprite sheet in GIMP?

After you've made the background transparent, color selected the background and inverted the selection to outline all the character sprites:  Is there a shortcut or some quicker method/program/tool to turn each sprite into an individual selection and then turn each selection into an individual layer? If not with GIMP, are there any other free programs that will allow you to do this?


How to read from a file if one is given in the command line c++

How should I read from a file if there is one given as a command line argument, if not I would like to read from std::cin. I tried to solve this with pointers to istrem, but is there a better way.


How do you prevent your JavaScript / HTML5 web game from being copied or altered?

I'm in the middle of planning a game built using JavaScript and HTML5.    I'm having trouble understanding how you could prevent someone from simply copying the JavaScript from the web server and either making their own game with it (not my biggest concern), or substituting their own JavaScript functions and dashing any hope for reliable clients in the wild if the game was to eventually support multiplayer.  Can anything be done to prevent just anybody from reading the JavaScript?    If not, should all game processing be taking place on a server somewhere with the client's only responsibilities being capturing user input and drawing graphics?


How to check if an object has certain properties

I have an object with some very specific keys. How can I check if another object has exactly the same keys? For example: let myOb = {   name: "somebody",   class: {     number: 9,     section: "C"   },   address: {     house: 22,     street: "Eg street"     PIN: 7893   } }  if (newOb.containsAll(myOb)) { // this is just a replacement function   // do stuff }  I want to match the newOb to myOb and see if they have the exact keys. So, newOb should have a name, class, address; newOb.class should have a number and section; newOb.address should have a house, street and PIN. I am already aware of hasOwnProperty(). I want to know if there is a easier way to do this were multiple keys are involved.


I'm new to Blender and I was getting hooked on this program. I was working on a project using the viewport shading set to Rendered with the EEVEE render engine because I don't have a very powerful graphics solution. However, last days, the materials on this project didn't appear in viewport shading, or even in the final render. All the previews of the materials have become completely transparent. I thought it was just the damaged project, but unfortunately this problem occurred on all old and new projects. I leave some images and a file as examples. Opening the file on my friend's computer, the materials work (EEVEE), but I can't work on his machine. One more thing, using Cycles the materials work, but using EEVEE they don't work. Unfortunately I can't work using Cycles, it takes too much time and sometimes blender crashes. I tried looking online for solutions to problem like mine or who had a similar experience and I have already tried to apply their various solutions, but none of these solve my problem:       The last topic I didn't understand what should happen if I press Ctrl + Alt + B? Under the View menu, I didn't find View Borders, but using the blender command search I found Clear Render Border, I tried to activate the command but it didn't work. I also tried reinstalling Blender, but it doesn't seem to work and it even remembered my personal configurations! I also tried installing add-ons to try to find an alternative to the EEVEE engine (Radeon pro render [rpr], EEVEE-Preset) but no one of them are for me or repair the EEVEE engine. If you find this information useful to solve my problem as computer I have a  Ryzen 5 2600 processor, Radeon Rx 580 4 GB graphics card 16 GB of RAM.  Just a clarification, I use Blender 2.90.1, can someone tells me a way to restore the correct functioning of EEVEE materials?  Unfortunately I no longer know where to turn and I'm crazy to see all my projects be transparent.


Does an effect that imposes disadvantage on saving throws remove the advantage from a creature's Magic Resistance trait?

How would the Magic Resistance trait interact with effects that impose disadvantage on saving throws (e.g. the sorcerer’s Heightened Spell  option, the first bullet point from the  spell description, several of the diseases caused by the  spell, etc.)? Would such effects remove the advantage on such saving throws granted by a creature's Magic Resistance trait? Or would they all be useless against it?


Is it 3 hours in-game time or 3 hours real time? I have played for over 6 hours of actual play time, I have 7 women pregnant and none of them have delivered.


What is the best collation to use for MySQL with PHP?

I'm wondering if there is a "best" choice for collation in MySQL for a general website where you aren't 100% sure of what will be entered? I understand that all the encodings should be the same, such as MySQL, Apache, the HTML and anything inside PHP.  In the past I have set PHP to output in "UTF-8", but which collation does this match in MySQL? I'm thinking it's one of the UTF-8 ones, but I have used utf8_unicode_ci, utf8_general_ci, and utf8_bin before.


Differences in time remaining info when copying files

I am copying large files, started to copy and it said     "estimated time remaining: About 15 hours".    I had to restart the file copy after a while, emptying the destination folder and started the copy again, now it says      "estimated time remaining: About 17 hours".    I know this estimation is rough (right?), but is this normal?


C# Interfaces. Implicit implementation versus Explicit implementation

What are the differences in implementing interfaces implicitly and explicitly in C#?  When should you use implicit and when should you use explicit?  Are there any pros and/or cons to one or the other?    Microsoft's official guidelines (from first edition ) states that using explicit implementations are not recommended, since it gives the code unexpected behaviour.  I think this guideline is very valid in a pre-IoC-time, when you don't pass things around as interfaces.  Could anyone touch on that aspect as well?


Can I pass a type object to a generic method?

I have a FindAll method on my DataAccessLayer which looks like this:  public FindResult<T> FindAll<T>() where T : Entity, new()   and a client code that has a Type[] array which it needs to use to iteratively call the FindAll method with like this:  foreach (var type in typeArray) {         var result = DataAccessLayer.FindAll<type>();     ...   but the compiler complaints about "Type or namespace expected".. Is there an easy way to get around this? I've tried type.GetType() or typeof(type) and neither worked.  Many thanks in advance!


final ImageView imageView = (ImageView) findViewById(R.id.imageView); imageView.setImageResource(R.drawable.temp);   Error:     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference                             at com.example.administrator.correct.MainActivity$1.onItemClick(MainActivity.java:65)


Here is my question.   I want to put my tables exacty where I want in document so I use \begin{figure}[H] code.  but then, this problem appears.   If table does not fit the page, LaTeX puts it next page (I'm fine with it) but half of the previous page remains empty and my texts continues after the table.  I have read some solutions on the internet but people always give too complex answers that I dont understand or apply.  Waiting for your help. Thank you


jQuery create a empty DIV, load extern html Resource and remove the same with click

i try to load a html File in a div and to remove the html with a click on a id inside the html Resource. Clicking on id="load" create a empty div (id="externContent") within div (id="showContent") and load the extern Resource extern.php #wrapp into id="externContent". Successfully Click on id="close" deletes extern Resource inside div id="externContent". Successfully  Why does not it click on id="closeExtern" deletes extern Resource inside div id="externContent".  Basic html
Load

Close/div>id

   Script in Basic html  $('#load').click(function() {     $('#showContent').append('

');     $('#externContent').empty();     $('#externContent').load('extern.php #wrapp'); }); $('#close').click(function() {     $('#externContent').empty(); }); $('#closeExtern').click(function() {     $('#externContent').empty(); });   load extern.php  <!DOCTYPE html>  <meta charset="utf-8"> <title>Title</title>
 some content CloseExtern/span>


Why doesn't Tony Stark try to make a Vibranium Iron Man suit during Avengers: Age of Ultron?

I've read , but my question refers to the MCU after Iron Man 2, specifically during and post Avengers: Age of Ultron.  After seeing all of the Vibranium kept by Ulysses Klaw in Avengers: Age of Ultron, why did Tony never think to try and make a Vibranium Iron Man suit? In the same vein of thought, why hasn't he tried to make a suit of the more durable metals that he knows about such as Adamantium?  In short, I'm looking for canon reasons that Tony Stark hasn't at least mentioned/thought about/doodle-designed a "super-metal" suit yet.


Non-inductive, not combinatorial proof of $\sum_{i \mathop = 0}^n \binom n i^2 = \binom {2 n} n$

I've seen the identity $\displaystyle \sum_{i \mathop = 0}^n \binom n i^2 = \binom {2 n} n$ used here recently.  I checked for proofs here   I couldn't have figured out the combinatorial proof by myself, and the inductive proof assumes you already know the answer...  So my question is : do you know how to prove directly through computation that $\displaystyle \sum_{i \mathop = 0}^n \binom n i^2 = \binom {2 n} n$ ?


Do I need mkfs.ntfs for making a windows 10 bootable device?

I'm making a windows 10 bootable usb device to boot from because I forgot the admin password for my main computer via a fedora virtual machine on virtualbox(was installed before I forgot)  do I need mkfs.ntfs? seems to me that parted or fdisk already does the job with regards to formatting the file system as ntfs. Is this the case or did i misread something? What exactly is mkfs.ntfs meant to do?


how to generate data from cdf which is not in closed form?

i am working on a distribution whose pdf and cdf is $$f(x,\alpha,\beta)=\frac{(\frac{\beta}{\alpha})(\frac{x}{\alpha})^{\beta}}{(1+(\frac{x}{\alpha})^{\beta})^{2}}\frac{\sin(\frac{\pi}{\beta})}{(\frac{\pi}{\beta})}$$ $x>0$, $\alpha>0$, $\beta>0$ $$F(x)= \frac{\sin(\frac{\pi}{\beta})}{(\frac{\pi}{\beta})}\frac{1}{\beta}(\frac{x}{\alpha})^{1-\beta}\log{(1+(\frac{x}{\alpha})^{\beta})}-\frac{(\frac{x}{\alpha})}{1+(\frac{x}{\alpha})^{\beta})}-(\frac{1-\beta}{\beta})[(\frac{x}{\alpha})+\sum_{r=1}^{\infty}\frac{(-1)^{r}(\frac{x}{\alpha})^{1+r\beta}}{r(1+r\beta)}]$$ clearly, cdf is not in neat form. So how do I generate data from this cdf in r as inverse cdf method wont't apply here?


How do I allow a user to only run the apt-get update command with sudo?

I cannot figure out how to allow a user (in this case test) to only be able to run the apt-get update command with the sudoers file. When ever I try to add the user and then test it out it still does not allow the user to run the command.  Can someone please help me out? I have been researching this all day and can still not figure it out. I am probably typing in something wrong.  I'm using Ubuntu 14.04.


Momentum is conserved in the gravity of general relativity?

(Please excuse my English)  In Newtonian mechanics and gravity, these are obvious.   Momentum is conserved in gravity action. Momentum is conserved in real force action. Momentum is not conserved in fictitious force action. So gravity is a real force.   I do not know much about general relativity(=GR). However, I know these.   In GR, gravity is described as moving in spacetime curvature. So gravity is a fictitious force in GR.   Am I right?  If gravity is a fictitious force, momentum is not conserved in gravity of GR?


Is there an in-universe explanation as to why the Borg look and behave differently in The Next Generation than in First Contact/Voyager?

Is there an in-universe explanation, not just about the way they look, but for the fact the Borg behave differently in The Next Generation, compared to First Contact and Voyager?  Guinan's comments about the Borg in The Next Generation imply that they are completely different to the Borg in Voyager and First Contact.


Time Travel possibility and Paradoxes of The Past

can one travel back in time and if not so, what laws prevent time travel to the past. this is quite a challenge to understand.


How do you get the "object reference" of an object in java when toString() and hashCode() have been overridden?

I would like to print the "object reference" of an object in Java for debugging purposes. I.e. to make sure that the object is the same (or different) depending on the situation.  The problem is that the class in question inherits from another class, which has overriden both toString() and hashCode() which would usually give me the id.  Example situation: Running a multi-threaded application, where I (during development) want to check if all the threads use the same instance of a resource object or not.


Please explain the grammar behind these sentences

I have used these kinds of sentences in talking and writing for so long without really knowing the grammar behind them:  This resulted in my getting late It's unfortunate that even after his trying to convince her, she didn't agree He couldn't resist himself despite my warning him


Returning to Sweden after a 90 day visist

I returned from Sweden 11/20/18 after a 90 day visit there.  When can I return to Sweden for 30 days?


I'd like to know how to do two things with materials related to the Ocean Modifier:  1) Change the color depending on the depth of the water, and  2) Create some believable foam.  Both of these features should change as the ocean modifier plays back.  The attached image shows what I mean pretty well, methinks—you can see how the water changes to a darker blue where the water is a bit deeper, a lighter blue where it's shallower, and blends to a white where the foam should be. I also believe that this image was made with Blender's ocean modifier [EDIT apparently it's not, but the point still remains]. I'd like this to be possible regardless of lighting conditions.  Does anybody know how to create these effects with materials that use the ocean modifier?


I understand this has been asked before, as per search, but none of the other questions tried to engage [in my opinion] and provide an actual solution.  The Problem:  Lately, I've been feeling completely unwelcomed to the community of Stack Overflow, it seems as if questions that are deemed as "stupid" or "couldn't you just look up documentation" are down-voted.  The Specifics:  Just recently a pretty popular guy who obviously knew his stuff went super passive-aggressive on me with "[Just do X]?", I was trying to explain to him how to me, this is new and I don't have as much experience as him. Unfortunately, I see this is a recurring thing.  A suggestion: Now, surely, a question should have:   Good structure, name the problem, what you tried and what you think of as a solution. Be clear about it, don't add unecessary words, just precisely what is needed.    Give an example, if you can. These help a lot. If it's about code, post what you have so far.   There are plenty of questions that seem to follow these points and don't seem to be duplicates.  The search function is not perfect, therefore, we can't expect everyone to find their answers right away, just as I didn't myself on some questions.  If you think about it, they're low-quality, unfortunately, there's no clear distinction between stupid and simply being a newbie, in the community's eyes. I don't think most of them should be down-voted, instead...  The Solution:  My proposal is, if you think something's of low quality and I believe most people are mentally capable to distinct from trolling / straight-up low effort, just offer some improvements, link to another question and, well, do your part. That user will continue to ask questions the way he's done, if he's not told that's not the best way to do it, resulting in a ban, usually and a feeling of anxiety towards asking questions.  Obviously, I want to start a healthy discussion as to why this is happening, but can't help to say: We've all been there, give others a break, why is this happening and what can we do?


On most hobby Li-ion packs there is a prominently displayed C rating (typically 20 - 35), which tells you how many amps you can draw from it, in a multiple of the capacity.  I have never seen a C rating on a NiMH pack. Neither do you normally see how many amps you can draw from the battery.  What is a typical C rating for a NiMH battery?  Note: I am looking for an estimate, so if it's a range, go ahead and put that. I do not have a particular battery in mind.  EDIT:  I can see that I was misunderstood already by EM Fields. Let me try to clarify. The C rating refers to a constant with units of 1/hours which gives the peak amp draw in terms of the capacity, like this: Capacity [Ah] x C rating [1/h] = Max draw [A]


4 different letters and 4 addressed envelopes.

Question is : In how many ways can the letters be put into the envelopes, so that at least one letter goes to the correct address ?  Answer is 15.  All i could think of is : 4 envelop choices for each letter, so 4*4 = 16.  A little fertilizer for my withered grey-matter ?


Setting up ArcMap to debug scripts in PyCharm?

I'm wondering whether anyone succeeded at setting up ArcMap to debug python scripts in PyCharm. I've tried several times to configure both, but failed.


Understanding Variable Scope in JavaScript?

Hello friends  I was stuck with the following code output.  x = 1; var a = 5; var b = 10;  var c = function(a, b, c) {              var x = 10;             document.write(x);              document.write(a);                   var f = function(a, b, c) {                     b = a;                      document.write(b+"\n");                      b = c;                     var x = 5;                 }              f(a,b,c);              document.write(b);   }  c(8,9,10); document.write(b);  document.write(x);   the expected output is : 10  8  8  9  10  1 but was confused with the output why the value of b in 10  8  8  9  10  1 is not 9. How the value of b got 10 instead. Please help me to understand the concept.


Find all integer solutions to $7595x + 1023y=124$  Using the Euclidean algorithm I have found the $\gcd(7595,1023)=31$ and found the Bezout identity $31=52\cdot1023-7\cdot7595$ but I'm not really sure how to go about finding all solutions to that equation.   I believe you can divide the equation through by the $\gcd$ - which gives $245x+33y=4$ - but I'm not sure what to do next.


Sequence of iid random variables $\{X_n\}$ converges almost surely iff $X_1$ is degenerate.

Let $\{X_n\}_{n=1}^\infty$ be a sequence of iid random variables over a probability space $(\Omega,\mathcal{F},\mathrm P)$. Prove that $$\mathrm P\left(\lim_{n\to\infty} X_n \text{ exists}\right)=1$$ iff the distribution $\mu$ of $X_1$ is degenerate, i.e., $\mu(A)\in\{0,1\}$ for all  $A\in\mathcal{B}(\mathbb R)$, the usual Borel-measurable set.    What I have done:  I'm acquainted with the Kolmogorov's Zero-One law, then if $A\in\mathcal{T}$, then $P(A)\in\{0,1\}$. Where $\mathcal{T}$ is the $\sigma-$tail generated by the iid random variable sequence $X_n$. In this case $\sigma(X_1)=\mathcal{T}$.  I proved that $\{\lim X_n\quad\mathrm{exists}\}\in\sigma(X_1)$, therefore $\mathrm{P}(\{\lim X_n\quad\mathrm{exists}\})\in\{0,1\}$.   My intuition is if I prove that $\mathrm{P}(\{\lim X_n=c\})=1$ (for some $c\in\overline{\mathbb{R}}$), then it follows directly that $\mu$ is degenerate. I found in Shiryaev's Probability (second edition) that if $Y$ is  $\mathcal{T}$-measurable, then $\mathrm{P}(\{Y=k\})$ is precisely 1 (for some $k\in\overline{\mathbb{R}}$), but I don't know how to prove the previous claim, but I know that $\lim X_n$ is $\mathcal{T}$-measurable.


What is the distribution of $Y = e^X$ when $X$ is normal?

What is the distribution of $Y = e^X$ when $X$ is normally distributed?  Am I supposed to use characteristics function of normal random variable ?


How to disable jquery validate when form is submitted?

Just want to have a partial Save function on my page.  so when a user clicks on Save for Later, no validation is performed. While a click on Save and Submit will trigger the validation before the form is submitted.   The buttons are:  <button type="submit" name="Action" value="SaveForLater">Save for Later</button> <button type="submit" name="Action" value="SaveAndSubmit">Save and Submit</button>   I have the validate() function in place already.  $('#formEdit').validate({     rules: ..,     messages: ...,     ignore: ..., });    How can I by pass validate when Save for Later is clicked?


How can I /setblock signs with text in MCPE?

Is there a way in which I can /setblock signs in MCPE, with text already applied? I've tried the following but I don't know how to do the actual text: /setblock ~ ~ ~ standing_sign 0 replace  Is what I'm asking possible? and if it is, how can I do this?  Note: This question is specific to data tags in MCPE/Bedrock Edition to setblock signs. I don't know the Java OR MCPE format for putting text in signs. So, how do you use data tags in MCPE, specifically for signs?


Some English words only differ in their vowels: crisscross, dillydally, riffraff, etc. Is there a name for them?


How to apply conditional formatting only if cell has X value? [google sheet]

I have a sheet with statistical data to which I had applied color scale conditional formatting. Some rows I set to have green for highest and red for lowest number in row and other rows the other way around because I lower score would be better than lower.  But when applying a filter to the sheet and changing the order, I noticed that the conditional formatting got messed up and rows that I had set to have the highest number green had become red and visa versa.   Is it possible to solve this with a conditional formatting that is only applied when cell in another column has a certain value?  for example:   If the cell in column C in the same row has value "metric A" then apply color scale green to lowest en red to highest number.   and  if the cell in column C in the same row has value "metric B" then apply color scale red to lowest and green to highest number.   or is there a better way, or some basic google sheet conditional formatting rule that applies when using filters that I am not aware of?


Misplaced text on privilege information pages

Open up a privilege breakdown from the .  For this example, I'll use .  The "Privilege Type:" text should be before its related symbol. Instead, it's after.    This appears to be cross-network, as it is also displayed this way on  page. (Dark mode appears to be irrelevant)


Did the specific date Tony chose to go to the base have some significance?

In Avengers: Endgame, Tony Stark and Steve Rogers go to...     ...the Shield base in New Jersey, on a specific date in 1970.  Tony says it's a date that he knows that his father and Hank Pym will both be working there.   Why did Tony pick that day?  Picking the year seems obvious, but why that day?  I had guessed that perhaps...     ...that is Tony's birthday, and he knows that his father had been at work right before he was born.   But I don't know if there's any way to verify that inside the MCU.  Edited to add: I'm not concerned with why they would go there (that seems obvious, and the other question addresses it); I'm asking about the specific month and day Tony chose.


If $|\lbrace g \in G: \pi (g)=g^{-1} \rbrace|>\frac{3|G|}{4}$, then $G$ is an abelian group.

Assume that $\pi$ is an automorphism of a finite group $G$. Let $S$ denote the set $\lbrace g \in G: \pi (g)=g^{-1} \rbrace$. Show that if $|S|>\frac{3|G|}{4}$, then $G$ is an abelian group.    Anyone has any idea on how to solve this ? I have no idea how to start.


I have already read ,  but nothing seems to work.   I have the following code:   \documentclass{standalone} \usepackage{tikz} \usepackage{filecontents} \usepackage{pgfplots} \pgfplotsset{compat=1.12}  \begin{document} \begin{tikzpicture}   \begin{axis}     \addplot3 [surf, mesh/rows=1000, shader=interp] table[col sep=comma] {Results_CSV/F6/F6_TTF_adaptaAndskillAndWeightModif.csv};    \end{axis} \end{tikzpicture}  \end{document}   With the following data: . When I compile, I get the following error:   ! Package pgfplots Error: CRITICAL: shader=interp: got unsupported pdf shading  type '0'. This may corrupt your pdf!.   Which I don't understand. I have indicated the number of rows, so it should be OK right? Thanks a lot for the help.  edit: there are 4 columns per row in the data file as I would like to plot row 1, 2 and 3 as a 3d surface and use row 4 as a color, to represent the 4th dimension.


I tried getting a good measurement with my caliper, but the flexibility of the tire doesn't help much. Let's say I have a 26"x2.125" tire. I know this fits on an ISO 559mm bead seat diameter rim, and 26" = 660.4mm. 26":  The OD of the tire including the tread? The OD of the tire excluding the tread? When aired up or deflated? Means it fits a 559mm ISO BSD None of the above?  2.125":  Width of tread? Width of sidewall? Inflated or deflated?  Essentially, I'm converting the tire sizes to "height off rim in mm" and drawing them with a wheel in a web application, so I need to know how "tire size" translates to this measurement. I'm somewhat assuming that the fractional sizes can be converted to the same measurement, but I'm aware that they have certain differences - so any help there would be of value as well.  has been helpful, but still leaves me with the questions above.


unpacking tarball with hard links on a file system that doesn't support hard links

I got a tarball (let's say t.tar.gz) that contains the following files  ./a/a.txt ./b/b.txt    where ./b/b.txt is a hard link to ./a/a.txt.  I want to unpack the tarball on a network file system (AFS) that only supports hard links in the same directory (see ). Therefore, just unpacking it via tar -xzf t.tar.gz raises an error that the hard link ./b/b.txt cannot be created.  So far, my solution to the problem was to unpack ./t.tar.gz on a file system that supports ordinary hard links. Then pack it again with the option --hard-dereference as  proposes. And lastly, unpack that new tarball into the AFS.  As this is unsatisfactory for me, I'm asking if there is an easier way to get the content of the archive unpacked directly to it's final destination? Such as an equivalent option to --hard-dereference for unpacking instead of archiving?


A query regarding constant $\frac{1}{4\pi \epsilon_{0}}$ in Coulomb's Law

In our physics class we were discussing about Coulomb's Law and equation for the electrostatic force between two points: $$F_{e}=\frac{Q_{1}Q_{2}}{4\pi \epsilon_0 r^2}$$  From the equation a query arose which is for what reason does the constant involve $4\pi$.


Ubuntu 17.10./16.04. Black Screen after Hibernation

After hibernation my 16.04. Laptop shows me a blackscreen. I assume the keyboard is still responsive, because the back-lits on my keyboard worked.   I then upgraded from 16.04. to 17.10. and hoped the issue would be resolved. Unfortunately I still got a black screen after hibernation  uname -r returns me this:  4.13.0-31-generic


Why doesn't $\exp(x)$ have a gap at $x=0?$

How can we say that $\exp(0)=1$ when $\exp(0)=\sum_{n=0}^\infty \frac{0^n}{n!}=0^0+0+0+...$ which doesn't seem to have a defined value. Obviously $\lim_{x\to 0}\exp(x)=1$ and $e^0=1$ but I don't think the former proves that $\exp$ doesn't have a gap and the latter seems to me like an example of the tail wagging the dog.


how to get dynamic variable in a query of a shell script

The last piece of my script is only pending.  kindly refer to the code below.  master_db_user='root' master_db_passwd='123' master_db_port='3306' master_db_host='localhost' master_db_name='uppcldashboard'  Now=$(date +"%d-%m-20%Y")    #Preparing script   #SQL_Query='select * from test_table;'  #MySql Command to connect to a database   mysql -u$master_db_user -p$master_db_passwd -D$master_db_name -e  'select * from uppcl_amount_details into outfile "/created_files/uppcl.csv" fields terminated by "," lines terminated by "\n"';  mv /created_files/uppcl.csv /created_files/offline_collection$Now.csv  sed -i "1i ID","Cashier_id","Discom","Division_Code","division_Name" /created_files/offline_collection$Now.csv echo "End of the Script"   okay the main question is this.. so I have column in my table called posting_dates. because of posting date we are able to know that the data present is the table is of that particular date.  now the issue within my script is that i can't use any variable which chages in the query. it simply doesn't work as it takes the query as a statement.  so basically what i want is this   i to make such a query in which i don't need to mention any date. i want it to fectch data of that particular day. because i can't change the query every single time.   I can't be like where posting_date="2020-03-30", I need something that automatically makes changes in the query everyday. because it is gonna be used to make file of that particular date.  Really need Help on this people.  Thanks and Regards, Sagar Mandal


Is it possible to know which questions I have protected?

I have protected a few questions on a Stack Exchange website. Is it possible to know which ones? I don't remember them anymore.


getting Uncaught ReferenceError: checkAnswer is not defined when i try clicking on one of my answer choices in a quiz

I tried searching for the answer here but nothing worked. When I run my website, I press the start button and the question appears with multiple choice answers, when I try to click them I get Uncaught ReferenceError: checkAnswer is not defined even though i defined the function in my javascript file. I put an onclick sentence which is supposed to run the function and check if what the user clicks is the right answer this is my html for the quiz

 Start The Quiz!

       and this is my javascript function  function checkAnswer(answer) {   if (answer == questions[runningQuestion].correct) {     // answer is correct     quizScore++;     // change progress color to green     answerIsCorrect();   } else {     // answer is wrong     // change progress color to red     answerIsWrong();   }    if (runningQuestion < lastQuestion) {     runningQuestion++;     renderQuestion();   } else {     // end the quiz and show the score      scoreRender();     } }  note the onclick="checkAnswer('A') this seems to be the problem but i don't know how else to run my function from a user click to check the Answer. any help would be appreciated, i use node js, npm, and parcel 2 to run my website


What exactly does safe mode do? (Windows 7 and XP)

What does the OS change when it boots into safe mode, as compared to normal mode?


Why doesn't `git clone` clone all the branches?

If I do  $ git clone https://github.com/dtu-compute/docker-mongodb $ cd docker-mongodb $ git branch * master   but if you look at , there are two branches.  Question  Why don't I get all the branches with git clone?


In general usage (and hopefully correct usage) a "notifier" is someone who notifies.  What is the word for the person who is notified?  For example: "Instruct each [X] to respond to the notification within 3 days."


Show that $x^2+y^2 = 3$ has no rational solutions

I am working on the following exercise:  Show that $a^2+b^2 = 3$ has no rational solutions.  My proof goes as follows: Suppose there are two rational numbers $a = \frac{x}{d_1}$ and $b = \frac{y}{d_2}$ with $(x,d_1) = (y,d_2) = 1$ that solve the above equation. Then we can write: $$x^2d_2^2+y^2d_1^2 = 3d_1^2d_2^2 \tag{1}$$ Since $x$ and $y$ are integers this implies w.l.o.g. that $x^2 = 2d_1^2$ and $y^2 = d_2^2$. But this in turn implies that $x = \sqrt{2}d_1$, which is obviously not an integer, a contradiction. I think that this idea should work, but I think there should be a more elegant proof using the well known fact that for every odd prime $p$ holds  $$p = x^2 + y^2 \iff p \equiv 1 \bmod 4$$  , but I do not see how to do that here. Could you give me a hint?


Tried opening an existing project (created in 2.92) in 2.93 and Blender freezes on render.  Then I discovered that when I reset the program to defaults, cycles is no longer available.  However, it is enabled in Add-ons.  Am I missing something? NOTE: I have tried enabling "filter add-ons" in the Workspace settings, to no avail.  The other topic "why is cycles render engine missing" is not relevant to my issue.


I got this mesh,which was exported out of some engineering program like solidworks for example with STL FORMAT. Please help me understand how to fix this. Is there a way to fix such crazy ugly triangles?  I will link blend file with mesh:


How to extract particular string from elements of a list

I have a csv file with list of client details. I am pulling out a particular column from that file with this code: import csv  details = [] with open("userlist.csv", "r", encoding="utf8") as csv_file:     csv_reader = csv.reader(csv_file, delimiter=',')     for lines in csv_reader:       description.append(lines[27]) print (details)  I am getting this output in a list for multiple rows:'[Description]sentence1[Issue Details] *** Bunch of other data """timestamp":12:42PM,emailaddress:xyz@gmail.com', '[Description]aaa[Issue Details] *** Bunch of other data """timestamp":10:12AM,emailaddress:mmm@gmail.com' Now I want to extract the emailID of the user. So how should I do that?


How to prove this inequality $\frac{a}{b}\leq \frac{a+c}{b+d}\leq \frac{c}{d}$

How can I show that for positive reals $$ \frac{a}{b}\leq \frac{c}{d}, $$ that $$ \frac{a}{b}\leq\frac{a+c}{b+d}\leq\frac{c}{d}. $$ Thanks in advance.


I am new to regular expression and want to create two regexes for my .net application.  I have an input variable which stores an xml. Below is the xml  <Row> ...... </Row> <Row {optional}> ....  </Row> <Row {optional} header="true" {optional}> </Row>   I want 2 regexes:  1. Regex which selects Rows with header="true" 2. Regex which selects Rows which do not have header="true"  Regex only have to consider opening tag. eg:


Counting ways for $12$ card-hands to contain $4$ cards in each of three suits

In a card deck of $52$, I want to count the ways for $12$ card-hands to contain 4 cards in each of three suits.    I thought that it'd be:  The ways of picking first suit $\to 4$  The ways of having 4 cards with this suit $\to \binom{12}4$  The ways of picking first suit $\to 3$  The ways of having 4 cards with this suit  $\to \binom{12}4$  The ways of picking first suit $\to 2$  The ways of having 4 cards with this suit $\to \binom{12}4$    So total ways is: $4\cdot 3\cdot 2 \cdot \binom{13}4 ^3$.    My notes say this is incorrect but do not say why.


Let $V,W$ normed vector spaces, $V$ not empty and with a finite dimension. Prove that $L(V,W)$ is Banach, then $W$ is also Banach.


I am wondering about the "double possessive" I have been reading about.  I have a couple of sentences as an example:  He’s a new client of Jane and Kevin’s and a close childhood friend of Steven O’Neill’s.   I thought that the above sentence was correct, because it sounds natural to use the apostrophe S to me, in the same way that we say "he's a friend of mine."  However, I have heard people criticize sentences such as that one above as having a "double possessive" because of the OF as well as the apostrophe S.  Is the above sentence correct or should it be:  He’s a new client of Jane and Kevin and a close childhood friend of Steven O’Neill.  Thank you - any help would be greatly appreciated.


Is it possible to conquer an enemy system and not settle it?

I want to destroy an AI player that I am at war with but I don't necessarily want all of his systems.  Is there a way to just destroy and not settle an enemy system?


I am trying to make the annotation.image round. But I don't know how. How would i go about making a UIImage round.    //Customize Annotation func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {      let annotationIdentifier = "Identifier"      var annotationView: MKAnnotationView! = mapView.dequeueReusableAnnotationView(withIdentifier: annotationIdentifier)      if annotationView != nil {         annotationView.annotation = annotation     } else {         annotationView = MKAnnotationView(annotation: annotation, reuseIdentifier: annotationIdentifier)           annotationView.image = profileImage.image          annotationView.canShowCallout = true         annotationView.frame = CGRect(x: 0, y: 0, width: 25, height: 25)          annotationView.autoresizesSubviews = true         annotationView.rightCalloutAccessoryView = UIButton(type: UIButtonType.detailDisclosure) as UIView     }         return annotationView }   }


Can the sorcerer's Twinned Spell metamagic and the Enchantment wizard's Split Enchantment feature be used at the same time?

The Twinned Spell option for the sorcerer's  feature says (PHB, p. 102):  When you cast a spell that targets only one creature and doesn’t have a range of self, you can spend a number of sorcery points equal to the spell’s level to target a second creature in range with the same spell (1 sorcery point if the spell is a cantrip). To be eligible, a spell must be incapable of targeting more than one creature at the spell’s current level. For example, magic missile and scorching ray aren’t eligible, but ray of frost and chromatic orb are.  Similarly, the 's  feature says (PHB, p. 117):  Starting at 10th level, when you cast an enchantment spell of 1st level or higher that targets only one creature, you can have it target a second creature.  If a character with access to both Twinned Spell and Split Enchantment casts a spell that fulfills the requirements for both, can both features be used at the same time?


How do I change default settings of Vim editor such as setting auto indent, setting Tab space to 4 and changing text colors? Also how to set vim as the default code editor?


One hour Lufthansa transit time in Frankfurt from Bangalore to Dublin

I have bought a ticket to travel from Bangalore (India) to Dublin (Ireland) via Frankfurt (Germany). Both of the flights is of Lufthansa and as a part of the same ticket. The transit time I will have in Frankfurt is 1 hour. Last time when I travelled in the same route, there was 1 hour and 20 minutes of time available between changing aircraft, but the connecting flight was late and I was able to board comfortably. Therefore I am not able to estimate this time how long it may take. I was wondering if this is too little time.   Also, I would like to know what the possibilities are in the case of missing the connecting flight?


After logging in the user is not directed to the homepage

I noticed that when I login I get redirected to localhost/mysite/user/1 and not localhost/mysite or localhost/mysite/homepage. Why is this and what can I do about to make the user go to the homepage after logging in ?


Let $\alpha = \frac{1+\sqrt{5}}{2} \hskip 20pt \beta = \frac{1-\sqrt{5}}{2}$  be the two real roots of the quadratic equation $x^2 - x - 1 = 0.$ Prove that $f_n = \frac{\alpha^n - \beta^n}{\alpha - \beta}$ for all $n \in \mathbb Z^+$.  I'm confused as to how this could be simplified after doing the induction step where you add 1 to all of the "n's" making it, $f_n = \frac{\alpha^{n+1} - \beta^{n+1}}{\alpha - \beta}$


Start jQuery animation when content in visible viewport

I want to count up a number when the content is in the visible area of the viewport. At the moment, I've an animation but it starts on page load. So the user can't see it when he arrives at the content (bottom of the page).  Here's my JS code to count up the numbers:  $('.counter').each(function() {   var $this = $(this),       countTo = $this.attr('data-count');    $({ countNum: $this.text()}).animate({     countNum: countTo   },    {      duration: 8000,     easing:'linear',     step: function() {       $this.text(Math.floor(this.countNum));     },     complete: function() {       $this.text(this.countNum);       //alert('finished');     }    });    });   It is from this example:   Is there any way to start the animation when the numbers hit the visible area of the page?


How to decide if an effect is magical for Magic Resistance?

Some creatures have Magic Resistance:     The [...] has advantage on saving throws against spells and other magical effects.   We know from  that this works against Turn Undead, but does it work against Stunning Strike, Death Strike, Fey Presence, etc? How do we decide?


I'm trying to do some scenes which use a mixture of 3D backgrounds with 2D animated characters.The best way I've figured this out so far is to use a plane with an image sequence of pngs which hold the frames.  The problem with this method is Blender seams to only load image sequences based on image numbering. If I wanted to do a sequence which loops say, frames 0-5, then repeats 4-0 for the 'return' of the animation, I would have to load frames doubled up.  Is there a way, maybe with a script, to change the sequence order? I can see it as a useful plugin but my python skills are pretty much non existent.


three term asymptotic solution as $\epsilon \to 0$

In the limit as $\epsilon \to 0$, obtain a three-term asymptotic solution to the roots of the following equation.  $$\epsilon x^3+x^2-2x+1=0$$  I'm not too sure where to start


The Maximum possible order for an element $S_n$

Given the following groups, what is the maximum possible order for an element for   (a) $S_5$ (b) $S_6$ (c) $S_7$ (d) $S_{10}$ (e) $S_{15}$  My book justifies the answer as          (a) The greatest order is $6$ and comes from a product of disjoint cycles of length 2 and 3          (b) The greatest order is $6$ and comes from a cycle of length $6$      The other answers were justified exactly the same way, that is (c) 12, (d) 30, (e) 105  I do not understand how in (a) we even got the number "6" from $S_5$ and what disjoint cycles they are referring to. Could someone at least justify one for me?


$D_f = 0$ on a path connected open set implies $f = const$

Let $U \subseteq \Bbb R^n$ be an open set and let $f:U \to \Bbb R^n$ be a differentiable function. if $U$ is path connected and $D_f=0$ for every point in $U$, show that $f$ is constant ($D_f$ is the differential of $f$).   I thought about proving that $f$ is locally constant and then showing that if $f$ is locally constant and $U$ is path connected then $f$ is global constant, but it seems like a lot of work. Is there something simpler / shorter?


Read everything that's displayed in the terminal

I am creating a terminal application that writes stuff to the terminal. And in order to test it, I really should test what's actually displayed in the terminal. Is there a way to read the data that's actually displayed in the terminal somehow?   The terminal must be some file somewhere or something, so there must be some way to read what's there.  cat /dev/tty   seems to give me a stream of data that's in there..But I don't want to see key strokes, just what I have written.


Simple inequality in euclidean $n$ space

Let $x_1,...,x_n \in \mathbb{R}$. Then  $$ |x_1| + ... + |x_n| \leq \sqrt{n} \cdot \sqrt{ x_1^2 + ... + x_n^2} $$  Is this inequality true?   I have proved it for $n = 2$. For instance, it follows from the AM-GM inequality  $$ \frac{x^2 + y^2}{2} \geq xy \iff (x^2+y^2) \geq 2 xy \iff 2(x^2+y^2) \geq 2xy + x^2 + y^2 = (x+y)^2 \iff \sqrt{2} \sqrt{x^2 + y^2} \geq x + y$$  But, how can I prove this for the $n$ case? Induction does not seem to work well. Any help would be gratly appreciated. thanks


Comparing two Strings in SharedPreference

i set a shared preference variable:  SharedPreferences SPrefs; SPrefs.edit().putString("SomeStringVariable", "sometext").commit();   and then i retrieve it:  String test1 = SPrefs.getString("SomeStringVariable", "Empty");   then compare it:  if(test1 == "sometext") Toast.makeText(Main_Activity.this, test1, Toast.LENGTH_LONG).show();   Toast not works , it means test1 != "sometext" but if i remove "if" statement:  Toast.makeText(Main_Activity.this, test1, Toast.LENGTH_LONG).show();   Toast Works and "sometext" appears in emulator!   why this Occur?


Prove that $$\sum_{k=0}^n(-1)^k {{n}\choose{k}} = 0$$  I have no idea about how to approach this problem.


Probability proof with independent events

If events $A_1,...A_n$ are independent (in total), show that $$P\left(\bigcup\limits_{i=1}^nA_i\right)=1-\prod\limits_{i=1}^{n}\left(1-P(A_i)\right).$$  Could someone show how to prove this statement?


How to show hard disk file system format

I want to see what file system format my hard drive uses on Ubuntu server 14.04  (Like ext2, ext3, etc..)


If the normal at P to the hyperbola $\frac {x^2}{a^2}-\frac {y^2}{b^2}=1$ meets the transverse axis in G and the conjugate axis in G' and CF be the perpendicular to the normal from the center C then show that $$PF.PG=b^2\space and \space PF.PG'=a^2.$$ We know that the equation of the normal at parametric point $P\equiv(a\sec\theta,b\tan\theta)$ is given by  $$a\,x\cos\theta+b\,y\cot\theta=a^2+b^2$$   Equation of the transverse axis is $y=0$ and that of the conjugate axis is $x=0$.   Hence   $$G\equiv(\frac {a^2+b^2}{a}\sec\theta,0), \, G'\equiv(0,\frac {a^2+b^2}{b}\tan\theta)$$  C is the origin and CF is perpendicular to the normal. Hence   $$ CF\equiv b\,x\sec\theta-a\,y\tan\theta=0\implies y=\frac {b\,x\sec\theta}{a \tan\theta}$$   Substituting this in the equation of the normal we get   $$a\,x\cos\theta+b \,\cot\theta\,\frac {b\,x\sec\theta}{a\,\tan\theta}=a^2+b^2\ $$   implies  $$ (a^2 \cos\theta \sin^2\theta+ b^2\cos\theta)x=(a^2+b^2)\sin^2\theta$$  After finding the coordinates of F, the calculation becomes very complicated. So is there an easier way to approach the problem? I would love to see a pure geometric solution to this problem.


Identify original features corresponding to high singular/principal component values

In MATLAB, while SVD gives a diagonal matrix S of decreasing singular values, PCA gives a column vector LATENT of decreasing principal component values.   How can S be used to obtain a subset of original features that best describe the data? How can LATENT be used to obtain a subset of original features that best describe the data?   NOTE: QR decomposition in MATLAB gives a permutation vector E which enables the above.


I want to convert all apostrophes in this file to X:  Bob's book Bob’s book Bob′s book  # (Might look the same but actually different)   The first apostrophe is replaced as expected:  $ cat file | tr "'" "X" BobXs book Bob’s book Bob′s book   But the the two other kinds of apostrophe, strange things happen:  $ cat file | tr "’" "X" Bob's book BobXXXs book BobXX�s book  $ cat file | tr "′" "X" Bob's book BobXX�s book BobXXXs book   How to make it work?


I tried to solve this problem like:  Remainder of $3^2 / 7$ is $2$  Remainder of $3^3 / 7$ is $-1$  Then i square that, and I get  Remainder of $3^6 / 7$ is $1$  Then I can go all the way to:  Remainder of $3^{2016} / 7$ is $1$  Now how do I get to 2020? Or is there another way to solve this problem?