What is the easiest way to post code in Stack Overflow?

Most of the times in order to give an answer or ask a question, I write code. But, writing code directly to the answer's  textbox is quite tedious. I have to type too much spaces in order to get the code correctly indented (this helps users who read the code ). So, there are some trick, some format tag, anything, to help community write code easier?


How to disable input language switching in terminal

In Ubuntu 12.04 I have two input languages installed, English and Russian. I would like to disable use of Russian language in terminal - so that regardless of system-wide selection, terminal will always have english input language.  Is that possible?  The problem is, accidentally typed non-english characters may introduce a lot of pain (especially invisible ones).  UPDATE:  First of all, I'd like to thank all the participants - I am really excited how quickly people try to help!  Looks like I have to more clearly state the problem. The problem is that not only I'd like to have English switched on by default when I create new terminal window or switch to old terminal window, I'd also like to make impossible switching the language from English to Russian inside the terminal window.  Now, the results.  I've tried gxneur - looks like one has to build it from the sources, which I am not ready to try. I tried to install it with apt-get and could not figure out how to easily configure it. And it did not show the icon in the taskbar. So I removed it.  I've tried Python script and it immediately stops with following output:  No such schema 'org.gnome.desktop.input-sources' Traceback (most recent call last):   File "./set_language.py", line 63, in <module>     lang_list = read_prev()   File "./set_language.py", line 52, in read_prev     currlang = get_lang()   File "./set_language.py", line 24, in get_lang     curr_n = int(get(key[1]+key[0]+key[4]).strip().split()[-1])   File "./set_language.py", line 20, in get     return subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")   File "/usr/lib/python3.2/subprocess.py", line 522, in check_output     raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['/bin/bash', '-c', 'gsettings get org.gnome.desktop.input-sources current']' returned non-zero exit status 1   Finally, I've tried the shell script, it runs, but does not seem to work - I still can easily switch to Russian in terminal. And it also once in a while says  No such schema 'org.gnome.desktop.input-sources'   So, all in all, I could not make any of the solutions work.  I guess the bottom line here is that what I'd like to get is not that simple, so it's ok to not have it.


What is the use of $i=\sqrt{-1}$ in plane wave equation?

I mean we can represent plane waves using just sine and cosine functions. Why do we need to use Euler's formula to represents plane waves as complex exponentials? What is the intuition behind using $i=\sqrt{-1}$. Of course, the plane waves are solution of Maxwell's electromagnetic equations. Please clarify my doubt!


Other benefits of 64-bit OS apart from memory expansion?

I'm trying to convince somebody of the benefits of switching to a 64-bit OS but I'm having a hard time finding arguments other than "you can use more than 3GB RAM". Are there any other clearly-communicable benefits in having a 64-bit operating system?


Accidentally removed Ubuntu from boot order of newly booted Dell Vostro. I was trying to boot from Windows 10 USB stick I created using Rufus. Deleted the only OS in the boot order ie Ubuntu. Everytime I boot up, I get the BusyBox terminal.  Now I wish to, either   Boot into the BIOS and change the boot order to the Windows 10 USB   OR   Boot directly from the Windows 10 USB


How to run long time process on Udev event?

I want to run a ppp connection when my USB modem is connected, so I use this udev rule:  ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="16d8",\     RUN+="/usr/local/bin/newPPP.sh $env{DEVNAME}"  (My modem appears in /dev as ttyACM0)  newPPP.sh:  #!/bin/bash /usr/bin/pon prov $1 >/dev/null 2>&1 &   Problem:  The udev event fires, and newPPP.sh is running, but newPPP.sh process is killed after ~4-5s. ppp does not have time to connect (its timeout is 10s for dial up).  How can I run a long time process, that will not be killed?  I tried using nohup, but it didn't work either.  System: Arch Linux  Update  I found a solution , thanks to .  I use at now to run my job detached from udev process.  But the one question remains unanswered: Why do nohup and & not work?


How to "connect" three paths starting at the same point?

The following is a rather simple question, yet somehow I failed to find a solution online.  Let's say for example we want to draw a three-dimensional coordinate system:  \documentclass{article}  \usepackage{tikz} \usepackage{amsmath,amssymb}  \usepackage{blindtext}  \begin{document}      \fbox{     \begin{tikzpicture}         \coordinate (O) at (0,0);          \draw[->] (O) -- (90:1);         \draw[->] (O) -- ++(0:1);         \pgfmathparse{sqrt(0.5)}         \draw[->] (O) -- ++(45:\pgfmathresult);          \node[shape=circle, draw=red, scale=.5, very thin] (mark) at (O) {};     \end{tikzpicture}     }  \end{document}      The red circle marks the problem. If you compile the document yourself and zoom far in, you'll see that the axes are not connected---a little notch is missing!  Is there a way to connect these three paths so that we get a "full corner"?


RGB color changed between .tex and .pdf (TikZ)

I am looking to insert a rectangle using the RGB(217,217,87) color. This color looks like   I use it with TikZ that way {rgb:red,217;green,217;blue,87}  However, when generating the PDF, I get this color output   Why did the color change between the .tex file and the output PDF ?  Full code if needed. The main.tex here is  \documentclass[../main.tex]{subfiles} %main.tex contains : %\usepackage{tikz} %\usepackage{subfiles} %\usetikzlibrary{babel} %Résouds les incompatbilités babel/pgfgantt %\usetikzlibrary{shapes,arrows} %\usetikzlibrary{positioning,calc} %Pour les positionnement absolus sur les couvertures  \graphicspath{{../res/img/}{res/img/}}  %\newcommand{\utbmyellow}[0]{{rgb:red,217;green,217;blue,87}} %\newcommand{\utbmpurple}[0]{{rgb:red,128;green,92;blue,139}}  \newcommand{\drawabsoluterect}[3]{ \draw [draw=#1,fill=#1]($(current page.north west)+(0cm,#2)$) rectangle  ($(current page.north west)+(\paperwidth,#3)$); }  \newcommand{\frontcover}[0]{ \begin{tikzpicture}[remember picture,overlay] %Dessine l'image en haut (Hauteur 9cm) \drawabsoluterect{red}{0cm}{-9cm}  %Dessine le label UTBM (Hauteur 0.8cm) %\draw [draw=black,fill=black]     %   ($(current page.north west)+(-0cm,-9.8cm)$) rectangle ($(current page.north west)+(\paperwidth,-9cm)$);     \drawabsoluterect{black}{-9cm}{-9.8cm}  %Dessine le rectangle violet (Hauteur 2.8cm)     \drawabsoluterect{{rgb:red,128;green,92;blue,139}}{-9.8cm}{-12.6cm}  %Ajoute le nom du projet  %Dessine le rectangle gris (Hauteur 0.95cm) \drawabsoluterect{gray}{-12.6cm}{-13.55cm}  %Ajoute le label de l'UV %Dessine le rectangle jaune (Hauteur 12.5cm) \drawabsoluterect{{rgb:red,217;green,217;blue,87}}{-13.55cm}{-26.05}  %Ajoute le nom du stagiaire %Ajoute le nom de la société %Ajoute l'adresse de la société %Ajoute le nom du tuteur %Ajoute le nom du suiveur %Dessine le logo UTBM en bas à droite %Dessine le logo entreprise en bas à gauche \end{tikzpicture} }  \begin{document} \thispagestyle{empty} \frontcover \end{document}


So I was attempting to help someone over at CodeReview, and my suggested code didn't compile! Oh no!  Now, this code is substantially different from their original code, so I feel no qualms posting my botched answer with you guys.  The compiler (STS) is complaining about line 14 in my code students[i] = new Student();.  Here's my error:  Exception in thread "main" java.lang.Error: Unresolved compilation problem:      No enclosing instance of type studentexams is accessible.  Must qualify the allocation with an enclosing instance of type studentexams (e.g. x.new A() where x is an instance of studentexams).      at cr_studentscoreaverager.studentexams.main(studentexams.java:16)  I am not asking for a critique of the code or style, just my implementation of the Student class resulting in my compile error.  Here is my code in its entirety.  import java.util.Scanner;  public class studentexams {      public static void main(String[] args)      {         Scanner input = new Scanner(System.in);          Student[] students = new Student[20];          for (int i = 0; i < 20; i++)         {             students[i] = new Student();             students[i].setStudentName("Student " + (i+1));             System.out.print("Enter the first score: ");             students[i].setScores(0,  input.nextInt());             System.out.print("Enter the Second Score: ");             students[i].setScores(1,  input.nextInt());             System.out.print("Enter the third Score: ");             students[i].setScores(2,  input.nextInt());             System.out.println("The Average Score is " + students[i].getAverage());         }          System.out.println("Student" + "\t" + "Average");          for(int i = 0; i < 20; i++)         {             System.out.println(students[i].toString());         }      }      public class Student     {         private String studentName;         private int[] scores = new int[3];         private double average;          public Student()         {         }          private String getStudentName()         {             return this.studentName;         }          public void setStudentName(String studName)         {             this.studentName = studName;         }          public void setScores(int index, int score)         {             this.scores[index]=score;         }          public double getAverage()         {             average = (double) (scores[0]+scores[1]+scores[2])/3;             return average;         }          public String toString()         {             return this.getStudentName() + "\t\t" + this.getAverage();         }     } }


How can I split a string with a number at the end?

I have a string with a number at the end, separated from the rest of the string by a space, e.g. two examples:  blah 45 blah 89  1. blah blah  blah blah  42   How can I use regex in Python to separate the string into the last number and the rest of the string? Thanks!


Negative solution for continued fraction 1 + 1/(1+(1/...

I am interested in the continued fraction  $$1 + \dfrac{1}{1 + \dfrac{1}{1 + ...}}$$  You can solve this by letting $$y = 1 + \dfrac{1}{1 + \dfrac{1}{1 + ...}}$$   Then since it is infinite  $$y = 1 + \dfrac{1}{y}$$  As such  $$y^2 - y - 1 = 0 \\ y = \dfrac{1 \pm \sqrt{5}}{2} $$  So I was initially inclined to discard the negative solution since  $\dfrac{1 - \sqrt{5}}{2}$ is a negative number, and it wouldn't make sense for a bunch of additions and divisions to result in a negative number. However, then I realised that we are dealing with infinity here and so I am now intrigued by the negative solution and what it might mean.  Could anyone help clear up the significance of this and whether or not it should be discarded, and why?  Thanks.


Screen (not Lock Screen) Timeout Stuck at 1 Minute

I recently got a new laptop (Lenovo T440p with Windows 8.1 Pro) and was having the following issue: the screen would lock (screen would go black and require a password to get back in) after 1 minute. I would prefer something more like 10 or 15 minutes. So, I tried the obvious changes (check the screensaver settings, power management settings for sleep, turning off the screen, etc.), with no success. I did, however, notice a rather odd behavior: if I changed the screensaver timeout from 1 minute to anything else (say, 15 mins), clicked OK, and re-opened the screensaver settings window, it would be back to 1 minute. Odd.  At that point, I turned to Google. I found posts ( in particular was helpful) suggesting all sorts of causes and resolutions:   If you have Cisco AnyConnect VPN client (which I did), try uninstalling it. I uninstalled, rebooted, no change. Open the User Accounts control panel and, on the left side of the screen, click Reset Security Policies. My User Accounts control panel, however, has no such link. Reboot into a repair console and run "sfc /scannow". It did indeed find and repair some issues, but didn't fix the screen timeout problem. Edit the Group Policy to force a particular timeout time; the setting showed up correctly (15 mins) in screensaver settings, power management settings, etc., but the screen would still go black and lock after 1 minute. In the registry, manually change the screensaver timeout and the "turn off the screen" timeout. No luck.


Is it better to encrypt before compression or vice versa?

Is it better to encrypt a plain text file before compression, or vice versa?


What options do I have for tossing an enemy off a cliff?

Say an enemy is between me and a cliff, but they are 5' away from the edge (and I am 10'). I can't shove them because that only pushes them 5', which would get them right up to the edge; I need a 10' power shove.  I'm not quite clear on how moving while grappling a creature works, specifically where the creature ends up while you move them around.  Can I, with 1 attack, grapple them, then move them off the edge of the cliff and simply let go? If I can't do this with 1 attack, could I do it with 2? (grapple, move, shove or perhaps shove, move, shove) And what if it's not a sheer cliff face but, say, a low wall or fence?


I would like to know if someone knows of a way to group the number of levels of a feature that has 100's (even 1000's) of levels to a smaller number of levels - also, what number levels it should reduce to e.g. should it reduce from 200 levels to 10, 15 or 20?


This is what I am trying to do...  Enter Pattern //*//_//* Enter Text hello *_* how are you? No match found   I know to avoid treating above characters as Metacharacters I need to use these escape sequences. I don't know how to do with _ (underscore sigh)  I even tried     //* _ //*   Still it didn't work.  code  Scanner sc = new Scanner(System.in); System.out.println("Enter pattern"); Pattern pattern = Pattern.compile(sc.nextLine()); System.out.println("Enter Text"); Matcher matcher = pattern.matcher(sc.nextLine()); boolean found = false;  while(matcher.find()) {     System.out.println("I found the text" + matcher.group() + "Starting index" + matcher.start() + "Ending at index" + matcher.end());     found = true; } if(!found) {     System.out.println("No match found"); }


When we use an argument length with numerical data types, as far as I know this specifies the display width. I tried the following:    mysql> create table boolean_test (var1 boolean, var2 tinyint);     Query OK, 0 rows affected (0.10 sec)     mysql> show create table boolean_test;    +--------------+-------------------------    | Table        | Create Table +--------------+-------------------------   | boolean_test | CREATE TABLE `boolean_test` (     `var1` tinyint(1) DEFAULT NULL,     `var2` tinyint(4) DEFAULT NULL   ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |    +--------------+---------------------------   1 row in set (0.00 sec)     First of all tinyint is a 1 byte value. So what is the meaning of tinyint(4)? There can not be 4 digits.    mysql> insert into boolean_test values(101,112);   Query OK, 1 row affected (0.03 sec)     mysql> select * from boolean_test;   +------+------+   | var1 | var2 |   +------+------+   |   10 |  112 |   |  101 |  112 |   +------+------+   2 rows in set (0.00 sec)     I see that in tinyint I stored a 10 and 101 and I could get back these values despite that it is defined as tinyint(1). Shouldn't I see a 1 for var1? I.e. just 1 display digits?


populate dates in dropdown using javascript

I have 3 drop downs. The first is for year, second is for month, and the last is for days. Now I want to know when I click the 2015 year and month February the third dropdown should display a days up to 29 days. Now my question is there a function in javascript to check the months if it's 29, 30, 31. Is there any example out there?   my current code is below but I generate it using php:  <div class="select_day">      <select id="year" name="year">          <option value=""> -- </option>          {for $i = 1970; $i <= 2015; $i++}              <option value=$i >{$i}</option>          {/for}      </select>      <select id="month" name="month">         <option value=""> -- </option>         {for $i = 1; $i <= 12; $i++ }             <option value=$i >{$i}</option>         {/for}     </select> </div>


Strange overlapping post-layout and sidebar

I've noticed this issue on a handful of other communities, but making the browser window narrow (mine is 1080x960) makes the .post-layout and #sidebar elements overlap. Maybe something to do with the grid CSS? The #mainbar element seems to be the correct width and changing the .post-layout's overflow-x to auto seems to "fix" it  From retrocomputing:    From this post, because we are meta after all:    Specs:   Google Chrome Version 78.0.3904.108 (Official Build) (64-bit) Ubuntu 18.04.3 LTS


Compute factor group $\mathbb{Z} \times \mathbb{Z} \big / \langle (1,2) \rangle$.

Compute the factor group:  $\mathbb{Z} \times \mathbb{Z} \big / \langle (1,2) \rangle$ I don't understand why the answer is $\mathbb{Z}$. Isn't  $\mathbb{Z} \times \mathbb{Z} \big / \langle (1,2) \rangle \cong \mathbb{Z} / \langle 1 \rangle \times \mathbb{Z} / \langle 2 \rangle$?  What is the order of the cyclic groups $\langle 1 \rangle$ $\langle 2 \rangle$? Why is $\mathbb{Z} \times \mathbb{Z} \big / \langle (1,2) \rangle \cong \mathbb{Z}$


Does installing with wubi affect performance?

I just want to ask you, if I'm installing the Ubuntu beside the windows without any partition changes, using wubi does the ubuntu using more performance (CPU, memory, hard drive), or same as a normal installation?  Thanks.


Indian Mango Pickle producing gas is that normal?

I am trying to pickle some mangoes the Indian way. I boiled the jar in hot water, dried it and then added the mixture of spices, salt and mangoes to the jars after the mixture had cooled. I made the mixture in a frying pan to try and remove as much water as I could. After it was cooled, I put it in the jar and heated some mustard oil till it just barely started smoking. I let that cool and poured it over the mango spice mixture.  For the first three days it was fine. On the fourth day, I opened it to test the taste and ended up adding more salt. Now, there seems to be gas forming in the jar. I've noticed it a few times now. When I open the jar, I hear a whooshing noise as air escapes. It's quite a lot, since I opened the container about 3 times in a 10 hour period and each time gas escaped. Has this pickle gone bad? Or is this something that's normal?


What's the 'secret language' in Fez, and can you learn it in-game?

I just started playing Fez for the first time, and I've heard there is a secret code that can be seen throughout the game.   I'd like to know what the codes are saying, but I'm leery of looking it up in case I can figure it out on my own. Also, I don't want to spoil things if the coded text is more of a spoiler/director's commentary sort of thing.  Can this code be learned as you make your way through the game, or is it something that has to be rigorously decoded/googled to understand? Also, is it better to leave it a mystery until the second play-through?  Thank you for not posting spoilers.


How can I get my external IP address in a shell script?

I need to find my external IP address from a shell script. At the moment I use this function:   myip () {      lwp-request -o text checkip.dyndns.org | awk '{ print $NF }' }   But it depends on perl-libwww, perl-html-format, perl-html-tree installed. What other ways can I get my external IP?


Isomorphic abelian groups which are not isomorphic R-modules

I'm looking for an example of of two isomorphic abelian groups, which are not isomorphic $R$-modules for some ring $R$.   I suppose we can just the same abelian group $M$ twice, and use a different operation $R\times M \rightarrow M$ so the $R$ modules aren't isomorphic.  I can't think of such a group $M$ and ring $R$ to make this possible, though. Any ideas? Thanks.


Runnning Ubuntu 13.04 on ASUS Laptop with pre-installed Windows 8 and secure boot enabled

I had installed Ubuntu 13.04. The installation went on smoothly. But, after the installation was over, there was no grub that let me decide between Ubuntu and Windows 8. So, I used EasyBCD. The grub appeared at the startup now. However, it would only run Windows 8. On running Ubuntu, it would say something like, "a recent hardware and software change has caused this... use system repair etc.. and it will also mention something abut BCD."  Hence, I experimented some more, but unfortunately, I ended up deleting BCD entries (or something else related mbr), because of which neither Windows nor Ubuntu would start. After reading a lot about how Microsoft ships laptops that recognize only Windows 8, I disabled secured boot, used Ubuntu repair and Windows 8 repair. In the process, I ended up using commands like bootrec.exe and also encountered grub-rescue and what not.   After all this nightmare, I am now back to square one. I do not want to do something stupid again. Can anyone tell me what is the simplest way to set up a grub that would allow me to choose the OS at the startup ?


PHP calculating real big/large numbers shows wrong result


Create a Terminal command to open file with Chrome

I want to create command in terminal that would allow me to use  chrome index.html   and have the the given file open in Google Chrome.  How can I get this working?


How do I fix randomly moved chunks after a crash?

I was stupid and didn't keep a backup of my Minecraft server.  Now, it crashed, biomes changed, chunks were moved around, part of my city of gone, an underground chunk was moved aboveground, is there ANY way I can fix this?    I.E. easily move chunks and change biomes.


In a book I am reading the author states without proof that in an $n$-dimensional vector space $X$, the representation of any $x$ as a linear combination of a given basis $e_{1},e_{2},...,e_{n}$ is unique. How to proof that?


Adjoint matrix eigenvalues and eigenvectors

I just wanted to make sure that the following statement is true:  Let $A$ be a normal matrix with eigenvalues $\lambda_1,...,\lambda_n$ and eigenvectors $v_1,...,v_n$. Then $A^*$ has the same eigenvectors with eigenvalues $\bar{\lambda_1},..,\bar{\lambda_n}$, correct?


How to set a persistent $PATH variable for single or all users

This question has been asked before online but with conflicting answers so I am looking for clarification.  What is the best way to add $PATH variables (below) in debian so that they are persitent for every user ?  I have used the below commands when logged in as root, which works fine but obviously when I reboot these are lost.  Another post I read suggested to paste the below lines into .bashrc or .profile but assume this will only work for the logged in user ? If so how would I set the below for all users ?  export PATH=$PATH:/etc/xcompile/armv4l/bin export PATH=$PATH:/etc/xcompile/armv5l/bin export PATH=$PATH:/etc/xcompile/armv6l/bin export PATH=$PATH:/etc/xcompile/i586/bin export PATH=$PATH:/etc/xcompile/m68k/bin export PATH=$PATH:/etc/xcompile/mips/bin export PATH=$PATH:/etc/xcompile/mipsel/bin export PATH=$PATH:/etc/xcompile/powerpc/bin export PATH=$PATH:/etc/xcompile/powerpc-440fp/bin   Golang  export PATH=$PATH:/usr/local/go/bin export GOPATH=$HOME/Documents/go


Why does the sky change color? Why is the sky blue during the day, red during sunrise/set and black during the night?


Does "Pope to meet U.S. bishops" use the word "to" to emphasize?

Does  use the word "to" to emphasize?      Pope to meet U.S. bishops amid sex abuse scandal, allegations of Vatican coverup


I'm often compiling stuff and therefore repeating the same command over and over, so I'd like to benefit from my "visual memory" and have a sort of "repeat last command" button attached to a terminal. More precisely, here is how I see it:   My "special" terminal would be just like a standard terminal emulator, with an extra input line at the bottom, which would have a "run" button attached to it. Clicking the button would run the command without erasing it. Maybe even an arbitrary number of such commands could be stacked (since I often need to alternate between 2 or 3 commands).   I know I can use just ↑Enter with the keyboard to redo the last command, but what often happens is that I forget I just had to type another command (to fix something, or whatever) so ↑ will not bring the right command from the history. So instead of a reflex, I have to actually read (at least skim) the command before pressing Enter.  Is there such a contraption somewhere? I often use several terminals precisely to make sure each always has the "right" command as last, but my Alt+Tab skills usually make me tab to the wrong window. And I need terminal information, such as the environment and cwd, so I cannot just try and "integrate" it in my code editor. I mean, using Alt+F2 and then Enter would not work (since I also need the read the output from the terminal). I just want to be able to use the best of both keyboard and visual memory (via clicks) at the same time.


Is there any kind of relation between the activity in a website and the hosting that I have to purchase?

Is there any kind of relation between the activity in a website and the server that I have to purchase?  I need to give a budget, for website that could increase the traffic in the future, so I would need to know what type of server should I purchase.


Repeat a generated texture in Blender 2.91

I made a nice-looking tile texture:  Now I want to repeat it on x and y axes. Is there any easy way to do it?


Why did time dilation cease to be a factor?

Near the end of Interstellar,     Cooper falls into Gargantua.   Time dilation is a huge part of Interstellar's plot. But all of a sudden, at the above mentioned point, time dilation stops being a factor.     From the point of view of an outside observer, an object's or person's crossing of the event horizon would never occur. How could he exit the black hole and come out at a time apparently close to when he entered?   Is there an explanation for this besides plot convenience? I don't think the answer is time travel, otherwise the whole plot of the movie seems rather silly.     In the movie, only gravity is shown to be able to travel backwards through time, not matter or energy. Otherwise, it would have been much simpler and more reliable to send back an implement of salvation rather than getting someone to travel into a black hole to learn a unifying solution for gravity.


Are commands in a pipeline run simultaneously?

In a pipeline such as command1 | command2,    are the commands run simultaneously (i.e. have the same lifetime), or  command2 starts to run at the time command1 exits, or something else?   My question arises when I heard that the commands' processes form a process group. If they don't have the same lifetime, isn't the process group of the commands' processes meaningless?


Was Severus Snape made a Death Eater before or after he told Voldemort about the Prophecy?

Based on discussion in comments on , was Severus Snape a Death Eater (real one, with Dark Mark) before he overheard Sybil give the Prophecy to Dumbledore and relayed it to Voldemort? Or was he made a DE after that?  Canon sources only please (books/interviews/Pottermore)


Evaluate $$ \lim_{x \to 0}\left[\frac{(1+x)^{1/x}}{e}\right]^{1/x} $$  The answer is $$\ e^{-1/2}$$ Any help is appreciated.


For a conference paper I have to use a custom package provided by the conference. This package contains the following line:  \renewcommand{\thesection}{\arabic{section}.}   which puts a dot after the number in a section title. Now, when I add a reference to a section, the dot is shown in the reference as well. MWE:  \documentclass{article} % real code: % \usepackage{myconference} % MWE code: \renewcommand{\thesection}{\arabic{section}.} \begin{document}  \section{First section} \label{sec:first} In Section~\ref{sec:first} the reference does not look good. \end{document}     The style guide of the conference does not specify the appearance of section references. Therefore, I would like to remove the dot in the reference (while keeping the dot in the title itself). I am not allowed to change the conference package, but I can modify the code of my own paper, including redefining \ref (or using a custom command for referencing) if necessary. Any ideas?


ufw blocks secured ftp transfer when ports are opened

After forcing strict firewall rules (deny everything) and creating following exceptions with ufw: To                         Action      From --                         ------      ---- OpenSSH                    ALLOW       Anywhere 22/tcp                     LIMIT       Anywhere 21/tcp                     ALLOW       Anywhere 990/tcp                    ALLOW       Anywhere 20/tcp                     ALLOW       Anywhere 989/tcp                    ALLOW       Anywhere OpenSSH (v6)               ALLOW       Anywhere (v6) 22/tcp (v6)                LIMIT       Anywhere (v6) 21/tcp (v6)                ALLOW       Anywhere (v6) 990/tcp (v6)               ALLOW       Anywhere (v6) 20/tcp (v6)                ALLOW       Anywhere (v6) 989/tcp (v6)               ALLOW       Anywhere (v6)  I'm still not able to log-in via ftp client such as FileZilla. Using ufw disable allows connection without problems. I bet there is some port I missed. There is vsftpd server running on the linux machine. Connection is done via explicit FTP over TLS. The log of the client when ufw is enabled is: Status: Connecting to xx.xx.... Status: Connection established, waiting for welcome message... Status: Initializing TLS... Status: Verifying certificate... Status: TLS connection established. Status: Server does not support non-ASCII characters. Status: Logged in Status: Retrieving directory listing... Command:    PWD Response:   257 "/" is the current directory Command:    TYPE I Response:   200 Switching to Binary mode. Command:    PASV Response:   227 Entering Passive Mode (85,255,3,229,40,216). Command:    LIST Error:  Connection timed out after 20 seconds of inactivity Error:  Failed to retrieve directory listing


If $\lim \limits_{x \to a}\left(f(x)+\frac{1}{f(x)}\right)=2,$ then $\lim \limits_{x \to a}f(x)=1$

Let $f:(a-\epsilon,a+\epsilon)\to(0,\infty).$ If $$\lim \limits_{x \to a}\left(f(x)+\frac{1}{f(x)}\right)=2,$$ prove that  $$\lim \limits_{x \to a}f(x)=1.$$  I'm trying to get something using $\epsilon-\delta$ definition but I'm stuck . How to use $(a-\epsilon,a+\epsilon)$ information I'm wondering . $$~~$$ An


Is there a central site for accessing physics data for research?

What I'm looking for is a central website where you can search for, say, "quantum entanglement experimental results" and it would give you links to various other sites. Similarly if you wanted "radio telescope observations" it would return a list of links to radio telescope observations from other sites.   I am aware that things like  exist, but I'm more hoping for one central research resource.


What should I do for storing images in PHP and MySQL?

Should I use Boolean and store images in MySQL database or should I store images somewhere in web space?     example: /images   Please help.


How to install the package font awesome?

How to install the package font awesome in MiXTeX (Windows)?


Magnetic force on a charged particle viewed from 2 inertial frames

Suppose we have a magnetic field directed into the computer screen. Assume that there is no gravitational field. Now suppose we have a stationary positively charged particle in the magnetic field. The magnetic force is given by $$\mathbf{F}=q\mathbf{v}\times\mathbf{B}$$  Since $\mathbf{v}=0, \mathbf{F}=0$.  Now pick a reference frame moving to the left with constant velocity. In this frame, the particle is moving to the right with constant velocity. So, the magnetic force is directed upwards.  From what I've learnt in physics, forces are independent of choice of reference frames as long as the frames are inertial. But in the 2 inertial reference frames I have chosen, I get 2 different magnetic forces. How do we reconcile this?


What's the best way to display reply threads?

I have a post and reply system. Currently when you view a post, you can see a list of its direct replies in a vertical scroller. You then click on a reply to see replies to that. I might call this "breadth" display. However, I have some users complaining that they'd prefer to follow comment threads through replies, i.e. "depth" display. The issue I have is, reply chains follow a tree structure, and it is not easy to decide how to show all these threads at the same time.  My question is: Is there a good or recommended way to display a comment tree? There are similar solutions online, such as Reddit's way of rendering, but most people I've talked to don't find that very intuitive either.


Is Stack Exchange interested to learn from another similar case at GitLab?

I've seen a bunch of things lately and finally this is my last thought on this process.  Stack Exchange sites are communities: we're not one community, but multiple which overlap in myriads of manners by the individuals composing them.  An important point is that those communities exist around a company, and the people from the company must be part of the community for it to exist and evolve smoothly.  I won't rehash that last point, as it has been said here ad nauseam, but tonight I stumbled over a  which I think Stack Exchange could learn a lot from.  Summary of the post: on October 10th, 2019, GitLab announced a planned change on their  which received a bunch of backlash from the community over privacy concerns, break of trust. Sound similar? Today, October 24th, 2019, they updated the post to say they had rolled back the changes and opened an issue to collect feedback to find an acceptable compromise for everyone.  It took them 14 days to admit an error, roll back and open the talks. Stack Exchange, you won't undo the harm you did nor regain lost contributors quickly, but I think dissecting this case could help you do better in the future.  So, Stack Exchange, are you interested and if so did you find something usable for you when looking at this case? (I'm not expecting an answer this week, in case it needs to be said.)


I have this document class in which I type both in English and Greek.  \documentclass[12pt, a4]{article}  \usepackage{microtype} \usepackage{fontspec} \usepackage{hyperref} \usepackage{xltxtra}  \usepackage{xgreek} \setmainfont[Mapping=tex-text]{Liberation Sans}   \usepackage{listings} \input{listcode}  \begin{document}     english text : hello      greek text   : γεια σου      \lstinputlisting{my_code.ino} \end{document}   It works fine except from the fact that I am not permitted to type Greek characters in the remarks of the code. This is the listcode package:  \lstset{ language=C, basicstyle=\ttfamily,  breakatwhitespace=false, breaklines=true, captionpos=b,  commentstyle=\usefont{T1}{pcr}{m}{sl}\color{red}, deletekeywords={},  firstnumber=1,  frame=leftline, framerule=2.0pt, numbers=left,  numbersep=10pt, numberstyle=\tiny\color{red},  rulecolor=\color{green},  showstringspaces=false,  showtabs=false, stepnumber=1,  stringstyle=\color{blue},  tabsize=2,  }   and this is an example code:  void setup(){ }  void loop(){     //english remarks     //ελληνικά σχόλια }   This is what happens, that is Greek characters inside the snippet do not show up at all.    I suspect that the problem has to do with this line :commentstyle=\usefont{T1},  Could someone suggest how to configure this line (or any other line)?


NullPointerException setting onClickEvent for dynamic button

I have a function which creates a button, which has an onClick event to bring up a custom dialog which just shows some information from the functions parameters. The dialog has two buttons on it as well, one to close the dialog, and one to add information to a file.  When I try to set onClick events for those buttons, the app crashes, and the error I get is a NullPointerException which says that I am trying to invoke a virtual method on a null object reference.  If I comment out the part where I set the onClickEventListener code for both buttons, then the dialog appears as normal, with the buttons on it.  Note: context is a variable declared in the class. It is simply Context context = this   Code is below:  public void addButton(String text, int id, String areas, String details, String notes) {     Button button = new Button(this);     final String title = "Add "+text;     final String dName = text;     final String dAreas = areas;     final String dDetails = details;     final String dNotes = notes;     button.setText(text);     button.setTextColor(ContextCompat.getColor(context, R.color.buttonText));     button.setTextSize(32);     button.setId(id);     if (isEven(id+1)) {         button.setBackgroundResource(R.drawable.buttonshapeother);     } else {         button.setBackgroundResource(R.drawable.buttonshape);     }     button.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             // Make custom dialog             final Dialog dialog = new Dialog(context);             Button add = (Button) dialog.findViewById(R.id.btnAddExer);             Button cancel = (Button) dialog.findViewById(R.id.btnCancel);             dialog.setContentView(R.layout.popup_exercise);             dialog.setTitle(title);              // Set the custom components now             TextView tName = (TextView) dialog.findViewById(R.id.lblNameData);             TextView tAreas = (TextView) dialog.findViewById(R.id.lblAreaData);             TextView tDetails = (TextView) dialog.findViewById(R.id.lblDetailsData);             TextView tNotes = (TextView) dialog.findViewById(R.id.lblNotesData);             tName.setText(dName);             tAreas.setText(dAreas);             tDetails.setText(dDetails);             tNotes.setText(dNotes);              // Add functions to buttons             add.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View view) {                     if (addExercise(dName, dAreas, dDetails, dNotes)) { // Add exercise to user's workout                         Toast.makeText(context, "Exercise was added to your workout", Toast.LENGTH_LONG).show();                         dialog.dismiss(); // Close dialog                     } else {                         Toast.makeText(context, "There was an error adding your exercise", Toast.LENGTH_LONG).show();                     }                 }             });             cancel.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View view) {                     dialog.dismiss(); // Close dialog                 }             });              dialog.show(); // Actually show the dialog         }     });     LinearLayout lay = (LinearLayout) findViewById(R.id.innerLay);     LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);     lay.addView(button, params); }  public boolean isEven(int num) {     if ((num&1) == 0) {         return true;     } else {         return false;     } }


What lens is needed to change the minimal focus distance length of my camera?

Here is my problem, I Have a scientific camera, a , which has an automatic focus. The minimum focus distance is 1 cm when completely zoomed out and 120 cm when fully zoomed in. I'm not sure what lens is in the camera but I was hoping someone could tell me what optics I would need to add to the camera to make it auto-focus at maximum zoom to a distance of 75 cm.   Thanks in advance.


I would like to type a^b in LaTeX. Note that I do not want b as superscript for a in the sense a power b, rather I want the text as is.  I have seen here () that ^ is a special character and can be written as \^.  However, a\^b yields 'a', followed by b with a hat. Somewhat like $\hat{b}$.  I have tried \^ to print the ^ character alone, ie., not followed by any text or numbers before or after. I get the following error:  "Missing \endcsname inserted. \end"  What am I missing? Any help is appreciated.


How to pass iterators to parameters correctly (C++)?

Below is the delete function for a hash table that uses separate-chaining.  This is working code and searches within the delete function.          void delete_elem(int value)         {             list<int> ::iterator itr;             int hashedIndex = hashFunction(value);              for (itr = myTable[hashedIndex].begin();                     itr != myTable[hashedIndex].end(); itr++)             {                 if (*itr == value)                 {                     break;                 }             }              if (itr != myTable[hashedIndex].end())             {                 myTable[hashedIndex].erase(itr);             }             else             {                 cout << value << " was not found" << endl;             }         }    but this version doesn't work and uses a helper function to do the searching.          void delete_elem(int value)         {                // auxiliary iterator                     list<int> ::iterator tmp;              if (search(value, tmp))             {                 int hashedIndex = hashFunction(value);                  cout << "here3" << endl;                 myTable[hashedIndex].erase(tmp); // this line segfaults                 cout << "here4" << endl;             }             else             {                 cout << value << " was not found" << endl;             }         }          bool search(int value, list<int> ::iterator tmp)         {             int hashedIndex = hashFunction(value);              for (list<int> ::iterator itr = myTable[hashedIndex].begin();                     itr != myTable[hashedIndex].end(); itr++)             {                 if (*itr == value)                 {                     tmp = itr;                     cout << "tmp: " << *tmp << "\n"; // outputs an int, which is fine                     cout << "itr: " << *itr << "\n"; // outputs the same int, which is fine                     break;                 }                 else                 {                     tmp = myTable[hashedIndex].end();                 }             }              return tmp != myTable[hashedIndex].end();         }    Somehow the tmp in my delete_elem() wasn't affected by the search(). How can I change this?  UPDATE (fixed by passing the iterator to the search function as a reference, and just realizing that iterators are NOT pointers in C++, but use pointer-like syntax):  void delete_elem(int value)         {                         list<int> ::iterator tmp;             if (search(value, &tmp)) // passed in tmp as an address             {                 int hashedIndex = hashFunction(value);                  cout << "here3" << endl;                 myTable[hashedIndex].erase(tmp);                 cout << "here4" << endl;             }             else             {                 cout << value << " was not found" << endl;             }         }          bool search(int value, list<int> ::iterator *tmp)         {             int hashedIndex = hashFunction(value);              for (list<int> ::iterator itr = myTable[hashedIndex].begin();                     itr != myTable[hashedIndex].end(); itr++)             {                 if (*itr == value)                 {                     *tmp = itr; // edited                     cout << "tmp: " << *(*tmp) << "\n"; // edited                     cout << "itr: " << *itr << "\n"; // edited                     break;                 }                 else                 {                     *tmp = myTable[hashedIndex].end(); // edited                 }             }              return *tmp != myTable[hashedIndex].end(); // edited         }


A question from a past BMO exam, on modulo

If the last three digits of the number $7^{400}$ are 001 find the last three digits of the number $7^{9999}$.  Guys, I tried working out this question today, however to no success. I tried using modulo, to work it out and also tried to find a motive, however, I could not find one. Can you guys please help me?  Thanking you in advance   Michael


I would like to compare two .tex files (before and after modifications) and then edit a .pdf with for instance, the added lines in green and those removed in red.  Is there a simple tool to do so?


Help Identifying a Sci-Fi Book: Humans transported to alien world and given tasks to escape

This is a book I read about a decade ago. It is a science fiction type book and I got it in the young adult section of my public library. It is a standalone book, not a short story or collection of stories.  Characters The main character of the book is a youngish woman, I'm guessing younger than 30, but I can't remember her name. One of the other major characters/possible love interest is a man named Garth (I remember this name in particular because I had never heard of anyone named Garth and thought it was funny). They meet up with others along the way, somewhere around 10-20 people in total.  Plot The premise of the plot is that a bunch of people on Earth joined programs for "quitting smoking" or "quitting drugs" or "self-improvement". However, these programs were a front, and as soon as they attend their first meeting, they are told to go inside a room/device and suddenly find themselves transported to an alien planet. (One of the characters later jokes that it worked, because she hasn't smoked in weeks due to being on an alien planet with no cigarettes)  Once the main character meets up with other transported humans, they start trying to figure out what to do. They receive some sort of instructions from the aliens who put them there and they are told if they reach a certain place alive, they will be sent back to Earth.   A lot of the conflict centers around people arguing whether or not to follow the instructions they were given. The aliens themselves don't play a huge role until the end (other than giving instructions), and the book focuses more on what the people discover about themselves in the journey (which lasts weeks at least) to this mysterious end goal. I remember it as "a sci-fi sort of Pilgrim's Progress" (minus the heavily religious overtone), because all the different places/challenges they do are supposed to represent some real-life problem someone in the group was facing.  In the end, those that make it are returned to Earth with their memories wiped, but their bad habits gone.  For some reason I thought the title was "The Crystal Arches" for a long time, but I haven't had any luck finding it by that title. Possibly their end destination was a set of crystal arches or something.   I've asked this on a couple other internet sites but haven't had any luck. I didn't think to try here until I saw other questions like this.


Why was Startup StackExchange not approved as a fully fledged Stack Exchange site?

had 4.9 questions per day during it's BETA period and was declined the opportunity to turn into a full StackExchange site, but the  had only 3.4 questions per day and was approved.  All of the other metrics for both seem to have came up as Excellent.  Why was the role playing site approved, but the Startup site declined?


Can I travel after visa's intended travel date?

I just finished applying for my visa and had originally planned to travel on the 30th of September, so I put that as my intended date of travel. But now I will not be leaving until close to the second week of October.  How does this work, will I still be able to travel with this visa even though it says I intended to arrive on September 30th?


Is there a way to clear the console in python like there is in c#?

In c# I can simply clear the console with Console.Clear();. Is there a way to simply clear the console in python like there is in c#?


Find all integer $n$ such that $x^2+x+1$ divides $X^{2n}+(x+1)^{2n}+1$

I tried particular cases, with $n=1,2,3,4$... The pattern I find is that when $n$ is multiple of 3 it doen't divide. I think is related with the binomial theorem.


Can I move a running application to a different X server?

Is there any way to open a graphical program (for instance, gedit) while using X11 forwarding over SSH and transfer the X server connection back to the X server on the SSH host?


Uncountable product of separable spaces is separable?

I am asking to what extent this problem is true:     Uncountable product of separable spaces is separable.   I need these statements to be explained if possible:   How to construct a countable subset of uncountable product of separable spaces. Counterexample for the contradicted case.


Does Thunderbolt support chaining multiple monitors to a MacBook Pro?

This has always been a big want for me. I love using multi-monitor setups but only want a single laptop. Does the 2011 MBP Thunderbolt support chaining multiple monitors together? I know that you can add a monitor and say, a few hard drives, but can you connect it to 2 27" monitors and your flat screen TV (for example)? Thanks!


Simple way to remove duplicate item in a list

the program says "TypeError: 'int' object is not iterable"     list=[3,3,2]    print(list)    k=0    for i in list:        for l in list:            if(l>i):         k=l        for j in k:            if(i==j):                del list[i]    print(list)


I want to have url's with no background, but still a distinctive color so as to indicate that they are clickable. I am defining     \documentclass[line, margin]{res} \usepackage[hidelinks]{hyperref} \hypersetup{ linkcolor=red, citecolor=green, filecolor=magenta, urlcolor=cyan } \begin{document} \name{Myname} \address{address...}  \begin{resume}  \href{http://example.com}{Text}  \end{resume} \end{document}   Res file can be found here:


Rect selection after click selection 2.8.3

This looks like a very basic Question to me but I can not find an answer so far. Look at this image please:   I clicked on the right cube and it is selected I rect selected the left cube. Notice the dark selection color and: there is still that "selection indication" in the outliner around the "triangle" in front of the Cube.001 name and the pivot seems still selected. Now i click selected the left cube. Selection indication gone. All fine now.  What does that red selection color mean (without selecting multiple objects)? I often run into problems, when that is active, since only the orange selection color is the right one. Thanks


Overriden virtual method still calls function in base class

I have the following simple inheritance example in C++.  #include<bits/stdc++.h>  using namespace std;  class Animal{     public:     string mName;      Animal(string pName){         mName=pName;     }      virtual void printAnimal(){         cout<<"Animal "<<this->mName<<endl;     }  };  class Dog: public Animal{      public:      Dog(string pName): Animal(pName){}      void printAnimal(){         cout<<"Dog "<<this->mName<<endl;     } };  class Cat: public Animal{     public:      Cat(string pName): Animal(pName){}       void printAnimal(){         cout<<"Cat "<<this->mName<<endl;     } };  Animal getCat(){     return Cat("Tom"); }  Animal getDog(){     return Dog("Scooby"); }  int main(){     getCat().printAnimal();     getDog().printAnimal(); }   To my understanding, if we override a virtual function given in the base class, then no matter whether the reference is to the base class or the derived class, when the overridden function is called, it should call the function defined in the derived class and not the base class.    So one would expect the output of the above program to be,  Cat Tom Dog Scooby   But I get,  Animal Tom Animal Scooby   Why is this happening? What is the correct way to do this?


I think I had  a configuration problem of the visual studio 2019 exception setting, which I am not able to solve. I am trying to catch a simple exception, using try/catch block. on one pc it works as intended (shows a message box), on other pc - using visual studio 2019, the program crashes, show the exception on the code it self. only after pressing the "continue" button, a message is shown. both pc's are windows 10, running vs19. I assumed that it is more a configuration problem, then a code problem (running the same code on both pc's). please see code below: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Emgu; using Emgu.CV; using Emgu.CV.CvEnum; using Emgu.CV.Structure;  namespace WindowsFormsApp8 {          public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          Capture _capture;           private void Form1_Load(object sender, EventArgs e)         {             _capture = new Capture(2);         }          private void btnCapture_Click(object sender, EventArgs e)         {            try            {                 var img = _capture.QueryFrame().ToImage<Bgr, byte>();                 var bmp = img.Bitmap;                 picBoxCapture.Image = bmp;            }             catch (Exception ex)            {                 MessageBox.Show(ex.Message);            }         }       }}


Show that for any integer not divisible by 2 or 5, there is a multiple of it which is a string of 1s.

Given that a number $n \equiv\{1,3,7,9\} \pmod{10} $ show that there is a multiple of $n$, $q$ that is a string of consectutive $1$s.


I would like to check with JavaScript if the current logged user is in a specified and specific group (for example called "Admins Group").  How can I do?  Thanks


Permanently assign a different keyboard layout

i have come accross an article on this site  about assigning a different keyboard layout automatically when a usb keyboard is plugged in. its the second option in the solution by Sadi. Im pretty much a noob when it comes to software and making changes to a computer. i can muddle my way through visual basic when im using excel and stuff but i've pretty much drawn a blank on this. im just wondering if anybody could  give me a basic tutorial for installing it? Thanks in advance!! Dan


Wording on moderation privileges description is highly inaccurate

When looking at the privileges page, we can see:  Moderation Help decide what questions and answers float to the top or participate in suggesting new features.  That's hardly what moderation is about. The first part is borderline, but what does suggesting new features have to do with moderation?


I have a Nikon D3300 and I want to do astro-photography. I have a 50mm prime lens and by the , I can click only up to 6.6 seconds without having star trails. Any idea how I can do it without buying any other lens?


Probability of Obtaining the Roots in a Quadratic Equation by Throwing a Die Three Times

Question :     The coefficients a,b,c of the quadratic equation $ax^2+bx+c=0$ are   determined by throwing a die three times and reading off the value   shown on the uppermost face of each die. i.e, if you throw a 1, 5 and   3 respectively, the equation is $1x^2+5x+3=0$.      Find the probabilities that the quadratic equation you obtain :         has real roots;   has complex roots;   has equal roots.      Thank you for your attention.


Book where dragon's shadow causes forgetfulness

I've read this book about 10 years ago, an I think it's part of a series of books. It's high fantasy, and I remember that the protagonist is a commoner, perhaps female (but I'm not sure). The main feature I do remember is that when dragons fly, their shadow causes forgetfulness to people it passes over. There is an island/continent separated by sea from the main place where the story is told that dragons live there and the people there are like zombies, completely without memory. The main place (continent) rarely sees dragons and they fear them. I think that during the book the other island/continent is starting invade the main place/continent by stealth (i.e. infiltrating a few at a time).


How to search the internet for terms with special characters

As I learnt from this , Google has no ability to search for special characters. Let's say I want to search for ss!. Are there any other search engines that can achieve this? Please do not propose any programming code search engines since this is a general search.


Can anyone tell me what's happened to the GetDeb website and repository?  Is it just a temporary problem or has been turned off permanently?


Making the background of an image transparent in Gimp

I have some jpg images and I need for each of them to have a transparent background.  I have GIMP as a graphic tool.   I need to put them in a web page and I need to see just the main element and have a transparent background.


Why are my pixels not aligning to grid in Illustrator?

I have a small Problem that occurs from time to time.   Sometimes, when I copy things or when I put an object from the symbol library on my page, the whole file gets messed up. The screenshot shows it. I make the graphic on the right, Illustrator the ones on the left.   I have pixel snapping checked. Is there a way to tell Illustrator to align everything to pixels no matter what?


Prove the following inequality for any positive real numbers x,y,z

$x,y,z \in \Bbb R_+$ Prove that $xy + yz + zx \geq x\sqrt {yz} + y\sqrt{zx} + z\sqrt{xy}$  I couldn't find any useful application of AM-GM here. I also tried squaring both sides but it didn't help me either


The first thing that came to mind when I saw Arrival was "I already saw that!"  I remember that I've seen a somewhat B-ish movie, I only remember the plot was similar to Arrival, a huge black monolith-like ship arrives, it is vertical, hangs in the air just like in Arrival, and they go in to investigate its secret.  That is all I can remember, I haven't really paid attention, but now I've seen Arrival I really want to find out what it was.


For $q, p$ odd primes such that $p \neq q$, there is not primitive root modulo $pq$.

I'd really love your help with proving that for  $q, p$ odd primes such that $p \neq q$, there is not primitive root modulo $pq$.   There's a theorem says that there's primitive root only for $2, 4, q^l, 2q^l$ for prime $q$ and $l \in {Z}$, but I guess I can't use it.  any other suggestions?  Thanks a lot


Differential calculus: $f(x)+f''(x)=-xg(x)f'(x)$, $\forall x \geq 0$ where $g(x) \geq 0, \forall x \geq 0$.

Consider $f$ is a twice differentiable function such that $f(x)+f''(x)=-xg(x)f'(x)$, $\forall x \geq 0$ where $g(x) \geq 0, \forall x \geq 0$. Prove that for $\forall x \geq0$, (i)$(f(x))^2+(f'(x))^2$ is a non increasing function. (ii)$(f(x))^2<3(f(0))^2+4(f'(0))^2$ (iii) $f$ is bounded, that is $|f(x)| \leq a$, for some fixed positive real constant $a$. (iv) $\lim_{x \to \infty} f(x)\sin(\frac{1}{x})$ exists.  I could prove part (i). Let $$h(x)=(f(x))^2 + (f'(x))^2$$ $$h'(x)=2f'(x)(f(x)+f''(x))$$ $$=-2xg(x)(f'(x))^2 \leq 0$$ from conditions $x \geq 0$, $g(x) \geq 0, x \geq0$. Hence $h(x)$ is non increasing and part(I) is proved. Part(ii) attempt $$3h(0)=3{(f(0))^2+(f'(0))^2}$$ We must prove that this is larger than $$(f(x))^2-(f(0))^2, \forall x\geq0$$ I thought of trying to prove that this is negative. Let $$p(x)=(f(x))^2$$ $$p'(x)=2f(x)f'(x)$$ $$=2f(x)[\frac{f(x)+f''(x)}{-xg(x)}]$$ I couldn't make further progress. Part(iii) is a direct consequence of part(ii) and part(iv) is a direct consequence of part(iii).


How to remove all the packages that come with gnome?

I have recently switched from gnome to unity and have removed gnome with sudo apt remove ubuntu-gnome-desktop sudo apt remove gnome-shell  I have also purged config files like below sudo apt purge ubuntu-gnome-desktop  Removed unwanted dependencies with sudo apt auto-remove  But I don't know how to delete all the bloatware that comes with gnome. When I run sudo apt list gnome-*  It gives me a huge list which is really difficult to remove manually. How can I remove the apps like settings, calendar music and so on without manually deleting them one by one?


Can someone help me understand what's wrong with this script (ran in cygwin)?  $ cat myscript.sh #!/bin/bash if [[ $myfile =~ (.+)-(.+)\.(.+) ]]; then     echo "Prefix = ${BASH_REMATCH[1]}"     echo "Name = ${BASH_REMATCH[2]}"     echo "Extension = ${BASH_REMATCH[3]}" else     echo "NO MATCH" fi $ echo $myfile prefix-name.ext $ ./myscript.sh NO MATCH   If I check the pattern matching (without the IF) everything works fine:  $ [[ $myfile =~ (.+)-(.+)\.(.+) ]]; echo $? 0 $ echo "Prefix = ${BASH_REMATCH[1]}" Prefix = prefix $ echo "Name = ${BASH_REMATCH[2]}" Name = name $ echo "Extension = ${BASH_REMATCH[3]}" Extension = ext


I have a Lenovo G580 laptop. In the past, using Windows 8, I could use Bluetooth to connect to other devices.  Installing Windows 10, Bluetooth simply disappeared. I can't find anything related to Bluetooth in the Device Manager, also in Settings → Devices.  There is no Windows 10 Bluetooth driver for my laptop.  What can I do?


How can I use greek letters for text in Blender 2.71 OSX? I need to use a lower case delta for a partial charge symbol in a chemistry reaction animation.


LUA : how to determine the OS name in pure lua 5.4?

I'm using os.tmpname() from the standard library, but I'm looking for a better solution.


No audio on Mac Pro after Yosemite upgrade

I have looked at other people's problems regarding this issue but the way they solved it cannot fix my problem as I don't have any options to change anything. see images.


How does capacity for reason 'exist undifferentiated in all of us'?

Prof Michael Sandel, Justice: ..., Episode 06: "MIND YOUR MOTIVE" [in this episode, Prof Sandel introduces Kant.]     25:35: How many moral laws from Kant’s point of view are there in this room, are there a thousand or is there one?   25:45: He thinks there's one, which in a way does go back to this question: all right, what is the moral law, what does it   tell us? So what guarantees, it sounds like … to act autonomously, is to act according to one's conscience, according to a law   one gives oneself.   26:04: But what guarantees that ... if we all exercise our reason, we will come up with one and the same moral law? That's what Ahmady [the student whose question asked Prof Sandel to explain all this] wants to know.   26:15: Here's Kant's answer: The reason that leads us to the law we give ourselves, as autonomous beings,    is a reason.   26:33: It's a kind of practical reason that we share as human beings. It's not idiosyncratic. The reason we need to respect   the dignity of persons, is that we're all rational beings. We all have the capacity for reason. And it's the exercise of that capacity for a reason   which exist undifferentiated in all of us, that makes us worthy of dignity, all of us.   27:06: And since it's the same capacity for reason, unqualified by particular autobiographies and circumstances, it's the same universal capacity for reason that delivers the moral law. It turns out that to act autonomously, is to act according to a law we give ourselves exercising our reason. But it's the reason, we share with everyone as rational beings. Not the particular reason we have, given our upbringing, our particular values, our   particular interests.   27:46: It's pure practical reason in Kant's terms, which legislates a priori, regardless of any particular contingent or empirical ends.   How does everyone have the same capacity for reason, unqualified by particular autobiographies and circumstances? What about the mentally ill, whose capacities for reason ARE limited by their unfortunate medical circumstances? And what of babies?


Scatterplot with marginal histograms using pgfplots

I've tried to use pgfplots to create a scatterplot with marginal histograms like it can be seen here:    Creating the histograms and the scatterplot alone works, but putting it together results in a desaster. Does pgfplots supports this kind of graph?


I can feel the electricity on my pc case

I have a pc that is connected to a UPS and connected to the outlet. When I turn on the UPS while holding the pc case I can feel a small electric shock, also when the UPS is on charging mode I can feel the electricity all over the case. I know it's not normal to feel the electricity on the case, do I have a faulty PSU, a faulty UPS or its normal?


How do I keep Text[] values alive and reuse in the script

I'm building a bowling game in which I am trying to save the number of pins fallen on every turn to a UI text box, taken as an array (public Text[] Count). I'm able to get the first score in the text box, but unable to save it while switching to other scenes.   There are two scenes; one has the ball, pins and alley, and the other scene has the score card, which is displayed in additive mode. The UI text is a child of the canvas. I've used DontDestroyOnLoad for the canvas, but it doesn't work at all. I'm actually trying to reuse these values to display the score in the series.  Below is the code  public GameObject rootCanvas;     public Text[] Count;     public static int counter=0;     public static int i;     public static int co = 0;       MovingBall ball = new MovingBall();      public void Start()     {         ball.countText = GameObject.FindWithTag("Counttext").GetComponent<Text>();           for (i=co;i<=29;i++)         {             if (counter < 1)                 {                     Count[i].text = ball.countText.text;                 }                 else if (counter == 1)                 {                     Count[i].text = ball.countText.text;                     Count[i+1].text = (Convert.ToInt16(Count[i-1].text) + Convert.ToInt16(Count[i].text)).ToString();                 }              counter++;              co++;              DontDestroyOnLoad(gameObject.transform);              return;          }      }        void Awake()     {          rootCanvas = GetComponent<GameObject>();      }


Is it possible for an iframe to redirect the parent page?

It is possible for a iframe to redirect the page it is on?   Example:  You go to www.fuu.com  On fuu.com there is a iframe  In that iframe is a website the redirects to another website.  Is it possible for fuu.com to be redirected? instead on just the iframe going to another page?


Feature count different in MainPage and in tabbed page

Featured count in     And Featured count in     As you can notice there is a difference of 2 questions. So, I'm curious whether questions were omitted or if it is a count error.  Note: I have Android tag as my Favourite and no tag in ignored tag list.  PS: I'm not sure if it's really a bug so adding supprt tag instead. Also those values may change.


Does it matter where you put the pointer? (asterix) sign?

I Just want to know what is the difference between the following way of assigning a pointer. i was watching a C tutorial online and couldn't understand why he used the second pointer like this char * buffer;. Instead of char *buffer  Like the way I use the pointer in all my C learning. is it style? e.g  FILE *pFile;  struct product *next;   does it matter where you put the asterix (pointer) or what is the meaning behind it?


What happens to my answer when the question is deleted?

Let's say I answer a question. And there are upvotes for my answer (so, I get reputation points for my answer). Now, the question is deleted. What happens to my answer and what happens to the reputation points I earned?


Because the straight forward approach involves Fresnel integrals I thought about a different approach of taking the imaginary part of  $\int_{-\infty}^{\infty}\exp{(ix^2)} \, dx $ but have no idea how to continue.  Knowing that $\int_{-\infty}^{\infty}\exp{(-x^2)} \, dx = \sqrt \pi$ one can feel that this value has to be somehow "divided" over the entire complex plane, so that every quadrant gets some part of $\sqrt \pi$. This would give the desired result of $\sqrt \frac{\pi}{2} - i \sqrt \frac{\pi}{2} $  Is there a way this could be proved or justified?


My physics teacher said that on a LC based radio receiver, the frequency knob changes the capacitance of the capacitor, thus changing the resonance frequency. How is that done?


How to remove URI encoding from file names?

I realise this might be quite a simple question, but I'm still quite new to the command line and only have a grasp of basic commands.  I've downloaded some lecture presentations (~25 or so) from my University however on doing so they've been named things like...  L2%20Development%20of%20immune%20system.pptx L4%20Molecular%20Recognition.pdf   As you can see they've downloaded with the URL encoding %20 instead of a space.  My question is how to batch rename all of these files so that the %20 is removed and replaced with a space instead?


This question was last answered 6 years ago: .   What has changed?  suggests not using Tor for Ubuntu. I'm running a 16.04 LTE. Is there any way to browse the internet anonymously for free? Are PrivateBrowser and Anonymox any good?


After learning about quantum entanglement I wanted to know, what is the simplest way to entangle two particles in a lab?


Is there any way to see how much data I sent via Internet?

A big German ISP (Telekom) recently decided to volume limit their DSL internet connection to 75GB per month.  Now I would like to know how much I download / upload. I use Linux Mint 14 Nadia and I have a D-LINK DI-524 router.  How can I get the amount of data I upload / download per month?


I have bash a script like the following  #!/bin/bash  date  curl http://lab.nextt.com.br/somefile1.html -z ../public_html/somefile1.html -o ../public_html/somefile1.html --silent --show-error --location  curl http://lab.nextt.com.br/somefile2.html -z ../public_html/somefile2.html -o ../public_html/somefile2.html --silent --show-error --location  curl http://lab.nextt.com.br/somefile3.html -z ../public_html/somefile3.html -o ../public_html/somefile3.html --silent --show-error --location  curl http://lab.nextt.com.br/somefile4.html -z ../public_html/somefile4.html -o ../public_html/somefile4.html --silent --show-error --location   and I have a cronttab like this  * * * * * /home/user/cronjobs/cronjob-updatefiles >> /home/user/cronjobs/log   My intention is: whenever there is an update on a public file, download it to my server.  So good so far.  When I run the script manually on the shel, the files are downloaded and updated as expected.  And the cron is running the... The /home/user/cronjobs/log is being updated with the date (on the beggining of the script). But the curl commands are not executed via cron. The files are not updated.  Why when I run directly on the shell it works and when I run via cron it does not?


I put some balls (denser than water) in a bucket. I took a stirring rod, and swirled the water in one direction. The water became low in the middle, and high along the edges (centrifugal force). But the balls at the bottom clustered in the middle. Even when I tried to dislodge them with the stirrer, they would quickly return to the center.  Why did they not go out to the edge of the bucket, especially since they are denser?


Use of every site's primary color in "Questions", "Users", "Tags" and "Unanswered" numbering section

In every Stack Exchange site, the "Questions", "Users", "Tags" and "Unanswered" pages have orange color in the numbering section at the bottom.   For example,   The workplace    Meta   Mathematics  Instead of the pre-existing orange color (Stack Overflow's primary color), every site's own primary color could be applied to the numbering section.


compare a 2 string in c# using inbuilt method different case

How to compare a 2 string in different case like String a="Pawan"; String b="PAWAN"; how to compare using inbuilt method I am try to compare culture method but can not be compere so please provide a solution return result equal or not equal


Who invented the Winter Bash hats program?

Hats are a really nice idea and earning one is a happy event.  Who invented the hat system?  I was wondering how they were born, and who chose their names?


I usually add some description in the JPEG comment when I'm exporting images from GIMP. I was wondering if Google will read those descriptions and show the images when I search for their description.  Also what about other search engines?


Android Pass Value from Fragment to Adapter Class

I have below code to show popup menu when user click on the overflow image in each row item. Unfortunately i have no idea how to pass the context to the fragment which caused the onClick() didnt get the context value. I managed to show the popup menu if i create the listener directly in the getView() of the adapter class but i cant get the expected result if i passed the listener to the fragment. May i know how can i adapt my code below?  My current coding is as below:  public class SubProductCustomAdapter extends BaseAdapter {  ... @Override public View getView(int position, View convertView, ViewGroup parent) {     //RecyclerView (Android 5.0) - To avoid app crash when there are too many records when user scroll     ViewHolder viewHolder;     LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);      //First Created     if(convertView == null )     {         convertView = mInflater.inflate(R.layout.item_sub_product, null);         viewHolder = new ViewHolder();          viewHolder.sub_product_name = (TextView)convertView.findViewById(R.id.txt_pdt_name);         viewHolder.popup_menu = (ImageView) convertView.findViewById(R.id.product_overflow);          SubRowProducts subRowPro = subRowProducts.get(position);         viewHolder.sub_product_name.setText(subRowPro.getSub_product_name());          //Managed to display popup menu using below method         /*viewHolder.popup_menu.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 PopupMenu popupMenu = new PopupMenu(context,v);                  popupMenu.getMenuInflater().inflate(R.menu.drawermenu, popupMenu.getMenu());                  popupMenu.show();             }         });*/          //Not managed to display popup menu using below method         viewHolder.popup_menu.setOnClickListener(new MySubProductListFragment());          //Store object inside convert view         convertView.setTag(viewHolder);      }      else{         //Reused or recycle the convertView         viewHolder = (ViewHolder)convertView.getTag();     }      //viewHolder.sub_product_name.setText(subRowProducts.get(position).getSub_product_name());      return convertView; }   .  ************************************************************************************************************  public class MySubProductListFragment extends ListFragment implements View.OnClickListener {  ...   @Override public void onClick(View v) {      PopupMenu popupMenu = new PopupMenu(getActivity(),v);      popupMenu.getMenuInflater().inflate(R.menu.drawermenu, popupMenu.getMenu());      popupMenu.show();  }   }


Xlib: extension "GLX" missing on display ":0". Asus k53s

I had everything working fine, I use a number of openGL graphics software, example pymol, mgltools, vmd, ballview, rasmol etc.  All of these give the error:  Xlib:  extension "GLX" missing on display ":0".    and fail to initialize.  I have an i7 asus k53s with nvidia gforce   I need these to do my work.  I tried the umblebee fix, and just removing all nvidia drivers, or rolling back.  I do not know why these were working then stopped, but did notice a new nvidia console in the mu which I assume was from enabling the automatic nvidia feeds, etc?  I also played with the xorg, however have no clue what settings are valid.  In addition, the display is 50% of the time not recognized now?  It just gives a geeic 640x480 and I have to login and out 10 times to get it to return to a normal setting.  When I try and set it manual, there is no other setting allowed from the settings menus, and the terminal changes just get re set every time I log out?


If I have this:  for (auto iSong = 1; iSong <= iMaxSongNumber; iSong++)   Can I use the new for range approach?  I understand that for containers they need a begin and end method for them to work. But if we have literal max values?


What to do when OP answers his/her own question in an edit?

Reference question:   Sometimes users solve their own questions, which is great. Sometimes they say they've solved it and move on, which is not so great. The above question is middle-ground: the user posted an answer to his own question, but as an edit to the question instead of as a real answer.  Should any action be taken in such a case? The obvious solution is to copy the edit into a real answer. But is this the right solution? In this case, the answer is a little hidden and there are no other answers, so it appears on the unanswered list.     Related:


Where are the class files located in JDK folder?

This may sound like a stupid question. Where are the core class files from Sun, like Button.class, located in the JDK installation folder C:\Program Files\Java\jdk1.5.0_12?   Or do the class files reside in C:\Program Files\Java\jre1.5.0_12 folder?


Adjusting Size of Subfigure captions in Beamer

While including two small images the caption appears to be too large.  \subfigure[\tiny Original]{\includegraphics[scale=0.15]{1.jpg}} \subfigure[\tiny      New]{\includegraphics[scale=0.15]{2.jpg}} \caption{\tiny Image}   The \tiny tag works fine for the sub-caption and caption text. But the default sub-figure markers (a) and (b) appears to be too large.  How to re-size them as per text size? And i don't want to use some other package in place of subfigure now.


I just want to understand why we use *args when the same work can be done by list when we pass it as a argument. In which scenarios do we really need *args, where list as a argument will fail to do that operation.  list =[1,2,3,4,5,6,7] def method1(args):     for i in args:         print(i*2) method1(list)   list =[1,2,3,4,5,6,7] def method1(*args):     for i in args:         print(i*2) method1(*list)    I didn't find any differences. Please correct me if i am wrong.


How to bind USBSerial HUB under a static name

I have an USB<-->Serial hub with 4 serial ports. It is always connected to the same USB port and I would like to set a static name for its ports instead of ttyUSB*.  If I run the command dmesg I see this output:  [ 7631.687299] usb 2-2.2: new full-speed USB device number 18 using uhci_hcd [ 7631.903348] usb 2-2.2: New USB device found, idVendor=0403, idProduct=6001 [ 7631.903351] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 7631.903353] usb 2-2.2: Product: USB <-> Serial [ 7631.903354] usb 2-2.2: Manufacturer: FTDI [ 7631.923887] ftdi_sio 2-2.2:1.0: FTDI USB Serial Device converter detected [ 7631.923907] usb 2-2.2: Detected FT232BM [ 7631.928137] usb 2-2.2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 7632.243560] usb 2-2.3: new full-speed USB device number 19 using uhci_hcd [ 7632.477535] usb 2-2.3: New USB device found, idVendor=0403, idProduct=6001 [ 7632.477538] usb 2-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 7632.477539] usb 2-2.3: Product: USB <-> Serial [ 7632.477540] usb 2-2.3: Manufacturer: FTDI [ 7632.484472] ftdi_sio 2-2.3:1.0: FTDI USB Serial Device converter detected [ 7632.484492] usb 2-2.3: Detected FT232BM [ 7632.488098] usb 2-2.3: FTDI USB Serial Device converter now attached to ttyUSB1 [ 7632.806779] usb 2-2.4: new full-speed USB device number 20 using uhci_hcd [ 7633.023781] usb 2-2.4: New USB device found, idVendor=0403, idProduct=6001 [ 7633.023784] usb 2-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 7633.023785] usb 2-2.4: Product: USB <-> Serial [ 7633.023787] usb 2-2.4: Manufacturer: FTDI [ 7633.031252] ftdi_sio 2-2.4:1.0: FTDI USB Serial Device converter detected [ 7633.031290] usb 2-2.4: Detected FT232BM [ 7633.033538] usb 2-2.4: FTDI USB Serial Device converter now attached to ttyUSB2 [ 7633.351283] usb 2-2.5: new full-speed USB device number 21 using uhci_hcd [ 7633.570538] usb 2-2.5: New USB device found, idVendor=0403, idProduct=6001 [ 7633.570540] usb 2-2.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 7633.570542] usb 2-2.5: Product: USB <-> Serial [ 7633.570543] usb 2-2.5: Manufacturer: FTDI [ 7633.577373] ftdi_sio 2-2.5:1.0: FTDI USB Serial Device converter detected [ 7633.577394] usb 2-2.5: Detected FT232BM [ 7633.582237] usb 2-2.5: FTDI USB Serial Device converter now attached to ttyUSB3   I created the file /etc/udev/rules.d/45-serial_hub_map.rules with this rule:  BUS==usb, ID==2-2.2, NAME=SerialPort0   But the first port is still called ttyUSB0. I imagine that the error is in the rule definition, but I cannot figure where. Thanks for your help, Regards. Massimo


"a" or "an" in front of a word beginning with a vowel

I was writing a text when I came to say 'a union', then it struck me that I need to change the 'a' to 'an'. But for some reason, 'an union' didn't sound right.   Why doesn't it work? Is it because its a mass noun, instead of a regular noun?


Suppose there is a graph $G=(V,E)$. I want to test if $V$ can be partitioned into two disjoint sets $V_1$ and $V_2$ such that the subgraphs induced by $V_1$ and $V_2$ are unit interval graphs.  I know about the NP-completeness of determining interval numbers but the above problem is different. Now, in the literature I found  work by A. Gyárfás and D. West on multitrack interval graphs but I'm not sure if it is relevant to above problem.  Any citation to existing literature on the above or similar problem would be helpful. Also please let me know if there is a formal name for the above problem.


Please explain which is the best URL structure and why:  website.com/apartments-to-let/manhattan   or  website.com/apartments-to-let-manhattan   This is a property site. Is it best for the bots to break the properties/URL's down in categories?


Can we resize a already capped collection in mongo db

I have a capped collection whose initial size i gave 3 GB. Can I modify its size again i mean reducing or increasing both way as per need? is there any command to do it.  db.HourwiseArticleCount.stats(1024*1024); {     "ns" : "DB.HourwiseArticleCount",     "count" : 7055875,     "size" : 2554,     "avgObjSize" : 379,     "storageSize" : 2662,     "numExtents" : 2,     "nindexes" : 2,     "lastExtentSize" : 615,     "paddingFactor" : 1,     "systemFlags" : 1,     "userFlags" : 0,     "totalIndexSize" : 669,     "indexSizes" : {             "_id_" : 218     },     "capped" : true,     "max" : NumberLong("9223372036854775807"),     "ok" : 1 } db.runCommand({"convertToCapped": "HourwiseArticleCount", size: 2362232012}); db.HourwiseArticleCount.stats(1024*1024); {     "ns" : "DB.HourwiseArticleCount",     "count" : 5968662,     "size" : 2161,     "avgObjSize" : 379,     "storageSize" : 2252,     "numExtents" : 2,     "nindexes" : 1,     "lastExtentSize" : 205,     "paddingFactor" : 1,     "systemFlags" : 1,     "userFlags" : 0,     "totalIndexSize" : 184,     "indexSizes" : {             "_id_" : 184     },     "capped" : true,     "max" : NumberLong("9223372036854775807"),     "ok" : 1 } db.runCommand({"convertToCapped": "HourwiseArticleCount", size:2147483648}); db.HourwiseArticleCount.stats(1024*1024); {     "ns" : "DB.HourwiseArticleCount",     "count" : 5422132,     "size" : 1965,     "avgObjSize" : 380,     "storageSize" : 2048,     "numExtents" : 3,     "nindexes" : 1,     "lastExtentSize" : 0,     "paddingFactor" : 1,     "systemFlags" : 1,     "userFlags" : 0,     "totalIndexSize" : 167,     "indexSizes" : {             "_id_" : 167     },     "capped" : true,     "max" : NumberLong("9223372036854775807"),     "ok" : 1 }


How to prevent page numbers from appearing on glossaries?

I am using the glossaries package to make a glossary. However I don't want the page numbers where the entry is referenced to be shown after the description in the glossary. How can I do that? Actually I use in preamble:  \usepackage[acronym]{glossaries} \makeglossaries   and inside the document:  \printglossary[type=main,style=long]   I don't want the page numbers to be displayed because there are entries that are added in preamble with the command \glsadd{entry} and it will appear as present on page 1. And sometimes the page numbers list won't be complete, that is, there will be parts of the text which will contain one term and it won't reference directly the glossary.  How to prevent the page number to appear on glossary?


Why first strike wouldn't work in a single fight?

I've been playing on Android Magic 2015 game and noticed that first strike damage aren't dealt in a single fight (with  for example). Is this a bug in the game or is there a rule that prevent first strike to apply in this case?


make RGBA images to see edges from image in bottom

I have a panorama of mountains and photo, I want to place photo on panorama but I need to see (only) edges of mountains from panorama in my photo on top. So everything has to be invisible besides edges in photo. Should I make photo on top partly transparent or can I do it by changing A value if images are RGBA? Or if there is some tutorial for some photo editor (Gimp, etc.) but I hasn't found anything.  My En is bad so there are links to images and you will see what I want to do.   Thank you in advice, appreciate that.


Clustering with categorical and numeric data

I frequently come across data sets that have both categorical and numeric data.  I think this is just a fact of life where the data is not all in one category.  I'm basically trying to find some practical approaches or strategies on how to go about solving this problem.  In many books and initial searches on google I tend to get some sort of Kmeans clustering and a lot of phd-looking papers.  I think this is a common problem so I'm wondering if anyone can guide me to some practical suggestions or methods that I can further investigate and implement in R or Python?  I'm basically lost and just looking for some direction!


Do all the VDDIO pins need power in on a chip?

Question: I have a chip, AMTEL AT32UC3A4256S, with multiple VDDIO pins on. Do they all need a 3.3V power input or just one?  The power schematic from AMTEL shows a single decoupled VDDIO pin in their schematic -  BUT the pin out has many VDDIO pins.    Background: I am involved in a project as a systems engineer and another team is developing a custom PCB for an AMTEL AT32UC3A4256S. I decided that this would be a good chance to try and learn more about electronics and am doing some homework on the chip. It's a pretty complex chip to start out learning from but everything I find will be relevant to the project.


When and why is a Pool class needed to hold objects?

I've been studying opengl es and an example I saw was using a "Pool" class to keep track of touch and keyboard events.  Could someone please explain how and why a pool class is needed. From what I was reading it had something to do with garbage collection and limiting the number of input classes that are made.   This all seems a little abstract to me, so if someone could please explain what is going on, I'd appreciate it, I'll pasted some code here:      public Pool(PoolObjectFactory < T > factory, int maxSize) {                     this.factory = factory;                  this.maxSize = maxSize;                  this.freeObjects = new ArrayList < T > (maxSize);          }                 public T newObject() {                 T object = null ;                 if (freeObjects.isEmpty())                         object = factory.createObject();                 else                          object = freeObjects.remove(freeObjects.size() - 1);                     return object;          }       public void free(T object) {                  if (freeObjects.size() < maxSize)                          freeObjects.add(object);          }      PoolObjectFactory <TouchEvent> factory = new PoolObjectFactory <TouchEvent> () {           @Override          public TouchEvent createObject() {                   return new TouchEvent();          }       Pool <TouchEvent> touchEventPool = new Pool <TouchEvent> (factory, 50);      TouchEvent touchEvent = touchEventPool.newObject();      . . . do something here . . .      touchEventPool.free(touchEvent);   Thanks!


On a  the question which was a duplicate of the question is not visible:


What is the relationship between "macro" and "telephoto" lenses?

Can anyone explain the difference between "macro" and "telephoto"?  I know that a macro lens will give you a magnification of 1:1 but how does it differ from a telephoto lens?


What is going on here in this line:     -1[0[ptr]][0]


Can Windows 10 do an Update and Shutdown?

After my Windows 10 system gets an update I can clearly see the 'Update and Restart' option, but what happened to 'Update and Shutdown'?


I understand the defenition and theorems in real analysis.But i am try to know the applications of real analyais and how to apply. what are the applications of Real analysis?


Discreteness of branch points of a holomorphic map between Riemann surfaces

Let $X$ and $Y$ be Riemann surfaces (not necessarily compact) and $f:X\to Y$ a holomorphic map. A point $x\in X$ is said to be a ramificiation point of $f$ if the multiplicity of $f$ at $x$ is $\geq 2$. The set of all ramification points of $f$ is a discrete subset of $X$. A point $y\in Y$ is said to be a branch point if it is the image of a ramification point. Why does the set of branch points form a discrete subset of $Y$? (This is asserted in p.46 of Miranda's Algebraic Curves and Riemann Surfaces. If $X$ is compact then this is obvious because there are only finitely many ramification points. But I can't handle the general case.)


Can the Detect Magic spell detect prepared spells or spellcasters?

Inspired by a recent question about discerning divine and arcane spellcasters, of like to hear the case for and against detecting spellcasters of either style with .  I think you can detect whether someone has prepared spells, based on this language:     For the duration, you sense the presence of magic within 30 feet of you. If you sense magic in this way, you can use your action to see a faint aura around any visible creature or object in the area that bears magic, and you learn its school of magic, if any. (emphasis mine)   Preparing spells is described as having the spell "fixed in mind" (). I'd argue that qualifies as bearing magic, and opens the door to using detect magic to identify spellcasters with currently prepared spells. What do you think?


After reading  in which it is clearly stated that     Gold is operations (security, science, engineering, etc.), Red is command.   Why is Kirk dressed in Gold?


how much power is radiated by cell towers?

I want to know how much power is radiated by cell towers of GSM (1.8 Ghz), 3G (2.1 Ghz), 4G (2.6 Ghz) ?   I want links to references if exist.


Is there a difference between 'controlling for' and 'ignoring' other variables in multiple regression?

The coefficient of an explanatory variable in a multiple regression tells us the relationship of that explanatory variable with the dependent variable. All this, while 'controlling' for the other explanatory variables.  How I have viewed it so far:  While each coefficient is being calculated, the other variables are not taken into account, so I consider them to be ignored.   So am I right when I think that the terms 'controlled' and 'ignored' can be used interchangeably?


Why don’t humans have eyes at the back of their heads?

How does evolution rule out the possibility of humans or others fragile herbivores from having 2 pairs of eyes, one at the front and the other at the back of their heads? Why didn’t that ever happen?


Can the factorial function be written as a sum?

I know of the sum of the natural logarithms of the factors of n! , but would like to know if any others exist.


Most people seem to stumble over this. The problem can arise with any multi-word phrase that needs a possessive but ends in S, and so sounds awkward using the clitic apostrophe-S. I've heard this particular one variously rendered as:   You guys' You guys's Your guys' / your guy's   What's you guys...your...guises...what's your take on it?


How to get the value for public:// from the database

I'm in the process of exporting a gallery from Drupal to Wordpress. I'm trying to create an SQL query on the drupal DB that will return to me the URIs of the files. (for automated import on the other side)   This seems like the easiest and non-intrusive way of getting the images. However, at the end I get public://some_file_name.jpg type of strings. When I look at the current live site, it's also clear that the value of public:// is vastly different for different images / galleries.   This is my Query so far:  SELECT n.nid, td.description 'category', n.title 'album_title', n.created, img_title.field_photos_title 'img_title', f.uri FROM bcb_old.node n   JOIN bcb_old.field_data_field_photos img_title on n.nid = img_title.entity_id     JOIN bcb_old.taxonomy_index ti on ti.nid = n.nid     JOIN bcb_old.taxonomy_term_data td on ti.tid = td.tid     JOIN bcb_old.file_managed f on f.fid = img_title.field_photos_fid WHERE n.type ='gallery_2'   AND n.status = 1   Can someone point me in the direction of how to translate public:// into either a url? (relative or absolute doesn't matter)  edit: This is not a duplicate of . I'm asking for a SQL solution. Not a PHP one. I don't want to add code to the live environment and it is not my place to do so. That's why I want a DB only solution.


"Share with" e-mail invitations not being sent even though all other e-mails work in On-Premise SP 2013

We do not have on-premise SharePoint 2013 in production but the three dev farms that I have access to all have the same odd behavior. The majority of SMTP functions work correctly (adding to groups, alerts, etc.) but the "share with" option inside of document libraries do not send an e-mail invitation. Permissions are changed correctly so you can manually send a link but this is not how we want this system to work.  There are no event log errors that I can find related to this and since other SMTP functions work, I doubt that there are firewall or mail host configuration error. They are single front-end test farms. Any suggestions on where to look?


Let $\alpha ,\beta ,\delta$ be ordinals such that $\alpha < \beta$, prove that there is $\delta \leq \beta$ such that $\alpha+\delta = \beta$ ? I know that if $\beta$ is cardinal then we can take $\delta=\beta$.


I'm using winedt for Latex. sometimes I'm only working on a section of my paper and want to recompile to PDF without going through the whole time-consuming compilation. Is there a way I can tell Latex I've just changed a part of the text (or a section) so that it goes faster.   I know about \includeonly but this seems to work on specific chapters rather than at a micro level like my problem.


I use the following pattern for regex match in grep (zgrep, as searching within compressed files) as  zgrep -P '(?<=start).{20,120}(?=end)' *   I need to add some terms with OR operator in the middle, but this pattern does not work  zgrep -P '(?<=start)[first|second|third].{20,120}(?=end)' *   How can I introduce first|second|third in the middle of the matching string?


How do I skip the "known_host" question the first time I connect to a machine via SSH with public/private keys?


Why is Ext$(-;k) =0$ when $k$ is a field

I've seen the result repeatedly that $\text{Ext}(-,k) =0$ when $k$ is a field. I am yet to see a justification of this however.


Help with integral $\int\frac{1}{\sqrt{\tan x}}dx$

I tried to solve by parts but it did not help.


when I load this in my browser this is the error that I receive but I cant seem to find out what is wrong with it. Does anyone have any suggestions on how to solve this issue.  <?php   define('DOCUMENT',"C:/XAMPP/htdocs/test/"); define('DOC_ROOT' , DOCUMENT); define('DS' , "/");  define('INCLUDES', DOC_ROOT . 'includes'. DS);  define('MYSQL_DIR' , DOC_ROOT . 'mysql' . DS  ); define('MODELS_DIR' , DOC_ROOT . 'mysql' . DS . 'models' . DS );  require_once MYSQL_DIR . 'db_connect.php';    ?>   Warning: require_once(C:/XAMPP/htdocs/test/mysql/db_connect.php): failed to open stream: No such file or directory in C:\xampp\htdocs\test\defines.php on line 12  Fatal error: require_once(): Failed opening required 'C:/XAMPP/htdocs/test/mysql/db_connect.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\test\defines.php on line 12


Format money value into pounds and pence

I have helper function formatting my money value into pounds and pence:  formatMoney: function(10496.470000000001){     return value.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "1,"); },   Gives me:  11,496.471,001,001,001  Is there a way I can format this accurately into pounds and pence? so it reads, £11,496.471p