Hello I have the following code which allows a user to select an image.

Insert Image

           <input id="thumbage2" name="Image1"class="ModalArea2" type="file" style="display:none">            Choose Image                         <button class="ModalButton2" onclick="iImage();">Submit</button>             <button class="ModalButton2" onclick="cancel2();">Cancel</button>

   It is NOT in a form, i'm not sure if that matters.   function iImage(){ var imgsrc = document.getElementById('thumbage2'); if(imgsrc !=null){     $(document).ready(function (e) {         $('#form2').on('submit',(function(e) {             e.preventDefault();             var formData = new FormData(this);             console.log("done");             $.ajax({                 type:'POST',                 url: $(this).attr('action'),                 data:formData,                 cache:false,                 contentType: false,                 processData: false,                 success:function(data){                     console.log("success");                     console.log(data);                 },                 error: function(data){                     console.log("error");                     console.log(data);                 }             });         }));          $("#ImageBrowse").on("change", function() {             $("#form2").submit();         });     });       richTextField.document.execCommand('insertParagraph',false,"");     richTextField.document.execCommand('insertHTML',false,"[Image][Remove=Remove Image]");     richTextField.document.execCommand('insertParagraph',false,"");     document.getElementById('modal2').style.display = "none";     document.getElementById('thumbage2').value =  ""; }   }  Here is my javscript code. Basically what I want is to be able to get the file in the input field and Post it to a php file(saveImage.php) without leaving the page. How do I do this? By the way if you are wondering the purpose is to upload images and store them in Blobs in a MYSQL database. And in case it matters here is my php code:  $imageName = mysql_real_escape_string($_FILES["Image1"]["name"]);     $imageData = '';     $imageData2 = '';     $imageext = '';     if($imageName != null){         $imageData = mysql_real_escape_string(file_get_contents($_FILES["Image1"]["tmp_name"]));         $imageType = mysql_real_escape_string($_FILES["Image1"]["type"]);         $imageSize = getimagesize($_FILES["Image1"]["tmp_name"]);         $imageType = mysql_real_escape_string($_FILES["Image1"]["type"]);         $FileSize = FileSize($_FILES["Image1"]["tmp_name"]);         $imageext = $imageSize['mime'];     }      echo $imageext;   EDIT: OK i changed my JS to what everyone is saying in the comment. But this is not what i want, I want to submit the files data using ajax when a regular button is pressed not an input with type of submit. Can anyone actually help me?


Is there a formal proof for the superposition theorem?

I was just wondering whether there is a formal prove for the  in electric circuits? I tried searching it online but couldn't find anything sufficient. Most of the sources assume it follows from the definition of linear systems, but then how do you prove linearity without using the superposition theorem? Any input will be much appreciated!


Difference between old fashioned and quick oats?

What are the difference between old fashioned and quick oats?   Can they be substituted for one another in recipes?


If I create a virtual email alias that forwards a lot of spam email, is my IP at risk of blacklisting or the originating IP address?

A scenario of this would be something like a domain called domain.com has a mailserver set up that forwards all email sent to info@domain.com to person@gmail.com. If someone sends a lot of spam to info@domain.com, is my mailserver at domain.com at risk of being blacklisted?  Note: I do not intend to spam, I just want to know if my server would be at risk.


How to make sudo use a separate password?

Using Ubuntu 14.04, I have 2 accounts:   Account A (first one set up) with Password 1 Account B (second set up) with Password 2, when updating software in Account B, I use Password 1 to authenticate.  Has been successful so far.   How do I set up sudo with its own Password, and then run sudo apt-get clean?


You can place the script in the head or body as you like. The   script will behave as if it was located exactly where you put the   script tag in the document.   The sentences above are taken from  (at the very bottom). I think they made a grammatical mistake here: it should be behave as if it were rather than it was. I'm not 100% sure, so want to confirm it.


Prove that a continuous function on (0,1) has a sequence of step functions which converge pointwise to it on [0,1]

Suppose $f:\left[0,1\right]\rightarrow R$ is continuous on $\left(0,1\right)$. Prove there is a sequence of step functions $\left\{f_{n}\right\}$ which converge pointwise to $f$ on $\left[0,1\right]$.  John Franks - A (Terse) Introduction to Lebesgue Integration 2009 - 1.5.6 (7), page 13. But, consider $f=\sin\frac{1}{x}$, with $f=a$ when $x=0$, is continuous on $\left(0,1\right)$. Suppose that, a step function $f_{n}$, is constant on $\left[0,k\right]$, $k<1$. Since, $-1\leq\sin\frac{1}{x}\leq1$ on $\left(0,k\right)$, so $\lim_{n\rightarrow\infty}f_{n}\neq f$ I can't believe this book is wrong. Is my example correct? If it's not, how to prove this problem? Thanks.


If $d(x,y)$ is a metric, then $\frac{d(x,y)}{1 + d(x,y)}$ is also a metric

Let $(X,d)$ be a metric space and for $x,y \in X$ define $$d_b(x,y) = \dfrac{d(x,y)}{1 + d(x,y)}$$ a) show that $d_b$ is a metric on $X$  Hint: consider the derivative of $f(t)$ = $\dfrac{t}{1+t}$  b) show that $ d$ and $ d_b $ are equivalent metrics. c) let $(X,d) $ be $(\mathbb{R}, |\cdot|)$ Show that there exists no $ M>0$ such that $ |x-y| $ $\leq$ $Md_b$ $(x,y)$ for all $ x,y$ $\in$ $\mathbb{R}$  I have calculated $f(t)$ and $f'(t)$ and from this I know $f(t)$ is an increasing function as $f'(t)$ is strictly positive. But I don't know where to go from here or how to do parts b) and c)


Why did Dumbledore not face Voldemort earlier like he did for Grindlewald

We know that Dumbledore marched and faced Grindelwald on his own. However why did he not do the same for Voldemort before? What was he waiting for or was he afraid of facing Voldemort?


What is the tipping process in restaurants in the US?

I'm supposed to write down something on the bill I get? Do I hand the waiter my credit card after doing so?  Since I need a receipt, do I wait for the waiter to bring things back? What's the process, from asking for the check till I can walk out with a receipt?


Is there any significance to the two coins under the first bridge in Super Mario 64?

I noticed that there are two coins under the first main bridge leading into the castle.  I am trying to side-flip and wall bounce to get them both, but do they have any use as I am not in a 'world' right now?


Use BIC or AIC as approximation for Bayesian Model Averaging

I want to compare "real" Bayesian Model Averaging (BMA) performed with the EM algorithm and information-criterion based BMA.  Which one, BIC or AIC, is a "closer" approximation to the "real" BMA?  BIC as the name is indicating? I would like to compare apples with apples.  My models are not nested with 1 parameter at minimum and 3 parameter at maximum.


fstream limits for writing on muliple files

I am trying to write in multiple files using ofstream. The problem is that I'm not able to write to more than 1020 files at the same time.  I don't understand if it's my laptop problem or if it's an internal limit of fstream.  I wrote a simplified version of my program. Obviously in this example it's not necessary to open multiple fstream channels.  #include <fstream> #include <vector>  using namespace std;   int main(){   vector<ofstream> write(2000);   char namefile[50];    for(int i=0; i<2000; i++){     sprintf(namefile,"text_%d.txt",i);     write[i].open(namefile, ofstream::out);      if (write[i].fail())       printf("Error writing to %s\n", namefile);      write[i] << "Hello!";     write[i].flush();   }    for(int i=0; i<2000; i++)     write[i].close();    return 0; }


Strange characters inserted before username both in Terminal and Tilda terminal emulator

Started noticing some odd behavior when using Gnome Terminal, Tilda terminal emulator also a couple days ago. Basically whenever I launch a fresh instance of either application (new tabs also) I get these strange characters inserted before my username. It is as though the character encoding is off base? Or maybe the font I'm using? I doubt the latter case as previously I was using the exact same font w/ no probs.  Check out the shots to see what I mean (see red thin border). Apologies for the fugly links, don't have enough rep yet to post images directly:  Tilda     Gnome Terminal    If I hit the Esc key or clear the terminal via the clear command, these characters go away.  What on earth could be causing this? And more importantly, how the hell do I get rid of or restore to original condition?  Yes I have messed around w/ fonts, restarted, purged both applications and the issue still persists!  Guys, I'd really appreciate your knowledge and help on this.   Many thanks in advance.


ClassCastException When converting Collection to array

For a project of mine i'm trying to convert a given Collection to an array  I currently have this:  public class InsertionSorter< T extends Comparable<T>> {     private T[] array;      @SuppressWarnings("unchecked")     public InsertionSorter(){         array = (T[]) new Object[0];     } }   This gives me the following error:   java.lang.ClassCastException: java.base/[Ljava.lang.Object; cannot be cast to java.base/[Ljava.lang.Comparable;   Is there a solution for this?  And after i converted it to an array i want to to sort it and return it back as an collection. I do this as following:  collection.clear(); collection.addAll(Arrays.asList(sort(array))); return collection;   The sort method is a method which sorts an array and returns an array of type T.


I just noticed today in the review queue (I saw it in GD.SE and M&TV.SE) that the user icons dropped below the correspondent review queue instead of being on the right side in the same row. That makes the screen unnecessary long.


What's the use of allowing to copy empty string to clipboard?

Typical applications that allow copying text to clipboard only enable "Copy" action when there's some nonempty chunk of text selected, otherwise Ctrl-C has no effect. Not so with MS Visual Studio editor - you can put the caret anywhere in the text and press Ctrl-C and you have an empty string copied into the clipboard (and the previous content in the clipboard is erased as usual).  This is a bit of annoying when you press Ctrl-C instead of Ctrl-V because you get the clipboard contents lost instead of pasted at the caret position.  Is there any use in such behavior?


Is it possible to recover data after reinstalling ubuntu on same drive

I just lost 2TB data when i reinstalled ubuntu 13.04 on already installed ubuntu 13.10. Can anyone help me how to extract or recover whole partition, I am sure hard disk is formatted because its now showing only 30gb used data out of 2TB.  So is there any way to recover whole partition. I am trying test disk for now which is recovering very slowly but at least recovering.


Untrusted connection when visiting per-site meta over SSL

Steps to reproduce:   In Firefox (with ), visit a non-trilogy Stack Exchange site (for example, ) Get redirected to the HTTPS version Click on meta link (for example, )   What should happen:   Meta site opens   What happens instead:   "This Connection is Untrusted" message appears:      meta.movies.stackexchange.com uses an invalid security certificate. The certificate is only valid for the following names: *.stackexchange.com, stackexchange.com, meta.stackexchange.com, *.meta.stackexchange.com, *.stackoverflow.com, stackoverflow.com, serverfault.com, stackauth.com, sstatic.net, meta.serverfault.com, superuser.com, meta.superuser.com, stackapps.com, openid.stackauth.com (Error code: ssl_error_bad_cert_domain)   Notes:   It also happens if you visit  instead (you get redirected to HTTPS and the error occurs) Another random example,  Trilogy metas work,  works (but  doesn't - I am not sure what gave me that link) Replacing URL with https://*.meta.stackexchange doesn't work   Here is the screenshot:


I cannot see my pen drive when I am in my boot options after pressing F12

When I am in boot mode, I only see my windows OS boot but not my Ubuntu pen drive to install Ubuntu. I used Rufus to convert the iso to my Pendrive and when I start to reboot, I don't see my USB drive after pressing F12. What should I do? Thank you in advance


Proof that square of sum equal to sum of cubes of N.


I would like to create some name badges using a loop. I have a spreadsheet with names and affiliations that I save in names.csv file as follows  "Name1","Surname1","Affiliation1", "Name2","Surname2","Affiliation2", "Name3","Surname3","Affiliation3"   I can copy the content of names.csv in a string array and use a loop to recover the entries. The following is an example of working code producing the output Surname2:    \documentclass{article} \usepackage{tikz} \usepackage{pgf} \usepackage{array}  \def\names{{"Name1","Surname1","Affiliation1", "Name2","Surname2","Affiliation2", "Name3","Surname3","Affiliation3"}}  \begin{document}  \pgfmathparse{\names[4]}\pgfmathresult  \end{document}   I can use this idea to create hundreds of name badges in a loop. But instead of writing the whole list in the .tex file I would like to call directly my names.csv file. I used the modified code  \documentclass{article} \usepackage{tikz} \usepackage{pgf} \usepackage{array}  \def\names{{\input{names.csv}}}  \begin{document}  \pgfmathparse{\names[4]}\pgfmathresult  \end{document}   which apparently enters in an endless loop. I understood that \input{} works just as copy-pastying, but it doesn't seem the case. Of course I can work in the spreadsheet and then copy paste the names.csv file content, but I would like to understand what happens. Any clues?  PS edit: The suggested solution is enough for my case. But still I would like to be able to define macros with \input'. It seems that\input{}' inside a macro is not expanded immediately. I mean if I have some code in file.tex', that I want to plugin in a new macro,\def\mymacro{\input{file}}' will save \mymacro' as '\input{file}' and will only look what's inside the file when I call the macro in the document. That's why in the previous example\names' is not understood as an array. In the same way  \begin{filecontent*}{newfile.tex} \input{file} \end{filecontent*}   will save the code \input{file}' innewfile.tex', but not the content in `file.tex'. Anyone has any idea how to force input to expand?


What happens to the babies that the white walkers collect?

We all see that Craster's last son was turned into a White Walker, but still haven't seen any kid/infant White Walker or wight. It seems kinda weird, what will the White Walkers do with kids in their army? I don't think they can fight, so why turn them? We've seen that dead people become wights and they don't age, so do these babies grow old or something?


Define variable to use with IN operator (T-SQL)

I have a Transact-SQL query that uses the IN operator. Something like this:  select * from myTable where myColumn in (1,2,3,4)   Is there a way to define a variable to hold the entire list "(1,2,3,4)"? How should I define it?  declare @myList {data type} set @myList = (1,2,3,4) select * from myTable where myColumn in @myList


Setting proxy environment variables in a shell script

I am trying to set a proxy on a rotating basis; but my export commands are not working. I'm using CentOS 7.  I've gone back to basics and tested a really simple bash script, which sets and unsets environment variables, and then tests them. The environment variables appear set properly, but my external IP is still showing as my local IP.  $1 is an address in the form   #!/bin/bash  function set() {     export http_proxy="$1/"    # not working     export https_proxy="$1/"   # not working     testExtIP }  function unset() {     unset http_proxy     unset https_proxy     testExtIP }  function testExtIP() {     externalHTTP=$(curl -s http://api.ipify.org) # an API that echos the external IP quickly     externalHTTPS=$(curl -s https://api.ipify.org)     echo "External HTTP: $externalHTTP; external HTTPS: $externalHTTPS"  }  case "$1" in     'set')     set $2 # speed     ;;     'unset')     unset $2     ;;     'test')     testExtIP $2     ;;     *)     echo "Usage: $0 $versum [set|unset|test]"     ;; esac   I would like the script to return:  External HTTP: 119.27.177.169; external HTTPS: 119.27.177.169  But my external IP isn't set:  External HTTP: **SERVERIP**; external HTTPS: **SERVERIP**  which I've tested using various tools. Why is the export command not working? Am I missing something important?


Change a enumerated list to horizontal with Tasks

I have spesicif list I need to change into a horizontal alignment. I thought of using the tasks package, but can not figure out how to do it. Here is the list:  \documentclass[12pt,numbers=noenddot,headings=small,parskip=half,headsepline, listof=nochaptergap, listof=totoc,index=totoc]{scrreprt} \usepackage{xpatch} \usepackage[a4paper, includehead, left=3.5cm, right=1.7cm, top=2.5cm, bottom=2.0cm]{geometry}  \setlength{\parindent}{0em} \usepackage{enumitem,tasks} \usepackage{multicol}  \begin{document}  \begin{multicols}{2} \setlist[itemize]{wide =0pt, leftmargin=*, nosep,before=\KOMAoptions{parskip=false}} \begin{enumerate}[topsep=0pt,itemsep=-1ex,partopsep=1ex,parsep=3.5ex,leftmargin=*] \item Item   \begin{itemize}     \item Item \end{itemize} \item Item  \begin{itemize}     \item Item \end{itemize} \item Item  \begin{itemize}     \item Item     \item Item \end{itemize} \item Item  \begin{itemize}[wide=0pt]     \item Item Intertext     \item Item \end{itemize} \item Item \end{enumerate} \end{multicols} \end{document}


I need some help to ease me understanding this equation. I have tried to write but Miktex is bugging. Can someone tell me how to improve it in order to let it working?  \documentclass[10pt]{article} \usepackage{graphicx} \usepackage{amsmath}   \begin{document}  \[ DeltaCanada_{t} =  \begin{cases}     -1.40(0.02) - 0.58(1.5e-8)w_{t-1} - 0.53(0.14)\DeltaCanada_{t-1}+ 0.169(0.03)\DeltaBritishColumbia_{t-1} & \text{ if $w_{t-1} \leq 0.62$} \\    -0.73(0.76) - 0.15(0.17)w_{t-1} - 0.99(2.5e-7)\DeltaCanada_{t-1} + 0.24(0.13) \DeltaBritishColumbia_{t-1} & \text{$w_{t-1}>0.62$}                                       \end{cases}                         \ ]  \end{document}


I want upgrade from Ubuntu 10.04 LTS to Ubuntu 10.04.1 LTS. Is there a basic update? How do I do it?


Giving players custom spawn eggs in 1.13

Recently I have been working on a mini-game that gives a few players custom spawn eggs. I want the mob to simply have a name and be on a team. I'm attempting to use this command:   /give @p[x=-102,y=48,z=81,distance=..1] shulker_spawn_egg{Team:PurpleTeam,CustomName:"\"Purple Turret\""}   It does give the player a spawn egg, but the resulting shulker spawn does not have a team or a name. Any ideas why this isn't working?


Is $(\sinθ)^2=\sin^2θ$  or  $(\sinθ)^2=\sin(θ^2)$  or  $(\sinθ)^2=\sin^2(θ^2)$  Can you explain your answer, regards Tom. Also, does your answer work for $\cos$ and $\tan$?


I recently installed a Linux operating  system (backtrack 5 r3) I couldn't connect to the internet with it so I removed the partition manually. After that, whenever I turn on my computer it goes to a command line that says "error no File-system found" "Grub Rescue/"  I have tried f12 and booted into all the options. I also put Ubuntu 12.04 on my flash drive and tried installing it on the computer, the installation failed saying "No Available Space"  My hard-drive is 500g with about 250 left. I put the hard drive in another computer (as a secondary just to see the files. It had 2 partitions a main and one with 1 gig. I formatted it with no difference.  My Problem: I can't boot into Windows


Convenient button to switch between main site and meta site on the Android app

Currently, to switch from a main site to its meta (and vice versa), one needs to search for the other site in the side bar. I think we can make the process more convenient of the switch button is included in the drop down on the question lists.


Is there a way to compute minimum distance of a code given a systematic parity check matrix? I know that min dist is smallest number $d$ such that there exists $d$ linearly dependant columns. I am looking in particular to find minimum distance of binary (codes over $\mathbb{F}_{2^l}$) quasi-cyclic  of rate q/q+1. Parity check matrix for such codes have a structure $H=[I|C_1|C_2|...|C_m]$ where each $C_¡$ is a from class of circulant matrices. It may be useful that one can treat these codes as modules. Or even if there are any approximate algoruihms for this ?


Constant 60KB Shared library memory on /proc//maps

In a quest for understanding RAM requirements of system processes, I arrived to analysis of /proc/pid/maps.  I have noticed a pattern: many shared libraries have exactly 60KB space allocated in their virtual memory right after the code, with permissions ---p, meaning non-executable, non-writable, non-readable and private.  My guess is that it is not the .text .data or .bss sections of the shared library because it is not r/w/x.  What is it? can it be reduced?  When using /proc/pid/smaps to further dive in,  I haven't seen it in RSS (Resident Memory), so one can claim that it is of no importance to RAM use.  I tried to relate it to the executable or shared library sections by using objdump or readlef, but I could not find a section that's 60KB.  For example:  76d2d000-76d94000 r-xp 00000000 1f:00 439        /lib/libc.so.0 76d94000-76da3000 ---p 00000000 00:00 0     (What's that?) 76da3000-76da4000 r--p 00066000 1f:00 439        /lib/libc.so.0 76da4000-76da5000 rw-p 00067000 1f:00 439        /lib/libc.so.0 76da5000-76dab000 rw-p 00000000 00:00 0


A word that describes someone who has an intention to ridicule another person by questioning everything they say?

Looking for a word that describes someone who has a subtle intention to ridicule the other person by questioning everything they say? They act slightly hostile and hypersensitive and make expressions in response to what is being said as if to try and make the other person's question seem silly or invalid.


Device to change which computer the input/output devices are connected to

I have a laptop and a desktop computer at home. I want to be able to switch easily between using my laptop and using my desktop with the same mouse/monitor/keyboard without having to plug/unplug anything from my desktop each time i switch devices.  I suppose there is a device that lets you plugin a keyboard, mouse and monitor and connect that device to both the laptop and desktop. The device then decides which computer will be connected to the mouse/keyboard/monitor. For instance pressing a button on the device to switch between laptop and desktop. (, I don't have enough reputation to post it directly yet).  I assume such a device or something similar exists but I can't find how its called and where I can buy it.


I have 2 tables in my database and I am trying to get data from both of the tables.  The first table contains the customer data. The second table contains the of the customer. I am using INNER JOIN to select the customer data and some financial data of the customer.  Here is the SQL statement I am using:  SELECT cus.id, cus.name, cus.address, count(invoices.id) as id2, CONCAT('€ ', ROUND(SUM(invoices.total),2)) as total FROM cus INNER JOIN invoices ON cus.cus_id = invoices.cus_id    This script works when the customer has invoices in the database. But if the customer has no invoices the statement responses NULL for all the columns.  If there is no data in count(invoices.id) as id2 and CONCAT('€ ', ROUND(SUM(invoices.total),2)) as total I still want to show the data for the customer. But currently I am getting NULL.  Does someone know what is wrong with my statement and how I can fix this problem?


Hello today I just upgraded from 8.1 to windows 10, everything went fine but I'm stuck on a simple thing.  How on earth can I change this really bad blue background on the windows login screen right after the lock screen?  I've tried changing images in C:\Windows\Web\ directories but nothing changed.  That background is driving me nuts...  UPDATE  So far the only thing that helps me get ird of the image is this (I'm posting the contents of a .reg file):  Windows Registry Editor Version 5.00  ; Created by: Shawn Brink ; http://www.tenforums.com ; Tutorial: http://www.tenforums.com/tutorials/9108-sign-screen-background-image-enable-disable-windows-10-a.html   [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System] "DisableLogonBackgroundImage"=dword:00000001


A command that will execute a different command on uneven days

I need to think of a command that I'll execute a different command on uneven days.


How is it possible for Trunks to fight with Goku Black, and hold his own better then either Goku or Vegeta?

When Trunks arrived from the future, he was easily defeated by Goku and Vegeta. His strongest form is SSJ2 (or Possibly USSJ in the anime). This form at best is on par with SSJ3 Goku.  When Goku, Vegeta, and Trunks go back to the future, Goku Black knocks out Vegeta, who is in SSJ Blue form, easily. Then, Goku is also handily defeated.   Despite this massive power difference, Trunks steps in and fares far better than either Vegeta or Goku. How is this possible?


How to completely remove network-manager

A few days ago, my computer WiFi was getting interrupted. Because of this, I connected the modem directly to the computer. But I still had a problem connecting to the Internet, and sometimes my connection to the Internet was interrupted. So I decided to remove the Gnome Network Manager and install WICD instead. Currently, my connection problem is fixed, but Ubuntu sometimes install Gnome Network Manager and I have the same problem again. How can I prevent Ubuntu from installing the Gnome Network Manager? Here are the commands that I use to remove Gnome Network Manager.  sudo apt-get remove network-manager network-manager-gnome sudo dpkg --purge network-manager network-manager-gnome   I run the last command after installing WICD and rebooting.


Prove that if $z$ in $\mathbb{C}$ is a solution of $z^5= 1$ then the conjugate of z is also a solution

I have to show that $(z^*)^5=1$, if $z^5=1$, but how do I do that? I tried to show it by inserting $x-yi$ into the equation, so $(x-yi)^5=1$. After using the binomial formula for a power of $5$, I thought I might be able to see similarities between the imaginary and real parts but I just got a complete mess. I'd be happy if someone could help me.


It's been a while since I last used Java, as I'm primarily a C# developer. To get back into the game, I was working on a very simple application to touch on most of the key features of the language. I ran across the following problem:  for (Player player : teamRed.getPlayers()) {     System.out.format("> %s\n", player.getName()); }   Where getPlayers() is defined as follows:  public Iterable<Player> getPlayers() {     return Collections.unmodifiableList(this.players); }   At some point in the past, either C# or Java had a performance issue when you used a getter in your for each like this, as it would execute the method every iteration. I cannot find anything about this anymore, so I wonder:   Has Java ever been subject to this issue, or was it the case for C# only?  Personally, I feel the compiler should be smart enough to optimize this properly and actually store the result of getPlayers in a temporary variable before iterating over it. But if not, I have no trouble helping the compiler a hand :P


Show that the number 9 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 9.  Show that the number 3 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 3.  Are semigroup and monoid theory could be useful?


Fitting data to multimodal distributions with scipy, matplotlib

I have a dataset that I would like to fit to a known probability distribution. The intention is to use the fitted PDF in a data generator - such that I can sample data from the known (fitted) PDF. Data will be used for simulation purposes. At the moment I am just sampling from a normal distribution, which is inconsistent with the real-data, therefore simulation results are not accurate.  I first wanted to use the following method : Fitting empirical distribution to theoretical ones with Scipy (Python)?  My first thought was to fit it to a weibull distribution, but the data is actually multimodal (picture attached). So I guess I need to combine multiple distributions and then fit the data to the resulting dist, is that right ? Maybe combine a gaussian AND a weibull distirbution ?  How can I use the scipy fit() function with a mixed/multimodal distribution ?  Also I would want to do this in Python (i.e. scipy/numpy/matplotlib), as the data generator is written in Python.  Tips on doing this in other languages/tools such as R/matlab is also helpful. I've also left this question on Stackoverflow, but then I guess this site is more suited to this question.


How does an SE site get a special icon?  Is that only done internally by SE staffers?  Can it be done on a site's meta?  Can I get rep by designing one?  I have some obvious icons for sites that are still "generic" like Astronomy ("A") and Chemistry ("Ch").  How can I submit them for consideration or use?


How can I use linebreak inside \coordinate, in tikz?

well I need to write some text right next to my shape. But it's too complicated when making it all coordinate i and write it. How I make it easier?


Creating profile cross-sections in ArcGIS Desktop?

Because the default 'Profile Graph' tool was not sufficient, I wrote a custom VBA script that creates scaled and exaggerated profile cross-sections in ArcGIS but I need more features:   Visualize more than 1 surface Visualize vertical and directional boreholes Ability to symbolize / edit the output Linked with underlying data - changes in terrain (or profile 3D line) reflected in output   A few years ago I tested an extension by A-Prime software called 'CrossView For ArcGIS' but I am not sure if it is compatible with ArcGIS 10 (Contacted A-Prime but they have not yet responded)   Area there any alternatives? Other 3rd party software? A functioning script? that can do this?


Where does the damage of relocated dashes land?

The end location of a dash or jump can be changed by an ability that pushes () or pulls () you. So for example I try to  on the adc, but a Blitzcrank pulls me, preventing me from landing on my chosen spot.  Will I deal my AoE damage around the adc, where I tried to land, or around the Blitzcrank, where I ended up landing?


Why not kill Lucifer with the angel knife?

I have seen all the episodes of Supernatural, going back on the 5th season, when they are trying to kill Lucifer, why not just use the angel knife? The Colt didn't work, the demon knife won't work because he is an angel. I mean if they got close enough to put the gun to his head, couldn't they just have used the angel knife on him?


Applying jQuery event handlers to AJAX content

I'm sure this is something that AJAX gurus learn very early on, but this is the first time I've run into it.  Using jQuery, I have assigned .click() handlers to certain CSS classes.  However, if I reload some of the content via AJAX, the .click() handlers are not firing for that content.  It seems I have two choices:   put my .click() handler assignments within a JScript function, and call it every time content is refreshed via AJAX. use onclick="" rather than jQuery within my AJAX content.   So far, it seems #1 would be the best; it's more consistent and yields smaller HTML for AJAX.  Is there another way to do it?  Perhaps a different way of assigning the .click() handlers from the outset?


How would one write down this equation in Latex? What kind of font is used for l and nu?


Why did the liquid seemingly disappear from some unopened aluminum cans?

I'm sitting in a room next to some totally unopened cans of carbonated soft drinks (if it matters — the two affected cans are Coke Zero and Diet Coke). These cans were unboxed approximately two days ago and were full, but now are seemingly mostly empty!  There is no puncture in either can, and compressing them results in the dent being counteracted by pressure inside the can. Shaking and weighing the can (by hand; I don't have a scale anywhere near) reveals that a good majority (75%) of the can is now effectively empty.  The cans spent the whole time stored inside a normal room with a temperature of ±22ºC and automatic fluorescent lighting which is on for 16 hours a day.  Finally, there is no condensed drink on the outside wall of the can, and the cans themselves are externally room temperature, so I'm really puzzled about what process could do this.  I'm hesitant to open the cans because I'm not sure what the result of that could be, however if it's deemed here that there's little or no risk, I'll do that and update the question.  What possible reason could there be for these cans becoming empty?


This question and answer is a response to a request from Joseph Wright.   Why shouldn't I use getnonfreefonts to install additional fonts? Why shouldn't I use updmap when installing or removing fonts?     Background  There are a number of questions on the site concerning problems caused by people installing additional fonts and using updmap to update the 'map' files on which TeX depends.  One common cause of these problems is the use of getnonfreefonts.  Other causes are the use of other font installation scripts or executing updmap directly.


I always have a question in my mind when I think about the big bang. It is that if the universe has expanded from a tiny singularity by an explosion to the universe of today, why didn't it expand into a uniform sphere with everything distributed uniformly. There wasn't any force present already before the starting of the universe.  The Galaxies and different things don't seem to be uniform. And also where does this randomness of every planet, every star being different from others come from.  Could anyone help me in understanding this?


(How) does blocking a (servo/DC) motor break it?

I don't know why, where or how I picked this up, but I believe that if you power an electric motor while blocking it, and thus stopping it from moving, you'll damage it. I'm thinking of the following type of motor, and possibly servo motors:    Is it indeed true that holding the shaft in place while powering it will damage it? And if so, why? And could this be prevented by simple measures? (Like putting a resistor in front of it.)  Is the "damaging process" any different in servos, or do they get damaged in the same way?


I want to make a power point presentation with LaTex. I used the presentation template in sharelatex but the output was a .pdf. I want it to be ppt formate. is there any way I can get a direct .ppt from Latex?


Moving folders has confused blender paths

I needed to tidy the files I am using in my blender project. After doing so blender doesnt know how to find the files as the path they were on has changed.   What can I do with blender to make sure it doesn't lose the paths when I tidy the files?


$f$ be a continuous function maps Cauchy into Cauchy. Is $f$ uniformly continuous?

Let $f$ be a continuous function. If $f$ is uniformly continuous then it maps cauhy sequence into cauchy sequence. Is the converse true? That is if $f$ maps cauchy into cauchy gives the uniform continuity of $f$. I think it's no. Can suggest a counter example


Can't remotely play music to iPhone since update to WatchOS 4

I have an Apple Watch Series 2, and I recently updated the OS to the 4th version. Previously, I could remotely listen music. Since I don't have bluetooth headphones, I was using the Apple Watch just to give the command to play music on the iPhone, which is fine for me. But since the update, now it doesn't play my music on the iPhone, and it asks me to connect any bluetooth headphones.   What if I want to listen music without bluetooth headphones?


When is a Windows User's Temp directory cleaned out?

When does Windows clear this directory? The only time it seems to is when running disk cleanup tool one is given the option..


What single fixed lens for street photography and portraits (and travel photography) would you recommend?   I currently use the stock lens that came with the Olympus OM-D 10, and would like to use a general purpose single fixed lens for a long trip. Especially for portraits and street photography.  Thanks!


Replace HTML-special-character-codes in Python3

I recieve HTML-files and they contain Strings like that &quot; ("), &#252;(ü) and so on.  I need them humand-readable. So I could use str.replace() for that. But isn't there a package/library for Python3 which knows all character-codes by itself and could handle that?


What is the right way to gain sudo privileges

I have just created a new Rackspace cloud server and I need to set it up.  I created a new user with the adduser command and currently the user is only in a group with the same name. For the sudo privileges what should I do:   use visudo to edit /etc/sudoers file  add the user to the sudo group  create a new admin group, add it to sudoers, and then add the user to this group    I can not decide what's the right way to do this. Why should I choose one over other?


What's the reason for operator precedence?

What is the underlying concept due to which we prioritize one operator over the other? Is it just a convention?


Phase added on reflection at a beam splitter?

If we have light of a particular phase that is incident on a beam splitter, I assume the transmitted beam undergoes no phase change. But I thought that the reflected beam would undergo a phase change of $\pi$. I have, however, read that it undergoes a phase change of $\pi/2$.  Which is it, and why?


Blender doesn't render anything on my laptop

So I have a decent laptop that used to render perfectly. In fact I'd throw some heavy scenes and it would do just fine. But recently after formatting my laptop, i am getting this weird issue where even the default cube-light set-up doesnt seem to light anything.Please help me out! This is what the issue looks like..


I have below mentioned string  String str = "\nArticle\n\nArticle\nArticle";   I want total number of count. How can i get this? As the string contain \n so always it gives 1 instead of 3


Why is it that sometimes the bend modifier bends in two different directions while other times it works as intended?

Sorry for unclear question, but the Simple Deform modifier has been one of the most difficult ones to use consistenly. It sometimes does what I intend it to:    while other times this happens:    Transforms are applied, everything else seems to be fine, and the two objects have basically the same topology, so what causes this difference? Also tried using an empty for the Axis Origin of the 2nd result, but to no avail. If anyone could give me a quick rundown of why this happens and how to use the Simple Deform modofier properly, it would be greatly appreciated. At the moment whether it works as intended or not feels like a gamble.


Is there a log of errors produced during an upgrade?

At the end of an upgrade from 12.10 to 13.04, I received an error message something to this effect:  some programs could not be installed. You will have to reinstall them after reboot.   My question: Is there a log produced during the upgrade that I could see to tell me what these programs that failed installation were?  UPDATE:  $ ls -al /var/log/dist-upgrade total 8 drwxr-xr-x  2 root root 4096 Apr 19  2013 . drwxr-xr-x 15 root root 4096 Oct 23 08:12 .. $   sigh


Explain travel times and distances on flight

A flight from Los Angeles to ABQ is about 2 hours but is ~670.2 miles  A flight from San Jose to Chicago is 4 hours but is ~1859.0 miles  Can anyone explain why the travel time from San Jose to Chicago is not longer and closer to 5.75 hours?  If the distance increase by 2, shouldn't the time increase by a factor of 2 as well?


Ubuntu Installation Help? - "The system is running low-graphics mode"

I have a PowerMac G5 With a powerpc dual and I am trying to install ubuntu 13, I have a nvidia GeForce 6600LE. Everytime I try to install ubuntu it passes the dots and then comes up with this error.


Install Microsoft Office Pro 2010 on Ubuntu 13.04

I am trying to install Microsoft Office Pro 2010 on Ubuntu 13.04 using Wine. I have read several threads and everybody seems to be able to do this but me. So I am giving a shoutout for help. I tried the process taking screenshots of each step. I would post them but evidently I'm not popular enough to be allowed the luxuary of sharing my woes with my fellow Ubuntu-ers. Any suggestions on how to get Office up and running would be greatly appreciated. Thanks!  Here are the steps that I took (without screenshots):   Downloaded the installer.  Right click and click run with Wine Windows Program Loader Unpacking the files Entered the product key, it was validated, and clicked Continue Accept the licensing agreement,and click Continue Click Install Now Waiting... And boom, the error. It just says that the installer has encountered an error. It gives the same result every time.   Again, ANY help is greatly appreciated. THANKS!


Beamer: Pausing before the first item in itemize[]

In Beamer, \begin{itemize}[<+->] causes items to appear one-by-one. However, item 1 is visible starting from the first slide itself. Is there a way to insert a pause before the first item too?  of course I can manually type  \item<2-> first \item<3-> second ...   but is there a shortcut way to specify this?


I need to split words by space separated in java, so I have used .split function in-order to achieve that like as shown below   String keyword = "apple mango "; String keywords [] = keyword .split(" ");   The above code is working fine but the only is that I sometimes my keyword will contain keyword like "jack fruit" , "ice cream" with double quotes like as shown below  String keyword = "apple mango \"jack fruit\" \"ice cream\"";   In this case I need to get 4 words like apple, mango, jack fruit, ice cream in keywords array  Can anyone please tell me some solution for this


How to encode and decode characters in the right way

I'm working on a web site in which the encoding used is UTF-8. The server side is developed with Java and the database uses Windows-1252 encoding.  How do I encode the characters correctly so they can be displayed correctly both in the database viewer and on the client side?  EDIT  Here is the code:  Class.forName("com.pervasive.jdbc.v2.Driver");  Connection conn = DriverManager.getConnection("jdbc:pervasive://XXX.XXX.XXX.XXX/TEST","xxxx", "xxxxx");  Statement stmt = conn.createStatement();  String sql = "INSERT INTO MyTest (COL1, COL2) VALUES (99999, 'Ó 456789 ñÑ; ° - + ( _ . - / \\ & <' )"; stmt.executeUpdate(sql);   The database viewer shows: ? 456789 ??; ? - + ( _ . - / \\ & < instead of Ó 456789 ñÑ; ° - + ( _ . - / \\ & <   The String ? 456789 ??; ? - + ( _ . - / \\ & < is retrieved when SELECT is excecuted


I've always had this question about the pronunciation of Sean.  Is Sean a word from another language? Is it actually not pronounced Shawn and instead it's some sound between Shawn and Seen? Also, why isn't it pronounced as Sawn instead of Shawn, when the word Sean doesn't even have the letter 'h' in it to get that -sh sound?  Bottom line is, why is Sean pronounced Shawn instead of Seen?


Implement some mechanism to avoid robo-approvers

Sorry if this has been asked before and has some ranting in it, but I'm beginning to feel fed off by robo-approvers.   This week happened at least ten times to me: I carefully reviewed an edit on a long or contrived post and then decided to reject the edit for various reasons (usually "too minor" or "invalid edit"). When I clicked on the "reject" button the dreaded red box appeared, telling me that the edit had already been approved! The annoying thing is that, while we may have different thresholds for what is "too minor", blatantly invalid edits passing reviews are really a bad thing (did you ever see an edit with a "fixed gramar" comment and lots of unresolved spelling and grammar errors – even in the edited parts – being approved!?!).  The problem for SO is evident, but the problem for me as a reviewer is that I wasted at least 5 minutes on a review checking for wrong changes, missed editing opportunities (i.e. the editor didn't correct all spelling mistakes, etc.) coherence in overall formatting, etc. Multiply by ten and this week I wasted almost an hour for absolutely nothing, so I find it ever less rewarding to do exhaustive, high quality, reviews.   Moreover this is slowly turning me into a robo-rejecter: if I spot even the slightest hint of a problem in an edit, I feel the urge to click on reject for fear that some robo-approver enters into play. And this, again, is bad for SO because I risk of rejecting an edit which could have been good if examined in detail, or could have been easily improved. Net result: me doing a bad thing and the editor wasting his effort – quality editing loses, robo-approvers and lousy editors win!  The easy solution for my personal case is clear: stop doing reviews and let the robo-approvers lead the field. Of course the problem is for SO overall quality: robo-approved edits means more user gaining rep by only doing bad edits, and these users will probably become robo-approvers as well when they gain the privilege: even if in good faith, they never learned how to judge whether an edit is good, so they will likely be approving the same things they were allowed to do in their past.   I think some sort of short-term locking should be implemented. For example remove from the review queue a post that's being reviewed. If the reviewer doesn't make a call in reasonable time (10 minutes?), put the post on the queue again. Of course this would slow down the reviewing process, but this doesn't appear to be a problem, except for the close vote queue. Another mechanism could be to disable all buttons (except "skip") – or only the "approve" button – until some time has passed, and the time should be proportional to both the post length and the amount of changes (how can we trust a reviewer pressing "approve" after only a couple of seconds when he is faced with a 100 line post which has been heavily edited?!?).  Mine is not a clear-cut proposal, so I didn't tag it as a feature request. Devs or long term users know better what mechanisms could/should be implemented.   My point is that if there are many reviewers sharing my feeling on this, then some mechanism should be implemented!


Android : Can't access developer option after enable the developer mode

I tried to open developer option but when i tap the menu it said Turn on developer options first so i try to enable developer mode again by taping build number but is reply No need, developer mode has already been enable I tried to access it by searching option in setting but when i tap any setting it would tell me to enable developer option first.   My device is Galaxy A7 (2017) Model number SM-A720F/DS Android 8.0.0


I'm trying to recover my account. I still have the phone number associated with my account. However, when it texts me Gmail recovery code to that number, it still won't let me in... it makes no sense.


An integration question to be solved without using differentiation under the integral sign.

$$I(\alpha)=\int_0^1 \frac{x^\alpha-1}{\ln x}dx.$$  As the title says, if someone could solve this without using the differentiation under the integral sign technique, I would be very grateful.


How to have a keymap work in object mode and edit mode?

I've created an operator that uses a keymap to activate it.  While it works in object mode, it is not being called in edit mode.  Is there a way to get this to run in edit mode too? import bpy   class GridRescale(bpy.types.Operator):     """Change grid scale"""     bl_idname = "kitfox.grid_rescale"     bl_label = "Grid Rescale"     bl_options = {'REGISTER'}      def invoke(self, context, event):         scale = bpy.context.space_data.overlay.grid_scale                  if event.type == "LEFT_ARROW":             scale /= 2         elif  event.type == "RIGHT_ARROW":             scale *= 2                  bpy.context.space_data.overlay.grid_scale = scale         self.report({'INFO'}, "Grid scale: %f" % (scale))         return {'FINISHED'}   # store keymaps here to access after registration addon_keymaps = []   def register():     bpy.utils.register_class(GridRescale)      # handle the keymap     wm = bpy.context.window_manager     km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')      kmi = km.keymap_items.new(GridRescale.bl_idname, 'LEFT_ARROW', 'PRESS', ctrl=True, shift=False)     kmi = km.keymap_items.new(GridRescale.bl_idname, 'RIGHT_ARROW', 'PRESS', ctrl=True, shift=False)      addon_keymaps.append(km)            def unregister():     bpy.utils.unregister_class(GridRescale)      # handle the keymap     wm = bpy.context.window_manager     for km in addon_keymaps:         wm.keyconfigs.addon.keymaps.remove(km)     # clear the list     del addon_keymaps[:]   if __name__ == "__main__":     register()


Is it more correct to say that the square root of 25 is equal to 5 OR -5?

If you were to ask me what the square root of 25 is, I would quickly say 5. But is that the correct answer?  Or is the true answer actually 5 OR -5?  In other words, does the square root of a real, positive number ALWAYS have two solutions?


Can I delete files created by others in a directory I own?

I created a directory somewhere with permissions rwxrwxr-x so that other users in my group can create files and directories in it.  I do need to be able to delete the contents in this "public" directory, but it seems that while I am able to remove any files in this directory I cannot remove and subdirectories under it.   Is there a way to remove such subdirectories owned by others under a directory owned by me?


I have a script that copy files to another server. I don't want to overwrite any files so I have to use rsync.  I can use rsync without any problem when I run at command line. But when I use it in script, rsync does not work. It gives an error and I even could not find that error at Google.  Here is error:  rsync: Failed to exec ssh: Not a directory (20) rsync error: error in IPC code (code 14) at pipe.c(84) [sender=3.0.9] rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in IPC code (code 14) at io.c(605) [sender=3.0.9]   I would like to point that error is not No such file or directory(2)  Error is: Not a directory(20)  Here is script:  #!/bin/bash PATH=$1 FILE=$2 DAY=$(/usr/bin/date +'%Y-%m-%d') /usr/bin/rsync -avh $PATH postgres@REMOTE_IP:/Backup/xlog_backup/$DAY/.   I am using like this  sh ~postgres/archive.sh /srv/postgresql/data/pg_xlog/000000010000003E00000025 000000010000003E00000025   Here is ls output:  postgres@MY_SERVER:~$ls -l /srv/postgresql/data/pg_xlog/000000010000003E00000025 -rw-------. 1 postgres postgres 16777216 May 25 10:41 /srv/postgresql/data/pg_xlog/000000010000003E00000025      Server: CentOS Linux release 7.2.1511 (Core)      Rsync: rsync  version 3.0.9  protocol version 30      postgres@MY_SERVER:~$rpm -qa | grep openssh      openssh-clients-6.6.1p1-22.el7.x86_64      openssh-server-6.6.1p1-22.el7.x86_64       openssh-6.6.1p1-22.el7.x86_64      rsync-3.0.9-17.el7.x86_64   Could you help me to solve the problem?


I am practicing Pointer Arithmetic but printf statement has a confusing response. My understandin says first 101 should be printed and then increment should occur. But here the problem goes... #include <stdio.h>  int main() { int a[] = {101, 276, 345}; int *ptr = a; printf ("%d\n%d\n", *ptr, *(++ptr) ); return 0; }  It produces the following output 276 276  But, when I change the code to following #include <stdio.h>  int main() { int a[] = {101, 276, 345}; int *ptr = a; printf ("%d\n", *ptr); return 0; }  Result is following 101


I am currently reading  paper and following is the model used in it. I haven't been able to completely understand what is the purpose of using three tanh layers. I read the usage of tanh activation function, how it can reduce learning time compared to sigmoid activation function but I don't understand why three tanh layers are needed.     To explain what it is trying to do is take two sentences, add embdedding of each word in the sentence to create two 100d vector, concatenate these two vectors to form a 200d vector and input it to the stack of tanh layer followed by a 3-way softmax since there are classes to classify into.


Optimal way to increase heavy armor skill?

I'm trying to fast track my heavy armor skill, mostly so I can get the Conditioning perk (since my armor takes up such a ridiculous portion of my overall carrying capacity).  So far, I've only found two ways to increase my heavy armor skill: paying for training (which gets pretty expensive!), or actually getting hit by enemies.  The problem with the first option is that it will quickly bankrupt me, the problem with the second option is that it tends to kill me.  Has anyone found a good way to "farm" up your heavy armor skill?


"Add/show 1 other comment" bug strikes again

So I've been experiencing this in the last few days: sometimes when someone replies to my comment, and I reply to the reply, then the "add/show 1 more comment" link appears immediately after I post my comment. However, when I click it, it disappears and nothing is shown.  I don't think it's that OP is posting two comments of which he deletes the second one, because this has happened to me several times, even when I was replying within 2-3 seconds.  I do, however, believe that this is more or less the same bug as , except that I don't have to reload the page in order the link to be gone, and I also seem to be getting the erroneous behavior only if I reply to a comment which is itself a reply to an earlier comment of mine.  Unfortunately, I wasn't careful enough to take a screenshot last time this happened, but here's what I am talking about for those who like visual demonstration better:


Blender adding double forward slash (`//`) to image file paths on Mac

TL;DR: Blender seems to be prepending spurious // before filepaths when loading images from script.  Steps to reproduce: Save the following minimal script in a filename of your choice (e.g. blender_test.py)  import bpy D = bpy.data D.images.load('/Users/path/to/image.jpg')  # A JPG image in a different folder. You'll need to change this. D.images[0].use_fake_user = True bpy.ops.wm.save_as_mainfile(filepath="./fromscript.blend")   Execute using:  blender -b -P blender_test.py   Now open fromscript.blend in blender GUI, fire up the Python console and  print the path of the just-loaded image.   print(D.images[0].filepath)   I see the following in my console (part of the path has been redacted). Notice the two forward slashes in the path. When I load the image from the Python Console in the GUI, or using the dislog box, those slashes are not there. These two forward slashes are preventing my downstream commands (e.g. textured material creation) from seeing the loaded images. Why are there additional slashes when blender is executed as a script?    EDIT If I understand correctly,  is asking a different question, about linking images from a different machine using relative paths. My question asks about blender prepending slashes to an absolute path.


After upgrading to Windows 8, hard disk sporadically does not work; what's wrong?

I dont know whether I can ask this question here or not. Please consider this if it not a proper place.  Here is my problem, I was using Windows XP previously and I changed it with Windows 8. After installation of Windows 8 when I booted it up, I found my HDD behavior changed. Sometimes it is running and sometimes it is not.  My system specification is :  Intel Motherboard (945 Express Chipset) Processor (Core 2 duo) RAM (2 GB) HDD(500 GB)   When I open my HDD for getting the cause of problem (I open that casing and check head  and disk). I did not find any hardware visible problem. Just it is stop rotating, before it can boot OS.  Can someone help me to fix this problem or recover data in this case.  NOTE : Warranty period expired, and I have my 5 projects in that and some important documents.


Is there anything beyond subtle hints that Jack becomes the Face of Boe?

After Jack Harkness was brought back to life by Bad Wolf Rose, he is unable to die, not even from old age.  At the end of Last of the Time Lords, the Doctor comments on the fact that he doesn't know how Jack will look when he gets older.  Jack mentioned that he was once nicknamed the Face of Boe and from there looking back there are subtle hints which prove he is the Face of Boe:   Since the Doctor meets the Face of Boe further in the future, the Face of Boe, having been Jack, knew about Yana being the Master. The Face of Boe has the distinction of being the oldest being in the universe, which fits with the side-effects of Jack's Immortality. In Gridlock, the Face of Boe welcomed death. I remember Jack indicating at one point he was growing tired of not dying after having watched human history from 1869 after escaping Satellite 5.   However, with that said, the Face of Boe died, even though Jack can't die. However, not even the Doctor knew whether Jack could die of old age, so I am wondering: is there anything more concrete on whether Jack does become the Face of Boe?


How to jump to a hyperlink and back to original section in pdf or html documents

Consider the example below. Using \hyperref[hello]{go to hello} I can jump to last page but I cant find the way to hyperlink back to where I was (before i clicked) unless I scrolled back manually. My question is: Is there a way to jump to a hyperlink and jump back to the text in latex? Footnote seems to have that functionality by creating a little blue arrow next to the footnote. Is there anything similar for hyperlinks?  \documentclass{article} \usepackage(hyperref) \begin{document}   \SweaveOpts{concordance=TRUE}  \hyperref[hello]{go to hello} \newpage  bla bla  \newpage bla again   \newpage hi \label(hello)  \end{document}


USB wifi adapter is not recognized in Linux ubuntu 20.04.1 LTS

I have a USB wifi adapter and I don't seem to make it work. it working before (2 months ago) but now it's not. running lsusb returns the driver: Bus 001 Device 009: ID 0bda:b812 Realtek Semiconductor Corp. USB3.0 802.11ac 1200M Adapter I'm not sure if the adapter is broken or I need a new driver and I looked on the internet and couldn't find and suitable driver for it. Any help is much appreciated. I have already tried the solution  but didn't work. I think it's for some old drivers


"There Is"/"There are" depends on plurality of the first list element or not?

It seems I put a   Bounty assigned by outside party, two lengthy, reference-citing answers, one "-1" (awarded the bounty), one "-2", two others scored "0" and "-2" respectively, the answers suggesting one or the other is correct, 73 comments and no consensus so far - and me, as the asker, lost without a clue what to think of the answers anymore -  this is no longer "Learners' Level" question, so I thought I'd bring it here and hear what the experts have to say.    Original question:  Plurality of verb depending on plurality of list elements  An edit was suggested to my sentence.     There was were an orange, some grapes, two apples and a small pile of cherries on the plate.   In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering:     There were some grapes, an orange, two apples and a small pile of cherries on the plate.   But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that - was my editor overzealous or am I trying to copy rules of my language that don't apply in English?    Someone linked a  for negatives, where the situation is more clear-cut ("There is no..."). Same applies to connection with "or" apparently, per accepted answer there. Still, nothing for "and".  It seems there is a consensus that in that if the verb goes after the list, it will be plural.     an orange, some grapes, two apples and a small pile of cherries were on the plate.   There doesn't seem to be clear consensus for:     On the plate { was | were } an orange, some grapes, two apples and a small pile of cherries   Adding more to the confusion is the abbreviated form: "There's"     One last note. In North America, at least, there is a widespread use of using a singular form like "there is" and "there was", without regard for the subject item or items, and this "there is" is often shortened to "there's":           There's three apples on the table!      Could you please clarify this mess?


Substitute up until first - ("dash") with regex

Given the following string:  Test <- c("123 - Test1", "1234 - Test2", "123 - 45 - Test3")   When I use gsub as below with very basic regex  gsub(".*- ", "", Test)   I get the following output:  "Test1" "Test2" "Test3"   How can I change my regex to only substitute up until the first - to get the following result:  "Test1" "Test2" "45 - Test3"   I know regex is 'greedy' so I am looking for a way to overcome this greediness.


Use the unique factorization for integers theorem and the definition of logarithm to prove that $\log_3 (7)$ is irrational.

Use the unique factorization for integers theorem and the definition of logarithms to prove that $\log_3 (7)$ is irrational.     I am taking a beginners fundamental mathematics module, no advanced stuff please. Thanks!   My attempt.  Suppose for a contradiction that it is rational, that is $\log_3(7)=\frac{a}{b}$ for some $a,b\in R$ where $b\neq0$. Therefore, by the definition of logarithms, $7=3^{\frac{a}{b}}$. By the theorem of unique factorization, $7=1*7$ is unique.  Ok I'm plain stuck! Any help please?


I am trying to simple update query with following syntax:  UPDATE cl SET cl_s="active_" WHERE id in (                 SELECT distinct                      c.id                  from                     cl          c,                     ac          a,                     cl_ac       ac                 where                     c.id=ac.cl_id                     and                     a.id=ac.ac_id                     and                      c.cl_s="someval"                     and                      a.ac_no !=""             ) ;   The error I get is: Error Code: 1093. You can't specify target table for update in FROM clause  I've read through posts which mention that MySQL is unable to run query like this. I'd want to know a seamless way to restructure such queries to a structure which works. The solution seems to be using joins instead but I can't seem to grasp the concept.  A pseudo code would be helpful, to help with the understanding. Something like   (Main query) where var in (subquery generating var list)   to   (main query) inner join (subquery generating var list) on var ???


What is the best way to add and remove classes, clicking a button back and forth?      $('button.hamburger').on('click', function(){       $(this).addClass('is-active');     });      $('button.is-active').on('click', function(){       $('button.is-active').removeClass('is-active');     });   It doesn't remove .is-active class.  Do I need if statments to check whether the the element .hasClass()?


c# List - it's converting the first index ALWAYS to 50? and the second to 51 etc

I am trying to take a string of digits, and add them to a list (so i can then multiply them together) public static int METHOD(long n)        //25        {            String holder = n.ToString();                 List<int> numbers = new List<int>();          for (int i = 0; i<=holder.Length-1; i++)         {             numbers.Add(Convert.ToInt32(holder[i]));         }         for (int i = 0; i <= numbers.Count - 1; i++)         {             Console.WriteLine("List Position " + [i] + " is: " + numbers[i]);         }  and you'll get "Number is 50" "Number is 53" why does it convert 2 to 50? & 5 to 53?


AJAX: is it possible to return a custom error message from server side when the function call fails/errors?

I have an ajax call to a vb function. The vb function fails because the dataTable the query alludes to TABLE_ONE does not exist in the database. I want the error message from the catch in vb to be returned to the 'error' of the ajax so that I can display that error to the user. The reason being that the error message in VB states precisely that the table does not exist in the database, whereas the error that is actually displayed to the user from here error: function (a, b, c) {             alert("Ajax call to multiAjax failed: " + a);         }  does not tell the user the error is due to a table that doesn't exist. The ajax error message is useless. How can I display the error message from the vb catch to the user? Thanks ajax: function multiAjax(funcName, queryName, onSuccess) {     var result = null;     $.ajax({         type: "POST",         url: "WebService1.asmx/" + funcName,         contentType: "application/json; charset=utf-8",         dataType: "json",         success: function (Response) {             onSuccess(Response)         },         data: JSON.stringify({ "queryName": queryName }),         error: function (a, b, c) {             alert("Ajax call to multiAjax failed: " + a);         }     }); }  VB <WebMethod(EnableSession:=True)>     Public Function getQueryNo()         Try             Dim queryNumberSql As String             Dim queryNo As Integer              Using dr As New DataReader(dif)                 queryNumberSql =                 "SELECT min(unused) AS unused             FROM (                  SELECT MIN(t1.QUERY_NUMBER)+1 as unused                  FROM TABLE_ONE AS t1                  WHERE NOT EXISTS (SELECT * FROM TABLE_ONE AS t2 WHERE t2.QUERY_NUMBER = t1.QUERY_NUMBER+1)                  UNION                  -- Special case for missing the first row                  SELECT 1                  FROM TABLE_ONE AS t1                  WHERE NOT EXISTS (SELECT * FROM TABLE_ONE WHERE QUERY_NUMBER = 1)             ) AS subquery"                  dr.ExecuteReader(queryNumberSql)                 While dr.Read()                     queryNo = Integer.Parse(dr("unused"))                 End While                  Return queryNo             End Using         Catch ex As Exception             Console.WriteLine($"Error trying to set query number: {ex}")             Return ex         End Try     End Function


What application has this icon in taskbar of Windows-10? [left hand pressing a key]

I'm not a windows user for years, but some my relatives are.  I've been just pinged by them and asked to explain the new icon shown on their taskbar (because "you are a computer guy", you know)...   The icon:  The window:    My investigation resulted in:   It's in taskbar, not in notifications (i.e. closer to left). It disappears after reboot. It displays a small blank white window if clicked on. It looks like it does nothing.   My googling failed.   Can anybody tell me what is this? How to get rid of it?   Yep, that are crops from sorta screenshots taken with a phone sent via WhatsApp... Yep, that PC is running standard builtin windows antiviral tool... Yep, it's a mere desktop PC, not a notebook, with normal non-touchscreen display. And yes, this PC is not local to me and is operated by a non-tech person.


Are there any rules relevant to involuntary movement and effects other than Opportunity Attacks?

PHB p. 195 states that involuntary movement does not provoke :     You also don't provoke an opportunity attack when you teleport or when someone or something moves you without using your movement, action, or reaction.   Is there a general rule somewhere about involuntary movement and how it interacts with other effects?  The question arose at our table about what happens if a creature is dragged via the Thorn Whip spell across an area of Spike Growth.  Does the involuntarily moving creature take the damage from the spikes as if he'd voluntarily moved through them?    Logically, yes, if you're being dragged through spikes, you take damage from them as if you'd walked through them. But logically, if I drag you past my ally, my ally would be able to make an Opportunity Attack, likely more easily than if you were moving under your own power.  Presumably that is not allowed for balance reasons rather than versimilitude reasons, so I wonder if the same should apply to other effects?


JavaScript: parseInt's radix mystery with Array.map

When I execute the following statements:  var string = "1 1 1 1 1 1 0 1 1" console.log(string) var strings = string.split(" ") console.log(strings) var numbers1 = strings.map(parseInt) console.log(numbers1) var numbers2 = strings.map(function(i){ return parseInt(i, 10) }) console.log(numbers2)   I get the following output in the console:  1 1 1 1 1 1 0 1 1 ["1", "1", "1", "1", "1", "1", "0", "1", "1"] [1, NaN, 1, 1, 1, 1, 0, 1, 1] [1, 1, 1, 1, 1, 1, 0, 1, 1]   I wonder why the second element in numbers1 is NaN. Why does it work on all the other elements except this one?


Photoshop: Cut text from underlying image to expose transparent background

I'll start by saying I'm an enthusiast and amateur Photoshop User, and any help is much appreciated.   I have a simple PSD file containing 2 layers, an image and a font overlay. The underlying background is transparent. What I'm looking to do is place the font over the image, but remove it in a way that the font is "cut out" of the image with the transparent background visible.


Need regex to replace entire folderpath while preserving file name where last folder could by anything

I need a regex that would replace something like this but leave the file name.  /folder1/folder2/folder3/anything/somefile.html  Also could someone show me how to implement this with replace method? Replacing the entire path match to empty string and again leaving the file and which would be anything.  Thanks in advance.


What is the origin of the Rebellion symbol?

In Star Wars, this design is the symbol of the Rebellion:  In Rebels, Sabine Wren has a signature Rebellion design she leaves graffitied.  It looks like a phoenix, as a tribute to her Phoenix Squadron.  Is this design the origin of the Rebellion symbol?  Or does it come from another source entirely?


When I run bibtex, I can extract the LaTeX code from the bbl file. Then, I can combine that directly into my LaTeX file so that the copyeditors, for instance, don't need to know anything about how I created my bibliography.  I'd like to do the same think with BibLaTeX, i.e., grab the LaTeX code that it produces and include that in my LaTeX file. Where is that code or how can I produce it?


Lets say i have an app I've recently downloaded and have made an in-app purchase on this app, if i were to uninstall this app and reinstall later on will my in-app purchase still be available? ( also same situation if i where to reboot my device)


Differential Equation with power over derivative

I am solving this $$u^{''}+u+\epsilon u^3=0$$ where $ u(0) =1$ and $u^{'}(0)=0$ I tried this $$u''u'+uu'+\epsilon u'u^3=0$$ $$\frac{d(u')^2}{2}+\frac{d(u)^2}{2}+\epsilon\frac{d(u)^4}{4}=0$$ Integrating both side $$\frac{(u')^2}{2}+\frac{u^2}{2}+\epsilon\frac{u^4}{4}=c$$ where c is some constant. but I do not have idea how to solve with power over derivative. Please help me to solve this.


Why isn't there an article in "if you're not family"?

[Fred] “Merry Christmans!”   [George] "Hey, look –– Harry's got   a Weasley sweater, too!"     Fred and George were wearing blue   sweaters, one with a large yellow F on it, the other a G.     "Harry's   is better than ours, though," said Fred, holding up Harry's sweater.   "She [my mother] obviously makes more of an effort if you're not   family."  (Harry Potter and the Sorcerer's Stone)   Why isn’t there any article before family?


Is there a proof that any number of the form $a_1.a_2\overline{a_3}$ where we are contatenating them and they are all finite sequences of digits is rational?  Regards.


Solve $\lim_{x\to 0} \frac{\sin x-x}{x^3}$

I'm trying to solve this limit     $$\lim_{x\to 0} \frac{\sin x-x}{x^3}$$   Solving using L'hopital rule, we have:  $$\lim_{x\to 0} \frac{\sin x-x}{x^3}= \lim_{x\to 0} \frac{\cos x-1}{3x^2}=\lim_{x\to 0} \frac{-\sin x}{6x}=\lim_{x\to 0} \frac{-\cos x}{6}=-\frac{1}{6}.$$  Am I right?  I'm trying to solve this using change of variables, I need help.  Thanks  EDIT  I didn't understand the answer and the commentaries, I'm looking for an answer using change of variables.


I want to delete a tables row using Scanner from Java

I have connected my DB with eclipse and i want to give the administrator the permission to delete a member putting the members id from Scanner from a table that I have created public void processDelete() {           try {                 String url = "jdbc:mysql://localhost:3306/labdb";                 String user = "****";                 String password = "***";                                  Connection myConn = null;                 myStmt = null;                 ResultSet myRs = null;                 Scanner keyboard=new Scanner(System.in);                                  System.out.println("Enter the id you want to delete");                 int id=keyboard.nextInt();                                   int rowsAffect=myStmt.executeUpdate(                             "delete from members " +                             "where member_id='"+id+"' ");             } catch (Exception exc) {                 exc.printStackTrace();             }  and i get this error java.lang.NullPointerException     at DeleteMembers.processDelete(DeleteMembers.java:24)     at main.main(main.java:67)


Color of a tabular cell determined by cell content

I am using the colortbl package to color the cells of a table. I want to be able to color a cell depending on the value in the cell. In my specific case, I'd like to enter a number between 30 & 90 and color the cell in a shade of gray. I used the fp package to create a command that displays the value of the argument in a colored cell as shown in the MWE below.  \documentclass{article} \usepackage{colortbl} \usepackage{fp}  \newcommand{\colorcell}[1]{% \FPeval{grayshade}{1.171-0.00857*#1}% \cellcolor[gray]{\grayshade}#1}  \begin{document}  \begin{tabular}{ccc} \cellcolor[gray]{.4}85 & \cellcolor[gray]{.8}85\\ \colorcell{73} & 0 \end{tabular} \end{document}   However, this gives me an error that \grayshade is an undefined control sequence. I can rewrite the code to know that \grayshade is defined; it seems that colortbl isn't liking it for some reason.  How can I fix my code to make this work?  A solution probably exists using things like pgf/Tikz, and I am open to these, but I'd also like to see how this should work.


From my research, I seem to notice that all package managers insist on being used as a privileged user and must be installed into /.  Typically, what I like to do is create a throwaway account, compile some software, and install to $HOME for that account. I can try a variety of setups and then when I'm done, just destroy the account.  However, compiling software becomes tedious.  My experience is really just limited to yum, but I don't understand why I wouldn't be able to drop a repo file into ~/etc/yum.repos.d and have yum install everything into a home account.  Is there any reason why package managers must be used as a privleged user to install software?


There are lots of ways to make comment in LaTex such as single percentage sign, \begin{comment} and so on, but as I know none of them use for creating comment for separating lines of a doc. It's good to know there is a way  to make a group comment in LaTex.   ie:  we have text and command here and want to be comment(group1) . . . we have text and command here and want not to be comment(group2) . . . we have text and command here and want to be comment(group1) . . . we have text and command here and want not to be comment(group2)   and other groups, now we want to comment one group and see result and then comment other group and uncomment first group and so on. for a bit challenging imagine that this groups of comment are  distribute in multiple file (not all file but a part of it like one line in chapter 1, two lines in chapter 2, three lines in chapter 8 and ...).  any help would be appreciated.


Is there a way to trap an error/warning in LaTeX during compile time? I'm thinking of something similar to the VB script On Error Goto <blah>, but this time for LaTeX in something like \OnErrorExecute{<command>} and \OnWarningExecute{<command>}.  Sadly enough there are no standard error/warning-codes provided (AFAIK), since packages report warnings/error via the commands  \PackageError{<message>} \PackageWarning{<message>}   By codes I mean, as an example,   Warning 1: Underfull \hbox...; Warning 2: Overfull \hbox...; ... Error 1: No \begin{document}; Error 2: Perhaps a missing \item...; Error 3: File ended while scanning..., etc.   since one would ideally want to condition on the type of error/warning that is produced. Understandably a new error/warning reporting mechanism would be required, since package authors are allowed to issue warnings/errors as they please. So, there warnings/errors could be made package-specific with some number prefix (say amsmath.warning.1 for warning 1 using the amsmath package).  If not in this version (probably), what about LaTeX3 (hopefully)?


"How big of a problem" vs. "how big a problem"

Quite a few phrases in English are constructed like so:     How [adjective] a [noun]...?   This is the question form of the construction, which is often answered with the negative:     Not that [adjective] a [noun].   or the positive:     Quite [adjective] a [noun].   However, from time to time I'll hear the word 'of' inserted before the 'a', e.g.:     Not that [adjective] of a [noun].   This usually sounds wrong to me, with the exception of the case where the adjective 'much' is used.  So, this sounds fine to my ear:     Not that much of a problem.   whereas this doesn't:     Not that loud of a noise.   Why is it that 'much' should be used with 'of', and other adjectives not?  Is it because 'much' is seen as measuring a quantity (of something), whereas other adjectives that may be used in this construction are seen as measuring the quality of a whole thing?


Placing Unicode character in CSS content value

I have a problem. I have found the HTML code for the downwards arrow, &darr; (↓)  Cool. Now I need to use it in CSS like so:  nav a:hover {content:"&darr";}   That obviously won't work since &darr; is an HTML symbol. There seems to be less info about these "escaped unicode" symbols that are used in css. There are other symbols like \2020 that I found but no arrows. What are the arrow codes?


There is the next characterization for valuation domains:  Let $D$ be an integral domain and $K$ its field of fractions. The following are equivalent:   For every nonzero $x$ in $K$, either $x$ in $D$ or $x^{−1}$ in $D$. The ideals of $D$ are totally ordered by inclusion. The principal ideals of $D$ are totally ordered by inclusion (i.e., the elements in D are totally ordered by divisibility.) There is a totally ordered abelian group $Γ$ (called the value group) and a surjective group homomorphism (called the valuation) $v :$ $K^×$ $→ Γ$ with $D = \{ x ∈$ $K^×$ | $v(x)$ ≥ $0 \}$ $∪$ {0}.   The equivalence between 1, 2 and 3 are clear, and I understand that the fourth can be found in Krull's article (1936), but I don't speak german and I can't find a proof anywhere. Any link or hint will be much appreciated.


Example: I have some pictures with size about 3 MB, and want them to have a size about 1020 KB. I don't know is there some option on Ubuntu or I do that with some editor, so can you help me?   My current way is to cut them, but that is not very useful. :(  Maybe this is not a question for this site, but I don't know where to ask.


Application of Poisson summation formula

I am currently self reading " Spectral theory of Riemann zeta function" by Yoichi Motohashi. The example is in first chapter and of poincare series. I want to know how the Poisson sum formula on the last sum led to the final equation. I dont need any exact answer. Any help/hint would be appreciated. Edit 1:  This question I asked earlier today related to this topic.


I noticed Python comes with built-in methods such as .upper() or lower() and these two are part of the string object.  "a string".upper() "A STRING".lower()   What confuses me is that some functions are not called on an object, for example the function type  type("a string")   So in this case, is "type" considered a method or just a stand-alone function which is built into the language?


Multiple workspaces on Ubuntu 18.04.1 LTS and later with GNOME Shell

Any idea how to have more than 2 workspaces on Ubuntu 18.04.1?


I am creating a basic text area in HTML5 and I am allowing users to format the text via buttons and drop down menus. Right now my buttons format all the text in the text box, but what I really want to do is format selected parts of the text by allowing the user to highlight the text and then use the buttons.   So far some of my functions are:  function Bold() { var target = document.getElementById("Text");     if(target.style.fontWeight == "normal")     {     target.style.fontWeight = "bolder";     }     else     {     target.style.fontWeight = "normal";     } } function Italic() { var target = document.getElementById("Text");     if(target.style.fontStyle != "italic")     {     target.style.fontStyle = "italic";     }     else     {     target.style.fontStyle = "normal";     } }   My text area code:  <textarea id="Text" rows="4" cols="50">Type here</textarea>  As you can see the text area has an ID called "Text". I am guessing that I want to create another function that returns highlighted text and then replace the getElementById with that fuinction call however I do not know the systax or method for doing this.  Any help would be greatly appreciated.


Given that space is not a perfect vacuum, what is the speed of sound therein? Google was not very helpful in this regard, as the only answer I found was $300\,{\rm km}\,{\rm s}^{-1}$, from , which is not a source I'd be willing to cite.


I have a small business client who has a few windows servers and many workstations but as far as I can tell only has a few valid oem licences (some mismatched like xp home when xp pro is installed) for the workstations and almost no valid licences for the servers (It came with 2000 and now has 2003). They're partially interested in going legit and becoming properly licensed but fear its going to be a large cost. Interestingly enough they also fear that they'll get hammered on not being licensed so far and would rather keep under the radar.  I can't say this is the first time I've come across this, someone gets a hold of a slipstreamed xp pro cd or an office install that includes the key and are happy when it just works.   I'm not interested in giving them a hard time or turning them in. As I said I see this in my small business clients all the time and it wouldn't behoove me to mess with their businesses. I'm just looking for a good path to get them back into legitimacy.  Anyone have experience with this?


Convert MP4, AVI, MOV file to a collection of PNG, JPG or GIF frames

Is there any FREE software that I can use to convert a MP4, AVI or MOV file to a collection of images that are GIF, JPG or PNG?


Why am I asked for a credit card number to download a free app?

I  want to download free app in my iPod touch device and i have the following doubts.  Kindly resolve me doubts.   when i try to download it asks my credit card security number. since i am trying to download free app , why do i need to provide my credit card security code? Will i be debited for downloading the free app from app store?   I cant able to find any information regarding this on apple.  Please provide me some references about this from apple and please resolve my doubts.  Thanks a lot.


I have a large group playing DnD. Some players are doing well with it, others not so much.    A "not so much" player is the Druid. he runs through encounters setting fire to everything, including the forest -- which seems to not be the style for a Druid.    I'm struggling creatively (writer's block as it were) to come up with a method of stripping the player's Druidic powers, and then working out some kind of challenge system that works in-line with Druid teachings for him to redeem himself and restore his powers.   What consequences are for a Druid not acting like a Druid?  What training (or remedial training) is required to be a Druid?  Where does a Druid's power come from and how can that link be severed?


When A and B are of different order given the $\det(AB)$,then calculate $\det(BA)$

Let 'A' be a $2 \times 3$ matrix where as B be a $3 \times 2$ matrix if $\det(AB) = 4$ the find value of the $\det(BA)$  My attempt: I took A =  $$         \begin{bmatrix}         2 & 0  &0\\         0 & 0  &2\\         \end{bmatrix} $$  B= $$         \begin{bmatrix}         1 & 0  \\         0 & 0  \\         0 & 1  \\         \end{bmatrix} $$  It satisfies given condition and I get $\det(BA)=0$   But I have not proved it  How do I prove that it is always zero (background)I am 12th grader and I know about adjoint,inverse,determinant,rank of a matrix and the other basics.  However I do NOT know about eigenvalues and eigenvectors.


href to an image label - how to jump to the image instead of the caption below the image?

I'm using the following command to embed images in my LaTeX document (which is then rendered as PDF)  \newcommand{\img}[4]{   \begin{figure}[!hbt]     \centering       \vspace{1ex}       \includegraphics[width=#2]{images/#1}       \caption[#4]{\label{img.#1} #3}     \vspace{1ex}   \end{figure} }   When creating a href to an image, the viewer jumps to the image caption instead of the top of the image. How do I change my \img command so it still puts the caption below the image but links to it jump to the image itself?


What is the difference between int* a = nullptr; and int *a = nullptr?

Around blogs and forums I noticed that people uses different ways to declare pointers in c++:  int* a = nullptr;   and  int *a = nullptr;   There's a difference between the two methods? If yes, what is?


"only once did she give way to emotions". Why is "did" used before "she", although it is not an interrogative statement?


NullPointerException when storing lines in an arraylist

I'm getting a NullPointerException in java (at this line :FileReader fstream = new FileReader(fileName)) when I try to read a text file line by line and store them in an arraylist with this code :   public ArrayList<String> StoreLineByLine(String fileName) throws IOException {     String str;      ArrayList<String> Line = new ArrayList<String>();     FileReader fstream = new FileReader(fileName);     BufferedReader myFileReader = new BufferedReader(fstream);      while ((str = myFileReader.readLine()) != null) {         Line.add(str);     }     myFileReader.close();     return Line; }   Could anyone help me understand the problem ? Thanks a lot !


How to install files with .sh extension in Ubuntu 16.04 LTS?

I have HP 32-bit laptop with ubuntu 16.04 lts OS. I want to install a software which comes with .sh (e.g. abcd.sh). Now I download this file in Download folder, and from terminal I go to this folder first  and ran:  $ cd Download $ ./abcd.sh bash: ./abcd.sh: Permission denied   Whats wrong with all those commands? How can I execute the file?


Cannot select hard drive during installation from bootable usb copy of UBUNTU

I have latest Ubuntu as of 5/6/2020. I have created bootable copy on usb stick to first try on Hewlett-Packard PACKARD desk computer.  Runs well!  Computer has qty 2 hard drives internal. Primary drive has Windows 7. I want to install UBUBTU on 2nd hard drive (500gb). I have 6gb ram and 6 processors, 64 bit .  How do I select 2nd drive?  altonddavisjr@yahoo.com is direct email.  When I selected to “”INSTALL””, the screens never gave me option to select correct hard drive.


Combinational interpretation of $\binom n 3 = \sum\limits_{i=2}^{n-1} (i-1)(n-i) $

What is the interpretation of this identity? I've tried picking elements one-by-one and grouping them, looking for geometric interpretations by drawing polygons and still no success.


I want to include an external .puml file and have the diagram generated.   My current approach does not work and I do not understand why.  Following I pasted what I think is relevant from my current approach. If you need to see more of my setup to provide an answer, please ask in a comment.  Works (contain puml content in tex file)  Excerpt of file-containing-puml.tex  ...  \begin{plantuml} @startuml  Class01 "1" *-- "many" Class02 : contains  Class03 o-- Class04 : aggregation  Class05 --> "1" Class06  @enduml \end{plantuml}  ...   Result:    Does not work (input external puml file)  Excerpt of file-referencing-puml.tex  ...  \begin{plantuml} \input{plantuml-file.puml} \end{plantuml}  ...   Full content of plantuml-file.puml  @startuml  Class01 "1" *-- "many" Class02 : contains  Class03 o-- Class04 : aggregation  Class05 --> "1" Class06  @enduml   Result:


In Doctor Who, if the entirety of the Doctor’s family was wiped out in the time war, what happened to Susan Foreman?

In "The Dalek Invasion of Earth" she leaves the First Doctor to live on Earth with David Campbell. Which would have meant that she escaped the Time War. In "Father’s Day", the Ninth Doctor states that his family was killed in the Time War and in "The Doctor’s Daughter", the Tenth Doctor reaffirms this. Clara claims that the Twelfth Doctor had once had children in "Listen". The new series points to the idea that the Doctor’s family died in the Time War. But with Susan settling on Earth, she wouldn’t have died in the War. She lived long enough to meet the Fifth Doctor in "The Five Doctors" and the Seventh Doctor in "Dimensions in Time".


I want to find  $$L=\lim_{n\rightarrow\infty}\sum_{r=1}^{n}\arctan\left(\frac{2r}{1-r^2+r^4}\right)$$ I already know that I need to split the expression $\frac{2r}{1-r^2+r^4}$ of the form $\frac{a_r+a_{r-1}}{1-a_ra_{r-1}}$ or $\frac{a_r-a_{r-1}}{1+a_ra_{r-1}}$ so that the main expression gives $$\lim_{n\rightarrow\infty}\sum_{r=1}^{n}\arctan\left(\frac{a_r-a_{r-1}}{1+a_ra_{r-1}}\right)=\lim_{n\rightarrow\infty}\sum_{r=1}^{n}(\arctan(a_r)-\arctan(a_{r-1}))=\arctan(a_\infty)-\arctan(a_0)$$ But I am not able to split up that thing. Any hints on how to start? Thanks in advance.


How to make a "minimal match" Regex search in C#?

Let's say I have a multi-line string like this:  STARTFRUIT banana ENDFRUIT  STARTFRUIT avocado ENDFRUIT  STARTVEGGIE rhubarb ENDVEGGIE  STARTFRUIT lime ENDFRUIT   I want to search for all fruit, no veggies. I try this:  MatchCollection myMatches = Regex.Matches(tbBlob.Text, "STARTFRUIT.*ENDFRUIT", RegexOptions.Singleline);  foreach (var myMatch in myMatches) {     Forms.MessageBox.Show(String.Format("Match: {0}", myMatch), "Match", Forms.MessageBoxButtons.OK, Forms.MessageBoxIcon.Information); }   The problem is, instead of returning me an array of three matches, it gives me a big match encompassing the first STARTFRUIT at the beginning and the last ENDFRUIT at the end. Is there a way to "minimalize" the match search? I don't see any help in RegexOptions.


How do I get my local ip address from a python script on linux?

I am trying to run a python server on a Raspberry Pi, and I need the local IP address of it to connect. I realize I can just type ifconfig and get my IP address, but I would really like to be able to get it from the python script. I have tried socket.gethostbyname(socket.getfqdn()), but that seems to only work on Windows. When I run it on my raspberry pi, it seems to always return 127.0.1.1. Does anyone know a command that will get the local IP address on linux?


Prove $\forall n\in\mathbb{N}$, $\exists m\in\mathbb{N}$ s.t. $m>n$ and $m$ is prime

There are two parts I am having trouble getting started.  A. Prove that $n_1, n_2,...,n_k\in\mathbb{N}$ are each at least $2$ then $n=n_1n_2...n_k+1$ is not divisible by any numbers $n_1, n_2,...,n_k$.   B. Prove that the truth of the negation leads to a contradiction. (Use theorem: For all $a,b\in\mathbb{N}$ there exist a unique quotient $q$ and remainder $r$ in $\mathbb{Z^+}$ such that we have both $a=qb+r$ and $0\leq r<q$.)  For part A, I started with, given $k\in\mathbb{N}$ and $n_1, n_2,...,n_k\geq1$, I'll show that $\forall i$, $n_i \nmid n=n_1n_2...n_k+1$ to set it up, but I'm not sure how to actually go about starting it.  For part B, I know that the negation is $\exists n\in\mathbb{N}$ s.t. $\forall m\in\mathbb{N}$ either $m\leq n$ or $m$ is not prime, but again I'm not sure what I should do to start the proof or exactly how to incorporate that theorem.


How do I fix DNS resolving which doesn't work after upgrading to Ubuntu 13.10 (Saucy)

After upgrade to 13.10 my DNS resolving fails. It seems the DNS servers which I get by DHCP (LAN) are not used.  I could temporary solve the problem by adding nameserver 8.8.8.8 to /etc/resolv.conf. But then the intranet hosts still can not be resolved.  When clicking on the Connection Information menu item on the network indicator, the Primary DNS and the Secondary DNS are set correctly. But my computer seams not to use them.  So my questions:   What should I put into resolv.conf, if anything? How to find out, which name servers my computer is querying? Where to look next, to find out, why name servers received by DHCP are not used?


How do you use the PricebookEntryHistory in the Apex Test Class? I have a batch job that reads off the PricebookEntryHistory object to check if a field value has changed, and I'm trying to figure out how to cover that line of code in the Apex Test Class Coverage but everytime I query the PricebookEntryHistory in Apex Test Class, its always returning null in Apex test Class. Any advice?


How do I install/uninstall software when I am not the administrator?

I bought a laptop from a guy who has reprogrammed it and is still the device administrator, which means I can not install or uninstall any software or programs and I have no control over my device.


my question about Ubuntu Server 19.04 is that my root isn't activating.  I did anything I could find.  Problem is when I want to login on my Server with Root it pops-up "Access denied".  Also when I want to transfer files from my PC to Server it says access denied.  Can someone just help me by typing commands that I need to insert to enable Root, set-up password for it and make it just activated and work.


why this error 'Access Denied Unable to write to /usr/local/MATLAB/R2017a/.'

I am trying to install matlab in Ubuntu but getting this error:  Access Denied Unable to write to /usr/local/MATLAB/R2017a/


I can choose the location of the render image but I can't find the render button. I find everywhere in the panel but there is no. Please help


Does community wiki still have to be attributed?

If there is a community wiki post, does it come under the same attribution rules?  Or is there no need for me to link back to it?


What is the most common opposite word for "postpone"?

Consider this:  The meeting has been postponed.  How would the above example be said in AE or BE if the word "postponed" were to be replaced by its antonym?


Yesterday it said +2 on the reputation tab in the topbar.   I opened the dropdown but there was no message, no suggested edit approved etc.  I don't even know on which site I earned those 2 rep.  Can anyone tell me? No downvotes were removed!


Novel where race resurrected from broadcast signal info by octopus like aliens

I'm trying to find a novel written in American English that I read about twenty years ago. It might have been published about thirty years ago. It has the following details:  The aliens are land based, very long lived and communicate via large numbers of cilia on their tentacle tips. They are Masters at biological sciences and are able to recreate the human race based on the radio messages sent long ago by humans. The message contains genetic information as well as cultural information and recordings.  The human race is a short lived, less capable minority compared to the aliens. Some humans become rebellious to the point of violence as a result.   After that is resolved, some humans embark on a return trip to Earth's solar system in a biologically based (giant tree) ship. Earth has meanwhile evolved a new dominant, technological race that they are in instant conflict with. They also find a devolved remnant of humanity similar to ferrets or rats.  I can provide more details if required, just don't want to give too many spoilers.


How to use Blob.toPDF() method to create attachment body containing image and texts

I want to use Blob.toPDF() method to create attachment body, currently using:  attachmentPDF.Name = account.Name + '.pdf';  attachmentPDF.body = Blob.toPDF(pdfContent);`   Inside pdfContent I want to incorporate image and some text in this way pdfContent=EncodingUtil.base64Decode(call.Signature__c) and some text fileds too pdfContent=pdfContent+ call.Account__c. Please suggest some technical solutions using the  Blob.toPDF() method


Using ArcGIS ModelBuilder to perform In-line variable substitution for input data path?

Does anyone know how/if you can use in-line variable substitution for an input path name in ModelBuilder for ArcGIS 10?    I used "get field value" to retrieve a code from one feature class, and I want to substitute that text string in two places in another input variable pathname.    For instance, if I used "get field value" to retrieve the code "ABC123", I would use that to call up a raster (make raster layer) with this path name: "D:\Data\Rasters\%ABC123%\el_%ABC123%  Does anyone know if this will work?    ModelBuilder won't recognize this as a valid path name right now.