How can I repair grub? (How to get Ubuntu back after installing Windows?)

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


Cleaning NaNs with averages pre or post split?

I have a column with some NaNs in it and I want to replace those NaNs with the average/median/mode. Technically, the validation/ test data has never been seen before - so how could I include it in the average? That would bias the values. Do I "fit" the average to my training data only, just like scaling? Or do I take the average using the entire dataset?


how to nest a function inside an another function in php

I wrote some code to upload an image to a server. Now I wanted to add a function "imageresize" wich resizes the image to a predefinded height and width. When I run it I get a fatal error  what I've tried: I found a simple piece of code on the internet witch works and tried the same stucture in my script   <?php  function voegGebruikerToe ($naam, $Ww, $WwConfirm, $sqlInsert, $nameImage, $naamDiv) {       if(!empty($naam) and !empty($Ww) and !empty($WwConfirm)){         if ($Ww == $WwConfirm) {              $passHash = password_hash($Ww, PASSWORD_DEFAULT); // Creates a password hash              $sql1 = "INSERT INTO users (username, password) VALUES ('$naam', '$passHash')";                     if ($sqlInsert->query($sql1) === TRUE) {            //insert invevoerde data to database                 echo "ok";                           } else {              }           } else {             echo "your passwords doesn't match";         }     } else{         echo "Please enter all the fields.";     }      $file = $_FILES[$naamDiv]['tmp_name'];      $sourceProperties = getimagesize($file);     $fileNewName = $nameImage;     $folderPath = "/var/www/";     $ext = pathinfo($_FILES[$naamDiv]['name'], PATHINFO_EXTENSION);     $imageType = $sourceProperties[2];     $imageFileType = strtolower(pathinfo($_FILES[$naamDiv]['name'],PATHINFO_EXTENSION));               // Allow certain file formats     if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg"     && $imageFileType != "gif" ) {          echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed. <br>";      } else {          switch ($imageType) {               case IMAGETYPE_PNG:                 $imageResourceId = imagecreatefrompng($file);                  $targetLayer = imageResize($imageResourceId,$sourceProperties[0],$sourceProperties[1]);                 imagepng($targetLayer,$folderPath. $fileNewName. ".". $ext);*/                  break;               case IMAGETYPE_JPEG:                 $imageResourceId = imagecreatefromjpeg($file);                  $targetLayer = imageResize($imageResourceId,$sourceProperties[0],$sourceProperties[1]);                 imagejpeg($targetLayer,$folderPath. $fileNewName. ".". $ext);*/                 echo "works";                 break;               default:                 echo "Invalid Image type.";                 exit;                 break;         }           //move_uploaded_file($file, $folderPath. $fileNewName. ".". $ext);         echo "Image Resize Successfully.";     }       function imageResize($imageResourceId,$width,$height) {          $targetWidth =200;         $targetHeight =200;           $targetLayer=imagecreatetruecolor($targetWidth,$targetHeight);         imagecopyresampled($targetLayer,$imageResourceId,0,0,0,0,$targetWidth,$targetHeight, $width,$height);           return $targetLayer;     }    }  voegGebruikerToe($admNaam, $admWw, $admWwConfirm, $conn, "administrator", "ImageUser1");  ?>   the example code I found:  <?php  function x ($y) {       function y ($z) {         return ($z*2);     }      return($y+3); }  $y = 4; $y = x($y)*y($y); echo $y;  ?>    Fatal error: Uncaught Error: Call to undefined function imageResize() in /var/www/html/v0.2_webpagina_barchart (setupPage)/php/setUpPHP.php:75 Stack trace: #0 /var/www/html/v0.29_webpagina/php/setUpPHP.php(146): voegGebruikerToe('t', 't', 't', Object(mysqli), 'administrator', 'ImageUser1') #1 /var/www/html/v0.2_webpagina /setUp.php(4): include('/var/www/html/v...') #2 {main} thrown in /var/www/html/v0.2_webpagina/php/setUpPHP.php on line 75


Can anyone help me out and tell me what the icon circled in red is please as I have no idea Thanks in advance


Proving an equality exists in a closed segment of a function.

Well , it was hard thinking of a title but ...Anyway  let $f$ be a continuous function.  It is known that  $f(0)=f(10)$  Show that there exists a $"c"$ in the segment $[0,5]$ which will satisfy   $f(c) = f(c+5)$  Well, I tried a few things but I don't believe that they quite work ( they don't when I try to intuitively 'sketch' the function so..)  Do you guys have any tips on how to prove it?  Thanks!


Measures of residuals heteroscedasticity

This wikipedia  lists a number of techniques to detect OLS residuals heteroscedasticity. I would like to learn which hands-on technique is more efficient in detecting regions affected by heteroscedasticity.  For example, here the central region in the OLS 'Residuals vs Fitted' plot seen to have higher variance than the sides of the plot (I am not entirely sure in facts, but let's assume it's the case for the sake of the question). To confirm, looking at the error labels in the QQ plot we can see that they match the error labels in the center of the Residuals plot.  But how can we quantify the residuals region that has significantly higher variance?


How display output command and pipe it to next command?

I would like to dispay the ouput (STDOUT) and also pipe to the next command. I know "tee" to display the result and write to a file, but instead to write to a file, I want to pipe to another command.  Example :  $ command1 --option1 --option2 | MAGICCOMMAND | jq -e '.returnCode'   I would have the output from "command1 --option1 --option2" and "jq -e ..."


Recently I started to use Winedt and I have the following problem. When I compile a document, in case of an error I correct the lines. The thing is that in order to compile once more I have to either terminate the previous compilation process or wait until it is finished. But it often takes too long to wait so I abort by pressing the cancelling button or Shift + Esc.   Next thing that happens next time I try to compile the document:   ! File ended while scanning use of \@writefile.    Impossible to compile. A temporary solution to this problem is to delete .aux file and compile from scratch. But it becomes very annoying to do this every time.   Does anyone has an advice regarding this issue?


number of solutions for a system of integer equations

I want to find the number of integer solutions for the following system of linear equations without computing the actual solutions ($c_1,\ldots,c_n \in \mathbb{Z}$ and $r\in \mathbb{N}$ ) :  $x_1+x_2=c_1$  $x_3+x_4=c_2$  ...  $x_{2n-1}+x_{2n}=c_n$  $|x_1|+|x_2|+\ldots+|x_{2n}|\leq r$  $x_1,\ldots,x_{2n} \in \mathbb{Z}$


How to put a listing bloc and an image side-by-side?

for the finetuning I have to show a codelisting and the result as an image next to each other, otherwise it will be displayed on the next page and i have to crop it extremely.  Here's my progress so far:  \begin{lstlisting}[captionpos=b,caption={Alle HTML Überschriften (Quellcode)},label=lst:headings]
Überschrift erster Ordnung

Überschrift zweiter Ordnung

Überschrift dritter Ordnung

Überschrift vierter Ordnung

Überschrift fünfter Ordnung

Überschrift sechster Ordnung
 \end{lstlisting}  \begin{figure}[h] \includegraphics[height = 100px]{headings1} \caption{Alle HTML Überschriften (Ansicht) \label{headingsimage}} \end{figure}   How can I put them next to each other?


I want to create an alias for curl which automatically writes the file it curls into a file with the same name in the current directory.  For example:  % curl https://bootstrap.pypa.io/get-pip.py     curl https://bootstrap.pypa.io/get-pip.py > get-pip.py   Is there a way to make the alias read the following argument and insert it into the actual executed script like this?


Find all functions $f:\Bbb R$\{0, 1} $\to \Bbb R$, such that $f(x) + 2f(\frac{1}{x}) + 3f(\frac{x}{x-1}) = x$

Find all functions $f:\Bbb R${0, 1} $\to \Bbb R$, such that $$f(x) + 2f(\frac{1}{x}) + 3f(\frac{x}{x-1}) = x$$ I first tried to substitute $x$ with $\frac{1}{x}$ which gave me, $$f(\frac{1}{x}) + 2f(x) + 3f(\frac{1}{1-x}) = \frac{1}{x}$$ Also by substituting $x$ with $\frac{x}{x-1}$ I got, $$f(\frac{x}{x-1})+ 2f(\frac{x-1}{x}) + 3f(x) = \frac{x}{x-1}$$ But this made things more complex and I could not reach my answer also I tried moving one of the terms to the right and then solving but this also led to nowhere. I am trying for a solution based on substitution. Can anyone show me the way?


Should I use is or are after the word family

Should I use is or are in this sentence? I don't know what the difference is. As I was trying to figure it out, plural and singular came to mind. Is family plural or singular and is that a factor?   Family is very important to me. Family are very important to.


Trying to figure what language this PDA (pushdown automata) accepts

I have the following PDA and I can't figure our what words it accepts, would like to get some help with figuring this out.    Of course it only accepts if that stack is empty in the accepting state.


Newbie having trouble with background color

For the background, I was thinking of a light blue, almost translucent background with tiny white question marks on it. But any attempt just doesn't look right. I can't really place on what is wrong with it and how I should improve. I was wondering if there is a better way to approach making color backgrounds or just backgrounds in general?  Edit: My apologies I should've been more clear. I have looked at color selection and color psychology. I just meant more, I think there is something lacking with my blending and implementation rather than the actual selection of the color.


Why does the hard drive light blink once per second?

I recently purchased a 1 TB Seagate ST31000528AS drive and I have Windows 7 RC (build 7100 installed on it). I've noticed that whenever the computer is idling, the hard drive light tends to blink at a rate of about once per second. What are the possible reasons for this?  As far as I can tell there should be no disk activity (all non-essential services are switched off and if there's some amount of swapping going on, then I would assume the drive activity would be a little more erratic that that.  At the same time I've installed  but it doesn't blink at the rate of 1 per second. So I'm inclined to believe that there's really no read-write activity taking place.  Bottom line..what's with the blinking lights?


Action and Action integral: Different kinds of variational principles

What are the difference between:    the action $\int_{t_{1}}^{t_{2}}(L+H) dt$ that we use in the principle of least action, and  the action integral $\int_{t_{1}}^{t_{2}}L dt$ that we use in Hamilton's variational principle?   References:   H. Goldstein, Classical Mechanics, Section 8.6. H. Goldstein, Classical Mechanics, Chapter 2.


At many places, Quality Assurance(QA) is used as a designation/title for Testers. In general, the difference I got between QA and Tester is as below:  The problem I have is that this definition means that calling Testers as QA is wrong:  How does QA assure quality?  Testing does not assure quality. I have never met anyone with QA in their job title who actually assures quality.  How does QA prevent defects?  The activities I can think of falls under Testers activities. None of the activities I can think of prevent defects.  Can Tester really assure Quality? If yes, How?  I don't know any way that a Tester can assure quality. Testers can only find potential defects. They can't prevent defects. They can't fix defects. Testers can report their perspective on the quality of the product to their team, and they can help their team to make the product as good as possible. Is QA a right term to be used for Tester?


brew: create install script for all installed packages/casks

I am currently planning to reinstall my OS from scratch. Over the years, I installed a LOT OF packages via brew. Obviously, I'd like to reinstall those after setting up the system again, and I want to automate this as much as possible. Hence my question: How do I list all packages installed via brew, including casks, and how do I create an "install script" from those that will add all added casks for me and then install all packages again?"  asks a similar question, but doesn't address the creation of a automated install script, rather the port between two architectures.


I'm calling a function in Python which I know may stall and force me to restart the script.   How do I call the function or what do I wrap it in so that if it takes longer than 5 seconds the script cancels it and does something else?


What is the point in regression through the origin?

I am doing the Coursera Statistics Inference course and one of the questions is to find the regression through the origin, when the regression line has an intercept.  Can you please explain what the point of this is? Why would you want to find the regression line through the origin when there is an intercept?


So I use Ubuntu 12.04 LTS 32 bit on a Eee Asus netbook, and occasionally when I use VLC media player this message displays freezing up the video along with:  Potential PulseAudio version problem: PulseAudio is streaming with an excessive latency. Sound may be lost or quality degraded. To address that issue, upgrade the PulseAudio daemon to version 3.0, or disable the alternate sampling rate in its configuration.   What should I do?   If i upgraded the driver, how do I upgrade it correctly?


Compute the limit $\lim_{n\to\infty}{(\sqrt[n]{e}-\frac{2}{n})^n}$

How can I compute this limit of the sequence?  $$\lim_{n\to\infty}{(\sqrt[n]{e}-\frac{2}{n})^n}$$


Middle Name missing on Cathay Pacific Ticket

I recently booked a ticket through a travel agent which didn't ask for my middle name, and I've been told by a friend that I may run into problems because it doesn't exactly match the name on my passport.  In the  mention in this  it says that lacking a middle name on an airline ticket rarely causes any issues, however the first comment mentions that Cathay Pacific (CX) does require this.  I've emailed Cathay and they 'advise that the ticket should fully match the name in the passport', but I was wondering if anyone had run into any problems with Cathay and missing middle names?  I've also emailed the travel agent to see if they could change the ticket, but I don't know if they would charge for re-issuing the ticket.


What's the difference of "passing by reference" and "passing by pointers/addresses" in C++ functions?

Function prototypes:  1. int test (int & i); 2. int test (int * i);   Function calls:  1. test(n); 2. test(&n);   Can anyone explain the difference in as many aspects as possible? Thank you so much!


can't install npm package : E: Unable to correct problems, you have held broken packages

I tried to install npm package but it still gave the same output :  I even try this solution :  but still the same error occured ! plz help me !


Can a cyclic group have more than two generators?  for example the group $\mathrm{Z}$ has two generators $-1$ and $1$, but can a group have more than two generators?


I would be very glad if you helped me solving this problem. It's about topology. Okay let's begin :    Let $A$ be a non-empty open subset of $\mathbb R$. Let $x_0 \in A$ and $B = [x_0,\infty) ∩ A^c$ (complement of $A$)  First I should prove that $B$ is a non-empty, closed set. Then I should prove that :     $B$ is bounded below.   $\inf B > x_0$   $\inf B$ doesn't belong to $A$.   $[x_0, \inf B) \subseteq A$.    Then I should explain how to deﬁne a number $\beta$ so that $(\beta,\inf B) \subseteq  A$, where $\beta$ doesn't belong to $A$.    I really can't get up with proofs for these question. Can you please help me solving this or at least give me some hint or sketch? I would be very grateful. Thank you :)


I have this problem, that can be solved with elemental knowledge.  In order to challenge, I can't draw extra segments to solved it.  This is the problem and i need to get the measure of $\angle{x}$    My current development is:    Well, the sides with equal colour are congruent, and I have completed all the angles that I could, in red colour.  Then, how i can get the $\angle{x}$ in a elementary form, without draw extra segments? Is possible ?


Help with title of book about mind control

I read a book in the 90s about mind control, but can't remember the title or the author.  People start to commit extremely violent crime for no apparent reason. They claim that they had no control over their body when the crime was committed. Somebody who seems to be Russian-speaking is controlling them.  After being convicted of pretending to be controlled, the main hero ends up on an island where he discovers that the people in charge of the island are responsible for the chaos.  Russian scientists have invented a body controlling device. They used the device to escape the Soviet world. Now that renegade group is abusing the device and wrecking the entire world.  If I remember correctly the hero defeated the bad guys. However despite his initial promise, in the end he could not give up the high that the device gave him.  Any idea what is title of that book and who wrote it?


Individualized bullet points are not transparent with \setbeamercovered{transparent}

I've a problem with my individualized bullet points in itemize. The text is transparent, but the bullet points aren't. It looks like the following slide: The images for the bullet points are defined in a beamer theme template through: \setbeamertemplate{itemize item}{\includegraphics[height=1.6ex]{Dot_sub.png}} \setbeamertemplate{itemize subitem}{\includegraphics[height=3ex]{Dot_subsub.png}}  I want those defined images to also show up transperant in the beginning. How can I manage that? \begin{frame}[plain] \setbeamercovered{transparent}   \vspace{-0cm} \frametitle{Example slide}  \begin{itemize}     \item <1->one    \item <2->two    \begin{itemize}      \item <3->one      \item <4->two    \end{itemize} \end{itemize}  \end{frame}


Is the model with the lowest AIC value always the preferred one?

I have a question regarding model selection based on the AIC criterion. I have 5 predictor variables that I include in my models (no interactions are included) and create all possible model combinations. After, I calculate the AIC values for each model and thought I should select the model with the lowest AIC value, which already penalizes for the number of parameters included. However, when I test between the model with the lowest AIC value (that contains four parameters) and the second lowest AIC value (that contains three parameteres) using the anova() function in R, it seems that the preferred model is the one with the second lowest AIC value (three parameters) because it seems that the more complex model is not explaining significantly greater variance than the less complex model, even if the former has the lowest AIC value. I'm confused as to what model should actually be selected. Can someone clarify this discrepancy for me?


Why didn't Obi-Wan tell the truth to Anakin on Mustafar?

In Star Wars Episode III, before the battle on Mustafar, why didn't Obi-Wan admit to Anakin that it was his idea to hide in Padmé's ship to find him? His hate towards her would at least be forgiven, since Obi-Wan had no idea how the confrontation with Anakin would start or if Padmé died.


is paleohacks.com a stack exchange site?

Is this a StackExchange site? It looks and seems to function the exact same, but seems to have its own user system, and doesn't contain links to all of the other SE sites at the bottom like all the ones I've seen do.  If this is not an "official" SE site is it acceptable for third party sites to "copy" the look & feel of SE to this extent or is this site in violation of something?


Can we simulate whole universe with infinite size of RAM and modern computer?

If modern computers are universal turing machines and C language is turing complete, theoretically we could calculate and simulate every problem in the universe then theoritically we can simulate whole universe with using modern computer which has infinite size of ram and C ?  I have searched all topics but didn't find enough answer for that question.


Can anybody please tell me what the difference between some and any is?  Here are two examples:        Can you please give any advice on that?   Can you please give some advice on that?


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


How can I install Ubuntu on a 2007 Macbook Pro?

I have a 2007 Macbook Pro that is running 10.6.8. I'm actually using it now to ask this question. I also have an iMac running 10.13.6  I can't use my laptop because of its age and because I cannot update it any more, browsers won't work properly etc.  I was advised to try Ubuntu.  As it stands now, I've got the .iso file and I've also converted it to a .dmg file by following the instructions from the Ubuntu site, however, I'm not very technical. I can follow instructions but when it comes to terminology, I don't know a thing!  I also burned a dvd from the iso file from my imac using Etcher. Reason is my computer will not recognise a USB stick to be bootable with. I've tried the terminal commands but they didn't work.  I inserted the dvd in the drive. It didn't mount on the desktop but also didn't give me any errors.  I restarted the computer and held down the Alt/Opt key.  I got the two choices and chose the CD however the CD said "Windows". Screen went black and was then prompted with....    1   2   Select CD Rom Booty Type:_     Keyboard wouldn't let me type anything After googling this, I was even more confused.    Had trouble trying to restart/shutdown computer so only way was to unplug it (battery is useless).    I tried again but this time alt/opt didn't give me the DVD to choose from - the dvd actually spit out at that point. So I booted to my macOS. Re-inserted the DVD but then got an error saying that the cd was unreadable: eject or ignore.    My mac specs are as follows:  Hardware Overview:    Model Name:   MacBook Pro     Model Identifier: MacBookPro1,1     Processor Name:   Intel Core Duo     Processor Speed:  2 GHz     Number Of Processors: 1     Total Number Of Cores:    2     L2 Cache: 2 MB     Memory:   2 GB     Bus Speed:    667 MHz     Boot ROM Version: MBP11.0055.B08     SMC Version (system): 1.2f10     Serial Number (system):   W86180XAVJ3     Hardware UUID:    00000000-0000-1000-8000-0016CB95FE84     Sudden Motion Sensor:     State:    Enabled    This computer works great! It starts up beautifully, all the keys work. The CD drive is actually new (just installed a new one, the old one failed). I can't give this system up! I just can't use it because of outdated programs.


$\log^2x$ = $(\log x)^2$ or $\log\log x$

When writing I found it a lot easier to say $\log^2x$ to mean $(\log x)^2$, but I didn't think about the ambiguity; because it is possible that can be interpreted as $\log\log x$.  My question is, what does $\log^2 x$ usually mean, or does it vary by source?   I'm trying to figure out whether it would be worth me getting in the habit of just avoiding the ambiguity completely.


The mutual density of $X,Y$ in $\{|t|+|s|<1\}$ is constant, are $X,Y$ independent?

Let $X,Y$ absolutely continuous random variables with density finctions $f_X,f_Y$. Assume that the mutual density $f_{X,Y}$ equals to a constant $c$ in $\{(t,s)\in\mathbb{R}^2:|t|+|s|<1\}$. Are $X,Y$ independent?    I guess I need to use $\int_{-1}^0 \int _{1+s}^{−1−s}f_{X,Y}(x,y)dxdy+\int_0^1\int_{1−s}^{s−1}f_{X,Y}(x,y)dxdy=c$, But I'm not sure how can it help me.  The defenition of independent random variables is random variables $X,Y$ such that $\forall(t,s)\in \mathbb{R}^2, F_{X,Y}(t,s)=F_X(t)F_Y(s)$.


Show that if $f$ is analytic on a domain $D$, and if $|f|$ is constant, then $f$ is constant.

If $f(z)=0$ for some $z\in D$ then since $0$ is a constant, $f'(z)=0$ on $D$. Also  since $f$ is analytic, then by theorem $f(z)$ is constant.   Here is where I get stock!   If $f(z)\not=0$. I want to show that $\operatorname{Re}f$ and  $\operatorname{Im}f$ are constant using the hint that $\bar f=|f|^2/f.$


How do I import a .max file and it's associated materials and textures into Blender?

This model is from Mortal Kombat X and it was downloaded from the website below...       After downloading all of the files, I see lots of ones that I don't know how to work with properly. I am completely new to Blender.  I really need help with all of these files: FBX, .max,.mtl,.obj,.tga,. But I don't know how to set them up and put all of Reptile's textures on him exactly how the image displays.  Additionally, I'm also planning on taking this model and export it to Gmod and play as him.  Again, I really do need help with these files.


Simple explanation of the many functional uses of 'should'?

: So how many named special cases of each modal verb are there, in toto? There's   1. subjunctive should, and   2. mandative should, and   3. , at least;   and I s[up]pose 4. Should we? is suggestive should, and   5. Shouldn't we? is tag **should**, and I can think of a lot more.    I ask about only operative uses of this modal verb including literary and formal usage,  but please omit anything obsolete. I'm trying to classify them and learn the formal terms describing each. Are there any apt others in addition to the ones above? (I added the enumeration below)  1. What's 'subjunctive should'?  Whenever should is conjugated in the subjunctive mood? 5. What's a tag **should** ? 6. Where does  should/would  feature? What's it called? This should is detailed in   or  or .


Rationalizing denominator containing a root of a polynomial - why is this possible / why does it work?

The problem is to express the number  $$1\over x^5 + 2x^4 + 3x^3 + 3x^2 + 2$$  using only rational numbers in the denominator, knowing that $x^5 + 2 = -2(x + 1)(x^3 + x^2 + x)$.  (This is an example from a final exam of an algebra course from the past year (which is freely available to students).)  I know how to solve this problem, but I do not understand why this is possible. The trick comes from knowing that this number can be expressed using addition and multiplication of $x$ and rational numbers, ie. as  $$r_0 + r_1x + r_2x^2 + r_3x^3 + r_4x^4 + r_5x^5 + \dots$$  My solution follows, skip to questions if you are not interested.  From the polynomial equation it follows that $x^5$ equals $-2 - 2x - 4x^2 - 4x^3 - 2x^4$, therefore an expression containing $x$ with exponent 5 or greater can be rewritten as an expression with only $x^0$ to $x^4$.  So my number can be expressed as  $$ax^4 + bx^3 + cx^2 + dx + e$$  Putting an equals sign between these two expressions and multiplying by the denominator gives  $$1 = (x^5 + 2x^4 + 3x^3 + 3x^2 + 2)(ax^4 + bx^3 + cx^2 + dx + e)$$  I can multiply the right hand side and "normalize" it (by replacing $x^{\ge5}$) to get  $$1 = (e - f)x^4 + \dots + (2e - 2d)$$  From this formula I can create a system of linear equations, because the coefficient of $x^n$ has to be one if n equals zero, and zero otherwise. Solving this system will let me find the values of the coefficients.  Question 0: Why does this problem even have a solution of the form I used?  Question 1: Is there a solution like this for any expression $1 \over f(x)$, where f is a polynomial of $x$, knowing $x$ is a root of another polynomial? Will my method always work? Why?  Apologies if this is a duplicate, but everything I could find about rationalizing the denominator was about simple fractions like $1 \over 2 + \sqrt 6$.  I'd appreciate even just comments directing me towards what I can study because I am out of keywords.


Why Do Glueballs Have Mass, When Individual Gluons Are Massless?

From      Glueballs are predicted by quantum chromodynamics to be massive, notwithstanding the fact that gluons themselves have zero rest mass in the Standard Model. Glueballs with all four possible combinations of quantum numbers P (parity) and C (c-parity) for every possible total angular momentum have been considered, producing at least fifteen possible glueball states including excited glueball states that share the same quantum numbers but have differing masses with the lightest states having masses as low as 1.4 GeV/c2 (for a glueball with quantum numbers J=0, P=+, C=+), and the heaviest states having masses as great as almost 5 GeV/c2 (for a glueball with quantum numbers J=0, P=+, C=-).   Rather than going through a list of possible mechanisms that unfortunately I know next to nothing about, such as can the mass be attributed to virtual quarks, or binding energy between the gluons, I would rather leave the question as in the title to find out as much as I can.  Also, although the SM is firmly established, would the discovery of Glueballs buttress it further?  My apologies for not knowing more about the interior of hadron like particles or if the answer is readily available (or worse, blindingly obvious).


How to move a single page of content to a new domain

I am trying to figure out best-practise for moving a single page of content from one domain to another in a way that will preserve search engine ranking. I have found plenty of instructions for wholesale domain moves, but this situation is slightly different.   I have a blog, one page of which gets a lot of search traffic for a specific term. I would like to take that one page of content and move it to an entirely new domain, which I will then use to start adding new content to.  My plan so far:   register the new domain remove the single page of content from the old domain put up the single page of content on the new domain set up a 301 redirect for the URL of the page on the old domain, pointing to the new domain    Is this the right way to do it? Is there anything else I need to do in order to keep Google happy?


how to replace class HTML name with javascript

ok so what I'm trying to do is to get the element's with the class name 'no-js' and replace it with 'js', so I have NO idea how to do this, I tried google around But couldn't find anything, so does anyone now how to do this?  what I'm trying to make Is this menu that when you click on a Plus button it has this drop down menu, but if javascript is disabled I want it to show on hover with css ( i've already done that )  i've put My code on JsFiddle, heres the link:   thanks.


Identify/substitute an SMD MOSFET labeled "540N 88KFG" for LCD monitor repair

I'm trying to repair the logic board of an LCD monitor that died while giving off a burned smell.  It seems that an LCD driver chip and a MOSFET (I think) burned out. The chip was easy to identify () and order, but I can't unambiguously identify and find a replacement for the other part.  It is labeled "540N 88KFG" and I think its form factor is TO-252 / DPAK. Below is a photo, there are three of them in the middle of the picture.  A related question is what characteristics I have to make sure to match if I can't buy an exact replacement. Searching around for "540N" MOSFET, I found some in other packages whose main data points were   100V source-drain voltage 33A current rating.   If those do indeed apply to this component as well, what else needs to match in a replacement?  Update: After looking around a bit longer it appears that  might be a reasonable replacement.


How to completely disable unity launcher in Ubuntu 16.04?

I am using plank dock so I want to completely disable the unity launcher in ubuntu 16.04.  I used the autohide method and set the reveal pressure very high. But there are there are two problems with this method:   When I open unity dash by pressing the Super key, the launcher reveals. When I minimize an application then the app icon pops out from left side of the hidden launcher.    I want to completely disable it.


how to change the default time zone in just one of my php file not config file?

I have to change the time zone for one of my services; so just one file not in config for all php files! How can I do that! in that file I'm using filectime but apparently it is using another time zone!  Your help is appreciated.  If you need more clarification, please let me know  ADDED:  Sorry to say that but still after  using date_default_timezone_set fro my city, my problem is not solved! I have a file the creation of which is : Nov 07 2013 7:36:50 but after using your time zone function for my city and  following code:   $createTime = filectime($dirPath . '/' . $file);   the $creattime still it is : 2013-11-08T00:36:50Z  So it seems that time zone doe not have any effect on filectime! apart from adding hours (the difference hours) to the result of my filectime to adjust the difference, is there any other better ways?  Thanks


Why can't baby Groot say more than his name

From what I heard. Flora Colossus's can only say a specific phrase when they get older because of their voice box hardening. If baby Groot is young enough to not have his voice box hardened, why does he still say the only phrase we all have heard?


List of Acronyms: A dotted line between the the abbreviated form and the full form

i am using the acro package for the acronyms and the \printacronyms command to get the list of the acronyms. What i wanted to have is a list in the following style: short abbreviated form .......................... full form The short abbreviated form is on the left side of the page, the full form on the right and both are "connected" with a dotted line. I am confused because i thought it would be easy to get that and now i am a bit worried that i missed the easy way to do it. I was searching the last hours but didnt find anything like that. If it is not possible with the acro package i can use glossaries or acronyms, what is no problem. I hope someone has an idea and thanks in advance!


How does one change only the frequency of an alternating current?

Suppose standard voltage, current, and frequency AC power is readily available for a project that requires the available standard voltage and current, but also requires an arbitrary number of cycles per second not equal to the number of cycles per second available.  What components affect the frequency of alternating current?   Eg: Provided: 60Hz 120v 1a (Converter Goes Here) Required: 10Hz 120v 1a  What would such a converter consist of?


How to prove that total number of non-isomorphic labelled trees of order $n$ is $n^{n-2}$?

I predicted the formula by finding total number of non-isomorphic labelled trees of order 1 is 1 , order 2 is 1,order 3 is 3,order 4 is 16,order 5 is 125.But how do i prove it ? I am beginner in graph theory so i will be very thankful if i get some simple approach to solve the problem(Not by using some difficult theorems).


Identity type between A and B being non-empty implies non-emptiness of A and B?

In homotopy type theory, if the identity type A=B is non-empty, can we conclude that A and B are also non-empty? If not what constarints can be put on the identity type or A and B in order that the above statement becomes true for them.  Update: As Andrej Bauer has mentioned in the answer below, a better variation of this question would be: if the identity type A=B is inhabited, can we conclude that A and B are also inhabited?  In other words, assume we know that A=B is inhabited. What constraint can be put on A=B in order that we can conclude A is inhabited? If there are such constraints then what will be the minimum constraint that is sufficient to draw the conclusion that A is inhabited? By constraint I mean things like A=B having at least two distinct elements or A=B being infinite and alike.


I have to solve this problem but i have no idea how to do ...Thanks!  Let be $f:\mathbb{C}\rightarrow \mathbb{C}$ a holomorphic function. Show that if $f\circ f=f$ then f is either constant or $f(z)=z \ \forall\ z\in\mathbb{C}$


Can you cast a spell at a higher level spell slot even if it doesn't change the spell?

If I wanted to cast finger of death but I'm all out of 7th level spell slots, could I cast it using an 8th or 9th level spell slot, even though it doesn't change the spell's effect?


how to learn if a column exists or not before calling GetOrdinal("columnname") method in C#?

Is it possible to check if a column that is returned from database exist or not before getting ordinal of that column? Because if it doesn't exist then i dont want to call getordinal method ;      //Here the place that i want to check if username column have returned from database or not.     OrdUserName = reader.GetOrdinal("username");


Continuous function and induced homomorphism

We know that given any continuous map $f : X \to Y$, there exists an induced homomorphism $f_* : \pi_1(X, x) \to \pi_1(Y, f(x))$. Is the converse true? That is, given any homomorphism $\phi: \pi_1(X, x) \to \pi_1(Y, y)$, is there a continuous map $f : X \to Y$ such that $\phi = f_*$ and $f(x) = y$? If not, are there conditions for $X$ and $Y$ for the converse to be true?


Should the Advisors and PIs always be a coauthor?

I am collaborating with another person on a paper and I was wondering if we are suppose to write our advisor's name in our papers merely because they funded us and looked over the paper?


Understanding QGIS reference frame issue?

I just changed my project coordinate reference frame to WGS 84 EPSG:4326. Additionally, I set the coordinate reference frame for each layer to EPSG:4326-WGS 84. However, the two layers don't line up. There appears to be some kind of vertical shift going on. Any ideas on what could be causing this discrepancy in their vertical position? In my second image I added the 'OpenStreetMap' layer and changed it's coordinate reference to WGS84, and as you can tell my layers are not lining up with Oklahoma.   How to I make them line up with where they should be?


Make VIM reload file as soon as it changes on disk

I don't want to have to keep reloaded a log file manually, I want to automatically see my logs as they come in.  Apparently, VIM has this feature built in, something called autoread, but I can't get it to work in Ubuntu  I can run  sudo vi ~/.vimrc   to edit vim's config file like so:   set number  set autoread   The number argument works perfectly. autoread doesn't work at all.  Any ideas or hacks? I want VIM to automatically scroll the bottom of the file when a file it's viewing is updated as well.


Will MX records with a longer TTL help mitigate effects of DoS attack?

We have our email hosted at Google Apps, and have our DNS servers for the domain setup at Namecheap.  About a month ago our website went down (not a big deal, since it's most just a contact info page), but we were also unable to receive email for several hours. I narrowed down the cause to the DNS server at Namecheap. I contacted them via live chat and they said they were working on mitigating a DoS attack. The DNS servers came back up not too much longer.  Today, they are being hit by another DoS attack. This one is a big one (the previous one only seemed to effect a few people). We cannot receive ANY emails right now.  Our TTL on our MX servers is set to about 1 hour (I can't verify since all of Namecheap is down right now). Would setting a longer TTL help mitigate future problems like this?  Thanks!


How to include page number in citations in a Tufte-Book document class?

I have the same problem as presented in this question :   Unfortunatly, the person who asked the question found the solution without publishing the answer. Who can specify the elements to add in the MWE:  tufte-mwe.tex :  \documentclass{tufte-book}  \usepackage{babelbib} \begin{document}  A citation\cite[p.50]{Tufte2001}.  \bibliography{tufte-mwe}  \bibliographystyle{plain-fr}  \end{document}    tufte-mwe.bib:  @BOOK{Tufte2001, author = {Edward R. Tufte}, title = {The Visual Display of Quantitative Information}, publisher = {Graphics Press}, year = {2001}, address = {Cheshire, Connecticut}, isbn = {0-9613921-4-2} }   as this code produces bad result as follow, instead of specifying the page of the reference in the sidenote :


Blender: Strange clipping planes when rotating the view

I am experiencing strange clipping behavior that is shown in the gif below.  Why are my grid and cube being clipped when I rotate my view about the Y Axis?  Everything seems normal when my view is aligned with the +/- Z Axis.  For what it's worth, I've changed my Units to Metric, and my unit scale is .001.  For a higher quality gif, I have one at this .


Bibliography with each entry not on a new line?

Is it possible to get Biblatex (or bibtex, I can change) to put out a citation with each entry not on a new line?   Right now I have something that looks like:  1. Katz, M. J.; Ramnial, T.; Yu, H.-Z.; Leznoff, D. B. J. Am. Chem. Soc. 2008, 130, 10662–10673. 2. Lefebvre, J.; Korcok, J. L.; Katz, M. J.; Leznoff, D. B. Sensors 2012, 12, 3669–3692.   What I need is   1. J. Am. Chem. Soc. 2008, 130, 10662–10673. 2. Sensors 2012, 12, 3669–3692.   Now, removing the names seems pretty easy (as a last resort I can just do a find and replace in the bib file to get rid of them), but I have no idea how to make a super condensed block of citations. Is there an easy way to do this, or will I have to do it manually?


I'm looking for a way to way to read files in C++ I can write files, but here's where I'm stuck at:   ifstream readfile; readfile.open("C:/Users/Crazy/Desktop/Useless.txt")   I 've seen people do things such as:  #include <iostream> #include <fstream>  using namespace std;  int main() {      ifstream myReadFile;     myReadFile.open("text.txt");     char output[100];     if (myReadFile.is_open()) {         while (!myReadFile.eof()) {              myReadFile >> output;             cout << output;          }     }     myReadFile.close();     return 0; }   But in  char output[100];   I want the whole thing read.  Also, I just want to only read it, not to check if it's already open, not to, check for errors. I just want to read the whole thing, and the whole thing only.


Changing the size of the UISearchBar TextField?

I have a UITableView with an Index on the side;  I want to add a UISearchBar to it, but the index overlaps with the "x" to clear the search.  I've noticed in the Contacts application, the textfield within the UISearchBar is resized to accommodate this, but I can't work out how to do this in my own app.  I have tried the following in my viewDidLoad, but it does not seem to work.  UITextField * textField = (UITextField *)[[self.search subviews] objectAtIndex:0]; CGRect r = textField.frame;  [textField setFrame:CGRectMake(r.origin.x, r.origin.y, r.size.height, r.size.width-30)];   Any ideas?


dbDelta using Foreign key not working on update

I am using FOREIGN KEY with dbDelta when activating the plugin (register_activation_hook()). It works great when creating the table for the first time, but outputs an error when updating the table (the table is already present but an alteration has to be done on the table). Any suggestions?      if(GLOBAL_PLUGIN_VERION != get_option("GLOBAL_PLUGIN_VERSION")){       $sql = "CREATE TABLE `".TEST_TABLE."` (      `id` INT( 11 ) NOT NULL AUTO_INCREMENT,      `title` VARCHAR( 100 ) NOT NULL,      `description` TEXT DEFAULT NULL,      `location_id` INT( 11 ) NOT NULL,      PRIMARY KEY  (`id`),      FOREIGN KEY  (`location_id`) REFERENCES `".TEST2_TABLE."` (`id`)     );";    }   Error:     PHP Notice:  Undefined offset: 1 in wp-admin/upgrade.php on line 1568      WordPress database error You have an error in your SQL syntax; check   the manual that corresponds to your MySQL server version for the right   syntax to use near 'FOREIGN KEY  (location_id) REFERENCES   test2 (id)' at line 1 for query ALTER TABLE   test ADD COLUMN FOREIGN KEY  (location_id) REFERENCES   test2 (id) made by ...      WordPress database error Multiple primary key defined   for query ALTER TABLE TEST ADD PRIMARY KEY  (id) made by...


Biblatex matching reference citations and labels

I am customising my PhD bibliography with biblatex and I face the following problem: I want to keep a consistency between the citations in the text and the label names in the list of references, so that the reader quickly recognises the citation by its label.   This works very well if I limit the maxcitenames and maxalphanames to 1, by defining the master number to maxnames=1 then in order to keep all the authors in the reference, I define maxbibnames=20.     However, for maxnames=2 or more, it doesnt seem to work, even after defining maxalphanames=2 explicitly     Any solution/comment is welcome Here is my MWE:  \documentclass{article} \usepackage [backend=bibtex,style=authoryear]{biblatex} \usepackage{filecontents} \begin{filecontents}{refs.bib} @article{a,     title = {first publication},     journal = {a first journal},     author = {A},     year = {2000}, } @article{b,     title = {second publication},     journal = {a second journal},     author = {X and C},     year = {1988}, } @article{c,     title = {third publication},     journal = {a third journal},     author = {O and P and Q},     year = {2006}, } @article{h,     title = {Observations of ingot macrosegregation on model systems},     journal = {Metallurgical Transactions},     author = {Hebditch, D. J. and Hunt, J. D.},     year = {1974}, } \end{filecontents} \addbibresource{refs} \ExecuteBibliographyOptions{ minnames=1, maxnames=2,                                                         maxbibnames=20,                             }  %define label before reference in list   \renewbibmacro{begentry}{% \textbf{(\printnames[][-\value{liststop}]{labelname}~\printfield{labelyear}\printfield{extrayear}})\\}  \begin{document} \parencite{a} \\ \parencite{b} \\ \parencite{c} \\ \parencite{h} \\ \printbibliography \end{document}


Non-stationary charge distribution in quantum mechanics

Are charges moving around in quantum mechanics? I want to know what the standard interpretation tells us about the distribution of charge in ordinary matter. For example, in monatomic hydrogen gas, we have the 1s state and the various 2p states. I know that if I take the superposition of those two states, I see an oscillating charge distribution (some people call it a probability distribution, but for sake of argument let's call it charge). But is this what happens in an ordinary sample of monatomic hydrogen gas? or is each atom always in a pure eigenstate, either 1s or 2p, with some probability of jumping between those states? In which case (not counting the "jumps") the charge is always stationary, so there is no moving charge.  The same question applies to solids. Take the tungsten filament in a light bulb. Does quantum mechanics tell us that the charge at any given moment is stationary, with some probability of the system jumping to another state with the emission of a photon? Or is there a continuous time evolution of charge distribution, with oscillating and moving charges present throughout the tungsten filament?  I'd like to know how standard QM answers these questions.


Cannot successfully source .bashrc from a shell script

Normally we can source ~/.bashrc file using this command  source ~/.bashrc   but if I write this in a shell script and execute it, nothing happens. Why? Is there any way to do this?  My script:  #!/bin/bash chmod a+x ~/.bashrc source ~/.bashrc   Also tried . (dot) instead of source. Same result.


Why does Ubuntu show slightly less RAM than my computer has built in?

My machine's RAM is 8 GB. I have recently installed Ubuntu 17.04.   Why does Ubuntu show me that it has only 7.7 GB and not the full 8 GB?


What are the differences between the different saving methods in Hibernate?

Hibernate has a handful of methods that, one way or another, takes your object and puts it into the database. What are the differences between them, when to use which, and why isn't there just one intelligent method that knows when to use what?  The methods that I have identified thus far are:   save() update() saveOrUpdate() saveOrUpdateCopy() merge() persist()


What is the probability that at least 3 people have the same birthday in the same year

Consider a group of size 40. What is the probability that at least three members of the group were born in the same month and in the same day (same birthday)? Ignoring leap years.


Get error when installing Comodo Antivirus

$ sudo dpkg -i cav-linux_1.1.268025-1_amd64.deb   Selecting previously unselected package cav-linux. (Reading database ... 333566 files and directories currently installed.) Unpacking cav-linux (from cav-linux_1.1.268025-1_amd64.deb) ... dpkg: dependency problems prevent configuration of cav-linux:  cav-linux depends on libssl0.9.8 (>= 0.9.8m-1); however:   Package libssl0.9.8 is not installed.  dpkg: error processing cav-linux (--install):  dependency problems - leaving unconfigured Errors were encountered while processing:  cav-linux


If we build a number as follow:  $$N=7+\sum_{k=1}^n6\times10^k$$ we find: $$N^2=9+\sum_{k=1}^n8\times10^k+\sum_{j=n+1}^{2n+1 }4\times10^{j}$$ that means for example:  $67^2=4489$, $667^2=444889$, $6667^2=44448889$ and so on. How can we prove that given an arbitrary $n$ and a number $N$ built as above, the square of $N$ can be obtained by th equation for $N^2$? Thanks


Iterate over object attributes in python

I have a python object with several attributes and methods.  I want to iterate over object attributes.    class my_python_obj(object):     attr1='a'     attr2='b'     attr3='c'      def method1(self, etc, etc):         #Statements   I want to generate a dictionary containing all of the objects attributes and their current values, but I want to do it in a dynamic way (so if later I add another attribute I don't have to remember to update my function as well).  In php variables can be used as keys, but objects in python are unsuscriptable and if I use the dot notation for this it creates a new attribute with the name of my var, which is not my intent.  Just to make things clearer:  def to_dict(self):     '''this is what I already have'''     d={}     d["attr1"]= self.attr1     d["attr2"]= self.attr2     d["attr3"]= self.attr3     return d   ·  def to_dict(self):     '''this is what I want to do'''     d={}     for v in my_python_obj.attributes:         d[v] = self.v     return d   Update: With attributes I mean only the variables of this object, not the methods.


Say I have two templates for an operator= overloading :  class MyClass { public:     template <typename T>     std::enable_if_t<true == /* a condition */, MyClass&>     operator=(T value) {         std::cout << "Pass by copy" << std::endl;     }      template <typename T>     std::enable_if_t<false == /* a condition */, MyClass&>     operator=(const T &value) {         std::cout << "Pass by reference" << std::endl;     } };   What would be the most optimal condition to use with std::enable_if ?  I came up with this :  template <typename T> struct pass_copy_cond : std::conditional<         std::is_fundamental<T>::value ||         std::is_pointer<T>::value ||         (std::is_trivial<T>::value && sizeof(T) < sizeof(void*))     , std::true_type, std::false_type>::type {};   Is there a way to improve the condition ?


Let $G$ be a finite abelian group with exactly one element of order $2$ denoted by $\alpha$. Prove that $\prod_{g \in G} g = \alpha$.

Let $G$ be a finite abelian group with exactly one element of order $2$ denoted by $\alpha$. Prove that $\prod_{g \in G} g = \alpha$  Okay so I was given two hints for this problem  Hint 1 : If $g \in G$ doesn't have order $2$, then $g \neq g^{-1}$ Hint 2: If you write out $0+1+2+3+4+50+1+2+3+4+5 \mod 6$, why does it come out $3$, other than computing brute force?  I'm not sure at all how to use hint 1. The answer for Hint 2 is that you can pair up $5+1=6$ and $4+2 = 6$ and be left with $3$. In that hint we are looking at the additive group $\mathbb{Z}/6\mathbb{Z}$, and we have $|5| = |1| = 6$ and $|4| = |2| = 3$, so this hint would suggest looking at group operating each two elements of $G$ which have the same order with each other. But the problem is, is that even though $G$ may be a finite group, some $g \in G$ may have $|g| = \infty$, and furthermore every $g \in G$ may have a unique order, (please correct me if I'm wrong). So I'm not sure how I could use it to prove $\prod_{g \in G} g = \alpha$ At this point all I can say about $G$, is that by Lagrange's Theorem, $|G| = 2k$ for some $k \in \mathbb{Z}^+$, and that (trivially) letting $\alpha \in G$ be the element of order $2$, we have $\alpha = \alpha^{-1}$. I'm assuming there's some algebraic trick that I'm missing here, because I'm sure all I'd have to do is just write out $$\prod_{g \in G} g = g_1 \cdot g_2 \cdot \ ... \ \cdot g_{2k}$$ and find some way to simplify this expression. EDIT: Thanks to the comments and answers below I realized that since $G$ is abelian, and for any $g \in G$, we have $g^{-1} \in G$, so $\prod_{g \in G} g = g_1 \cdot (g_1^{-1}) \cdot ... \cdot g_i \cdot(g_i^{-1}) \cdot ... \cdot (g_k) \cdot (g_k^{-1})$ where for some $i \in \{1, ..., k\}$ we have $g_i = \alpha$, but now I don't see why $\prod_{g \in G} g \neq e$ where $e$ is the identity of $G$?


getting gnome-session-b error that it fail to create dbus proxy genomeScreensaver.How to solve it?

Due to this error the system bootup time increases by 30 seconds. after logging It takes more 40 sec to start shell.  Kindly let me know how to solve this error.  system details:  Ubuntu 17.10 Env: Xorg gnome   Error at  gnome-session-b  CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error  calling StartServiceByName for org.gnome.ScreenSaver:  GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process  org.gnome.ScreenSaver exited with status 1


Can't pass null arguement for Adapterclass

Good day everyone! I have a problem the app crash and it has an error    java.lang.NullPointerException: Can't pass null for argument 'pathString' in child()         at com.google.firebase.database.DatabaseReference.child(Unknown Source:6)         at com.example.jasper.happy_paws.CommentAdapter.getUserInfo(CommentAdapter.java:95)         at com.example.jasper.happy_paws.CommentAdapter.onBindViewHolder(CommentAdapter.java:51)         at com.example.jasper.happy_paws.CommentAdapter.onBindViewHolder(CommentAdapter.java:26)         at android.support.v7.widget.RecyclerView$Adapter   I dont see anyproblem with my adapter here is my code  public class CommentAdapter extends RecyclerView.Adapter<CommentAdapter.ViewHolder> {      private Context mContext;     private List<CommentModel>mComment;     private FirebaseUser firebaseUser;      public CommentAdapter(Context mContext, List<CommentModel> mComment) {         this.mContext = mContext;         this.mComment = mComment;     }      @NonNull     @Override     public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {         View view = LayoutInflater.from(mContext).inflate(R.layout.comment_items, parent, false);         return new CommentAdapter.ViewHolder(view);      }      @Override     public void onBindViewHolder(@NonNull ViewHolder holder, int i) {         firebaseUser = FirebaseAuth.getInstance().getCurrentUser();         final CommentModel commentModel = mComment.get(i);          holder.comment.setText(commentModel.getComment());         getUserInfo(holder.image_profile,holder.username, commentModel.getUserid());          holder.comment.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Intent intent = new Intent(mContext, Account.class);                 intent.putExtra("userid", commentModel.getUserid());                 mContext.startActivity(intent);             }         });          holder.image_profile.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 Intent intent = new Intent(mContext, Account.class);                 intent.putExtra("userid", commentModel.getUserid());                 mContext.startActivity(intent);             }         });        }      @Override     public int getItemCount() {         return mComment.size();     }      public class ViewHolder extends RecyclerView.ViewHolder{          public ImageView image_profile;         public TextView username,comment;          public ViewHolder(View itemView) {             super(itemView);              image_profile = itemView.findViewById(R.id.image_profile);             username = itemView.findViewById(R.id.username);             comment = itemView.findViewById(R.id.comment);         }     }     private void getUserInfo(final ImageView imageView, final TextView username, String userid)     {         DatabaseReference reference = FirebaseDatabase.getInstance().getReference().child("User").child(userid);         reference.addValueEventListener(new ValueEventListener() {             @Override             public void onDataChange(@NonNull DataSnapshot dataSnapshot) {                 UsersHappyPaws usersHappyPaws = dataSnapshot.getValue(UsersHappyPaws.class);                 Glide.with(mContext).load(usersHappyPaws.getProfilepic()).into(imageView);                username.setText(usersHappyPaws.getName());             }                @Override             public void onCancelled(@NonNull DatabaseError databaseError) {              }         });     } }


Does the diameter of the aperture increase with increases in the focal length with constant F-number(F-stops)?

What I have learned from the definition of F-number is that;  The F-number (sometimes also called focal ratio, f-ratio, f-stop, or relative aperture) of a lens is the ratio of its focal length divided by the diameter of the aperture. And F-numbers are expressed as f/1, f/1.4, f/2, f/2.8, f/4, f/5.6, f/8, f/11, f/16, f/22, f/32 etc. Hence F-number (F-stop) depends on two variables; that are diameter of aperture and focal length of the lens.  Aperture diameter/size is one of the component which governs the amount of light that enters to the camera. As far as I known, at different F-stops values (f/1, f/1.4, f/2, f/2.8, f/4, f/5.6, f/8, f/11, f/16, f/22, f/32) the amount of light allowed to enter the camera is fixed and are with either 1/2 or 1/3 stop increment.  This concept is very easy to understand, in case of prime lenses (with a  fixed focal length and variable aperture), where F-stop is inversely proportional to the aperture diameter. For lower F-number (F-stop) the aperture would be bigger allowing more light and for higher Hence F-number (F-stop) the aperture would be smaller allowing less light in to the camera.  F-numbers (F-stops) have been evolved to allow a definite/fixed amount of light in to the camera (As far as I known). In case of zoom lens (with variable aperture and variable focal length), I am not able to understand the what would be the relationship between F-stop and the diameter/area of aperture at different focal length.  I have two related questions  1 . In case of zoom lens,  for example, Canon EF-S 18-135mm f/3.5-5.6  (with variable aperture and variable focal length). At any particular F-number(F-stop), for example at f/5.6 , does the diameter of the aperture increase with increases in the focal length? I mean,  Is the diameter of the aperture at  18mm and f/5.6 would be smaller than that of at 135 mm and f/5.6?   In the above case (i.e. Canon EF-S 18-135mm f/3.5-5.6 ), What is amount of light that would enter the camera at 18mm and f/5.6 compared to that of at 135 mm and f/5.6? Will the amount of lights be same or different?


Renaming items with the /give command in Minecraft PE

I can't figure out how to get an item that is renamed using the /give command and I have tried the command I found here, /give @s stone 1 0 {display:{name:"name"}} but it keeps saying that I am missing a close bracket in line 1, column 2. I have as many closed brackets as I do open brackets. I want to know this because I am making a private server in Minecraft PE.


Displaying in-text citations in a compressed way (e.g. [1-3]) instead of the default one [1]-[3] using cite package inside IEEEtran/journal mode

I have been trying to display the in-text citations in the following format:  [1-3], or [1, 6-8]  which looks like it is the default one inside the cite package, but what I get is:  [1]-[3]  Specifically, I'm using the IEEEtran template (bare_jrnl to be more precise) and the bibliography is built in the following way:  \bibliographystyle{IEEEtran} \bibliography{IEEEabrv,mybib}   The cite package is obviously loaded. I have looked the documentation of both IEEEtran and cite, but I have not been able to find a solution.


In Star Trek, what are all the low-ranking Command Division officers doing?

There are three division in Starfleet as evidenced by the three uniform colors:  Command Red (Gold in TOS era): Command decides what to do  Operations Gold (Red in TOS era):  includes security, operations and engineering.  In the greater sense Operations means accomplishing that which Command decides, so it includes scheduling, and keeping things safe, running, and working.  Science Blue: includes medical.   Science is science.  It means acquiring and using knowledge.  So (TNG-era) red for commanders, captains and admirals makes sense:  their job is to decide what the missions are and what the crew should do to accomplish the mission.  Helmsmen and "the conn" are generally manned by junior officers in red (TNG era).   This makes sense because they are carrying out orders and "commanding the ship".  But there are junior officers all over the place in red (TNG).  They are obviously not making decisions and giving orders all day long.   And there clearly don't need to be very many helmspeople on the ship.  What jobs do all these officers in red have?  (TNG era -- for TOS era, read as gold)    Everyone seems to be pointing out the things they have seen them do.   Helm, escorts, bridge relief.   Possibly, 'lesser management tasks'.   But none of these assertions explain how there can be so many of them.   It would require only a few officers out of a crew of a thousand -- maybe a hundred -- especially since we know that most management personnel in ops and science are wearing gold or blue uniforms.  If it was like people are saying, you would expect the sight of extras in red to be relatively rare.   If we have no in-universe explanation, okay -- that's an answer.


Why's _itoa causing my program to crash?

The following code just keeps on crashing when it reaches the part with _itoa, I've tried to implement that function instead and then it got even weirder, it just kept on crashing when I ran it without the debugger but worked fine while working with the debugger.  # include "HNum.h" # include <stdio.h> # include <stdlib.h> # include <string.h> # include <assert.h> # define  START_value 30   typedef enum {     HNUM_OUT_OF_MEMORY = -1,     HNUM_SUCCESS = 0, } HNumRetVal;  typedef struct _HNum{     size_t Size_Memory;      char* String; }HNum;  HNum *HNum_alloc(){     HNum* first = (HNum*)malloc(sizeof(HNum));     if(first==NULL){         return NULL;     }     first->String =(char*)malloc(sizeof(START_value));     if(first->String==NULL){         return NULL;     }     first->Size_Memory = START_value; // slash zero && and starting from zero index;     return first; }  HNumRetVal HNum_setFromInt(HNum *hnum, int nn){     itoa(nn,hnum->String,10); }  void main(){     HNum * nadav ;     int h = 13428637;     nadav = HNum_alloc();     nadav->String="1237823423423434";     HNum_setFromInt(nadav,h);     printf("nadav string : %s \n ",nadav->String);     //printf("w string %s\n",w->String);     //printf("nadav string %s\n",nadav->String);     HNum_free(nadav);  }   I've been trying to figure this out for hours and couldn't come up with anything... The IDE I'm using is Visual Studio 2012 express, the crash shows the following: "PROJECT C.exe has stopped working windows can check online for a solution to the program."


Filler episodes for anime that has no manga original - some questions?

I know that filler episodes are often done to keep a work going, or to flesh out a character's backstory.  In an anime that is its own work (not based on any manga, and with no manga counterpart), can filler be used as a means of taking a break from the story arc?  I know this is a different example, and a western work, but American TV drama series Grey's Anatomy was accused of having filler for much of Seasons 12, 13 and 14.  Filler isn't necessarily non-canon, is it?  Is it possible for a filler episode to later prove to be important even though it doesn't seem so at the time, if a character makes reference to the events of it further down the line, and how often as this happened?  I'm not an expert in anime, but is it more common for manga-to-anime adaptation than a series being entirely anime and created from scratch?  I'd appreciate any explanations, as I've seen varying discussions on filler.


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


How to check if date is today or yetsterday or return date?

How can i check if input date is Today, Yesterday or just return the date if it's noone of them? I was trying to do the following:       const checkDate = (someDate) => {       const today = new Date();       let date = new Date(someDate);       today.setHours(0);       today.setMinutes(0);       today.setSeconds(0);       return date.getTime() === today.getTime() ? "Oggi" : date.getTime() === today.setDay(-1) ? "Ieri" : "Il" + date;     }          console.log(checkDate("December 17, 1995 03:24:00"));    Where "Oggi" is Today and "Ieri" is Yesterday..


Proof of a sum with binomial coefficients $\sum_{k=1}^n (-1)^{k+1}{\binom nk}\frac{1}{k} = 1 + \frac{1}{2} + \ldots +\frac{1}{n}$

I need to prove:  $$\sum_{k=1}^n (-1)^{k+1}{n \choose k}\frac{1}{k} = 1 + \frac{1}{2} + \ldots +\frac{1}{n}$$   for  $n \in \mathbb N$  I should use mathematical induction. So, I've tried going simply by inductive steps.  It's true for $n=1$.  But when I try to evaluate the left side of the term by plugging in the values from $1$ to, say, $5$, I get that the series is actually this:  $$1-1+1-1+1-1+1-1+\ldots$$  Which should at the end equal $0$? But in that case, the problem doesn't make any sense.  Also, by assuming that the term is true for $n=k, k>1$, and then trying to prove that it's also true for $n=k+1$, I can't seem to get anything concrete.  Please help!


Integer solutions $d = \frac{ab}{a + b + 2\sqrt{ab}}$

$$d = \frac{ab}{a + b + 2\sqrt{ab}} = \frac{ab}{(\sqrt{a} + \sqrt{b})^2}$$  What are the positive integer solutions?  The majority of solutions are when $a=b$, so that $a = 4d$.


I'm using Fedora 24. Whenever I update the kernel, Fedora saves the two previous entries as backups, in case something goes wrong with the update.  I want to try to compile the kernel on my own (I want to enable ipv6 subtrees), and I would like the newly compiled kernel to be in a separate entry, not overwriting any of the fedora entries.  I tried to make five entries by setting installonly_limit=5 in /etc/dnf/dnf.conf, and I upgraded the kernel, but on reboot I still only see 3 entries, not 5. (Actually there are 6, 3 Fedora, 1 fedora recovery(?) and 2 windows. But I would like 5 for Fedora.)  Do I need to change anything else? Will compiling a new kernel overwrite any previous entries or will it just add an entry?


I have to prove that $\sum_{n=l+1}^{\infty} \sqrt{\frac{n}{2^n}} \leq C \sqrt{h\log(\frac{1}{h})}$ where $2^{-l} <h \leq 2^{-l+1}$?.


Can I search my comments using some keyword(s)?

Here's my problem: I know I've posted something on Stack Overflow about a particular topic.  I know how to search all my answers with a given keyword, and that feature works well.  But, if I don't find anything, I assume that it must have been a comment that I posted on the subject, and I'd like to be able to find it, and the question it belongs to.  I have read:  , , and  on Meta.  Basically, all the responses to those are about 3 years old, so it seems reasonable (to me) to ask this again ...  I've also tried just searching on Google with the keyword(s), my SO username (which I guess unfortunately is (a) not that unusual, and (b) a substring of other words, like unfortunately!), and site:stackoverflow.com, without much success.  Is there a Stack Exchange API or query that I could run to search my comments, using a keyword or keywords?  I did see one  in one of the questions linked to above indicating that the (2009) inability to do this was annoying him, too, so hopefully I'm not the only one who's tried to do this.


The derivative of the absolute value |x|

I read about the derivative of the absolute value |x|, but why the absolute value is not differentiable at point zero, and when it becomes 1 or -1 {geometrically}?  Thanks


How do I determine what my TF2 items are worth?

As someone who doesn't play Team Fortress 2, I occasionally get people asking me to trade, but I have no idea what's a "fair" price for these items. I don't really get this whole trading thing (I've seen people ask for "63 buds", I have zero idea what that means), but I don't want to get ripped off.   Some recent  examples would be:        How can I figure out how much an item is worth? What "lingo" do I need to know in order to trade?


Conditional convergence of $\int_1^{\infty} \frac{\sin(x)}{x}dx$?

What's a simple way to display $$\int_1^{\infty} \frac{\sin(x)}{x}dx$$ conditionally convergent (i.e. convergent, but not absolutely)?


Proving $2^n\leq 2^{n+1}-2^{n-1}-1$ for all $n\geq 1$ by induction

I am trying to prove that for every element of $\mathbb{N}$, that                    $2^n \leq 2^{n+1} - 2^{n-1} - 1.$ I started by showing that initial case, of $n=1$, is true. Then I proceed to the inductive step by assuming that for some $k$ in $\mathbb{N}$,                     $2^k \leq 2^{k+1} - 2^{k-1} - 1$.  Then, for $n=k+1$,                    $2^{k+1} \leq 2^{k+2} - 2^{k} - 1$. Is this sufficient to prove the statement by induction or do I have to expand the exponentials to rearrange the inequality in a different way?


Say I use a , and also inside Systems I hold lists of all entities that Systems are required to process.  How do I maintain this list of entities in desired rendering order, i.e. for a dumb 2D RenderingSystem?   I saw , and what they suggest is to do something like Z ordering - what I would probably do is just to store a "layer" int in DrawableComponent and then, inside RenderingSystem, just sort entities by mentioned "layer" whenever the entity list for RenderingSystem changes.  They also say we could just delete and recreate the entity whenever we want it on the top, but it seems too inflexible to me.  How is this problem usually solved?


I just picked up a copy of Windows 7 Pro OEM for install on my computer.  Guy at the store said the only real difference between OEM and standard retail box was tech support.  However, the outside of the box has this big warning that says "The software must be installed with an OPK"?  What is the OPK?  Is it really necessary?  The MS site about it seemed to say it was optional.  EDIT:  BTW - I'm just an individual tinkerer, and not a System Builder Company Employee.  I should have made that clear.  I've used sysprep in a professional setting in the past, so I'm somewhat familiar with its concepts.


Safest temperature for storing refrigerated eggs

:  MY eggs were in the refrigerator and we were out of town for 3 days.When we returned I noticed that the fridge was not as cold as I thought it should be.  We placed a thermometer in it and the readings fluctuated between 40 and 60 degrees all day.  These were refrigerated eggs purchased from a grocery store They were refrigerated when I got them home They were in 40 – 60 degrees for 3 days Are they safe to eat?


I'm  and I noticed a strange issue.  Some questions list a "Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results." close vote:    But I have no such option under off-topic. These are the off-topic reasons I can see:    The "minimal understanding" option is not there. Reading through meta I understood the option has been removed some time ago (look in the related questions on the right), yet I see it.  Am I missing an option, is it an alias for one of the available options or is it a close vote lingering from before the voting mechanism rework?


Using Mr/Miss with first name signifies a close relationship?

My Japanese friend asked me if the following is true.   Mr. Smith (typical way of calling someone in a formal situation)  Mr. John (signifies that you have a very close relationship by using the first name instead of their last name)  Mr. Smith John (when you want to use the entire name no matter what)  For me, Mr. Smith John sounds more formal than Mr. Smith, and although Mr. John sounds less formal compared to Mr. Smith, I can't say it means the relationship is very close.   What does everyone think about this? Maybe I'm wrong?


If GCD $(a_1,\ldots, a_n)=1$ then there's a matrix in $SL_n(\mathbb{Z})$ with first row $(a_1,\ldots, a_n)$

Let $n \geq 2$. Let $a_1, a_2, \ldots, a_n$ be $n$ integers such that $\gcd\left(a_1, a_2, \ldots, a_n\right) = 1$. Prove that there exists a matrix in $\operatorname{SL}_n\left(\mathbb{Z}\right)$ whose first row is $\left(a_1, a_2, \ldots, a_n\right)$.   Since the gcd of the integers $a_1,\ldots, a_n$ is $1$, there exists weights $x_i \in \mathbb{Z}$ such that $a_1x_1+\cdots+ a_nx_n=1$. My two ideas are (a) to brute force construct an $n\times n$ matrix with first row $a_1,\ldots ,a_n$ and to construct the remaining rows such that the determinant is $\sum a_ix_i=1$ or (b) to use induction.  (a) (Constructive) This is tedious since once I find a way to construct the remaining $n-1$ rows to ensure that $a_1x_1$ appears in the determinant, I am not sure how to modify these $n-1$ rows to ensure  that only the terms $a_ix_i$ appear in the cofactor expansion. If such a matrix exists, I'd like to see it.  (ii) (Non-constructive) If I proceed by induction then the base case $n=2$ is settled since I can choose the 2nd row to be $-x_2, x_1$ so that the determinant is $a_1x_1-a_2(-x_2)=1$. However, I'm not sure how to use the inductive hypothesis to show that if I can construct such an $n\times n$-matrix then I can construct an $\left(n+1\right) \times \left(n+1\right)$-matrix with the desired property. In particular, if the gcd $(a_1,\ldots ,a_{n+1})$ is $1$, it is not necesarry that the gcd of any $n$ of these terms is $1$, so induction may not even apply here.  How can I construct such a matrix or prove that one exists (without necessarily constructing it)?


Is there a way to pass a PHP value to JavaScript?

I have a link generated within a JavaScript file that contains the following code:  jQuery(".url").append('');   I would like to alter the path variables when user is not logged. In Drupal terms this would look like: global $user; if (user->uid == 0) {..redirect page.} or global $user; return !(bool) $user->uid;  How can I use the $user->uid property with JavaScript code?


I'm using WordPress' built in gallery feature on a post. However, it produces the images with inline height and width attributes:

   And I have tried the following filters, but none work:  add_filter( 'get_image_tag', 'remove_width_and_height_attribute', 10 ); add_filter( 'post_gallery', 'remove_width_and_height_attribute', 10 ); add_filter( 'image_send_to_editor', 'remove_width_and_height_attribute', 10 );  function remove_width_and_height_attribute( $html ) {    return preg_replace( '/(height|width)="\d*"\s/', "", $html ); }   I am not sure what the image is defined as: a thumbnail, a gallery image? What do I need to filter to remove this?


Why would someone prefer halfwave rectifier over bridge rectifier?

The other day, out of curiosity I was measuring the current wave shape of a laptop charger. The wave shape indicated a spike only in one half cycle. I'm guessing half wave rectifier here.  One thing that kept me thinking was Why would someone prefer a half wave over full bridge and full wave rectifier?  I'm guessing lower BOM cost / the 1.4V drop across the diodes.  Or was it just the designers choice and there's no point in thinking about it ?


pgfplots: Dancing 'ylabel' when Using 'extra y ticks' / Unexpected Behaviour [Follow Up Question]

Follow up question to . Problem is, if I add an extra y tick then the y label is shifted although it is not necessary at all (in my opinion). I try to make it very clear by adding an extra y tick that has the same size than the normal y ticks. In my opinion, this may be a bug.     \documentclass[tikz]{standalone}  \usepackage{pgfplots} \pgfplotsset{compat=newest} % <-- Causes dancing y label when adding  'extra y ticks'  \pgfplotsset{myDefaultStyle/.style =      {     width = 160mm,     height = 90mm,     axis x line = bottom,     axis y line = left,     ylabel = y Label,     xlabel = x Label,        grid = major,     }}  \begin{document}  % ######### Plot ######### % ######################## \begin{tikzpicture}     \begin{axis}[         myDefaultStyle,         xmin = 0,         xmax = 32,         ymin = 24.5,         ymax = 30.1,                 xtick = {0,10,20,30},            ytick = {25,26,30},          ]     % Plots      \addplot[domain=0:10,red]{x^2};          %        \end{axis} \end{tikzpicture}  % ######### Plot ######### % ######################## \begin{tikzpicture}     \begin{axis}[         myDefaultStyle,         xmin = 0,         xmax = 32,         ymin = 24.5,         ymax = 30.1,                 xtick = {0,10,20,30},            ytick = {25,26,30},              extra y ticks={25.5}, % <-- Added     ]     % Plots          \addplot[domain=0:10,red]{x^2};      %     \end{axis} \end{tikzpicture}  \end{document}


How to download a text editor on xubuntu?

Should I install my text editor from the ubuntu software store or download it manually? And how do I download it manually?


Home due to COVID.  I looked at  and installed it. Found that it slowed down anything I was typing or sending. How do I uninstall DWService on my desktop?


Referencing between class Object initialized with null

Here is my example: I want to know if it is possible to pass an argument initialized with null, and later initialize the object with a correct value.  private class Source {   String str;   String getStringValue() {     return str;   }   void setStringValue(String str) {     this.str = str;   } }  private class UserSource {   Source src;   UserSource(Source src) {     this.src = src;   }   String getValue() {     return src.getStringValue();   }   void setValue(String str) {     src.setStringValue(str);   } }   Now how I'm using.    Source srcW = new Source();   UserSource userSourceW = new UserSource(srcW);   srcW.setStringValue("Second Value");   System.out.println("From UserSource:" + userSourceW.getValue());   userSourceW.setValue("Is not Second");   System.out.println("From Source:" + srcW.getStringValue());   The output:  From UserSource:Second Value From Source:Is not Second   But,  want to know if is possible to use like:    Source srcN = null;  // YES I want to assign Not initialized!   UserSource userSourceN = new UserSource(srcN);   srcN = new Source();   srcN.setStringValue("First Value");   System.out.println("From UserSource:" + userSourceN.getValue());   Of course the output is  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException   Is there an alternative?


unordered list items not aligning to each other

I have this code that should create a sticky navigation bar on the top of the site: #navigation-bar {     list-style-type: none;     margin: 0;     padding: 0;     background-color: rgb(225, 151, 77, 0.95);     overflow: hidden;     position: sticky;     top: 0; }  #navigation-bar li {     float: left; }  #navigation-bar li a {     color: white;     padding: 5px;     text-decoration: none;     display: block;     text-align: center;     font-family: sans-serif; }  #navigation-bar li a:hover {     background-color: red;     color: rgb(225, 151, 77); }  header {     position: sticky;     top: 0; }  #navigation-home-logo {     height: 50px;     padding: 0;     margin: 0; }

INSTAGRAM

TIKTOK

TWITTER

YOUTUBE

        I don't understand why the other links are not lining vertically with the image, I tried setting the image padding and margin to 0 but obv it didn't work and I have no idea of what the problem is


What are the parts of speech of "tiring" and "tired" below?

He is tiring He is already tiring  (may be 2 different answers above, and below) He is tired He is already tired   Further, quoting from World Book Dictionary :-  "a participle is a form of the verb used as an adjective or noun",   Does that mean that a participle is a verb, or an adjective/noun?


Can I transfer Windows 10 Pro license to another computer?

I have bought a windows 10 pro license for my laptop that I no longer need and wanted to transfer to my desktop. I wouldn't like to buy a new license for my desktop since I won't use laptop anymore....  is this doable under microsoft license?   I tried to search this for quite a while but couldn't figure out. I sent e-mail to microsoft support but got some stupid generic help talking about subject that I didn't even asked...  please help


i have a string like that  str = "4975 + 10 * (LOG(250.6)) - 321.2"   i want to compute the result of this operation. Is there any sort way to do that?  // my operation just includes some of operators (,), +, -, *, / , ., 0-9, LOG // '.' is used for double number


Nginx static file configuration for CenotOS 7 Minimal Installation

I have a brand new VM with CenotOS 7 Minimal Installation.  What I want to happen is to configure Nginx to serve static files from a directory on localhost:80.  My directory is /home/kenny/projects/kcrypt/dist/.  Here are the contents of my /etc/nginx/nginx.conf:  # this is set to root in order to rule out # any permission related issues. user root;      worker_processes auto; error_log /var/log/nginx/error.log; pid /run/nginx.pid;  include /usr/share/nginx/modules/*.conf;  events {     worker_connections 1024; }  http {     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '                       '$status $body_bytes_sent "$http_referer" '                       '"$http_user_agent" "$http_x_forwarded_for"';      access_log  /var/log/nginx/access.log  main;      sendfile            on;     tcp_nopush          on;     tcp_nodelay         on;     keepalive_timeout   65;     types_hash_max_size 2048;      include             /etc/nginx/mime.types;     default_type        application/octet-stream;      server {         listen       80 default_server;         listen       [::]:80 default_server;         root         /home/kenny/projects/kcrypt/dist/;         index index.html;          location / {         }     } }   when I run curl http://localhost I get this response:   <title>403 Forbidden</title>
403 Forbidden

nginx/1.12.2     I have tried giving all kinds of permissions to any directories that I can think of.   In the end I configured Nginx to run as root.   I have reinstalled the OS multiple times already and can't get it to work.   P.S.   This is what I found in /var/log/nginx/error.log  2018/02/27 21:33:19 [error] 15689#0: *1 open() "/home/kenny/projects/kcrypt/dist/index.html" failed (13: Permission denied), client: ::1, server: , request: "GET / HTTP/1.1", host: "localhost" 2018/02/27 21:33:35 [error] 15690#0: *2 open() "/home/kenny/projects/kcrypt/dist/index.html" failed (13: Permission denied), client: 127.0.0.1, server: , request: "GET / HTTP/1.1", host: "127.0.0.1" 2018/02/27 21:33:38 [error] 15690#0: *3 open() "/home/kenny/projects/kcrypt/dist/index.html" failed (13: Permission denied), client: ::1, server: , request: "GET / HTTP/1.1", host: "localhost"   I don't get what it wants... I have given it all the permissions that I can.   This is what I have in the root directory:  [root@vm3 dist]# ll total 368K drwxrwxrwx. 2 root root   98 Feb 26 23:16 . drwxrwxrwx. 6 root root  234 Feb 27 21:26 .. -rwxrwxrwx. 1 root root 1.2K Feb 26 23:16 favicon.ico -rwxrwxrwx. 1 root root 1.7K Feb 26 23:16 index.html -rwxrwxrwx. 1 root root 175K Feb 26 22:53 index.js -rwxrwxrwx. 1 root root  297 Feb 26 23:16 manifest.json -rwxrwxrwx. 1 root root 179K Feb 26 22:53 styles.css   P.S. 2  I have tried putting my static files in /var/www/kcrypt/dist/, but with no result.  I still get the same error messages:   2018/02/27 23:18:11 [error] 16157#0: *1 open() "/var/www/kcrypt/dist/index.html" failed (13: Permission denied), client: ::1, server: , request: "GET / HTTP/1.1", host: "localhost" 2018/02/27 23:20:58 [error] 16535#0: *1 open() "/var/www/kcrypt/dist/index.html" failed (13: Permission denied), client: ::1, server: , request: "GET / HTTP/1.1", host: "localhost" 2018/02/27 23:21:30 [error] 16564#0: *1 open() "/var/www/kcrypt/dist/index.html" failed (13: Permission denied), client: ::1, server: , request: "GET / HTTP/1.1", host: "localhost"


What does the notation $\mathcal{O}\left(\frac{1}{r^2}\right)$ mean?

I was reading a text about quantum scattering, and I faced a notation I don't understand. The equation is the following: $$ \nabla \psi_{\text{scattered}} = \frac{i k f(\theta) e^{ikr}}{r} \mathbf{\hat{r}} + \mathcal{O}\left(\frac{1}{r^2}\right) $$ and I do not know the meaning of the $\mathcal{O}\left(\frac{1}{r^2}\right)$ portion.


I am a Greek citizen; this means that I have the chance to travel with ESTA. I have already bought my plane ticket and I will be in San Fransisco for 46 days, taking my backpack and travelling by bus.  Will it be a problem travelling so long as a visitor? They won't regard me harshly for being 46 days as a tourist, will they?


Is EU residence permit still valid for transit through London for a Non-EU citizen(post brexit)

I'll be traveling to India via London from Helsinki in April 2019( post brexit) , I currently hold a residence premit issued by Finland, Do I need to apply to for a transit Visa (Direct Air Transit ) or I'm still exempt from it


How did Ron enter into the Chamber of Secrets?

In Harry Potter and the Deathly Hallows Ron enters into the the 'Chamber of Secrets' by mimicking parseltongue. How exactly could he enter into Chamber when he is not the one. Does the magic on doors not recognize whether the person is really s parseltongue or not?     What is certain is that by the time Slytherin was forced out of the school by the other three founders, he had decided that henceforth, the Chamber he had built would be the lair of a monster that he alone – or his descendants – would be able to control: a Basilisk. Moreover, only a Parselmouth would be able to enter the Chamber


This question may be a bit vague, but neverthless, i would like to see an answer. Wikipedia tells me that:   In abstract algebra, localization is a systematic method of adding multiplicative inverses to a ring.   It is clear that for integral domains, we have the Field of Fractions, and we work on it. It's obvious that a Field has multiplicative inverses. Now if we consider any arbitrary ring $R$, by the definition of localization, it means that we are adding multiplicative inverses to $R$ thereby wanting $R$ to be a division ring or a field. My question, why is it so important to look at this concept of Localization. Or how would the theory look like if we never had the concept of Localization.


How Can I Delete Some Disk Images in My Recovery Partition?

When I updated my mid-2011 MacBook Air from Sierra to High Sierra last year I had some installation issues... which resulted in creating at least 2, maybe 3 disk images in my recovery drive.  I have disk image files where they don't belong (like keychain)and my system compensated by putting them in other locations.   The repercussions are greater than I can list here... The two that are most troublesome are:   /dev/disk4 in /Volumes and /dev/disk12 on /Volumes/untitled.  -bash-3.2# mount  /dev/disk1s1 on / (hfs, local, read-only)   devfs on /dev (devfs, local, nobrowse)   /dev/disk3 on /private/var/log (hfs, local, union, nobrowse) /dev/disk4 on /Volumes (hfs, local, union, nobrowse) /dev/disk5 on /private/var/tmp (hfs, local, union, nobrowse) /dev/disk6 on /private/var/run (hfs, local, union, nobrowse)  /dev/disk7 on /private/tmp (hfs, local, union, nobrowse) /dev/disk8 on /System/Installation (hfs, local, union, nobrowse) /dev/disk9 on /private/var/db (hfs, local, union, nobrowse) /dev/disk10 on /private/var/folders (hfs, local, union, nobrowse) /dev/disk11 on /private/var/root/Library (hfs, local, union, nobrowse) /dev/disk13 on /private/var/root/Library/Containers (hfs, local, union, nobrowse) /dev/disk14 on /Library/Preferences (hfs, local, union, nobrowse) /dev/disk15 on /Library/Preferences/SystemConfiguration (hfs, local, union, nobrowse) /dev/disk16 on /Library/Keychains (hfs, local, union, nobrowse) /dev/disk17 on /private/var/tmp/RecoveryTemp (hfs, local, union, nobrowse) /dev/disk18 on /private/var/tmp/InstallerCookies (hfs, local, union, nobrowse) /dev/disk2 on /Volumes/Macintosh HD (hfs, local, journaled) /dev/disk12 on /Volumes/untitled (hfs, local, nodev, nosuid, no owners)


Most "statistically sound" method for finding the average of multiple different metrics

If I have 3 different metrics and I wanted to find an "average" (not necessarily arithmetic mean) of the 3 metrics so that observations can be ranked, what would be the most "statistically sound" method of doing so?  Here's an example with baseball:   I have 3 metrics:    Batting Average (ranges from 0.000 to 0.350) Home Runs (ranges from 0 to 50) RBI (ranges from 0 to 120)   And I want to equally weight each metric and take some sort of average so that I can rank different players, with the best players being great in all 3 metrics.  If I wanted to "average" the metrics so that each metric has equal weight, I could:   Standardize each metric so they're all on the same scale and calculate the arithmetic mean Calculate the geometric mean Calculate the harmonic mean   Is 1 of these methods more/less "statistically sound" than the others, in terms of not violating any assumptions or anything of the like?


Let $U,V \sim R(0,1)$ be independent. Calculate $P(U \leq V)$.   About notation: $U,V \sim R(0,1)$ mean random variables $U,V$ is equally distributed from interval $0$ to $1$.  I think there is not much to do because we have given $P(U \leq V)$, there is symmetric rule which say $$P(U \leq V) = P(V \leq U) = 0.5$$  Is this really easy like that? Or maybe that rule is not really useable here?


Why do double-faced planeswalkers from Origins get exiled before being transformed?

In Magic the Gathering Origins set, there is a cycle of 5 creatures, each that are double-sided and have a planeswalker on the back side. Previously when double-sided cards were used, the cards had a condition that when triggered, said to "transform [CARD NAME]". However, with this cycle of cards, instead of simply being transformed, when the condition is met, the cards are exiled and then returned to the battlefield transformed.  Is there a reason for this? There's obviously a few different situations in which case this will be different for game purposes, such as if the creature was being targeted by a spell on the stack when it's transform condition triggered. But most of the time it would play out the same. And the new version is a little wordier than the old, as well as different than what people were used to; so I'm assuming that there's either a mechanical reason or a flavorful reason for doing it this way. Are there any rules issues that would be caused by a creature simply transforming into a planeswalker?


Man creates miniature population on different time-scale; uses them to invent the 'absolute protection' dome

My dad has been trying to find the title of a short story for ages. According to him, the story goes like this:  A scientist who works on an island manages to create a miniature population with whom he can communicate. As time is proportional to their size, it goes way faster for them than the scientist, which allows the creatures to be able to make inventions humans can't yet.   The scientist, whom the creatures worship as a God, starts asking them to reveal how to make these inventions humans are unable to create. At one point, his miniature people end up developing the transport of wireless energy.  Because of the industrial lobby of the human world, the scientist and his people are under a death threat. He asks the creatures to develop the absolute protection, which they do, but this stops the communication between the scientist and his people. He can only see a grey dome in his microscope.   At the last moment, as missiles have been fired towards the island, a breach opens in the dome. The scientist gets a message from his creatures: they ask for forgiveness as they were not able to reach him anymore until then. He responds that if they want to be forgiven, they must amplify the action of the dome.  In the end, the whole island is covered with an indestructible grey dome that no one can see through.  Some parts might be added by my dad's imagination but if you find anything similar to this plot, we would be really grateful!


When should an iterator return an IEnumerator instead of an IEnumerable?

Using yield return turns a method into an iterator.   I have found that an iterator can only be used in a foreach loop if it returns one of the IEnumerable types. Given this limitation, when would it make sense to choose an IEnumerator return type instead of an IEnumerable?


What is this letter called? How to generate it in LaTeX?


I'm not a native speaker so my apologies if this question is dumb. Which one of these is correct?        I didn't know what to do, so I asked my sister whom has done this before   I didn't know what to do, so I asked my sister who has done this before      I guess, the first one is correct.


Deterministic method to find out whether some other process is in a chroot jail and where?

NOTE: I'm familiar with this U&L Q&A titled:  that sounds similar to what I'm asking, but there's a subtle difference to what I'm looking for. That one focuses on the process itself detecting that it's in a chrooted environment, I'm asking how one process to find out that another is chrooted.    Was looking into an apache issue in a unfamiliar server. The output of ps -ef looked like this:  [belmin@server131 ~]$ sudo ps -ef | grep httpd apache   14363 4082  0 14:04 ?        00:00:00 /usr/local/apache2/bin/httpd -k start apache   14365 4082  0 14:04 ?        00:00:00 /usr/local/apache2/bin/httpd -k start   I looked in /usr/local/apache2/conf for the configuration and it was not what I expected given the symptoms we were seeing. Decided to double check the init script and noticed the actual process was in a chroot jail.  For future reference, is there a way of figuring out if a process is in a chroot jail with just the PID? And how would I find out the path of the chroot jail?


Why don't all gasses have infinite entropy?

Entropy of an ideal gas is defined as the logarithm of the number of possible states the gas can have multiplied by Boltzmann's constant:  $${\displaystyle S=k_{\mathrm {B} }\log \Omega .}$$  In deriving the Maxwell-Boltzmann distribution, we initially start by counting a finite number of states, so this definition of entropy makes sense. But in the end we say that the number of possible states is so high that we can acctually say the distribution is continuous. But if the distribution is continuous, the number of possible states is infinite. So why is entropy not always infinite when a continuous distribution is used?


Textbook approach to modeling non-proportional hazards in the Cox model

In Cox models with time varying coefficients, the effect of covariates on the hazard is allowed to change through time. In cases where a coefficient has a linear relationship with time, I am aware of at least two text books ( and an Appendix to ) that advocate for the following model, first in R code:  coxph(Surv(time, death) ~ disease + disease:time)   And now in mathematical notation:  $$ h(t|X) = h_0(t) \exp(\beta_1X + \beta_2X_T) $$ Where $h(t|X)$ is the instantaneous hazard rate at time $t$ given covariates $X$; $h_0(t)$ is the baseline hazard rate; and $T$ is the censoring or event times. $\beta_1$ represents the log hazard ratio for individuals with $T=0$ (which is sort of nonsensical since you can't have $T=0$ in the data), while $\beta_2$ is harder to interpret... $\beta_2$ shows how the log hazard ratio depends on censoring/event times, but that is circular because event times are also the response variable (this point is made in Terry Therneau’s vignette “”).  According to Therneau's vignette, to correctly specify a time varying coefficient, you need to use the following model, first in R code:  coxph(Surv(time, death) ~ disease + tt(disease), tt=function(x,t,...){x*t})   And now in mathematical notation: $$ h(t|X) = h_0(t) \exp(\beta_1X + \beta_2X_T) $$  The difference is that the time interaction is with $t$ in the model rather than with the event times $T$ in the data. The resulting parameters are easy to interpret: they are the intercept and slope of the linear relationship between the log hazard ratio of $X$ and time. This approach seems like the proper way to model a time varying effect.  Can anyone justify or advocate for the first approach to modeling non-proportional hazards in the Cox model? If it is really incorrect (as I suspect it is), what are the practical consequences of using this approach?


Cannot install or remove packages( terminal, synaptic or software center)

dpkg: unrecoverable fatal error, aborting: reading files list for package 'libxml2:i386': Input/output error E: Sub-process /usr/bin/dpkg returned an error code (2)


Can we write javascript code in twig template?   Its needed to write javascript code in twig template.  When we are writting the same code in custom.js file that particular code is not working in it.  How to write javascript code directly into the twig template?