I want to define a new counter for numbering some headlines. I also would like to reference them. So, if I label the headline 3, then \ref should just return the number 3.   Unfortunately, all other references seem to be broken now. Take a look at the following code:  \documentclass[11pt,a4paper]{scrreprt} \usepackage[utf8]{inputenc}  \newcounter{LPCounter}  \newcommand{\LP}[2]{\refstepcounter{LPCounter}\label{#2} \noindent \textbf{LP \theLPCounter: #1}}   \begin{document}  \chapter{Chapter} \section{Section}  \LP{A}{lpA}  \LP{B}{lpB}  \begin{table}[h]\label{test} \textit{I am a table.} \end{table}  Here is LP 1: \ref{lpA}, and here is LP 2: \ref{lpB}. Here is the table: \ref{test}  \end{document}   The output now looks somehow like     Here is LP 1: 1, and here is LP 2: 2. Here is the table: 2.   So, instead of "1.1" I get "2". Why is that?


Suppose there are these classes:  class A     {         public string someField="something";             public void MethodA(){}      }  class B {     public A propertyA; }  class C {     public B propertyB;     string s1 = "propertyB.propertyA.MethodA()";             string s2 = "propertyB.propertyA.someField";     public void Method()     {         //so for s1 it does         propertyB.propertyA.MethodA();         //and for s2 it does         var something = propertyB.propertyA.someField;         //or         propertyB.propertyA.someField = "somethingNew"     } }   How can I execute a method in class A from class C represented as string s1 and get or assign value to someField(s2)?


[...] tonnes of rubbish are being accumulated and the lack of space for (IT/THEM) is becoming a complex problem.    Should it be IT or THEM? And why?


How to draw a kraft paper bag with a zigzag side?

I need to draw a rectangle with a zigzag side as a kraft paper bag. How can I fill it properly with the color?  \documentclass{article} \usepackage{tikz} \usepackage{xcolor} \usetikzlibrary{decorations.pathmorphing} \tikzset{zigzag/.style={decorate,decoration=zigzag}} \definecolor{sandybrown}{rgb}{0.96, 0.64, 0.38} \begin{document} \begin{tikzpicture} \draw[thick,sandybrown,zigzag] (-2,0) coordinate(a) -- (2,0) coordinate(b); \coordinate (r) at (-2,-5); \coordinate (n) at (2,-5); \draw[fill=sandybrown] (a) -- (r) -- (n) -- (b); \draw[thick,sandybrown,zigzag] (-2,0) coordinate(a) -- (2,0) coordinate(b); \end{tikzpicture} \end{document}


Chinese 72 hour transit visa rule: exact start time of period

I have a 75 hour trip to Beijing (PEK) coming up in October. I shall enter at PEK on a flight from London, arriving at 0930 and continue onwards by air to Hong Kong three days later at 1230, and I shall be travelling on an ordinary British passport.  I understand that the 72 hour transit visa on arrival actually begins the midnight after my arrival (and not immediately after arrival).   Visa required, except for Holders of British passports endorsed  British Citizen  holding confirmed onward airline tickets to a third country, if arriving in and departing from the same city: - at Beijing (PEK), Chengdu (CTU), Chongqing (CKG), Dalian (DLC), Guangzhou (CAN), Hangzhou (HGH), Shanghai Hongqiao (SHA), Shanghai Pudong (PVG), Tianjin (TSN), Wuhan (WUH), Xi'an (XIY) or Xiamen (XMN) for a max. transit time of 72 hours, starting from 00:01 on the day following the day of entry. - at Guilin (KWL), Harbin (HRB), Kunming (KMG) or Shenyang (SHE) for a max. transit time of 72 hours;   However, although several non-official sources substantiate this distinction, I cannot find any official confirmation of this. Does anyone have any experience in doing this kind of transit?


I am baffled by this example: [ziga@brane ~]$ touch test.txt [ziga@brane ~]$ echo "TEST" > test.txt [ziga@brane ~]$ cat test.txt TEST [ziga@brane ~]$ cat test.txt | grep "TEST" TEST [ziga@brane ~]$ cat test.txt | grep "TEST" > test.txt [ziga@brane ~]$ cat test.txt [ziga@brane ~]$  Why does cat test.txt | grep "TEST" > test.txt delete contents of a file test.txt? I thought that > rewrites and >> appends! What am I missing?


I would like to do something like this $("#A").on("click", function(){     $.event.trigger({type:"custom"}); }); $("#B").on("custom", function(e){     $("#B").removeClass("hidden"); }); $("#C").on("custom", function(e){     alert("something"); }  Where I trigger a custom event using JavaScript. I would then like to be able to use the .on function on different elements throughout the page. Clicking the "#A" would then trigger the event for all registered elements. I noticed that the trigger function is called on an element instead of globally, which is not what I want.


What determines the frequency (and type) of acquiring special items?

The special items that were added with the gen 2 Pokemon are really hard to get.   I have hit hundreds of Pokestops and have only gotten a total of 3 special items, and a max of 2 at a time. I used the metal coat and then a few days later I got metal coat again. I also have 1 dragon scale. My husband has gotten only 2 special items and they were different from mine so it's not location specific as to which items you can get.   Has anyone looked at the code surrounding special items?   Has anyone had more than two at a time in their inventory?


Standardize Training and Validation Data

I am supposed to standardize a training and a validation set "so that the training set has zero mean and unit $l_2$-norm". In order to do so I use the data.normalization function from R's ClusterSim package,       normalizedtrainingset <- data.Normalization(trainingdata,type="n12",normalization="column")   which does do the trick for the training set. Now I am a bit confused about how to proceed with the validation set. I surely cannot use the same function because it would use the validation set's mean and sd and not the mean/sd from the training data. Thus, I proceeded like this:      validation.standardized <- (validation-mean(training))/sd(training)   This takes into account the mean and sd of the training set. However, the values in the validation set are still quite a bit larger than those of the training data because it has not been normalized. My question now is: do I divide the validationset by its own $l_2$-norm, do I divide it by the $l_2$-norm of the training set or do I not divide it at all and the values in the validation set have to remain larger than those in the training data (the latter seems unlikely).


I have "Vonino onyx QS" tablet and "Monkey test , Time service , Guard service" are always open . How uninstal this?


Yesterday I was going through the idea of Relative Velocity in which, when the bodies are moving in opposite directions, their velocities add up. So, if one of the bodies in consideration is light, would the velocities still add up? If yes, then won't it break the ultimate speed limit, the speed of light?  It would be great if you explain it using math that's not too advanced, I'm only 14😄


Number of ways to write n as a sum of consecutive integers

Allow $d(n)$ to be the number of divisors of $n$. Show that there are $d(m)$ ways to write $n$ as the sum of consecutive integers where $m$ is the largest odd divisor on $n$. I have absolutely no idea where to go. The hint given to me is that $$\ x + (x+1) +... + (x+r-1) + (x+r) = (r+1)x + \frac{1}{2}r(r+1)$$ I can set the above expression equal to $n$, but this still confuses me.


Could it damage an Ubuntu system when in same time two upgrades are performed?

Could it damage an Ubuntu system when somebody runs an upgrade like apt-get dist-upgrade or a similar command and somebody else does an upgrade remote at the same time as well?


Why do people use the term "six figure sum" to mean "at least one million dollars"?

In Australia at least, a "six figure sum" is synonymous with an amount over $1,000,000.  The last time I checked, 1000000 had seven digits in it.  To quote :     Has Channel 9, a publicly listed company, paid at least a six-figure sum, or several million dollars to get is (sic) employees out of Lebanon?


I've got 4 positive integers, a,b,c,d which sum up to 63. The question asks for the maximum value of ab+bc+cd, but I don't get how to do it. I can't find an algebraic method, I can only use trial and improvement. Is there any better method I can use? [This is a clarification of my previous question.]


I have declared an array as follows:  int *arr;   Is there any way in visual studio to watch all the elements of the array while debugging, rather than having to manually place watch for an element *(arr+1), *(arr+2) and so on.


How to preserve airplane mode in Ubuntu 18.04 lts

I used to have ubuntu 16.04 lts . Now I have 18.04 lts . In 16.04 when I disabled wifi  , that option was preserved after shutdown and boot . Now in 18.04 lts if I disable wifi the option is not preserved . Hence the problem is not due to my G505s lenovo laptop . I know that airplane mode disables more than just wifi and I prefer that mode for personal reasons . I have searched in the internet and have not find anything helpful .  I would like to know how to preserve airplane mode in 18.04 lts .


Solve $2^x+3^y=z^2$ in nonnegative integers.

So, we are trying to find all the solutions to $2^x + 3^y = z^2$ in nonnegative integers. Here are my insights:   First of all, $z^2$ can be either $0$ or $1$ modulo $3$. If $z^2 = 3k$, then LHS cannot be divisible by $3$ unless $y = 0$ and $x=2k+1$, and so we have $2^x+1 = z^2$, so one of the solutions is $(3,0,3)$ (but we still need to show that this is the only solution in this case).   Now let $y > 0$, $x=2k$. In this case $2^x \equiv 1\ (\mod\ 3)$ and $z^2 \equiv 2^x (\mod 3)$. We have $$ 3^y = (z-2^k)(z+2^k), $$ so $(z-2^k)=3^a$ and $(z+2^k)=3^b$, so $3^b-3^a = 2^{k+1}$. If $a > 0$, then $2^{k+1}$ must be divisible by $3$, but it is not, so suppose $a = 0$.  Now we have $$ 2^{k+1} = 3^b - 1, $$ Аnd this is where I stuck. It is easy to find two more solutions just iterating over $k$, but I do not know how to prove that there are no others. As far as I understand, we need to find some kind of an upper bound for $k$. Note: I am trying to avoid the use of Catalan's conjecture here.  Can you please help me to show that there are no other solutions to this equation and that $2^x+1=z^2$ has a unique solution?


Minecraft Scoreboard stat.mineBlock won't work?

So I wanted to set up something that uses stat.mineBlock.snow, but it wouldn't work. I tried other stat.mineBlock, but they wouldn't work either. I did the command /scoreboard objectives add snow stat.mineBlock.snow Snow But it returns with Usage: Invalid objective criteria type 'stat.mineBlock.snow' So what am I doing wrong, and how do I fix this?


php class extends class by name stored in variable string

I'm new to classes in php and have the following scenario:  whilst working on a larger framework than I'm used to I would like to use a version number for class names stored in a variable declared at the top of a script. Meaning i have tried the following using eval:  <?php   $Version = '001';  class Foo001{     public function bar(){         global $Version;         echo 'Version = '. $Version;         //Just so i can see its working     }    }   class Similar extends eval('Foo'.$Version) {     public funtion blah(){             // etc...      }  }   $Sim = new Similar;  $Sim->bar(); ?>   Thought this would be an eval case but obviously it didn't work, cannot find anything on google or a specific post on SO to help.   I have used the {$blah} method for other scenarios and call_user_func etc but have never needed to do this before.  Is this possible or am i just not able to do this?


Good review audit has "possible spam" warning?

I was looking through someone's edit history and I was looking at :    Why does it give this notice, while at the same time saying that it's a high-quality post?


What are the options for managing multiple Ubuntu installations together and keeping them in same state

Recently I got in charge of managing 2 computer labs (currently 35 workstations, could double in a month or two) in university with total control over software stack as long as I install a bunch of commonly used scientific software (Mathematica and friends).  I plan to use Ubuntu for various reasons.   Installing Ubuntu and managing updates etc by hand is certainly an option, But I want to know if there is a more efficient way to do this stuff in and a more "Don't Repeat Yourself" manner?  Tasks   Ubuntu installation Installation (duplication) of same software stack and configuration over each workstation Keeping them updated


Switching from Ubuntu 16.04 to Ubuntu gnome 16.04

From what I understand, Ubuntu 16.04 and Ubuntu Gnome 16.04 are 2 different OS.  My question is, is it possible to convert my installation of Ubuntu 16.04 to Ubuntu Gnome 16.04? Or maybe I got it all wrong and gnome is just a desktop environment that I can switch to from unity? Maybe?  Thanks in advance.  EDIT: Apparently the forum found a possible duplicate so lemme clear that up :). I am not asking what the differences between Unity and Gnome DE are, I'm asking about the entire OS flavors if I can convert one to the other without a complete reinstall.


Button with ID doesnt work after jQuery Success Response

I have a question regarding my jQuery process. So i have a button with id that will be replaced with a new ID with AJAX Response.  so my markup code,,
         <button class="btn btn-default" type="button" disabled> &nbsp; Select Data First &nbsp;</button>
   So in this case, button will stay disabled until AJAX below is executed,  $('#poname').on('change', $(this), function () {             var job = '<?php echo $jobValue; ?>';             var subjob = '<?php echo $subjobValue; ?>';             var po = $('#poname').val();             $.ajax({                 type: 'POST',                 url: "pages/po/divpages/show_all_po_content.php",                 data: {job: job, subjob: subjob, po: po},                 success: function (response, textStatus, jqXHR) {                     $('#pobutton_detail').html('<button class="btn btn-success" type="button" id="allposhow"> &nbsp; SHOW ' + job + ' - ' + subjob + ' : ' + po + '</button>');                 }             });         });   And after the new response button activated, I need to grab the ID of that button for the second process as follows,  $('#allposhow').on('click', $(this), function () {             var job = $('#jobname').val();             $.ajax({                 type: 'POST',                 url: "pages/po/divpages/show_all_po_content.php",                 data: {job: job, subjob: subjob, po: po},                 success: function (response, textStatus, jqXHR) {                     $('#listpocontent').html(response);                     //alert(response);                 }             });         });   the problem is, i cant get the second ajax to work by accessing ID="allposhow". Please help me on this matter..  thanks in advance


two numbers chosen from 0 to 1, expected val of larger number

If I pick two numbers in the interval (0,1), what is the expected value of the larger number? Please help. I know that the expected value of one number is 0.5 but I'm not sure how to find the expected vlaue of the larger number here.


A murdering thief or a thieving murderer.   I have looked up all possible literary devices, and can't seem to find one...


In a party people shake hands with one another (not necessarily every one with every one else). A) show that two persons shake hands the same number of times.  b)  show that the number of people who shake hands an odd number of times is even.


I want to create after every container a click function. It had worked but not anymore. When I want to create the event, he don't recognize the container because in debugger I can see he's going over the box of code.    // Decide list order, load the thumbnail for each publication.             var place = "first";              $('#archive').prepend('

');             $('.container:' + place).append('

');              $('.thumb:' + place).css("background-image", 'url(' + entry.thumbnailURL + ')');             $('.thumb:' + place).css("filter", 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + entry.thumbnailURL + ',sizingMethod="scale")');             $('.thumb:' + place).css("-ms-filter", 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + entry.thumbnailURL + ',sizingMethod="scale")');              // Load the publication title below each thumbnail.             $('.thumb:' + place).after('

');             $('.title:' + place).append(entry.publicationName);              // Load the publication startsdate & enddate.             $('.title:' + place).after('

');             $('.date:' + place).append(sdate + " tot " + edate);              // Set up publication links.             $('.container:' + place).click(function(){                 loadPub(entry.publicationID, entry.publicationName);                 setActive(entry.publicationID);                 //Change css of current element                      });


What do Elements of the Tensor Product Look Like?

I'm looking for a tensor product (of abelian groups, let's say), and some elements $a{\otimes}b$ and $c{\otimes}d$ such that $a{\otimes}b+c{\otimes}d$ $\neq e{\otimes}f$ for any $e{\otimes}f$.  That is, I'd like to show that there are sometimes elements in a tensor product that are not of the form $e{\otimes}f$.  I can't find any examples in $\mathbb{Z}{\otimes}\mathbb{Z}$, or even in $(\mathbb{Z} \times \mathbb{Z} ){\otimes}\mathbb{Z}$. (Actually no such examples exist, simply because $b$ and $d$ are integers so you can put them into the first coordinates, then the second coordinates both become $1$ and you may add the two elements.)  I think $(1,0){\otimes}(1,0)+(0,1){\otimes}(0,1)$ is an example in $(\mathbb{Z} \times \mathbb{Z} ){\otimes}(\mathbb{Z} \times \mathbb{Z} )$. But to prove this, I have to show that $((1,0),(1,0))+((0,1),(0,1))-(e,f)$ is never a linear combination of the tensor relations. This seems very unwieldy; is there a better method invoking the universal property?


How to rotate (roll) the 3D view like I'm tilting my head?

How would I rotate the view port along the axis from my forehead to the monitor, like as if I was tilting my head (but more like tilting the viewport)


Can Schengen resident permit holders use the "EU" line at passport control?

When I was transferring this morning at Schipol, the staff directed non-EU citizens with Schengen area residence permits to the "EU" line at passport control.  Is this always allowed for people with residence permits, or was it just because the lines had become particularly unbalanced?


Is there a way to write short code in LINQ to check if one array is a subsequence of other and honor an order?  For example (pseudo code):   var masterList = new double[] {0,1,2,3,4}; var lst1 = new double[] {0,1,2,3}; var lst2 = new double[] {0,1,3,4}; var lst3 = new double[] {2,3,4}; var lst4 = new double[] {3,4}; var lst5 = new double[] {4,3};  bool isSubseq1 = lst1.Compare(masterList); // true bool isSubseq2 = lst2.Compare(masterList); // false bool isSubseq3 = lst3.Compare(masterList); // true bool isSubseq4 = lst4.Compare(masterList); // true bool isSubseq5 = lst5.Compare(masterList); // false   edit:  bool isSubseq = !lst5.Except(masterList).Any(); // returns true, but I want to return false   edit2: Example2:  var masterList = new double[] {0,1,2,3,4,4,4,5,6,6,8,8}; var lst1 = new double[] {0,1,2,3}; var lst2 = new double[] {0,3,4}; var lst3 = new double[] {4,4,4}; var lst4 = new double[] {6,6,8,8}; var lst5 = new double[] {5,4,4,4,3}; var lst6 = new double[] {9,9};  bool isSubseq1 = lst1.Compare(masterList); // true bool isSubseq2 = lst2.Compare(masterList); // false bool isSubseq3 = lst3.Compare(masterList); // true bool isSubseq4 = lst4.Compare(masterList); // true bool isSubseq5 = lst5.Compare(masterList); // false bool isSubseq6 = lst6.Compare(masterList); // false   Yeah I could write my own method, but this is not I'm asking for. I will accept nested query.


Canon 700d - lens does not move when focusing?

I have a canon 700d. I have seen other 700d's, and when they focus the lens automatically moves in and out. My one doesn't. Why would that be?


Back transformed exp(log amount) showing different amount than the untransformed one

my_diamonds <- diamonds %>% mutate(log_price = log(price))  my_diamonds %>%  +   group_by(cut) %>%  +   summarise(mean_log_exp = mean(log_price) %>% exp) # A tibble: 5 x 2   cut       mean_log_exp   <ord>            <dbl> 1 Fair             3273. 2 Good             2547. 3 Very Good        2437. 4 Premium          2838. 5 Ideal            2079. > my_diamonds %>%  +   group_by(cut) %>%  +   summarise(mean_price = mean(price)) # A tibble: 5 x 2   cut       mean_price   <ord>          <dbl> 1 Fair           4359. 2 Good           3929. 3 Very Good      3982. 4 Premium        4584. 5 Ideal          3458.  Why are these two outputs different? I expected both sets of numbers to be the same. In the first block I take the mean of the log of price for each cut then back transform to original scale with exp. In the second block I skip the log transformation entirely. Since in the previous block I log and then unlog with exp, I expected the two sets of numbers to match. Where have I misunderstood? Why don't the two sets of numbers match?


Set a background rectangle for my code in lstlisting?

Here's my beamer frame:  \defverbatim[colored]\sleepSort{         \begin{lstlisting}[language=python,tabsize=2]     var = 3 list print       \end{lstlisting}}       \begin{frame}{Variáveis}        \begin{itemize}         \item Armazenamento de dados         \Declaração        \end{itemize}           \sleepSort        \end{frame}   My piece of code is on the same background everything else. How can I put the code on a rectangle of another color?


Things possible in IntelliJ that aren't possible in Eclipse?

I have heard from people who have switched either way and who swear by the one or the other.  Being a huge Eclipse fan but having not had the time to try out IntelliJ, I am interested in hearing from IntelliJ users who are "ex-Eclipsians" some specific things that you can do with IntelliJ that you can not do with Eclipse.  Note: This is not a subjective question nor at all meant to turn into an IDE holy war. Please downvote any flamebait answers.


How does one start drawing electric fields?

How does one start drawing electric fields.you are given two charge.now there are infinite electric field lines so how do you show greater electric field by drawing denser lines.After all there can be infinite lines in between.


Is there any pattern to predict whether to use -ant or -ent, in words such as those below?  abundant / attendant / arrogant VS abhorrent / absorbent / dependent  I find -ent seems to be more common... Some associate -ant with noun and -ent with adjective, but that does not always hold.


Position an exampleblock in front of content

I need to position an example block:  \begin{exampleblock}{}    Proposed and implemented \end{exampleblock}   Without disturbing other frame content. Something like:  -------------------- ------------- -------------------- -------------------------- -----------    --/============\--------- -----|            |-- -----| Proposed   |-------- -----| and        |-------- -----| implemented|------ -----\============/ -------------------- --------------------------    -----------------   Let it overlay the text behind it. And not to be taken into account during layouting.  Update The Claudio Fiandrino's way is not apropriate to me, because, i need an Itemize environment working inside, and it would be great, if block style is the same as theme-style.


To reproduce: Edit posted answer adding a few lines, but don't submit yet. Switch to another app, like browser say. Switch back. Notice the freshly added paragraph is now gone.


Why do matter behind event horizon exerts gravitational pull?

We can't observe any matter inside black hole, why do we still see gravitational pull from that matter?  It is obvious that you need a gravitation well to have a black hole, but it's not obvious why the gravitational pull will still be there once event horizon is formed and black hole contents (singularity?) are no longer observable.  If an event horizon of a black hole does indeed have innate gravitational pull, does the same apply to event horizon of observable universe? There's matter behind observable universe event horizon, do we get pulled towards it? If not, why not? If yes, how strong is this effect?


Asinine message preventing me from installing Xcode on 10.9.4

Every time I try to install Xcode from within the Mac App Store, I get "Download for free? This item will be added to your Purchases and will be available even if your Family Sharing Status changes".  I click Download. Then I see a spinning wheel for a second until I get the same message again until I just press 'Cancel'. It never downloads.    Does anyone know what the deal is?  I'm on a fresh install of OS X 10.9. Only thing I've done to it is sign in to the Mac App Store using my New Zealand account. I also installed and updated Office 2011. So I certainly haven't done anything unusual to this Mac!


breeding a male aggron with a ditto in a luxury ball yet still getting pokeball babies?

I have a male aggron in an pokeball and a ditto in a luxury ball. i have tried breeding them but i get babies in an pokeball instead of the luxury ball. is there something im missing?  i also have Pokemon Y if that may be a problem?


I know there are a lot of websites there which are answering this, but as I was making video which is only 1.3 seconds long, it took 2.5 hours to render, also with all the tips I found. I am using CPU and Cycles engine for rendering. Are there any general tips for these engines to render faster? If this is not a good Question for this site, I will delete it.


A finite field cannot be an ordered field.

I am reading  and it says all ordered fields with supremum property are isomorphic to $\mathbb R$. Since all ordered  finite fields would have supremum property that must mean none exist. Could someone please show me a proof of this?  Thank you very much, Regards.


I am using the book class to typeset a course I am currently taking. However, a chapter has a long name, and it causes the header to look terrible (the name of the chapter crosses the margins of the paper). Any ideas on how to change the chapter name in the header only, so it would look proper?


"It is me whom she loves" or "It is I whom she loves" which one is grammatically correct?

It is me whom she loves   or   It is I whom she loves   Because I know that "It is I" is grammatically correct.


Replace commas for strings enclosed double quotes

I have a line, that looks like this.   Das,Dwda,3145124,4,"7,5",6,"7,5",6,8,7,51,"5,5",10,17,"83,5"  I want to change all commas inside double quotes to a period with some command in bash like awk or sed.


Unwrapping a circle into a line of segments?

How can I UV unwrap a circle (which is divided into segments) into a straight line of segments (triangles) - I can only get segments placed randomly.    I.E. a row of triangular segments with the circumference flattened into a straight line, giving a saw-tooth a pattern like /\/\/\/\/\


I'm  trying to disable the validation of a method of one class. I've seen the annotation @SkipValidation but it doesn't work.  I tried to put the following interceptor-ref to my action but it doesn't work either. <interceptor-ref name="validation">     <param name="excludeMethods">ricerca,execute</param> </interceptor-ref>  I need to remove the validation of a Date field of this class.


Independent Study Statistics/Probability Grad Level

I am trying to decide on topics for my independent study this semester. I am a Pre-Doctoral Mathematics student, so looking for a more math based text rather than engineering based (which I have found a lot of). I have already taken extensive courses in probability and statistics. Looking for something more challenging and more proof based considering I have background in analysis. Know of any textbooks?


How do you find a float's nearest non-equal value?

A float (a.k.a. single) value is a 4-byte value, and supposed to represent any real-valued number. Because of the way it is formatted and the finite number of bytes it is made off, there is a minimum value and a maximum value it can represent, and it has a finite precision, depending on it's own value.   I would like to know if there is a way to get the closest possible value above or below some reference value, given the finite precision of a float. With integers, this is trivial: one simply adds or subtracts 1. But with a float, you can't simply add or subtract the minimum float value and expect it to be different from your original value. I.e.  float FindNearestSmaller (const float a) {     return a - FLT_MIN; /* This doesn't necessarily work */ }   In fact, the above will almost never work. In the above case, the return will generally still equal a, as the FLT_MIN is far beyond the precision of a. You can easily try this out for yourself: it works for e.g. 0.0f, or for very small numbers of order FLT_MIN, but not for anything between 0 and 100.  So how would you get the value that is closest but smaller or larger than a, given floating point precision?  Note: Though i am mainly interested in a C/C++ answer, I assume the answer will be applicable for most programming languages.


How do I back up my laptop's Restore Partition to a bootable CD?

My laptop has a 1.5GB recovery partition. The hard drive is getting old and I'd like to back up this partition so I can put it on a new hard drive if I ever need to. Is there a way to back up a recovery partition to a DVD or another file format that can be loaded onto a HD in the future?


Can Skyrim's console savegames be migrated to PC?

My PS3 Skyrim is starting to have the dreaded lag problem. I've tested Skyrim on my PC and it works perfectly on medium settings with 60FPS@720p (and better graphics than the PS3). It is also beautiful on my 55'' plasma and the PS3 controller works once I downloaded "MotionInJoy", so I would like to continue my adventure on PC.  It is possible to migrate my PS3 save game to PC? I've invested a lot of hours on this character and I'm not really in the mood to replay lots of quests.


So, I suggested a tag synonym for a tag. But the more I thought about it, the more I realized that the tag synonym I suggested was not correct and I want to remove it. However the tag (both the master tag and the synonym) are relatively new so I don't have the "necessary score" to delete or at least vote to delete that tag synonym. No one does.  The master tag has about 5 questions on it already, but the synonym is really unnecessary and I feel it just causes more confusion than anything.   So I was wondering if there's a way I could request a moderator to delete it for me? Or some other method? Is there an expiration on stale (non-voted upon) tag synonyms?   If a moderator can indeed delete a tag-synonym, I will edit my question with the synonym to delete.   EDIT:  The tag-synonym I wish to have deleted is:    I suggested it as a synonym for the master tag, . But then thought about it more and realized that  is a meta tag and cannot stand on its own and is not a synonym for krl, (Kynetx Rule Language). Furthermore, I can't think of any stackoverflow-appropriate (ie, non-subjective, specific answerable question), where  could be used.  Thanks in advance.


How do I take a snapshot with a laptop on 1.5.2 in Minecraft? F2 makes it dimmer

I'd really like it if someone might be able to help me. I need an answer so that I can make a picture for another post.


How to split r-squared between predictor variables in multiple regression?

I have just read a paper in which the authors carried out a multiple regression with two predictors. The overall r-squared value was 0.65. They provided a table which split the r-squared between the two predictors. The table looked like this:              rsquared beta    df pvalue whole model     0.65   NA  2, 9  0.008 predictor 1     0.38 1.01 1, 10  0.002 predictor 2     0.27 0.65 1, 10  0.030   In this model, ran in R using the mtcars dataset, the overall r-squared value is 0.76.  summary(lm(mpg ~ drat + wt, mtcars))  Call: lm(formula = mpg ~ drat + wt, data = mtcars)  Residuals:     Min      1Q  Median      3Q     Max  -5.4159 -2.0452  0.0136  1.7704  6.7466   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept)   30.290      7.318   4.139 0.000274 *** drat           1.442      1.459   0.989 0.330854     wt            -4.783      0.797  -6.001 1.59e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 3.047 on 29 degrees of freedom Multiple R-squared:  0.7609,    Adjusted R-squared:  0.7444  F-statistic: 46.14 on 2 and 29 DF,  p-value: 9.761e-10   How can I split the r-squared value between the two predictor variables?


Why telephone lines use -48V not +48V? What’s the difference practically in -ve and +ve voltages? Detailed answer would be appreciated.


I want to match the FROM part in a query string. I've a working regular expression but I think it can be bether.    FROM(?P<FROM>.+)((?=GROUP|LIMIT))|FROM(?P<FROM2>.+)   My first expression was:  FROM(?P<FROM>.+)((?=GROUP|LIMIT))   But this doesn't match the follow FROM value     SELECT * FROM Table1 t1 JOIN Table2 AS t2   The output should be: group 'FROM': Table1 t1 JOIN Table2 AS t2 I tried this, but doesn't work either.  FROM(?P<FROM>.+)((?=GROUP|LIMIT)|$)   The above regex matches but it also matches the string 'GROUP BY t1.id'.


Waiting to upgrade 14.04.4 LTS to 16.04.1 LTS

I have waited for the automatic upgrade message from the Software Updater,  but no upgrade message.  Some  information from the terminal program follows:    william@william-Inspiron-3537:~$ date Fri Jul 22 11:10:12 EDT 2016 william@william-Inspiron-3537:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 14.04.4 LTS Release:    14.04 Codename:   trusty william@william-Inspiron-3537:~$ do-release-upgrade Checking for a new Ubuntu release No new release found william@william-Inspiron-3537:~$ date Fri Jul 22 11:11:04 EDT 2016 william@william-Inspiron-3537:~$ ^C william@william-Inspiron-3537:~$    What is the problem?


How can I share my computer screen on a LAN?

I want to share my computer screen over LAN, without an internet connection. How can I do it?  There is different software like:   LogMeIn Team Viewer etc.    But these require an internet connection.


Question/Answer and Comment functions don't seem to work properly across sites

I noticed that question/answer functionality seems to be broken on all sites lately. As far as I know, I haven't turned off scripts (unless my latest Firefox update did that without my knowledge, but there doesn't seem to be anything in the options to turn it on/off). I don't currently have any plug-ins that disable scripts. What I'm seeing is the following:  For questions/answers:   The preview window isn't working, and there are no formatting buttons. The similar question search doesn't happen when typing in the Title field. No tag suggestions appear when typing in the Tags field.   Note that the above doesn't happen when I'm editing an existing question/answer.  For comments: - Clicking o the Add comment link just takes me to the top of the page.  Edit I guess it's been fixed and this question can be closed put on hold.


Generating function for the factorial sequence

As asked in the title, I am trying to arrive at the generating function   $\displaystyle\sum_{k=0}^{\infty}k!x^k$   just by starting with the generating function with constant 1 sequence $f(x) = \displaystyle\sum_{k=0}^{\infty}x^k$ and using the operation of differentiating $f(x)$ and shifting the terms in the sequence by multiplying $f(x)$ by $x$.  My attempt of the problem (which I believe is wrong).  Start with the following:  $f(x) = \displaystyle\sum_{k=0}^{\infty}x^k$  We differentiating it $k$ times and get  $f^{(k)} = \displaystyle\sum_{k=0}^{\infty}k!x^0 = \displaystyle\sum_{k=0}^{\infty}k!$  Then we shift the terms in the sequence by multiplying $x^k$ to $f^{(k)}$ and we get  $x^kf^{(k)} = \displaystyle\sum_{k=0}^{\infty}k!x^k$. This I believe is wrong because if we look at the $k^{\mathrm{th}}$ partial sum of $f(x)$, then differentiating the $k^{\mathrm{th}}$ partial term $k$ times gives us $k!$ and multiplying this by $x^k$ gives us $k!x^k$, not $\displaystyle\sum_{k=0}^{k}k!x^k$.   I understand the example of how to get from $f(x)$ to getting a generating function of sequence of squares or cubes by differentiating $f(x)$ and multiplying the result by $x$ and repeating this process once more.   If anyone can give me a perspective of how to see this problem or maybe a misunderstanding on my part, I would appreciate it.


Proof by induction: $ 2^n \ge n^2$ for $n\ge4$

The first part is clear but in the second I did this:  $2^{n+1}=2^n\cdot 2 \ge n^2\cdot 2=n^2+n^2=n^2+n\cdot n\ge  n^2+n\left(2+\frac{1}{n}\right)=(n+1)^2$  I'm not sure if I the assumption: $n\ge 2+(1/n)$ is correct or I should prove it. Can you help me? Thanks :)


Conditional expectation for random walks

The questions asks to $ E[X_1|S_n]$ where $ S_n = \sum_{[n]} X_i $ with $X_i$ i.i.d. of finite expectation. My attempt was to consider an arbitrary Borel set, pull it back under $ S_n $ to get a set in $\sigma(S_n)$, and then average $X_1$ over that pull back and normalize:  $$ E[X_1|S_n] = E[X_1 1_{S_n^{-1}(B)}]/P[S^{-1}_n(B)]$$  for any Borel set $B$.  However, it just doesn't feel right - it seems just symbol pushing, without giving any intuition to what's happening.   Can anyone explain if this is correct, of if I missing something deep?


Passive rigid body physics not working with screw modifier

I'm making a rolling ball animation where the ball will roll around a set of pipes, planes and other objects. I created a spring using the screw modifier and then made a second slightly smaller spring inside it to create a track like effect for my ball to roll on. When I add the passive object to them, they still will not hold up my ball. The ball falls straight through them.


C#, confused on the usage of Automatic Properties

So I am struggling to understand the purpose of the Automatic properties in classes.   See examples below:   This code lets me set the name of the test class, and read it. All works fine, I can set it to "tom" and read "tom" from it.   namespace ConsoleApplication1 {     class test     {         public string name;     }     class Program     {         static void Main(string[] args)         {             test tom = new test();             tom.name = "tom";             Console.Write(tom.name);         }     } }   now this code, using the automatic property does exactly the same thing:   namespace ConsoleApplication1 {     class test     {         public string name { get; set; }     }     class Program     {         static void Main(string[] args)         {             test tom = new test();             tom.name = "tom";             Console.Write(tom.name);         }     } }   So, what is the benefit of using one over the other? Since both seem to work the same way, as far as I can see.   Thanks in advance for any help people can give me!


What does the solution to a wave equation represent?

What does the solution of a wave equation represent? When one finds a solution to a wave equation, how can one interpret this solution? Does the solution show the behavior of a wave?


What are the origins of the word "nice"?

The word "nice" tends to be used in rather a wishy-washy sense these days. In general use it tends to mean anything that is satisfactory.  But what are the origins of this word? What did it originally mean? Why has the meaning changed so much through the years?


i recently put my first app in the playstore and some devices crashed with that error. I am really no expert with memory management. Thanks for any advice in advance  Heres the Link to that app:     java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:502) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:601) at de.as.framework.impl.AndroidGraphics.newPixmap(AndroidGraphics.java:50) at de.as.zombieRun.LoadingScreen.update(LoadingScreen.java:48) at de.as.framework.impl.AndroidFastRenderView.run(AndroidFastRenderView.java:39) at java.lang.Thread.run(Thread.java:856)


A floor is paved with rectangular marble blocks,each of length $a$ and breadth $b$.A circular block of diameter $c(c<a,b)$ is thrown on the floor at random.Show that the chance that it falls entirely on one rectangular block is $\frac{(a-c)(b-c)}{ab}$  I thought over this problem,i found total number of cases as area of rectangular marble block,but i cannot find the favorable number of cases.Favorable number of cases cannot be area of rectangular marble block$-$ area of circular block,as the answer suggests.What should be the correct logic,please help.


I can't disable "dealnloot" site push notifications in windows 10

I'm unable to turn off a site's notification in windows 10, it keeps popping up now and then. It appears as  . I allowed this site to show me windows notifications when windows 10 asked me to do, but I can't see this app in "notifications and actions" settings, even when I turn off "Show app notifications" it keeps popping up. I tried to search for the site name in windows registry (HKEY_CURRENT_USER/SOFTWARE/microsoft/Windows/CurrentVersion/PushNotifications), no luck there too. I just can't figure out how to shut it.  Please any help would be greatly appreciated. Thanks in advance.


I'm making this right now -   Each 5m roll of LED takes 60W power (). He's using two of these rolls, so a total of 10m LED Strip.  My question is, that he's using a 19v 3.14A adapter which gives out a wattage of 60W. Isn't this lesser than what is required for the overall 10m (60w + 60w = 120w?). What's the effect of using this lower wattage on the LED output?   Instead, I thought of connecting the two rolls in parallel but the 19V adapter and connecting in parallel will probably burn the LEDs due to the fact that the LED strips are rated at 12v. Can I connect the two sets of 5m LEDs in parallel to a 12V 5A (which will result in 60W, the maximum wattage the LEDs can handle) DC Power supply? I'm assuming that then both the 5m strips are running at full brightness then. Or am I wrong and since a total of 120W is required, should I go for a 12v 10A DC SMPS Power supply? I studies Physics a long time ago in school and I'm pretty clueless here. What I'm looking for basically is the best way to extract the maximum light out of the LEDs. Thanks a lot guys!


Does relative velocity also depend on the distance from which moving object is being viewed?

When we are in train, objects just close to trains like the adjacent track, electric poles and such close things appear to move very fast against the direction of the moving train.Further the mountains and trees distant away from the train appear to move against the direction of the moving train, but they do so slowly, very slowly.And the objects even further appear to move even slower.Why is it so?   Shouldn't everything pass on with same speed in opposite direction. Further this should also work vice-versa.For a person standing very close to a moving train, train should appear fast to him.And person far away should see it moving slowly.However, I haven't experienced such case so far.Why is it so and also does the vice-versa of this also occur?


How to put a text in particular position of an image?

I'm working with overleaf and trying to add texts in these red marked positions. For example, I want to add 4,5 and 6 respectively. I've tried with \put(0,0), but it always disables the \resizebox attribute and makes the image out of proportion, also the text doesn't get placed in the position at all. What changes can I make in the code mention below to add 4,5 and 6 in these three positions? Picture can be found in . \begin{figure}[!h]     \centering     \resizebox{1\linewidth}{!}{%     \includegraphics{picture.png}     }     \caption{Flowchart of Heuristic adjustment 1.}     \label{fig:heuristic_1_FC} \end{figure}


Finding a derivative using the Fundamental Theorem of Calculus

Let $f$ be a continuous function on $R$. Define $$F(x) = \int_{a}^{x} f(t)(x - t) dt.$$ Evaluate $F''(x)$.  My Working I know that, if $$F(x) = \int_{a}^{x} f(t) dt,$$ then by the Fundamental Theorem of Calculus, $$F'(x) = (1)f(x) - (0)f(a) = f(x)$$ However, when I use the same idea for the integral in the question, I get $$F'(x) = (1)f(x)(x - x) - (0)f(a)(x - a) = 0$$  The Answer $$F''(x) = f(x)$$  I did not go on to evaluate $F''(x)$ as I know I must have gone wrong somewhere since my $F'(x)$ is a constant. Why can I not simply take "$f(t)(x - t)$" to be the new function? Any intuitive explanations as to where I have gone wrong will be greatly appreciated :)


How to correctly use double quotation marks at the end of a sentence?

Group A:        This is so-called "Moon Cake." // The period is inside the double quatation marks   This is so-called "Moon Cake". // The period is outside the double quatation marks      I know the former is more standard-conforming in most publications; however, I think the latter is more intuitive and meaningful. Because the period is used to stop the whole sentence, rather than stop the phrase itself. I think the former is counter-intuitive, although the usage is standard-conforming.  Please consider another two sentences:  Group B:        She said: "I don't know."   She said: "I don't know".      It is obvious that the former is more meaningful than the latter, because the period is used to stop the whole sentence, and the double quatation marks are used as a quatation. This time, it is standard-conforming and intuitive.  What's your opinion?


Is it encouraged to intentionally post duplicates for searchability?

I know that according to , leaving existing duplicate questions is good for searchability. But what about intentionally asking a duplicate question with different terms?  made me think of that.


I downloaded wubi and "ubuntu-13.04-desktop-i386.iso" and kep in same folder.When i initiated install wubi starts to download 12.X. version of ubuntu and never considered downloaded ubuntu-13.04-desktop-i386.iso.Help me how can i install U13.04 using  wubi [offline].


Software center not working on kali linux?

I followed the instructions for installing kali linux and put these commands into the terminal:  apt-get update apt-get install software-center   I also added:  deb http://http.kali.org/ /kali main contrib non-free deb http://http.kali.org/ /wheezy main contrib non-free   to my sources list. When I start up the software center a tab appears in the tool bar menu titled "starting software center" a seconds later it just closes. No window comes up or anything the tab just closes. This appears in terminal when I type sudo software-center:  root@MattJones:~# sudo software-center Traceback (most recent call last):    File "/usr/bin/software-center", line 131, in <module>     from softwarecenter.ui.gtk3.app import SoftwareCenterAppGtk3   File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 49, in <module>     from softwarecenter.db.application import Application   File "/usr/share/software-center/softwarecenter/db/application.py", line 27, in <module>     from softwarecenter.backend.channel import is_channel_available   File "/usr/share/software-center/softwarecenter/backend/channel.py", line 25, in <module>     from softwarecenter.distro import get_distro   File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 179, in <module>     distro_instance=_get_distro()   File "/usr/share/software-center/softwarecenter/distro/__init__.py", line 162, in _get_distro     module =  __import__(distro_id, globals(), locals(), [], -1) ImportError: No module named Kali   Does anyone know what the problem might be?


Add all columns separately in linux if the first column has same entries

I have this output  filename.txt  AC1481523 001 001 001 001 AC1481523 005 005 005 005 AC1481676 003 003 005 004 AC1481676 003 002 001 004   I want to add all the columns separately where the first column has the same value. I tried this   awk '{for (j = 1; j <= 200; j++) a[$1]+=$j} END {for(i in a) print i,a[i] }' filename.txt   I get all the numbers added in a single column, and I get   AC1481523 24 AC1481676 25   But I want   AC1481523 6 6 6 6  AC1481676 6 5 6 8


Is it better to use mysqli_real_escape_string (with mysqli) or placeholders (with PDO)?

Given this code:  mysqli_set_charset('utf8');  $id = mysqli_real_escape_string($_GET['id']);  $result = mysqli_query($con,"SELECT * FROM post WHERE id_post = '$id'");  if (mysqli_num_rows($result) == 0) {     header('Location: 404.php');     die(); } else {     // Continue... }   And this:  $id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);  // New PDO...  $Ps = $Pdo->prepare('SELECT * FROM post WHERE id_post = :id');  $Ps->execute(array(':id', $id));  if ($Ps->rowCount() == 0) {     header('Location: 404.php');     die(); } else {     // Continue... }   Is there a best option to prevent SQL Injection or the are equivalent?


Is the nearest neighbor in QGIS guaranteed to return the closest geometry?

I did assume that the answer was yes, but I have developed some doubts about that because I observe something which seems to contradict:  I have a netlayer containing road segments (LineStrings) with a corresponding spatial index netindex. Now I wish to find the closest segment to a given QgsPoint pt.  I use the netindex.nearestNeighbor(pt,n) to obtain the corresponding featureIds:  req = QgsFeatureRequest();  req.setFilterFids(netindex.nearestNeighbor(pt,n)) fs = [f for f in netlayer.getFeatures(req)] closestEdgeGeoms = [f.geometry() for f in fs] ptGeom = QgsGeometry.fromPoint(pt) dists = [g.distance(ptGeom) for g in closestEdgeGeoms]   Now let's have a look what the dists are for increasing n:  n=1 # -> dists=[132.57922743885197] n=2 # -> dists=[44.65094179417814, 132.57922743885197], ups!? n=3 # -> dists=[232.91196346783073, 44.65094179417814, 132.57922743885197] n=4 # -> dists=[186.9821211234746, 232.91196346783073, 44.65094179417814, 132.57922743885197], again found sth closer... ...   That's it. Does someone have an idea how large n should be to guarantee to catch the closest geometry? Or is this a bug?    Edit: As  pointed out  is related. My question is actually answered by  answer.


Setting python shell version with .sh file

I am executing my ./shell.sh which contains   eval "$(pyenv init -)" pyenv shell 3.8.2   But nothing happens. If i run this code in bash manually it works fine and shell version of python switches from 2.7.10 to 3.8.2.  I am in the right directory and I gave the .sh file execution permissions.


I am using QGIS 3.12. I am new to QGIS after having worked with ArcGIS Desktop for a while. I am having issues with adding a grid to my project. I am using CRS ESPG:3587 WGS 84 / Pseudo-Mercator and noticed that the grid is showing the wrong coordinates and have included the parameters I have set for the grids.


As discussed in , there are a number of elements in the Lord of the Rings and Hobbit movies that could be construed as racist against Muslim and non-Caucasian people, for example the fact Mordor is in the East and has the 'black' gate, whereas Gondor is the 'white' city, the men from the East who came to serve Sauron are dark skinned with face coverings, whereas all the good guys are explicitly described as fair.  The consensus of opinion seems to be that Tolkien wasn't being explicitly racist but my question relates to the films. It certainly seems that Peter Jackson could have done something about these (perceived) problems, but he chose not to.   Is this because the movies, or Jackson himself are intentionally racist?


Typeset “parsing HTML the Cthulhu way” in LaTeX

There’s  in which the user argues that regular expressions cannot be used to parse HTML … while his sanity slowly slips out of his grasp.  Unfortunately, the insane use of Unicode combining characters influence of the unholy child means that no browser can really render the text correctly. At any rate, it looks something like this (excerpt):    I tried rendering the poem in XeLaTeX (mostly to try out to what extent that would work). But to my huge disappointment, the compilation fails right from the outset. How would I go about compiling such a document in XeLaTeX? What do I have to pay special attention to? My attempts yield this error when running xelatex file:     xdvipdfmx:fatal: CID count > 65535      Output file removed.   (see the transcript file for additional information)   Error 256 (driver return code) generating output;   And no output file is produced.  Here’s minimal document to illustrate the problem:  \documentclass{scrartcl}  \usepackage{fontspec}  \def\st#1{#1} \setmainfont{Hoefler Text} \setsansfont{Gill Sans} \setmonofont{Source Code Pro}  \begin{document} You can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is beautiful the f\texttt{inal snuf}fing o\emph{f the lie\textbf{s of Man ALL IS LOŚ͖̩͇̗̪̏̈́T A}}\textbf{LL IS L}OST th\emph{e pon̷y he come}s he c̶̮om\st{es he co}\textbf{\st{me}s t\emph{he} ich}or permeat\emph{es al}l MY FAC\emph{E MY FACE ᵒh god n\textbf{o NO NOO̼}}\textbf{OO N}Θ stop t\emph{he an*̶̙̤͑̾̾̅ͫg͇̫͛͆̾ͫ̑͆l͖͉̗̩̳̟̍ͫͥͨ}e̠̅s\texttt{ ͎a̧͈͖r̽̾̈́͒͑e} n\textbf{ot rè̑ͧ̌aͨl̘̝̙̃ͤ͂̾̆ ZA̡͊͠͝LGΌ ISͮ̂҉̯͈͕̹̘̱ T}O͇̹̺ͅƝ̴ȳ̳ TH̘\textbf{Ë͖́̉ ͠P̯͍̭O̚N̐Y̡ H̸̡̪̯ͨ͊̽̅̾̎Ȩ̬̩̾͛ͪ̈́̀́͘ ̶̧̨̱̹̭̯ͧ̾ͬC̷̙̲̝͖ͭ̏ͥͮ͟O̮̪̝͍ͮM̲̖͊̒ͪͩͬ̚̚͜Ȇ̴̟̟͙̞ͩ͌͝}S̨̥̫͎̭ͯ̿̔̀ͅ \end{document}   I’ve chosen fonts that have many Unicode characters defined. There are probably better choices, though. Here’s .  Is there any chance with current technology to (a) compile the document and (b) make it render correctly (i.e. as intended by the Unicode standard)? Is it necessary (or even possible) to replace the Unicode diacritics with LaTeX commands to render them correctly?


I have recently purchased a Dell Inspiron 14 3000 laptop with Ubuntu 18.04 preinstalled. I haven't used Linux for about 10 years and my previous experienced was limited to installing Ubuntu on former Windows laptops and always finding that I couldn't get the wireless card working etc so would abandon it. This time I've bought preinstalled from Dell and so far I am loving Ubuntu. However I would like to upgrade to 20.04 but I am concerned as to whether this might 'break' some drivers or something and the resulting hardware not working. Like does Dell have specific drivers for it's hardware that would be lost upon upgrade? Does anyone have any experience with this? I tried calling Dell Support but they couldn't get their head around what I was asking, in fact they couldn't get past me not having Windows on my computer. If I ran 20.04 from USB and it all worked then it should work on a proper install right? Thanks


Inner regularity of Lebesgue measurable sets

This is an exercise in real analysis:     Let $E\subset{\Bbb R}^d$ be Lebesgue measurable. Show that    $$ m(E)=\sup\{m(K):K\subset E, K \text{compact}\}. $$   When $E$ is bounded, this can be done by the following proposition:       $E\subset{\Bbb R}^d$ is Lebesgue measurable if and only if for every $\varepsilon>0$, one can find a closed set $F$ contained in $E$ with $m^*(E\setminus F)\leq\varepsilon$.    How can I deal with the case that $E$ is unbounded?


If ideal $I$ of domain $R$ is free $R$-module, then $I$ is principal ideal.

If ideal $I$ of domain $R$ is free $R$-module, how to prove $I$ is principal ideal?   Is this right if $R$ is just a commutative ring?  My thought:  $(1)$ for non-zero ideal $I$ and $J$, let  $0\not=a \in I, 0\not=b \in J$, since $R$ is  domain, $0\not=ab\in I \cap J$, so $I \cap J\not =\ \varnothing$.  $(2)$ Suppose $\{e_i\}_{i\in \Lambda}$ is basis of free $R$-module $I$, then $I=\bigoplus_{i\in \Lambda}Re_i$, and every $R{e_i}$ is principal ideal generated by $e_i$. Inaccurately speaking, $I$ is generated by elements in $\bigcap_{i\in \Lambda}Re_i$. If $\Lambda$ is a finite set, then that's right. What if $\Lambda$ is an infinite set?  And what if $R$ is just a commutative ring istead of a domain? Thanks in advance!


A transition matrix $P$ is said to be doubly stochastic if the sum   over each column equals one, that is $\sum_i P_{ij}=1\space\forall i$.   If such a chain is irreducible and aperiodic and consists of $M+1$   states $0,1,\dots,M$ show that the limiting probabilities are given by   $$\pi_j=\frac{1}{1+M},j=0,1,\dots,M$$   I have no idea how to prove it but   If a chain is irreducible then all states communicate i.e $$P_{ij}>0\space \text{and}\space P_{ji}>0\space\forall i,j$$ If $d$ denotes the period of any state, if a chain is irreducible aperiodic, then $d(i)=1\forall i$   If $P_{(M+1)\times (M+1)}$ matrix and $\pi$ is the stationary distribution  $$\pi_j=\sum_iP_{ij}\pi_i\space j=0,1,\dots,M+1$$  but how I can get this expression?


After upgrading (12.08.2014) from version 12.04 to 14.04.1   I get an notification: System program problem detected. Do you want to report the problem now? So, after I click  "report problem" I get an empty desktop.  The only thing I can is to use command-line interface by Ctrl+Alt+F1.  What should I do to get Unity work correctly?


Using window function to carry forward first non-null value in a partition

Consider a table that records visits  create table visits (   person varchar(10),   ts timestamp,    somevalue varchar(10)  )   Consider this example data (timestamp simplified as counter)  ts| person    |  somevalue ------------------------- 1 |  bob      |null 2 |  bob      |null 3 |  jim      |null 4 |  bob      |  A 5 |  bob      | null 6 |  bob      |  B 7 |  jim      |  X 8 |  jim      |  Y 9 |  jim      |  null   I'm trying to carry forward the last non-null somevalue of the person to all his future visits until that value changes (ie becomes the next non-null) value.  Expected result set looks like this:  ts|  person   | somevalue | carry-forward  ----------------------------------------------- 1 |  bob      |null       |   null 2 |  bob      |null       |   null 3 |  jim      |null       |   null 4 |  bob      |  A        |    A 5 |  bob      | null      |    A 6 |  bob      |  B        |    B 7 |  jim      |  X        |    X 8 |  jim      |  Y        |    Y 9 |  jim      |  null     |    Y   My attempt looks like this:   select *,    first_value(somevalue) over (partition by person order by (somevalue is null), ts rows between UNBOUNDED PRECEDING AND current row  ) as carry_forward   from visits    order by ts   Note: the (somevalue is null) evaluates to 1 or 0 for the purposes of sorting so I can get the first non-null value in the partition.  The above doesn't give me the result I'm after.


Install Ubuntu in Flash Drive to work in any computer

How to make Ubuntu Installed flash drive bootable in any PC?  I am new user to Ubuntu and started loving it. I'm using Toshiba Satellite C840 and using Ubuntu 16.04 as my primary OS in dual boot mode.  However, due to the inconvenience in carrying my Laptop everywhere, I've bought a 32GB flash drive and installed Ubuntu 16.04 in it with my all necessary apps and settings.  Since my Laptop is already using dual boot with Win7, my flash drive Ubuntu boots properly.  My question is - instead of carrying my Laptop, if I want to carry my USB flash drive (where Ubuntu 16.04 is already installed) and try to boot it in any other PC (say, in my cousin's pc) , will it work? If not, then how to make it work properly?


How to distribute the objects on a sphere evenly?

I want to replicate this mesh -    I think the best way is using a particle system of cubes. So I need to create a sphere of simple circles. It is necessary that in each circle the vertices are at equal distance from each other. But I don't know how to create those circles.


can anyone tell me the name of this font used in this document? thanks in advance. ?


What are the differences between \hbox and \mbox?  Related:   This  discusses different boxes in general. This  differentiates \text from \mbox.


Initial algebra is "unique up to isomorphism"?

Whats the meaning of "unique up to isomorphism" in the context of .  It seems that up to means "to ignore" (sometimes said as "modulo"). Isomorphism means that the objects are the same in some way (with a bidirectional mapping). However, "unique ignoring that they are the same" still perplexes me.  Please try to keep your answer(s) as simple as possible. I'm a professional programmer, not a mathematician.


I have a ciphertext which has been padded with spaces from left the message is 31 bytes long and e = 3 how can I recover the message with python code .


A teacher at a university is still teacher or lecturer?    I'm a little bit confused in light of two different sources   The 1st source - (the book "Check Your English Vocabulary For Living In UK") says the following things:     But on the other hand,  states:   sity is still teacher, unlike what the first source says.  I must to say, that some universities that I know the lecture is the one who gives the lecture in a big hall for many classes of students while a teacher is the one who responsible for examination or practical part and he works with each class separately unlike the lecturer. In your countries do you have also such distinguishing?


What does the .blend1 file do? It automatically appears every time you create a .blend file. I only use the .blend file. When I double-click on the .blend file, it opens Blender. When I double-click on the .blend1 file, it doesn't have a software to run the file. What is the .blend1 file used for?


How can I prove $q+1 \vert q^n + 1 \iff \ n$ is odd

Let $q\geq 2$. Then $q+1 \vert q^n + 1 \iff \ n$ is odd  How can I prove it?  I don't know how to start.   Any hints?.


I want to install wifi card, but my additional drives is empty

Today, I install Ubuntu 14.04 version. And I want to connect my wifi. But the system cannot find my wifi card in the additional drivers, by the way my additional drivers window is empty. How to solve this problem?  lspci -nn | grep 0280   shows ...  Realtek Semiconduct Co., ltd. RTL8192EE PCI e wireless Neteork Adapter[10ec:818b]


Convert string to class name and pass as parameter T

I'm looking to convert the string name of a class to a class, then pass that class name to a method which accepts <T>:  var objectList = _reader.GetObjects<MyClassName>();   and the method I'm calling is:  public List<T> GetObjects<T>() where T:new() {  }   Do you know how this can be done? I've tried:  var type = Type.GetType(MyClassName); var yourObject = Activator.CreateInstance(type);  var objectList = _reader.GetObjects<yourObject>();   but that doesn't work, I get the error message 'yourObject is a variable but is used like a type'  It does work if I use an actual class name.  Any ideas?


What is the difference between the AU and UK editions of Cards Against Humanity

I just got the UK set and need to know which cards to add.  Would it be easier to tell me what cards are new/different to add?  Or what cards are identical to remove. I want to know the difference between UK and AU editions.   Not the difference between UK and US editions


How to Upgrade from Discontinued Skype for Linux 4.3

Skype was working perfectly on my Ubuntu 14.04 LTS until some time early November 2017. When I launch skype from the terminal, the login box pops up, I enter my credentials and then skype just closes. The terminal has a lot of output, ending in  Gtk-Message: Failed to load module "canberra-gtk-module"   Can I reinstall Skype?


How to prove Graph with $n$ vertices has Edge Chromatic Number no more than $n/2$ edges

Show that if $G$ is a graph with $n$ vertices, then no more than $n/2$ edges can be colored in the same color, in any edge coloring of $G$.  I know there are  satisfy the statement, e.g a circuit of $n$ vertices with an even $n$ .   However, I want the proof of above statement. As we known, cases can only falsify a statement instead of verify it.


Command output redirect to file and terminal

I am trying to throw command output to file plus console also. This is because i want to keep record of output in file. I am doing following and it appending to file but not printing ls output on terminal.   $ls 2>&1 > /tmp/ls.txt


what is the difference instance method and @classmethod and @staticmethod in python?

I don't understand when i use these three method separately. 1)instance method 2)class method 3)staticmethod  class CustomClass:      # instance method     def add_instance_method(self, a,b):         return a + b      # classmethod     @classmethod     def add_class_method(cls, a, b):         return a + b      # staticmethod     @staticmethod     def add_static_method(a, b):         return a + b


What's a simpler way to switch between power sources?

I want to make a device that allows the user to switch between two different power sources (a wall mount and batteries).   I could perform this circuit using two DPDT switches, but I would need to switch the two switches each time I want to change sources. Is there a simpler way to perform this function without using relays?  Here's a schematic of my device as a reference:


So my friend has a USB flash drive that isn't working. I don't know a whole lot about "recovery" software so I figured I'd ask you guys.  What steps can I try (I have access to a Linux machine as well) to see....if I can get ANYTHING off the flash drive?  I've google'd around, but most of the stuff seems for windows.


Which is more appropriate — "I work for" or "I work at"?

If you are working as an employee at an organization, when you tell about it to others which usage would be more appropriate?        I work for company.   I work at company.      Or are both usages correct?


If a non-axis-aligned ellipsoid is defined by $$\tag{1} \bf x^T A x=1$$ where $\bf x$ $=[x, y, z]^T$, $\bf A$ $=\begin{bmatrix}a_{xx}&a_{xy}&a_{xz}\\a_{yx}&a_{yy}&a_{yz}\\a_{zx}&a_{zy}&a_{zz} \end{bmatrix}$, and $a_{ij}=a_{ji}$,  then Eqn(1) is the following when expanded: $$\tag{2} a_{xx}x^2+a_{yy}y^2+a_{zz}z^2+2a_{xy}xy+2a_{xz}xz+2a_{yz}yz=1$$  at $z=0$ the coordinates of the ellipsoid is: $$\tag{3} a_{xx}x^2+a_{yy}y^2+2a_{xy}xy=1$$  which I think is also an equation of an ellipse since its the intersection of the ellipsoid and the x-y-plane.  Equation 3 is in implicit form.  How can its parametric equations be found?


Google Chrome: Is there a keyboard shortcut to open a link in a new tab?

Is is possible to open a link in a new background tab in Google Chrome with a keyboard shortcut?  (I know it's possible with Ctrl+click and middle click, and I know that Shift+Enter opens the link in a new browser window.)


How to resolve apostrophes/quotation marks being printed as "�" in PHP web page?

I have a chat bot that creates a corpus of messages from a GroupMe chat and generates responses using the Markovify module in Python 3. I recently started running a LAMP stack out of my dorm so that I can record these messages, store them in a MySql database, and display them on demand for people on the University wifi.  My problem as of late is that question and quotation marks, which show up fine in the python console program, appear as "�" on the web page. Here's the index.php file:      <link rel="stylesheet" type="text/css" href="style.css"/> <title> Hove and Lonor Database </title>

HOVE AND LONOR LIVE FEED Y'ALL

 user lookup

      <?php  error_reporting(E_ALL);         ini_set('display_errors', 1); $conn = mysqli_connect('localhost', 'someuser', 'somepass'); mysqli_select_db($conn, 'groupme');  $query = "SELECT * FROM msgs"; $result = mysqli_query($conn, $query) or die (mysqli_error($con));  echo "
";  while($row = mysqli_fetch_array($result)) {     echo"
" . $row['date'] . "	" . $row['user'] . "	" . $row['msg'] . "
"; }  echo "
";  mysqli_close($conn);  ?>


Why does `echo -e "\\\SOME_TEXT"` show only one backslash?

Could some one explain what is happening behind the scenes in character escaping in Linux shell? I tried the following and googled a lot, without any success in understanding what (and how) is going on:  root@sv01:~# echo -e "\ Hello!" \ Hello! root@sv01:~# echo -e "\\ Hello!" \ Hello! root@sv01:~# echo -e "\\\ Hello!" \ Hello! root@sv01:~# echo -e "\\\\ Hello!" \ Hello! root@sv01:~# echo -e "\\\\\ Hello!" \\ Hello! root@sv01:~# echo -e "\\\\\\ Hello!" \\ Hello! root@sv01:~# echo -e "\\\\\\\ Hello!" \\ Hello! root@sv01:~# echo -e "\\\\\\\\ Hello!" \\ Hello! root@sv01:~# echo -e "\\\\\\\\\ Hello!" \\\ Hello! root@sv01:~# echo -e "\n Hello!"   Hello! root@sv01:~# echo -e "\\n Hello!"   Hello! root@sv01:~# echo -e "\\\n Hello!" \n Hello!   I am totally lost there, so for example, why do three backslashes give only one back slash? I would expect: the first two will be escaped to one, the third one will find nothing to escape so it will remain a slash (line in the first experiment), but what is happening is that the third one is just disappears. Why I am getting one backslash from four \\\\ Hello? I would expect each pair will give one back slash -> two backslashes.  And why I need three backslashes in the last case to get \n escaped? what is happening in background of escaping to get that? and how is it different from \\n case?  I appreciate any explanation of what is going on in the previous lines.


The Axiom of Choice, and the statement that whenever there is a surjection $A \to B$ there is an injection $B \to A$

Is there a model of $\mathsf{ZF}$ in which the Axiom of Choice fails but the following statement holds for arbitrary sets $A, B$:     there is an injection $A \to  B$ if there is a surjection $B \to A$?


Difference between value and reference in a Java exercise?

I am learning Java from . For challenge "Abstract class challenge" narrator states says I should create 2 references and 1 value in an abstract class.  In the solution this is the result:  public abstract class ListItem {     // references     protected ListItem rightLink = null;     protected ListItem leftLink = null;      // value     protected Object object; }   What makes references a reference and not a value?   They both start with protected, then we have type, then we have variable name. The only difference is that reference has assigned value of null.  But if were to make for example:  private int myNumber = 10;   Above is not called a reference, it is called a variable myNumber of type int with value 10.


This is probably something simple but i can't figure out the solution. I have a Javascript that ask for some data from a PHP. Data included in an array. I am actually receiving the array from php but i can't fragmented it.  this is the PHP file:  <?php  $q1 = intval($_REQUEST["qq1"]);  // some data // $reply_1 = "daTa1"; // $reply_2 = "data2"; // $reply_3 = "987654321"; //..............  $arr = array( $reply_1, $reply_2, $reply_3, $reply_4);  echo json_encode($arr); ?>   and the below is part of the javascript    var datareceived= new Array (15);  var url = "theabovePHP.php?qq1="+i;  function reqListener () {      console.log(this.responseText);               }       var oReq = new XMLHttpRequest();      oReq.onload = function() {       datareceived= this.responseText;     }      oReq.open("get", url, false); // false wait     oReq.send();  document.getElementById('div_display_part_OF_data').innerHTML = datareceived[1]+" some data " + datareceived[2];     The issue is that i am receiving the data in var datareceived, that looks like this ["daTa1","data2","987654321","2015/09/27 16:20:48","35.1320112","33.344586"] but I can't have them as an array.  When I ask the datareceived[3], this should be  987654321, i receive "T" (the 3rd charachter in datareceived) etc..


Extracting certain data from an INI file

I have an INI file which has data   like this.  [username] xxxxxxxxxx   [password] xxxxxxxxxx  Now i want to extract both username and password and store them separately into a string. I tried many things, but was not able to achieve this.  Any help would be appreciated.


tikz-3dplot: How to get a coordinate system with costum axes?

What do I have to set to get a coordinate sytem like   MWE:    \documentclass[]{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{60}{110} %\tdplotsetrotatedcoords{30}{45}{0} %\tdplotsetcoord{point}{1}{33}{44} %\tdplotsetrotatedcoords{00}{0}{0}  \begin{tikzpicture}[ tdplot_main_coords, %tdplot_rotated_coords, ] \foreach \P/\s/\Pos in {(1,0,0)/x/below, (0,1,0)/y/left, (0,0,1)/z/right}  \draw[-latex] (0,0,0) -- \P node[\Pos, pos=0.9,inner sep=2pt]{$\s$}; \end{tikzpicture} \end{document}


Automatically update slug with latest title within custom post type

I'm trying to update the slug for all the post within a specific custom post type, let's say "music".  Here is the code:  /* Update slug with the latest post title */ function auto_update_post_slug($postId, $after, $before) {     if ($after->post_title != $before->post_title) {         $after->post_name = '';         wp_update_post($after);     } }  /* Check if custom post type music, if true, add action to auto update slug */ function enqueue_music_features( $hook_suffix ){     $my_custom_post_type = 'music';      if( in_array($hook_suffix, array('post.php', 'post-new.php') ) ){         $screen = get_current_screen();      if( is_object( $screen ) && $my_custom_post_type == $screen->post_type ){          /* add custom post type music features */         add_action('post_updated', 'auto_update_post_slug', 10, 3);          echo "<script type='text/javascript'>alert('This has been called');</script>";          }     } } add_action( 'admin_enqueue_scripts', 'enqueue_music_features');   What I do know that the enqueue_music_features only calls the alert in the custom post type music, and that auto_update_post_slug works by itself if you put it outside enqueue_music_features.   I also tried putting the entire auto_update_post_slug inside the hook, that didn't work either.  The main issue is that I'm not able to combine these two parts, even if they work on by themselves.


Energy-Time Uncertainty Relation and Virtual Particles

I've come across a hole in my understanding.  Heisenberg's Uncertainty Principle can be expressed in terms of energy and time as  $$ \Delta E \, \Delta t \geq \frac{\hbar}{2} $$  where $\Delta E$ is the uncertainty in a particle's energy and $\Delta t$ is the time period over which this measurement is taken.  However, I know that the existence of virtual particles violating the law of conservation of energy is explained by this relation but on the surface, it does not make sense.  To explain, it is said that virtual particles (pairs) can "pop" into existence in the vacuum as long as they disappear (annihilate) within a time $t$.  This is put down to the uncertainty relation given above.  However, the uncertainty relation given above states that the uncertainty in a virtual particle's energy can be arbitrarily high for arbitrarily high times as long as their product exceeds $\frac{\hbar}{2}$.  I have seen a different relation given below which makes sense of this by turning around the inequality sign and getting rid of the $\Delta$ symbols but I do not see how to derive this properly.  Any help would be appreciated as it's annoying me!  $$ E \, \tau \leq \frac{\hbar}{2} $$ where $\tau$ is the particle's lifetime and $E$ is the particle's actual energy now rather than the uncertainty in the energy.


Can someone please explain the back-propagation algorithm?

What is the back-propagation algorithm and how does it work?


How to map $\{0,1\}^n$ to $\binom{\{1, \cdots, n'\}}{n''}$ nontrivially?

In trying to cook up a toy/reference implementation of a , I've run into the following puzzle: The author requires, to generate a signature, a one-way function $G:M\to \binom{\{1, \cdots, n'\}}{n''}$; that is, to map messages to $n''$-element subsets of the user's $n'$-element key.  The author himself only bothered to propose an awkward partial function based on iterative integer division with few usefulness guarantees  Other implementers have proposed functions that constrain $n'=2n''$ and use each bit of an $n:=n''$-bit digest of the message to select from each pair of elements $(k_{2i-1}, k_{2i})$ of the user's key   However, I'm wondering if there is a bijective function that exists for this (likely imposing a different constraint on the values of $n'$ and $n''$). The author himself "hope[s] that someone can find a more elegant method" for this mapping.  So if there are exactly $\binom{n'}{n''}$ possible signatures that might be produced—which are $n''$-element subsets of an $n'$-element Lamport key—and we assume that $G$ will be constructed from an existing $n$-bit cryptographic hash function $\phi_n$—which will have a range of $\left\{0,1\right\}^n$—I suppose the question of whether any bijective construction of $G$ from $\phi_n$ exists reduces to the question of whether any natural-number solutions to this exist: $$2^n=\binom{n'}{n''}$$ Wolfram Alpha  some trivial, small solutions (such as $(3,8,7)$) but I'm unclear whether solutions to this exist with the following criteria-  at the scale of cryptographic usefulness ($n\sim256$)  nontrivially ($n'-n''>1,n''>1$)   Do any such solutions exist? What are some examples, or a canonical example? (Have I even proposed the right equation?—If not, ditto the above, but for the appropriate equation for the case of constructing $G$ for a Lamport signature.)


\ref gives incorrect figure number in Appendix

The label of my figure is not the same as what is returned by /ref.  My code:  \begin{defi} Let $X$ be a topological space with $x_0 \ X$. A \emph{loop} at $x_0$ is a continous function $f:[0,1] \rightarrow X$ such that $f(0) = x_0 =f(1)$. See Figure \ref{loop}. \begin{figure}[H] \label{loop} \centering \includegraphics{loop} \caption{A loop at the point $x_0$.} \end{figure} \end{defi}   The result:


I read the following definition for , but the many syntactical terms (based on Latin) confound me: accusative and nominative absolute.     a construction in English, especially colloquial English, consisting of a pronoun in the accusative case joined with a predicate that does not include a finite verb and otherwise identical with the nominative absolute (as him being my friend in “him being my friend, I granted his request”)    I first heard this at 54:31 in .


Hyperref warning - Token not allowed in a PDF string

When compiling a beamer presentation and using the following \author command  \author{Name \\ \texttt{my.email@domain.com}}   I get the following hyperref warning in my logfile  Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `\\' on input line 15.   Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): (hyperref)                removing `\new@ifnextchar' on input line 15.   I understand that this has to do with hyperref setting the PDF metadata, where the linebreak does’t make much sense and should be removed.  Trying to set  \hypersetup{pdfauthor={Name}}   does’t change the situation, seems like hyperref is still looking at the author command.  How do I get the desired display of author name with email and still keep hyperref happy?


Null Pointer Exception importing Web elements to Excel

I'm stuck on a Null Pointer Exception problem. The tests are run through JUnit, but I didn't manage to debug properly and find out the reason of it.  Test class  ExcelActions excelActions; Excel_Import excel_import;  @Test public void addResultsToExcel() throws InterruptedException {     searchAfterLogin(); // works fine until the next method     excelActions.addToExcel();  //thats where NPE begins...     excel_import.importExcel(excelActions.addToExcel());  }   Excel Action (Webdriver part)  public class ExcelActions extends BaseAction {  public ExcelActions(WebDriver driver) { super(driver); }  public Map<String, Object[]> addToExcel(){      String beforeXpath_pageName = "//*[@id=\"mw-content-  text\"]/div[3]/ul/li[";     String afterXpath_pageName = "]/div[1]/a";      int rowCount ;     rowCount = 20;     Map<String, Object[]> data = new TreeMap<String, Object[]>();      for(int i = 1; i <= rowCount; i++){          String actualXpath_pageName = beforeXpath_pageName + i +  afterXpath_pageName;         String pageName =  driver.findElement(By.xpath(actualXpath_pageName)).getText();         System.out.println(pageName);          data.put("" + i, new Object[]{pageName});     }     return data; } }   Excel import class  public class Excel_Import extends BaseAction {      public Excel_Import(WebDriver driver) { super(driver); }  public void importExcel(Map<String, Object[]> data) {     XSSFWorkbook workbook = new XSSFWorkbook();      //Create a blank sheet     XSSFSheet sheet = workbook.createSheet("Data");      //Iterate over data and write to sheet     Set<String> keyset = data.keySet();      int rownum = 0;     for (String key : keyset)     {         //create a row of excel sheet         Row row = sheet.createRow(rownum++);          //get object array of particular key         Object[] objArr = data.get(key);          int cellnum = 0;          for (Object obj : objArr)         {             Cell cell = row.createCell(cellnum++);             if (obj instanceof String)             {                 cell.setCellValue((String) obj);             }             else if (obj instanceof Integer)             {                 cell.setCellValue((Integer) obj);             }         }     }     try     {         //Write the workbook in file system         FileOutputStream out = new FileOutputStream(new  File("D:\\Projects\\Cucumber\\src\\main\\resources\\ImportedResults.xlsx"));         workbook.write(out);         out.close();         System.out.println("howtodoinjava_demo.xlsx written successfully on  disk.");     }     catch (Exception e)     {         e.printStackTrace();     } } }   Could you guys have a look at it?


If we have a polynomial in a polynomial ring, are its "roots" only valid if the roots are in the ring itself?  i.e. For $x^2+1 \in \mathbb{C}[x]$ we have roots $i$ and $-i$. But if we consider it as $x^2+1 \in \mathbb{R}[x]$, because $i, -i \notin \mathbb{R}$, do we say that $x^2+1$ has no roots?


Bounding $|f'|$ given a bound for $|f|$ and $|f''|$.

I came across this problem on a Berkeley preliminary exam, and have yet to come up with a solution.     Suppose that $f$ is a twice-differentiable real-valued function on the real line such that $|f(x)| \leq 1$ and $|f''(x)| \leq 1$ for all $x$.  Find, with proof, a constant $b$ s.t. $|f'(x)| < b$ for all $x$.    So, mean value theorem along with the bound on $f''$ tells us that   $$ |f'(x) - f'(y)| \leq |x - y| $$  but I don't see how to proceed from here.  I also tried working with Taylor's theorem, but I didn't get anywhere with that.    Someone told me that given $|f(x)| \leq M$ and $|f''(x)| \leq M'$ then $|f'(x)| \leq \sqrt{M\cdot M'}$, but I've been unable to prove such a result, and my Google abilities have failed me.  Any help is appreciated.


How to deal with a mobile usability issue for a single page in the WordPress uploads directory?

I have just had an email from google console to say “New Mobile Usability issue detected for site “ and below that it says        Viewport not set   Text too small to read   Clickable elements too close together      As I have had the website as it is for several years I assume they have changed their criteria but really not sure what is wrong. Looking further into the console it has an example  and says only one page is affected. And that page is not supposed to be accessible to bots. Really confused. Any help greatly appreciated.  My robots.txt looks like that:  User-agent: *  Disallow: /wp-admin/  Disallow: /wp-includes/  Disallow: /wp-content/plugins/  Disallow: /wp-content/themes/   So, basically, the new search console is pointing out usability errors on mobile devices on wordpress upload pages, that is, pages where I can not change font size, viewport window and things like that, how do I solve it, or what to do with that google does not take those pages into account.


The right way to send int[][] to a function in C?

I'm trying to send a 2D array (int arr[5][5], initialized with numbers) to a function, the prototype of the function is:  int function(int **arr, int size, int *pi, int *pj);   so I type in main():  size=function(arr, 5, &i, &j);   (i and j are not initialized)  I'm getting an error "Access violation reading location" which tells me it can't read from the array, because it isn't pointing anywhere.  The prototype cannot be changed, how can I fix it?


Transit in Heathrow with an Italian student visa

I am an Indian citizen travelling from India to Italy on a student visa via the UK. My flight stops at Heathrow for 2.5 hours. Will I be required to have a transit visa?


A link to a Windows XP Professional Service Pack 3 Disk?

Upon running 'SFC /SCANNOW' I get a message to insert the Windows XP Pro SP3 disk. I had previously never heard of a Windows XP pro Service Pack 3 disk, I though there was only one type of SP3 CD. After some research, I located a service pack 3 disk, so I downloaded it, and tried running the command again. It complained about the CD being for the wrong version of XP. I've searched google for ages trying to find the correct one, to no avail. So, my question is:  Does anyone have a link to download a 'Windows XP Pro SP3' disk, the requirements are:   That it runs offline. That it comes in a .iso file That it is for Windows XP professional   By the way, I've already tried this:    Thanks in advance :)


Where $i$ is the square root of negative one.  And is there a generalization of the $n$th root of $i$? Also how would this look graphically on the real number axis? Thanks


Possible to add a command to be run when a currently running command completes?

When running time consuming processes in terminal, I like to add something like say "done" as an additional command so that I can get alerted when the current process ends. For example:  $ do_this_long_thing; say "done";   Works great. But sometimes I forget the say "done" command, only to realize it once the long command is already running. Is there a way to add that additional command to the queue once a command is already running?


All reopen voted questions on profile are marked as deleted

I just noticed all questions I have voted to reopen on are marked as deleted on my profile (https://stackoverflow.com/users/508666/peehaa?tab=votes&sort=reopen):    But they really aren't deleted.  Example question:


can any one help me out with this two in methods javaScript a is resulting as [0,NaN,0,0,0] and b is resulting as [0,0,0,0,0] why a is having NaN in a array?    var a =new Array(5).fill('0').map(parseInt); console.log(a); var b =new Array(5).fill('0').map(parseFloat); console.log(b);


How to remove multiple indexes from a list at the same time?

Say I have this list here:  list = [a, b, c, d, e, f, g]   How would I delete say indexes 2, 3, 4, and 5 at the same time?  pop doesn't accept multiple values. How else do I do this?


how to call a variable using awk in a for loop?

I am uncertain on how to correctly all a variable in a for loop. I have currently set a variable equal to the total number of lines in a file and want to use it in a for loop that will run a set of code.  I tried the following:  variable=$(awk 'END { print NR }' file)   I want to use this variable in a for loop, here is a simple example:  for i in {1..$variable}; do       print ${i}  done   This doesn't work as I think I have called the variable incorrectly.  Any help would be greatly appreciated. Thank you.


How can black holes have electric charge and spin?

If the star's mass supposedly collapses into a single point, and it ends up having "said" zero volume, then how can people say that the hole has a specific spin or that it can have an angular momentum?  Does it mean that the singularity is somehow still spinning, or maybe the spacetime around it is just being dragged for some reason?


Is there a way of getting map subsections referenced on main map in qgis?

Is there any way of getting subsections of a map as in, you have a larger map area in which you want to take out 3 smaller areas (A, B and C), you reference them on the "main map"  Currently I have people drawing the A, B and C areas on paint but is there a more direct way of doing it?


Problem with \only and alignment of graphics (pdf) in beamer

I have been trying to include pdf graphics in a document with this simple command:  \documentclass{beamer}  \begin{document}  \begin{frame}     \only<1>{\includegraphics[width=\textwidth]{test}}     \only<2>{\includegraphics[width=\textwidth]{test}}     \only<3>{\includegraphics[width=\textwidth]{test}} \end{frame}  \end{document}   Unfortunately, the three pictures (that are supposed to be identical), are not aligned identically (from the top).  Here is the test.pdf used for generating the pdf:   Here is the generated pdf:  (as you can(not?) see), the first and second image are not aligned.    Now if someone knows why it acts like this? Here I put a VME since it seems to me that no package were necessary except for the class Beamer. I have tried with my "usual" packages, maybe I am just missing the right one?  Just so you know, what I was able to do so far: if I put a ~ after {test}, then it gets aligned (note that it will not work on this minimal example, there are some packages missing).  Also something I noticed (because when I first met this probleme I had many more \only), it is always the one before last only that messes up! No matter how many \only, and then the last one will be aligned with the previous one (this is why we need at least three only lines).


Can I recover my wordpress site with mysql files

This morning I woke up to find my xampp throwing all sorts of MySQL errors and saying that MySQL could not start. Essentially I think it's a write off and I will have to start again as I can't access my site and recover all of the data... this is annoying as it is a massive client site which was days from being finished. I have all of the Wordpress files, but the only database files I have are not the SQL file but all of the tables in the folders. Is there any way at all to recover this data? Thanks, Max


Calling a certain function based on a variable

I am trying to call certain functions based on a certain variable. If I have lots of functions based on this variable it quickly gets very ugly with all if statements. My questions is if there is a more elegant and "pythonic" solution than doing something like the code below? if variable == 0:     function_0() elif variable == 1:     function_1() elif variable == 2:     function_2()


What are lattices called that are isomorphic to the open sets of a topology?

What are the bounded lattices $\mathcal{L}=(Q,\lor,\land,\bot,\top)$ called that are isomorphic to topological spaces? I.e. those such that there exists a topological space $(X,\tau)$ and a bijection $f:Q\to\tau$ such that $f(\top)=X$ and $f(\bot)=\emptyset$ with $f(\bigvee_{i\in I}x_i)=\bigcup_{i\in I}f(x_i)$ and  $f(a\land b)=f(a)\cap f(b)$? It would seem the study of these lattices is essentially just the study of point-set topology, thus I imagine they must have a name? What are they called?


This gets the value of whatever is selected in my dropdown menu.  document.getElementById('newSkill').value   I cannot however find out what property to go after for the text that's currently displayed by the drop down menu. I tried "text" then looked at  but that didn't have the answer, does anybody here know?  For those not sure, here's the HTML for a drop down box.  <select name="newSkill" id="newSkill">     <option value="1">A skill</option>     <option value="2">Another skill</option>     <option value="3">Yet another skill</option> </select>


What style features disproportionate figures, bright colours and noisy shadows?

Some examples of what I mean:  From Gmail:   From a video by Cosmin Serban:   From Eurowings in-flight magazine:   Also Eurowings in-flight magazine:   From The Goods by Vox:   Also from Vox:   I have seen designs like this popping up everywhere, but when trying to search for it/tips on how to achieve a similar style, the only label I could find was broadly 'flat design' (or Flat Design 2.0, like in , but which doesn't narrow down on the shapes themselves or the grainy shadows). The style I am looking for specifically includes:   Few colours, but vivid ones, often used abstractly (see the third example: the skin colour is reused on the shoes and roses, and as a detail on the trousers). Also gradients sometimes appear, especially to indicate depth. Grainy/noisy shadows, sometimes looking like a paintbrush stroke (see the details in the fourth example) Disproportionate shapes, usually people with big bodies and small heads (the last example demonstrates this well, although it is not coloured too interestingly). Shapes are (almost) always curved/rounded off: never completely sharp.   I would like to get a name for this style, and I'd be interested in any resources talking about making it yourself. I think it gives off a certain feel that I would really like to replicate, but am unsure how to start, partially because I don't know the name/what to search for.


Partial or entire Image Blurring in TikZ?  I have seen some examples of drop shadow blurring in the pgf-blur package version 1.01 by Martin Giese but this isn’t what I mean.  Is it somehow possible to do partial or entire Image Blurring in TikZ, just like what one may do in Adobe Photoshop?


I was wondering if anyone ever tried to typeset slides with a grid layout, ie. something like (see below the tikz grid showing it).  Expected functionalities:   ability to write text or place image across several columns on the fly (ie. provide kind of start coordinate/ size of frame containing text or image + text aligned on a grid) compatibility with [c] option for frame (or similar) I don't care about the crappy blocks from beamer (less is better) would appreciate to get something in the vein of    Starting point code (but no need to stick to it), where the grey block could be text and the yellow block an image:  \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc}  \setbeamertemplate{headline}{}  \setbeamertemplate{navigation symbols}{}  \usebackgroundtemplate% {%     \begin{tikzpicture}[overlay,remember picture]         \draw[step=.4cm,gray,thin] (current page.south east) grid (current page.north west);         \draw[thick] ($(current page.north west)+(.4cm,-.4cm)$) rectangle ($(current page.north west)+(6cm,-1.6cm)$); % frametitle        \draw[thick] ($(current page.south west)+(0cm,.4cm)$) rectangle (current page.south east); % footer         \draw[thick] ($(current page.south west)+(1cm,.8cm)$) rectangle ($(current page.north west)+(3.4cm,-2.4cm)$);         \draw[thick] ($(current page.south west)+(3.8cm,.8cm)$) rectangle ($(current page.north west)+(6.2cm,-2.4cm)$);         \draw[thick] ($(current page.south west)+(6.6cm,.8cm)$) rectangle ($(current page.north west)+(9cm,-2.4cm)$);         \draw[thick] ($(current page.south east)+(-3.4cm,.8cm)$) rectangle ($(current page.north east)+(-1cm,-2.4cm)$);     \end{tikzpicture} }  \setbeamercolor{footline}{fg=white,bg=black}  \begin{document}  \begin{frame} \begin{tikzpicture}[overlay,remember picture]     \fill[yellow] ($(current page.center)+(.2,1.6cm)$) rectangle ($(current page.east)+(-1cm,-1.6cm)$);     \fill[gray] ($(current page.center)+(-.2,2.4cm)$) rectangle ($(current page.west)+(1cm,-2.4cm)$); \end{tikzpicture} \end{frame}  \end{document}     Note: if a ConTeXt solution is much convenient to use (less code to type), please feel free to share.


How can I increase my heavy armour quickly?

I'm a level 80 mage whom wears heavy armour but it is slowing my character down too much. I've got the  heavy armour skill to 35 and need to increase it so I can get the perk that makes the armour weigh nothing.   How can I speed up leveling this skill?


While this may seem like a simple question, I have found it very difficult to answer.  My question is     "Why is the area of a rectangle given as $l\times h$?"   We define area as the "size of a two dimensional surface".  I can show with calculus and some geometry that a rectangle with some height $h$ and length $l$, the area of that rectangle is  $$\int_0^lhdx=l\times h$$  But I feel this is circular because we can't really define an integral until we know the area of a rectangle as being $l\times h$.  Using other geometric shapes is also circular because many of them come from either the area of a rectangle or the area of a triangle, which the area of triangle comes from the area of a rectangle!  Perhaps this could be one of those axioms or definitions, it could very well be the definition of area, but if not, could someone show, mathematically or in a proof that the area of a rectangle is given as $l\times h$?


Why do you need to show A(1) before proving A(n) by induction?

My instructor stated that in order to have a valid proof by mathematical induction, you first have to show A(1) holds, and then assume A(n) to deduce A(n+2). Why is the first step necessary if we are going to assume A(n) though?   I get that showing A(1) is true suggests that A(n) might be, but that could very easily not be the case. Perhaps A(3) does not hold. So why logical benefit do we gain by proving A(1) before completing a more general proof by induction?


Distinguishing the meaning and uses of effect size vs relative feature importance

I am interested in clarifying the distinctions between the two terms in the title to this query, the problem being that they can and have been used interchangeably in the literature. Links to similar CV questions give a clear meaning to relative importance as a within model metric summarizing the magnitude or impact of a feature; this is distinct from but relatable to the statistical significance of that parameter. Also of note is the apparent fact that relative importance can be readily estimated within the context of statistical models but much less so, if at all, wrt many black box machine learning algorithms (NNs, RFs, xgboost, etc.). Effect size can be used, on the one hand, wrt "the magnitude of the differences between groups" (); as well as, on the other, for determining optimal sample sizes as a function of the magnitude of a desired effect () If there are additional uses for effect size, I'm interested in learning about them. Ok, so both concepts evaluate the magnitude of something but effect size has wider meaning and uses than relative importance. What is a precise definition of effect size?