Consider a cylindrical container contaning a gas with pressure P1 and volume V1 with a massless piston on top of the cylinder. There is a block of mass m on top of the piston. Suddenly, the mass is removed and so the gas expands irreversibly to a final pressure of P0 which is the external atmospheric pressure. Now I know that work done on a system depends on external forces, so the work done on gas will be = P0 *(change in volume)  Now, I want to know the work done on the atmosphere. So, in this case, my system will be the atmosphere and surroundings should be cylinder contaning the gas. So, work done on atmosphere by the gas will be = - P1 * (change in volume of container)......(or it should be an integral where pressure of gas changes from lower limit of P1 to an upper limit of P0).  So my question is, why are the two work calculated different? Is what I've done correct? One of my friend said that the way I'm calculating the work done by the gas on atmosphere is incorrect, if this is true, then what is the correct way?

Consider an adiabatic system as follows. It consists of a gas in a container and a piston.  Initially, the system is at equilibrium and the gas inside it occupies a volume $V_i$ at a pressure $p_i$ which is equal to the outside pressure. Suddenly, the outside pressure changes and reduces to $p_{atm}$. The piston moves to equalize the pressure and the gas expands isothermally to obtain equilibrium. The gas now occupies a volume $V_f$ at a pressure of $p_f$ which is equal to $p_{atm}$  Now, two textbooks I have define the work done from two different viewpoints.  1: From the viewpoints of the surroundings:   The work done on the system by the surroundings equals $-p_{atm}\Delta V$. Since $p_{atm}$ is pretty much constant for the whole of the whole of the process, we can say that the work done equals:  $$W_1 = -p_{atm}(V_f - V_i)\tag1$$  2: From the viewpoint of the system:  We can write the internal pressure of the system as a function of its volume: $p_{in}(V)$. As during the expansion, the internal pressure changes, the work done by the system equals   $$W_2 = \int_{V_i}^{V_f}p_{in}(V)dV$$  Now, I don't know which definition to use. The work is done by the system (from definition 2) is done on the surroundings. But what about the negative work that the surroundings did on the system? Where did that energy go? Maybe, the two definitions express the same thing: the work done by the system. The negative sign in definition 1 signifies that the work is done by the system. But that would mean that   $$W_1 = W_2$$  We can simplify $W_2$ as follows. Clearly,   $$p_{in}(V) = \frac{p_iV_i}{V}$$  $$W_2 = \int_{V_i}^{V_f}\frac{p_iV_i}{V}dV = p_iV_i \ln{\frac{V_f}{V_i}} \tag2$$  The internal pressure when the volume is equal to $V_f$ is $p_{atm}$  $$\implies p_{atm} = p_{in}(V_f) = \frac{p_iV_i}{V_f}$$  $$\implies V_f = \frac{p_iV_i}{p_{atm}}$$  Putting this into  $(1), (2)$ gives us,   $$W_2 = p_iV_i\ln{\frac{p_{i}}{p_{atm}}}$$  $$W_1 = -p_{atm}\left(\frac{p_iV_i}{p_{atm}} - V_i\right) = -V_i(p_{atm} - p_i)$$  Consider some values. Let $p_i = 5 \ \rm{Pa}, V_i = 1 \ \rm{m^3}, p_{atm} = 1 \ \rm{Pa}$.  $$W_1 = -1\cdot(1-5) = 4$$  $$W_2 = 1\cdot1\cdot\ln{\frac{5}{1}} = 1.609$$  Where am I making a mistake?


I'm executing grep command in my C code with the function execl(), and I want to use the output of this command in my C program. How do I do it?

I am looking for a way to get the output of a command when it is run from within a C++ program.  I have looked at using the system() function, but that will just execute a command. Here's an example of what I'm looking for:  std::string result = system("./some_command");   I need to run an arbitrary command and get its output. I've looked at , but I have not found anything that will give me what I need.


how can a list:  ['tuple1_1', 'tuple1_2', 'tuple2_1', 'tuple2_2']   elegantly be transformed to a list of tuples:  [('tuple1_1', 'tuple1_2'), ('tuple2_1', 'tuple2_2')]   in python?  Something like %2 to form tuples maybe?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Although this seems like a simple task, the sed call is not substituting the value that I send for IP. Instead, it is replacing localhost with "${IP}".  substitute() {     export IP=$1     echo $IP     LC_ALL=C find . -type f -name '*.txt' -exec sed -i.bak 's/localhost/"${IP}"/g' {} \; }  substitute 10.20.30.40   How do I achieve my purpose of substituting with a value send from an argument?

I want to do:  cat update_via_sed.sh | sed 's/old_name/new_name/' > new_update_via_sed.sh   in my program.  But I want to use variables, e.g.  old_run='old_name_952' new_run='old_name_953'   I have tried using them but the substitution doesn't happen (no error). I have tried:  cat update_via_sed.sh | sed 's/old_run/new_run/' cat update_via_sed.sh | sed 's/$old_run/$new_run/' cat update_via_sed.sh | sed 's/${old_run}/${new_run}/'


When we try to submit an record for approval, it shows the criteria are not met, but it doesn't show which criterias are not met. How can we find which criteria are not met by the particular end user on the record?

Is it possible to create messages to the user telling them why they have not met the Entry Criteria just as you would for a Validation Rule ?   ie : "You cannot Submit this for Approval because the Status is already Approved"   Thank you.


Simple question, has anybody ever seen a similar visualization to the one below? If so what is the name of such a graph and what software could be used to create it?

In a famous plot, Charles Minard visualised the losses of the French Army in the Russian campaign of Napoleon:    (another nice example is  xkcd plot)  Is there a canonical name for this type of visualisation? I'm actually looking for an R package to create such plots, but I don't even know how to look for it.  EDIT:  As I could not find a good package in R do do this type of plots, I have created my own, called "riverplot" -- you can download it . Here is a simplified version of the above diagram:    And an example of what other diagrams can be created with the package:


The first time I entered nether I killed a zombie pig man and ever since they have been trying to kill me every time I step into the nether. I am not able to consolidate my position in the nether. Any general tips or ideas to tackle them

Whenever I travel to the Nether in Minecraft, I almost instantly get blasted to smithereens and chopped up into little pieces.  How do I survive in the Nether, at least long enough to build some sort of shelter and get situated?


Do we need axiom of choice to prove $A \subset B \subset A \Rightarrow A = B$ ?   The proof is trivial, define $C = B \backslash A$. If $A \neq B$ then $C$ is nonempty, so pick any element $x$ of $C$, then $x \in C \Rightarrow x \in B, x \not \in A$, but as $B \subset A$, thus $x \in A$, a contradiction.  Do we need actually need AoC to justify the bolded part ?

Suppose I have a non-empty set $A$.     How do I choose an element $x\in A$?   More precisely, I believe I would like to find a formula $P(x,y)$ of ZF such that for every non-empty set $y$ there is exactly one $x\in y$ such that $P(x,y)$ is true.  I have thought about this for a while without success and I am beginning to doubt such a formula is even possible. But in mathematical proofs it is quite common to "choose a fixed element" from a non-empty set. So how exactly do we achieve such a thing? Am I missing something?  Thank you in advance.


This describes a certain natural process that takes 15 weeks  It describes what a certain component looks like at some point in time during a naturallly occurring process   What I don't get is if it means it appears this way starting in the third week or after ?  Here's the full sentence  "The malleus first appears as a cartilage model from the third week"  Thanks again for you support guys


Let $f : \{\mathbb{R}^2 - (1, 0) - (-1, 0)\} \to \mathbb{R}^2$ be the function $f(z) = \frac{1}{z-1} - \frac{1}{\bar{z}+1}$. Show that $f$ extends to a smooth map $\tilde{f} : S^2 \to S^2$.   We define $\hat{f}(\infty) = 0, \hat{f}(\pm 1,0) = \infty$. And we show \begin{align*} \lim_{z \to \infty} f(z) & = \frac{1}{z-1} - \frac{1}{\bar{z}+1} = 0.\\ \lim_{z \to \pm 1 + 0i} f(z) & = \frac{1}{z-1} - \frac{1}{\bar{z}+1} = \infty. \end{align*} Hence, $f$ extends smoothly into $\hat{f}$.  Thanks~very much!

Identify $\mathbb{R}^2$, with coordinates $x, y$, with $\mathbb{C}$, with coordinate $z = x + iy$. Likewise, identify a copy of $\mathbb{R}^2$ with coordinates $u, v$ with $\mathbb{C}$ with coordinate $w = u+iv$. Let $f : \{\mathbb{R}^2 - (1, 0) - (-1, 0)\} \to \mathbb{R}^2$ be the function $f(z) = \frac{1}{z-1} - \frac{1}{\bar{z}+1}$. Show that $f$ extends to a smooth map $\tilde{f} : S^2 \to S^2$, where $S^2$ (or $\mathbb{CP}^1$ is the one-point compactiﬁcation of $\mathbb{R}^2$ (or $\mathbb{C})$.   Following FBD's comment below, I want to show:   1, $f$ is continuous, which is obvious;  2, $f$ is surjective;  3, $f^{-1}$ maps compact set to compact set   Correct?  Thank you very much.


Ok hard to explain in few words so  I was wondering how instead of creating a new line......like lets say I want to:  while true; do echo "hello"; sleep 1; done   then I want it to count the number of times it goes through, but instead of it repeating on the next line it just changes it  Would that need some drawing scripting like x11  while true; do echo "hello $(date +%S)"; sleep 1; done

So, when wget gets a web page, it shows you a status bar that indicated how much the file(s) is/are downloaded.  It looks like this:  25%[=============>______________________________________] 25,000 100.0K/s (underscores are spaces; I just couldn't figure out how to get more than one consecutive space in there)  However, instead of writing another line to stdout and adding another progress bar, it updates it, like this:  50%[===========================>________________________] 50,000 100.0K/s  And wget isn't the only example of this, either.  For example, when you pipe something into less and then exit, your original prompt is still there, along with the result of whatever commands that you ran previously.  It's like you never left.  So, my questions are, what is this called, how do I implement it, does it only work for a single line at a time, and can I use this in C?


Let's say that I have a flat list:  flat_list = ["one", "a", "two", "b", "ab"]   My goal is to get a list of lists, each one containing every element with the same length, something like this:  list_lists = [["one", "two"], ["a", "b"], ["ab"]]   Is it possible to accomplish this with a simple list comprehension?


I'm working on a website and I have created a dropdown menu. The menu opens when you click an "About Me" link, which reveals a few more links (biography, interests, etc.). I'm able to toggle the menu on and off by clicking on the "About Me" link. Here's my question: I want to write some code such that the dropdown menu can only be opened by clicking the "About Me" link, but can be closed by clicking the link or ANYWHERE ELSE on the document (it's kind of annoying to have to click the "About Me" link again in order to close the dropdown). Here's the jQuery code I have so far:   $(".about-me").click(function() {     $(".dropdown-menu").toggle(); });   I tried adding a   $(document).click(function() {     $(".dropdown-menu").hide(); });   but since the "About Me" link is a part of the document as well, this makes it so that clicking the link will never open the dropdown menu in the first place. Any help is much appreciated!

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


I would like to implement the following image representation of two arrays with arrows using TikZ.    Please provide some hints to go in the right direction.

I need to illustrate a 2D array data structure in my document. This is a picture I found on the internet. I want something similar.    I also want to show the memory layout in the illustration. Something like this:   Can someone help me with drawing them in Tikz? Thanks in advance.  MWE  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{matrix,backgrounds}  \begin{document} \begin{tikzpicture}[font=\ttfamily, array/.style={matrix of nodes,nodes={draw, minimum size=7mm, fill=green!30},column sep=-\pgflinewidth, row sep=0.5mm, nodes in empty cells, row 1/.style={nodes={draw=none, fill=none, minimum size=5mm}}, row 1 column 1/.style={nodes={draw}}}]  \matrix[array] (array) { 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9\\   &   &   &   &   &   &   &   &   &  \\}; \node[draw, fill=gray, minimum size=4mm] at (array-2-9) (box) {};  \begin{scope}[on background layer] \fill[green!10] (array-1-1.north west) rectangle (array-1-10.south east); \end{scope}  \draw (array-1-1.north)--++(90:3mm) node [above] (first) {First index}; \draw (array-1-10.east)--++(0:3mm) node [right]{Indices}; \node [align=center, anchor=south] at (array-2-9.north west|-first.south) (8) {Element\\ (at index 8)}; \draw (8)--(box); % \end{tikzpicture} \\ \begin{tikzpicture}[font=\ttfamily, array/.style={matrix of nodes,nodes={draw, minimum size=7mm, fill=red!30},column sep=-\pgflinewidth, row sep=0.5mm, nodes in empty cells, row 1/.style={nodes={draw=none, fill=none, minimum size=5mm}}, row 1 column 1/.style={nodes={draw}}}]  \matrix[array] (array) {  &  &  &  &  &  &  &  &  & \\  &   &   &   &   &   &   &   &   &  \\}; % \end{tikzpicture} \\ \begin{tikzpicture}[font=\ttfamily, array/.style={matrix of nodes,nodes={draw, minimum size=7mm, fill=blue!30},column sep=-\pgflinewidth, row sep=0.5mm, nodes in empty cells, row 1/.style={nodes={draw=none, fill=none, minimum size=5mm}}, row 1 column 1/.style={nodes={draw}}}]  \matrix[array] (array) {  &  &  &  &  &  &  &  &  & \\  &   &   &   &   &   &   &   &   &  \\}; % \end{tikzpicture} \end{document}


I know, it's escapeinsides. But how can I show only the part of code? Not by linerange? But by "word" range?  For example i will show only code from //<B> to //<qB>  //<A> class A{ public A(){   System.out.println("Hello from A"); } //<qA>  //<B> class B extends A{   System.out.println("Hello from B"); } //<qB>  //<C> class C extends B{   System.out.println("Hello from C"); } //<qC>

I am attempting to document my MATLAB programming code in LaTeX. For  this, I use the mcode package, which defines the MATLAB lstlisting  environment. With the commands  \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumber}{\mfileMainFirstLine} \newcommand{\mfileMainFirstLine}{26} \newcommand{\mfileMainLastLine}{33} \lstinputlisting[firstnumber=\mfileMainFirstNumber,                  firstline=\mfileMainFirstLine,                  lastline=\mfileMainLastLine]{\mfileMain}   I set the firstnumber, firstline and lastline parameters and use  them to import a piece of MATLAB code into the LaTeX document with  \lstinputlisting. However, when I add some code before the  \mfileMainFirstLine, in this case 26, the code is shifted and the  documentation is ruined. To fix this, I would have to update the line  numbers.  I am trying to fix this issue by adding 'tracers' to my MATLAB  program. I use the commands  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');   to create a text file in which I store the line numbers for which the  code is documented using the command  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);   . This results in a text file lstinputlisting_line_numbers_.txt with  content for instance like  53 62 75 91   in case I want to document four parts of the MATLAB program main.m.  What I want to do from here is simply use this line number data in the  \lstinputlisting commands. Perhaps it is possible to store the line  numbers in the \newcommands{}{}, or perhaps there is a better, more  elegant way of doing it. In this way, the line numbers would update  automatically in case I add new lines of code. Consequently, my LaTeX  document would still be okay, saving me a lot of time not having to  update the line numbers myself.  A minimum working example could look like the following. The LaTeX file  main.tex would have the content  \documentclass[a4paper]{article} \usepackage[framed,numbered]{mcode}  % Data for the 'lstinputlisting' environments. \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumberA}{\mfileMainFirstLineA} \newcommand{\mfileMainFirstLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainFirstNumberB}{\mfileMainFirstLineB} \newcommand{\mfileMainFirstLineB}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineB}{WHAT SHOULD I PUT HERE?}  \begin{document}     In the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberA,                      firstline=\mfileMainFirstLineA,                      lastline=\mfileMainLastLineA]{\mfileMain}     we calculate the ....       And in the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberB,                      firstline=\mfileMainFirstLineB,                      lastline=\mfileMainLastLineB]{\mfileMain}     we calculate the..... \end{document}   . The MATLAB file main.m would have the content  %% Line number output.  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     %% Input to be specified by user.  alpha=10; % PDE parameter. x_s=0; % Starting coordinate. x_e=1; % End coordinate. N_n=1e2+1; % (N)umber of (n)odes. N_ip=2; % (N)umber of (i)ntegration (p)oints.  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     fclose(fileID); % Close the file 'fileID'.


As a lot of people are aware, vaccines produced by different pharmaceutical companies have different “efficacy rates”: which shows different rates of how effective vaccines are. My question is, are there different measures of how effective a vaccine are? e.g.- Are they measured according to how many people, as a percentage, receive immunity? Is it measured according to who retains immunity after trials? A secondary question is do different pharmaceutical companies have a standard for measuring how effective their vaccines are, or do they each set their own standards? (with or without help from the WHO, etc?)

Pfizer's paper () published recently states the following in the Efficacy subsection of the Results section:  Between the first dose and the second dose, 39 cases in the BNT162b2 group and 82 cases in the placebo group were observed, resulting in a vaccine efficacy of 52% (95% CI, 29.5 to 68.4) during this interval and indicating early protection by the vaccine, starting as soon as 12 days after the first dose.  Can anyone explain in simple terms the calculation of 52%? I am guessing that this number was obtained from:  But why is that the calculation? Does it depend on the fact that the vaccine and placebo groups were in equal numbers, such that by observing 82 COVID-19 cases in the placebo group, we match 82 subjects in the vaccine group, and since only 39 confirmed cases were observed in the vaccine group, the authors conclude that the "complementary (to 82)" 43 subjects did not become sick, and thus the vaccine is efficient in 52% of the subjects?


I know that the sentence "I don't like it, either" is correct.  I've come across some native speakers say, "I don't like it,too." What about this variant?

Consider:  Too — (adv.) also, as well, in addition.    We don’t usually use too in negative clauses; we use either instead:   I don’t like that kind of stuff. I don’t like it either.   That said, here’s my concern: I’ve heard a native speaker from the Lake District (in the UK) say “I won’t do it and she won't do it too.”    When asked if that's how he usually phrases such sentences, I got an affirmative answer. This then reminded me of John Lennon’s lyrics to his song “Imagine”, which I had always thought must be wrong:     Imagine there’s no countries    It isn’t hard to do    Nothing to kill or die for    And no religion too   Is it grammatical in the UK (or in certain regions) to use too instead of either in such sentences?


Given a string $S$,How many different strings can be formed if you are allowed to do   1. at most one swap  2. at most two swaps  By swap I mean interchange characters at two different positions in the string.  All I could figure out is that if $S$ has all unique characters , answer would be $^nC_2$ where $n$ is the length of $S$.

We are provided with a string A (may contain repeated characters as well ). One needs to make all possible permutations of A , and find out how many pairs of strings chosen from these permutations are not similar.  Two strings are similar if we can make both of them exactly same by carrying out at most 1 swap in each of them .  Example :- if we are provided with string abcd  , then for permutation abcd , the permutations which are not similar to it are bcda , bdac , cadb , cdba , dabc , dcab . Similar is the case for other permuations as well. So overall number of desired pairs are 24*6=144 .  I tried solving it for each possible pair by approach mentioned here     But as the permutations can be large enough , I need a better approach of solving this.


Below is some code (removed much of it for clarity) which shows my issue of concurrent list modification:  for (final Week week : this.demand.getWeeks().getAllWeeks()) {     final List<Week> weeksExcludingThisWeek = this.demand.getWeeks().getAllWeeks();     weeksExcludingThisWeek.remove(week); }   As far as I was aware I was removing the reference to the same week object, but in a different list than is used in the for loop.   How do I prevent this from occurring?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


bash_aliases are not working in Ubuntu run (Alt+F2) dialog. It shows a "Command not found" error.   But it works perfectly in Terminal.   How can I make it working in run command box?

In the .bashrc file, one can add an alias for a command, say  alias geditm = 'gedit --display=D1'   Now I can run geditm in a terminal and have gedit open in display D1.  I am curious if there is a way to define an alias for running commands from the Alt-F2 menu, so that I could Alt+F2, type geditm and have the same result.   I am interested in doing this generally, not just for gedit.


I'm running into an issue when initializing a minesweeper board in Python 2.7.  Here is my code so far:  class Minesweeper():  def __init__(self, size, num_bombs):      # Initialize board of zeros     self.board = [[0]*size]*size     self.game_over = False     self.size = size      self.add_bombs(num_bombs)   def add_bombs(self, num_bombs):      # Add bombs     for i in range(num_bombs):         row = randint(0, self.size-1)         column = randint(0, self.size-1)         self.board[row][column] = 'B'      print self.board   For some reason, my add_bombs code is manipulating each sub-array of my board identically, and I have no idea why.  ie. x = Minesweeper(5,2) is resulting in:  [[0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B']]  Instead of adding 2 total bombs.  Does anyone see what I am doing wrong?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Someone accessed my EC2 Ubuntu 14.04 and installed some malicious cron to do port scanning with user eric. I removed user eric and the file executed, but in syslog I see  Sep 19 15:27:01 ip-xxx CRON[9388]: Authentication failure Sep 14 08:45:01 ip-xxx CRON[9389]: (eric) CMD (/var/tmp/.muh/y >/dev/null 2>&1) Sep 19 15:28:01 ip-xxx CRON[9389]: Authentication failure Sep 19 15:29:01 ip-xxx CRON[9391]: Authentication failure Sep 19 15:30:01 ip-xxx CRON[9392]: Authentication failure Sep 19 15:31:01 ip-xxx CRON[9526]: Authentication failure   Can anyone tell me how to find the cron installed (crontab is empty)?

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


On sites where I don't have the edit privilege, the iOS app still lets me make all the improvements I want to a post, but won't let me submit them:    Could the app warn me with this message before I spend a bunch of time editing the post?

Currently in both  and  when viewing a post on a site where you don't have full edit privilege  (and not your own post) you can still see edit option in the actions menu:        So I choose it, invest time in editing the post, click "Submit".... and greeted with the dreaded "Account is not allowed to suggest edits" message: (and the edit is lost for good, no draft)        Can the "Edit" option be removed from the menu if I don't have edit privilege on the post, at least until suggested edit will be supported in the apps?


I am given that $E(X^2) = 1$ and $E(|X|) \geq a > 0$, as well as $\lambda \in [0,1]$. Somehow, I'm now expected to prove that $P(|X| \geq \lambda a) \geq (1-\lambda)^2a^2$.  Considering the context, I'm expecting to be using Markov's inequality, Chebyshev's inequality, Hölder's inequality, or Jensen's inequality. Unfortunately, as far as I can tell, each of them only give upper bounds, whereas I'm supposed to find a lower bound. I've of course already found that $P(|X| \geq \lambda a) \leq \frac{1}{\lambda^2a^2}$, but I again don't see how this is useful in anyway.  Thanks in advance for the help.

This is a problem in KaiLai Chung's A Course in Probability Theory.     Given a nonnegative random variable $X$ defined on $\Omega$, if $\mathbb{E}(X^2)=1$ and $\mathbb{E}(X)\geq a >0$, prove that $$\mathbb{P}(X\geq \lambda a)\geq (a-\lambda a)^2$$   for $0\leq\lambda \leq 1$.   Let $A=\{x\in \Omega:X(x)\geq \lambda a\}$, we get $$\int_A (X-\lambda a)\geq a-\int_A\lambda a -\int_{A^c}X$$ and $$\int_A (X^2-\lambda^2 a^2)=1-\int_A\lambda^2a^2-\int_{A^c}X^2$$ I want to contrast $\int_A (X-\lambda a)$ and $\int_A (X^2-\lambda^2 a^2)$, but I don't know how to do it, could anyone gives me some hints?


given a C++ program with:  int a;   I'd like to obtain the symbol name ("a") of address &a at runtime. I can do it via objdump but can I also do it at runtime? If there exists a way, how do I demangle its name?  Context: I need to profile an application (nope perf does not work in my case) so I am wrapping function calls, e.g. pthread_mutex_lock() using global defines and then track the address of the mutex variable and the RIP of the pthread_mutex_lock() call. I can do the postprocessing by calling into objdump (address to mangled_name mapping) I just thought there exists an API to do it at runtime.

I'd like to be able to introspect a C++ class for its name, contents (i.e. members and their types) etc. I'm talking native C++ here, not managed C++, which has reflection. I realise C++ supplies some limited information using RTTI. Which additional libraries (or other techniques) could supply this information?


Today I upgraded my Ubuntu to 20.04 version and noticed that shortcuts commands using Ctrl and Shift buttons are not working. It not depends on selected language, it's just ignores Ctrl. How can I fix that?

Can I use Ctrl+Shift for changing languages? I can't set this hotkey for changing keyboard languages.  At this moment Alt+Shift switch languages, but I can't see this hotkey in keyboard hotkeys list or in   gsettings list-recursively  org.gnome.desktop.wm.keybindings | sort | more   output.


A real-valued map $F$ is called a probability distribution if  $F$ is monotonically increasing $F$ is right continuous $\lim\limits_{x\to\infty} F(x)=1$ and $\lim\limits_{x\to-\infty} F(x)=0$  Again I know that for such $F$, there is a probability measure $P$ on borel $\sigma$-field of $\Bbb{R}$. such that $P((a,b])=F(b)-F(a)\ \forall -\infty\le a\le b\le \infty$. So we have to prove that $\int\limits_{-\infty}^{\infty}P((x,x+a])\ dx=a$ Here $F$ may not be absolutely continuous, so we cannot work with the probability density function. I'm not getting any idea how to prove this result. Can anyone help me in this regard? Thanks for your help in advance.

$F$ is a distribution function .Take any $a \in \mathbb{R}$.  Then evaluate : $\displaystyle\int_{\mathbb{R}} (F(x+a)-F(x)) dx$   As it is a general distribution function , I cannot employ densities to solve this problem . Any insights or a complete solution will be very appreciated .


I have prepared my international driver's license and I'm going to be driving a rental car in Japan this Christmas holiday, around the areas of Tokyo, Nagano, and Mount Fuji. I'm trying to get snow chains for driving up to Shibu Onsen and Fuji line 5th station from the car rental agency.  I read about some toll fares on the toll roads or highways I might pass.  How do I pay for toll road usage? Is it an electronic toll card system or will it be charged to my car and indirectly to me?

I'm renting a car soon in Japan and am planning to travel on the expressways. What's the best way to pay tolls?


If b = 0, then the result immediately follows. If $b \neq 0$, as $a$ is not coprime with $n$,  $ab$ is not coprime with $n$ as they share a divisor. Therefore, there is no $b \in \mathbb{Z}$ such that $ab \equiv 1 \: mod \: n$ as $1$ is coprime with $n$ for all $n$. I just saw this statement and my solution looked quite a bit different from the one given, so I am not sure if it is correct. Thanks for the feedback.

Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm?


Let $f \in C^2(0,\infty)$ , then how to show that  $\Big(\sup_{x>0} |f'(x)|\Big)^2\le 4\big(\sup _{x>0}|f(x)|\big)\big(\sup_{x>0}|f''(x)|\big)$ ?

Let $f\left( x\right)$ be a $C^{2}$ function on $\mathbb{R}$. Show that $$\sup \left| f'\left( x\right) \right| ^{2}\leqslant4\sup \left| f\left( x\right) \right| \sup \left| f''\left( x\right) \right| .$$


I have a master key for an encrypted partition on a machine that I have SSH + root access to. I don't have access to any of the passphrases associated with the partition. Is there a way that I can verify that the master key is valid for that partition?  I can't unmount the partition as it is the root partition for the machine, so I don't think I can use luksOpen for example.

I am working on our Debian server on which we have a Raid drive encrypted with 2 devices. I did this around 1.5 years back and have never rebooted since. Now, we want to reboot for some reasons, but I have to make sure that the password I have is the correct one, or we will be stuck.   How can we verify the password for an encrypted-raid? Thank you.  Raid details :    mdadm --detail /dev/md0    /dev/md0:         Version : 1.2   Creation Time : Thu Feb 11 14:43:40 2016      Raid Level : raid1      Array Size : 1953382336 (1862.89 GiB 2000.26 GB)   Used Dev Size : 1953382336 (1862.89 GiB 2000.26 GB)    Raid Devices : 2   Total Devices : 2     Persistence : Superblock is persistent      Update Time : Fri Mar 10 10:37:42 2017           State : clean   Active Devices : 2 Working Devices : 2  Failed Devices : 0   Spare Devices : 0             Name : HOSTNAME:0  (local to host HOSTNAME)            UUID : 5c450558:44a2b1e9:83cb4361:9c74df8e          Events : 49      Number   Major   Minor   RaidDevice State        0       8        1        0      active sync   /dev/sda1        1       8       17        1      active sync   /dev/sdb1   Thank you.   Update  dmsetup table --showkeys CryptVol: 0 Large_Number crypt aes-cbc-essiv:sha256 RANDOM_TEXT  0 253:0 4096 RaidVG-LVMVol: 0 Large_Number linear 9:0 2048


It is common while reading posts on the site to come across answers that are several years old and contain deprecated code.  Currently, there is not a visible indicator that warns viewers that code is deprecated.  Would it be possible to include some type of icon or note at the top of answers to quickly indicate to viewers that code is deprecated?

Questions that are specific to deprecated behavior--for instance, how an HTML rendering method works for an old version of Ruby on Rails--should be tagged as outdated, or specific to older versions.  Is there a way to do this?  I realize I've found several questions that are 2-3 years old while looking up how to do something.  While it's not annoying, I and others could save a lot of time if there were tags such as "Ruby-on-Rails<=2" that we could filter out (or include if a search doesn't yield any satisfying results)  Edit: When I find old information on Rails, much of what I is still relevant to the current version.  It would be nice to add a tag like deprecated-as-of-rails-2.  That way, when (popular) questions/answers become inaccurate, they will be eventually tagged as such.  Information on old versions is still useful to people maintaining/upgrading legacy code, but this should be distinguished from newer code when incompatible.  Should this be a feature request?  Could it just be adopted by the community using a specific convention on tags?


I would like to keep the normal Unity log-in screen and everything.  When I installed GNOME Shell, it seems to have replaced the log-in screen with the GNOME one.   I like jumping between different desktop environments, but I like the Unity log-in screen MUCH more.  Is there a way to only install the most recent GNOME desktop environment, without changing the login screen?

I have LightDM installed and can start it with sudo start lightdm. But at boot, GDM is still the default. How can change this so LightDM is loaded automatically at boot instead of GDM?


I created the following method that I use to validate Roman numbers converter. In JUnit the test passes but the program doesn't throw any exception. Where did I wrong?  public void validateState(String number){     if(!number.matches("^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$"))         throw new IllegalArgumentException("Invalid number");      System.out.println("Invalid number"); }   Test:  @Test(expected = IllegalArgumentException.class) public void test15() throws Exception {     new RomanNumber("").validateState("MMMMM"); }   Thank you for the help.

How can I use JUnit4 idiomatically to test that some code throws an exception?  While I can certainly do something like this:  @Test public void testFooThrowsIndexOutOfBoundsException() {   boolean thrown = false;    try {     foo.doStuff();   } catch (IndexOutOfBoundsException e) {     thrown = true;   }    assertTrue(thrown); }   I recall that there is an annotation or an Assert.xyz or something that is far less kludgy and far more in-the-spirit of JUnit for these sorts of situations.


In English, is saying "It is normal for me to not want 'blank'" correct, or would it be "It is normal for me not to want 'blank'"?

This is one thing that keeps bugging me, and maybe there's a direct answer. Grammatically, which one is more correct of these two?  Does it make a difference?  I tried not to do that. I tried to not do that.


I want to use the userspace scaling frequency governor, but cannot figure out how to properly add the governor to my list of available governors.  I have compiled each of the potential CPUfreq scaling governors into my 4.12.9 kernel, and have even set my desired governor as the default:  # grep FREQ .config CONFIG_ACPI_CPU_FREQ_PSS=y CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_GOV_ATTR_SET=y CONFIG_CPU_FREQ_GOV_COMMON=y CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_X86_PCC_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ=y CONFIG_X86_ACPI_CPUFREQ_CPB=y CONFIG_X86_AMD_FREQ_SENSITIVITY=m CONFIG_PM_DEVFREQ=y # DEVFREQ Governors CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y CONFIG_DEVFREQ_GOV_PERFORMANCE=y CONFIG_DEVFREQ_GOV_POWERSAVE=y CONFIG_DEVFREQ_GOV_USERSPACE=y CONFIG_DEVFREQ_GOV_PASSIVE=y # DEVFREQ Drivers CONFIG_PM_DEVFREQ_EVENT=y   However, I am only ever able to access two such governors:  # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors  performance powersave   I've done a bit of searching around and have seen that some scaling governors are not available in certain patches (according to ), such as the RT patch.  However, I do not have this patch applied to my kernel so I am unsure what I'm doing incorrectly (or what I am missing).  # uname -a Linux blufor 4.12.9-MP #5 SMP Sat Oct 7 17:58:46 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux

I'm trying to change the cpu frequency on my laptop (running Linux), and not having any success. Here are some details:    # uname -a Linux yoga 3.12.21-gentoo-r1 #4 SMP Thu Jul 10 17:32:31 HKT 2014 x86_64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz GenuineIntel GNU/Linux  # cpufreq-info cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009 Report errors and bugs to cpufreq@vger.kernel.org, please. analyzing CPU 0:   driver: intel_pstate   CPUs which run at the same hardware frequency: 0   CPUs which need to have their frequency coordinated by software: 0   maximum transition latency: 0.97 ms.   hardware limits: 800 MHz - 2.60 GHz   available cpufreq governors: performance, powersave   current policy: frequency should be within 800 MHz and 2.60 GHz.                   The governor "powersave" may decide which speed to use                   within this range.   current CPU frequency is 2.42 GHz (asserted by call to hardware). (similar information for cpus 1, 2 and 3)  # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors performance powersave   I initially had the userspace governor built into the kernel, but then I also tried building it as a module (with the same results); it was loaded while running the above commands (and I couldn't find any system messages when loading it):  # lsmod Module                  Size  Used by cpufreq_userspace       1525  0 (some other modules)   And here are the commands I tried for changing the frequency:  # cpufreq-set -f 800MHz Error setting new values. Common errors: - Do you have proper administration rights? (super-user?) - Is the governor you requested available and modprobed? - Trying to set an invalid policy? - Trying to set a specific frequency, but userspace governor is not available,    for example because of hardware which cannot be set to a specific frequency    or because the userspace governor isn't loaded?  # cpufreq-set -g userspace   Error setting new values. Common errors: - Do you have proper administration rights? (super-user?) - Is the governor you requested available and modprobed? - Trying to set an invalid policy? - Trying to set a specific frequency, but userspace governor is not available,    for example because of hardware which cannot be set to a specific frequency    or because the userspace governor isn't loaded?   Any ideas?


For many months now, I've been prevented from asking new questions here, on Stackoverflow - all due to the error:     You have reached your question limit   Researching this error a few weeks back, I discovered the help page ''. On it, I was informed that:  The ban will be lifted automatically by the system when it determines that your positive contributions outweigh those questions which were poorly received.  Since then, I've consecutively answered questions, had my answers up-voted and had my comments marked as helpful.. but still, I'm unable to ask questions due to the error message.  I came across the post '' which has lead me to believe that my question ban was caused by the automatic filter and therefore, cannot be undone by a human, however I'm wondering if a moderator is able to investigate this as I feel that I've done all I can to convince the filter to lift the ban.

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


Is there an analogue of Lebesgue’s Dominated Convergence Theorem for a net $ (f_{\alpha})_{\alpha \in A} $ of measurable functions defined on a measure space $ (\Omega,\Sigma,\mu) $, where the index set $ A $ (assumed to be directed) is not necessarily $ \mathbb{N} $? That is, if   $ (f_{\alpha})_{\alpha \in A} $ converges pointwise almost everywhere to a measurable $ f $, there exists a measurable $ g $ such that $ |f_{\alpha}| \leq |g| $ almost everywhere for each $ \alpha \in A $, and $ \displaystyle \int_{\Omega} |g| ~ \mathrm{d}{\mu} \leq \infty $,   then does $ \displaystyle \lim_{\alpha \in A} \int_{\Omega} f_{\alpha} ~ \mathrm{d}{\mu} = \int_{\Omega} f ~ \mathrm{d}{\mu} $?

Let $G$ be a locally compact Hausdorff Abelian topological group.  Let $\mu$ be a Haar measure on $G$, i.e. a regular translation invariant measure.  Let $f$ be fixed in $\mathcal{L}^1(G, \mu)$.  Define the function from $G$ to $\mathcal{L}^1(G)$ that assigns to each $y$ in $G$ the function that takes $x$ in $G$ to $f(xy^{-1})$.  I.e. it assigns the $y$-translate of $f$.  Is this a continuous function of $y$ into $\mathcal{L}^1$?      On p.94 3.10 of  it is asserted that it is.  The usual proof of this sort of thing in cases where $G=\mathbb{R}$, say, is you use density of compactly supported continuous functions, and then dominated convergence.  The former survives, but dominated convergence does not work on nets.  In fact, a limit of a net of measurable functions need not be measurable.


My question might be quite unclear here. I have a giant text file with values that looks like this  0.00601233 0.000139403 0.000133679 0.000139497 0.000141683 0.000141888 0.000138646 0.000133465 0.000146326 0.000135611 ...   And I want to slice it into several files of 100 lines.  File 1 will have lines 1 to 100.  File 2 will have lines 101 to 200.  etc...  There's probably a way to do this using sed or awk but I'm not familiar enough with theses tools or with regular expressions to do what I want here.

Is there a utility that split file by newline symbol? e.g if a file contains the following lines,  aa bbb cccc   If I want to split it to 3 files, the desired output would be:  aa, bbb And cccc (in 3 different files)  I already checked the split command, it only cut file by file sizes, not what I want.  If I don't wrote a utility myself, is there any standard tool to use?


If someone asks a question that is overly broad or possibly opinionated, but you think you could give a useful answer to the asker and help them out a bit, is it bad to answer the question even if you know it will most likely be closed?  On one hand it helps the person better have a grasp of the question they want to ask (maybe answer a broad question by skimming the surface of all the things they need to be thinking about to answer their question, and it could help them ask a more useful question).  On the other hand it may reward the user for incorrect behavior, and be seen by outsiders as the correct way to ask a question.  So what do you guys think, is there ever a time when answering a question you know to be off-topic could be beneficial?

Should I post an answer to an off-topic question after flagging it?   I seem to find off-topic questions that I can give a good, useful and correct answer to. (The specific question tonight is , but it's happened several times this month now). Other users have clearly deemed the question worth a response; I think I can provide a better response based on the original question and the provided comments, but I also don't think the question fits well on StackOverflow.   By answering, I feel like I would validate the question's existence on SO. On the other hand, other users clearly deem the question appropriate enough to warrant answers.   What's the consensus for this situation?


So I know that you are supposed to get the tiny red blobs by nuddging them with your mouse. Several guides suggest that when they are close enough to the funnel you push them from underneath. Problem is I can never get them to jump that high, they only jump away from the funnel.  I have tried everything suggested to combat the bugs. Lower screen size, lower cursor quality etc but nothing helps. The creatures just won't jumpo into the funnel.  Anyone got any ideas?

So, I'll admit, I love point-and-click adventure games. The problem is, I'm terrible at them! I've been staring at this screen in Botanicula for close to half an hour, and I still have no idea what I'm supposed to do with these bouncy little cherry looking guys, and this cone.    What do I do in this area? (Or, have I been wasting my time staring at nothing?)


I am a complete newbie to Ubuntu. I just took over looking after a machine that is running 13.04. The machine does not have a GUI that I can find. How do I install something like ubuntu-desktop or xwindows with all required dependencies? I tried (from root) "sudo apt-get install ubuntu-desktop" and I received more than a screen full of dependencies. Is thee a way to get xwindows/desktop installed with one command?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I've be using a combination of "painting" apps on my iPad to create digital "paintings" out of my photos. I'd like to know what the digital specifications of both the initial photo AND the painting should be in order to print them on relatively large canvases (perhaps something around 24 x 36" or larger.)  I was told that the apps on the iPad cause a loss of resolution in the final product but I would like to sell my images to catalogs and want them to be done properly. I now shoot with a 24 MP DSLR but a lot of my photos were shot on a 10 MP Nikon D80, I think at the finest resolution possible. Would need to double check that.

What size images do I need for common print sizes, such as wallet size, 8x10, and 16x20?  Is there a general formula?  How could that size change if, for example, a 16x20 was printed on canvas rather than photopaper?


I'll be coming by road and I'm unsure of my arrival time at the airport, at least till a couple of days before the date.   The departure and arrival airports are well connected through multiple airlines and multiple flights, and I have flexibility regarding the time of departure.   Is it better to scour the booking counters of multiple airlines for a great deal on last minute departures, rather than booking something like 24 hours before ?   I'm asking for India specifically, but any help is appreciated.

We had , which covered ground on what happens to flight prices over the period.  What I'm interested to know is if I had to fly out at short notice, say within 1-2 days, then am I better off booking within that 1-2 day gap online, or am I better off trying my luck directly at the airport (as long as I'm willing to wait at the airport) for a cheaper price? Is there any truth to rumours that airlines sell tickets at cheaper prices at the airport right before flights to fill empty seats or is that a myth?


I have become relatively familiar with most commands and what-not however I CANNOT seem to actually troubleshoot these darn "underfull" messages. If anyone can look at this bit of text and help me begin to understand these warnings I would greatly appreciate it.   This is lines 57-73 with the underfull \hbox (badness 10000) in paragraph at lines 58-68 message.  \end{center}     \indent\textbf{Identity Law:}\\     If $\alpha$:A$\rightarrow$B, then\\     I$_B\circ\alpha$=$\alpha$ and $\alpha$ $\circ$ I$_A$=$\alpha$\\     \indent\textbf{One-to-One \& Onto functions (\& Bijections):}\\     We say that $\alpha:A\rightarrow B$ is \textbf{1-to-1}(injective) $\iff\alpha$(a$_1$)=$\alpha$(a$_2$)$\Rightarrow$(a$_1$)=(a$_2$)\\     \\We say that $\alpha$:A$\rightarrow$B is \textbf{onto} (surjective) if for each element in the codomain B $\exists a \in A$ such that $\alpha$(a)=b.\\     \textbf{Bijection:} $\alpha$:A$\rightarrow$B is both 1-to-1 \& onto.\\     \textbf{\underline{Theorem:}} A map $\alpha$:A$\rightarrow$B is a bijection if and only if there exists a map $\beta$:B$\rightarrow$A such that $\beta\alpha$=I$_A$ and $\alpha\beta$=I$_B$.\\     \textbf{Remark:} In this event, the function $\beta$ is unique.     \textbf{Proof:}     \begin{center}         Suppose B':B$\rightarrow$A is another such function.\\         Then: B'=I$_A\circ$B'=$\beta$($\alpha$B')=$\beta\circ$I$_B$=$\beta$\\         \textbf{Notation:} we denote the unique function $\beta$ in the theorem by a$^{-1}$, called the inverse of the bijection of $\alpha$.\\         $\alpha^{-1}\alpha$=I$_A$ \& $\alpha\alpha^{-1}$=I$_B\square$\\     \end{center}

Often, TeX outputs underfull hbox and vbox warnings when running and in the generated log file. What are these and how can I get rid of them?


I want to calculate $\nabla\cdot(\frac{\hat{r}}{r^2})$ Naively applying the expression for divergence in spherical coordinates gives $\nabla\cdot(\frac{\hat{r}}{r^2})=\frac{1}{r^2}\frac{\partial}{\partial r}(r^2 *\frac{1}{r^2})=\frac{1}{r^2}\frac{\partial}{\partial r}(1)=0$ However, based on the context in which this problem arose, I believe there should be a delta function. You can get this by noticing: $\nabla^2\frac{1}{r}=\nabla\cdot(\nabla\frac{1}{r})=-\nabla\cdot (\frac{\hat{r}}{r^2})$ Thus $\nabla\cdot(\frac{\hat{r}}{r^2})=-\nabla^2\frac{1}{r}=4\pi\delta(\vec{r})$ Can anyone point out where the error is? I suspect there is an issue cancelling out the $r^2$ in the first method due to that covering up the zero-in-denominator issue, but I would like to understand precisely what goes wrong.

Why am I getting zero divergence of function $\vec{f} = \frac{1}{r^2} \hat{r}$, where $r$ is the distance from the origin and $\hat{r}$ is the unit vector in the radial direction. The divergence of this function over a sphere of radius $R$, which includes the origin.  $$\nabla \cdot f = \frac{1}{r^2} \frac{\partial}{\partial r}(r^2 f_r) = \frac{1}{r^2} \frac{\partial}{\partial r}(r^2 \frac{1}{r^2}) = 0$$


I'm a beginner in blender scripting, in ,  wrote this simple but smart code. Can you explain me the meaning of every line?  import bpy context = bpy.context  for obj in context.selected_objects:     mx = obj.matrix_world     minz = min((mx @ v.co)[2] for v in obj.data.vertices)     mx.translation.z -= minz   In the same question the topic of how can integrate this code in Blender as a button is very interesting, can you help me with this? Actually I'm working with tutorials, Manuals, etc. but I'm afraid my knowledge is not enough.

I added a cylinder to my scene, rotated, resized, like this:   I moved it up, because I want to make a model from this and I want it to stand on the ground:   I zoomed in and learned, that this object is not on the grid floor, it floats above it:   My question is: how can I put any object on the floor? (Yes, right, I could move it up half it's size, but think on more complex objects, like a terrain.)


I changed nameserver in /etc/resolv.conf and after a system reboot it resets the nameserver back to what it was.  I am using linux mint 19 (Cinnamon).  # This file is managed by man:systemd-resolved(8). Do not edit. # # This is a dynamic resolv.conf file for connecting local clients to the # internal DNS stub resolver of systemd-resolved. This file lists all # configured search domains. # # Run "systemd-resolve --status" to see details about the uplink DNS servers # currently in use. # # Third party programs must not access this file directly, but only through the # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way, # replace this symlink by a static file or a different symlink. # # See man:systemd-resolved.service(8) for details about the supported modes of # operation for /etc/resolv.conf.  nameserver 8.8.8.8 nameserver 8.8.4.4   This is my file before i reboot my system and after reboot the nameserver changes.

I was given the files for a mini linux, that boots directly into firefox. It works for all it should be doing, only that I do not get an internet connection.  We have 3 DNS servers in the network, which all work. I can ping them, too. But when trying to ping google.de or wget google.de I get a bad address error.  nslookup google.de works for some reason.  I tracked the issue down to my resolv.conf on the booted system not having the same contents as the resolv.conf that I put into the .iso file.  I tried understanding all the factors that go into creating and modifying resolv.conf. I'm not quite sure I got it all, but I definitely didn't find my solution there.  So as a last ditch effort, I tried making the resolv.conf file immutable using   :~# chattr +i /etc/resolv.conf   When rebuilding and booting again to my surprise my file was renamed to resolv.conf~ and in its place was the same standard file that has been haunting me.   The file contents make me believe it gets the information from the network itself. When starting the .iso in Virtualbox without internet access, my file is being kept as it is.  I tried changing /etc/dhcp/dhclient.conf to not get the information from the net, by deleting domain-name-server and domain-name-search from the request part of the file.  Didn't work unfortunately.  I don't have the NetworkManager installed. The iso is based on Ubuntu 14.04.  There is probably vital information missing. I'm happy to provide it.  UPDATE:  I think I found the file that clears resolv.conf.  It seems to be /usr/share/udhcpc/default.script  #!/bin/sh  # udhcpc script edited by Tim Riker <Tim@Rikers.org>  [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1  RESOLV_CONF="/etc/resolv.conf" [ - n "$broadcast" ] && BROADCAST="broadcast $broadcast" [ -n "$subnet" ] && NETMASK="netmask $subnet"  case "$1" in     deconfig)         /bin/ifconfig $interface 0.0.0.0         for i in /etc/ipdown.d/*; do             [ -e $i ] && . $i $interface         done         ;;      renew|bound)         /bin/ifconfig $interface $ip $BROADCAST $NETMASK          if [ -n "$router" ] ; then             echo "deleting routers"             while route del default gw 0.0.0.0 dev $interface ; do                 :             done              metric=0             for i in $router ; do                 route add default gw $i dev $interface metric $((metric++))             done         fi          echo -n > $RESOLV_CONF # Start ----------------           [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF         for i in $dns ; do             echo adding dns $i             echo nameserver $i >> $RESOLV_CONF         done         for i in /etc/ipup.d/*; do             [ -e $i ] && . $i $interface $ip $dns          done # End ------------------         ;; esac  exit 0   It's part of the udhcpc program. A tiny dhcp client, that is part of busybox  Will investigate further.    UPDATE2 AND SOLUTION:  I commented the part out (#Start to #End), that seemingly overwrites the /etc/resolv.conf file and sure enough. That was the culprit. So an obscure script caused all this trouble.  I changed the question to reflect, what actually needed to be known to solve my problem, so it would be easier to find for people with the same problem and so I could accept an answer.  Thanks for the help here in figuring things out.


I have seen an answer which "has been awarded bounties worth 25 reputation by Community".  But according to the , the minimum reputation is 50.  Then, how is it possible?

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


I have data usage from Android and Iphones, and I want to check if the Iphone users consume more than the Android ones. I thought about doing a t-test, but I am not sure if the ID - I think we should be ok with the independence -  holds. Also, how important is this requisite ?

How would you test or check that sampling is IID (Independent and Identically Distributed)? Note that I do not mean Gaussian and Identically Distributed, just IID.  And idea that comes to my mind is to repeatedly split the sample in two sub-samples of equal size, perform the Kolmogorov-Smirnov test and check that the distribution of the p-values is uniform.  Any comment on that approach, and any suggestion is welcome.  Clarification after starting bounty: I am looking for a general test that can be applied to non time series data.


What's the correct form?  Example sentence:     He explained that his professor had invited his lab for/to lunch.

Which is right?      I went to the (mall) to meet my parents for lunch / to lunch   This for a paper I am submitting for a writing assignment. I have heard "to lunch" is right, but is it right in this sentence please?


I have a question to python programming. I'm writing PieMenus for my Spacemouse. It's a Syntax Question. I want to use a comand with a action and a true command at the same time.   So I want to build a menu like shown in the picture    But the code for the Extend comand dosen't works. I get the same effect like in select parent.  # Pie Selection Edit Mode class PieSelections_PM(Menu):     bl_idname = "pie.selectionspm"     bl_label = "Pie Selections Pose Mode"      def draw(self, context):         layout = self.layout         pie = layout.menu_pie()         # 4 - LEFT         pie.operator("view3d.select_border", text="Border Select",                     icon='BORDER_RECT')         # 6 - RIGHT          pie.operator("pose.select_constraint_target", text="Select Constraint Target", icon='FORCE_CURVE')         # 2 - BOTTOM         pie.operator("pose.select_all", text="Select None",                     icon='RESTRICT_SELECT_ON').action = 'DESELECT'         # 8 - TOP         pie.operator("pose.select_all", text="Select All",                     icon='RESTRICT_SELECT_OFF').action = 'SELECT'         # 7 - TOP - LEFT          pie.menu("pie.selection_Parent/Child_Extend_PM", text="Extend Parent Child", icon='LINKED')         # 9 - TOP - RIGHT         pie.operator("pose.select_all", text="Invert Selection",                     icon='FULLSCREEN_EXIT').action = 'INVERT'         # 1 - BOTTOM - LEFT         pie.operator("view3d.select_circle", text="Circle Select",                     icon='BORDER_LASSO')         # 3 - BOTTOM - RIGHT         #pie.menu("pie.selection_Parent/Child_PM", text="Parent Child", icon='GROUP_BONE')         box = pie.split().column()                 box.operator("pose.select_hierarchy", text="Select Parent", icon='ZOOMIN').direction='PARENT'         box.operator("pose.select_hierarchy", text="Select Child", icon='ZOOMOUT').direction='CHILD'                 box.operator("pose.select_hierarchy", text="Extend Parent", icon='DISCLOSURE_TRI_RIGHT').direction='PARENT'.extend=True         box.operator("pose.select_hierarchy", text="Extend Child", icon='DISCLOSURE_TRI_DOWN').direction='CHILD'.extend=True        The code with I want to change is that one below. How I have to seperate  "direction='CHILD'" and "extend=True"?

Basically, I want to have a single operator which can do multiple things, based on some attributes values.  class MyPanel(bpy.types.Panel):     # (...)     layout = self.layout     row = layout.row()     row.operator("my.button", text="Button text")  class MY_BUTTON_OT_Button(bpy.types.Operator):     bl_idname = "my.button"     bl_description = "Button description"     bl_label = "Button"     foo = bpy.props.IntProperty()     bar = bpy.props.BoolProperty()      if bar:         # Do something with foo     else:         # Do something else :P   I know how to set one attribute, like so:      row.operator("my.button", text="Button text").foo=5   But what about multiple arguments? I tried several things that didn't worked, like (e.g.):   With setattr(): row.operator("my.button", text="Button text").setattr(foo=5,bar=True)   With a custom method setVal() in the operator class: row.operator("my.button", text="Button text").setVal(foo=5,bar=True)   Maybe I must use a single EnumProperty? I hope to avoid this, so my question is: Is it possible to pass multiple custom arguments to set attributes in an operator class? And if yes, how ?  Thanks for your help.


My friend who lives in another neighborhood is making a server for MC Eternal modpack and I keep getting the "io.netty.channel.ConnectTimeoutException: connection timed out" message.

My friend had hosted a Minecraft server before and brought it back up today with my help. He and anyone in his LAN can connect. However we have had a few people try to connect, including me, and when we try to connect it gives the message:  Failed to connect to the server Connection timed out: connect  What does this exactly mean? How do we fix this?


I have a very simple question that how to write SCR_life within text. Not write in the new line. I tried \[SCR_{life} \].

If I want to insert a math formula, usually just a math symbol, in text paragraph, LaTeX put the formula to the next line and put it in the middle of the line?   How can I just insert between text?


In the attribute table of the shapefile there are some weird characters instead of Greek ones. I tried UTF-8, Windows-1253, Greek and ISO-8857-9 when upload the shapefile on the QGIS 3.1.4. Although nothing seems to work. Any other reccomendation?

I have a shapefile with some churches in Greece and the characters are not displayed correctly on QGIS, although they do displayed correctly on ArcGIS. Also the other shapefiles I have with Greek characters are displayed correctly. I tried to add the shapefile multiple times on ISO-8857-9, Greek, UTF-8 and Windows-1253, but with no result. Any other way to change that?


Supposing it is solid and wouldn't snap or break. Would it guillotine you or just pass through leaving you unwounded?

What would happen if a metal wire that was one-atom was pulled across your finger? Would it cut off your finger, or would it pass through your finger without harming you? What if the metal one atom thick was "unbreakable"?


im trying to compare a text in android to avoid refreshing texts if it's not necessary (otherwise the texts for different fields are refreshed every 50ms).  With normal texts it is not a problem. Everything works fine.  But: If there are numbers in text the text seems not to be equal. Why?  Some examples: "Abschaltpunkt" is equal to "Abschaltpunkt" (OK) / "Gewicht" is equal to "Gewicht" (OK) / "100 kg" is NOT equal to "100 kg" (NOK) / "Abschaltpunkt 2" is NOT equal to "Abschaltpunkt 2" (NOK"  A new question after edit (the comparsion works fine now). As you see I use the UI thread for refreshing the text. This app works in a network and receives arround 300 messages per second with different data (yes, it is necessary). Therefore I need the comparsion otherwise the thread is blocked and the app won't respond on user inputs.  Is there another solution? Or is my solution a good one?   This is my code:     /**   * Compares the current and new text und updates the text if necessary   * @param RessourceID given by R.id...   * @param New text   */  private void ChangeText (final int RessourceID, final String sText) {    try {    TextView tv = (TextView) findViewById(RessourceID);    // Erst prüfen ob Text ersetzt werden muss -> Spart Rechenzeit    if (tv.getText().toString().equals(sText)) {     Log.e(this.getClass().getSimpleName(), "Text nicht ersetzen: " + tv.getText() + " != " + sText);    } else {     ChangeTextThread(tv, sText);     Log.e(this.getClass().getSimpleName(), "Text ersetzen: " + tv.getText() + " != " + sText );         }   } catch (Throwable t) {    Log.e(this.getClass().getSimpleName(), "ChangeText", t);   }  }      /**    * Change the text in UI tread     */   private void ChangeTextThread (final TextView tv, final String sText) {    this.runOnUiThread(new Runnable() {       public void run() {                try {         tv.setText(sText);        } catch (Throwable t) {        Log.e(this.getClass().getSimpleName(), "ChangeTextThread", t);        }            }     });   }

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?


def PrintThree(s):      x = len(s)      return s[0:3] + x[3:]   I am pretty stuck right now on how to print only certain parts of a string. I am trying to make a code where python will print 3 characters at a time, I am trying to make it so the code prints out the whole string but only shows three characters at a time.   This should work with a string of any length.

Is there a way to substring a string in Python, to get a new string from the third character to the end of the string?  Maybe like myString[2:end]?  If leaving the second part means 'till the end', and if you leave the first part, does it start from the start?


Can i access all the members(both static and instance) in a class using like this  import java.lang.System.*;   If i want to import a class then syntax should be import java.io.PrintSteam Then we can access printstream and for accessing static members import static should be used  import java.lang.System.* is compiled successfully but not able to access any methods,instance variables,static variables from the class,then what is imported using above line.

When used like this:  import static com.showboy.Myclass;  public class Anotherclass{}   what's the difference between import static com.showboy.Myclass and import com.showboy.Myclass?


I am trying to use apache commons to read a dictionary. When I use this code   for(String line: FileUtils.readLines(new File("dictionary.txt")))     System.out.println(line); }   it prints the whole file. But when i use this code nothing happens when i am 100% sure b and line are the same      for(String line: FileUtils.readLines(new File("dictionary.txt")))     {         if(line.toLowerCase() == b.toLowerCase())             {                  valid = true;              System.out.println(line);         }   So whats wrong?


Ep 12

   I want to add another div like "ep" div in span with class "dub" with javascript or Jquery

I have a funciton that I am currently using to show a hidden div.a_type  How can I modify this code so that instead of fading in the hidden div, I can add the new div to the DOM   jQuery(function(){   // Add Answer      jQuery(".add_answer").click(function(){       if(count >= "4"){         alert('Only 4 Answers Allowed');         }else{       var count = $(this).attr("alt");       count++;       $(this).parents('div:first').find('.a_type_'+count+'').fadeIn();       $(this).attr("alt", count);     }      });   });     Ok, now that i have this sorted out, i have one more question,  I have another function that removes the inserted div's if a button is clicked. It's not working now that the additional divs are not loaded into the dom on pageload. How can i trigger the function to remove these now?  jQuery(function(){   // Hide Answer  jQuery(".destroy_answer").click(function(){   $(this).parents("div:first").fadeOut(function (){ $(this).remove() });    var count = $(this).parents('div:first').parents('div:first').find('.add_answer').attr("alt");    count--;    $(this).parents('div:first').parents('div:first').find('.add_answer').attr("alt", count);  });    });


My wife had Ubuntu 10.10 on her lap top and I have downloaded 12.04.2 to the desktop.  Do I have to do anything else or does it automatically install itself ?

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


I want to Print all the numbers between 5 to 8, with jumps of 0.3. I got 2 problems doing it:   It's not very accurate (I know the reason, what I dont know is how to get 5.89999999999 to become 5.9) I dont know how to do it without any imports and functions (without numpy and without xrange which btw does not exist in python 3.x anymore as I understood)   This is just for a Homework question, I'm a new python learner, so I dont realy know ALL the tools and tricks of python.  max = 9 min = 5 step = 0.3 while min <= max:     min += step     print(min)  Expected: 5,  5.3, 5.6, 5.9, 6.2, ...  Actual reasults: 5.3, 5.6, 5.89999999995, 6.1999999999, 6.4999999999, ...

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I may not be using the right terms for what I'm asking, but for example, "Cartesian" is an adjective derived from Descartes' name, and "Dickensian" is an adjective derived from Charles Dickens' name, both of which are used to describe things that are related to the particular person they refer to. Are there rules (even loose rules) for how such adjectives are created, or is it more of an art than a science? Is there a special name for such adjectives (like a "demonym" is a noun for people from a particular place)?  Thank you in advance for any help. Please let me know if you'd like any clarification of what I'm asking!  Edit  And if there aren't rules for this, what are the most common suffixes used, and what are examples of such suffixes?

Examples:  For (Michael) Jordan, we often see Jordanesque. Why? Perhaps because he is His Airness (and the -esque suffix is associated with fanciness)? Maybe also to avoid confusion with Jordanians?  Plato -> Platonic. Why? Do names ending with an "o" generally get the suffix "-nic"? If so what do we do with Michelangelo?  And here are some for which there does not seem to be consensus:   Tolstoy -> Tolstoyian? Tolstoyan? Toylstoyean? Something else? Any guidelines?  Schelling -> Schellingian? Schellingesque?  Is this just mostly arbitrary and a matter of convention?


I am Cambodian and living in Australia with bridging visa and I am planning to travel to USA for couple week in July 2018 to join our friends' wedding. So my question is how far could I apply for the visa before I travel date? like can I apply 6 months before I travel? and I had read some posts here mentioned that the validity of the visa is 6 months And I had read on the US visa website stated that the application might take 30 days or up to 60days in case for further processing. Thanks and really appreciate with all the answers.

As per  you cannot apply for the F-1 Visa 120 days before the expected starting date on the I-20.  Is there some similar condition for the H1B Visa or the B1/B2 Visa as well?


I recently converted the display style of a isometric map from staggered to diamond and I can't figure out the tile picking process. I'm well aware of the other existing threads regarding this subject and I read all of them but I haven't figured out a solution (my concentration these days is a mess) I'm using a very basic system which consists of passing through all tiles and pick the one where the mouse points at (something like this Map.Tile.Intersects(mouse.Rect) ) and then with the help of a color map I pick the correct tile. But I don't like this system because is pretty inefficient compared to some mathematic solutions I saw and didn't understand. So here is the code I use to create the map :                  int x = 128 * j;                 int y = 64 * i;                 int isoX = (6 * 64) + (x - y);                 int isoY = (x + y) / 2;   128 is the tileWidth , 64 tileHeight and 6 * 64 is the xOffset  And the coordinates are like this :   Can somebody give me some hints or explain what I should do ? Thank you.

I'm writing an isometric 2D game and I'm having difficulty figuring precisely on which tile the cursor is. Here's a drawing:    where xs and ys are screen coordinates (pixels), xt and yt are tile coordinates, W and H are tile width and tile height in pixels, respectively. My notation for coordinates is (y, x) which may be confusing, sorry about that.  The best I could figure out so far is this:  int xtemp = xs / (W / 2); int ytemp = ys / (H / 2); int xt = (xs - ys) / 2; int yt = ytemp + xt;   This seems almost correct but is giving me a very imprecise result, making it hard to select certain tiles, or sometimes it selects a tile next to the one I'm trying to click on. I don't understand why and I'd like if someone could help me understand the logic behind this.  Thanks!


C1 and C2 are parallel capacitors and their total capacitance is 1000.1 uF. I think C1 is large enough and I can remove C2 from the circuit. The result will be an open circuit.  Let's assume that I can buy one capacitor that has the value of 1000.1 uF. I know I can't do it in the real world because a 1000.1uf capacitor does not exist in the shops but the question will help me understand the circuit well.  Can I replace C1 and C2 with the 1000.1 uF cap? Does this 0.1 uF really matter? Is it important?

I've seen some circuits where a decoupling capacitor is used as well as a reservoir capacitor, like this (C4 and C5):    I've read about  and for me it looks as if they are meant to remove small fluctuations in the supply voltage. Then I thought - wasn't that the purpose of a  as well? Why wouldn't the reservoir capacitor be able to filter out the small fluctuations, if it is able to filter out the large fluctuations?  So I feel like I have a basic misunderstanding here. What is the purpose of a decoupling capacitor next to a reservoir capacitor, when we assume we place both equally near to the power consuming part? Or is the only advantage of the decoupling capacitor that it is smaller and can therefore be easily placed more near to the power consuming part?


Original text  Estoy intentando rotar hojas específicas de cuadros o imágenes un poco anchas para lo cual algunas hojas deben estar rotadas para facilitar la lectura.  Translation by Gonzalo Medina  In order to facilitate reading, I'm trying to rotate some specific pages containing tables or images which are wider than \textwidth. How can I achieve this?

When using pdflscape and fancyhdr, the headers also get rotated. Whilst it's a normal behaviour in most cases (especially when the document has to be printed), I am dealing with a report which will never be printed, so this default behaviour is more annoying.  Here is a MWE of a document dealing with portrait and landscape pages:  \documentclass[a4paper, 10pt]{article} \usepackage{graphicx} \usepackage{pdflscape} \usepackage{fancyhdr} \usepackage{lipsum} \usepackage[left=2cm, right=2cm, bottom=2cm, top=2cm]{geometry} \setlength{\headheight}{32pt}  \lhead{\includegraphics[scale=.5]{tt}\\Foo} \rhead{\includegraphics[scale=.5]{tt}\\\thepage} \cfoot{}  \fancypagestyle{customlandscape}{% \fancyhf{} \newgeometry{left=1cm, right=1cm, bottom=1cm, top=1cm} % ?? }  \pagestyle{fancy} \begin{document}  \lipsum[1-10] \newpage  \pagestyle{customlandscape} \begin{landscape}     Here is the landscaped content, the header of this page should look like the rest... \end{landscape}   \newpage \pagestyle{plain} \lipsum[1-10] \end{document}   Note : you will have to provide 2 images called tt for it to compile, sorry for that. So, if we look a bit closer, the header of the portrait pages look like this :    How can I manage for my landscape pages to look like this ? :   Currently, by compiling my MWE, you'll notice that the header is on the right on the landscape page.   PS : There is another problem in this MWE, after switching back to portrait, it seems I'm not able to restore the default pagestyle (with the images in the header).


Basically I want the zebra stripes effect for readability but all the methods I've found so far don't work when using filter views. Does anyone know a way or is this not possible?  Update: Using a Filter instead of Filter View helps (Thanks user 404) but it would be helpful if a proper solution could be found anyway

In Google Spreadsheets, I can use conditional formatting to color every other row in a table a certain color to make looking at wide rows easier. My problem is that I also want to use filter views so multiple people can sort the data differently simultaneously (which is why I can't just use basic filters), and the custom formatting is applied before the rows are filtered, which causes the filter views to have some adjacent rows be the same color, since they were originally an odd number of rows away. Is there any way to color the filtered rows differently or color them after the sort so colors would alternate?


I need to trim trailing '0's from numbers such as 0.50, 0.40 etc. Any suggestions? Unable to use TRIM function in SQL Server.  I don't want to use convert(decimal(10, 1), number) since that will affect values such as '0.23' for ex.

I've been using  for some time:  SUBSTRING(str_col, PATINDEX('%[^0]%', str_col), LEN(str_col))   However recently, I've found a problem with columns with all "0" characters like '00000000' because it never finds a non-"0" character to match.  An alternative technique I've seen is to use TRIM:  REPLACE(LTRIM(REPLACE(str_col, '0', ' ')), ' ', '0')   This has a problem if there are embedded spaces, because they will be turned into "0"s when the spaces are turned back into "0"s.  I'm trying to avoid a scalar UDF.  I've found a lot of performance problems with UDFs in SQL Server 2005.


On ask.fedoraproject.org I click on Sign in, then enter the OpenID address  and click on Sign in. I am redirected to  where I enter my username and password for stackexchange (this is the account, so credentials are okay) and after clicking Sign in, this site shows the message:     An error occurred on the server This event has been recorded.      If you believe you encountered this message in error, please report it   This is for months now. On Fedora 64bit Firefox 31 and Chrome.

If I'm on , I click on OpenID and then enter  and click Log In, I get a page that says:  An error occurred on the server  This event has been recorded.  If you believe you encountered this message in error, please report it.   I clicked report it and here I am reporting it! Using Firefox 26


Is there anyway to change "option + arrow keys" to "control + arrow keys"? Essentially I want to be able to bind it just like windows. Move from word to word, delete by the word etc I was able to swap around the control/option/command key within the Keyboard settings but that's not necessarily what I'm looking for. I'm trying to get the actual functionality of "moving from word to word" by using the control + arrowKey.

I rely on the "Ctrl-→" command on Windows to navigate my way through text documents.   This useful key-combo will quickly bring me to the beginning of the next word. For example, the following sequence illustrates what would happen to the cursor location after successive presses of Ctrl-→ (the "^" will represent the cursor):  ^The quick brown fox jumped over the lazy dog The ^quick brown fox jumped over the lazy dog The quick ^brown fox jumped over the lazy dog The quick brown ^fox jumped over the lazy dog The quick brown fox ^jumped over the lazy dog ...   And, if I start pressing the ← instead, it will move the cursor to the exact same spots in the document, just going the other direction (which is ideal because the position of the cursor is predictable, which leads to me being faster at making my edits):   The quick brown fox ^jumped over the lazy dog The quick brown ^fox jumped over the lazy dog The quick ^brown fox jumped over the lazy dog The ^quick brown fox jumped over the lazy dog ^The quick brown fox jumped over the lazy dog ...   Mac OS X has a similar keyboard shortcut (Option-→ - I mapped "Ctrl" to "Option" specifically so I could get this same functionality in the way I've become accustomed to).   However, "Option-Arrow" brings me to the end of the current word when using the right arrow key, as illustrated here:  ^The quick brown fox jumped over the lazy dog The^ quick brown fox jumped over the lazy dog The quick^ brown fox jumped over the lazy dog The quick brown^ fox jumped over the lazy dog The quick brown fox^ jumped over the lazy dog ...   And, what's worse, going the other direction doesn't bring you back to the same spot as moving forward, it brings you to the start of the last word:   The quick brown fox^ jumped over the lazy dog The quick brown ^fox jumped over the lazy dog The quick ^brown fox jumped over the lazy dog The ^quick brown fox jumped over the lazy dog ^The quick brown fox jumped over the lazy dog ...   This is extremely frustrating for me, as I need to switch between Windows and Mac often, and very rarely do I want to go to the end of the current word (why would I want that, unless I'm holding "Shift" as well?). I always want to skip to the beginning of the next word.   I'm willing to go to some lengths to make the Mac version work the same way (purchase software, write a custom Applescript command tied to these keyboard shortcuts), so I'm looking for suggestions.   Are there any existing tools that will change this for me?   How would you suggest "fixing" it?  Thanks  EDIT  I was able to make a "Service" in Automator, and used the following AppleScript:   on run {input, parameters}      tell application "System Events" to key code 124 using {option down}     tell application "System Events" to key code 124  end run   Then I tied this Service to the "Command-→" keystroke using the "Keyboard" settings in System Preferences.  However, for this to work I have to take my finger off the Command key.. which makes it sorta pointless. It's also slow, and don't seem to work in the application I most need it to work in (Xcode).


We boil DME and water to make a solution with an OG of 1.040, pitch the yeast and place it on a stir plate for a couple of days to make our yeast starters. After this, it is commonly suggested to place the flask in the refrigerator for 12 or more hours to flocculate the yeast, thereby allowing us to pour off the DME wort so our real wort does not get cut with the yeast-starter/DME wort.  Why does this not inactivate or cold crash the yeast?  My fridge measures roughly 30F.

So an often repeated mantra for starters is to (1) make a starter, (2) let it ferment out completely, (3) chill the starter in the fridge for a day or two, then (4) pour/decant off the oxidized "beer" in the starter flask and then (5) pitch just the slurry at the bottom of the flask into the fresh wort to be fermented.  However, I was under the impression that yeasts did not like extremely rapid temperature changes, and going from 40F in a fridge to 65-70F in wort almost instantly seems pretty rapid to me.  I'm not particularly questioning the effectiveness of the technique, mainly because I hear so many brewers espousing it, but I am curious how many here do this for most starters, and if there are any strains where you need to do something different, like pitch the whole starter at high-krausen. I prefer that method, not based on anything real, but just because it makes me the least nervous. (I KNOW the actively bubbling starter is working.)


I have a class which is used for email validation. The class has two private String fields out of which i have injected the value of one from application.properties.  public class EmailValidation {      private final String someString = "xyz"      @Value("${regex}")     private String emailRegex;      // methods }   public class EmailValidaitonTest {     private final EmailValidation obj = new EmailValidation();     //missing emailRegex }   Now i have to write a unit test for this. This class has no dependency, so  i just decided to use the new operator in EmailValidationTest class for the class object. Now, i can access the String someString but i cannot have the value of emailRegex since it was injected by Spring. How can i set its value in the test class and i want its value to be same as in my application.properties.

How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test.


private static void printReport(Country[] country) {          System.out.printf("%-25s%-16s%-10s%-18s%-17s%-14s\n",                 "Name", "Code", "Capitol", "Population", "GDP", "HappinessRank");          System.out.print("------------------------------------------------------------------------------------------------------");         System.out.println("");          for (Country b  : country) {             System.out.printf("%-26s%-17s%-7s%10d%8s%-18s%7d\n",                     b.getName(), b.getCode(), b.getCapitol(), b.getPopulation(), b.getGDP(), b.getHappinessRank());         }                }   Hey everyone! New to java programming,but I am stuck, I tried looking up how to fix it with no success.   What am I looking for? it keeps pointing at the b.getName(), b.getCode(), etc.  More of the code:  public static void main(String[] args) throws FileNotFoundException {     int maxCountries = 156;     Country[] countries = new Country[maxCountries];        String csvName = "Countries1.csv";     Scanner scanner = new Scanner(new File(csvName));     Scanner csvScan = scanner.useDelimiter("[,\n]"); {     System.out.println("Enter the File Name:"+csvName);     System.out.println("Amount of Countries Read:"+maxCountries);

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm trying to import an OBJ file that has associated MTL and PNG files. There's a similar question , but the answer is not very helpful, I just see a big blob.   that I'm trying to import. Inside the textured meshes folder there's a few different versions of the object but none seem to import correctly with the texture applied.  I also don't have access to the material and object (as well as a few other) buttons. (see the picture)    Blender 2.71


For example, in the yes man page:     yes outputs expletive, or, by default, ``y''   Why is "y" quoted this way?

I've noticed that man pages and other documents formatted by Unix utilities often use double backticks `` followed by double single quotes '' to wrap quoted phrases instead of the double quote character ". Single quotes are similarly replaced. Why is this?  Here are a couple examples, from the man page for grep:   To find all occurrences of the pattern `.Pp' at the beginning of a line:         $ grep '^\.Pp' myfile   The apostrophes ensure the entire expression is evaluated by grep instead  of by the user's shell.  The caret `^' matches the null string at the  beginning of a line, and the `\' escapes the `.', which would otherwise match  any character.   The grep utility is compliant with the IEEE Std 1003.1-2008 (``POSIX.1'')  specification.


I'm on build 1803 of Windows 10 Home. I need to disable Update Orchestrator Service aka. UsoSvc because I am running several scientific analysis programs (Biochemistry) that are required for work but may be broken with future Windows updates. I need complete control over when and how I update in order to ensure each patch is compatible.    I find that even using an elevated administrator account (activated through the command line) and running command line through the "Run As: Admin" with sc config UsoSvc start= disabled. I am denied access to the service through system error 5. Accessing through the Services manager shows a grayed out box where start-up properties are. See this screenshot:     The computer is not on a domain, it's my home system. Is there any way to either a) access the UsoSvc and change access the start-up property to disabled and eliminate the scheduled tasks, or b) access my computer with the LocalSystem account? Upon boot there is no option to click "other users..." at the start up screen to type in the computer name\localsystem.  I am looking for a way that does not include permanent deletion of the service. I have already disabled start-up of wuauserv and the trustedinstaller. Can anyone help?

We've upgraded some machines to Windows 10 and realized there were some updates which updated as required. However, I realized there was no option available to stop the download similar to that on Windows 7 and 8.1. The only way I could stop the download was to stop the Windows Update service.  My question is does anyone know of a way to stop auto updates or is stopping the service is the only solution?


The full code for the theme is  and a preview is located . They show on the permalink page but not the theme's front page.  I've tried to theme it using various codes, including one by the theme maker, but with no real success! Not overly picky about how the tags appear, though being at the bottom of the post in some fashion would be preferable.

I have just created a  blog using the Fluid theme. After creating a new post, I added a few tags, but then I noticed that the tags do not show up along with the post.  I tried searching for an option to make the tags visible, but I could not find it. As it was pointed out, apparently not all themes display the tags.  How do I make the tags visible if using the Fluid theme? What changes do I have to make to its HTML?


Is it possible to delete any of the default apps in OS X? I suppose it is possible, but will anything break if I do?  There's some, such as Stickies, iChat, Dictionary, etc. that I either have no use for, or have replaced with my own apps that provide similar functions.  Thanks guys!

There are some preinstalled apps that came with my laptop that I know I wil never ever use.   Apps like "Notes", "Stickies", "Game Center", etc.. that were preinstalled in my Macbook Pro are apps that I don't plan on ever using and it's taking up too much space in my Application Folder.  Are there any ways to remove them? Please note that I have already tried dragging it to the Trash bin, but it won't even go to the Trash bin. It' just stuck in my computer forever.


Let $G$ be an Abelian group. Prove that $H = \{g \in G \mid g^2 = e\}$ is a subgroup of $G$.  I know something similar to this has been asked, but I just want to check my understanding/reasoning:   We want to show: identity inverse closure we know: $G$ is abelian, therefore for all $a,b \in G$, $ab=ba \in G$. Is this reasoning correct: Because $G$ is abelian and $g$ is an element of $G$, $H$ must be closed under multiplication.  We are also given that $gg=e$, and since $H$ is closed under multiplication, $e \in H$.  We must now show that every element of $H$ is its own inverse. <---- This is where I get stuck....

Prove that if $G$ is abelian then the set $H$ of all elements of $G$ that are their own inverses is a subgroup of $G$.   Naturally in an abelian group, $ab = ba$ for $a, b \in G$, however I'm not sure how to show the set elements that are their own inverses is a subgroup of $G$ using arbitrary elements.