Can I get some help to make my answer more rigorous for this problem in the book Concrete Mathematics

I'm a freshman in college this semester without any previous experience in rigorous proofs or such, however I am interested in the learning more about mathematics and for that reason I picked up the book Concrete Mathematics.  I'm doing the warmup exercises on the first chapter right now, its taken me hours to do up to question 4. The problem is:  Are there any starting or ending configurations of n disks on three pegs that are more than $2^n -1$ moves apart in the Tower of Hanoi problem  My thought process so far has been:   For any $k$ disks in a stack of $n$ disks it takes $T(k-1)$ moves to clear the top. Then it takes one move for the $k$-th disk and then $T(k-1)$ moves again at most to move any number of the remaining disks back to the moved pile of $k$ disks. Therefore, all the possible legal configurations can be achieved with at most $2(T(k-1)) + 1$ moves. Which in closed form is $2^{k}+1$.   While this argument may make sense to me, I know that it isn't rigorous, it might even be false. I would like to know of a way to make a more rigorous argument here.


Series of sequence with terms over series.

Prove or give a counterexample to disprove the following statement about series of real numbers:  If $a_k > 0, s_k = a_1 + \cdots + a_k$ and $b_k = a_k/s_k$ then $\sum a_k$ and $\sum b_k$ either both converge or both diverge.


Pearson's test of Correlation or Spearman's test?

I want to conduct a correlation analysis between two continuous variables. The first variable is age and second one is number of relapses. The age is non normally distributed, whereas the number of relapse is normally distributed.  Should I conduct a non parametric correlation or parametric correlation?


I followed this Q&A for Ubuntu Server only:  and used one answer there: sudo add-apt-repository --remove ppa:whatever/ppa  ...but it only worked for the current session and didn't survive a reboot. In other words the PPA reappeared later. This made a Graphical User Interface (GUI) method that "simply works" with the click of a button highly desirable. How can a PPA be removed with the GUI?  This is not a duplicate This is not a duplicate of:  where only answers using the terminal are requested. Answers using the GUI have been deleted. The rules can be bent when a  terminal answer is given followed by "you can try this GUI option too". This question is about Ubuntu Desktop and GUI answers are requested. A new GUI solution in the future should be deleted from the Ubuntu Server question but is allowed here.


Building a flow chart in beamer using tikz

I am trying to build the following flow chart in beamer and was hoping I might get some answers on how to do it.  What I want looks like this:     I started doing this with the tikz package but ran into 2 main areas of trouble.   Problem 1) How to get that arrow that correspond to No  Problem 2) How to actually get that figure to fit into a beamer slide.   I will attach the code I have so far.  I have tried using the \resizebox command to no avail as well.   \documentclass[t,compress,10pt,xcolor=dvipsnames]{beamer} \definecolor{LHCblue}{RGB}{4, 114, 255} \usecolortheme[named=LHCblue]{structure} \usepackage[bars]{beamerthemetree} %Beamer theme v 2.2 %\usepackage{kerkis} \setbeamercovered{invisible} \usetheme{Ilmenau} % Beamer theme v 3.0 \useoutertheme[subsection=true]{smoothbars}%Beamer Outer Theme-circles on top %\usefonttheme{serif} \useinnertheme{circles} %rectangle bullet points instead of circle ones \usepackage{beamerthemebars} %\usefonttheme[mathonly]{serif}  \usepackage{amsmath,amssymb,mathrsfs,fancyhdr,syntonly,lastpage,hyperref,graphicx,subfigure} \usepackage{natbib} \usepackage{algorithm2e} \usepackage{animate}  \setbeamerfont{section in toc}{size=\normalsize} \setbeamerfont{subsection in toc}{size=\tiny} \setbeamertemplate{navigation symbols}{}%remove navigation symbols  \usepackage{times}  \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows}  \tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30] \tikzstyle{io} = [trapezium, trapezium left angle=70, trapezium right angle=110, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30] \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30] \tikzstyle{decision} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30] \tikzstyle{arrow} = [thick,->,>=stealth]   \begin{document}   \begin{frame} \frametitle{Hierarchy of decisions} \resizebox{2in}{2in}{ \begin{tikzpicture}[node distance=2cm] \node (start) [startstop] {User Input}; \node (in1) [decision, below of=start] {Is the input valid?}; \node (out1) [process, below of=in1] {Make of Vehicle}; \node (out2) [process, below of=out1] {Model of Vehicle}; \node (out3) [process, below of=out2] {Body Type}; \draw [arrow] (start) -- (in1); %\draw [arrow] (in1)-| ([xshift=-0.25cm]pro1.south west) |- (start); \end{tikzpicture}} \end{frame}  \end{document}    Feel free to use any commands you want that i don't use or to redfine colors and shapes. I'd also just be happy getting code to do it without actually having to use mine.


Indian passport slight water mark. Is this considered damaged?

My Indian passport has got some slight water mark in it now. Is this considered damaged passport or will it be fine. The pages which has my details are all intact. It is just the first page cover and slightly on the edges.  Will I need to get a new one replaced. I have a visa appointment on Monday :(


I know this isn't a difficult issue but I have come to a complete stand still, I want to print a two dimension array with values already assigned for example:      int array1[][] = new int[1][1];           array1[0][0] = 10;           array1[0][1] = 20;           array1[1][0] = 30;           array1[1][1] = 40;    I just want to simply print the values and I really can't remember how to do it, I keep on doing this  System.out.println(Arrays.toString(array1))`;   but I know this is wrong, can you help?


Is there an equivalent to Windows To Go for personal use?

is one of the most exciting Windows 8 features to me - the ability to pack up your desktop environment and take it with you anywhere is extremely appealing. Unfortunately, it's , which you can't buy for individual use.  Is there an equivalent that works for Windows 8 Professional? I would be satisfied by either a third-party program that does the same thing, or some workaround to enable Windows To Go for non-Enterprise versions.   I'm aware of various WinPE-based live environments, and that's not what I'm looking for. I want the ability to run a full Windows 8 environment off of a flash drive that I can take anywhere.


App crashes when I click the button that opens a Popup window

I'm trying to have a popupwindow that has an EditText field for user to enter a new budget and a button to save the value. Once the "save" button is clicked, the TextView in the main activity should change according to what the user input in the budget (EditText) in the popupwindow. But when I implement the OnClickListener in for the "save" button in the popupwindow, the app crashes once I try to navigate to the popupwindow from the main activity.   public void onButtonShowPopupWindowClick(View view) {          // inflate the layout of the popup window         LayoutInflater inflater = (LayoutInflater)                 getSystemService(LAYOUT_INFLATER_SERVICE);         View popupView = inflater.inflate(R.layout.spending_budgetpopup, null);          // create the popup window         int width = RelativeLayout.LayoutParams.WRAP_CONTENT;         int height = RelativeLayout.LayoutParams.WRAP_CONTENT;         boolean focusable = true; // lets taps outside the popup also dismiss it         final PopupWindow popupWindow = new PopupWindow(popupView, width, height, focusable);          // show the popup window         // which view you pass in doesn't matter, it is only used for the window tolken         popupWindow.showAtLocation(view, Gravity.CENTER, 0, 0);          // dismiss the popup window when touched         popupView.setOnTouchListener(new View.OnTouchListener() {             @Override             public boolean onTouch(View v, MotionEvent event) {                 popupWindow.dismiss();                 return true;             }         });            Button button_savebudget = findViewById(R.id.budget_save);           button_savebudget.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 String budget = newbudget.getText().toString();                 amount_budget.setText(budget);             }         });       }   The code above shows the OnClick method that opens up the PopupWindow from the main activity. And the "button_savebudget" is to save the value and change the TextView in the main activity.   The logcat is below :-      --------- beginning of crash 10-11 16:08:25.552 4980-4980/com.example.hannzern1998.spendingtest E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.hannzern1998.spendingtest, PID: 4980     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference         at com.example.hannzern1998.spendingtest.MainActivity.onButtonShowPopupWindowClick(MainActivity.java:100)         at com.example.hannzern1998.spendingtest.MainActivity$1.onClick(MainActivity.java:44)         at android.view.View.performClick(View.java:6294)         at android.view.View$PerformClick.run(View.java:24770)         at android.os.Handler.handleCallback(Handler.java:790)         at android.os.Handler.dispatchMessage(Handler.java:99)         at android.os.Looper.loop(Looper.java:164)         at android.app.ActivityThread.main(ActivityThread.java:6494)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)   I'm pretty sure the "button_savebudget" is the one that causes the crash because once I remove that particular piece of code the app doesn't crash but I'm not sure what else to change to fix it !


Deriving the formula for derangements: $\text{Round}\left[\frac{n!}{e}\right]$

I saw on  that a formula for derangements is   $\text{Round}\left[\frac{n!}{e}\right]$  However, how did they arrive at this elegant formula?  Does it have to do with $ !n=n! \sum _{k=0}^n \frac{(-1)^k}{k!}$


I am looking for the roots of $x^4=-1$, I have written $ -1 $ using Euler as $e^{j180}$. Therefore, $x=\pm e^{j45}$. But the fourth order equation should have two other roots, how can I get them?


I'm looking for ways to generate random biome borders (like what Minecraft has).  One technique involves choosing specific biomes based on (eg) a rainfall map and a temperature map. But that just determines which biome to place, not where the borders between biomes are.  I don't want to use quantized Perlin noise directly; that would generate certain quantized values strictly within other zones, whereas I'd like finer control over which biomes can abut others. For example, in Minecraft one can see mountainous terrain, forests, plains, or deserts right next to the ocean.  Many of the solutions to "the biome problem" propose computing the whole universe in a heuristic manner. I want to generate infinite terrain, and to me that suggests the algorithm be strictly functional: given an X,Y value (and a world seed) the algorithm can easily spit out a biome value.  So, my question: what are some techniques for identifying random, non-trivial-sized, contiguous chunks of terrain to be of a given biome?


How to change a single factor font inside the equation?

I have two equations with the same letter "T" and I would like to change one of then to not give the impression that are the same. One of them represents temperature(this one I want to change), by the way.


This a just a suggestion. . .  The whiteness makes the website so bright it stresses the eyes for users like me. Can we have an option to change to a darker theme?  It's kind of what  does  Option:    Bright:    Dark:    I feel this would definitely be a great addition as far as user interface designs go.  EDIT::  I installed this :   Custom stylesheet for SO. It's dark, but ugly as hell.


I am a sophomore in US with double majors in mathematics and microbiology. I am interested in self-studying the real analysis starting now since it will help me on my current research on computational microbiology, prepare for upcoming math research (starting on this Fall) on the analytic number theory, and prepare for the real analysis course I will take on Fall and Putnam competition. I just finished "Calculus with Analytic Geometry" by G. Simmons, "How to Prove It" by Daniel Velleman, and "How to Solve It" by G. Polya. I also read some portions of Apostol's Calculu Vol.I to get a deeper view on the calculus theories. I was originally planned to read Apostol's Calculus Vol.I and Spivak's Calculus first, but I think it would be a better idea to start with real analysis since it covers all ideas in those "advanced calculus" textbooks and much more. My current plan is to start with one "dumbed-down" real analysis textbook and one "comprehensive, detailed, and intermediate" textbook, and advance into Rudin's PMA (required textbook for my real analysis course) starting on Summer and use it in accordance with other real analysis textbooks. Could you help me on selecting one book from each category?   Elementary Real Analysis textbooks:  **Elementary Analysis: The Theory of Calculus (Kenneth Ross)  **Understanding Analysis (Steven Abbott)  **The Way of Analysis (Robert Strichartz)  **Real Mathematical Analysis (Charles Pugh)   Intermediate, detailed Real Analysis textbooks:  **Mathematical Analysis (Tom Apostol)  **Undergraduate Analysis (Serge Lang)  **Introduction to Real Analysis (Bartle, Sherbert) **Elements of Real Analysis (Bartle, Sherbert)  **Mathematical Analysis I (Vladimir Zorich)   Thank you very much for your time, and I look forward to your advice!   Sincerely, PK


connect via netcat and send messages in bash script

When I am writing a bash script like the following:  #!/bin/bash  nc localhost [pseudoport] echo "test"   it connects to the server but does not send the text "test".  It works with   #!/bin/bash  echo "test" | nc localhost [pseudoport]   The problem here is that the connection exits after something has been received.  How can I send multiple messages, in my case a fixed preamble followed by a variable data?


Can you maintain bardic music and still make an attack action?

Ive recently been looking into bard as a class choice and am confused on a bit about bardic music. It says   "Starting a bardic music effect is a standard action. Some bardic music abilities require concentration, which means the bard must take a standard action each round to maintain the ability. Even while using bardic music that doesn’t require concentration, a bard cannot cast spells, activate magic items by spell completion (such as scrolls), spell trigger (such as wands), or command word. Just as for casting a spell with a verbal component, a deaf bard has a 20% chance to fail when attempting to use bardic music. If he fails, the attempt still counts against his daily limit.   This makes no mention of how using a weapon and playing an instrument interact. and i am curious Can a bard attack with a weapon while he play's bardic music? a Magic item found in the Magic Item Compendium called crystal Echoblade prompted this question. it does extra damage during your bardic music performances which inevitably means one must attack.


Ok, in studying of Maxwell equations we have violation of Galilean relativity. This implies necessity of other transformations which make Maxwell equations covariant (invariant in form) under this transformation. This transformation is Lorentz transformation which conserve speed of light for all observers. Question is why any other process must be Lorentz invariant, how we know that all other processes are Lorentz invariant ?


I always read this (for example), but example is a countable noun. So, I think it should be 'for an example'.  Please check both sentences and let me know, which one is correct:     Knowing the weather will help you prepare your clothes, as well as   plan your commute. For example.   VS     Knowing the weather will help you prepare your clothes, as well as   plan your commute. For an example.   Please note:      My focus is just on for an example or for example. I do not care about   the entire sentence.


Problem with table of contents and chapters

I am writing my Master's Thesis and am in a bit of a pickle with the table of contents.  I want to add a preface and abstract as chapters, preceding the table of contents, have them show up    I want to add a preface and abstract as chapters. They have to precede the table of contents. However, the words 'Chapter 1:' preceding 'Preface' should not be added, and 'Preface' and 'Abstract' have to show up in the table of contents.   My Table of contents should look something like this:  Preface --- i  Abstract --- ii  1 Thesis subject --- 1  2 Amazing and award-deserving results --- 2.  Any help would be appreciated. I know how to swap the numbering (roman-arabic) myself. I tried using \chapter*{Preface} but then Preface disappears from the ToC.


I'm basically duplicating , because I'm not satisfied with the answer.  Here's why I'm not satisfied.  If we know that "gravity travels at a finite speed", then it seems obvious that it can cause waves. You don't need to be a genius like Einstein to figure that out. Sure, you might not be able to write down the equations that model its behavior as Einstein did for general relativity, but the mere prediction of the existence of gravitational waves hardly seems surprising (in fact, seems necessary) when you've already considered the idea that nothing can travel faster than light.  Now, I don't know who first had the idea that gravity might travel at the speed of light, but it sure doesn't seem to have been Einstein. (Wikipedia  Poincaré argued for this idea in 1904?)    Considering these, why do we say Einstein predicated the existence of gravitational waves, and why does it seem like such an extraordinary conclusion? Doesn't it seem like a trivial corrolary of the fact that gravity has finite speed, which had already been experimentally verified? Why were the recent discoveries such a big deal, and why does Einstein get all the credit for it?  Or, is it the case that, e.g., the waves predicted by Einstein somehow behave fundamentally differently from what you would expect from a finite-speed Newtonian gravitational wave? Am I missing something there?


How to copy text from PDF and paste into word without keeping the source format and linebreaks?

When I copy 2-3 paragraphs from a E-textbook PDF file and paste it to MS word,the new line(line breaks) in PDF also appears in MS word even though .It means a new line in PDF also becomes a new line the word.But this is causing inconvinience to me .Im preparing notes for my students and deleting the spaces and tabs to remove the empty spaces is too time-consuming.I want the content to come in a single line when I paste it or at least it should match the margins of the MS word.What should I do?


Find character in word in list of words and remove from original list and add to new list

I have a list of words that I've turned into a string array. I ask the user to enter a character, and my code must find whether that character is in one of the words in the list of words and add that word to a new list and removed from the original list. How do I do that? Here's  String[] temps2 = newList.toArray(new String[0]); //turns list to string array. System.out.println("\n pick a letter."); letter_1 = input.next()charAt(0);  for (String b : temps2){ for(char ch : b.toCharArray()){     if letter_1==ch){         temps2.remove(b);//don't think you can do that.


Aerodynamic effect of drafter to the draftee

I thought I read somewhere something like having someone drafting behind also has effect to the rider in front. I wonder if it's true and would like to understand how does it work because it's quite unintuitive (if it's true at all).  So, other than robbing the rider in front from tailwind, does the drafter help at all?


I received the below email. Is is a scam or not a scam?     Attention: Mohamed Atef,      May the peace of the Lord be with you.      Yes He left an ATM/VISA CARD with me before he traveled out of the   country, He ask me to send it to you, but do not know how to convert a   card to money when he did not give me the pin code due to security   reasons. He said that as soon as you confirm that you have received   the ATM CARD that his bank will give me the code so that I will send   it to you for onward withdrawal of your money.      I will need your full name, address and telephone number, to enable me   gives it to courier Service Company so that they will deliver it to   you.      I will be waiting for you to send to me your full address.      God bless, Rev. James Koko


Answers in top Network Posts showing incorrect score

There is already a question  which is posted around a month ago (which was fixed). My question reports a similar issue of showing inaccurate scores along with another bug.   A couple of answers in the Top Answers in my network profile are showing incorrect score.         As we can see they are showing a score of 10. But as of writing this question, the score of both the answers is 9.  and  both have a score of 9 instead of 10.  Even though the current score is 9, both these answers reached a score of 10 a few months ago and I was awarded  for both.         The vote was removed either when a user was removed or there was an unupvote. As far as I can tell, I don't remember an unupvote notification in the achievement box from these answers. My guess is the votes are removed when user accounts were deleted.   So, I suspect the score of answers in Top Network Posts is not updated either when there is an unupvote or a vote thrown away due to account deletion.   Is this the right reason why score is inaccurate? Can this be fixed?


I occasionally see things like:  cat file | wc | cat > file2   Why do this?  When will the results (or performance) differ (favourably) from simply:  cat file | wc > file2


Email rejected for no rDNS by AOL despite having rDNS

I am having trouble while attempting to send a single email to an aol.com user. I get a rejection reply as follows:  Your message did not reach some or all of the intended recipients.     Sent: Wed, 27 Jul 2011 15:56:24 -0400    Subject: Test  The following recipient(s) could not be reached:  example@aol.com    Error Type: SMTP    Remote server (205.188.103.1) issued an error.    hMailServer sent:     Remote server replied: 421 4.7.1 : (DNS:NR) http://postmaster.info.aol.com/errors/421dnsnr.html  Tried 9 time(s)    hMailServer   Troubleshooting using AOL's troubleshooting page, rDNS lookup results are:  RDNS Results  DNS Server Response: www.scanhelper.com   And using NSLOOKUP myself ..  > 60.158.172.99.in-addr.arpa Server:  homeportal Address:  192.168.1.254  Non-authoritative answer: 60.158.172.99.in-addr.arpa      name = www.scanhelper.com   When using telnet,  C:\>telnet mailin-01.mx.aol.com 25 421 4.7.1 : (DNS:NR) http://postmaster.info.aol.com/errors/421dnsnr.html   Connection to host lost.   My hMailServer is set up correctly, is not an open relay, is not used for spam, is not on any blacklists, and so forth.  Any tips on getting AOL mail servers to accept mail?  As far as I can tell, everything is being done correctly on my end.


Can I damage the focus system by turning the focus ring when the lens isn't mounted?

I have a couple lenses that don't have an internal focusing system, and whenever I want to put them back in my bag, I turn the focus ring to make the lens shorter.  I noticed that when the lens is set to auto focus, the focus ring is harder to move than when it is on manual focus. Can I damage the focusing system by turning the focus ring when the lens is set to auto focus?  I would think that if the lens is off the camera it wouldn't cause any damage. Am I right?


So I had a dispute with the moderators at a specific SE site. As a result, I got suspended there. As per SE guidelines, I pressed the "Contact us" button and wrote to the higher powers to appeal.  That was 5-6 weeks ago. There was zero feedback, neither positive, nor negative, not even "it's in progress, please wait".  So what is this "contact us" thing supposed to do? Is it a placebo to make me feel better while being routed to dev/null?  What is the normal time it takes to process a "contact us" message?  Notes:   As far as I remember, I did not contact the team before. I'm a longtime user of multiple SE sites and never had any problems except for that one site. I'm pretty sure my form was submitted. I didn't make screenshots or anything, because I did not think I would need them in a post like this. I didn't expect a super-fast reply either, so I wasn't wondering after a week or two.


Consider the following MWE:  \documentclass{article} \usepackage{mhchem}  \begin{document}  \ce{{}^3He} has a higher vapour pressure, and therefore a lower boiling point,  than \ce{{}^4He}: the result of this is that pumping away the most energetic  molecules from the bottom layer preferentially removes \ce{{}^3He}.  \end{document}   which yields the (correct) output. (I don't have enough rep to post three images separately!)  Attempting to package the awkward \ce command into a custom macro messes up the spacing with the following words, though not with punctuation:  \documentclass{article} \usepackage{mhchem}  \newcommand{\HeThree}{\ce{{}^3He}} \newcommand{\HeFour}{\ce{{}^4He}}  \begin{document}  \HeThree has a higher vapour pressure, and therefore a lower boiling point, than \HeFour: the result of this is that pumping away the most energetic molecules from the bottom layer preferentially removes \HeThree.  \end{document}   Placing a fixed space (~) in the macro naturally reverses this, so the punctuation spacing is now incorrect:  \newcommand{\HeThree}{\ce{{}^3He}~} \newcommand{\HeFour}{\ce{{}^4He}~}   The outputs of these three arrangements are as follows:    What is the best way to get a consistent, correct spacing with a macro, that doesn't rely on me manually having to place a ~ after each time the macro precedes a word?  (I have the latest versions of TeXLive and mhchem installed)


Fibonacci's sequence: seeding numbers and order

Is there a name for (or even the NEED for a name for) taking the starting point (seeding) of Fibonacci's sequence "back" past $0$ or $1$ ?. $$ \left\{\vphantom{A^{A^{A}}}\ldots -21, 13,-8, 5, -3, 2, -1, 1, 0, 1, 1, 2, 3, 5, 8, 13, 21\ldots\right\} $$ I figure it could also be rewritten, reversing its order, with subtraction being action as $$ \left\{\vphantom{A^{A^{A}}}\ldots 21, 13, 8, 5, 3, 2, 1, 1, 0, 1, -1, 2, -3, 5, -8, 13, 21\ldots\right\} $$ It seems like someone a lot smarter than me would have already talked about this but it felt pretty good to walk in that person's same footsteps and have those personal "aha!" moments. Thanks for your time, Ben Prohm


Create a workflow rule when Lead status is changed from X to Y

I want to create a workflow rule which should be triggered when I change the Lead Status value from 'Open: Not Contacted' to 'Open: Working'  Any help with this please?


In which cases should I use the subjunctive mood?     I suggest that every applicant fill out the form carefully.        If she were rich, she would live on Long Island.


I tried to expand this sum using the formula but still can't observe why it can be divided by... I mean eventually, I'll get $(p-1)(2p-1)$ must be divided by $6$, but why?


The inverse of a bijective holomorphic function is also holomorphic

I'm confused about the following proposition  Proposition. Let $U,V$ are open sets in $\mathbf{C}$. If $f:U\to V$ is holomorphic and bijective, then  the inverse  $f^{-1}:V\to U$ is also holomorphic.  The proof of the proposition think that the  continuity of $f^{-1}$ is obvious, but I find it is really difficult to prove  using $\epsilon-\delta$ definition. Can anyone give some hints?


Difference between in time and before time

My boss gave me a task with the completion date 31 March, 2016. I completed the task on 28 February, 2017.   He can label my work in one of six ways:   Achieved before time Achieved in time Achieved after target date Not achieved Will be achieved in time Will not be achieved in time.   Which is the appropriate answer from the above six?


I am trying to apply for visa student for the US, but I will have the South African  Refugee Travel Document instead of a regular passport. I am worried that they might not be able to issue a visa for me. What are the requirements for people like me to get a visa to US with a South African Refugee Passport?


If $Y|X \sim N(0,1)$, does that mean $Y$ itself is also $N(0,1)$? It looks like it as I can write $$ E[Y] = E[E[Y|X]] = E[0] = 0, $$ and $$ Var[Y] = Var[E[Y|X]] + E[Var[Y|X] = Var[0] + E[1] = 1.  $$ But although I get the correct expectation and variance I don't see how we can say $Y$ is normally distributed? If it is true, does this only hold because we are dealing with the normal distribution?


System Requirements For Installing Ubuntu

I wanted to know that can we install ubuntu on the following System Requirements:--     Processor: Intel(R) Core(TM)2 Duo CPU     E4700  @ 2.60GHz (2 CPUs), ~2.6GHz                Memory: 2048MB RAM      DirectX Version: DirectX 11   Display Devices        Card name: Intel(R) G33/G31 Express Chipset Family    Manufacturer: Intel Corporation       Chip type: Intel(R) GMA 3100        DAC type: Internal      Device Key: Enum\PCI\VEN_8086&DEV_29C2&SUBSYS_75291462&REV_10  Display Memory: 256 MB


I would like to swap from csh to bash, then I have to set the .bashrc with the commands I use. Translating alias with parameters seems to be not easier as I believed. csh:  alias gr 'xmgrace -legend load -nxy \!* -free -noask&'   the param \!* means all params on the command line; Then I tried for bash:  alias gr='xmgrace -legend load -nxy $@ -free -noask&' alias gr='xmgrace -legend load -nxy $(@) -free -noask&'   But neither worked.  The other issue comes from memorizing the current directory csh:  alias t 'set t=\`pwd\``;echo $t' alias tt 'cd $t'   I tried a lot of things but without any results.


Loading content as the user scrolls down

I am building a blog type page, and I want to load items into the page as the user scrolls down, much like Google Reader, or Soup.io. How would you go about achieving this effect? I've seen some examples which read the height of the page, and have an onScroll even attached to the window so that as the user scrolls down we can test to see if they've scrolled down far enough to warrant loading more items. Soup.io's implementation seems to remove the old items as you scroll down so that the browser isn't dealing with an ever-increasingly large DOM tree. Which javascript libraries would be best suited to this task?


Referring to a correctly-styled pseudocode procedure name from the main text

I'm using the  algpseudocode package, and have defined a procedure inside an algorithmic environment that I would like to refer to from the main text.  Inside this environment,  \Procedure{MyProc}{$x$}   and  \Call{MyProc}{$y$}   both display MyProc in what appears to be a nice small-caps style.  I would like this same styling to be applied when I refer to the procedure name from the main text, but I couldn't find a way to do this in , and trying to start an "in-line" environment didn't work:  Calling the procedure\begin{algorithmic}\Call{MyProc}{$y$}\end{algorithmic} results in   It results in the error:  ! LaTeX Error: Something's wrong--perhaps a missing \item.  See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  ... l.418 ...thmic}\Call{MyProc}{$y$}\end{algorithmic}                                                   , results in ?   Any ideas?  Please don't tell me I have to grovel through the algpseudocode source code, dig up whatever style it's applying, and hardcode that each time I want to refer to a procedure name...  Thanks!


For any natural number $n$, exists $z,x,y\in\mathbb{N}$ such that: $z^n=x^2+y^2$

Prove that for any natural number $n$, one can find $z,x,y\in\mathbb{N}$ such that: $z^n=x^2+y^2.$   Here $\mathbb{N}$ denotes all the natural numbers $n\geq1$.  This problem feels like so much general that i don't even know how to start. I don't think that any of the things that i tought is worthy of posting here.  So i'm asking for hints. Can someone give some good ideas on how to start?


I have used Audrey's code to cite something of the form: \citet[p.~42]{smth}. This code is excelent if someone wants to have the parentheses affected as well. Now, I ask if it is possible to have the parentheses with another color. For example I would have preferred it to be black. A minimal script for replication and possible change is the following:   \documentclass[hidelinks,12pt]{article} \usepackage[utf8x]{inputenc} \usepackage{colortbl, tcolorbox}          \usepackage[sectionbib, sort]{natbib}  \usepackage{chapterbib} \usepackage{etoolbox}  \definecolor{darkred}{rgb}{0.5,0,0} \definecolor{darkgreen}{rgb}{0,0.5,0} \definecolor{darkblue}{rgb}{0,0,0.5}  \definecolor{dark-red}{rgb}{0.4,0.15,0.15}  \usepackage[hyperfootnotes = true]{hyperref}  \hypersetup{colorlinks,                  linkcolor=red,                                 filecolor=darkgreen,  urlcolor=darkred,  citecolor=blue}  % Audrey's code starts \makeatletter   % include postnote and \citet closing bracket in hyperlink \pretocmd{\NAT@citex}{%   \let\NAT@hyper@\NAT@hyper@citex   \def\NAT@postnote{#2}%   \setcounter{NAT@total@cites}{0}%   \setcounter{NAT@count@cites}{0}%   \forcsvlist{\stepcounter{NAT@total@cites}\@gobble}{#3}}{}{} \newcounter{NAT@total@cites} \newcounter{NAT@count@cites} \def\NAT@postnote{}  % include postnote and \citet closing bracket in hyperlink \def\NAT@hyper@citex#1{%   \stepcounter{NAT@count@cites}%   \hyper@natlinkstart{\@citeb\@extra@b@citeb}#1%   \ifnumequal{\value{NAT@count@cites}}{\value{NAT@total@cites}}     {\ifNAT@swa\else\if*\NAT@postnote*\else%      \NAT@cmt\NAT@postnote\global\def\NAT@postnote{}\fi\fi}{}%   \ifNAT@swa\else\if\relax\NAT@date\relax   \else\NAT@@close\global\let\NAT@nm\@empty\fi\fi% avoid compact citations   \hyper@natlinkend} \renewcommand\hyper@natlinkbreak[2]{#1}  % avoid extraneous postnotes, closing brackets \patchcmd{\NAT@citex}   {\ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi    \if\relax\NAT@date\relax\else\NAT@@close\fi\fi}{}{}{} \patchcmd{\NAT@citex}   {\if\relax\NAT@date\relax\NAT@def@citea\else\NAT@def@citea@close\fi}   {\if\relax\NAT@date\relax\NAT@def@citea\else\NAT@def@citea@space\fi}{}{}  \makeatother % End of Audrey's code  \bibpunct{(}{)}{;}{a}{,}{,~}     \title{My title} \author{My name}


How to simulate keypress using Javascript?

Is it possible to simulate key press using JavaScript? For example, How can I simulate Ctrl+Alt+ArrowKey? I want to simulate special keys. Is there any API/Framework available?  Lets say, I am building a web based virtual keyboard.


How do I execute for a player wearing armor with a colored name

I am working on a command block contraption on my server that involves armor giving you certain potion effects.  /execute if entity @p[nbt={Inventory[{Slot:100b,id:"minecraft:leather_boots",tag:{display:{Name:"{\"text\":\"Frog Boots\"}"}}}]}] run effect give @s jump_boost 1 1 true  However, it only works if the boots are named in an anvil. How would I write the command if I wanted to test if the player was wearing boots named "Frog Boots" in bold and green text?


What is the fundamental group of a torus $T^2$ minus finite points?

Suppose that we have a torus $T^2$, and if we remove one point onit then it can deform retract onto the wedge of 2 circles, we can achieve it by first removeing one point on the polygonal region that represent the $T^2$ and then the polygonal region with one pointed removed can be retracted on its edge, so how to generalize this process to the case in which finite points are removed


Adjectives after nouns in descriptions of persons or animals

Am I right that gray is an adjective in the following quote?  ...the light was coming from a flashlight being carried in the mouth of a large black Scottie dog, its muzzle gray with age.  Is it common in modern English, or is it an archaic/poetic usage?


I have this quadratic form  $Q= x^2 + 4y^2 + 9z^2 + 4xy + 6xz+ 12yz$  And they ask me:  for which values of $x,y$ and $z$ is $Q=0$?  and I have to diagonalize also the quadratic form.  I calculated the eigenvalues: $k_{1}=0=k_{2}, k_{3}=14$,   and the eigenvector $v_{1}=(-2,1,0), v_{2}=(1,2,3), v_{3}=(3,6,-5)$   I don't know if this is usefull in order to diagonalize or to see when is $Q=0$


Real roots of a polynomial of real co-efficients , with the co-efficients of $x^2 , x$ and the constant term all $1$

Can all the roots of the polynomial equation (with real co-efficients) $a_nx^n+...+a_3x^3+x^2+x+1=0$ be real ? I tried using Vieta's formulae $\prod \alpha=\dfrac {(-1)^n}{a_n}$ , $(\prod \alpha )(\sum \dfrac 1 \alpha)=(-1)^{n-1}\dfrac 1 a_n$ , so $\sum \dfrac1\alpha = -1$ but this is not going anywhere , please help .


One of my favorite quotes is by Alvin Toffler which says:     The illiterate of the 21st century will not be those who cannot read   and write, but those who cannot learn, unlearn, and relearn.   The way I understand "relearn" in the quote is to learn something new that is different from what was originally learned.  I'm wondering in general if "relearn" convey learning the same thing again, or a different thing, or it depends on the context of the sentence. Is the same thing true for "learn again"?


Obtaining XY coordinate when clicking on globe using ArcGlobe

Work in ArcGlobe and I want to calculate the coordinates of the globe latitude and longitude, but the coordinates from the mouse click is read from the screen, not the globe, because when I clicked on the corner of the screen it shows me the coordinates 0,0. How can I make it so that coordinates read with globe and not with the screen? import arcpy import pythonaddins  class ToolClass2(object):     """Implementation for coord_addin.tool (Tool)"""     def __init__(self):         self.enabled = True         self.shape = "NONE" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.     def onMouseDown(self, x, y, button, shift):         pythonaddins.MessageBox("Long" + " " + str(x) + '\n'+ "Lat"+ " " + str(y), 'Coordinates', 0)         pass     def onMouseDownMap(self, x, y, button, shift):         #pythonaddins.MessageBox("Long" + " " + str(x) + '\n'+ "Lat"+ " " + str(y), 'Coordinates', 0)         pass     def onMouseUp(self, x, y, button, shift):         pass     def onMouseUpMap(self, x, y, button, shift):         pass     def onMouseMove(self, x, y, button, shift):         pass     def onMouseMoveMap(self, x, y, button, shift):         pass     def onDblClick(self):         pass     def onKeyDown(self, keycode, shift):         pass     def onKeyUp(self, keycode, shift):         pass     def deactivate(self):         pass     def onCircle(self, circle_geometry):         pass     def onLine(self, line_geometry):         pass     def onRectangle(self, rectangle_geometry):         pass


Very difficult question. Can't make sides equal after multiple manipulations.This one is lost on me. Help a fellow human out. Thank you.


When I run ls -adl .* in one of my directories, I get a file that has this listing:  lrwxrwxrwx  1 user group   43 Jul  3 16:25 .#filename.py ->   person@computer.edu.4018:1372874769   The filename and URL-looking thing are highlighted in red. What does the l mean in lrwxrwxrwx? What kind of file is this?


How do I find out what program 'owns' a hotkey?

I'm running XFCE 4.12 on top of Gentoo with a 4.2.0 kernel.  My PlayPause button on my keyboard used to work as a global hotkey for VLC. Now VLC won't even recognize the key.  It does see "Alt + Media Play Pause" but not the key alone.    Is there a way to see if and what program might be capturing that key?  When I run xdotool key "XF86LogGrabInfo" the tail /var/log/Xorg.0.log file reads  [ 10138.690] (II) Printing all currently active device grabs: [ 10138.690] (II) End list of active device grabs


java.lang.NullPointerException on AsyncTask android studio to Retrofit Rest API

I am trying to send data from an Android Mobile App to Retrofit Rest API.  I took reference from this:   The Android APP    Retrofit Rest API (server, handles the data sent from the android app)    the server then forwards the data to Cassandra.   i did some modification in the android app to send my custom data (battery info) instead of the accelerometer data as in the project i took as template.   Here is my SendAccelerationAsyncTask  Class   private class SendAccelerationAsyncTask extends AsyncTask<Collection, Void, Void> {          protected void onPreExecute() {          }          @Override         protected Void doInBackground(Collection... params) {             try {                 SampleData training = new SampleData();                 training.setCollection(params[0]);                 cassandraRestApi.sendTrainingAccelerationValues(training);             } catch (Exception e) {                  e.printStackTrace();             }             return null; }   My problem is that when i try to send to data, the AsyncTask crashes with error:   04-13 08:55:43.120 4750-4818/com.miralak.basicaccelerometer W/System.err: java.lang.NullPointerException 04-13 08:55:43.121 4750-4818/com.miralak.basicaccelerometer W/System.err:     at com.miralak.basicaccelerometer.activity.CollectDataActivity$SendAccelerationAsyncTask.doInBackground(CollectDataActivity.java:459) 04-13 08:55:43.122 4750-4818/com.miralak.basicaccelerometer W/System.err:     at com.miralak.basicaccelerometer.activity.CollectDataActivity$SendAccelerationAsyncTask.doInBackground(CollectDataActivity.java:422) 04-13 08:55:43.122 4750-4818/com.miralak.basicaccelerometer W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:287) 04-13 08:55:43.123 4750-4818/com.miralak.basicaccelerometer W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:234) 04-13 08:55:43.123 4750-4818/com.miralak.basicaccelerometer W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) 04-13 08:55:43.123 4750-4818/com.miralak.basicaccelerometer W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) 04-13 08:55:43.123 4750-4818/com.miralak.basicaccelerometer W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) 04-13 08:55:43.123 4750-4818/com.miralak.basicaccelerometer W/System.err:     at java.lang.Thread.run(Thread.java:838)   I checked and confirmed that the variable being send is not null  but I am getting null pointer exception?  Thanks  update  NOTE:  line 459 is  cassandraRestApi.sendTrainingAccelerationValues(training);  i checked the values in training by:  Log.v("test", "" + training.getCollection().getStatus()); Log.v("test", "" + training.getCollection().getTechnology()); Log.v("test", "" + training.getCollection().getTemperature());   and so on..   here is the sendTrainingAccelerationValues method:  public interface CassandraRestApi {     @POST("/test")     Response sendTrainingAccelerationValues(@Body SampleData testing); }


I want to write a program in which I want to initialize integer array of size 987654321 for storing values of 1 and 0 only, here is my program  #include <stdio.h> #include <stdlib.h>  int main(){     int x,y,z;     int limit = 987654321;     int arr[limit];     for (x = 0;x < limit;x++){         printf("%d \n",arr[x]);     }     return 0; }   but it gives segmentation fault


What should I do when a hacker gives me hacked money?

I was peacefully playing GTA Online (yeah, was killing someone coming out of ls customs) then a hacker came and killed me using explosive ammos, I called him a hacker and he teleported to me and gave me 790k. I know that people get banned for receiving this kind of money, what should I do to avoid the ban?


Does anyone remember a short story involving "Prince Rupert's Drops"? Story character finds these beautiful iridescent golden glass-like objects on the beach at one of the Great Lakes, and thinks it's a "Prince Rupert's Drop". I think he finds other like it and carries them home. Suddenly they begin to glow and even burn their way through containers/walls, and seem to be returning to the lake. I cannot remember the title, and I think it was in one of my Dad's old book collections, might have been published as early as the 1930's.


Is it safe to run an infected program under wine with another user?

I want to run some windows applications under Wine/PlayOnLinux. let's say they are infected or they have some malicious behavior.  Is it safe to create another user account and run these program under Wine with that account?  -- Edit --  My question is more related to the user accounts.    What if i run this malicious software with another user account which is not an admin (can't run sudo) and has no access to anywhere else except its own home directory.  So, in this scenario are my personal files at my primary account safe? is the ubuntu root ( / ) partition safe and untouchable? i think it should be.    According to  running wine as a separate user is a good thing to do.  But what about the removal devices or mounted ntfs partitions? i think their not the case and can be infected easly.


Its a question I have read in a book, that,     When two surfaces are polished, the frictional coefficient decreases. But if the surfaces are made highly smooth, the frictional coefficient increases and becomes very large. Explain why?   My thinking says that with excessive smoothness there is more ease of bond formation between the two surfaces and since friction (modern theory) is because of temporary bond formation, friction increases and hence its coefficient. Is this thinking right?


Does a SOQL Query that returns 0 results still count toward Query Governor Limit?

I'm pretty sure the answer to this is yes, but was hoping to get community confirmation of that since I can't find any post asking the question or any documentation specifically indicating one or the other.  Let's say I have the following map in my class, which gets its values by passing a list of contacts to the CommunityUsersManagerUtil - but sometimes that list being passed to the method (contactsThatChangedEmailList) may be empty:  Map<String, User> usernameChangeToUserMap = CommunityUsersManagerUtil.getCommunityUsersForContactsByUserName(contactsThatChangedEmailList);     Then, the getCommunityUsersForContactsByUserName method puts together a list of usernames from the contact list. In this scenario, that set of Strings would also be empty. That empty string is then used in a query which will return 0 results.  public static Map<String, User> getCommunityUsersForContactsByUserName(List<Contact> contacts){     Set<String> usernames = new Set<String>();     for(Contact con : contacts){             usernames.add(generateUsername(con));     }      List<User> users = [SELECT IsActive, ID, ContactID, Username FROM User WHERE username in: usernames AND ProfileID =:communityProfileIDStatic ];     Map<String, User> result =  new Map<String, User>();     for(User u: users){         result.put(u.username, u);     }     return result; }           Ultimate Question: The above scenario, even though it returns 0 results, still counts as 1 of 100 available SOQL queries in a   transaction, correct?      If so, I would like to begin working on wrapping all of these Util   classes in an if(!list.IsEmpty){} block to stop them from running   unnecessarily and bogging down my query limits


How to disable automount in nautilus's preferences

I am using Ubuntu 11.10 (64 bits) and I do not want to mount automatically USB thumb drives in my system. I tried the command dconf-editor and gconf-editor but there isn't the icon to disable it in nautilus preferences (apps|nautilus|preferences|media_automount).  Thanks.


I just learned about voltage dividers and how to calculate the relative values for the resistors to use. For instance, to go from 5v to 3.3v I could use a 1 kohm and a 2 kohm resistor. However I could also use a 100 ohm and 200 ohm, or 15 and 30 ohm or as far as I can tell just any two values with the correct relative values. I think however there are up and downsides of different absolute resistor values.  So my question is, how do I decide which specific values to use?


How do i place an image in the centre of a page horizontally?

Currently I have everything on the left hand side of the page. But I would like to begin changing it to the middle (just horizontally). But as i'm a beginner, each time i try it doesn't turn out right. Could someone with more experience help?   html:

   css:     .iphonecontainer    {    width:100%;    float:left;    margin-top:6.5%;    }     .iphone {    display:block;    width: 400px;    margin: 0;    padding: 0;    }   Thanks for taking the time to help, have a good day!


I mistakenly approved a suggested edit. How can I undo it?

My confused mind swapped old/new state in suggested edit and I've approved an edit that introduced rubbish when I was thinking I was approving an edit that removed rubbish. How can I undo this?


How many bank statements are required for a UK visa?

I am applying for a UK visa. Can I show 5 months worth of bank statements for the UK visa, or is 6 months a requirement, as its not mentioned on their website?  There are no appointment dates showing in April. Is there any time limit in which we have to book an appointment after paying the fee?


Required documents for minor U.S. citizen entering and returning from Canada

My 17-year-old daughter's passport expired on April 1, 2015. She is a U.S. citizen. I need to know if she will be allowed to across the border from Rochester, New York to Canada and back from Canada to Detroit. She has with her the expired passport and her original birth certificate, and will be traveling with her mother.


I get essentially a black screen when rendering or the colour of the world, I ran a fluid simulation and it looks fine in the rendered view but doing the final render gives no result.


Name of part of Cormac McCarthy's writing style

Cormac McCarthy has several idiosyncracies in his writing style, but I'm looking for the name of a specific style he employs: When he joins together several actions or clauses with "and".  Example that I just made up: "He walked over to the horse and whispered to it and stroked it and let it know that everything was ok and closed his eyes and…"  I'm fairly certain it has a name, but it escapes me, and it's hard to google the word "and".


Cycle permutation problem, no women sit next to each other

I have a problem :  There are 6 men and 5 women who will sit in a circular table. How many ways they sit where no two women sit next to each other?  I have tried to work for it and get the result $5!*5!$, where the first $5!$ represents the number of ways men sit and the second $5!$ is the number of ways to permute the women,  but I am not so sure. Help please


Prove that the union of the interior of a set and the boundary of the set is the closure of the set

I'll denote closure of A with $\overline{A}$, $A^\circ$ as the interior of A, $\partial A$ as the boundary of $A$ and $A'$ as the accumulation points. I'm trying to prove the following:   $$\overline{A}=A^\circ \cup\partial A$$  Is this a valid proof?  Take $x \in A^\circ \cup \partial A$ then $x \in A^\circ$ or $x \in \partial A$   if $x \in A^\circ$ then $x \in \overline{A}$  if $x \in \partial A$ then $x \in \overline{A} \cap\overline{(X\setminus A)}$ thus $x \in\overline{A} $ so $A^\circ\cup\partial A\subset\overline{A}$  Take $x \in \overline{A}$ then $x \in A' \cup A$ thus $x \in A'\setminus A$ or $x \in A^\circ$  if $x \in A'\setminus A$ then $x \in \overline{(X\setminus A)}$ so $x \in \overline{A}\cap\overline{(X\setminus A)}$ and $x \in\partial A$ so $x\in A^\circ\cup\partial A$  if $x \in A^\circ$ then $x \in A^\circ\cup \partial A$ so $\overline{A}\subset A^\circ\cup\partial A$


Why do high frequency waves have high energy

It is known that electromagnetic waves with a high frequency possess a greater amount of energy than waves with lower frequencies. Why is this the case? Does it have anything to do with Planck's law?


In the unanswered section of many sites there are a lot of questions that have 0 answers but when you go and look at them someone has suggested an answer in the comments, this creates unnecessary questions to be put in the unanswered section, thus clogging it up. To fix this would it be possible to put a button next to each comment(A little check mark or something along those lines)that would indicate if that comment solved the askers problem. If this is the case one of two things could happen.  1:     The correctly chosen comment could be converted into an answer and then either be automatically chosen as the right answer or just put up as a answer.  2:     The question still technically will have 0 answers but it will be moved out of the unanswered category, allowing for actual unanswered questions to be in there.


\includepdf jumps to new page - can I avoid that?

For my thesis I shall include some pdf-files in the appendix (i.e. appendix a, b, c etc.). I would like the section title (Appendix of Introduction) and the subsection title (Appendix a: Initial presentation of the project) to be at the top of the page on which the first page of the multi-paged pdf-file start.  First I was doing:  \pagebreak  \section*{Appendix of Introduction}  \subsection*{Appendix a: Initial presentation of the project}  \includepdf[pages={ - },scale=0.8,pagecommand={\thispagestyle{plain}}] {appendix/Initial-presentation-of-the-project.pdf}   That gave me one page with the two titles at the top and the included pdf-file starts on the following page.  After being directed to this thread:  I figured out how to get the title of the subsection on the same page as the included pdf-file, but now the subsection title is on all the pages of the included multi-page pdf-file:  \pagebreak  \section*{Appendix of Introduction}  \includepdf[pages={ - },scale=0.8,pagecommand=\subsection{Appendix a: Initial presentation of the project}] {appendix/Initial-presentation-of-the-project.pdf}   I need to figure out how to have the title of the subsection only on the first page of the appendix (a).  Furthermore, the problem of how to get the title of the section on that same page remains as well.


This was photographed near Budapest, Hungary, though my friend said she'd only ever seen these in the USA before.


How to get full query text from performance_schema.threads?

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


Concatenate two files and separate them with a newline

I have two files:  k.txt:  3 5 7 9 19 20    h.txt:  000010 100001 111001   if I just use cat, there is no newline. I need a command which would provide a file which looks like this:  3 5 7 9 19 20  000010 100001 111001


Who are the diamond moderators, and what is their role?

Some people have a diamond after their username (e.g. )    What special privileges do diamond moderators have? How can I become a diamond moderator? Who are the diamond moderators?  How many are there?      For more information, see  in the .     Note: not to confuse with certain Stack Exchange employees, for example  members or "community managers", who often have diamonds as well, but are not ordinary moderators.


Chaining together two successive time dilations through two Lorentz transformations

The three clocks $A, B, C$ at the same position in spacetime at the beginning of the measurement. $A$ starts moving to the right with the velocity $v$ with respect to $B$ and $B$ starts tracing $A$ with the velocity $u$ with respect to $C$, $v>u$. By time dilation relations can be written $$t_A=t_B\sqrt{1-\frac{v^2}{c^2}}, t_B=t_C\sqrt{1-\frac{u^2}{c^2}}$$. Then one can find $$t_A=t_C\sqrt{1-\frac{v^2}{c^2}}\sqrt{1-\frac{u^2}{c^2}}$$. Using the rule of the addition of velocities, the velocity of $A$ with respect to $C$ is defined as $$w=\frac{u+v}{1+\frac{uv}{c^2}}$$ Then $$t_A=t_C\sqrt{1-\frac{w^2}{c^2}}=\frac{t_C\sqrt{1-\frac{v^2}{c^2}}\sqrt{1-\frac{u^2}{c^2}}}{1+\frac{uv}{c^2}}$$ which is different from the one obtained by chaining up the relations.  What is wrong here?  I tried to understand this in the following way. But there the question is still unanswered.  We can describe the motion of $A$ in $C$(stationary) and $B$(moving) frames using the Lorentz transformations. $$t_C=\frac{t_B+\frac{ux_B}{c^2}}{\sqrt{1-\frac{u^2}{c^2}}}$$ (1). $t_B$ is dilated time seemed to a stationary observer on $C$. $x_B=vt_B$ the position of $A$ in $B$ frame. Standing on $B$ one can write $$t_B=\frac{t_A}{\sqrt{1-\frac{v^2}{c^2}}}$$ (2) and replacing $t_B$ in (1) relation is derived the expected relation between $t_C$ and $t_A$  $$t_C=\frac{t_A(1+\frac{uv}{c^2})}{\sqrt{1-\frac{u^2}{c^2}}\sqrt{1-\frac{v^2}{c^2}}}$$  The question is if $t_B$ in equations (1) and (2) are equivalent? In relation (1) it is dilated time seemed to a stationary observer on $C$ frame. In equation (2) it is the proper time of $B$  frame?


Remove duplicates from a List in C#  I have a data reader to read the string from database.  I use the List for aggregate the string read from database, but I have duplicates in this string.  Anyone have a quick method for remove duplicates from  a generic List in C#?  List<string> colorList = new List<string>();      public class Lists     {         static void Main()         {             List<string> colorList = new List<string>();         }     }      protected void Page_Load(object sender, EventArgs e)     {         if (!Page.IsPostBack)         {             colorList.Add(variableFromDB.ToString());                      foreach (string color in colorList)                     {                       Response.Write(color.ToString().Trim());                     }         }     }


How to make a command execuitable without root previlages?

I want to make some commands,such as ntpdate,shutdown etc, to execute without asking me for a password or without using "sudo" for "all users"(even normal users who have no sudo privileges) . I want only a few commends to behave in such way and not every command. Any idea how to archive this?


PDF bookmarks for sections and subsections with the llncs class

The following code is in the preamble of my LaTeX document:  \documentclass{llncs} \usepackage{amsmath,amssymb} \usepackage{url} \usepackage[algoruled,vlined]{algorithm2e} \usepackage{graphicx,subfigure}   \usepackage{hyperref}  \hypersetup{colorlinks=true,citecolor=blue}   \numberwithin{equation}{section} % numbering according to the section \bibliographystyle{plain}  %Choose a bibliograhpic style \begin{document}  \title{The Title} \maketitle \section{A} \label{sect:A} \subsection{a} \subsection{b} % ... \section{B} \label{sect:B} \subsection{a} \subsection{b} % ... \section{C} \label{sect:C} \subsection{a} \subsection{b} % ... \end{document}   Note that the text is organized into sections and subsection. However, after compiling the code, the Adobe PDF preview does not show the "tree" branching on the left. Instead, it just shows "The Title", and that option has no branching with the "+/-" sings. How could I achieve this?


Are C++ enums signed or unsigned? And by extension is it safe to validate an input by checking that it is <= your max value, and leave out >= your min value (assuming you started at 0 and incremented by 1)?


Unique representation as a linear combination

Let $V$ be an infinite dimensional vector space and $B$ be a basis. I would like to prove that every element of $V$ has a unique representation as a linear combination of elements of $B$.   I can visualize why this is true (heuristically: take the first representation minus the second and get linear dependence), however I seem unable to do the technical work. It is tricky. The finite dimensional case is trivial and it can't be generalized.  Can someone show me how to do this?


Given some Dictionaries  Dictionary<string, string> GroupNames = new Dictionary<string, string>(); Dictionary<string, string> AddedGroupNames = new Dictionary<string, string>();   I am unable to merge them into one:  GroupNames = GroupNames.Concat(AddedGroupNames);   because "the type can't be implicitly converted". I believe (and my code proves me true) their type is the same - what am I overlooking?


Understanding "as of", "as at", and "as from"

I'd appreciate your assistance in helping me particularly understand how to use the phrase "as of" properly.   What is the proper interpretation of the following sentence?  "I need you to get me all transactions as of January 23rd"   That I need all transactions from the beginning of time (so to speak) till January 23rd, or That I need all transactions from January 23rd to now?   Would "as at" be more appropriate to express (1)?  Would "as from" be more appropriate to express (2)?


Can a virus on a flash drive run itself without autorun?

Someone told me that it's possible for a virus to run itself from Flash memories even if autorun.inf is not present or this feature is disabled using gpedit.msc.  He said a virus can run itself as soon as I plug in a flash memory.  Is it correct?


Computing intersection of distance circles around fixed points

(to simplify calculations, I assume a spherical earth. All distances are assumed measured "as the crow flies")  Suppose we have the lon/lat coordinates for two points (p_1,p_2) less than Nkm apart.  Then, around point p_1 I draw a  circular polygon c_1 of the set of all points at distance exactly Nkm from p_1 and likewise for p_2 and c_2.   Now c_1 and c_2 will cross at two points. Is there a formula to find the  coordinates of these two crossings? If such a thing exists, a pointer to an R/python code doing this would be just as good as a formula.


Who is run out if both batsmen are out of their ground?

Who is out in the attached picture, assuming non of the batters stop running or turn back to their original grounds? At the time of wicket is broken, both were out of their ground but they had not crossed.


Special Relativity paradox of bridge and bus

Consider a scenario, a bus is about to pass over a bridge. The bridge is broken in the middle. Now according to ground observer the broken part is bigger than bus (because bus appears smaller to ground observer due to the motion of the bus) and hence bus will fall down the bridge.   Now for observer on the bus sees that the broken part is smaller because, according to him, the bridge is moving and not him and he thinks bus will remain on the bridge.  Whose prediction is right in this situation?


I'm diving into C++ coming from the worlds of Objective-C and Java. Java gave me all the OOP knowledge I have and Objective-C taught me about manual memory management. While adapting to C++ is easy (the language definitely does not deserve the reputation it has) I am confused about one thing:  I can declare a property as string my_string or string *my_string. I know I need to delete the second, but what's the advantage in declaring it as a pointer?


Proof that Conditional of Poisson distribution is Binomial

The classic example... $X \sim Po\left (\lambda\right ), Y \sim Po\left (\mu\right)$, X and Y are independent.  Show that the conditional distribution of X is binomially distributed. Or in other words, $P(X=k\mid X+Y = n) = P (\tilde{X} = k), \tilde{X} \sim B\left (n ,\frac{\lambda}{\lambda + \mu}\right )$.   I've so far managed to reach to this step, and have been stuck since. Just somehow gotta get a $\frac{1}{n!}$ in the denominator, that would then complete the proof..or at least I think..  $$P(X=k\mid X+Y=n) = \frac{\frac{\lambda^{k}\mu^{n-k}}{k!(n-k)!}}{P(X+Y = n)}=  \frac{\frac{\lambda^{k}\mu^{n-k}}{k!(n-k)!}}{\sum_{i=1}^{n} \frac{\lambda^{i}\mu^{n-i}}{i!(n-i)!}}$$  Thanks for the help!


How to make Maven evaluating version ranges starting with latest version?

Is there any option to tell Maven to start from latest version, when a version range needs to be evaluated? E.g. having  <version>[1.0.0,2.0.0)</version>   Maven starts with e.g. 1.0.0, 1.1.0, ..., 1.234.0.  For each of these version, Maven goes into all nested dependencies, which might also be version ranges, and recursively does again evaluations starting from their lowest version, running into exponential useless evaluation mess...  Is there any option to tell Maven to evaluate starting with latest version, and skip lower version evaluation if not required?  If 1.234.0 matches the needs, and nothing forces usage of a lower version, all earlier versions do not need to be evaluated at all.  Gradle reading Maving pom.xml's is able to resolve versions starting from latest version, and is much (!!!) faster than Maven. (I know from the time when Maven was designed and built, IBM forced that evaluation order for some reason, which was a really bad decision for the community in long-term.)  Is there any Maven mechanism to reverse the evaluation order and make Maven work in the same manner?


Capture the content within an environment

When working in latex I can do an environment like  \begin{some} stuff \end{some}   and stuff happen and I can define my own environments, I am working on something and what I want to do is essentially to grab everything that was "stuff" in the example and do something to it during the end part of the definition, how would I go about that?


Previously suggested answers here have not restored the menu bar and launcher.  I've run many updates, enabled the Unity plugin, and scoured Google for commands to restore these items, but with no luck.  Desktop icons appear, however.  The compiz-core version installed is the one referenced in the similar question suggested here.  I installed aptitude and ran the commands to install ubuntu-desktop, and while they appeared to run, they actually downloaded 0B of data and didn't install anything.  Edit 2:  This was marked as a duplicate of  - I should specify that I have taken all steps outlined in the answers on that question, and my desktop still has not been restored.  Specifically, when I run the command to install Unity, it tells me Unity is already installed.


How to change textview text in custom alert dialog?

Dears this is my code, textview text could not be change ?.....   AlertDialog.Builder builder=new AlertDialog.Builder(User.this);  LayoutInflater inflater = (User.this).getLayoutInflater();     // Inflate and set the layout for the dialog     // Pass null as the parent view because its going in the     // dialog layout     rname=(TextView)inflater.inflate(R.layout.fooditemview, null).findViewById(R.id.tv_frname);     fname=(TextView)inflater.inflate(R.layout.fooditemview, null).findViewById(R.id.tv_fname);     ftype=(TextView)inflater.inflate(R.layout.fooditemview, null).findViewById(R.id.tv_ftype);     fdetails=(TextView)inflater.inflate(R.layout.fooditemview, null).findViewById(R.id.tv_fdetails);     remail=(TextView)inflater.inflate(R.layout.fooditemview, null).findViewById(R.id.tv_email);      rname.setText(Srname);     ftype.setText(Sftype);     fdetails.setText(Sfdetails);     remail.setText(Ssremail);     fname.setText(Sfname);     builder.setTitle("Food Details");    // builder.setIcon(R.drawable.ic_launcher);     builder.setCancelable(true);     builder.setView(inflater.inflate(R.layout.fooditemview, null))     // Add action buttons             .setPositiveButton("Ok", new DialogInterface.OnClickListener() {                 @Override                 public void onClick(DialogInterface dialog, int id) {                      }              });     builder.create();     builder.show();      }   errors in logcat is  02-24 14:19:58.846: E/AndroidRuntime(11065): FATAL EXCEPTION: main 02-24 14:19:58.846: E/AndroidRuntime(11065):  Process:com.example.foodadviser, PID: 11065 02-24 14:19:58.846: E/AndroidRuntime(11065): java.lang.NullPointerException 02-24 14:19:58.846: E/AndroidRuntime(11065):    at com.example.foodadviser.User.FoodDetailsDialog(User.java:457) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at com.example.foodadviser.User.access$2(User.java:440) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at com.example.foodadviser.User$1.onItemSelected(User.java:87) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at android.widget.AdapterView.fireOnSelected(AdapterView.java:893) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at android.widget.AdapterView.access$200(AdapterView.java:48) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at android.widget.AdapterView$SelectionNotifier.run(AdapterView.java:861) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at android.os.Handler.handleCallback(Handler.java:808) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at android.os.Handler.dispatchMessage(Handler.java:103) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at android.os.Looper.loop(Looper.java:193) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at android.app.ActivityThread.main(ActivityThread.java:5292) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at java.lang.reflect.Method.invokeNative(Native Method) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at java.lang.reflect.Method.invoke(Method.java:515) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) 02-24 14:19:58.846: E/AndroidRuntime(11065):    at dalvik.system.NativeStart.main(Native Method) 02-24 14:19:59.043: D/dalvikvm(11065): threadid=17: interp stack at 0x60b74000   i tried this please help me. How to fix this problem. Is this even possible without trashing everything and just creating a custom view (which I am very averse to trying to tackle this fresh into Android programming...)


I bought a second hand iphone 5s, I erase all content and settings, then i want to create my apple id, to download apps and all, i completed the procedure to create an apple id but at last the device showing me that "this device is no longer eligible for creating a free icloud account" how can i solve this problem?


W: Failed to fetch http://ug.archive.ubuntu.com/ubuntu/dists/trusty/restricted/source/Sources  403  Forbidden


For what values of $a$ does $\sum_{n=1}^\infty \left( 1+\frac12 + \dotsb + \frac1n \right) \frac{\sin (na)}{n}$ converge?

For what values of $a$ does $$\sum_{n=1}^\infty \left( 1+\frac12 +  \dotsb + \frac1n \right) \frac{\sin (na)}{n}$$ converge?   To my thinking, $$f(n)=\frac{\left( 1+\frac12 +  \dotsb + \frac1n \right)}{n}$$ will behave like $\frac{\log n}{n}$, which is not convergent, but certainly has terms going to zero (eventually monotonically). By Dirichlet's test, $$\sum_{n=1}^\infty f(n) \sin(an)$$ will converge provided that the partial sums of $\sum_{n=1}^\infty \sin(na)$ are bounded, which they always are. So it should converge for all $a\in \mathbb{R}$.  Would appreciate anyone pointing out mistakes in this reasoning. Thanks


Sql Server - Best Practices for Growing Database Files

I have been monitoring file growth via the data collector in sql server 2008 r2 for two weeks. The database is growing consistently at around 35(MB)/Day. The DB has not yet hit the initial size of 2 GB.  The DB files auto growth is set to 5MB and I would like to try a different approach, so I am looking for suggestions and or comments.  There is a tuning task that runs every-week on Sunday night at 1:30 AM. The task will:    Check Database Integrity Shrink the Log File – (This is ok because logging mode is Simple) Shrink Database Reorganize Index Rebuild Index Update Statistics Clean Up History   I would like to add two more steps to the weekly tuning plan:   Grow the database file by 500 MB if the used space reaches a certain threshold or total size.   Grow the log file by 250 MB (after the shrink) if the used space reaches a certain threshold of total size.     By placing the growth burden in offline hours, I hope to gain performance by reducing the number of auto-growth events during heavy loads.  I have two questions relating to auto growing files.   The best place to put the file grow steps would be prior to the current steps or after?  If I use the ALTER DATABASE|MODIFY FILE to grow the file then how can I determine if SpaceUsedInFile >= (TotalFileSpace-@AllowanceThreshold)?


Using `sudo apt-get clean` & `autoremove` killed my laptop!

I found somewhere here in the forum that I could use the commands sudo apt-get clean and sudo apt-get autoremove to get rid of things I don´t use and my laptop does not need.  Why is it that every time I use either of these commands Ubuntu starts acting up?  By "acting up" I mean that:   All hot corner functions and Window Snapping functions on my desktop stop working. After entering either of the two commands, the corners I selected as Window Spread will not do/show anything. The Unity icon on the launcher disappears.   In the end I solved things by reinstalling Ubuntu, Spotify, Skype, Chrome and so on... I don´t really mind. It is only an hour of my time, it is fun and I always learn something.


What are the requirements to be a moderator?

I'm new in this site. I want to know what the requirements are to become a moderator?


Find network adapter name for ethernet connection

I need to find the adapter name and default gateway for the ethernet adapter used to connect to the internet.  I can get the gateway with netstat -rn but I'm having problem with the adapter name.  I'm using java and running a ipconfig command for Windows systems and parsing the result. It returns the network adapter names in this format   Ethernet adapter Local Area Connection:     Connection-specific DNS Suffix  . : customer.service.provider.lan    Link-local IPv6 Address . . . . . : fb80::7d2b:98aa:506:685%10    IPv4 Address. . . . . . . . . . . : 10.65.2.21    Subnet Mask . . . . . . . . . . . : 255.255.192.0    Default Gateway . . . . . . . . . : 10.65.0.1   I can match the default gateway and like to parse the string "Local Area Connection" for it. On English locale, I can look for the word "adapter" and parse the name until ":". Problem is on computers with different locale than English, "adapter" is called something else. How can I reliably obtain the network adapter name?


The window to set the textures is missing

so I downloaded this gun online, and it has no textures. Usually their is a section on the right with many categories... one lets you add textures, but when I opened this blender file there was no option to add textures, here is a picture.


Story identification: two seraphim in space, and the voice of God

This was a short story I read in the mid-90s in New York City, possibly in a digest like Asimov's or SF&F.  I remember two angels, at least one a seraph, conversing in space. They were in the solar system, hovering in the vicinity of Earth. They were very large and immaterial or intangible. At one point, one of the angels idly beats his wings, and one of them passes bodily through Mars.  They venerated God. When God's name is mentioned, in reverence, one of the angels (the senior one?) covers his face with two of his six wings.  What sticks in my mind is that at one point, God speaks, and his voice was described as infinitely small (or infinitely far away), and yet infinitely clear. This was probably an allusion to the "still, small voice" of the Bible, though I didn't know it at the time (so that's probably why the idea that the voice of an omniscient, and therefore utterly confident, being could be both infinitely small and clear struck me so, and stayed with me).  I have a vague sense there was at least one human character from Earth, the protagonist, that was involved, and the two angels were concerned with, but unfortunately I can remember nothing of the plot or premise.  Does anyone know what story this was?


How to prevent user to open same url in multiple tab in same browser?

I want to restrict user to open same URL in multiple tabs in same browser. How can I do this, please suggest an option or give me an example.  I am working in Asp.net c#


Fastest way to find if a given number is prime

Given a random number, what would be the quickest possible way of finding out whether it was prime?  Obviously, one could just iterate through the number in order to see if it was divisible by anything, but can you implement quicker ways of finding a given number?


I have a simple script that stores the user info in a file and then locks the screen:  #!/bin/bash echo $USER > /tmp/file.txt # Lock the screen: gnome-screensaver-command -l   When I execute it from the terminal, my username is stored inside. But when it is executed from the shortcut Super+L, it just locks the screen, and there is no file present. Why is this?


It is c# version 8. I have a method Dispatch<T>(T payload) I also have T1:T, T2:T, ... T8:T is it possible to rewrite this: if(data is T1)    Dispatch((T1)data); if(data is T2)    Dispatch((T2)data); ... if(data is T8)    Dispatch((T8)data);  so when someone adds T9:T this part of code do not change at all? I am aware I can use new switch statement, but it is basically the same.


Dividing a Set into Subsets & The Pigeonhole Principle

I need help with a question. I don't know how to start, but I do know that it focuses on the pigeonhole principle. I have no problem understanding the principle, but I want to know how to find the pigeons and the pigeonholes.     A set $M = \{1, 2, ..., 100\}$ is divided into seven subsets with no number in two or more subsets. Show that at least one subset either   contains four numbers $a, b, c$ and $d$ such that $a + b = c + d$ or three   numbers $p, q$ and $r$ such that $p + q = 2r$.


Number of connected graphs on labeled vertices, counted according to parity

While trying to derive some formula, I encountered the following problem. Consider the set $C_n$ of all connected graphs on $n$ vertices. What is $$ \sum_{G \in C_n} (-1)^{|G|} ? $$ In other words, if we give a graph with an even number of edges a weight of $+1$, and a graph with an odd number of edges a weight of $-1$, what is the total weight of all connected graphs?  Here is an example: when $n=3$, any two edges form a connected graph, and the complete graph is also connected, so the value of the sum is $3 - 1 = 2$.  Surprisingly, the answer is $$ \sum_{G \in C_n} (-1)^{|G|} = (-1)^{n-1} (n-1)!. $$ This can be proved using the "exponential formula" (see e.g. the freely-available generatingfunctionology). The exponential generating function of all graphs, counted according to their parity, is $1+x$ (since for $n \geq 2$, the even and odd graphs cancel). Hence the exponential generating function for all connected graphs (counted according to their parity) is $$ \log (1+x) = \sum_{n \geq 1} (-1)^{n+1}\frac{x^n}{n} = \sum_{n \geq 1} (-1)^{n+1}(n-1)!\frac{x^n}{n!}. $$  My question is:     Is there an enumerative proof of the formula $$ \sum_{G \in C_n} (-1)^{|G|} = (-1)^{n-1} (n-1)! \quad ? $$


I just want to know I would like to kindly ask you could you check......? could be a right structure for asking question?  regards


Since yesterdays update to my Ubuntu 18.04 desktop system, all the NTFS volumes have become read-only. I haven't had time to research this fully yet; just seeing if anyone else is having the same problem. I see many old threads on this topic, but my system has been running perfectly until yesterday and there seem to be no new posts.  Permissions on those volumes looks good, but attempting to delete files or folders from Nemo fails and using rm in terminal line gives the message "read-only file system".  The system dual-boots with Windows 10 (which I use only rarely) and Windows now won't start, which may or not be related.


Calculating the maximum likelihood estimate for a binomial parameter

A classmate sent me this question:  A high school student had the option to attend 5 AP classes. If we assume the probability of signing up for each class is constant, then the amount of AP courses a student would take is a random variable distributed as:  X ~ Binomial(n=5, p).  If we have a sample of 120 high school students denoted $X_1, ..., X_{120}$, what would be the maximum likelihood estimate of $p$?  We have this formula from our notes:  $L(p)=∏^n_{i=1}p^{x_i}(1−p)^{1−x_i}$.  However, he suggested maximizing the function $p^{x}(1−p)^{n−x}$ [here $x = \sum \limits_{i=1}^n x_i$], with $n=5$. Then we simply obtain that the maximum likelihood estimate as $p=\frac{x}{5}$. I feel that either I or the problem is missing some key information. Is this correct?


Use of circular predictors in linear regression

I am trying to fit a model using wind data (0, 359) and time of day (0, 23), but I am concerned that they will poorly fit into a linear regression because they are not themselves linear parameters. I would like to transform them using Python. I have seen some mention of calculating a vector mean by way of taking the sin and cos of the degrees, at least in the wind case, but not a whole lot.  Is there a Python library or relevant method that might be helpful?


Holding Multiple Credit Cards. Does the credit limits add up and work together?

So lets say I have the following credit cards with the following limits:   $1,500 $8,500 $9,000   If they all sat at 0 usage, and I was to charge one of them at say $3000 and let that sit on 0% APR for 6 months, does that cause credit rating damage?  I don't have a problem using my credit I built up, I was just curious how having multiple lines of credit work together and if having more, means that you don't pass the 10% or so threshold as easy if they all were added up together(I was always under the impression you should never go over 10% on a CC for too long).  I was trying to do some Google Searches on this but I was getting some mixed results.


I am trying to color a multirow in my table, but without success until now: \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{multirow} \usepackage{hhline} \usepackage{colortbl} \usepackage{multicol} \begin{document} \begin{table} \begin{tabular}{|l|c|c|c|c|} \hline \multicolumn{5}{|c|}{Type} \\ \hline   & A  &    B & C & D \\     \hline     X & 53,2\%  &   51,6\%  &  \multirow{2}{*}{\cellcolor[gray]{.9}49\%} & \multirow{2}{*}{\cellcolor[gray]{0.9}49\% }\\     Y  & 53,8\%  &  52,2\%  &  & \\ \hline \end{tabular} \end{table} \end{document}   What should I do, so that the two last multirow-cells get completely grey-colored?


Python index of item in list without error?

To find the index of an item in a list, you use: list.index(x) Return the index in the list of the first item whose value is x.  It is an error if there is no such item.  That seems a little odd to me, that it would throw an error if the item wasn't found. Where I come from (Objective-C land), it returns a NSNotFound enum (which is just a max int, indicating the item wasn't found). So I made something ugly to go around this: index = 0 for item in self.items:    if item.id == desired_id:         return index     index = index + 1  return -1  I used -1 to indicate the item wasn't found. What's a better way to do this, and why doesn't Python have something like this built in?


What are the browser and resolution stats for SO users?

Google Analytics (and some log parsers) will give you breakdowns on usage of different browsers, different versions of those browsers and screen resolutions.  I'm just curious to know what SO users user. Any chance we could get some stats on that? You may view this as commercial information, in which case I understand (as i'ts relevant to marketing/advertising).  I'm also curious to know the # of users who read and/or post from mobile devices and if so which ones.  UPDATE: Please refrain from personal anecdotes ("I use..."). I'm interested in actual usage, not personal stories. Thankyou.


This code won't compile:  \documentclass{article} \usepackage{listings} \lstset{     language=C,     basicstyle=\small }  \begin{document} lorem ipsum\footnote{% \begin{lstlisting} // some C code or whatever... printf("Blah blah\n"); \end{lstlisting}} \end{document}   It says Illegal parameter number in definition of \lst@insertargs. I know listings is really picky about where it goes, but there must be a way to cram a listing into a footnote, right?  (This is a MWE and my tex files are a bit more complex; my actual error is Paragraph ended before \lst@next was complete. but they are hopefully related; I couldn't get this error with the MWE.)


I am given to understand that the group of diffeomorphisms of the unit circle, $\operatorname{Diff}(\mathbb{S}^1)$, has two connected components, $\operatorname{Diff}^+(\mathbb{S}^1)$ and $\operatorname{Diff}^-(\mathbb{S}^1)$, the diffeomorphisms that preserve or reverse the canonical (counterclockwise) orientation, respectively.  Question 1: How does one prove that?  Question 2: Given $\Phi, \Psi \in \operatorname{Diff}^+(\mathbb{S^1})$, can one construct an explicit path joining them?  I'd be satisfied already with a proof that we can join $\Psi, \Phi \in \operatorname{Diff}^+ (\mathbb{S}^1)$, without giving the path explicitly. I tried the obvious path, $t \mapsto \dfrac{t\Phi + (1-t)\Psi}{|t\Phi + (1-t)\Psi|}$, but that doesn't seem to work.  Thanks.


Unresolved external symbol of nested class used in templated method

I have run into a weird unresolved external symbol error with this class. I have a C++ library based on Qt where LIBDATASHARED_EXPORT is an alias for __declspec(dllexport) or __declspec(dllimport).  class LIBDATASHARED_EXPORT SaveFile {     class Index     {     public:         operator bool() const; //<--- defined in cpp     };  public:     template<typename T> load()     {         Index idx;          if(idx) //<--- complains about unresolved symbol...         {          }     } };   When I use this in another project where I link with the library I get the unresolved external symbol about the SaveFile::Index::operator bool() const when instantiating the template method. When I put the definition of SaveFile::Index::operator bool() const in the header it works fine. The definition of SaveFile::Index::operator bool() const is indeed in the same .cpp file as the rest of the class' definitions so it should be defined at the point of instantiation.  What is the problem here and how do I fix it?


How does parenthesis affect grammar, would it be "a (incorrect) report" or "an (incorrect) report?"

Would it be "a (incorrect) report" or "an (incorrect) report?"


I have a question about a new Born of the Gods card.  The card is called .  It has the text that says:      Whenever Silent Sentinel attacks, you may return target enchantment   card from your graveyard to the battlefield.   I was listening to podcast  with Judge Joe Bono.  In that episode he says that Silent Sentinel could attach a Enchantment Aura to a creature that was protected from the color of the aura.  He then says that it would just drop off immediately. (This was right around the 1 hour mark in the show.)  I got to thinking about this and I wondered if any of the effects of the Enchantment would have any effect before they dropped off.  Here is an example to illustrate: My opponent has a  in play. I have a Silent Sentinel in play along with 7 Swamps.  I have a  in my graveyard.  In my combat phase, I attack with my Silent Sentinel.  This allows me to bring back a Quag Sickness from my graveyard.  I attach Quag Sickness to the White Knight.  (Note: Because bringing an aura back with Silent Sentinel it does not require targeting to attach it.  So it can attach to White Knight despite it having protection from Black).  Now the arua will fall off right away, but before it falls off does any of the effects of it do anything?  (Meaning could it kill the White Knight.)  If the Quag Sickness in this example does not do anything, is there a scenario that would?


Why do galaxies collide? Reconciling dark energy and an expanding universe with the fact that some galaxies are on a collision course

My layman understanding of cosmology is:   galaxies are uniformly (more or less) spread throughout the universe, per the Big Bang and the fact that in a central explosion, all dispersed points are racing away from one another dark energy is increasing this dispersal, by accelerating galaxies further apart.   My confusion is, reconciling the above two facts with the occasional statement that galaxy X and galaxy Y are on a collision course (e.g. our Milky Way and Andromeda).  Or statements about two galaxies whose collisions were just observed.  I understand that the collisions are driven by gravity, naturally.  What I don't understand is... are these collisions exceedingly rare?  A common occurrence?  If galaxies are mostly uniformly dispersed throughout the universe, and are accelerating away from one another in all directions, then shouldn't the number of collisions be decreasing over time?  Approaching zero??  Thanks.


Why should the "H" option not be used in floats?

Every now and then a question/answer with a float environment with option H appears, and every time someone points out that this option should not be used.  However, I haven't found a specific post about this topic.  Therefore, once and for all, can someone clearly explain:   why H should not be used what are all the possible alternatives (htbp, no float at all, etc.).   I know there is , but it's too broad and detailed, this question is more focused upon the H option, and I'm searching for a practical answer for beginners.  \documentclass{article} \usepackage{mwe} \usepackage{graphicx} \usepackage{float} \usepackage{caption}  \begin{document}     \blindtext     \begin{table}[H]         \centering         \caption{A Table}         \begin{tabular}{ccc}             A & B & C \\             1 & 2 & 3 \\         \end{tabular}     \end{table}     \blindtext     \begin{figure}[H]         \centering         \includegraphics{example-image-a}         \caption{A Figure}     \end{figure}     \blindtext \end{document}


What is the energy of a superposition of energy eigenstates?

Suppose I have a system say SHO in a superposition of energy eigenstates $|{n_1}\rangle$ and $|{n_2}\rangle $ given by $|{\psi}\rangle = \frac{1}{\sqrt{2}}|{n_1}\rangle + \frac{1}{\sqrt{2}}|{n_2}\rangle $.  If I measure the energy of system there is equal probability of getting $(n_1 + \frac{1}{2})\hbar\omega$ or $(n_2 + \frac{1}{2})\hbar\omega$.  The question then arises where does rest of the energy go or come from? On one good day I measure system to be in state $|{n_1}\rangle$ while on other I measure it to be $|{n_2}\rangle$. It seems to me that it violates the energy conservation. Does this have to do with the measuring device? If yes then why do we never talk about it in formulating states?


How to alter package to support Lightning Knowledge and Classic Knowledge both?

We manage a Salesforce app via a managed package which includes a Classic knowledge article type object lets say 'Comm_Article__kav' . Now that our customers are using Salesforce orgs with Lightning knowledge enabled in their environments, our app installation fails in them on the ground of  Article types are not allowed in Lightning knowledge enabled orgs. So how can we handle this situation. Snippet of error message while installing the package:      (Comm_Article__kav) When Lightning Knowledge is enabled, you can’t add   an article type. Comm_Article__kav: When Lightning Knowledge is   enabled, you can’t add an article type.   Possible solutions I thought of:    Alter package to support Lightning Knowledge and Classic Knowledge both as few of our customers still use classic knowledge Build our package to use dynamic references exclusively, and  dynamically determine whether org is operating in Lightning or Classic  Knowledge.   Are these feasible ? If yes, how?


What would be the best way to explain color confinement in quarks?

To someone who is not so experienced in advanced physics, how do you explain or teach them why something as complex as color confinement prevents us from being able to see or prove that there are any type of quarks existing in the quantum level and why not even with the strongest microscopes are they visible.


Inserting abstract{} changes margins of the page

There is the template I have to use for a papaer and it looks like this:  \documentclass[a4paper,11pt]{article}  \usepackage{graphicx}  %%% for including graphics \usepackage{url}       %%% for including URLs \usepackage{times} \usepackage{natbib} \usepackage[margin=25mm]{geometry}  \title{Example Paper for IWCS} \date{}  \author{Example Author}  \begin{document} \maketitle \thispagestyle{empty} \pagestyle{empty}  \section{Introduction}  \end{document}   But I have to insert an abstract and when I do it using abstract{} the margins of the page changes. Any ideas how to have an abstract and maintain 2.5cm margins at the same time?      The minimal working example is:  \documentclass[a4paper,11pt]{article}  \usepackage{graphicx}  %%% for including graphics \usepackage{url}       %%% for including URLs \usepackage{times} \usepackage{natbib} \usepackage[margin=25mm]{geometry}  \title{This is the Title of the Paper} \date{} \author{Author Author}  \begin{document} \maketitle \thispagestyle{empty} \pagestyle{empty} \abstract{The term "domestic dog" is generally used for both of the domesticated and feral varieties. The English word dog comes from Middle English dogge, from Old English docga, a "powerful dog breed".[6] The term may possibly derive from Proto-Germanic *dukkōn, represented in Old English finger-docce ("finger-muscle").[7] The word also shows the familiar petname diminutive -ga also seen in frogga "frog", picga "pig", stagga "stag", wicga "beetle, worm", among others.[8] The term dog may ultimately derive from the earliest layer of Proto-Indo-European vocabulary, reflecting the role of the dog as the earliest domesticated animal. }  \section{Introduction} The term "domestic dog" is generally used for both of the domesticated and feral varieties. The English word dog comes from Middle English dogge, from Old English docga, a "powerful dog breed".[6] The term may possibly derive from Proto-Germanic *dukkōn, represented in Old English finger-docce ("finger-muscle").[7] The word also shows the familiar petname diminutive -ga also seen in frogga "frog", picga "pig", stagga "stag", wicga "beetle, worm", among others.[8] The term dog may ultimately derive from the earliest layer of Proto-Indo-European vocabulary, reflecting the role of the dog as the earliest domesticated animal.  \end{document}


How to get first 5 characters from string using php  $myStr = "HelloWordl";   result should be like this  $result = "Hello";


Aliens have souls, humans don't. Short story from pre-1985(?)

I am trying to find a scifi short story I read as a kid, can't remember the name of story/author.  Humanity has contact with these kindly ( dragon headed? ) like aliens who give us space travel and all these other wonderful technologies. At one point some are being held captive by the humans - to extort additional knowledge or something.  It becomes critical for the aliens to escape - and they inexplicably kill one of their own - shortly after they are rescued.  The humans figure out that it was through reincarnation or some kind of rebirth, that the dead one was able to warn the others. There is a verbal confrontation, and one of the human asks:  "Why! Why would you keep this knowledge from us! You've given us so much, why wouldn't you tell us that we don't have just one shot through life? That we are reborn? That we have souls!"  And the Alien replies: "Because you don't".  Someone posted this pic on my FB feed, and it reminded me of that story.     Some random things I remember that may, or may not, be true:  -maybe Niven or Pournelle -think it was a "hard science" writer -read it in the mid 80s.  -Can't remember if it was in collection of short stories, or in OMNI  Any insight appreciated!


What does the MGF do when its parameter is other than 0?

I've only seen the MGF used when it takes 0 as it parameter and then derived for the nth moment.  What does the MGF tell us when the parameter is other than 0?


Show that $\int\limits_0^1 \left(x^{x}\right)^{\left(x^{x}\right)^{\left(x^{x}\right)^{\left(x^{x}\right)^{⋰}}}}\ \mathrm{d}x=\frac{\pi^2}{12}$.

How can it be shown that   $$\lim_{p\to\infty}I(p)= \lim_{p \to \infty}\int^{1}_0 (x^x)^{\scriptscriptstyle {(x^x)^{(x^x)^{(x^x)^{(x^x)^{(x^x)...(p \; times)}}}}}} dx= \frac{\pi^2}{12}$$      $I(1)=\int^{1}_0 x^x dx=\sum_{n=0} ^{\infty} \frac{1}{n!}\int^{1}_0 \ln(x)^nx^n dx$   also $\int^{1}_0 \ln(x)^nx^n dx=(-1)^n (1+n)^{-1-n}n!$ .  I don't know how to calculate $I(p)$ beyond $p=1.$  Note: This integral was proposed on Romanian Mathematical Magazine and two solutions can be found .


QGIS custom grid / line oriented point displacement?

I am trying to sort point symbols at the same coordinates in a line. The first picture shows how I want it to be (all symbols in a single horizontal line), the second how it looks with the standard grid-based point displacement (multiple, unwanted rows of symbols, and therefor also an unwanted overlap of text and symbols).   Is there any way/plugin to either change the parameters of how the grid is built (number of rows/lines) or any other way to show symbols in a line?  I am not hugely into scripting or programming though.


Is there any way to do perform advanced searches in Google Contacts?  For example, wild card operators, AND operator, OR operator etc?  I want to search anywhere in a name, not just the beginning of a name. (i.e if I write 'ac' it should display Jack as well)