Whenever we register a new domain name from a Registrar, we need to tell them what is the nameserver by providing them the dns server IP address.   But in the same time in the zone file of our dns server (I will use bind9 in this case), we also add the RR like the following:  abc.net.    IN NS ns1.abc.net. abc.net.    IN NS ns2.abc.net.   which is the authoritative record.  1)So what is the purpose of having the authoritative record of NS in the zone file of abc.net, since when one trying to resolve let say www.abc.net, the TLD .net already tell us they are in ns1.abc.net and ns2.abc.net ?   2)Since from the delegation concept point of view, NS record only need to be stored in the parent of the zone, meaning root server NS tell us NS of .net, .net server NS tell us the NS of .abc.net and .abc.net NS resolve the dns query. so in order to resolve www.abc.net, there are only 3 set of NS IP address we need to know:   root server NS that tell us where is .net, .org, .uk, .it...etc. root server NS IP is store in bind9 named.ca .net NS that tell us where is .abc.net, .xyz.net, ...etc. .net NS IP is stored in root server NS record. .abc.net NS that tell us where is www.abc.net, mail.abc.net,...etc. .abc.net NS IP is stored in .net NS record.  so since we don't have any www.subdomain.abc.net, we shouldn't need to store any NS record for .subdomain.abc.net, isn't it ?   3)What will happen if I don't put the NS record of abc.net in my abc.net zone file ?   4)What if I have NS record in my zone file but not in the Registrar? which one will be the resolver take ?  There are a detail , but I still don't understand the meaning behind it.

$ORIGIN example.com. ; not necessary, using this to self-document  $TTL 3600 @        IN     SOA   ns1.example.com. admin.example.com. (                       1970010100 7200 1800 1209600 300)  @        IN     NS   ns1.example.com. @        IN     NS   ns2.example.com.  @        IN     A    198.51.100.1 ns1      IN     A    198.51.100.2 ns2      IN     A    198.51.100.3  sub1     IN     NS   ns1.example.edu.  sub2     IN     NS   ns1.sub2 ns1.sub2 IN     A    203.0.113.1 ; inline glue record   The role of a NS record beneath the apex of a domain is well-understood; they exist to delegate authority for a subdomain to another nameserver. Examples of this above would include the NS records for sub1 and sub2. These allow the nameserver to hand out referrals for portions of the domain that it does not consider itself authoritative for.  The purpose of the NS records at the apex of a domain, ns1 and ns2 in this case, seem to be less understood by the internet at large. My understanding (which may not be holistic) is as follows:   They are not used by caching DNS servers in order to determine the authoritative servers for the domain. This is handled by , which is defined at the registrar level. The registrar never uses this information to generate the glue records. They  used to delegate authority for the entire domain to other nameservers. Trying to do so with software such as ISC BIND will not result in the "expected" referral behavior at all, as the nameserver will continue to consider itself authoritative for the zone. They are not used by the nameserver to determine whether it should return authoritative responses (AA flag set) or not; that behavior is defined by whether the software is told to be a master or a slave for the zone. Most nameserver software will quite happily serve apex NS records that disagree with the information contained by the upstream glue records, which will in turn cause well-known DNS validation websites to generate warnings for the domain.   With this being the case, what are we left with? Why are we defining this information if it doesn't appear to be consumed by caching DNS servers on the internet at large?


I am about to begin my PhD in the applications of duality and holographic techniques to open problems in condensed matter physics. An area often called AdS/CMT. Having seen some relevant reviews, I realize that it is easy to find some nice descriptions and discussions concerning how holography is used to tackle such issues, i.e. holographic superconductors etc. However, in most such reviews the origin of the correspondence is only at best motivated, lacking any detailed discussion.   I would like to ask your opinion about which two or three seminal papers regarding AdS/CFT should I focus on, in order to gain a deeper understanding on how the original correspondence was formulated on the first place. Brief remarks together with your suggestions are more than welcome.

seems like a really hot topic and I'd like to start reading about. I am looking for the best introduction at my level, i.e. I have a background in QFT, CFT and general relativity at the level of a master student in theoretical physics. What would you recommend me to start tackling the subject? I have been looking for resources and so far I have noticed:  -this synthetic introductory lectures by Horatiu Nastase:   -the videos of lectures done by P. Vieira at Perimeter for Perimeter Scholar International students:   -the subject starts entering the most recent textbooks on string theory. We have the Schwartz and Becker (  ) and also the Kiritsis (  )  I probably missed a lot of resources, as the literature on the subject is already quite huge. I would really appreciate some advice on that, as I already had the frustration of losing my time on not-so-good books when started to learn something new, so if I could (to the best) avoid that this time...


So, how can I recover password of root account using only terminal? I have only terminal (not sudo), and no GUI acces

On my mac I have 2 accounts and the both are normal account. So in this moment I don't have a Administrator account, only one that was in the past a administrator, but now is not.  How I can have again a Administrator account?


It is known that X is a random variable which follows Poisson distribution Po(λ), Y is a random variable which follows Binomial distribution Binomial(X,p). The problem I encountered is: Proof that Y~Po(pλ). I tried two approaches but none of them is satisfying. Method 1: Since the mean and variance of X are both λ, each trial of X has the same success rate p, so the mean and variance of Y are both λp. Hence, Y~Po(λp). But I have made an assumption here is that a distribution of which the mean and the variance are the same is a Poisson distribution, but this clearly not a fact. Method 2: I used the Poisson limit theorem to proof, i.e. Po(λ) = lim(n->inf) Binomial(n,λ/n) But the maths becomes complicated uncontrollably. So, are there any rigorous proofs for this problem?

I have been stuck with a problem for a couple of days regarding the distribution of outcomes from a two-stage process. Specifically, what is the distribution of the number of successes in a poisson process followed by a series of bernoulli trials, where the number of trials is determined by the result of the poisson process. If this is not clear, I’ll explain by way of example.  Suppose we have a hunter who is setting out to catch rabbits. To do this he sets up a trap. Rabbits pass over the trap at a rate of $r$ times per day (poisson distributed). However, the trap is not very good. If a rabbit walks over the trap, there is only a $p$ (probability) chance that it activates.  If the trap has no limit on the amount of rabbits it can catch, what does the distribution of rabbits caught per day look like?  My intuition is that it should follow a poisson distribution with mean $r.p$. However, I have been unable to prove this analytically. I figure that the probability of a given number of ‘successes’ should be calculable through the poisson distribution and the binomial distribution. Something like:  $ P(X=x) = \sum_{i=x}^{Inf} poisson_{pmf}(i | r) . binomial_{pmf}(x | i, p) $  We can then substitute in the respective mass functions into the above equation. However, beyond that I am getting stuck. Any help or a point in the right direction would be great appreciated.


Starting from the upcoming semester besides my research for the PhD, I will also have to work on a loosely related project (w.r.t. my research), and do teaching as well.  I am overwhelmed from this. It seems that I will never have enough time for the actual research while the project work (50%) and teaching will eat up all my time.  Besides these duties there are also students to supervise, lab to maintain etc.  How do the more experienced ones in AcademiaSE deal / have dealt with such situations?

I am a first year PhD student, and it's the fourth week of school. I am taking two classes, doing one grad class TA and doing a lab rotation. I am in Electrical Engineering (Controls and DSP).   I start my day thinking- "I'll go to class from 10 am to 12 pm, solve 5 homework problems from 1 pm- 3 pm, do some TA work from 4 pm to 6 pm, and read a bunch of papers from 7 pm to 9 pm, then cook and sleep. How optimistic.   In reality, when I start the homework problems at 1 pm, I end up having to read a bunch of textbooks to understand stuff in it (I'm doing Convex Analysis), and by the time 3 pm rolls around, I have finished only one problem. Feeling discouraged, I keep at this homework, vowing to stop only when I'm done with my quota of 5. My efficiency starts to drop severely after a few hours, but since I'm in school with my laptop and stuff, I can't go anywhere to 'relax', so I just keep sitting and start redditing or something. And then my concentration further drops when I try to resume real work. This goes on, I miss dinner, I sleep late, and the efficiency just plummets through the week.   My past couple of weeks have been so inefficient, I want to do something about it before it's too late.   In short, my question is, when your work is way too difficult to achieve your goal of the day in your allotted time, do you switch work, or do you keep going? I have always believed that output is more important than input, that is, putting in two hours for each task without achieving much in anything is not as good as putting in, say, eight hours for just one and finishing something in it nicely. However, this strategy of mine is failing me for the first time in my life, because even if I put in eight hours, I am not able to finish anything. The work is so difficult. I'm not complaining, just really need guidance.


I have a method here that is supposed to check if a user has entered a "y", pertaining to the answer yes; or an "n" pertaining to the answer no. It reads in the letters entered by the user correctly, however it keeps saying that the user has not entered a "y" or an "n". If someone could let me know what I'm doing wrong that would be great. Here is the code I'm using :   String answer = ""; do {  while (answer.equals("")) {   answer = sc.nextLine();  }  if (!answer.equals("y") || !answer.equals("n")) {   System.out.println("Please enter a y, meaning yes; or an n, meaning no.");   answer = "";  } } while (!answer.equals("y") || !answer.equals("n"));

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I just have a question in mind that's stuck in my head, and it's why particle accelerators cannot accelerate any particle to the speed of light. I'm assuming it involves Einstien's theory of relativity.

I'm in a freshmen level physics class now, so I don't know much, but something I heard today intrigued me. My TA was talking about how at the research facility he worked at, they were able to accelerate some certain particle to "99.99% the speed of light". I said why not 100%, and I didn't quite understand his explanation, but he said it wasn't possible. This confused me. Since the speed of light is a finite number, why can we go so close to its speed but not quite?  Edit: I read all the answers, and I think I'm sort of understanding it. Another silly question though: If we are getting this particle to 99.99% the speed of light by giving it some sort of finite acceleration, and increasing it more and more, why cant we increase it just a little more? Sorry I know this is a silly question. I totally accept the fact we cant reach 100%, but I'm just trying to break it down. If we've gotten so close by giving it larger and larger acceleration every time, why cant we just supply it with more acceleration? And how much of a difference is there between 99.99% the speed of light, and the speed of light? (I'm not really sure if "difference" is a good word to use, but hopefully you get what I'm asking).


How do you find the derivative of $x^{2/5}$ using the definition of the derivative?

I have a question that is highly similar to this one:  However, I'm not sure how to do this when fractional powers are involved. I understand that the answer involving the binomial theorem shows this for fractions too, but I'm not sure how to go through the mechanics of it all. For example, when trying to differentiate $\sqrt{ax+b}$, I get to   $$ \lim_{h \rightarrow 0}  \frac{\sqrt{a(x+h)+b} - \sqrt{ax+b}}{h} $$  then can't get the $h$ to cancel out. I think this involves algebraic manipulation of some sort, but can't figure it out.  Thanks


In a hurry..  \begin{tabular}{p{.5in}|p{1in}|p{1in}|p{1in}} \hline \multicolumn{1}{|c|}{S. No.} & {|c|Book Name} & Author &   \multicolumn{1}{|l|}{Publisher}\\ \hline a & b & c & d\\ \end{tabular}

I have this MWE:  \documentclass{article} \usepackage{multirow} \begin{document}     \begin{table}[here]         \begin{center}             \begin{tabular}{|l|l|c|}             \hline              \multicolumn{2}{|c|}{\textbf{SED}} & \multirow{2}{*}{\textbf{\% compressione}} \\             \cline{1-2}             \textbf{MC} & \textbf{DP} & \\              \hline              \hline             0.00016032 & 0.0001750267 & 10\%\\             \hline             \end{tabular}          \end{center}     \end{table} \end{document}   It realizes this image:   The first two columns are correctly formatted to the left, but I want it so that just MC and DP will be centered, how can I do that?


My path to get my MA was delayed following a family tragedy, and I'm finally in a position where I can get back on track, so I would like to reach out to a professor I previously did lab work for a couple years ago. I have some general questions for him, but I also would like to see if maybe he has a Research Assistant position available, or maybe knows other professors that might, to try to build up my experience again. I was wondering if anyone might know the best way to approach an email like this? I was thinking maybe starting by formally asking if he remembered me and maybe giving some details about the work I did for him, but then I don't know where to go from there. I'd prefer to meet in person, but is that okay to ask after such a long time?  Thanks in advance.

When needing to ask a professor about something important and potentially delicate, what is an appropriate way to phrase the question or write the email?  Examples include:   Requesting a recommendation letter Asking for exceptions to policy (e.g., ignoring a course prerequisite, rescheduling an exam) Asking if you can do research with them, join a group, get into a program Scheduling a meeting, exam, or defense Letting them know about a change of plans Letting them know about a life event affecting your work or studies (e.g., wedding, funeral, sickness, vacation)


In a liquid, the pressure is exerted by the weight of the liquid. As the force due to it's weight acts downwards, why is there an upward force at any point in a liquid?

I'd like answers both in the more intuitive side an on the more precise side.   Thinking of water as "cubes" of water, for example, would allow pressure in the z axis to be independent of the y or x axis. Choosing other "shapes", like a  triangular prism, yield different results. Will this fact, then, be dependent on the format of the molecules of the liquid ?  I've heard of the rotational symmetry of liquids. What is its precise statement ? Why is it true ?


after reading this class manual i found two main commands to be used, the first one being   \addbibresource{ref.bib}     to add the separate bib file to the document  and the secon one being  \printbibliography     to print the references in the end of the document  but regardless of how i try it just simply won't work  this is how my Test code looks like  \documentclass[rascunho]{fei}   \usepackage[utf8]{inputenc}   \usepackage{gensymb}   \usepackage{cancel}    \addbibresource{ref.bib}    \begin{document}  \begin{center}   \begin{vplace}   \begin{HUGE}{\textbf{\MakeUppercase{Fisica Moderna}}}   \end{HUGE}   \\   \vspace{0.2cm} Material-Base:  \\   \vspace{0.2cm}  R. Eisberg and R. Resnick, Quantum Physics of Atoms, Molecules, Solids, Nuclei, and Particles 2nd Edition, Wiley, 1985 \cite{eisberg1974quantum}.   \\   \vspace{0.2cm} H. Moysés Nussenzveig, Curso de Fisica Basica, 4a. edicao, Vol. 4, Blucher, 2002. \cite{nussenzveig2002curso}    \end{vplace}   \end{center}    \printbibliography    \end{document}     Every time i try to use the F11 command to call bibtex i get the following error message     This is BibTeX, Version 0.99d (MiKTeX 2.9.6500 64-bit) The top-level   auxiliary file: teste.aux I found no \citation commands---while   reading file teste.aux I found no \bibdata command---while reading   file teste.aux I found no \bibstyle command---while reading file   teste.aux (There were 3 error messages)      Process exited with error(s)   and i just dont know what else to try to do to fix this, this is how it looks after compiled:    my ref.bib file is the following:  @book{nussenzveig2002curso,   title={Curso de f{\'\i}sica b{\'a}sica},   author={Nussenzveig, Herch Moys{\'e}s},   year={2002},   publisher={E. Blucher} }  @book{eisberg1974quantum,   title={Quantum physics},   author={Eisberg, Robert and Resnick, Robert},   year={1974},   publisher={John Wiley New York} }

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


What is $e^A$, where$$A = \begin{pmatrix} 0 & 1 \\ 4 & 0 \end{pmatrix}?$$

How to calculate $\exp\left(t\begin{bmatrix}0 & z\\z^* & 0\end{bmatrix}\right)$, or $\exp\left(\begin{bmatrix}0 & v\\w & 0\end{bmatrix}\right)$ (where: $v, w \in \mathbb{C}$) in general?


I'm writing a c# console program that reads a configuration file and a google map example found .  I copied the html content into a local template file and put placeholders for string.format (notice the {1}, {2} in code snipped below.  I then read the template from the local file system and use the code below to populate the placeholders.  The problem is that the string.format keeps throwing error saying  Input string was not in a correct format.  If I replace the template with a blank file, the Input string was not in a correct format. is not thrown.  There are no exceptions. Thus, the problem is with the html template below and not the code.  Can someone spot the issue with the template that make so that it doesn't work with string.format?  I'm guessing that it has to do with { and } so I moved around any double (i.e. {{) but that didn't help.  Code    var res = string.Format(template,                 ConfigurationManager.AppSettings["PageTitle"],                 ConfigurationManager.AppSettings["zoom"],                 ConfigurationManager.AppSettings["CenterLat"],                 ConfigurationManager.AppSettings["CenterLongi"],                 ConfigurationManager.AppSettings["mapTypeId"],                  sb.ToString(),                 ConfigurationManager.AppSettings["strokeColor"],                 ConfigurationManager.AppSettings["strokeOpacity"],                 ConfigurationManager.AppSettings["strokeWeight"],                 ConfigurationManager.AppSettings["fillColor"],                 ConfigurationManager.AppSettings["fillOpacity"],                   ConfigurationManager.AppSettings["GoogleMapBaseUrl"].Replace("_KEY_",          ConfigurationManager.AppSettings["APIKey"])                  );   HTML Template  <!DOCTYPE html>    <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>{0}</title>

How can brackets be escaped in using string.Format? For example: String val = "1,2,3" String.Format(" foo {{0}}", val);  This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets?


I'd like to install libjbig-dev on Ubuntu 14.04 LTS. So I run  sudo apt-get install libjbig-dev   which returns  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libjbig-dev : Depends: libjbig0 (= 2.0-2ubuntu4) but 2.0-2ubuntu4.1 is to be installed E: Unable to correct problems, you have held broken packages.   So I do  sudo apt-get install libjbig0   which returns  Reading package lists... Done Building dependency tree        Reading state information... Done libjbig0 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   Now what? How can I install libjbig-dev? Thanks.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I have read that product of 4 consecutive integers is less than 1from a perfect square, but this question is quite different.

I need to prove the following, but I am not able to do it. This is not homework, nor something related to research, but rather something that came up in preparation for an exam.     If $n = 1 + m$, where $m$ is the product of four consecutive positive   integers, prove that $n$ is a perfect square.   Now since $m = p(p+1)(p+2)(p+3)$;     $p = 0, n = 1$ - Perfect Square      $p = 1, n = 25$ - Perfect Square      $p = 2, n = 121$ - Perfect Square   Is there any way to prove the above without induction? My approach was to expand $m = p(p+1)(p+2)(p+3)$ into a 4th degree equation, and then try proving that $n = m + 1$ is a perfect square, but I wasn't able to do it. Any idea if it is possible?


Some days ago I downloaded a .deb file that does not have a descriptive name and I want to know which version it is before executing dpkg -i.  I do not know if the same package also comes in a repository, so I am looking to extract this information from the actual file, rather than querying the repository's database.

I want to see the version of a package before I install it. How can I do this?


I really need to access the administrator password but I forgot it. BUT I really don't want to reset or change it. I just need to know the current password.

I am not a administrator and I would like to find the administrator password. I would not like to reset it however. Is there anyway to find and not reset the administrator password?


When you are writing about the seasons, should you capitalize their names?  For example, would you say:     I love the colors of the leaves in Autumn.   Or should you say:     I love the colors of the leaves in autumn.

Which sentence uses the correct capitalization for the name of the season?     I will travel in the summer of 2013.   or     I will travel in the Summer of 2013.


I have MediaTek (Ralink) MT7601U USB, and with their source, but I am user  anyone can help how to run this USB Wifi?

I am trying to install a Ralink wifi adapter in Ubuntu Desktop 14.04.  The system is not detecting the wifi.   lsusb lists the device as:  Bus 002 Device 004: ID 148f:7601 Ralink Technology, Corp.  I have the rt2800 USB driver listed in "/etc/modules"; Following some instructions on the web, I tried this command:  echo 148F 7601 | sudo tee /sys/bus/usb/drivers/rt2800usb/new_i  lsmod | grep rt2800 returns the following:  rt2800usb              26581  0  rt2x00usb              20041  1 rt2800usb rt2800lib              83150  1 rt2800usb rt2x00lib              48886  3 rt2x00usb,rt2800lib,rt2800usb mac80211              545990  3 rt2x00lib,rt2x00usb,rt2800lib crc_ccitt              12627  1 rt2800lib


I've tried this   That didn't work.  I've tried deleting "diskspaced" from the disk using sudo, it didn't allow me to delete it.  What's a fool-proof way to silence these bloody notifications?

After upgrading to macOS Sierra, I'm getting the notification that "Your disk is almost full. Save space by optimizing storage.":    The options appear to be to store my files in iCloud, automatically delete files, or manually delete files:    My problem/irritation is that I have 80GB free of my 440GB volume.  The question: is there a way to silence this notification in a (semi-)permanent fashion, or to change the threshold it uses for the notification?


I'm seeking the man page info for a switch for a given command. I tried for example man sort | grep -A2 "-n,". I expected something like:  -n, --numeric-sort     compare according to string numerical value   as output and instead I got  Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' for more information.

I often want to search through a man page, however I am forced to either do:  man <package> | grep <search>   Or:  man <package> > file.txt   But there must be an easier way than this to do this, so how can I search through a man page while in it instead of having to send its contents to a file, or use grep to print the necessary matching contents to standard output?


What's the difference between en0 and eth0?  In my CentOS 6 VM, there is list of network-scripts:  [root@localhost /]# ls /etc/sysconfig/network-scripts/ ifcfg-en0    ifdown-ipv6    ifup          ifup-plip    ifup-wireless ifcfg-eth0   ifdown-isdn    ifup-aliases  ifup-plusb   init.ipv6-global ifcfg-lo     ifdown-post    ifup-bnep     ifup-post    net.hotplug ifdown       ifdown-ppp     ifup-eth      ifup-ppp     network-functions ifdown-bnep  ifdown-routes  ifup-ippp     ifup-routes  network-functions-ipv6 ifdown-eth   ifdown-sit     ifup-ipv6     ifup-sit ifdown-ippp  ifdown-tunnel  ifup-isdn     ifup-tunnel   you see there are ifcfg-en0 and ifcfg-eth0, does it have any difference between them? the ifcfg-eth0 I have used(configured data in it), now I want to add a more IP address, which file I can configured?    EDIT-01  The  is not related to my post, mine is enX.

When I run ifconfig -a, I only get lo and enp0s10 interfaces, not the classical eth0  What does enp0s10 mean? Why is there no eth0?


And how to set it up as ALT+F4? (With the intended effect of closing windows)  PS: the "another question" asks for the purpose of it and doesn't address the need to make it to be ALT+F4.

I used to close a running application by pressing ALT+F4. But, I realised that the application is still running and the correct way to close (quit) it is the combination of Ctrl+Q keys.  So, what is the purpose of ALT+F4 and how is it different from Ctrl+Q?


My freewheel stopped working. I can still pedal forward, but not backward. What's wrong with it?

I've taken the rear wheel off my bike but the rear gears are stuck and do not spin freely anticlockwise.  It had been out of use for about 4 days, kept in a dry garage. I took the wheel off because it was bent, then found this problem.  Any idea what's happened or if i can fix it?


import java.util.Scanner;  public class LoginPage{  public static void main (String[]args){  System.out.println("______________"); System.out.println("| Login Page |"); System.out.println("______________");  System.out.println();  //Declare Strings String Log; String Pass; String TestU = "Corey"; String TestP = "Chicken"; int i = 0; //Declare Scanner Scanner scan = new Scanner (System.in);  while(i<=6){     System.out.print("Username: ");     Log = scan.nextLine();     System.out.print("Password: ");     Pass = scan.nextLine();     i++;      if((Log==TestU)&&(Pass==TestP))     {break;}  }  }  }   This is the current code for a login page i'm trying to create. The 'TestU' and 'TestP' are just there instead of usernames/password that i will read from a data file. But when i enter in 'Corey' and 'Chicken' it doesn't exit the while loop. I might just be doing something very simple wrong but i cannot find it and i cannot find it on google or anything(Maybe i'm searching the wrong problem.) But any help would be greatly appreciated.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


So I have tried to make a solution for a predicate logic proof, and would like if someone could give a hint to come to the correct proof.   I already know that Line 11 is incorrect since it only holds in the assumption.  And the same for line 9, since its in two different assumptions.   Any help to how I should proceed, would help me a lot

I'm currently trying to prove the following:    And this is what I've come up with so far:    And now I'm stuck. Perhaps the next step might be to eliminate for all x?  I'm sorry for using links, but it seems like I'm not allowed to do it otherwise due to needed reputation point.  Help would be appreciated.


One of the more active  on one of my sites has an issue with his user-picture. Namely, it keeps changing on us, and it's really annoying.       I've , and , and his  was  @Shokhet I have no idea! I thought i noticed something funny going on with the pics. You didn't believe me when I told you technology and i don't get along, did you? Now you believe me?  Can we please get this fixed? It's really annoying, as I use those profile pictures to help me quickly identify who posted what, and 6591 is one of the really good guys.

I am using a generic avatar, and it changes daily. Is this a feature or a bug?


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

After I add a user using adduser, I can't see it via System > Administration > Users and Groups unless I log out and then log in again. Is that normal?  Also, can I set a newly added user as a sudoer or do I have to change that only after adding it? How can I do that via the shell?  Finally, can I delete the original user that was created upon initial installation of Ubuntu, or is this user somehow 'special'?


I need to prove $$\sum_{k=1}^n(2k)^2 = \frac{2n(n+1)(2n+1)}{3}$$ using mathematical induction. I tried solving this but I got stuck when proving that this is true for n=k+1.  I would be very thankful if someone could help me.

I encountered the following induction proof on a practice exam for calculus:  $$\sum_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6}$$  I have to prove this statement with induction.  Can anyone please help me with this proof?


I know lot of questions stackoverflow on this topic one but I did't find answer to this one.  struct message {     int  myint; };  int main(void) {   switch(1)   {     case 0:       break;     case 1:       int i; // this is fine, but int i = 10; is compile error       break;     default:       break;   }   return 0; }   Logically speaking why is defining variable and initializing it with some value is different than just defining variable for 'case labels'?

I've always wondered this - why can't you declare variables after a case label in a switch statement?  In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work:  switch (val)   {   case VAL:     // This won't work   int newVal = 42;     break; case ANOTHER_VAL:     ...   break; }     The above gives me the following error (MSC):     initialization of 'newVal' is skipped by 'case' label   This seems to be a limitation in other languages too.  Why is this such a problem?


If a body with an accurate clock is moving away from A which is stationary, then the time in B would be slower than that in A. Since relative to B A would have an equal velocity time in A would be slower than that in B. This results in a contradiction. This is the argument given in this . Can someone say how this argument is wrong from a deeper study of SR.?

It is said that we can verify time dilation by flying a very accurate clock on a fast jet or spaceship and prove that it registers less time than the clocks on earth. However, the clocks on earth would be moving relative to the clock on the spaceship, and since time always dilates and never goes faster regardless of the direction of relative motion,  the clocks on earth should register less time than the clock on the spaceship.  Is this true? Whenever there is a fast-moving object such as a rocket do all clocks on earth really become slow?  If the rocket with the clock landed after moving at relativistic speed, would its clock and the earth's clock again show the same time since during its travel both appeared slow to each other?  Or is all this just an illusion, ie. the clocks just appear to be slow to each other but in actually run at normal speed, and neither is behind when the rocket actually lands?


I would like to create a form with CCK.  The user should be able to create unlimited number of "people" :   M    -  Smith   -   John Mrs  -  Dave    -   Lily M    -  John    -   Doe ...   So I need a Select (with gender) - textfield (last name) - textfield (first name).  I can not create each field to unlimited it would not be linked. I have tried field_group, but it does not give me the ability to put multiple value.  What would be the best way to do that ? I thought about create my own field with those 3 inputs. but it seems way to complicated for the simple thing I need to do. further more I cannot find any good tutorial.  EDIT : I'm using Drupal 7

I've used  in the past to do multiply occurring series of field groups; now, working on a Drupal 7 project, I'm setting up a "Resume" content type and need a way to set up repetitive entries for education/work experience.   IE: for "Education", I need the ability to dynamically add new rows comprised of a combination of dates and places for each institution studied at.  What is the best way to accomplish CCK3 multigroup/FlexiField-like functionality in Drupal 7?  Thanks!


The small reputation graph on the profile page is broken in Edge and IE:     While in Chrome it looks like this:    Firefox also shows it correctly. I have not tested Safari.  I know the Edge rendering engine is going to go away at some point, so this issue will disappear in the long run, but it'd be nice if Stack Exchange worked on all browsers, not just the main ones.  Seeing as you are redesigning the profile page, seems like an ideal time to fix it. 🙂  Tested versions: Chrome 71.0.3578.98, Firefox 64.0, Edge 44.17763.1.0, IE 11.195.17763.0, all on Windows 10 1809 (17763).

Which browsers are officially supported by Stack Exchange?  Also, what else is needed in order to use every feature of the site?


I want to know if I can create an animation in a separate Blender file, and put it into another file so I don't have to worry about the scenery in my Animation. Thanks!

I have created several designs for a particular project and they are related, but I don't want to have to keep recreating any similar elements, such as shared materials or textures.  How can I use the existing data in a new Blender file?


I use String.Compare like below sample  static void Main(string[] args)     {         int result = String.Compare("A", "a");         Console.Write(result);         Console.ReadKey();     }   but , when run the program , result is 1 . but i except result will be -1 . i use vs 2013 .

When comparing two strings in c# for equality, what is the difference between InvariantCulture and Ordinal comparison?


I want to change my OS from windows to UBUNTU. So what I did is below.  I downloaded the Ubuntu 16.04.3 LTS from  saved it in a usb and set the boot order of USB to be the first boot in BIOS. But the installation failed.  What causes the installation to fail? after saving the changes in BIOS the laptop restarts and goes to windows      Additional information  Laptop is new and i am installing to change os to practice programming better.

I would like to see a full how-to guide on how to install Ubuntu.


Is it true you shouldn't rely on placeholder alone for form input fields?   ie -    Because putting the same text as the title seems reduntant:  ie -    Is there a reason why a title is necessary for simple/self explanatory form fields?

I am familiar with research on label placement to the left or above. I tend to go with right justified with the label to the left of the field for my form designs.   However, inline placeholder text is trending and it does further reduce page clutter. Is there any research out there supporting its use? Has anyone conducted usability studies on their forms that they can share?    Research Links:


Many times in physics when we analyze a physical system mathematicly we get divergences, but when those divergences has no dependence on any actual physical quantity of interest we tend to disregard those "infinity Constants".   An example where such a thing happens is in the derivation of the Casimir force for two metal plates we get $\zeta(-3)$ which contains infinities.  One can provide many more examples where we make this analytical approach.  My question is why those infinities are treated this way, is there a deep mathematical reason why we do it?

For starters, let me say that although the Casimir effect is standard textbook stuff, the only QFT textbook I have in reach is Weinberg and he doesn't discuss it. So the only source I currently have on the subject is . Nevertheless I suspect this question is appropriate since I don't remember it being addressed in other textbooks  Naively, computation of the Casimir pressure leads to infinite sums and therefore requires regularization. Several regulators can be used that yield the same answer: zeta-function, heat kernel, Gaussian, probably other too. The question is:     What is the mathematical reason all regulators yield the same answer?   In physical terms it means the effect is insensitive to the detailed physics of the UV cutoff, which in realistic situation is related to the properties of the conductors used. The Wikipedia mentions that for some more complicated geometries the effect is sensitive to the cutoff, so why for the classic parallel planes example it isn't?  EDIT: Aaron provided a wonderful Terry Tao ref relevant to this issue. From this text is clear that the divergent sum for vacuum energy can be decomposed into a finite and an infinite part, and that the finite part doesn't depend on the choice of regulator. However, the infinite part does depend on the choice of regulator (see eq 15 in Tao's text). Now, we have another parameter in the problem: the separation between the conductor planes L. What we need to show is that the infinite part doesn't depend on L. This still seams like a miracle since it should happen for all regulators. Moreover, unless I'm confused it doesn't work for the toy example of a massless scalar in 2D. For this example, all terms in the vacuum energy sum are proportional to 1/L hence the infinite part of the sum asymptotics is also proportional to 1/L. So we have a "miracle" that happens only for specific geometries and dimensions


My brother downloaded a game on his ps4 console, and I would like to play that game on my console without buying it myself. Is this possible?

So this is the situation:   My brother received a PS4 on his birthday. He doesn't have a PS+ account, and I don't have a PS4, so I activated it as my primary PS4. Based on what I've read on the FAQ, any user can play my digital games and do online gaming since I activated the system as my primary PS4. A friend offered his account so we can play his digital games. He has a primary PS4 activated.   The question is, can we really play his games without any issues? For example, can we download GTAV from his account and play it using any account on our PS4?


I have a Plantronics BackBeat Sense SE bluetooth headset. When Connecting it to Windows 10, it installs two profiles in Playback devices list:    PLT_BBTSENSE Hands-Free. PLT_BBTSENSE Stereo.   The Second one (Stereo) is set to be the "Default Device" and the "Default Communication Device" on the system.   At this point the sound works great and normally. The problem happens when I want to use the mic. When I start any program that uses the mic (recorder, chat, VoIP Calls, gaming, etc.) The sound suddenly stops working And I can only use the mic until I stop the recorder or the call.   The thing that kind of fixes the problem is setting the (Hands-Free) as the default device. I can hear the sound when I do that and it works with the mic but it becomes Very bad quality.  What I became to understand is that bluetooth had different profiles for sound and mic: A2DP and HSP. The first handle the voice(High Quality) but the latter handles the mic and reduces the sound quality.  Is this really the case? Is there anyway to make them work simultaneously? Is there any solution to this problem at all?

Is it somehow possible to get better audio quality sound when Bluetooth headphones are on hands-free mode?  When it is audio only, sound quality is good (16-bit 44 kHz) but when I talk through the microphone, audio quality is changed to poor (16-bit 8 kHz) like an old radio. Or I do not hear something through headphones. I have Creative Sound Blaster Jam.  Simple, have set Bluetooth Audio Renderer (Bluetooth stereo audio), for playing, with Bluetooth Audio Input Device (Bluetooth Hands-free audio), for recording?


What is the title of this movie? I think it's set somewhere in Europe. There were a group of friends in a yacht in the middle of the sea when a strong storm capsized their boat. Some managed to survive and drifted to an island with small village. Apparently, they are killers and skin their preys and wear them. There is also a beautiful lady with lower limbs of an octopus tentacles. She fell in love with the male main character. In the end, that character is one of them - the sea creatures.

There is a movie I watched many years ago. I can hardly remember its title. The movie was set on an island. The story goes like this: A group of friends were on a yacht when a strong storm capsized their boat. They managed to survive and landed on a remote island with small village. Its inhabitants act strangely. They are killers who skin their victims and wear them. There is a beautiful lady with octopus tentacle legs. She fell in love with the main character.


I wanted to create bash binding so that ctrl+backspace deletes word in terminal. But I somehow ended up screwing up my backspace and now it doesn't work, it outputs character. I know I can list all binding with bind -P but can't delete them or find where file with bindings is located. I have .inputrc but its empty.

I bound some keys by mistake, and they don't work any more, such as HOME, END, UP, DOWN, LEFT, RIGHT.  Is there a way to reset all the bound keys to their original state?


Let $A$ and $B$ be disjoint compact subsets of a Hausdorff space $(X,τ)$. Prove that there exist disjoint open sets $G$ and $H$ such that $A⊆G$ and $B⊆H$.  This one was getting a bit messy for me, but my idea is to first fix a point $x$ in $B$ and then apply Hausdorff property on points of $A$ so for all points an in $A$ with $x$ in $B$ we can find disjoint open sets containing them. We can say $U_a$ and $V_a$ be the set of all open sets we just created such that $U_a$ and $V_a$ are disjoint. We note that $U_a$ is an open cover for $A$ and we can pick out a finite subcover. Then we select another point in $B$ and repeat the same process and do this for every single point in $B$. Then we have a family of finite subcovers each corresponding to each point in $B$. We can take the intersection and call it $W$ and let that be the open set that contains $A$. Then the next step would be to repeat everything above by fixing a point in $A$ and cycling through points in $B$ then fixing another point in $A$ and create a family of open subcovers to cover $B$ and intersect them all and call that $G$. Now I believe $A$ is contained in $W$ and $B$ is in $G$ and $W$ and $G$ are disjoint. A concern I have is that while each subcover is finite, the family of subcover may be uncountable and the intersection of uncountable open sets are not always open.

I want to show that any two disjoint compact sets in a Hausdorff space $X$ can be separated by disjoint open sets. Can you please let me know if the following is correct? Not for homework, just studying for a midterm. I'm trying to improve my writing too.  My work:  Let $C$,$D$ be disjoint compact sets in a Hausdorff space $X$. Now fix $y \in D$ and for each $x \in C$ we can find (using Hausdorffness) disjoint open sets $U_{x}(y)$ and $V_{x}(y)$ such that $x \in U_{x}(y)$ and $y \in V_{x}(y)$. Now the collection $\{U_{x}: x \in C\}$ covers $C$ so by compactness we can find some natural k such that  $C \subseteq \bigcup_{i=1}^{k} U_{x_{i}}(y)$   Now for simplicity let $U = \bigcup_{i=1}^{k} U_{x_{i}}(y)$, then $C \subseteq U$ and let $W(y) = \bigcap_{i=1}^{k} V_{x_{i}}(y)$. Then $W(y)$ is a neighborhood of $y$ and disjoint from $U$.  Now consider the collection $\{W(y): y \in D\}$, this covers D so by compactness we can find some natural q such that $D \subseteq \bigcup_{j=1}^{q} W_{y_{j}}$.  Finally set $V = \bigcup_{j=1}^{q} W_{y_{j}}$, then $U$ and $V$ are disjoint open sets containing $C$ and $D$ respectively.   What do you think?


A friend of mine wanted to convert his MBR boot drive to GPT to use UEFI. He accessed DISKPART over the command prompt within the Windows installation environment using SHIFT + F10 and used clean then convert gpt on his disk. After that he proceeded with the setup partitioning his disk and installing the system. What methods can we try to restore the partition table and files?

When I reinstall Windows XP by mistake I deleted all five partitions. I did not format them yet though.  How can I recover the partitions? When I attach the hard disk to another PC it just says that the partition is unformated and asks "Would you like to format it?".


I'm trying to replace a divs content with jQuery's .html() function and within that new content i want to create a button, containing an ID that i can access from another function.   $('#content').html("
"        + " <input class='btn btn-primary' value='Button' id='button'> </input>"        +   "
");   After this i got another function that tries to access the button:  $('#button').click(function(e){     //... do something });   I inspected the generated button in Chrome and it tells me that it has the right ID but somehow nothing happens when i try to trigger it?   Any solutions on that?  Thanks in advance.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


How can I print the contents of a file minus everything including and below the line above the first occurrence of a pattern?  Say the pattern is "^Previous" on line 15; then I would like to print lines 1--13.

grep --before-context 5 shows 5 lines before the match.  I want to show everything before the match. Doing grep --before-context 99999999 would work but it is not very... professional.  How to show all the file up to the match?


I would like to use , a PowerShell implementation for mono on my CentOS box.  After compilation I started it and got  $ mono Source/PashConsole/bin/Debug/Pash.exe [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;mPash - Copyright (C) Pash Contributors.     License: GPL/BSD. See https://github.com/Pash-Project/Pash/ [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;m [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;mPASH /home/gbuday/projects/Pash> [%?%p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m[%?%p1%{8}%<%t40%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;0%;m    I was told that my terminal does not understand ANSI sequences.  I use gnome terminal. Is it capable of this with some configuration trick?  Or, I need to use some other terminal emulator software?


I want to go from $(0,0)$ to $(8,8)$ in this $8\times8$ grid. I can only move up or right.    However, I have to avoid the points $(3,3), (3,4), (4,3), (4,4)$ ($a,b,c,d$ in the figure). How many distinct paths are possible?

I was asked to find the no. of ways to get from (0,0) to (8,8) with the 4 points of the shaded box unpassable, aka I can't use the 4 points namely (3,3)(4,4)(3,4)(4,3) while on my way to (8,8). Right and up movements.  I know it is something like a pascal triangle and worked out the solution of 4050 ways.  May I know if there are any faster means using permutation formula?  Thank you in advance.


There have reports of issues with mobile site's ability to "flag" or "close" questions:       This seemed to have been fixed, however, when the new categories of close/flag votes were introduced the issue has reoccurred again.   As of now I am unable to "close" or "flag" from the mobile interface to the site.

This morning (it's about six AM here) I find that I can no longer submit close votes; the link just jumps to the beginning of the page.  I'm on iOS, using a third-party browser called Grazing, but a brief check with Mobile Safari shows the same problem there.   Here on Meta, where my score is much lower, I only get a "delete" link on my own question, and that works fine. (Oops :-))   Update: As per comments, this affects the "flag" link, too, which doesn't even scroll to the top of the page. Update 2: Latest comment suggests this affects Android, too. Update 3: This also affects desktop computers when viewing mobile (when you click "mobile" in the footer) Update 4:  mentions Windows 8, too; simply deleting platform-specific tags


is it possible to write/edit the files on the memory card with  i tried the command: termux-setup-storage but it only gives the permission to write on my device storage(/emulated/0/)

How do I access $HOME/storage Termux directory on Android Pie with a GUI File Explorer?  In Termux I print the working directory with pwd and it shows $HOME/storage as:  /data/data/com.termux/files/home   My internal storage looks like this:  . ├── Alarms ├── Android |   ├──data |   |  ├── ... |   |  ├── com.termux |   |  |   └── files |   |  |       └── 0 items |   |  └── ... |   └── ... ├── DCIM ├── Download └── ...   My external storage looks like this:  . ├── Android |   ├──data |   |  ├── ... |   |  ├── com.termux |   |  |   └── files |   |  |       └── 0 items |   |  └── ... |   └── ... └── LOST.DIR   Neither my internal storage, nor my sd card, contain a /data/ directory at the root level. Where is this /data/ directory? For that matter, where is the root /storage/ directory? Where is the root /emulated/ directory? Where are any of these directories and why cant I access any of them?


I am trying to prove the following using induction, and kind of stuck. I used a computer to validate this sentence. Using $n = 1$ gave the correct result. I assumed that this is true for some $n = k$, but how do I prove for $n = k+1$. Should logarithms be used? $$2\leq \left(1+\frac{1}{n}\right)^{n}\leq 3$$ I've seen similar solutions, but none with induction, I need a solution using the natural numbers, without limits and calculus.

(a)For $m,n \in \mathbb{N}$, $m<n$ and $k=0, ..., m$: $$\frac{1}{m^k} \binom{m}{k} \leq \frac{1}{n^k} \binom{n}{k}$$ (b)For $n\in \mathbb{N}$ and $k=1, ..., n:$ $$\frac{1}{n^k}  \binom{n}{k} \leq \frac{1}{k!} \leq \frac{1}{2^{k-1}}$$ (c)Show that for $n \in \mathbb{N}:$ $$2 \leq (1+ \frac{1}{n})^n < 3$$ Use (a) and the binomial theorem for (b). Use the following for (c): $$\sum_{j=0}^{n}q^j=\frac{1-q^{n+1}}{1-q}$$  I've already proven (a) thanks to @trancelocation. Now I got stuck on (b) and (c). (b) I don't know how to use (a) and the binomial theorem here. $\frac{1}{n^k}  \binom{n}{k} \leq \frac{1}{k!} \leq \frac{1}{2^{k-1}} \Leftrightarrow \frac{n!}{n^k*(n-k)!* k!}\leq \frac{1}{k!} \leq \frac{1}{2^{k-1}} \Leftrightarrow \frac{n!}{n^k*(n-k)!}\leq 1 \leq \frac{k!}{2^{k-1}}$ Now I have to show: $\frac{n!}{n^k*(n-k)!}\leq 1$ and $1 \leq \frac{k!}{2^{k-1}}$ $\frac{n!}{n^k*(n-k)!} = \frac{n*(n-1)*...*(n-k+1)*[(n-k)*...*1]}{n^k*[(n-k)*...*1]}=\frac{n*...*(n-k+1)}{n^k}=\frac{n}{n}*\frac{n-1}{n}*...*\frac{n-k+1}{n} \leq 1$. The first factor is $1$. Starting from the second factor their value gets smaller, so the entire term gets smaller then $1$. I tried to do it like this: for $i=0, ..., n$:  $\frac{n-i}{n} \leq 1 \Leftrightarrow n-i \leq n \Leftrightarrow 0 \leq i$ For the second part: $\frac{k!}{2^{k-1}} \geq 1 \Leftrightarrow \frac{k!}{2^k*2} \geq 1 \Leftrightarrow \frac{k!}{2^k} \geq 2\Leftrightarrow \frac{k}{2}*\frac{k-1}{2}*\frac{k-2}{2}*...*\frac{1}{2} \geq 2$ So for $\frac{k-j}{2} \geq 2$, with $j=0, ..., k-1$ $\frac{k-j}{2} \geq 2 \Leftrightarrow k-j \geq 4$ This doesn't seem to help at all. (c)$2 \leq (1+ \frac{1}{n})^n < 3$ I didn't know how to start at c) at all. The provided formula doesn't help me.


I'm pretty new to Linux, but trying to learn. Ive installed Ubuntu 18 as a VM and playing around.  I was wondering, is there a plugin/application/scheme (not sure of proper term) that allows you to preview what linux is doing in the shell when you do things in the GUI?  For those of you familiar with Windows Server environments, im looking for something like the "Preview powershell command" button that is in the bottom of the gui windows.  I feel this would help me a ton on learning commands and seeing what is actually happening in the shell.  For example when i install a program using the 'ubuntu software' repository, and click to install 'terminator' is there something that someone has created that will let me see "sudo apt install terminator" ?  Thanks in advance!

Is there any application (or sequence of commands) for this function: seeing the result of the actions, while using a GUI interface, being automatically translated into a Terminal (or similar CLI environment) on the same machine.  I saw this in action long years ago in VBA for Applications (for example the Macros in Excel). I wonder if there is same function in Linux.


A piece of spaghetti falls and breaks into three pieces with two break points selected randomly. What is the probability that an ACUTE angled triangle can be formed with the three pieces?  My initial attempt was to find cases of ALL triangles which I managed to conclude has a probability of 1/4. I have also seen a similar problem on this site which yields the same answer so I am happy with the steps up to this point! I would please like some help as to how I should now isolate the cases for acute triangles only?  Thanks!  Edit: Had a look at the link below but I think mine may be slightly different as it deals with the case of a totally random and independent break. Not the case where we break once and choose another of the two to break again.

A stick is broken in three parts of any length ,  if we join the pieces then what's the probability of getting a acute angled triangle?


I have a text file containing a an array of objects in the following format:  [{             "symbol": "MSFT",             "side": "BUY",             "price": 120,             "quantity": 100         },         {             "symbol": "KPMG",             "side": "SELL",             "price": 88,             "quantity": 10         }]   However, when I upload the file into my application, and store it as a variable, it gets stored as a string. Does anyone know how I can avoid doing this?  I want to be able to read the file in (which I can already do) and store that as an array. So I can go like data[1] and get access to     {         "symbol": "KPMG",         "side": "SELL",         "price": 88,         "quantity": 10     }   I also want to be able to go like:  data[1].side   and retrieve the field

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


How small should I be making functions? For example, if I have a cake baking program.   bakeCake(){   if(cakeType == "chocolate")       fetchIngredients("chocolate")   else    if(cakeType == "plain")      fetchIngredients("plain")   else    if(cakeType == "Red velvet")      fetchIngredients("Red Velvet")    //Rest of program   My question is, while this stuff is simple enough on its own, when I add much more stuff to the bakeCake function it becomes cluttered. But lets say that this program has to bake thousands of cakes per second. From what I've heard, it takes significantly longer (relative to computer time) to use another function compared to just doing the statements in the current function. So something that's similar like this should be very easy to read, and if efficiency is important wouldn't I want to keep it in there?  Basically, at what point do I sacrifice readability for efficiency. And a quick bonus question, at what point does having too many functions decrease readability? Here's an example of Apple's swift tutorial.  func isCandyAmountAcceptable(bandMemberCount: Int, candyCount: Int) -> Bool {   return candyCount % bandMemberCount == 0   They said that because the function name isCandyAmountAcceptable was easier to read than candyCount % bandMemberCount == 0 that it'd be good to make a function for that. But from my perspective it may take a few seconds to figure out what the second option is saying, but it's also more readable when ti comes to knowing how it works.  Sorry about being all over the place and kinda asking 2 questions in one. Just to summarize my questions:   Does using functions extraneously make efficiency (speed) suffer? If it does how can I figure out what the cutoff between readability and efficiency is? How small and simple should I make functions for? Obviously I'd make them if I ever have to repeat the function, but what about one time use functions?   Thanks guys, sorry if these questions are ignorant or anything but I'd really appreciate an answer.

35 lines, 55 lines, 100 lines, 300 lines? When you should start to break it apart? I'm asking because I have a function with 60 lines (including comments) and was thinking about breaking it apart.  long_function(){ ... }   into:  small_function_1(){...} small_function_2(){...} small_function_3(){...}   The functions are not going to be used outside of the long_function, making smaller functions means more function calls, etc.  When would you break apart a function into smaller ones? Why?   Methods should do only one logical thing (think about functionality) You should be able to explain the method in a single sentence It should fit into the height of your display Avoid unnecessary overhead (comments that point out the obvious...) Unit testing is easier for small logical functions Check if part of the function can be reused by other classes or methods Avoid excessive inter-class coupling Avoid deeply nested control structures   Thanks everyone for the answers, edit the list and vote for the correct answer I'll choose that one ;)  I am refactoring now with those ideas in mind :)


I think the comment-reply (ping) mechanism is way too limited. You can only reply to one person in a comment. And you can't use an @ whatsoever in questions and answers. It just doesn't make sense to me.   Sometimes, when responding to a chain of comments, multiple commenters might be making the same point or similar points, and your answer to them might be the same. Therefore, it would be better to be able to comment-reply to all of the users in one comment, instead of posting multiple comments or only responding to one of them.  On a question asked before about this, user Manishearth answered that one can just add a comment under with the other user's name.  Not only is this less practical, but a few problems can arise.   Firstly, what if there is a lot of people you want to ping? If the comment chain gets too long everyone is moved to chat, which might not work too well in every situation.   Secondly, in a case of a sea of comments, your extra referral might get lost in all the comments, leaving the user tagged oblivious as to what comment they were actually tagged to.   In questions and answers, there are many times were pinging someone would be quite beneficial. Just look at this question, where notifying user Manishearth of his mention would've been great, as I'd be able to get his opinion, and he would be aware if I was using his name in vain (or just misrepresenting his opinions or answers).  If your question includes or links to a post of another user, then it would be great to be able to ping them. Or if the question is about something a user said, like this question:   And in questions, there are many times you find yourself quoting or pointing to something another user has already said. What if we could instead of just give credit to them, also let them know we referenced something they said first.  If there is a reason why this wouldn't work, or would be bad, please enlighten me.

Now this is probably a surprise to many since I always see thousands of comments like :  @Sarfraz, @balpha just told you they did in the first comment he wrote. Also, allowing only one Stack Overflow user to be logged in per IP address would be problematic for networks with shared IPs.  What's surprising is that apparently the notification will trigger only for Sarfraz and not for balpha. As you can see from the :  Only one person can be replied to at a time in a comment. The first one in the string wins.  I propose to increase the limit to let's say 3 or 5 people; it won't hurt (never seen that feature being abused) and especially many people believe it already works that way.


I have the following problem:  "Assume $R$ is an ID. For each maximal ideal $M$ let $R_M$ be the localization $(R \ M)^{−1}R$ considered as a subset of $Frac(R)$. Show that $\cap_M R_M = R \ (⊆ Frac(R))$ where the intersection is over all maximal ideals $M$."  Was given a hint saying to take $q$ in the intersection and consider the ideal $\{r \in R; rq \in R\}$ but I am not sure how to work with these things. Can someone give me some others hints in order to make my work easier and try to explain me how to see an arbitrary element in the localization ring?   Thank you very much, everyone!

This result appears to be ubiquitous as an algebra exercise. How do you prove this result?     Let $A$ be an integral domain with field of fractions $K$, and let $A_{\mathfrak{m}}$ denote the localisation of $A$ at a maximal ideal $\mathfrak{m}$ considered as a subring of $K$. Prove that $$A = \bigcap_{\mathfrak{m}} A_{\mathfrak{m}}\,,$$ where the intersection is taken over all maximal ideals $\mathfrak{m}$ of $A$.


Given that two circles with coordinates (x1, y1) and (x2, y2) and radius r1 and r2 respectively . I need to find an equation , which can be used in code to to find the coordinates and the presence of touching and intersection .  Like Ay2 +  By + C = 0 .     Circle 1 (x - x1)2 + (y - y1)2 = R1 * R1   Circle 2 (x - x2)2 + (y - y2)2 = R2 * R2

Given the radius and $x,y$ coordinates of the center point of two circles how can I calculate their points of intersection if they have any?


When making a fabric server and adding mods to it, do you have to download the mods the server has in order to even join your Minecraft server?

I'm wondering if I could play Minecraft with my friend. A modded Minecraft, only myself with mods and him without mods.  Is it possible?


It seems that when someone drops their saber it turns off, but Lukes hand still gripped his when his hand got chopped. Why did it extinguish?

I rewatched the three newer movies and noticed that whenever a Jedi was killed, or let go of their lightsaber, it immediately turned off.  What was curious was that the lightsaber turns off right away, when a Jedi is killed, even before it leaves their hand (if it does fall out).  I could understand if the button needs to be held for it to stay on, but when a Jedi is shot and is still holding the lightsaber why would it turn off?


I have a shell script which is used to launch the java application.Shell script has following commands in it to launch the class which contain main method :   _MainJava="com.abc.launchers.AgentLauncher" _ConfigFilePath="/home/lego/ConfigProperties" _LogFilePath="/home/lego/Logs/"  java -jar "${_MainJava}" "${_ConfigFilePath}" "${_LogFilePath}"   I launch this script through command prompt.  Java code has a JMS listener which is always in listening mode .So this java code is always up and never terminates.  Now I want to terminate this java program.One way is (and which I do every time) is terminate by pressing "Cntrl+c" which is killing the program by force and this way I cannot print logs like, "Terminating agent".  If I know in advance that agent will be terminated(like some condition),I can print the logs and do System.exit(0). But I cannot know this in advance as agent will only be terminated during maintenance time.  Please help me to understand how can I achieve this.  As suuggested in comment section ,shutdown hook is the perfect option. Now I have been trying to implement it in my test code.My code is like following :   public static void main(String[] args) throws IOException, InterruptedException {         // TODO Auto-generated method stub          Runtime.getRuntime().addShutdownHook(new Thread()          {            public void run()            {              System.out.println("Shutdown Hook is running !");            }          });          System.out.println("Application Terminating ...");          while(true) {             System.out.println("Running");         }      }   In eclipse IDE, I go in debug tab where I see this code running continuously ,I do right click -> terminate and it doesn't print anything.  Final output :   Running Running Running . . . .

Is it possible to handle POSIX signals within the Java Virtual Machine?  At least  and  should be quite platform independent.


I am trying to create something like stackoverflow.com tag cloud. I am able to display the tags but stuck on how to capture which tag element cancel button was clicked.  The cancel buttons are created dynamically using jquery on click of btnAdd.  $("#<%=btnAdd.ClientID%>").on('click',function(){   var tagText = $('#<%=txtTag.ClientID%>').val();   var btnCancel = '<button class="btn btn-default">X</button>';    var tagTextDiv ='
' + tagText + btnCancel +'
';    $("#divTagCloud").append(' ' + tagTextDiv); });   HTML is
    <asp:TextBox runat="server" />

    <asp:Button runat="server" id="btnAdd"/>

   I want to remove the tag i.e corresponding tagTextDiv on click of corresponding cancel button.   How to do this ?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Is it possible to change the path of latex output files (e.g .aux, .log, .etc) to a different directory. The main directory is becoming a mess. Thank you

I am trying to figure out a way to cleanly separate the TEX files from all of the intermediate and output files. Various approaches I've tried, including the one described by  don't seem to work. I'm using TexMaker + MikTex (portable). Ideally, I would like my file/directory structure to look something like this:   texproject   texfiles   1.tex 2.tex  intfiles   1.out 1.log 1.aux 2.out 2.log 2.aux  pdffiles   1.pdf 2.pdf     Instead, what I have, is the jumbled-up mess where all of these files live in the same directory. I've tried setting the ouput-directory, for example, on pdflatex but this doesn't work. The pdf file still gets created in the same place but now it doesn't show up in the previewer. This should be pretty easy to solve but I've so far been unsuccessful. How can I set up my environment to use the above structure when compiling?  Update: I believe I have narrowed this down to something specific to TexMaker. If the desired aux and out directories are passed via the command line to pdflatex, everything builds as it should. Yet, I get numerous message boxes popping up saying that files can't be found and the PDF doesn't display in the internal viewer. I can't see any obvious options within TexMaker to change to address this. So, has anyone been able to make the scenario I'm describing work with TexMaker?


I would like to have a section where I insert a PDF-page and write a few lines of text before. What I got:  \section{FOO} %some text is following \includepdf[scale=0.9,pages=1,pagecommand={},offset=0 -3cm]{myPDF.pdf}   Sadly the \includepdf-command seems to produce a pagebreak right when it is used. One workaround is to insert the \section{FOO} into the pagecommand-option of \includepdf, but in that case I am not able to write some text between the PDF and the section-heading. How can I have heading, text and PDF on the same page?

I want to include some pages of a pdf file into my document and wrap them into a figure with a caption for example (with pdfpages)  \begin{figure}[h]    \centering          \includepdf[pages={1,3,2},nup=2x2]{test.pdf}        \caption{Test}  \label{fig:Test} \end{figure}   However this doesn't work. So is there another way to do this?


I'm following this tutorial:  But I have different options in Voronoi Texture node. How can i get this result?

I noticed that some nodes changed significantly with Blender 2.81 and 2.82. Now I can't follow older tutorials, because some have different options than me.   Voronoi Node is totally different Mapping Node is missing it's maximum / minimum clipping controls   Q: How to get these older nodes back into Blender 2.82?


There doesn't appear to be an option to delete my answer. Can I not do that through the app?

Currently, the only way to vote to delete (and undelete, since you can't see deleted posts) in the Android app is to open the post in a browser, and then vote to delete from there.  Can we get delete vote functionality within the app, as well as the ability to delete our own posts?  Worth to mention: users , so it's possible in the API.  Related:


What is the largest possible order of a cyclic subgroup of $S_7$?  What's an example of this?  I really just need a better understanding of cyclic subgroups of symmetric groups. I know that the largest possible subgroup of $S_7$ is of size $7$. And I know all the possible cycle structures. Would it be $6$ because $\left<(1 2 3 4 5 6 )\right>$ is a cyclic subgroup generated by the size of $S_6$ or the element $(1\ 2\ 3\ 4\ 5\ 6)$?

If we let $S_n$ denote the symmetric group on $n$ letters, then any element in $S_n$ can be written as the product of disjoint cycles, and for $k$ disjoint cycles, $\sigma_1,\sigma_2,\ldots,\sigma_k$, we have that $|\sigma_1\sigma_2\ldots\sigma_k|=\operatorname{lcm}(\sigma_1,\sigma_2,\ldots,\sigma_k)$.  So to find the maximum order of an element in $S_n$, we need to maximize $\operatorname{lcm}(\sigma_1,\sigma_2,\ldots,\sigma_k)$ given that $\sum_{i=1}^k{|\sigma_i|}=n$. So my question:      How can we determine $|\sigma_1|,|\sigma_2|,\ldots,|\sigma_k|$ such that $\sum_{i=1}^k{|\sigma_i|}=n$ and $\operatorname{lcm}(\sigma_1,\sigma_2,\ldots,\sigma_k)$ is at a maximum?   Example  For $S_{10}$ we have that the maximal order of an element consists of 3 cycles of length 2,3, and 5 (or so I think) resulting in an element order of $\operatorname{lcm}(2,3,5)=30$.  I'm certain that the all of the magnitudes will have to be relatively prime to achieve the greatest lcm, but other than this, I don't know how to proceed. Any thoughts or references? Thanks so much.


If $A \in M_{n}(F)$, I have to show that $A$ is a unit only if $AB = I$ or $BA = I$ for some $B \in M_{n}(F)$.   I am not sure how to approach this at all since this fact was pretty intuitive to me. One way I am thinking this is using the fact that this basically means prove that $A$ is invertible if $AB=BA=I$. A hint that was given, however, was that if $V$ and $W$ are finite dimensional vector spaces, $T: V \to W$ is isomorphic only when it is injective (or only when it is surjective). This hint is completely throwing me off on how to do this question. Can somebody help? Thanks.

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


Is there any way I can get the package size? I.e. if I am doing any installation, how much package (in MB's) size I have to download? How can I know ?   I know one way that is with:   jai@frank-Jai:~$ sudo apt-get install gedit Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   gedit-common gir1.2-gtksource-3.0 libgtksourceview-3.0-0   libgtksourceview-3.0-common Suggested packages:   gedit-plugins The following NEW packages will be installed:   gedit gedit-common gir1.2-gtksource-3.0 libgtksourceview-3.0-0   libgtksourceview-3.0-common 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 985 kB of archives. After this operation, 10.0 MB of additional disk space will be used   May I know the other ways ?

When using apt-get install <package_name>, and there are dependencies that need to be downloaded, the terminal outputs names of additional packages and total size, and asks for confirmation before downloading.   But, when dependencies are satisfied and nothing but the named package needs to be downloaded there is no size output and no confirmation.  When using Synaptic, I can see the total size that new packages that will use after installation but no way to see the size that needs to be downloaded, except to go from package to package and use properties to see the compressed size.  I would like to know if there is a way to see the size of a package(s) in terminal and Synaptic prior to downloading and installing it/them?


I would like a command to execute when my PC starts up. My OS is Ubuntu 18.04 LTS. The command is:  xrandr --newmode "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync && xrandr --addmode VGA-1 1920x1080_60.00 && xrandr --output VGA-1 --mode 1920x1080_60.00   It works perfectly when I execute it (from the Terminal) after the pc has booted up. I have tried various options (after internet searches) but can't get any of them to work - have tried both command line and GUI profferings - none has worked.

How can I run the following xrandrcommand on startup?  xrandr   cvt 1368 768  xrandr --newmode "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync xrandr --addmode VGA1 1368x768_60.00 xrandr --output VGA1 --mode 1368x768_60.00


I have lab and in that ,collection of Linux computer are connected in LAN. i want how to writ e shell script to shut down all PC when we run that shell script.

I used the following bash to shutdown remote computers,but for each computer,I must input the password for it.Is it possible to input the password Automatically?   #!/bin/bash  ssh -t root@192.168.1.11 "sudo poweroff" ssh -t root@192.168.1.12 "sudo poweroff" ssh -t root@192.168.1.13 "sudo poweroff" ssh -t root@192.168.1.14 "sudo poweroff" ssh -t root@192.168.1.15 "sudo poweroff" ssh -t root@192.168.1.16 "sudo poweroff" ssh -t root@192.168.1.17 "sudo poweroff" ssh -t root@192.168.1.18 "sudo poweroff" ssh -t root@192.168.1.19 "sudo poweroff" ssh -t root@192.168.1.20 "sudo poweroff" ssh -t root@192.168.1.21 "sudo poweroff" ssh -t root@192.168.1.22 "sudo poweroff" ssh -t root@192.168.1.23 "sudo poweroff" ssh -t root@192.168.1.24 "sudo poweroff" ssh -t root@192.168.1.25 "sudo poweroff" ssh -t root@192.168.1.26 "sudo poweroff"


I am getting this grub rescue error no filesystem thing. I have read a lot of threads on this issue, but those solutions are not working. I tried live CD, and changed the booting option from hard disk to CD ROM, but still I get the same grub rescue error.   I have two operating systems, the other one is Windows 7. I formatted some part of my hard drive during which GRUB might have lost some files. I get that, but now what should I do? Please tell me how to deal with this thing:   Error: unknown filesystem. grub rescue>

I get this error:  Error: unknown filesystem. grub rescue>   I'm not exactly sure what I did. I believe I installed Ubuntu over Windows on my Acer netbook. I then tried to install , but it wouldn't start installing.  I turned the netbook off and back on. Now I get the error.  I have read a lot of other questions like this, but in my case I cannot boot a CD. If I put a Ubuntu CD or a Linux Mint CD into my external CD/DVD drive and change my BIOS to boot the CD-ROM first, it just gives me the same error screen.  Update copied from comment dated 2012-05-26 02:54:29Z  Here are some results from my commands:   grub rescue>ls (hd0) (hd0,msdos5) (hd0,msdos1)  grub rescue>ls (hd0,msdos5) unknown filesystem  grub rescue>ls (hd0,msdos1) unknown filesystem  grub rescue>ls (hd0) unknown filesystem


I want to create a directory, for instance testing-data on CentOS 6.5 Linux version, and have read,write,execute to all the sub-folders and sub-sub-folders and files within them to everyone(all users), not to any specific group. In fact, whenever a new file is written into any of these sub-folders without using chmod 777 the new file should be able to be accessed by any user.   Is this possible?

I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by that group. This is important because I want files to be readable by the webserver (which I will not run as root) but so a user can still put new files in the directory. I can't put the users in www-data because then they can read every other users websites.   I want the webserver to read all websites, I want users to be able to change their own.  The permissions are set like this on the folders at the moment....  drwxr-x--- 3 john www-data 4096 Feb 17 21:27 john   It is standard behavior on BSD for permissions to work this way. How do I get Linux to do this?


I have the following integral to solve:  $$\int_0^\infty \frac{\sqrt[3]{x+1} - \sqrt[3]{x}}{\sqrt{x}} \, \mathrm dx$$  I tried substitution $u= x+1$ and $u=\sqrt[3]{x+1}$ then partial integration but that didn't really help because it didn't become any simpler.   Thank you.

I would like to show that  $$ \int_0^{\infty} \frac{ \sqrt [3] {x+1}-\sqrt [3] {x}}{\sqrt{x}} \mathrm dx = \frac{2\sqrt{\pi} \Gamma(\frac{1}{6})}{5 \Gamma(\frac{2}{3})}$$  thanks to the beta function which I am not used to handling...  $$\frac{2\sqrt{\pi} \Gamma(\frac{1}{6})}{5 \Gamma(\frac{2}{3})}=\frac{2}{5}B(1/2,1/6)=\frac{2}{5} \int_0^{\infty} \frac{ \mathrm dt}{\sqrt{t}(1+t)^{2/3}}$$  ...?


Perhaps this is a dumb question.   I write a small pdf-book on coding and use there many examples using listings package.  But the amount of code expands text too much, for every 5 lines of text there is 10-20 lines of listings.   I wish there was a way to show code on demand (like spoiler).   May be there is some format supported by latex which would allow to do such thing ?

Is there a way to fold/unfold certain sections in a pdf. Only when the user clicks on the section or plus sign the items show up.  Example: user clicks on the plus sign and the items appear as drop down list.


I am looking into getting the  for my Olympus E-PL5, since it has a  that works with it. Is this a viable solution?

I have flash brand X and would like to know whether it will work with camera brand Y. What do I need to consider to determine whether the combination will work?  Other questions of relevance:


I am stuck on proving this statement. I know I can use the definition of the geometric sum to prove this, but I wanted to know how to prove this without external definitions.   Let $P(n)$ be the statement $\forall n \in \mathbb N, \sum_{i=0}^{n-1} 2^i = 2^n - 1$  Proof. Let $n \in \mathbb N$.  Base Case (Let $n = 1$)  $\sum_{i=0}^{1-1} 2^i = 2^1 - 1$  $1 = 1$  Therefore $P(1)$ holds  Induction Step: Let $k \in \mathbb N$  Assume P(k): $\sum_{i=0}^{k-1} 2^ i = 2^k - 1$ is true (Induction Hypothesis)  W.T.P. $P(k + 1): \sum_{i=0}^k 2^i = 2^{k+1} - 1$  Now to prove $P(k+1)$, would I let $2^k$ be equal to $\sum_{i=0}^{k-1} (2^i +1)$, by the induction hypothesis? I'm not sure how to proceed.

I was hoping someone could help me come up with a combinatorial proof, one with an easy to understand 'story' for $\sum_{k=0}^{n-1} 2^{k} = 2^n - 1$. For instance I understand that $2^n$ is the number of possibilities when creating subsets of size $n$. For example, if you're given a choice of any topping on a pizza, and you can only have said topping once (decide to include or exclude) then you have $2^n$ choices. But I'm not sure how the $-1 $ would be incorporated, or why the LHS would be $1+2+4+8+...+2^{n-1}$


(I changed the point of question into about more basic symptom.) I created child and grand child in bash script.(in Ubuntu 14.04)  #! /bin/bash  {     sleep 21 &     sleep 22 }&  sleep 23   But 2 kind of command to kill process group shows different result. ( I've run the kill command in another terminal at this test.)  kill -INT -<pgid>     # -> grand child(sleep 21) survives. kill -TERM -<pgid>    # -> kills all correctly.   Could you explain what it is going on internally?

I want to kill a whole process tree.  What is the best way to do this using any common scripting languages? I am looking for a simple solution.


See the top banner in this screenshot, looks like a bug to me.

And if I click on it...        Looks like a CSS sprite issue...  I'm thinking that the image was recently changed, by looking at the name,   Currently on Chrome Version 33.0.1750.154 m. Firefox is fine though, with all zoom levels.  Steps to reproduce:  Either browse the site on a device with Retina display, or using Chrome follow those steps:   Change zoom level to 150% or more. Reload the page.


I have an website, wich shows information through an SQL Query. This is working just fine, except when one of the parameters is a string with blank spaces.  echo $seminar = $_POST['Seminar']; echo $start = $_POST['DatumGruppe'];  $prep_stmt = $mysqli->prepare("SELECT `idtermine` FROM `termine`, seminar WHERE termine.seminar = seminar.idseminar AND seminar.name = ? AND termine.start= ? "); $prep_stmt->bind_param('ss', $seminar, $start); if (!$prep_stmt->execute()) {     echo 'Error executing!'; }  else { $prep_stmt->store_result(); $prep_stmt->bind_result($termin);      if ($prep_stmt->num_rows != 1)     {     echo '
Kein passendes Seminar gefunden
';     }      while ($prep_stmt->fetch())     {         echo 'ID: '.$termin.'
';     } }   Like i said: when $seminar is something like "Entspannung" its perfectly working. But "Metakognitives Training - Umgang mit Grübeln und Sorgen" isn't working - theres no mistake in the query, it just doesn't find a fitting row. There are no mistakes in the writing, and the same query is working on another website. So I really don't get the problem.  I tried using quotes  echo $seminar = "'".$_POST['Seminar']."'";   which didn't helped eather. I hope you can help.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


While I am always logging into a CentOS server for simulations it got me thinking:  why can't I keep running the simulations even if my session is closed?  I know that when a session is ended or a user logs out,  any process generated from the session is also terminated.  Could there be a way to let the processes keep on running by itself  even if the session is closed?  -- a silly question from a user with not much unix background :)

Sometimes I want to start a process and forget about it. If I start it from the command line, like this:  redshift   I can't close the terminal, or it will kill the process. Can I run a command in such a way that I can close the terminal without killing the process?


Consider we have a roll of paper with the size of 5 cm in diameter and 10 cm in width. If the thickness of the paper sheet is 0.05 cm, and the rolling has been started from the point zero (the internal reel is 0cm), how can we calculate the length or area of the whole paper sheet?

Fun with Math time.   My mom gave me a roll of toilet paper to put it in the bathroom, and looking at it I immediately wondered about this: is it possible, through very simple math, to calculate (with small error) the total paper length of a toilet roll?   Writing down some math, I came to this study, which I share with you because there are some questions I have in mind, and because as someone rightly said: for every problem there always are at least 3 solutions.  I started by outlining the problem in a geometrical way, namely looking only at the essential: the roll from above, identifying the salient parameters:    Parameters  $r = $ radius of internal circle, namely the paper tube circle;  $R = $ radius of the whole paper roll;  $b = R - r = $ "partial" radius, namely the difference of two radii as stated.  First Point  I treated the whole problem in the discrete way. [See the end of this question for more details about what does it mean]  Calculation  In a discrete way, the problem asks for the total length of the rolled paper, so the easiest way is to treat the problem by thinking about the length as the sum of the whole circumferences starting by radius $r$ and ending with radius $R$. But how many circumferences are there?   Here is one of the main points, and then I thought about introducing a new essential parameter, namely the thickness of a single sheet. Notice that it's important to have to do with measurable quantities.  Calling $h$ the thickness of a single sheet, and knowing $b$ we can give an estimate of how many sheets $N$ are rolled:  $$N = \frac{R - r}{h} = \frac{b}{h}$$  Having to compute a sum, the total length $L$ is then:  $$L = 2\pi r + 2\pi (r + h) + 2\pi (r + 2h) + \cdots + 2\pi R$$  or better:  $$L = 2\pi (r + 0h) + 2\pi (r + h) + 2\pi (r + 2h) + \cdots + 2\pi (r + Nh)$$  In which obviously $2\pi (r + 0h) = 2\pi r$ and $2\pi(r + Nh) = 2\pi R$. Writing it as a sum (and calculating it) we get:  $$ \begin{align} L = \sum_{k = 0}^N\ 2\pi(r + kh) & = 2\pi r + 2\pi R + \sum_{k = 1}^{N-1}\ 2\pi(r + kh) \\\\ & = 2\pi r + 2\pi R + 2\pi \sum_{k = 1}^{N-1} r + 2\pi h \sum_{k = 1}^{N-1} k \\\\ & = 2\pi r + 2\pi R + 2\pi r(N-1) + 2\pi h\left(\frac{1}{2}N(N-1)\right) \\\\ & = 2\pi r N + 2\pi R + \pi hN^2 - \pi h N \end{align} $$  Using now: $N = \frac{b}{h}$; $R = b - a$ and $a = R - b$ (because $R$ is easily measurable), we arrive after little algebra to  $$\boxed{L = 4\pi b + 2\pi R\left(\frac{b}{h} - 1\right) - \pi b\left(1 + \frac{b}{h}\right)}$$  Small Example:  $h = 0.1$ mm; $R = 75$ mm; $b = 50$ mm thence $L = 157$ meters  which might fit.  Final Questions:  1) Could it be a good approximation?  2) What about the $\gamma$ factor? Namely the paper compression factor?  3) Could exist a similar calculation via integration over a spiral path? Because actually it's what it is: a spiral.  Thank you so much for the time spent for this maybe tedious maybe boring maybe funny question!


After updating with regular updates of packages of 14.04 .. my system started to boot directly to windows .... how i would be able to get it back

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


edit - this shouldn't be marked as a duplicate. The question isn't how to prevent SQL injection attacks (I'm already using prepared statements elsewhere), it's related to why MySQL is killing a maliciously-injected query.    I'm testing out a web app with a connected MySQL database, specifically looking for potential SQL injection concerns and wondering how to prevent such attacks in this specific case.  One page loads a person's information from the database based on a unique ID number, which is visible through the page's URL. Obviously, this is a concern in its own right - I could simply change the ID from "?id=2" to "?id=3" to load a new record from the database - but the issue I'm more concerned with at the moment is a URL-based attack to execute a "bad" query on top of the intended query.  The intended query looks something like this: ... where person.ID="10" and person.ID = notes.ID and ...  By changing the URL, I'm able to close the parameter that's looking for an ID and execute another, potentially malicious query, like this:  ... ?id=10"; drop table person; select * from notes where ID=" ...    which would cause the following queries to be executed:  ... select * from person, notes where id="10"; drop table person; select * from notes where ID="" and ...   I've been able to get this malicious set of queries to print (echo) to my webpage, so I know it's a vulnerability. However, when I try to execute this exact query in MySQL, it hangs for several seconds before exiting MySQL completely with the response "Killed" and no further explanation.  My question, then, is what's causing MySQL to kill this malicious query and exit? This seems like a security feature, but I don't know what it'd be - those queries are perfectly fine on their own. I'm also confused by the lack of error message beyond "Killed" if anyone has come across a similar situation.

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Let $X$ be a scheme and $\mathscr{F}$, $\mathscr{G}$ sheaves on $X$. Suppose we know that for every $x\in X$ the stalks are isomorphic: $$ \mathscr{F}_x \cong \mathscr{G}_x $$  Can we conclude immediately from here that $\mathscr{F}\cong \mathscr{G}$, or do we first need to find a morphism of sheaves $f:\mathscr{F}\to \mathscr{G}$ such that $f_x$ induces the above isomorphisms on the stalks for every $x$ ?  Remark: Proposition 1.1 (page 63) of Hartshorne says that:      A morphism of sheaves $f : \mathscr{F} \to \mathscr{G}$ on a   topological space $X$ is an isomorphism iff the induced map on stalks   $f_x : \mathscr{F}_x \to \mathscr{G}_x$ is an isomorphism for every   $x\in X$.   Extra question: What can we say, instead, if we have isomorphisms between every fiber of $\mathscr{F}$ and $\mathscr{G}$ ?

It is well-known (Hartshorne 2.1.1) that if $F$ and $G$ are sheaves on a space $X$, then $\phi:F\rightarrow G$ is an isomorphism if and only if the induced stalk map $\phi_p:F_p\rightarrow G_p$ is an isomorphism for all $p\in X$. However, if we have a collection of isomorphisms $\{\psi_p:F_p\rightarrow G_p\}_{p\in X}$, this does not guarantee that $F$ and $G$ are isomorphic, because the $\psi_p$ might not be related to each other, i.e. there might not be a sheaf map $\psi:F\rightarrow G$ such that $\psi_p$ is the induced stalk map for all $p\in X$.  However, I was recently making this point to someone and was unable to think of a good example of non-isomorphic $F$ and $G$ having isomorphisms $\psi_p:F_p\rightarrow G_p$. I'm sure I knew one at some point, but I'm blanking on it now. Can someone provide an illustrative example, e.g. an example that occurs in some natural or basic problem, or one that captures the essential pattern of any example where this issue arises, or one where it is clear that $F$ and $G$ could not be isomorphic?


I'm running a Ubuntu VM with an 8 GB RAM with docker containers ( 8 GB is just about enough for my requirements) but at some point the VM freezes/crashes due to memory exhaustion leaving me no choice but to power-off/reset the VM.   Is there a system configuration that can be done/added so that there is always enough just about enough memory for the OS to run without freezing?

I'm running pdftoppm to convert a user-provided PDF into a 300DPI image.  This works great, except if the user provides an PDF with a very large page size.  pdftoppm will allocate enough memory to hold a 300DPI image of that size in memory, which for a 100 inch square page is 100*300 * 100*300 * 4 bytes per pixel = 3.5GB.  A malicious user could just give me a silly-large PDF and cause all kinds of problems.  So what I'd like to do is put some kind of hard limit on memory usage for a child process I'm about to run--just have the process die if it tries to allocate more than, say, 500MB of memory.  Is that possible?  I don't think ulimit can be used for this, but is there a one-process equivalent?


For some reason, after I install Ubuntu 16.04 on my desktop and laptop, after a while I'm getting a message and I can't do anything anymore. I searched online about my problem, I asked some other "Ubuntu" guys, but nobody could help me at all.   I have dual boot with Windows 10, and openSUSE 42.1 and Fedora 24-1.2 are working just fine. Everything based on Ubuntu 16.04 doesn't work for me.   Today, after 2 months of using openSUSE 42.1 without a problem, I tried Ubuntu again. But this time I tried 16.04.1 and I got the same message.  I attached here the message I'm getting, maybe someone can help me with my problem.    Thank you in advance!    @roema  Thank you for taking the time to answer me.   I tried to find one of those options in Bios, but apparently there's no "secure chip" or "secure boot" anywhere in there. The BIOS version was 2.15 (now is upgraded to 2.29), Aptio Setup Utility version is 2.10.1208 and here is the system that has the above problem.    Thank you again for your suggestions.  P.S. I upgraded the BIOS, but I still can't find any of those two options. Is there any way I can resolve this problem?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents: