.htaccess causes infinite loop on live server but works on localhost

I'm a newbie .htaccess and regex. I have a script that works locally but when I upload it to a live server it causes an infinite loop. How can I fix this? On the site when you load http://subdomain.example.com if you are unauthenticated it takes you to http://subdomain.example.com/auth/ for a login form, else it displays the contents of http://subdomain.example.com/index.php. It works fine locally but when I upload on a live server, it cannot find auth.php so it redirects to the index page and because the user is not authenticated it sends to auth.php thus the infinite loop. When I test my .htaccess from here  the results are as shown below. Please advice. Please help. Thanks.  This is my file  Options +FollowSymLinks -MultiViews -Indexes  <IfModule mod_rewrite.c>    DirectoryIndex index.php    RewriteEngine On    RewriteBase /          # remove php extensions (only for GET method)    RewriteCond %{THE_REQUEST} ^GET\ /(.+)\.php(?:\?|\s) [NC] #This variable is not supported: %{THE_REQUEST}    RewriteCond %{REQUEST_FILENAME} -f #This variable is not supported: %{REQUEST_FILENAME}    RewriteRule ^ %1/? [L,R=301] #This rule was not met because one of the conditions was not met     # don't touch other existing files/folders    RewriteCond %{REQUEST_FILENAME} -f [OR] #This variable is not supported: %{REQUEST_FILENAME}    RewriteCond %{REQUEST_FILENAME} -d [OR] #This variable is not supported: %{REQUEST_FILENAME}    RewriteCond %{ENV:REDIRECT_STATUS} \d #This variable is not supported: %{ENV:REDIRECT_STATUS}    RewriteRule ^ - [L] #This rule was not met because one of the conditions was not met     # force trailing slash    RewriteCond %{DOCUMENT_ROOT}/$1\.php -f #This variable is not supported: %{DOCUMENT_ROOT}/$1\.php    RewriteRule ^(.+?[^/])$ $1/ [L,R=301] #This rule was not met because one of the conditions was not met     RewriteCond %{DOCUMENT_ROOT}/$1.php -f #This variable is not supported: %{DOCUMENT_ROOT}/$1.php    RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ $1.php?a=$2&id=$3 [QSA,L]#This rule was not met because one of the conditions was not met     #rewrite path to file eg http://example.com/auth/recover to http://example.com/auth.php?a=recover    RewriteCond %{DOCUMENT_ROOT}/$1.php -f #This variable is not supported: %{DOCUMENT_ROOT}/$1.php    RewriteRule ^([^/]+)/([^/]+)/?$ $1.php?a=$2 [QSA,L] #This rule was not met because one of the conditions was not met     # rewrite extensionless php files    RewriteCond %{DOCUMENT_ROOT}/$1.php -f #This variable is not supported: %{DOCUMENT_ROOT}/$1.php    RewriteRule ^(.+?)/$ $1.php [L] #This rule was not met because one of the conditions was not met     # finally, if not found    RewriteRule . index.php [L] #This rule was met, the new url is http://subdomain.example.com/index.php </IfModule>


Evaluate $\frac{1+\frac{1}{2^p}+\frac{1}{3^p}+\frac{1}{4^p}+...}{1-\frac{1}{2^p}+\frac{1}{3^p}-\frac{1}{4^p}+...}$ where $p>1$.  Attempt: Observe that $B=\frac{1}{2^p}+\frac{1}{4^p}+...=\frac{1}{2^p}(1+\frac{1}{2^p}+\frac{1}{3^p}+\frac{1}{4^p}+...)=\frac{1}{2^p}(A+B)$. Rearrage top and bottom should give results. Are there any alternative solutions?


Linux alternative for advanced ip scanner

A friend of my lately introduced to tools called . It a great tool. It basically scans all addresses to check the address of device even if this device is not in our network. When I connect a device on my computer and I don't know its IP address. If the device has 1.1.1.1 or 3.3.3 or 6.6.6.6 8.8.8.8 this tool will find it. A tool like Nmap works to find it if I know the range where my device could be.   I was wondering if there is a Linux alternative for this tool.


Alignment of the titles in a ToC and \Roman{section}

There is a problem with the alignment of the numbering of the ToC: When we use   \renewcommand{\thesection}{\Roman{section}}   the numbers encroach on the titles. When the command is commented out, the numbers are all aligned [from the first number on the left] but the titles do not begin at the same position.  What I want is to use \Roman{section} but with the numbers being displaced after V (or 9 in arabic) so that the first letters of the  titles are all aligned !  An illustration:  %\RequirePackage{fix-cm} \documentclass[a4paper, 11pt, twoside]{article}  \renewcommand{\thesection}{\Roman{section}}  \begin{document}   \tableofcontents \normalfont %\cleardoublepage  \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY} \section{QWERTY}  \end{document}


Showing that $\frac{X_{(i)}}{X_{(n)}},i=1,2,...,n-1$ and $X_{(n)}$ are independent for a population with df $F(y)=y^{\theta}$

Let $X_1,X_2,...,X_n$ be i.i.d with df $F(y)=y^{\theta}, 0<y<1, \theta>0$. Show that $\frac{X_{(i)}}{X_{(n)}}$, for $i=1,2,...,n-1$ and $X_{(n)}$ are independent.  I found the population pdf to be $$f(x)=\theta x^{\theta -1} I_{0<x<1}$$ Now, $$f(x_1,x_2,...x_n)=\theta^n\prod_{i=1}^{n}{x_{i}}^{\theta - 1}$$ Now, the joint distribution of the order statistics: $$f_{1,2,..,n}(x_1,...x_n)=n! \theta^n\prod_{i=1}^{n}{x_{i}}^{\theta - 1} I_{0<x_1<x_2,...<x_n<1}$$ Now , we take the transformation $Y_i=\frac{X_i}{X_n} $ for $i=1,2,..,n-1$ and $Y_n=X_n$ Have I done correctly so far? Also, I found out the Jacobian of transformation $={y_n}^{n-1}$. I am also finding it difficult to get the ranges of $Y_i$'s. Help!


Tonelli-Shank vales are incorrect when trying to get back to c value for Rabin


Use Caps Lock LED as HDD LED (or custom) indicator

I have my Caps Lock key remapped to Esc, so now I have a LED on my keyboard that is never on. I'd like to use it for something useful, like HDD or LAN activity.  Especially that I'm using a computer with a custom box & heatsinks (built into my drawer so I don't have to listen to the HDD and it doesn't take up much space), and the LEDs are not visible otherwise.  If there's a library for controlling the keyboard LEDs, I could do some coding myself, if there isn't a solution for this already.  I'm on Gentoo ~amd64.  EDIT: Ok, forget about the HDD LED. It was just an example.  I want the Caps Lock LED to light up when it's my birthday. Or when I have email. Or when I say "Caps Lock LED, please light up!".  I absolutely do not want to use an extra wire. In fact, it would be nice if this would work on wireless keyboards as well.


The beauty or the beast - which answer to accept?

The beauty First answer taught me some really nice and elegant ways to achieve the exact thing I was asking about. The beast Second answer made me see things in a different way, and led me to an overall better and more reliable solution, but without providing a direct answer to my original question. Who should be rewarded the rep?


What's the real fundamental definition of energy?

Some physical quantities like position, velocity, momentum and force, have precise definition even on basic textbooks, however energy is a little confusing for me. My point here is: using our intuition we know what momentum should be and also we know that defining it as $p = mv$ is a good definition. Also, based on Newton's law we can intuit and define what forces are.  However, when it comes to  many textbooks become a little "circular". They first try to define work, and after some arguments they just give a formula $W = F\cdot r$ without motivating or giving intuition about this definition. Then they say that work is variation of energy and they never give a formal definition of energy. I've heard that "energy is a number that remains unchanged after any process that a system undergoes", however I think that this is not so good for three reasons: first because momentum is also conserved, so it fits this definition and it's not energy, second because recently I've heard that on general relativity there's a loss of some conservation laws and third because conservation of energy can be derived as consequence of other definitions.  So, how energy is defined formally in a way that fits both classical and modern physics without falling into circular arguments?


Dynamic Paint not showing in rendered image

To make it simple: I have a project using dynamic paint. In the viewport the dynamic paint works as it's supposed to work. But when rendering it the dynamic paint doesn't show/gets rendered.   I really have no idea what I did wrong so I'm hoping that someone of you knows how to fix this.


Are "literally" and "metaphorically" synonymous?

I sometimes hear people speak and they sometimes say "literally" or "metaphorically"... are these words synonymous?


Apt unmet dependencies account-plugin-facebook and google

I'm running Kubuntu 16.04 and I decided to try mate (I guess I must have installed the default ackage but I'm not sure). It was running fine until today when I installed ubuntu-mate-desktop . The install crashed due to files already present in the KDE archives. I don't care about the google plugin and I don't have Facebook so I'm really not bothered.  But I can no longer run apt-get commands. apt-get install -f returns the following :   Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   account-plugin-facebook account-plugin-google The following NEW packages will be installed:   account-plugin-facebook account-plugin-google 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0 B/6 222 B of archives. After this operation, 58,4 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 314495 files and directories currently installed.) Preparing to unpack .../account-plugin-facebook_0.12+16.04.20160126-0ubuntu1_all.deb ... Unpacking account-plugin-facebook (0.12+16.04.20160126-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/account-plugin-facebook_0.12+16.04.20160126-0ubuntu1_all.deb (--unpack):  trying to overwrite '/etc/signon-ui/webkit-options.d/www.facebook.com.conf', which is also in package kaccounts-providers 4:15.12.3-0ubuntu1 Preparing to unpack .../account-plugin-google_0.12+16.04.20160126-0ubuntu1_all.deb ... Unpacking account-plugin-google (0.12+16.04.20160126-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/account-plugin-google_0.12+16.04.20160126-0ubuntu1_all.deb (--unpack):  trying to overwrite '/usr/share/accounts/providers/google.provider', which is also in package kaccounts-providers 4:15.12.3-0ubuntu1 Errors were encountered while processing:  /var/cache/apt/archives/account-plugin-facebook_0.12+16.04.20160126-0ubuntu1_all.deb  /var/cache/apt/archives/account-plugin-google_0.12+16.04.20160126-0ubuntu1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   How can I get it to work again?  Thanks


Let me edit a post in the close review, then vote to close it

I think we need a button that says Edit and Close added to the Review Close button options.  Many of these closed posts will be around forever (and should be, closed should not just be a path to deletion), so they need editing.  If I edit it now it goes away, with the only option being a back click to get back to the review, and then click into the post and edit it.  We have an Edit and Reopen button, so this would fit in just fine.


Where is the error in my proof that all derivatives are continuous?

I know that this can not be true due to counter-examples but I don't know where the error in my reasoning is.  Assumption: If $f(x)$ is differentiable in $\mathbb{R}$ then the derivative $f'(x)$ is continuous in  $\mathbb{R}$.  Faulty Proof: For every $c \in \mathbb{R}$, using the mean value theorem for $f(x),$ on the interval $x \in [c, c + h] $ where $h$ is positive.  $$ \frac{f(c + h) - f(c)}{h} = f'(\xi(h)) $$  Where $\xi(h) \in (c,c+h)$. Because this equation holds for every $h>0$. It must hold in the limit as $h \rightarrow 0^+$.   $$ \lim_{h\to 0^+}\frac{f(c + h) - f(c)}{h} = \lim_{h\to 0^+}f'(\xi(h))  $$  But the left side of the equation is the right one sided derivative.  $$ f'_{+}(c) = \lim_{h\to 0^+}\frac{f(c + h) - f(c)}{h} = \lim_{h\to 0^+}f'(\xi(h))  $$  The same can be done for $h$ being negative, but because of differentiability at every point the left and right derivatives must be equal.    $$ f'(c) = f'_{+}(c) = f'_{-}(c) = \lim_{h\to 0^-}\frac{f(c + h) - f(c)}{h} = \lim_{h\to 0^-}f'(\xi(h))  $$  As $h \rightarrow 0^+$, $\xi(h) \rightarrow c$. So because the limit $\lim_{h\to 0^+}f'(\xi(h))$ exists and $\xi(h) \neq c$, it is equal to $\lim_{x\to c^+}f'(x)$  It follows that $\lim_{x\to c^+}f'(x) = \lim_{x\to c^-}f'(x) = f'(c)$ so the function $f'(x)$ is continuous.


Derivation of t-distribution for small sample from Normal population

I recently learnt that r.v. $T=\frac{X_0}{\sqrt{\frac{1}{n}(Y_1^2+..+Y_n^2)}}$ follows t-distribution with parameter n, when $X_0,Y_1,..,Y_n \overset{i.i.d.}{\sim} \mathcal{N}(0,1)$  I also learnt that for a small sample size n, $T_0=\frac{\bar{X}-\mu}{S/\sqrt{n}}$ follows t-distribution when $X_1,..,X_n \overset{i.i.d.}{\sim} \mathcal{N}(\mu,\sigma^2)$. $\bar{X}$ and $S$ are sample mean and s.d. respectively.  However, when I try to derive $T$ from $T_0$, I am stuck.  I could derive that  $\bar{X}  \sim \mathcal{N}(\mu,\sigma^2/n)$. This means $X_0=\frac{\bar{X} - \mu}{\sigma^2/n}\  \sim \mathcal{N}(0,1)$   I could derive that  $X_1^2+..+X_n^2  \sim \chi_n^2$   But can't mode further.  I'll appreciate any help here.


Unable to TRUNCATE table even when no child records exists

I am trying to TRUNCATE a table but I am getting this error:  Cannot truncate a table 'ALOT_OF_USELESS_LOGS' because it is being referenced by a FOREIGN KEY constraint.   However, I have already truncated all the table where it is referenced EXEC sp_fkeys 'ALOT_OF_USELESS_LOGS' and they all truncated successfully but over this table I am still getting this error.  How can I let this go, ideally without dropping constraints?


What is the earliest work considered to be Science Fiction?

I have been reading a lot of Jules Verne's work written in the 1800's.  Very clearly science fiction. Mary Shelley's Frankenstein (1818) has some serious science in it also.    What is the earliest work that is recognized as being science fiction?


is local variable stay in memory in javascript?

I have one question is local variable stay in memory in javascript ?.  if NOT  then from where this.getSecond function get second variable value ?  function ClassA(){ this.first ='test'; var second ='abc'; this.getSecond =function(){ return second }  }  var a =new ClassA(); alert(a.getSecond())   if YES  where local variable store ?  fiddle link


When loading TeX.SX over TLS (e.g. ) with HTTPS Everywhere, images are not displayed.  Firefox shows this error (e.g. for ):     An error occurred during a connection to i.stack.imgur.com. Peer   reports it experienced an internal error. (Error code:   ssl_error_internal_error_alert)


Here is the code:          int a[2][4] = {             {3,   6,  9, 12},             {15, 18, 21, 24}         };         std::cout << 2[1[a]] <<std::endl;   the output is 21, which means 2[1[a]] is equal to the expression a[1][2].  I also try other expressions, and the result is same. num2[num1[a]] is equal to a[num1][num2] .  My question is, which book or reference says it works?


I want to add a key, value pair into a hashtable (or any other collection) but have to maintain insertion order. How can I do this?  Like I'll add 1 as key "one" as value, 2 as key and "two" as value.  The output should be:  1:one 2:two


I read in a piece of news . " the amount of time that young people spend inactive." Inactive is an adjective . I consider it should be inactively . Is it right?


Why does my toilet randomly start running?

Sometimes my toilet starts running for a few seconds at a time, like it's just finishing filling up the tank.  Usually this happens when the bathtub is being drained, or when I turn on the facets in the sink, but I think it also happens sometimes when no water is being used anywhere else.  As far as I can tell the flapper in the tank is working fine, and I don't see any leaks anywhere.


Downloads, Documents, Pictures Folders gone missing

When I try to open Documents or Pictures folders I get the below error message.     Unable to find the requested file. Please check the spelling and try again.     Following is the output of cat .config/user-dirs.dirs  > XDG_DESKTOP_DIR="$HOME/" > XDG_DOWNLOAD_DIR="$HOME/" > XDG_TEMPLATES_DIR="$HOME/Templates"  > XDG_PUBLICSHARE_DIR="$HOME/" > XDG_DOCUMENTS_DIR="$HOME/"  > XDG_MUSIC_DIR="$HOME/" > XDG_PICTURES_DIR="$HOME/" > XDG_VIDEOS_DIR="$HOME/Videos"   read few suggestions on creating new folders and linking them through config but I don't understand whether those steps can restore the data. Please suggest if there is any way to bring back those folders and data. EDIT: Output of ls $HOME  > Dropbox  'Screenshot from 2018-09-08 12-30-11.png'   soq.png     > Videos  NewDocuments  'Screenshot from 2018-09-08 12-31-57.png'   > Templates  rtlwifi_new    snap                                       > Testproj


Traveling to the future is possible, but not to the past?

I understand how going to the future is possible: If you go really fast, time around you slows down for observers.  But is it true that time traveling into the past isn't even theoretically possible?


The following code tries to determine from which input field the user has filled via the getParameter() method:  protected void doPost(HttpServletRequest request, HttpServletResponse  response) throws ServletException, IOException {          System.out.println(request.getParameter("userinput"));          if(request.getParameter("userinput") != "userinput")             accessExampleView(request, response);         else             accessServletSubsidiary(request, response);      }   Visually, I am trying to find out whether the user entered a value in the first field, or the second:    However, each time this runs, it points to accessExampleView. I tried setting the if statement logic to:     if(request.getParameter("userinput") != null)   to no avail - the first line continues to be true and routes to the accessExampleView method.  Essentially, is there a better way to check what kind of value exists in request object?  Here is the JSP file that this utilizes:  <%@ page language="java" contentType="text/html; charset=ISO-8859-1"     pageEncoding="ISO-8859-1"%> <!DOCTYPE html>   <meta charset="ISO-8859-1"> <title>JSP HTML page</title>    <form action="ServletHome" method="post"> <fieldset name="f1"> This page communicates with the servlet page via input types.

 Enter some text:  <input type="text" name="userinput"> <input type="submit" value="send">
 Enter your age: <input type="number" name="userAge"> <input type="submit" value="send">
 </fieldset> </form>


Invalid SSL certificate on meta.*.stackexchange.com, can't log in without SSL

When I try to access meta.*.stackexchange.com via HTTPS, I get a warning:  meta.codegolf.stackexchange.com uses an invalid security certificate. The certificate is only valid for the following names: *.stackexchange.com, stackexchange.com, meta.stackexchange.com, stackoverflow.com, *.stackoverflow.com, stackauth.com, sstatic.net, *.sstatic.net, serverfault.com, meta.serverfault.com, superuser.com, meta.superuser.com, stackapps.com, openid.stackauth.com, *.meta.stackexchange.com (Error code: ssl_error_bad_cert_domain)  I'm using HTTPS Everywhere, but disabling it for Stack Exchange prevents me from logging in to the aforementioned meta sites—I simply get dropped back without being logged in (also, trying to ask a question causes a redirect loop). Adding a security exception does work, though. Maybe this is because I'm already logged in to other Stack Exchange sites via a secure connection? Update: It appears disabling the entry for Stack Exchange in HTTPS Everywhere then logging out and logging in again solves the problem of not being able to log in. See balpha's answer for details.


Removing elements with Array.map in JavaScript

I would like to filter an array of items by using the map() function. Here is a code snippet:  var filteredItems = items.map(function(item) {     if( ...some condition... )     {         return item;     } });   The problem is that filtered out items still uses space in the array and I would like to completely wipe them out.  Any idea?  EDIT: Thanks, I forgot about filter(), what I wanted is actually a filter() then a map().  EDIT2: Thanks for pointing that map() and filter() are not implemented in all browsers, although my specific code was not intended to run in a browser.


When did "optics" begin to mean "appearance" or "perception?"

Before this century I had never heard the word optics used to refer to the way a situation is perceived.  E.g., "The official hiring his son created terrible optics."  And when I first heard it used that way I found it quite grating – perhaps because I have an engineering background and often discuss the science of optics and optical devices.  Can anyone find indications of the emergence or earliest acceptance of the use of the word to mean "appearance?"


(Dis)connectedness of $GL(n, \mathbb R)$

How do I prove that $GL(n,\mathbb R)$, with the relative topology from $\mathbb R^{n^2}$, is not connected?


Why the Index section page number is wrong in ToC?

I have a problem with the number page of Index  in ToC: is the same as the bibliography.    How can I fix it? The actual page number of Index must be 365, not 363 because in the page 363 is the bibliography.  Thanks for your help.


Is there a way to have a 'live' buffer in QGIS

I use QGIS (2.10.1) to create buffers around polygons.  I often create a series of buffers, and later need to edit the underlying polygons.  It is frustrating to start from scratch in re-create several buffers based on the changes when this happens.  Is there a way to create a 'live' buffer, that will automatically update to changes made to the parent polygon, or as a second best, a means to replicate with one click, the buffer settings and formatting that you originally created?


How do I move to a new tab in gedit using the keyboard?

If I have multiple tabs open, how do I move from one to another? (Ubuntu 11.10; gedit 3.2.1)


Assign each value of a list to another list of variables

I have two lists :  list1 = ['a', 'b', 'c', 'd', 'e'] list2 = [10, 20, 30, 40, 50]   I want to assign list2 values to list1 variables. Simply put forward I want end result like this :  final_list = ['a' = 10, 'b' = 20, 'c' = 30, 'd' = 40, 'e' = 50]   What is the way to do in python3?


I am trying to find out the definition of a megapixel? Some references on the web place it at 1 million pixels, and other places say it is equal to 2^20 = 1,048,576 pixels.


What does "chmod +x " do and how do I use it?

I want to write the Ubuntu analogue of a "batch file" (a shell script). But I don't know how to use chmod +x filename command to make it so that the script can be run. Nor do I know where to use it.


Missing argument 2 for wpdb::prepare() Issue

I'm having to update a WP installation for a community organisations from version 2.9.1 to the current 3.9.1.   The installation has a couple of custom built plugins that aren't documented.  I've just performed the WP version update and now I see a warning (Missing argument 2 for wpdb::prepare()) on every page that relates to the following line in the code of one of these custom built plugin:  $rows = $wpdb->get_results($wpdb->prepare("SELECT id, name FROM ".$table_name));   From what I've read online, this is due to a change in the coding, that requires 2 values to be sent to wpdb::prepare(), but I've no idea how the line of code given above, needs to be changed.  If someone could help me out, I'd really appreciate it.


Why can't PHP store more than 2MB of MySQL data?

I have a table that has 2.3 MB of data (40,000 rows) that I tried to process using MySQLi/PHP. (I calculated the byte size of the table in the linked question)  error_reporting(E_ALL);   $q =  "SELECT * FROM mytable";  if (!$result = $mysqli->query($q)) {       echo "Error: Our query failed to execute and here is why: \n";       echo "Query: " . $query . "\n";       echo "Errno: " . $mysqli->errno . "\n";       echo "Error: " . $mysqli->error . "\n";       return $ret;     } if ($result->num_rows === 0) {    $ret = 0;    return $ret;   }  $ret = array(); while($row = $result->fetch_array()){   array_push($ret, $row); }   echo  mb_strlen(serialize((array)$ret), '8bit');   The following code gives:    On the following line:     while($row = $result->fetch_array()){   Am I doing a wrong approach at this or am taking too many rows? Or is this an issue with PHP?


I know what degrees of freedom are, the definition that is and it's application. I know it's intuition as well. However as far as t-distributions go, can anyone explain what was the need of including degrees of freedom in the t-table? Can anyone explain the actual intuition of degrees of freedom in inference statistics with any example or something? Like how does degrees of freedom fit in our hypothesis?


Using batch to run multiple java programs

I wrote a batch file to run multiple batch files which run a java program separately. I am wondering if I need to pass an argument to the java program when I run it, how do I pass the argument when I start the station batch files? The main batch file looks like this:  @ECHO OFF set CLASSPATH=. ECHO open Server   start Server.bat ECHO open station1  start station1.bat ECHO open station2   start station2.bat ECHO open station3   start station3.bat ECHO open station4  start station4.bat   The station batch file looks like this:  @ECHO OFF set CLASSPATH=. java ClientStation  arg1  arg2   arg3 pause


What is the best way to clone HDD partitions of differences sizes?

I have two HDDs: the first of 150gb (/dev/sdc) with 30gb in use, the second of 100gb (/dev/sdd). There are sdc1 and sdd1 partitions with the same format.  I want to clone the 30gb from the first disk to the second with differences sizes. What is the best way? Clone it with dd or with cat?  Two possibilities:  From the sdc disk:  dd if=/dev/sdc of=/dev/sdd cat /dev/sdc >/dev/sdd   From the sdc1 partition:  dd if=/dev/sdc1 of=/dev/sdd1 cat /dev/sdc1 >/dev/sdd1     Other questions:   Assuming that /dev/sdd1 already exists with data, could I overwrite it?  Could it cause an error in a sector of the hdd /dev/sdd?


Issue an error when using empty shell variables

Sometimes I use, $PROJECT_HOME/* to delete all files in the project. When the environment variable, PROJECT_HOME is not set (because I did su and the new user doesn't have this environment variable set), it starts deleting all files from the root folder. This is apocalyptic.  How can I configure bash to throw error, when I use an undefined environment variable in the shell?


"Which" or "what" or ... when referring to a main clause?

There are many answered questions that address the usage of "which" and "what" on this site—many of them marked as duplicates—and there is even a specific tag for this topic. But I could not find any answer for the following question:  Should I use "which" or "what" or something else if I want to express     A does B which/what causes C.   Therein, "which/what" (the "which" or the "what") should not refer to B but to the act of A doing B (i.e. the predicate of the main clause).  For example see these alternatives:     Bob writes on the blackboard which causes a screeching noise.   Bob writes on the blackboard what causes a screeching noise.   Please note: The noise is caused by the writing not by the blackboard.  Side question: Would the use of a comma be appropriate here?  There is a closely related question, "", that aims on "which" versus "that" as the alternatives and is answered in favor of "which". But maybe "what" would be the better choice here.


I have encountered a strange question  that I immediately marked as "off-topic" as it really isn't about programming. The person asking, though, have informed me that it was supposed to be asked this way:     This is the way I was told to contact them, I have already tried their support.   IMHO she is making it up, but I could be gravely mistaken - so I am reaching out for answer here - is it a standard "procedure" to ask questions regarding support?


My brother give me a question that was  To show that  $$e^n>\frac{(n+1)^n}{n!}$$ where $n\in \mathbb Z^+$  Please help me!!!


Hom / tensor adjunction for $O_X$ modules?

Does the hom-tensor adjunction hold for $O_X$ modules also? With sheaf hom and sheaf tensor product, the statement would consist of a natural transformation $Hom_O (M \otimes_O N, K)\cong_{nat} Hom_O(M, Hom_O(N, K))$, $O = O_X$ is the structure sheaf and $M,N,K$ are sheaves of $O_X$ modules.  If true I think I can check this by hand, by describing sheaves in terms of compatible germs, defining this adjunction on the germs and checking that they glue together. It is easier in the quasi-coherent sheaves on a scheme case because then one can just work in an affine cover and the distinguished base.  I am little bit concerned that one might need a finite presentation hypothesis somewhere, in order for $Hom$ to localize well. ($Hom_{R[S^{-1}]}(M[S^{-1}], N[S^{-1}]) \cong Hom_R(M,N)[S^{-1}]$ needs $M$ finitely presented.)


Why does Wolverine still have Adamantium claws in X-Men: Days of Future Past?

On the future scenes of Days of Future Past Wolverine's adamantium claws can be seen (they even appear on the movie's poster). But towards the end of the The Wolverine, I remember those claws were cut by the Silver Samurai, and he even grows new bone claws after that. How come Wolverine has his adamantium claws again in Days of Future Past?


I want to solve a problem, which needs the largest sum of the subarray and it's position. The program's solution is in pseudocode from the book Introductions to algorithms, however it contains a returning which contains 3 elements (low,high,sum). What can I do about this? How can I return three elements? The program is easily understandable, however the returning makes me unable to transform it to c++.


I have just learned about the concept of bootstrapping, and a naive question came to mind: If we can always generate numerous bootstrap samples of our data, why bother to obtain more "real" data at all?   I do think I have an explanation, please tell me if I'm correct: I think the bootstrapping process reduces variance, BUT if my original dataset is BIASED, than I'm stuck with low variance and high bias, no matter how many replicas I'm taking.


If the gcd(s, t)=1, prove $F_s F_t$ divides $F_{st}$ for all s,t > 1      $F_n$ is the Fibonacci sequence, such that $$F_n = F_{n-1} + F_{n-2}$$   I know that it needs to be shown that $F_s F_t\mid F_{st}$ which has the implication that $F_{st} = F_s F_tk$.   I considered that it may be useful to use the theorem that states: the gcd of two fibonacci numbers is also a Fibonacci number with the form $\gcd(F_s,F_t)= g$ where $g= \gcd(s,t)$ or a Corollary relating to this theorem. But I cannot see how this directly applies to the problem.   Is it valid to say that because a theorem states for any $s>1, t>1$, $F_{st}$ is divisible by $F_s$ then that is an implication for $F_s F_t\mid F_{st}$ because the $\gcd(s,t) =1$?


Does the concept of heaven exist in the galaxy far, far away?

In Star Wars - Episode V:  The Empire Strikes Back, when Han is being urged not to go looking for Luke on Hoth, we hear this exchange:  RANDOM JERK REBEL GUY:  Your Tauntaun will freeze before you reach the first marker! HAN SOLO:  Then I'll see you in hell!  This clearly implies that people in the galaxy far, far away are familiar with the concept of hell.  Is there any evidence that they also have some concept of heaven?  I'm especially interested in the movies, but any source would do (although I would prefer a canonical source, Legends would be acceptable if nothing else is available).


What are your strategies for local SEO? For example, if you had a web design company in Lincoln, Nebraska, what would you do for your website from an SEO perspective?


I am working with open data from the City of Toronto. I am using a base layer of property boundaries which can be found here:    The default projection system I am using is WGS84.  However, when I place the map, at any scale, in print composer the scale bar is completely wrong.  I would like to find a way to measure distance from lot lines accurately, but need an accurate scale.  I have tried changing the CRS settings without luck.    Also, is there a way in QGIS like there is in Autocad where if I know the distance between two points and input that, the scale of the shapefile will adjust to my measurement accordingly?  I am using QGIS 2.2 btw.


Long label for a tikz picture (Having multiple line label for a tikz shape)

I have trouble making a tikz picture label break into couple lines. Here is specific MWE:      \documentclass{article}      \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \begin{document}     \tikzstyle{action} = [                         rectangle, draw,                          fill=blue!20,                         text width=6em,                         node distance=3cm,                          text centered                         ]      \begin{tikzpicture}[scale=2, auto]     % Place nodes     \node [             action,              label=below:Computer: (0 min)             ]              (Receive) {Receive Order};     \node [             action,              left of=Receive,             text width=10em,             node distance=4cm,             label=below: hey this is a big\\label; what should i do to break it?              ]              (identify) {I am a big process name};     \end{tikzpicture} \end{document}   As you can see, tikz doesn't break the line. Am I missing something?


How to change default for spacing around binary relations?

In TeX and LaTeX, the math binary relations (like =, \parallel, <, \le ...) have a default (rubber-length) spacing to either side, which is too large for my liking. How can reduce it?


rsync over ssh "error in protocol data stream" (code 12). ssh works

I tried:  rsync -v -v -e 'ssh -p YY' ./testfile me@XXXXX:/home   Error Message  opening connection using: ssh -p YY -l me 146.6.84.206 rsync ->-server -vvve.s . /home  [sender] make_file(testfile,*,0) send_file_list done send_files starting server_recv(2) starting pid=17537 rsync: connection unexpectedly closed (9 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(600)[sender=3.0.6] _exit_cleanup(code=12, file=io.c, line=600): about to call exit(12)   This works fine:  ssh -p YY me@XXXXX   Which suggests to me the problem is neither that sshd is not running nor that port YY is firewalled. I have checked anyway.  What other problems could there be?  EDIT: The problem seems to have been "self resolving." I could not replicate the following day. I started my local computer up. Perhaps notably I had a different IP address than last time. And now rsync magically works. I'd appreciate guesses as to what it could have been in light of it going away.


expected number of cards drawn exactly once (with replacement)

Suppose there are $N$ cards, $1,2,\dots,N$.   We start drawing cards (with replacement), until each card has been drawn at least once (we stop when the last card is drawn for the first time).   Let $x$ be the number of cards that have been drawn exactly once.   What is the expected value of $x$?   The answer is supposed to be $1 + \frac{1}{2} +\dots+ \frac{1}{N}$.


I have a JSON-Array and want to loop though it. I know that there is no foreach-loop (like in PHP), but is there a possibility to access the field index of the array?  This is my json:  {     'username': 'Karl',     'email': 'xyz@abc.xx',     'user_id': 5,     ... }   I have some span elements on my page with a data-field attribute. E.g:  xyz   The json-array is the return of an ajax-request. With it, I want to replace every element where the data-field="" matches the array-index.  Right know, I do it this way for each element in the json-array:  $("[data-field='username']").text(data.username); $("[data-field='email']").text(data.email);   But with more and more elements this becomes a little bit ugly^^  Any other possibilties? I read something about transforming the json to an object, but I have no idea how to do.


How to pass two parameters or arguments in bash scripting

I am new to bash scripting and I need your support to solve this problem. I have a bash script "start.sh". I want to write a script with two arguments so that I could run the script in the following way  ./start.sh -dayoffset 1 -processMode true  dayoffset and processMode are the two parameters that I have to script.   dayoffset = 1 is the reporting date (today) processMode = true or false


Hy, I hope everyone is doing well. I just recalled a problem that have been bothering me. I have already posted it here  but it seems that I still can not figure out how to complete the solution formalized by DLeMeur, he used the fact that $\frac{s_{n}}{\sqrt{n}}$ has limit sup $1$ and limit inf $-1$, which is incorrect actually it is $+\infty$ and $-\infty$ so the argument seems to fail.  Is it possible to obtain the estimate $|s_{n}| \leq C(u, \varepsilon) + (1+\varepsilon) \sqrt{n}$ by an other way ? If we manage to do so DLeMeur's idea can still work to solve the problem.   Edit: As pointed out this estimate is false, Any idea to solve the problem ?


Is there a winning strategy in this game?

There are 8 smugglers standing in a row and they are waiting for customs inspecting. One of the smugglers takes a small bag which contains smugglings. There is one officer who can examine one smuggler at a time. After every examination, smuggler with the bag must pass the bag to another smuggler who stands next to him. The officer may examine as many times as he wants till he finds the bag.  The question：  Is there a winning strategy for officer? What tool should I use to solve this question?


Sleep Vs. Delay Vs Timer. How to choose the best option

I know this is a general question. But even after going through different articles, it is still confusing. I have a Windows form application. I read some data from a device through the serial port of the PC. For the proper data transfer, my application has to make frequent wait sometimes. (to make sure that there is no data loss). I tried Thread.Sleep() and realized that my device lost the serial connection many times. I have seen explanations that a Timer is an option but does a Timer freeze the UI as well? Which is the best option in this case ( Sleep or Task.Delay or Timer)?  private static System.Timers.Timer _delayTimer; private static void delay(int Time_delay)  {    int i = 0;              _delayTimer = new System.Timers.Timer();    _delayTimer.Interval = Time_delay;    _delayTimer.AutoReset = false;     _delayTimer.Elapsed += (s, args) => i = 1;    _delayTimer.Start();    while (i == 0) { }; } private async void delayAsync(int delaySec) {                 await Task.Delay(vals);   //is it the right way of doing delay ?            }


What is the equivalent of apt-file in portage, if any?

Hunting for  when compiling software from the scratch is practically unavoidable. In  which use the  utility to manage packages, there is also a nice command named apt-file. One can  to actually trace the required package(s).  Is there an equivalent functionality in 's/'s  system?


For $n\geq2$, prove that $A_n$ is the only subgroup of $S_n$ with index two. Where $A_n$ is the alternate group with $n$ elements.


What's the maximum number of threads in Windows Server 2003?

Does anyone know?  And a bigger question is what happens when you encounter this maximum? Is this the same number with other Windows OSs such as Vista, XP etc.?


I like to use $:=$ for "is defined to be equal to", but this is never typeset with the symmetry one would like, as the colon is always too low relatively to the equals sign. Is there any way of getting this to appear correctly?


java null point exception unable to resolve

This is my code     package ecommerce;  import java.util.concurrent.TimeUnit;  import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver;  public class Classwithmultiplemethods {      public static WebDriver driver;      public static void browser(){         WebDriver driver;         System.setProperty("webdriver.chrome.driver", "D:\\Selenium\\selenium-java-3.141.59\\libs\\chromedriver.exe");         driver = new ChromeDriver();         driver.get("https://www.google.com/");         driver.manage().window().maximize();         driver.get("http://newtours.demoaut.com/");     }      public static void clicklinks() {              System.out.println("new tours");             driver.findElement(By.linkText("REGISTER")).click();             /*driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);             driver.findElement(By.linkText("తెలుగు")).click();             driver.findElement(By.linkText("English")).click();             driver.findElement(By.linkText("हिन्दी")).click();             driver.findElement(By.linkText("English")).click();*/ }      public static void teardown() {         driver.quit();     }      public static void main(String[] args) {         // TODO Auto-generated method stub          browser();         clicklinks();         teardown();     }  }   Throwing this error please help me to resolve     Exception in thread "main" java.lang.NullPointerException       at ecommerce.Classwithmultiplemethods.clicklinks(Classwithmultiplemethods.java:25)       at ecommerce.Classwithmultiplemethods.main(Classwithmultiplemethods.java:41)


Since infalling objects appear to "freeze" on the event horizon of a black hole, does that nullify the blackhole information paradox?

Kurzgezat just released this fantastic video about black holes:  At 4:20, it says that if you fell into a black hole, a distant observer would never see you cross the event horizon. Rather, to them you would appear to freeze, your light slowing, fading, and redshifting, indefinitely.  First of all, is this even true? Kurzgezat is reputable, but I don't want to make any assumptions.  Second, does this mean that distant observers also never see anything cross the event horizon including the original matter from the collapsing star? If this is case, then would the black hole's event horizon not appear "black" at all, but covered in faded, redshifted apparitions of everything that's ever fallen into it?  Thirdly, given that all the above is true, does this nullify the blackhole information paradox, since, to every observer in the outside universe, nothing ever truly falls into a black hole, and no information is ever actually lost?


Anyone seen this panel? Essential for precise modeling.


The more I season, the worse it gets with my cast iron

Recently, I bought a cast iron skillet, which was preseasoned. Still, I did season it a couple of times and since then I season it after every cook. I didn't cook anything crazy, just a dutch baby and a pizza.  Still, even after multiple seasonings, there is a clear hole in my seasoning in the middle of the pan:    How I season it:  I put some oil in it, spread the oil with a paper towel, then heat it on the stove until it starts smoking, then let it cool.  I tried olive oil, which apparently is no good, so I switched to sunflower oil and now I am trying it with canola oil. I also switched from paper towel to regular towel, but still, the hole just seems to be getting bigger and bigger. When I touch it with my finger, I can see black residue on it.  What am I doing wrong here? Yesterday I even did a couple of seasonings one after another (let it cool, oil it, heat it, repeat), but this seems to have been counterproductive.


I was attacked by a malware called berusose and cant open any of my files. I just need to save my pics and even if i have to erase or format the entire 1tb that will be okay by me.   Can someone help me solve this problem without paying the ransom as demanded by the hackers.


Using Cantor's lemma in a proof of convergence

I was given the following question: Let $q$ be a real number such that $0 < q < 1$, and let ${a_n}$be a sequence that follows the rule : $|a_{n+1}-a_n| < q|a_n-a_{n-1}|$ for any $n>1$. Prove that ${a_n}$ converges. I already know this can be proven using Cauchy's criterion, but I had a different proof in mind (using Cantor's lemma), and wanted to know if it's valid, or if I might be mistaken. So here it is: First - I prove that the sequence is bounded. Since the sequence is bounded, the set of its members (and the set of any sub sequence of ${a_n}$) has a Supremum and an Infimum. Then, for any natural number $k$, I define the closed interval $A_{k}$, such that $A_{n}=[\inf(a_k), \sup(a_k)]$, where inf and sup of $k$ are the Infimum and Supremum of the set of the members of $a_n$, starting from $a_k$ (meaning, any member with an index greater than or equal to $k$). Naturally, $A_1$ is the "biggest" interval, and because of how the sequence is defined, $A_{n+1}$ is always a proper subset of $A_n$ for any $n$. Now I use Cantor's lemma - because the interval gets infinitely smaller and smaller (after n iterations, it gets at least $q^n$ times smaller), the intersection of all intervals $A$ (meaning, $A$ of $n=\infty$) contains one single point, let's call it $L$. Now, I state that $L$ must be the limit of $a_n$ - for any epsilon, there exists a natural number $k$, such that for any $n>k$, $A_k$ is contained in the epsilon neighborhood of$ L$, and therefore all members of $a_n$ starting from $a_k$ are in the epsilon neighborhood of $L$, which means $L$ must be the limit. So do you think this is a valid proof? Or am I making some false assumptions? I know this proof is a bit longer than using Cauchy's criterion, but I like it better because I feel like it gives a better explanation as to 'why' the series converges. Thanks in advance!


Find the sum of the series $ \sum_{n=1}^{\infty} \frac{n^2}{n!} $ $My \ attempt :$ $$   \sum_{n=1}^{\infty} \frac{n^2}{n!} \\  = \sum_{n=1}^{\infty} \frac{n}{(n-1)!} \\  = \sum_{n=0}^{\infty} \frac{n+1}{n!}  = \sum_{n=0}^{\infty} \frac{1}{(n-1)!} + \frac{1}{n!} $$ But I don't know if this will take me anywhere.


Editing in chat: White text on light blue background

I've been having this problem for a while now – whenever I edit my chat messages, the text is white and displayed on a light blue background, making it impossible to see.    I have to highlight my words to read it, which is rather inconvenient:    I'm using Chrome Version 70.0.3538.110 (Official Build) (64-bit), running on macOS v10.14 (Mojave).


How to allow new users to post without moderation in phpBB 3?

I am creating a new forum used phpBB3. New users can post, but I have to manually approve them. How can I disable this so users can post without me having to approve the content manually?


Word for someone obsessed with improvement and efficiency

Imagine someone who, in every way, always tries to improve things to make them more efficient.  Therefore, he loves things such as the automation of work because its more efficient. He loves tinkering with things to make them better and hates when things are being done in a certain way when another way exists that would make things faster, clearer, or in some way perform better.  Another example is this person might think the English language should include various proposed punctuation marks such as the irony mark and the authority mark because this would, in his eyes, improve the language. He treats all subjects like this; he always will always look for and advocate for changes in any system to improve it, disregarding traditions or norms as he does so.   I'm not looking for 'perfectionist'; this person doesn't strive necessarily for perfection, but rather sees improvement as an obvious goal that should be worked toward.  Nor am I looking for a word such as determined, motivated, or go getter. I'm looking for a word that focuses on one's obsession for improvement and efficiency.  Any word (noun, verb, or adjective) related to this concept would be appreciated!


How to find the corrsponding expression after working with natural units $\hbar=c=1$?

If one does long calculations in natural units how does one find the right expression in let's say SI units in the end?  I know that natural units make the calculations easier and also help to show physical equations in a clearer way, i.e. it's nice to think of the four-momentum squared as  $$p^\mu p_\mu = E^2-p^2= m^2$$ So one can think of the invariant length of a four-momentum as the mass squared. Or it also shows the equality of mass very clearly.  But I have done long calculations in natural units and now I need to calculate final results with numbers. And I've got to say I hate numbers ;). And also all the basic textbooks always work in natural units so it's hard to guess what's the right expression.  For concrete examples... Let's say the Higgs coupling is $m_i/v$ in natural units. Or the propagator for a spin-0 particle is $\frac{1}{p^2-m^2}$ So what are the correct expressions here in SI units. My guess would be that for every mass there should be a $c^2$. But for $\hbar$ it gets more difficult. I.e the total  decay rate is related to the mean lifetime of a particle by $\Gamma=\frac{\hbar}{\tau}$. So here one really needs to know the dimensions of the other two quantities to guess the $\hbar$.  Are there any practical tips in day to day life of a particle physicist to guess the correct constants?


Problem with Croatian letters when reading from MySQL using PHP?

I'm building a small website using PHP and MySQL.  I have a problem reading from a database. I can do all operations on DB, but when I SELECT from DB, I get some characters invalid or in wrong representation.  I get:     Koriste?i kriminalisti?ku pri?u Dostojevski je sastavio roman kojim je predo?io svu slo�enost u odnosu pojedinca prema postoje?im zakonima.   but in a database I see:     Koristeći kriminalističku priču Dostojevski je sastavio roman kojim je predočio svu složenost u odnosu pojedinca prema postojećim zakonima.    The problem is with Croatian letters: Č Ć Ž Đ Š. I think the problem is with collation of a database.  Any idea ?


How can I solve this sum? $\sum_{k=1}^{n}k2^{k-1}$


Ubuntu 14.04 boot error on Windows 8.1 - SYSLINUX 4.07 EDD

I want to replace Windows 8.1 that came with my laptop with Ubuntu 14.04. I keep getting a black screen with this line: SYSLINUX 4.07 EDD 2013-07-25 Copyright (C) 1994-2013 H. Peter Anvin et al  Things I did before:   turned off fast boot disabled secure boot switched to Legacy instead of UEFI (even though a tutorial I found said this isn't really needed anymore, I still did anyway because I read it from the laptop's user guide: "If you need to install a legacy operating system, such as Windows (that is, any operating system before Windows 8), Linux or Dos, etc on your computer, you must change the boot mode to Legacy support." I chose to load from USB. and then that SYSLINUX 4.77 EDD.... appears   I tried to install using the same USB on an old Lenovo S10-3. It worked. Though that S10-3 runs Lubuntu. Still it's probably safe to say that it's not the USB that has problems, right?  Thanks for any help. I can't wait to have Ubuntu :)  edit: This might be useful info. The USB is 16GB X-Stor Fat32. I used YUMI.


I've been having a lot of problems trying to figure out how to use scanf().  It seems to work fine with integers, being fairly straight forward scanf("%d", &i).  Where I am running into issues is using scanf() in loops trying to read input.  For example:  do {   printf("counter: %d: ", counter);   scanf("%c %c%d", &command, &prefix, &input); } while (command != 'q');    When I enter in a validly structured input like c P101, it seems to loop again before prompting me.  This seems to happen even with a single:  scanf("%c", &c)    in a while loop.  It'll do the loop twice before prompting me again.  What is making it loop twice, and how do I stop it? When I enter in less amount of input that programmatically wouldn't have another character or number such as q, pressing enter seems to prompt me to enter more.  How do I get scanf() to process both single and double character entries?


After running ubuntu gnome for some years, I was happy to hear that mainline ubuntu was returning to gnome as the default. So I was eager to upgrade my trusty ubuntu gnome 16.04 desktop to ubuntu 18.04. Yikes. My impression is that they simply tried to implement the unity desktop using gnome 3 libraries. I'm not seeing a gnome 3 desktop here.   Disappointed, I reinstalled with ubuntu mate 18.04, and find it fairly nice. But what I really wanted was an up to date gnome 3 desktop running on ubuntu 18.04. Any hope of ever resurrecting the ubuntu gnome flavor?


How often can I visit the USA on ESTA in one year?

Does anyone know how long a 'reasonable amount of time outside the U.S. in between stays' really is?   I am dating a guy who lives there, this year I have visited three times and I am hoping on a fourth visit. The visits were for 10 days in April, 10 days in June and 25 days in Aug/Sep. I am hoping to go back end of November until 8th January. I am currently studying at uni, hence all holidays and I also have employment here so enough money to cover my stays.   After reading horror stories I'm just concerned I'll get turned away. Is anyone else in transatlantic relationships that have visited the states often??


Show uncountable set of real numbers has a point of accumulation

Show that every uncountable set of real numbers has a point of accumulation.


How to use Collection remove if his list meet a condition?

I have a list with some Person Object. Here is my Person class:  public class Person(){ // contructors   private String lastname;  private String firstname;  private List<Place> places;  // getters and setters }   My Place class is :  public class Place(){ // contructors   private String town;  // getters and setters }   I have code to remove some places from person:  List<Person> persons = new ArrayList<Person>(); // adding persons to List // Below i want to remove person whose place is in town Paris. persons.removeIf((Person person)-> person.getPlaces(???));   I want to remove a person from the list whose Place meets the following condition  place.getTown()=="Paris"  How to write this code?


Show that if $a \equiv b \pmod n$, $\gcd(a,n)=\gcd(b,n)$

My problem is how to somehow relate the the gcd and congruence. I know that $(a,b) = ax + by$. I also know that $a \equiv b \pmod n$ means $n\mid a-b$. Any hints?  Thanks!


I am typing up an article in LaTeX and everything works perfectly, but for some reason there is a point where there are a few paragraphs where there is a line break between each paragraph.  Has anyone had this problem before or knows how to deal with it?  I am simply typing out a line as follows  like this  then the next paragraph  Rather than moving down to the next line for the next paragraph as it does for most of the article, it instead skips a line.


How do I make one folder accessible to multiple users?

I have a folder called servers, and I need to make it, and all its contents accessible to both surge and minecraft.   I tried  chmod -R minecraft+surge servers   it replies  chmod: invalid mode: ‘minecraft+surge’


How does Light have momentum without mass?

My question  is regarding gravity in black holes. It is said that light can’t escape the enormous gravitational force in black holes; however, is it not true that gravity is directly proportional to the object’s MASS and inversely proportional to the distance between the two objects (Newtonian, I think). If so, light has no mass. So how would light be effected by this phenomenon? Please answer with as much detail as possible


can my mini ipad be found if it is reset?

My mini ipad was stolen, and I was wondering if they guessed my password and then reset my iPad would I still be able to get it back?  Cause I know you can track it, lock it, erase iT, etc. But if they reset it, will it still work? How do I get it back then?


Maximum likelihood estimator compared to least squares

The maximum likelihood estimator is often compared to the least squares method. I'm struggling to see how these things are related at all. I would like to understand what the maximum likelihood estimator means in practice. Can you adapt the maximum likelihood estimator to the example below and use the example to explain it?  Let's say we are trying to predict house prices (target) from the size of the house (as the only feature). We are using Linear Regression, so we are trying to learn (optimize) parameters B0 and B1 in predicted price = B0 + B1 * size. If we are using Ordinary Least Squares, we want to minimize the sum of squared differences between prediction and real target. For example, if we predict target 1000 for some house and the actual target is 900, the difference is 100. The squared difference is 100^2 = 10000. So this house would increase the sum by 10000. We want to choose B0 and B1 in a way that minimizes the sum of these squares. Simple.  Now substitute Maximum Likelihood Estimator in place of Ordinary Least Squares. Wikipedia tells us that it's "finding the parameter values that maximize the likelihood of making the observations given the parameters". How does this relate to the example with parameters B0, B1 and a difference of 100 between predicted target and real target?


I know that would can't be used to refer to a past state, while used to can. How about in this sentence?     When he lived in Paris, he _____ walk on the banks of Seine River   I find that both would and used to can be appropriate to fill the gap. What is the correct answer, because the question only allows 1 answer. Thank you


Why does this give different results depending on variable being final

public class Example {  public static void main(String[] args) {      String a = "abc"; // Line 5     String b = a + "d"; // Line 6     String c = "abc"+ "d"; // Line 7     String d = "abcd"; //Line 8      System.out.println(b==c); //Line 10      System.out.println(c==d); //Line 11 } }   Output:falsetrue  If we see Ref. variable 'b' is pointing "abcd" string object and Ref. variable 'c' is also pointing same String object i.e "abcd" but when we check equality using == (double equal operator) operator it prints false at Line 10. But if we make Ref. variable 'a' as final then it prints true at Line 10  So i am bit confuse. Can any one tell me what is happening behind it?


Not able to install dropbox Ubuntu 12.04

My terminal emulator shows the following error while trying to install Dropbox. I need help and I am a beginner in Ubuntu.  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  nautilus-dropbox : Depends: dropbox but it is not going to be installed E: Unable to correct problems, you have held broken packages.


Currently I'm reading a book named "Grokking Deep Learning" and I'm confused with the way author takes derivative from function. Let me explain. We have loss function, where pred is prediction and goal_pred is goal prediction (constant value that is equal to 1)  Author of the book writes that the derivative is weight_delta  But! $   \begin{cases}     error(weight) = (pred - goalPred)^2   \\     pred = input \cdot weight  \\   \end{cases}  => error(weight) = (input \cdot weight - goalPred)^2 $ $error(weight)' = 2(input \cdot weight - goalPred) \cdot input$  $error(weight)' = 2(pred - goalPred) \cdot input$  $error(weight)' = 2 \cdot delta \cdot input$ Here is the question: why the derivative in the book is not correct or I'm wrong somewhere?


Vertically centering a flex element that is a child of `flex-grow: 1`?

I basically have a page that has a header, some main content, and a footer. I want the footer to be sticked at the bottom and the content should be vertically + horizontally centered. Here is what I have:    body {   margin: 0; }  #wrapper {   display: flex;   flex-direction: column;   min-height: 100vh; }  header {   padding: 2em 0;   background: cyan; }  main {   flex-grow: 1;   background: turquoise; }  main div {   display: flex;   justify-content: center;   align-items: center;   height: 100%; }  footer {   padding: 2em 0;   background: violet; }

       This should be centered horizontally and vertically within the turquoise box

     As you can see, the text inside the main content isn't being vertically centered. For some reason, the main div isn't taking up the full height of main even though I gave it a height: 100%;. Does anyone know what is wrong with this code?


Let $A$ be a unit commutative ring and $S:= \{a^n | a \in A, n\geq 0\}$. With $S^{-1}A$ the localization of $A$ over $S$.  I'm having some problems on proving that $$S^{-1}A \cong A[X]/(1-ax)$$ I'm not searching for a complete solution maybe just some hints, thank you very much.


How do I pronounce "=>" as used in lambda expressions in .Net

I very rarely meet any other programmers!  My thought when I first saw the token was "implies that" since that's what it would read it as in a mathematical proof but that clearly isn't its sense.  So how do I say or read "=>" as in:-  IEnumerable<Person> Adults = people.Where(p => p.Age > 16)   Or is there even an agreed way of saying it?


How to get full query text from performance_schema.threads?

According to : Access to the threads table does not require a mutex  and has minimal impact on server  performance. The other sources have negative performance consequences because they require a mutex.   So yes, I want to use threads table to examine running queries. The trouble is, the PROCESSLIST_INFO column does not contain the full query. It just contains a truncated version of the query. There is a flag viz performance_schema_max_sql_text_length which controls how many bytes are allocated for the SQL query. But it seems to affect the events_statements_history_long table. There is no change in the thread table output. Am I missing something?


What rules govern how TV show opening credits are structured?

I've always been curious what decides if a credit is in the opening or closing credits.  It seems loosely that cast (in order of today's "big name" significance), directors and financiers get the front spots, and everything else appears later.  But lately I've been developing some specific curiosities about how cast members are credited on TV shows.  Opening credits seem to follow this rough outline:  Part of "opening credits" video segment   (optional) Major Actors Show Title Core Cast Actors Directors Producers (optional) Episode Title Episode Writers   Subtitles over beginning of show, after opening video   (Episode Title and Writers may appear here, instead) Special Guest Actors   I've probably missed a few things, and mis-ordered a few things.  But, as I said, my main curiosity is about actor credits.  Typically, there is little indication of which characters the core cast actors play.  Sometimes their name is edited to appear along with an image of the character as an indictator, but sometimes there is no indication.  As I've never seen anyone credited in both the opening and closing credits, that leaves the potential for core actors to never be directly associated with their character.  This seems potentially problematic; is there a reason for this?  Are viewers expected to know who's who?  Guest actors sometimes are simply credited by name (and not being part of the opening video, this means they will never be associated with their character in credits).  But often they are credited as "special guest as character name".  This is quite helpful.  The thing I find really confusing is, sometimes the last few regular cast actors will get the guest actor treatment.  I've seen opening video with "and actor as character" paired with an image of that character for an entire season.  Why does this actor get special treatment?  Finally, sometimes guest actors will be credited at the front following the opening video, sometimes they'll be credited in the closing credits.  Are there rules for deciding who get's credited early or late?  I've sometimes wondered if shows deliberately play with actor's name position to obfuscate plot arcs ("you won't think we're killing of this character if their actor is still in the opening credits", or "you won't expect this recurring guest if we place their name in the closing credits") and I've also wondered if there are thresholds for "people appearing in XX number or YY percentage of episodes get placed here."  But it's difficult to build a good sampling base for this.  And season 7 of Stargate SG-1 kinda took a shotgun to my guesses so far.  So...  Are there rules?


What is the difference between "there + be" and "there exist/s"?

Consider the sentence "There exists no language or dialect in the world that cannot convey complex ideas."   "There exists" is beyond my comprehension because I only know of many forms of "there + be" structures such as "there has been..., there have been..., there was/were...., there is/are..., there will be....  My question is: what is the difference between "there + be" and "there exist/s"? The word "exist" is an intransitive verb, so may an intransitive verb be used with "there". Can you give me more examples where an intransitive verb other than 'exist' is used after "there"?


Can the Kai earings(Potara Earings) be used again and again to keep fusing individuals?

Supreme Kai and Kibito fused using the Kai Earrings. Can now Kibito Kai use the earrings again to fuse with another?  I searched for this and found no creditable source.  I know for a fact that the ear rings still work, since they were offered by Kibito Kai to Goku and Vegeta before the battle against Kid Buu. However they destroyed it. So could Kibito Kai use it to fuse again?  Edit: Accepted answer has added a somewhat relevant frame. It doesn't make it explicit but seems to indicate that fused individuals such as Elder kai, Kibito Kai and Vegeto can no longer fuse again.


I could see them run towards the shop; I could see them running towards the shop

Which one is right? And WHY? 1 I could see them run towards the shop 2 I could see them running towards the shop


If a valid answer is downvoted, what's the motivation not to delete it?

I have in this question:  an example of an answer (of mine) which while valid, especially for developers looking to avoid 3rd party libraries, was not used by the asker. In spite of what were (in my opinion) clear instructions - the user used the wrong regex string even after multiple attempts and did not see their desired results, and so gave up on the solution and downvoted it.  As an answerer defending my rep (especially around a milestone that controls privileges) - my only immediate reaction is to delete the answer so that the downvote no longer counts towards my rep total.  I still strongly feel that this sort of answer would be useful to future visitors who aren't limited by the inability to follow instructions - but why leave it up when all that effort only leads to a loss of rep?  (I apologize for the frustration exhibited in this post.)


I am trying to replace asterisk to some words in a string. e.g: if the string is 'A big giant person scared me', and i need the words 'giant' and 'scared' to be replaced with asterisk. the string should be 'A big ***** person ****** me'  here is my code  int lengthString(char* str) {     int i = 0;     while (str[i] != '\0')             i++;     return i; }  void replace(char* start, int length, char ch) {      for (int i = 0; i < length; i++)             start[i] = ch; }  void redact(char* toRedact, char** dictonary, int dicSize) {     for (int i = 0; i < dicSize; i++) {             char* redact = dictonary[i];             char* lastPos = toRedact;             char* nextPos = strstr(lastPos, redact);             while (lastPos != NULL) {                     if (nextPos == NULL){                       break;                     }                     replace(nextPos, lengthString(redact), '*');                     lastPos = nextPos + 1;             }     } }  int main() {     char* test[4];    char* dictionary[4];    dictionary[0] = "big";    dictionary[1] = "giant";    dictionary[2] = "scared";    dictionary[3] = "person";     test[0] = "A giant scared me";    test[1] = "A big scared me";    test[2] = "A person scared me";     for(int i = 0; i < 3; i++) {      redact(test[i], dictionary, 4);      printf("%s\n", test[i]);    }     return 0;  }      output: seg fualt


New Gboard dual language suggestions, how do I disable it?

Recently the Google keyboard has activated suggestions for both of my selected languages.  This is a real nuisance since the suggestions are a mess IMO.  How can I disable it and go back to switching languages manually?


Block Administrators authentication attemps from workstations

My Administrator user once in a while is getting locked-out by the workstations in our lab, due to failed logon attempts. (While this is a problem that should be addressed, because this means there is something wrong with the techies process, it's a small and less important at the moment)  My main problem is that the Administrator can authenticate from anywhere in the network. I've tried using GPO ("Deny log on through Remote Desktop Services"), ADUC ("Log On To" list). While he can't actually logon, the authentication is performed first and only then the system checks if there's a GPO or an ADUC block, thus allowing the Administrator user to get locked-out.  Of course this problem can apply to any user. My Domain\Forest level is 2008r2, and I don't have a firewall between my LAN and my DC.  So, in short, I want to allow authentication attempts of the Administrator only from a certain computers. Any suggestions?


I work a LOT in the windows command line. Unlike other windows, it doesn't maximize - it just goes a big as it can depending on the buffer size. Is there any way I can get the CMD to act like the PuTTY console, flowing with the resize?    NOTE: The answer doesn't have to be a tweak to the CMD. If there's a PuTTY-like program out there that will work between me and the command line I'm happy with that - I just want a proper window to work in


How to change UV map loaded from obj when change unwrap way

I import an 3D object from OBJ file, and the relative .mtl and map image are loaded automatically.  My UV map image is messy.    I want to use other unwrap way or make seam by myself. But when I use other unwrap way, only triangle mesh change, UV map is still the same, so object renders incorrectly.    I am not good at Blender... Is it possible to move UV map with the triangle mesh, and generate new UV map?  Thanks.


Is there a way speed up Linux CLI  navigation when I must enter long commands? I simply use arrows right now, and  - if I have a long command it takes some time to get from start of the command to the middle of it.  Is there a way to for example jump to the middle of the command without using arrows?


Best practice for caught exceptions not being used

I'm curious to find out what the best practice is for caught exceptions that aren't used. The irony is that this is going against best practice in the first place. I've found myself in a position to be doing this, perhaps it's just my inexperience, but I'm wondering what is commonly done.  I've written a small console application that grabs list information from one Sharepoint site to share it on another farm. The function in question queries the list into an XElement and I am catching any errors along the way. Here is the snippet.  ...     try     {        return lists.GetListItems("Global Announcement", null, null, viewFields.GetXmlNode(), null, null, null)                  .GetXElement().Elements().First().Elements().First();     }     catch (Exception ex)     {         throw;     } } catch (Exception ex) {     ErrorLogging.SaveErrorToEventLog("Encountered an error when attempting to connect: ", ex); }   I was advised by a senior to use just the throw for the inner exception to keep the stack information in proper order. In cases like this I'm curious to find out what the best practice is for the Exception ex or if breaking the best practice of try catch in the first place should just never happen?


You can't cast two spells (excluding cantrips) in a turn if you're using an action and bonus action. What about reactions?

Following off of this question , I have a question: Specifically, something like Warlock's Hellish Rebuke isn't cast in a bonus action, so can you cast, say, that, eldritch blast, and healing word all in the same set of turns?  What about...well, any spell that costs an action, and Hellish Rebuke?


Read/Peak characters printed on control terminal

How to read characters printed on a process's own control terminal ? Or is this even possible under Linux ?  My program needs to launch an SSH client and start a password authenticated session (C/C++ programming language), so injecting the password into the SSH client's control terminal is required. Since the SSH client and my program share the same control terminal, password injection can be achieved through system call (man tty_ioctl):  ioctl(STDIN_FILENO, TIOCSTI, password)   However the injecting must be at the right time, if password injected too early, the injected data will be ignored, so my program has to wait for the password prompt "foobar's password:" before injecting password. Currently my solution is to wait a few seconds before the injection, which is very unreliable.  So what is right time to inject the password into the control terminal ?  I don't want to create a new pseudo-terminal, too many terminal related things have to be handled.


Using underscores in Java variables and method names

Even nowadays I often see underscores in Java variables and methods, an example are member variables (like "m_count" or "_count"). As far as I remember, to use underscores in these cases is called bad style by Sun.  The only place they should be used is in constants (like in "public final static int IS_OKAY = 1;"), because constants should be all upper case and not camel case. Here, the underscore should make the code more readable.  Do you think using underscores in Java is bad style? If so (or not), why?


Arbitrarily discarding/cancelling Radians units when plugging angular speed into linear speed formula?

Why is the radians implicitly cancelled?  Somehow, the feet just trumps the numerator unit. For all other cases, you need to introduce the unit conversion fraction, and cancel explicitly.  Is it because radians and angles have no relevance to linear speed (v), so they are simply discarded?


To prove $\prod\limits_{n=1}^\infty\cos\frac{x}{2^n}=\frac{\sin x}{x},x\neq0$

Prove $$\prod_{n=1}^\infty\cos\frac{x}{2^n}=\frac{\sin x}{x},x\neq0$$   This equation may be famous, but I have no idea how to start. I suppose it is related to another eqution:  (Euler)And how can I prove the $follwing$ eqution? $$\sin x=x(1-\frac{x^2}{\pi^2})(1-\frac{x^2}{2^2\pi^2})\cdots=x\prod_{n=1}^\infty (1-\frac{n^2}{2^2\pi^2})$$ I can't find the relation of the two. Maybe I am stuck in a wrong way,thanks for your help.


How do I identify this component? It just says 0 on it

Can anyone help me identify this component? It just says 0 or D on it (I think it's a zero). I tested it for conductivity with a multimeter - doesn't seem to have any (tried both polarities in case it's a diode). Tested for resistance: nothing (i.e. infinite resistance), although I'm not 100% sure I was touching the contact points correctly, so don't take this as an ultimate measurement. Thanks in advance!


member function template defined separately

I have a member function template of a class declared in source and header as // c.h class C {     public:     C(){}     template<typename T>      C& operator>>(T& obj); };  and // c.cpp #include <iostream> #include "c.h"  template<typename T> C& C::operator>>(T& obj) {     std::cin >> obj;     return *this; }  The main is in a separate file as: #include <iostream> #include "c.h"  int main() {     C c;     int n;     c >> n;     std::cout << n << std::endl; }  Compiling these results in a link-time error /usr/bin/ld: /tmp/ccY8edlI.o: in function `main': main.cpp:(.text+0x23): undefined reference to `C& C::operator>><int>(int&)' collect2: error: ld returned 1 exit status`  But moving the definition of >> from c.cpp to the file that has main compiles successfully. What's the rule here that causes it to fail in the first case? I looked around and the only related thing I found is a statement on MS docs Local classes are not allowed to have member templates. I'm not sure what local classes are, but it sounds like the opposite of what I have.


Applying for UK tourist visa and travelling with documents in my maiden name?

I am a Chinese citizen married to a US citizen last year. I am going to apply for a UK tourist visa. The name shows on my passport is my maiden name, while any other documents the UK visa needed, such as bank statement, is with my married name. I can provide my marriage license to prove the link between my maiden name and married mane.   Can I apply for this UK visa with my situation?


how do I add javascript to a specific panel-page

I have created a panel page (i.e using panels). I can add html content to it from the panel itself using add content->New custom content. I can also add css classes (add body css classes).  Now I would like to add a jquery button to that panel page. I could add a javascript to my theme but then it would be called on every page load not only this specific panel-page. So I would like to add my javascript through my module.   But how do I programatically check that the current page beeing viewed is that specific page panel? Is there a hook that lets me check that?  Thanks,  baba


Show $$p< -\log(1-p)$$ for $0<p<1$. I thought about using Taylor expansion, is that the way to go?


I have Win7 and Lubuntu installed as dual-boot, that was quite simple. But how to remove Lubuntu?...seems, at first glance, not so simple.  How to do this without leftovers?  Thanks for you advice.


How much reputation do I need to suggest a tag?

I was trying to ask a question, but the tag I wanted to use doesn't exist. How can I suggest a new tag?   I want to make this tag, but I think my reputation is not high enough to suggest a tag. How can I still suggest one to Stack Overflow in such a situation?


Does anyone know how to select an item in the DOM by ID with jQuery, when that ID has a space?   For example, the ID of my item would be
Stuff
   How would I select this with jQuery?   If I just do   $("#content Module").whatever()    jQuery will try to find an item with both the ID of content and the ID of Module, which is not what I am looking for.  I should add that I am working with an old code base where these two word ids are used extensively, so going through and changing all the IDs would be bad.


Is it necessary for the production server(CentOS 7) to start the tuned service?

we hava  a large number of production servers running CentOS 7 with tuned service。 Is it really necessary keeping tuned running？ Or we could  initialize the system configuration file such as sysctl.conf  by vm image or kickstart file


How to set all locale settings in Ubuntu

A remote installed application has some encoding problems and on my local machine it is running fine.   What is the best way to "copy" my locales to the remote machine?  The locales on my personal machine are configured like this:  $ locale LANG=de_DE.UTF-8 LANGUAGE=de_DE:en LC_CTYPE="de_DE.UTF-8" LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE="de_DE.UTF-8" LC_MONETARY=en_US.UTF-8 LC_MESSAGES="de_DE.UTF-8" LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_ALL=


Linker Command Fail when compiling sorted Linked-List object/class in C++ using templates

I'm creating a simple sortedLL, right now I'm struggling using templates in C++. I am getting an error when compiling, which I'm attaching at the end of this post. Am I missing/coding something wrong when using templates?    sortedLL.h  template <class T> class sortedLL { private:     struct Node     {         T data;         int count;         Node * next;         Node (T data)         {             this->data = data;             count = 1;             next = NULL;         }     };     Node* head;     int lengthLL;     Node* search(T value);     void sortLL(); public:     sortedLL();      void insert(T value);     void printLL();   };   sortedLL.cpp  #include "sortedLL.h"  template <class T> sortedLL<T>::sortedLL() {     head = NULL;     lengthLL = 0; }  template <class T> void sortedLL<T>::insert(T value) {     if (head == NULL)         head = new Node (value);     else     {         Node* searchNode = search(value);         if (searchNode != NULL)         {             searchNode->count++;             sortLL();         }         else         {             Node* newHead = new Node(value);             newHead->next = head;             head = newHead;         }     }  }  template <class T> typename sortedLL<T>::Node * sortedLL<T>::search(T value) {     Node* currentNode = head;     while (currentNode != NULL)     {         if (currentNode->data == value)             return currentNode;         else             currentNode = currentNode->next;     }     return NULL; } template <class T> void sortedLL<T>::printLL() {     if (head == NULL)         std::cout << std::endl;     else     {         Node* currentNode = head;         while (currentNode != NULL)         {             std::cout << currentNode->data << ": " << currentNode->count << std::endl;             currentNode = currentNode->next;         }     } }  template<class T> void sortedLL<T>::sortLL() {     //Perform sort here  }   main.cpp  #include <iostream> #include "sortedLL.h" int main() {      sortedLL <int> LL;     LL.insert(1);     LL.insert(2);     LL.insert(4);     LL.printLL();     std::cout << std::endl;     LL.insert(1);     LL.printLL();      return 0; }   Error    Here is the error in text:  Scanning dependencies of target sortedLL [ 66%] Building CXX object CMakeFiles/sortedLL.dir/main.cpp.o [ 66%] Building CXX object CMakeFiles/sortedLL.dir/sortedLL.cpp.o [100%] Linking CXX executable sortedLL Undefined symbols for architecture x86_64:   "sortedLL<int>::insert(int)", referenced from:       _main in main.cpp.o   "sortedLL<int>::printLL()", referenced from:       _main in main.cpp.o   "sortedLL<int>::sortedLL()", referenced from:       _main in main.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [sortedLL] Error 1 make[2]: *** [CMakeFiles/sortedLL.dir/all] Error 2 make[1]: *** [CMakeFiles/sortedLL.dir/rule] Error 2 make: *** [sortedLL] Error 2


I would like to know if it's possible to change an application permission in order to change the icon. In this case, it's Steam, situated at /usr/share/applications. I don't know if I should change the permission of this one or the permission of the application itself situated at /usr/bin  Not very complicated but I hope someone will understand what I mean, else, how could I change the icon itself or if there's any other alternatives.  P.S.: The permissions are set for Root  Thank you.  EDIT: I tried alacarte, it's great, exactly what I was looking for, exept that when I change the icon, I get a little X. I tried with different images an all the same. Are there a specific image type I need to get?


I've just installed Ubuntu 14.04 and am trying to install php 5.3. But when I run   apt-get install php5    it's installing php 5.5.9-1ubuntu4. I need to use php 5.3 in the system because the application I'm working on is built with php 5.3.   How can I achieve this?


Enable/disable wireless interface in a bat file

Is there a way to enable/disable a wireless network interface via the command line (so I can put it in a bat file)?  When I'm in the office I use a wired connection, but Windows still occasionally bugs me about my wireless connection not being connected (even though I turned off the option for notifying me when there's no connectivity).  I'm guessing the only way to stop it from bugging me is to disable the interface, but I'd rather not have to go into the network settings every time I need to do so.  I'd like to set up a bat file or a shortcut that I can use to enable/disable the wireless (preferably a single one that toggles the current state), and then just set up a keyboard shortcut for that.  I just have no idea how to do so from the command line.


Alignment of second line bibliography using natbib

I have a problem regarding hanging indentation of second line in bibliography did not align with a first line. My MWE was adopted from Legrand orange book template. What I want is making the same alignment for bibliography.  I try using \setlength{\bibhang}{0pt} but didn't work. If I remove numbers from options, the alignment looks normal but I prefer to have author-year and number format as modern book bibliography style.      \documentclass[12pt,twoside]{book} \usepackage{tikz} \usepackage{geometry}  \geometry{ paper=a4paper, % Paper size, change to letterpaper for US letter size top=3cm, % Top margin bottom=2.8cm, % Bottom margin left=2.5cm, % Left margin right=2cm, % Right margin headheight=14pt, % Header height footskip=1.0cm, % Space from the bottom margin to the baseline of the footer headsep=10pt, % Space from the top margin to the baseline of the header %showframe, % Uncomment to show how the type block is set on the page } \makeatletter \renewcommand*{\@seccntformat}[1]{\csname  the#1\endcsname\hspace{1em}} %CHAPTER HEADINGS \newif\ifusechapterimage \usechapterimagetrue \newcommand{\thechapterimage}{}% \newcommand{\chapterimage}[1].  {\ifusechapterimage\renewcommand{\thechapterimage}{#1}\fi}% \newcommand{\autodot}{.} \def\@makechapterhead#1{% {\parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \if@mainmatter \begin{tikzpicture}[remember picture,overlay] \node at (current page.north west) {\begin{tikzpicture}[remember picture,overlay] \node[anchor=north west,inner sep=0pt] at (0,0)  {\ifusechapterimage\includegraphics[width=\paperwidth].  {\thechapterimage}\fi}; \draw[anchor=west] (\Gm@lmargin,-8cm) node [line  width=2pt,rounded corners=15pt,draw=black,fill=white,fill  opacity=0.5,inner sep=20pt]{\strut\makebox[17cm]{}}; \draw[anchor=west] (\Gm@lmargin+.3cm,-8.1cm) node{\huge\sffamily\bfseries\color{black}\thechapter\autodot~#1\strut}; \end{tikzpicture}}; \end{tikzpicture} \else \begin{tikzpicture}[remember picture,overlay] \node at (current page.north west) {\begin{tikzpicture}[remember picture,overlay] \node[anchor=north west,inner sep=0pt] at (0,0)  {\ifusechapterimage\includegraphics[width=\paperwidth].  {\thechapterimage}\fi}; \draw[anchor=west] (\Gm@lmargin,-8cm) node [line  width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill  opacity=0.5,inner sep=20pt]{\strut\makebox[17cm]{}}; \draw[anchor=west] (\Gm@lmargin+.3cm,-8.1cm) node  {\huge\sffamily\bfseries\color{black}#1\strut}; \end{tikzpicture}}; \end{tikzpicture} \fi\fi\par\vspace*{220\p@}}} %200 = space below the picture  \def\@makeschapterhead#1{% \begin{tikzpicture}[remember picture,overlay] \node at (current page.north west) {\begin{tikzpicture}[remember picture,overlay] \node[anchor=north west,inner sep=0pt] at (0,0)  {\ifusechapterimage\includegraphics[width=\paperwidth].  {\thechapterimage}\fi}; \draw[anchor=west] (\Gm@lmargin,-8cm) node [line  width=2pt,rounded corners=15pt,draw=ocre,fill=white,fill  opacity=0.5,inner sep=20pt]{\strut\makebox[17cm]{}}; \draw[anchor=west] (\Gm@lmargin+.3cm,-8.1cm) node  {\huge\sffamily\bfseries\color{black}#1\strut}; \end{tikzpicture}}; \end{tikzpicture} \par\vspace*{220\p@}} \makeatother \usepackage[numbers, sort&compress, comma]{natbib} \usepackage[sectionbib]{chapterbib} \usepackage{lipsum} \begin{document} \usechapterimagefalse \include{chap1} \end{document}   \chapter{Chapter 1} \section{Section 1} \lipsum[2] \nocite{*} \bibliographystyle{apalike} \setlength{\bibsep}{0pt} \setlength{\bibhang}{0cm} \linespread{1.0}\selectfont \bibliography{TestBib}


I have two classes named Manager and Worker. Each Worker has a Manager and each Manager has a Worker to manage. I am defining the classes at separately header files.  manager.h  #include "worker.h"  class Manager{     private:         Worker* worker;     public:         /* methods etc */ };   worker.h  #include "manager.h"  class Worker{     private:         Manager* manager;     public:         /* methods etc */ };   main.cpp  #include "worker.h" #include "manager.h"  int main(void){     /* code code */ }   Ok until now it seems to be everything ok, but when I try to compile it gives lots of lines with the names of the headers. First I thought that it created a kind of loop and was including the headers endless. I then searched about it and tried to use #ifndef #define #endif in each header file. Turns out that now the problem is that the class Worker doesn't see the class Manager and vice-versa, meaning that the errors now are "'Worker' does not name a type" etc etc etc.


It is an important thing to do or to be done?

Which one is correct? Can i use them interchangably and is there a common rule for such constructions? Thanks in advance.


How do internet speed optimizers work (if they do at all)?

Are applications that claim to improve web speeds effective? If so, how? I would have guessed they were scammy, but I suppose if they can reroute traffic to a closer datacenter it might be possible?


Yesterday I just installed the Ubuntu 12.04 for the first time, the problem is that I can't play and of the MP3 files that I have.    I get this error:       Required plugin could not be found Python (v2.7) requires to install plugins to play media files of the following type: MPEG-1 Layer 3 (MP3) decoder   Please help me so I can play the files. Thanks


I am trying to run a previously running Java FX application and am getting an error loading the anchor pane. This error is in part of the code that I haven't touched since it was working so I'm not sure what caused it. Here is the code:  public class Main extends Application {  private Stage primaryStage; private Composition composition;  @Override public void start(Stage primaryStage) {     this.primaryStage = primaryStage;     mainWindow(); }  public void mainWindow(){      try {         FXMLLoader loader = new FXMLLoader(Main.class.getResource("MainWindowView.fxml"));         AnchorPane pane = (AnchorPane) loader.load();          MainWindowController mainWindowController  = loader.getController();         mainWindowController.setMain(this);         mainWindowController.setCompositon(composition);          Scene scene = new Scene(pane);          primaryStage.setScene(scene);         primaryStage.show();         mainWindowController.run();     }       catch (IOException e) {         // TODO Auto-generated catch block         e.printStackTrace();     } }  public static void main(String[] args) {     launch(args); }   And here is the error I am getting:   javafx.fxml.LoadException:  /Users...bin/application/MainWindowView.fxml:11  at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409) at application.Main.mainWindow(Main.java:27) at application.Main.start(Main.java:20) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162    (LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175    (PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173    (PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174    (PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run   (InvokeLaterDispatcher.java:95) Caused by: java.lang.NullPointerException at application.MainWindowController.<init>(MainWindowController.java:57) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance    (NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance    (DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at sun.reflect.misc.ReflectUtil.newInstance(ReflectUtil.java:51) at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:927) at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute     (FXMLLoader.java:971) at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220) at javafx.fxml.FXMLLoader$ValueElement.processStartElement    (FXMLLoader.java:744) at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707) at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527) ... 10 more   I believe the error is being thrown while loading the AnchorPane, but I'm not completely sure. Thanks for any help!


I come across a website that warn me to update the flash plugin, I did so, but it still won't play properly.  I use Firefox 40 and Adobe Flash 11.2.202.468, which is the latest for Linux+Firefox accroding to .  I know little thing about Flash, but can somebody please explain to me why its version varing between different browsers?   Why the latest Flash version number for Linux+Firefox is far behind others?  What can I do if the latest Flash still need to be updated?


Getting a nullpointer exception in variable initializer

I am relatively new to Java and ML but have been trying to learn, so forgive any noob mistakes. I have been following an article about ML in python  have been trying to kind of translate it to Java to train the language and learn about the subject in the process, I have been getting a NullPointerException at the line of the variable loss and when I try to initialize the method in the main class, I can`t seem to find the problem.  I have tried running the method in a non static way and just rewriting everything, but it doesn`t seem to work.      public static double calcLoss() {         for (int i = 0; i < y_true.length; i++) {             double a = (1 / y_true.length) * Math.pow(y_true[i] - y_pred[i], 2);             loss = a;         }                return loss;     }   I know it says not to do it but here is a pastr  with the full code, maybe this helps.   This is the error  >Exception in thread "main" java.lang.NullPointerException     >at Net.Neuron.calcLoss(Neuron.java:40)     >at Net.Main.main(Main.java:28)


What happens when a site fails to meet the beta requirements?

What happens when a site makes it to beta, but isn't good enough to become a real site by your requirements? Will it be removed from SE altogether? Or will it be in beta forever? I'm just wondering..


SharedPreferences in non activity class NullPointerException

I'm trying to use SharedPreferences in a non activity class from onResume() in an activity but I'm getting a NullPointerException on the context.  For some reason I cannot get the context in onResume(). Not sure if I'm missing something, but any help would be appreciated.  onResume() Method in my activity  @Override protected void onResume() {     super.onResume();     // The activity has become visible (it is now "resumed").      // Check User's Access Token exists and hasn't expired.     AccountFunctions accountFunctions = new AccountFunctions();      if (!accountFunctions.validateUserToken(this)) {         Intent intent = new Intent(this, LoginActivity.class);         startActivity(intent);     } }   validateUserToken(Context context) method in AccountFunctions Class  public Boolean validateUserToken(Context context) {      SharedPreferences sharedPref = context.getSharedPreferences(getString(R.string.user_file_key), Context.MODE_PRIVATE); // This is where the error is thrown     String accessToken = sharedPref.getString(getString(R.string.user_access_token), null);     DateTime expiryDate = new DateTime(sharedPref.getLong(getString(R.string.user_expires), 0));      if (accessToken == null || expiryDate.isBeforeNow()) {         return false;     } else {         return true;     } }   The Error     java.lang.RuntimeException: Unable to resume activity    {uk.co.itsstonbury.www.intouch/uk.co.itsstonbury.www.intouch.MainActivity}:   java.lang.NullPointerException: Attempt to invoke virtual method   'android.content.Context   android.content.Context.getApplicationContext()' on a null object   reference


Where can I find a dataset for international borders that includes national waters?

I'm trying to find a .shp file that not only includes international land boundaries, but also the water boundaries, extending out to international waters.  Does such a thing exist?  I'm not even sure of what terms to search for.  Currently, I'm operating using a world borders map which is mostly good, but when our mobile users approach the ocean and their GPS flakes out a bit, our system can't place them within a country.  I figure the best way to fix this is to used a dataset that will always place the national border well away from dry land (and cell towers for their phone).  This project isn't making any money, so I'm hoping for free :-)