Find the maximum value of $a^2b^3$ where $a,b$ are positive real numbers satisfying $a+b=10$

Find the greatest value of $a^2b^3$ where $a,b$ are positive real numbers satisfying $a+b=10$.Determine the values of $a,b$ for which the greatest value is attained.   It is my question.I continuously tried to use weighted A.M-G.M. inequality, but unfortunately I found no way.I don't think it can be done using Tchebycheff's inequality or Cauchy-Schwartz's theorem. Please give me any hint for doing that.I also failed to solve another similar problem (but reversed. "Find $\min(3x+2y)$, where $x^2y^3$=48). If possible then please give me hint in that also. Thank you.


Proof of Edmund Landau's Foundation of Analysis

The theorem is as following:    The proof was split into two parts, namely: Uniqueness and Existence, I have hard time understanding the existence part:     Namely: in the 10-12th line, what did Edmund Landau mean by saying : "$Then\; the\; number\;  x'+y=(x+y)' \;is\; the\; required\; number\; for\; x'$" Isn't this similar to what we are trying to prove? namely: $x+y'=(x+y)'$ Did he assumed it? If so, why are we allowed to that? (why don't we just assumed Theorem 4 right away, if this was the case) Thanks!


Show that for a $2\times 2$ matrix $A^2=0$

Assuming that given a $2\times2$ matrix $A$ with the property $A^3=0$ show that $A^2=0$.  Okay so this question is messing with me. When it says $A^3=0$ do you think it means the determinant? How would one approach this? Any help would be much appreciated


Did Einstein introduce anything new to mathematics?

Newton introduced calculus, so I am wondering, did Einstein introduce anything important to mathematics?


How to search for an answer I voted for?

I voted for an answer, but forgot to mark that question as a favorite.  I don't remember:   the user who asked the question the user who answered the question the question's title   The only thing I remember is that I voted the accepted answer.  How can I find it again?


Prove that $F$ is locally constant iff the associated étale space over $X$ is a covering.

This is Exercise II.5 of Mac Lane and Moerdijk's, "Sheaves in Geometry and Logic [. . .]". According to , it is new to MSE. The Details: On p. 66, ibid. . . .  Definition 1: A sheaf of sets $F$ on a topological space $X$ is a functor $F:\mathcal{O}(X)^{{\rm op}}\to\mathbf{Sets}$ such that each open covering $U=\bigcup_iU_i, i\in I$, of open subsets of $U$ of $X$ yields an equaliser diagram $$ FU\stackrel{e}{\dashrightarrow}\prod_{i\in I}FU_i\overset{p}{\underset{q}{\rightrightarrows}}\prod_{i,j\in I}(U_i\cap U_j),$$ where for $t\in FU,$ $e(t)=\{ t\rvert_{U_i}\mid i\in I\}$ and for a family $t_i\in FU_i$, $$p\{ t_i\}=\{t_i\rvert_{(U_i\cap U_j)}\}\quad\text{ and }\quad q\{ t_i\}=\{t_j\rvert_{(U_i\cap U_j)}\}.$$  From p. 79, ibid. . . .  For any space $X$, a continuous map $p: Y\to X$ is called a space over $X$ or a bundle over $X$.${}^\dagger$  From p. 82, ibid. . . .  Definition 4: A covering map $p: \stackrel{\sim}{X} \to X$ is a continuous map between topological spaces such that each $x\in X$ has an open neighborhood $U$, with $x\in U \subset X$, for which $p^{-1}U$ is a disjoint union of open sets $U_i$, each of which is mapped  onto $U$ by $p$.  On p. 88 ibid. . . .  A bundle $p: E \to X$ is said to be étale (or étale over $X$) when $p$ is a local homeomorphism in the following sense: To each $e\in E$ there is an open set $V$, with $e\in V\subset E$, such that $pV$ is open in $X$ and $p\rvert_V$ is a homeomorphism $V\to pV.$  From the exercise . . .  Definition: A sheaf $F$ on a  space $X$ is locally constant if each point $x\in X$ has a basis of open neighborhoods $\mathcal{N}_x$ such that whenever $U, V \in\mathcal{N}_x$ with $U\subset V$, the restriction $FV\to FU$ is a bijection.  The Question:  Consider a sheaf $F$ on a locally connected space $X$. Prove that $F$ is locally constant iff the associated${}^{\dagger\dagger}$ étale space over $X$ is a covering.  Thoughts: $(\Rightarrow)$ Let $F$ be a sheaf on a locally connected space $X$. Suppose, further, that $F$ is locally constant. Let $x\in X$. Then there is a basis $\mathcal{N}_x$ such that, for any $U, V\in\mathcal{N}_x$ with $U\subset V$, the restriction $FU\to FV$ is a bijection. What do I do now? Looking at the definition of a sheaf, I find myself a little lost here. $(\Leftarrow)$ I'm completely lost here. I'm not sure I understand the definition of an étale space. Further Context: Related questions of mine include the following.       Please help :)  $\dagger$: I'm assuming $Y$ is also a topological space. Am I right? $\dagger\dagger$: I'm assuming this is the associated bundle as described on page 82, ibid, that, by hypothesis of the question, happens to be étale.


What would reduce the render time? Should I get a better GPU or more RAM?


What's a simple experiment to perform, near the equator, to show the rotation of the earth?

Since Foucaults pendulum works poorly or not at all near the equator, what other simple experiment could be performed to demonstrate the rotation of the earth?


Do entangled particles really exchange information?

Is it possible that entangled particles don't exchange information at all, e.g. maybe something happened at the moment they were split that made them opposite?


links to external commercial sites, redirect links (for monetization)

I added an Amazon book link to a comment and it got transformed to: http://rads.stackoverflow.com/amzn/click/0131177052  This performs a redirection to Amazon. If somebody clicks on it, do you get click-money from Amazon partnership for it? If so, good idea to monetize the users input!


How should I interpret a non significant intercept in a GARCH model?

I am currently building a model based on a GARCH process. You can find a quick description of how the variance is modelled below.   $\sigma_t^2 = \alpha_0 + \sum\limits_{i=1}^{n} \alpha_i \epsilon_{t-1}^2$, $\epsilon_t = \sigma_t z_t$ where $z_t$ is a white noise process  Requirements are that $\alpha_0 >0, \alpha_i \geq 0,i>0$.  The current results show a confidence interval where the lower bound is negative and the upperbound is positive. How should I interpret this lower bound given the requirements for the variance process? Should one prefer a model with a higher BiC score over this model, that is, is it problematic that the confidence interval contains zero? Note that I do not want to simply remove this intercept from the model but that I want to know its implications on the requirement that the intercept should be larger than 0.


I got green ghost-like lights.    Where do they come from?  How could I avoid them while shooting? How can I remove it in post processing?   I tried using Lightroom chromatic aberration correction feature but it didn't help. Actually, I think this is not chromatic aberration, because this aberration always seemed to appear on the borders of highly contrasting objects (dark fly on white background).  I shot this with Canon EOS 1000D and Canon 50mm f/1.4 lens at ISO 1600 and f/5.6.


Show that continuous function from omega_1 to R is eventually constant

Let $f: \omega_1 \to \mathbb{R}$ be a contionuous function. Prove that $f$ is eventually constant.  I was trying to prove it by contradiction but I did not have any idea.


How to determine the last "x" used in curve() in R

Although, one must always themselves determine the range of x when using curve() in R, I was wondering how I could get the last x used (i.e., to =) after a curve() is executed in R?  For example, if I save a curve() as an object called cc, I can get the first x (i.e., from =) from the curve() using:   cc$x[1] (see below). But how can I get the last x used in this curve()?  As an example ]  cc = curve(dchisq(6, df = 3, ncp = x ), from = 0, to = 10, col = 'red')  First.x.used.in.curve = cc$x[1]  Last.x.used.in.curve = ?     ## How can I find this?


The meaning of the term "lies" above the x-axis

On my math quiz there was an equation that produced a polynomial that starts positive, crosses the x axis at negative 3, and then stays negative. There was a true or false question that asked if the graph lies above the x-axis when x < -1. I knew that the graph was negative after -3 but before the intercept the graph was positive so therefore in my thinking the graph did lie above the x-axis making me say true. She claims it was false an is unwilling to negotiate. Who is right?   This is a link to a picture of the quiz


Why 1 sunbeam for each aperture blade in your lens?

I don't understand the embolded phrase . I'm unschooled at physics and photography.  Starburst and Sunstar Effects Starbursts, also called sunstars, are beautiful elements that you’ll find in certain photographs. Despite the odd names – one, a type of candy; the other, a type of starfish – I always try to capture them in my landscape photos. Here’s an example:  The sunbeams in this photo are purely a result of my aperture (in this case, f/16). How does this work? Essentially, for every aperture blade in your lens, you’ll end up with a sunbeam. This only happens if you photograph a small, bright point of light, such as the sun when it is partly blocked. This is fairly common in landscape photography. If you want the strongest possible starburst, use a small aperture. When the sun is in my photo, I typically set f/16 purely to capture this effect.   Also, the starburst effect looks different from lens to lens. It all depends upon your aperture blades. If your lens has six aperture blades, you’ll get six sunbeams. If your lens has eight aperture blades, you’ll get eight sunbeams. And, if your lens has nine aperture blades, you’ll get eighteen sunbeams. Wait, what? That’s no typo. For lenses with an odd number of aperture blades, you’ll get twice as many sunbeams. Why is that? It sounds strange, but the reason is actually quite simple. In lenses with an even number of aperture blades (and a fully symmetrical design), half of the sunbeams will overlap the other half. So, you don’t see all of them in your final photo. Here’s a diagram to show what I mean:  When you have an even number of aperture blades, the sunbeams will overlap. Most Nikon lenses have seven or nine aperture blades, resulting in 14 and 18 sunbeams respectively. Most Canon lenses have eight aperture blades, resulting in eight sunbeams. I took the photo above using the  lens, which has 7 aperture blades. That’s why the image has 14 sunbeams.


Repeating "to" and "will" in enumerations of verbs

Should I use the second "will" in constructions like this one: "it will definitely help you and will make the text more readable"  And should I write "to" before every infinitive in enumeration, or only before the first one, e.g. "it helps to develop and test" or "it helps to develop and to test"? Could this example be influenced by the fact that "help" can go with to-invinitive and bare infinitive, and with other verbs the rule would be different?


I have Drupal module with a form and it works just fine (/my_module/search) I need menu hook for my_module/search/% and to be auto submitted and repopulate the form with the argument form url. So basically I need the same form just with the argument form URL submitted.


Export GeoJSON to MSSQL with UTF-8 encoding

I'm testing this command to migrate GeoJSON data to MSSQL table:  ogr2ogr -f MSSQLSpatial "MSSQL:server=.\SQLEXPRESS;database=geodb;trusted_connection=yes" test.json -nln test  It works beautifully, but if json data contains other characters then ASCII I get garbage in MSSQL table for that field:    Json file is UTF-8 encoded without BOM header.  I tried appending -lco ENCODING=UTF-8 parameter to ogr2ogr command, but that didn't help.  So I wonder if anyone knows how to set sqlserver and ogr2ogr to communicate Unicode?


Relations of numbers or geometric distances.

Does there exist a real number $r$ such that $\pi^r$ is a rational number? Clearly, $(\sqrt{2})^2=2$ etc. Is there any real number such that my question is true?


What is difference between End process and End process tree options in task manager? Is it the similar behavior?


What is the difference between $-1^2$ and $(-1)^2$?

Intuitively, I though that $-1^2$ and $(-1)^2$ were exactly the same thing; however, it seems I was wrong as Wolfram Alpha (and any other calculator) returns $-1$ for the first case and $+1$ for the second one.  What is the difference between the two?


I am in my first semester of college learning Java. This will be probably a pretty basic loop for you all but I am truly stuck. Now please I am taking suggestions/help but I do not want this code completed for me. I want to learn this code. Thank you!  Context: Write a routine that will read words from the keyboard until the word “done” is entered. For each word except “done”, report only if its first character is equal to its last character.    MY WHILE Loop Code:  while (word != "done") // Test Phase  {     if (word != "done")    {      System.out.println("End While Loop Version");      break;    }    else    {      System.out.println("Next Word: " + word);      System.out.println("Char " + first + " appears at the start and end of " + word);    }     count++;  }   Now I know the break; is messing up my console output. But I do not know how else to stop the program OR move onto the else condition. I also have to use a simple While Loop. (I have to do all 3. Done with for.)


I was having a discussion with a friend who proposed the question of "who has killed the most people, directly or indirectly?".  She argued that it would be Karl Benz (inventor of the motor vehicle) due to all proceeding designs stemming off of his and the frequency of motor vehicle caused death.  I instead suggested it would be whoever had invented the first practical firearm. She then stated that wouldn't count because you could then go further back and state it would be whoever invented the first weapon in general, to which I claimed by that logic her answer would be invalid since you could state the inventor of the wheel. This was reduced down by her to "the first humans whom we are descended from" since we cant die without being born first.   Clearly this is ridiculous but it made me think if it was covered by an existing fallacy, feels very slippery slope like but I'm not wholly sure.  Any ideas?


How to activate a gnome terminal profile from the commandline?

I have set up several color profiles (e.g. some from ) whose UUIDs I can now list with $ dconf list /org/gnome/terminal/legacy/profiles:/ :7e95bbb3-a584-469d-8ae1-75a08287f55a/ :b79f95fc-b8a9-40b8-beca-5a1c1aee078a/ :833171c4-5fa6-4038-af36-e667ab2d876b/ :611439c9-b5cb-4b3f-9166-50897a705e29/ :5e0814a6-5f24-4823-9f54-d4accb9d9d92/ :403d9eb7-16d5-46be-864f-42d9651dda49/ :7bad96ca-3efc-40d0-9a8d-9e0c5d67738e/ :b0ac22f9-3c3a-42b5-ab5d-542d8465f2a0/ list :4f99e9d3-caa3-4e88-8bc5-a1b6efe0b1ff/ :efbf6322-e497-4918-88e1-b44167d306fc/ :cb2c2176-2a0e-4e8b-83a9-ff2d9c456cb9/ :5ec02300-aa59-4bda-b33c-0e992f8adefb/ :de0d4915-5db9-4d58-a24a-7b7054ccfae1/ :7c6e6069-0dfb-48a9-bc3b-b4b2f486061e/ :484cd255-71a8-4655-b0cf-98b3f2e58abb/ default :3bfaf350-2cf3-4f87-8ef9-cdadfc5f46bf/ :9e62c391-a298-419a-a0a5-32ad8adf0015/ :cc854d98-9559-4eed-9014-8e622bb8dbcb/ :e6f55cc9-a78e-4727-91f3-0d0623c258ea/ :b358abc2-c1ba-4968-9da9-95e3becf2cda/ :8e8a102d-ac00-47ff-a05c-dc2208b6643e/ :7b44f31c-f78e-4308-87e6-87a77279c2b6/ :893a4288-62ab-4431-bca6-68b5928aa7d9/ :2433ec9b-ab41-4f90-9268-36fd5b3c8c9c/ :34e6a4c0-72ee-4f11-820a-f3b8fdeb6b05/ :03707c06-6c4e-46db-acf0-d97ff2d791fe/ :a6716d99-075e-4001-8030-919ee772b3c6/ :009bf635-944a-4de6-8b6f-52ccc190b2e9/ :d11a727f-bd8e-4b35-91c3-beaadf4fd445/ :ce9edba1-cf35-4d4a-9a2f-6423af523c1a/  I would like to set each new terminal window to any (random or round-robin) profile. This, I assume, I could do with a command in ~/.bashrc. For that, I require one piece of knowledge: How can I change the currently active profile from the command line? I know I could manually set it with right click > Profiles > myprofile. I also know I can start a new terminal window with the desired profile using $ gnome-terminal --profile='7e95bbb3-a584-469d-8ae1-75a08287f55a'


How to git revert the changes of one specific file, while my commits changes are involving other files as well?

Case Scenario   Let's assume that I have 3 files:   Dir/      a.py      b.py      c.py   and I have 10 commits, each one of which is involving changes to ALL of those three files.      For example commit with hash code ABCD is changing 3 lines from a, 10 lines from b and 1 line from c. Same stands for the rest for the commits.   At that point I am realizing that ALL the changes have been made in file a.py are useless.    How can I revert ALL the changes of file a.py WITHOUT reverting my changes in the other two files?  And what is the best practice to approach this kind of scenarios?


Please, set some unrestrictive Access-Control-Allow-Origin headers

I was working on a userscript today, which had a goal of displaying chat pings immediately at the main site. This would allow me to respond more quicker-like to chat pings.  However, I was met by this fearsome warrior:     Can we please set some decent header things? I want to be able to do this really bad.


What is the purpose of capacitors parallel to crystal?

In many schematics, we have two capacitors connected in parallel to a crystal? Why do we have capacitors parallel to crystal? Whats the purpose? How are the capacitor values determined ?


Convert custom DateTime string to DateTime object

I am trying to create a DateTime from a custom string however I am getting the error:      String was not recognized as a valid DateTime.   DateTime date = DateTime.ParseExact("Thu Feb 23 23:36:01 EST 2017", "ddd MMM dd hh:mm:ss K yyyy", CultureInfo.InvariantCulture);   Any suggestions on where I am going wrong?


Prove that if $f$ is a differentiable function and $f'(x)$ is monotone, then $f'(x)$ is continuous.   my work:  If $f'(x)$ is monotone, then it can only have jump discontinuities. If in addition to this the range of $f'(x)$ is an interval, then it is continuous. We may assume WLOG that $f'(x)$ is monotone increasing. Since $f$ is differentiable, if $f'(a)<L<f'(b),$ for some $a,b,L\in\mathbb{R},$ then $\exists c (a<c<b\wedge f'(c)=L).$ Let $x_0\in\mathbb{R}.$ Pick $a\in\mathbb{R}$ such that $a<x.$ Then $f'(a)<f'(x_0).$ Thus, by the least upper bound principle, $f'$ has a supremum, say $L.$ Let $\epsilon >0.$ We know that $L-\epsilon$ is not a supremum of $f',$ so by definition, $\exists x_1\in (a,x_0)$ such that $f'(x_1)>L-\epsilon.$ Since $f'$ is monotone increasing, we have $L-\epsilon<f'(x_1)<f'(x) \leq L$ for $x_1,x\in (a,x_0), x_1<x.$ Then $L-f'(x)< L-(L-\epsilon) = \epsilon.$ Thus, $|L-f'(x)|<\epsilon,$ so $\lim\limits_{x\to x_0^-} f'(x) = f'(x_0).$ Similarly, using $\inf f'$ instead of $\sup f'$ and choosing another interval $(x_0,b),$ we can show that $\lim\limits_{x\to x_0^+}f'(x)=f'(x_0).$ Thus, $f'(x)$ is continuous on $x_0,$ so it is continuous.  However, can I even guarantee the existence of $a$ and $b$ using the fact that $f'(x)$ only has jump discontinuities?  I suppose I could use another approach involving the Darboux Theorem.


Let G be a cyclic group of order 15. Why must G contain at least 2 elements of order 3?  Is it to do with Cauchy's theorem? Then once we know that it has one, the inverse of this element has order 3 as well?


Is it correct to say: the cat and the mouse are puppets played by Bobby.?

I don't know if this is correct because "are" is present tense and "played" is past tense.


How do I get split screen apps to both stay active

I am trying to run 2 apps in split screen with both staying active at the same time. Most results on google are saying this is not possible and they blame the app for it not working. Below is some detailed testing I have done.  This is an android issue/setting, not an app issue. The reason I know this is because I have 2 phones both using split screen. One can/will/does keep both apps active at the same time while one pauses whichever one is not in focus. The apps are identical across both phones.   Apps for testing: Pokemon Go (Pogo) + Jurassic World Alive (JWA) (both AR games that use GPS and real time location constantly). Phones for testing: Moto X4 and Xiaomi Redmi 5 Plus (I have previously tested on the Axon 7 and the Nexus 4-5-6, both behave the same as the Moto X4 currently does). Android versions: Redmi5 - Android 7.1.2 (MIUI 9.6.2.0) | Moto X4 - Android 8.1.0    One item of note: On the Moto I had to enable developer mode and turn on 'Force activities to be resizable' before either app could be put into split screen. On the Redmi5 this was not needed as it was already enabled. Test method: Open Pogo normally. Use the 'intents' (app switch) button and at top click the section titled "split screen" (both phones have slightly diff wording here). Drag Pogo up there and it takes up the top half of the screen. In the bottom section, select previously running JWA (or start it from home screen) and it will take up the bottom section of the screen. Wanted outcome (Redmi 5 Plus): Top portion continues without pausing and bottom game loads and works without pausing. Both apps continue to run as if they were running in full screen and were active  Unwanted outcome (Moto X4/Axon7/Nexus(4|5|6): Top app freezes or pauses when you load the bottom app. To unpause it, click on it, but this pauses the bottom app. Whichever app was last clicked on is active.   Since the apps I am using to test are identical across 3 of the phones I am testing (never tested JWA on the nexus phones) this cannot simply be an issue with the apps not supporting it. There has to be some setting that Xiaomi or MIUI enabled to allow this to work.  Another note, I am not trying to get only these 2 apps working, but these are 2 I would like to have working and made for good test apps due to how they run.  I realize my ask here may be unclear. I want to know how to duplicate the functionality from the Redmi 5 Plus on my other devices (Moto X4, etc).  'Duplicate' edit: I do not feel like the question listed as duplicate answers mine other than "you cant", but obviously MIUI or Xiaomi did. Also that answer seems to point to some side effects I should be experiencing on my Redmi that I am not (apps not pausing when minimized/unfocused).


What is a good oob score for random forests with sklearn, three-class classification?

I have learning data consisting of ~45k samples, each has 21 features. I am trying to train a random forest classifier on this data, which is labelled to 3 classes (-1, 0 and 1). The classes are more or less equal in their sizes.  My random forest classifier model is using gini as its split quality criterion, the number of trees is 10, and I have not limited the depth of a tree.  Most of the features have shown negligible importance - the mean is about 5%, a third of them is of importance 0, a third of them is of importance above the mean.  However, perhaps the most striking fact is the oob (out-of-bag) score: a bit less than 1%. It made me think the model fails, and indeed, testing the model on a new independent set of size ~40k, I got score of 63% (sounds good so far), but a deeper inspection of the confusion matrix have shown me that the model only succeeds for class 0, and fails in about 50% of the cases when it comes to decide between 1 and -1.  Python's output attached:  array([[ 7732,   185,  6259],        [  390, 11506,   256],        [ 7442,   161,  6378]])   This is naturally because the 0 class has special properties which makes it much easier to predict. However, is it true that the oob score I've found is already a sign that the model is not good? What is a good oob score for random forests? Is there some law-of-thumb which helps determining whether a model is "good", using the oob score alone, or in combination with some other results of the model?    Edit: after removing bad data (about third of the data), the labels were more or less 2% for 0 and 49% for each of -1/+1. The oob score was 0.011 and the score on the test data was 0.49, with confusion matrix hardly biased towards class 1 (about 3/4 of the predictions).


How to add "New Document" option to desktop context-menu?

I want to create any new document templates in desktop area not only in folders. When we add our templates to Templates folder in Ubuntu 20.04 it adds automatically "New Document" option to folders context-menu? But not to desktop! Can't find solutions or extensions. How can I do this? With terminal or any extensions? Thank you.


How do I create a folder in VB if it doesn't exist?

I wrote myself a little downloading application so that I could easily grab a set of files from my server and put them all onto a new pc with  a clean install of Windows, without actually going on the net.  Unfortunately I'm having problems creating the folder I want to put them in and am unsure how to go about it.  I want my program to download the apps to program files\any name here\  So basically I need a function that checks if a folder exists, and if it doesn't it creates it.


For intentional reasons, certain units in the game I'm currently programming don't have any collision detection and response among each other.   This enables them to clutter right on top of each other. This is a wanted behavior, since there will be situations in the game when the player does want them to stack like that.  However, I want to make the process of uncluttering them easy for the player, so that they just have to press a hotkey or click some button on the screen and have the units disperse just enough so it's easy to select a group of them with the mouse (if they stand on top of each other one mouseclick selects all units).  How could I do this without running a brute force N^2 nearest neighbor search on all units?


US citizen traveling in Mexico on a domestic flight

Does a US citizen traveling by plane in Mexico (international flight), for example from Mexicali to Mexico City need to have a passport?


So in quantum mechanics, most of the people uses exponential equation to handle the problem and present the relationship. Another word, we often handle the classical wave function in trigonometric way by utilizing sine and cosine. How can these two be correlated?  Using Euler's formula the exponential equation will finally result in an excess imaginary term of $i\sin(kx-\omega t)$. What is the formal process to deal with this?


In normal line integration, from what I understand, you are measuring the area underneath $f(x,y)$ along a curve in the $x\text{-}y$ plane from point $a$ to point $b$.  But what is being measured with complex line integration, when you go from a point $z_1$ to a point $z_2$ in the complex plane?  With regular line integration I can see $f(x,y)$ maps $(x,y)$ to a point on the $z$ axis directly above above/below $(x,y)$.  But in the complex case, when you map from the domain $Z$ to the image $W$, you are mapping from $\mathbb{R^2}$ to $\mathbb{R^2}$ ...it is not mapping a point to 'directly above/below'...so I don't have any intuition of what is happening with complex line integration.


Getting Instrumentation run failed due to 'java.lang.NullPointerException'

I am trying to write Unit test cases for Activities in my app by extending the test class with ActivityUnitTestCase. I could successfully run the test cases earlier but now I'm always getting the exception while running them. Even though I'm pretty familiar with handling NullPointerExceptions, I couldn't figure out the problem that's causing this. I couldn't find any similar questions so I'm posting this one.   Stack trace shows me there is a null object reference at this line in my code  activity = startActivity(mIntent, null, null);   But the startActivity method is supposed to get the instance of the activity I'm testing. I'm not sure why it's returning null.   Here is the Stack trace.  java.lang.NullPointerException: Attempt to write to field 'android.os.IBinder android.app.ActivityThread.mLastIntendedActivityToken' on a null object reference at android.app.Activity.performCreate(Activity.java:6372) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.support.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:346) at android.test.ActivityUnitTestCase.startActivity(ActivityUnitTestCase.java:158) at com.abc.test.MainActivityTest.access$100(MainActivityTest.java:16) at com.abc.test.MainActivityTest$1.run(MainActivityTest.java:34) at android.app.Instrumentation$SyncRunnable.run(Instrumentation.java:1891) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6117) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)  Test running failed: Instrumentation run failed due to 'java.lang.NullPointerException'   Here is the Test class  public class MainActivityTest extends ActivityUnitTestCase<MainActivity>{      private Intent mIntent;     private MainActivity activity;      public MainActivityTest() {         super(MainActivity.class);     }      @Override     protected void setUp() throws Exception {         super.setUp();         //Create an intent to launch target Activity as it is not automatically started by Android Instrumentation         mIntent = new Intent(getInstrumentation().getContext(), MainActivity.class);         //Start the activity under test in isolation, in the main thread to avoid assertion error.         getInstrumentation().runOnMainSync(new Runnable() {             @Override             public void run() {                 activity = startActivity(mIntent, null, null);             }         });     }      @Override     protected void tearDown() throws Exception {         super.tearDown();     }      /**      * Tests the preconditions of this test fixture.      */     @SmallTest     public void testPreconditions() {         assertNotNull("MainActivity is null", getActivity());     }      @MediumTest     public void testSecondActivityWasLaunchedWithIntent() {         // Get the intent for the next started activity         final Intent launchIntent = getStartedActivityIntent();         //Verify the intent was not null.         assertNotNull("Intent was null", launchIntent);         //Verify that LaunchActivity was finished         assertTrue(isFinishCalled());     } }


Presenting your UX design on the portfolio is more than just showing off some screenshots of the wireframe or finished graphics. I am just wondering what your thoughts are on the ideal way to display your UX work on a web portfolio.   At the moment I am thinking about a combination of slideshow with sufficient amount of text to showcase the interface along with the thought process behind key design decisions.   Is this a good idea, or is there a better alternative approach?


Taking an Emotional Support dog on an overnight trip to Hawaii

I have a tiny budget for a mini-vacation this year in December. I would like to arrive in Honolulu HNL at around 7 AM on Day 1 and fly back around 11pm on Day 2. Basically ~40 hours in Hawaii.  I fly globally with my  Emotional Support Animal - a well-behaved 20 lb corgi mix. We live in California.    I'm confused at the process of Hawaii for a dog to arrive there. There seems to be a 5 day quarantine process? My dog is up to date with all shots. She has had two sets of rabies shots already. (Once Nov 2017. Oct 2018 were her latest shots) Is there a minimum quarantine no matter what?  My dog has not been left alone in a cage since we rescued her at around 7 weeks old - she is now almost 2 years old. I don't want to subject her to quarantine. Anyway, I will not be there for 5 days, so the 5 day process wouldn't work.    Is there no way to bring a dog to Hawaii on a short trip?   --  Update on why it's a short trip: I grabbed a roundtrip fare that's ridiculously cheap. It is cheap enough to justify the trip - a flight somewhere closer would actually cost more.   Clarification: The cage is regarding the quarantine ("Airport Animal Quarantine Holding Facility") and not about crate training. My dog is actually human-level potty trained, or bathroom trained - i.e., she knows how to tell me to go out to potty, or worst case, she'd literally use the toilet in the bathroom (she doesn't like it since the balance is hard and she's fallen in the loo before...)


What is the difference between DX format and FX format lenses, and which to choose for what purpose?  What are the pros and cons of both?


Can post-selecting on the screen in the Delayed Choice Quantum Eraser experiment be used to predict the quantum-eraser measurement results?

I'm curious about QM and spent the last 3 days thinking about Delayed Choice Quantum Eraser (DCQE) experiment, but I couldn't solve this issue:   Assume we do the DCQE experiment so that for the whole experiment (let's say, 1000 particles) finishes before the first particle reaches the detectors 1-4 (using the notation from ). Assume also we're using a switch to control if the idler particle goes to which-way-detector or to the eraser.  shows what we should see in D0, even though we don't know yet R01-04 Now, knowing D0, use the switch to send the 100 particles that reached the most-left side of D0 to the eraser detectors (D1 and D2). It seems much more likely that they reach D2 than D1, because it's on peak on D2 (and on rest on D1) even though it's going through a half-silvered mirror. This looks like a contradiction to me.   So, am I missing something or QM is just that weird?


Can sock puppets be used to curate more content?

From a single account, one is rate-limited in how many votes can be cast per day (depending on privilege level for some vote types). Similarly, there is a rate-limit on how many reviews can be performed in the review queues. An active curator may have the time, energy, and inclination to review enough posts that they run into these rate-limits somewhat regularly. While creating a sock puppet account for the purposes of voting on one's own content is strictly prohibited, it's not clear to me whether it's prohibited to create a sock puppet to get around these rate-limits on voting for the purposes of curation. I understand that the sock puppet can't vote on the same posts as the primary account, but this could be ensured manually, or with a userscript. Also, the sock puppet would need to reach around 3k, without any help from the primary account, in order to cast close/reopen votes, but this could reasonably be achieved in 6 to 8 weeks. It seems ok to me, but it is technically doing something that is not possible from a single account (and is the point, in fact), so I'm not sure if there's something that I'm missing here that makes this a problem. Reading through  this case is neither mentioned in the list of things that are allowed, nor in the list of things that are disallowed. Of course, neither of those lists are meant to be exhaustive. So, is it acceptable to create a sock puppet for the purposes of increasing the amount of curation one can do?


What is the purpose of cylinder "second power bricks" on cords?

I have noticed a large number of power cords that have a PSU built into them also have a second brick on them. What is the purpose of this "second power brick"?  Example, Xbox 360 Power Adapter:      I dug through my old electronics and found other devices that have the cylinder  add on, as well as an USB type A to Micro USB adapter that also had the cylinder. This suggests that the cylinder might not be exclusive to AC to DC power adapters.  USB type A to Micro USB adapter:


Okay so i decided earlier today to try out ubuntu, i didnt want to get rid of windows as i still have games i want to play so i decided to dual boot. I made a LiveCD from a thumb drive and instaleed ubuntu on my harddrive. I had shrunk the windows partition to make space for ubuntu. I finished installing ubuntu and it works beautifully and i really like it. When i tried a while ago to start up windows 7 through the GRUB, it says the following BOOTMCR image is corrupt. The system cannot boot. I honestly have no idea what to do, any help would be appreciated.


Packaging a bike for flying with a bike bag

I am doing a cycle tour of Japan starting from Fukuoka and ending in Tokyo. I will be flying with the bike and as my start and end points differ I will not have the opportunity to use a box (unless anyone has any ideas?). I will most likely use one of  bags and I have been told by the airline that nothing is necessary by way of packing the bike but I would naturally like to see my bike in one piece at the other end. The bike is a Specialized Tricross with disc brakes. Does anyone have any pointers as to the safest way to package something like this. I think I will definitely take the rear dérailleur off and wrap bubble wrap along the length of the bike to protect the wheels, pedals etc but other than that I'm not sure what lengths to go to. Does anybody have any experience or ideas?


OpenSSL: --keyout option: create .key or .key.pem files?

The tutorial I'm following to create and sign certificates bounces between creating .key and .key.pem files with the -keyout option.  For example: master-ca.key.pem and openvpn-ica.key and again vpn-server.key.pem.  Does it matter and is there a standard?


Cars park randomly next to a sidewalk of length 100. Each car is length 1. How many cars will fit on average?

I'm looking for a mathematical solution to this problem, not an answer through a simulation.  Clarification of the problem: $x$ is a random number (not only integers) uniformly distributed between $0$ and $99$ (the maximum is $99$ because parking between $99.1$ and $100.1$ is impossible). $\operatorname{car}_1$ takes the space between $x$ and $x+1$. $\operatorname{car}_2$ comes and parks at a random spot between $0$ and $x$ or at a spot between $x+1$ and $99$, uniformly distributed among available locations. This goes on until all the parking spaces left are smaller than $1$.  On average, how many cars will fit?


backgroundImage is null instead of Image

I'm relatively new to Java programming and here is some code where it should draw a background Image:  public class Board extends JPanel{ private static final long serialVersionUID = 4759318639631503071L; public String room = "menu"; public Image backgroundImage;  public Image getBackgroundImage() throws IOException{     if (room == "menu") {          backgroundImage = ImageIO.read(new File("assets/background_title.png"));      }     return backgroundImage; }   @Override  public void paintComponent(Graphics g) {      super.paintComponent(g);      g.drawImage(backgroundImage, 0, 0, this);  }  }   I used System.out.println and realized that backgroundImage was null, what have I done wrong here?


Let's say that I wanted to put Rhythmbox on my desktop and not on my dock. How can I do this? I am on Ubuntu 17.10 with the GNOME Desktop. I already have desktop icons on in the Tweak Tool.


Do zombie bites in the Resident Evil games turn you into a zombie?

It was a fairly big plot point in the Resident Evil movies that zombie bites work like bites in standard zombie fiction: You get bitten, you get infected with the virus, and over time the bite turns you into a zombie.  I'm curious if that is ever explicitly shown in the games. I know of plenty of characters who die and become zombies, or characters who get exposed to the T-Virus directly and become zombies as a result, but I'm not aware of anybody who gets turned into a zombie specifically due to a zombie bite.  This is, of course, putting aside the plot armor of player characters that get bitten through the course of gameplay.


Installation of Linux distro on Mac Pro Model A1211 circa 2006

I was given a Mac Book Pro Model A1211, T7400 version 2.2. Currently running mac os X Lion 10.7.5 How do I create a Boot DVD or USB to perform a "fresh install" of Ubuntu, Linux Mint, etc. Any assistance you can render would be appreciated. I am a PC guy with limited experience with Linux.


My Makefile is empty but make is running some old commands

I had a strange bug that I managed to reduce to the following. I have a folder with only two empty files: a Makefile and a cpp file:  $ ls -la total 8 drwxrwxr-x  2 erelsgl erelsgl 4096 Mar  3 20:12 . drwxrwxr-x 13 erelsgl erelsgl 4096 Mar  3 20:10 .. -rw-rw-r--  1 erelsgl erelsgl    0 Mar  3 20:12 Demo.cpp -rw-rw-r--  1 erelsgl erelsgl    0 Mar  3 20:09 Makefile $ cat Makefile  $ cat Demo.cpp    When I run make I get the expected result:  $ make make: *** No targets.  Stop.   But when I run make Demo.o I get a very strange outcome:  $ make Demo.o clang++-5.0 -std=c++17   -c -o Demo.o Demo.cpp make: clang++-5.0: Command not found <builtin>: recipe for target 'Demo.o' failed make: *** [Demo.o] Error 127   The command "clang++-5.0 -std=c++17" were actually in the Makefile some days ago, but I have long since then replaced it with clang++-9. And now, as you can see, the Makefile is entirely empty. Why is make still running these old commands?  EDIT: The same thing happens when I change the Makefile to contain these two lines:  %.o: %.cpp xxx.h     clang++-9 --compile $< -o $@   when the file xxx.h does not exist. This is very confusing: I run make Demo.o and it is built with clang++-5.0 instead of clang++-9!


$f$ be a smooth function on real line , $f(0)=0$ , $f(x)>0, \forall x \ne 0$ and any $f^{(n)}(0)=0$ ; is $\sqrt f$ smooth?

Let $f: \mathbb R \to \mathbb R$ be an infinitely differentiable function such that $f(0)=0$ , $f(x)>0 , \forall x \ne 0$ and   $f^{(n)}(0)=0$ ( the $n$-th derivative ) $,  \forall n \in \mathbb N$ , then is the function $g(x):=\sqrt{f(x)}$ infinitely   differentiable ? I am having difficulty checking whether any $n$-th derivative exist at $0$ . Please help . Thanks in advance


What is the Difference between Package "nvidia-331" and Package "nvidia-331-updates" mfg muessli


Is there any way to clean the joints created by mirror modifier?

Hi Guys, I created the above bottle using the mirror modifier but when I am smoothing it, it leaves the edges/vertices joint, as I shown using red arrows. Please suggest how can I remove this visible separation line?


I'm having trouble understanding why exactly $GF(p^n)$ is unique up to isomorphism.  I know that the proof begins by claiming that $GF(p^n)$ is the splitting field of the polynomial $x^{p^n}-x\in \mathbb{Z}_p[x]$.  I don't understand why the splitting field of a polynomial is unique though.  Could someone help explain this to me?


multivariate linear regression without b_0

I created a multivariate regression following the scheme $$y = \beta_0 + \sum^n_{i=1}\beta_i*x_i$$ and got an average deviation ofaround 5%.   When I tried the regression without the $\beta_0$ I got a more approximate accuracy now on ca. 3%.    I am creating a model where certain factors (in the 9th grade) have an impact on the students' performance (PISA Questionnaire).   Would it make sense to neglect the $\beta_0$ term? I could imagine it means something like starting performance in the beginning of the year, which is then impacted during the year. If one assumes such a starting point does not make sense, when setting it up as a 'total-school experience factors' meaning the factors have been present over the total in-school time, and thus one could say it does not make sense, to have some performance level before coming to school, as there is no entry performance test...  What do you think?


How to show the parent and child taxonomy term?

I have a vocabulary like this:   Parent 1  Child 1 Child 2 Child 3   Parent 2  Child 1 Child 2    Now I would like to use a view to create a list of a Parent term with its Child terms. I try to do this with Views UI, but only show the term parent... No the child term's. It is very confusing for me.  Can anyone help with this case? Thanks :D


Fermi's golden rule and infinite probablity?

I am slightly confused about the application of . Which during standard derivations indicates a probability of transitioning from the state $|i \rangle$ to the state $|f\rangle$ of: $$P=\frac{2\pi t}{\hbar^2} | \langle f | \hat V | i \rangle|^2 \delta(E_f-E_i-\hbar \omega)$$ This holds for large values of $t$ but for arbitrarily large values of $t$: $$P>1$$ Which (to me anyway) makes no physical sense since there can't be a probability greater then 1 of been in the final state. If my interpretation is right then how is this problem resolved/allowable? and if it is wrong what part of what I have said is wrong?


I am currently in an abstract algebra class and my teacher told us to look at the upper triangular matrix, $\left( \begin{array}{ccc} 1&a&b\\0&1&c\\0&0&1 \end{array} \right)$ for $a,b,c\in \mathbb Z / p\mathbb Z$, p being a prime number.   Specifically she posed the questions, prove it is a group, find the order, find the order of the center, and to give a simple description for the isomorphism type of $G/Z(G)$.  I was able to prove that is a group using the normal axioms and was able to prove the order by simply recognizing there are $p$ possibilities for each variable a,b,c so the order was $p^3$.  I am having trouble in establishing which matrices are commutative and would appreciate some guidance in my troubling times.  Thanks!


Confusion about malloc and calloc function in C

Declaration of malloc function:  void *malloc(size_t size);   Here, malloc returns void pointer. So, A void function returns nothing, then   Why we assign malloc(function call) value to pointer?   For example:  int *ptr; ptr = malloc(10 * sizeof (*ptr)); ^^^   What does return value holds from malloc()???


Run jar file with command line arguments

How can I run a jar file in command prompt and pass arguments to it.  ie: "test.jar -get" would be entered in command prompt/terminal


Probability of exactly two heads in four coin flips?

When you flip a coin four times, what is the probability that it will come up heads    exactly twice?      My calculation:    we have $2$ results for one flip : up or down  so flip $4$ times, we have $4\cdot2 = 8$ results total    Thus the probability is: $2/ 8 = 0.25 $ but the correct answer is $0.375$. Can anyone explain why I'm wrong?


If I have a file that I want to reference or put up to ask a question on how would I do that? Bearing in mind that I'm a new user.


There's one thing I haven't found in  ("Hypertext Transfer Protocol -- HTTP/1.1") and that's a "canonical" name for a request/response pair. Is there such thing? :  4.1 Message Types     HTTP messages consist of requests from client to server and responses    from server to client.         HTTP-message   = Request | Response     ; HTTP/1.1 messages   Taking this as a template, which word would you put in the following sentence? A single complete HTTP ... consists of one HTTP Request and one HTTP Response      HTTP-... = Request Response  roundtrip? cycle?


Why would someone buy stocks that don't pay dividends?

I'm very confused about the reasoning to buy stocks without dividends. What can I use stocks for other than selling, if they don't pay me dividends?


Proof that $\gcd(ax+by,cx+dy)=\gcd(x,y)$ if $ad-bc= \pm 1$

I'm having problems with an exercise from Apostol's Introduction to Analytic Number Theory.     Given $x$ and $y$, let $m=ax+by$, $n=cx+dy$, where $ad-bc= \pm 1$. Prove that $(m,n)=(x,y)$.   I've tried to give a proof, but I suspect it's wrong (or at least not very good). I would be very thankful for any hints/help/advice!  My proof:     We observe that since $ad-bc= \pm 1$, $ad=bc \pm 1$, and $(ad,bc)=1$.   Now, $(a,b) \mid m$ and $(c,d) \mid n$ but      $$(a,b) = ((d,1)a,(c,1)b)=(ad,a,bc,b)=(ad,bc,a,b)=((ad,bc),a,b)=(1,a,b)=1.$$      Similarly, we determine $(c,d)=1$. So, $1=(a,b) \mid m$ and $1=(c,d) > \mid n$. But $(x,y)$ also divide $m$ and $n$. Since $(x,y) \geq (a,b)=(c,d)=1$, this implies that $(x,y)=m,n$. Hence   $(m,n)=((x,y),(x,y))=(x,y)$.


Ease up on the Hot Network Question Randomness

Whenever I refresh Stack Exchange sites or go to a question, the Hot Network Question list items are re-listed or re-ordered, quite dramatically it seems.  This seems like a .  It's actually a bit maddening to me to see the list change so frequently (or clearly I am refreshing too often or looking at it too much :-).  I understand the need to keep the list updated, but can the items in the list hold their positions a little more consistently?  The hot items can't be changing that fast.


Is $\mathbb Z [(1+\sqrt{-19})/2]$ an Euclidean domain?

Is $R=\mathbb Z [(1+\sqrt{-19})/2]$  a Euclidean domain?    Its Voronoi region seems relatively small, but its hard to have intuition about division with remainder. I predict it is not since the norm of $(1+\sqrt{-19})/2$ is $\sqrt5>1$.   Here is my attempt at a proof:  I show that an Euclidean Domain $D$ (with not every nonzero element a unit) has a non-unit element $p$ such that $\forall x\in D$ $p|{x}$ or $p|{x-u}$ for some unit $u\in D$. I now want to reason by trying to show the conditions of the contrapositive are true for $R$. In other words, that $\nexists p\in R$ such that $p|{x}$ or $p|{x-u}\ \ \forall x\in R$ for $p$ nonunital and for some unit $u\in D$.   I'm having difficulty showing this. Any help appreciated.


Undefined reference error with static method which takes std::vector as a template argument

I have the following code (based on  answer):  #include <iostream> #include <vector>  class Debug { public:     template <typename T, typename A>     static void printVector(const std::vector<T,A>&, const std::string& = "Vector:"); };  template <typename T, typename A> void Debug::printVector(const std::vector<T,A>& v, const std::string& message) {     std::cout<<message<<std::endl;     for(auto item : v)     {         std::cout<<item<<std::endl;     } }  int main() {     std::vector<std::string> vec {"a","b","c"};     Debug::printVector(vec);     return 0; }   It works great in an . However, when I try to compile it with GCC 4.8 on Ubuntu, it says:  error: undefined reference to `void Debug::printVector<std::string, std::allocator<std::string> >(std::vector<std::string, std::allocator<std::string> > const&, std::string const&)' error: collect2: error: ld returned 1 exit status   Without the template (using simply std::vector<std::string>) everything works fine.


My PC got infected if executables of dubious origin were automatically downloaded?

I have a question. When navigating in page shorteners of dubious origin where there is too much advertising... And it automatically downloads a strange executable... and I immediately remove it (through the option of "Windows Explorer" that allows you to "Delete file Permanently" without going through the recycle bin) and I never run it. So... My pc got infected just by downloading that strange executable? Or do I need to run the file to get infected? Thanks in advance


Allow questions to be saved as drafts prior to posting

Many times it takes me a while to properly compose my question before posting. Sometimes it's just a jumble of ideas and concepts, and is not something I'd want seen immediately. However, there is no way to save a partial question unless you post it.  This should work exactly like it does in Gmail. There, once you start composing your question, it's autosaved as a draft. If your browser crashes or you need to come back later to complete it, it will be there for you to finish and post later.  Optionally, allow multiple draft questions and a page to edit/delete them. If needed, make them expire after some amount of time.


Does taking levels in a prestige class cause XP Penalty?

In D&D 3.5, does taking levels in a prestige class cause the XP penalty like multiclassing does? Please provide the source of the answer so I can show it to my players.


Do you have any useful awk and grep scripts for parsing apache logs?

I can use log analyzers, but often I need to parse recent web logs to see what's happening at the moment.   I sometimes do things like to figure out top 10 ips that request a certain file  cat foo.log | grep request_to_file_foo | awk '{print $1}' |  sort -n | uniq -c | sort -rn | head   What do you have in your toolbox?


Consider the following code:  List<String> myList = Arrays.asList(1, 2, 3); String[] myArray1 = myList.toArray(new String[myList.size()]); String[] myArray2 = myList.stream().toArray(String[]::new); assert Arrays.equals(myArray1, myArray2);   It seems to me that using a stream is much simpler.   Therefore, I tested the speed of each.  List<String> myList = Arrays.asList("1", "2", "3"); double start;  start = System.currentTimeMillis(); for (int i = 0; i < 10_000_000; i++) {     String[] myArray1 = myList.toArray(new String[myList.size()]);     assert myArray1.length == 3; } System.out.println(System.currentTimeMillis() - start);  start = System.currentTimeMillis(); for (int i = 0; i < 10_000_000; i++) {     String[] myArray2 = myList.stream().toArray(String[]::new);     assert myArray2.length == 3; } System.out.println(System.currentTimeMillis() - start);   The result is that using the stream is about four times slower. On my machine, 816ms (stream) vs 187ms (no stream). I also tried switching the timing statements around (myArray2 prior to myArray1), which didn't effect the results much. Why is this so much slower? Is creating a Stream so computationally intensive?  I followed @Holger's advice and studied up a bit (surely not enough) on JVM testing, reading , , , and using .    Results (via JMH):  private static final List<String> myList = IntStream.range(1, 1000).mapToObj(String::valueOf).collect(Collectors.toList());  @Benchmark public void testMethod() {     String[] myArray = myArrayList.stream().toArray(String[]::new); }      StreamToArrayArrayListBenchmark.testMethod  avgt    5  2846.346 ± 32.500  ns/op   private static final List<String> myList = IntStream.range(1, 1000).mapToObj(String::valueOf).collect(Collectors.toList());  @Benchmark public void testMethod() {     String[] myArray = myArrayList.toArray(new String[0]); }      ToArrayEmptyArrayListBenchmark.testMethod  avgt    5  1417.474 ± 20.725  ns/op   private static final List<String> myList = IntStream.range(1, 1000).mapToObj(String::valueOf).collect(Collectors.toList());  @Benchmark public void testMethod() {     String[] myArray = myArrayList.toArray(new String[myList.size()]); }      ToArraySizedArrayListBenchmark.testMethod  avgt    5  1853.622 ± 178.351  ns/op     private static final List<String> myList = new LinkedList<>(IntStream.range(1, 1000).mapToObj(String::valueOf).collect(Collectors.toList()));  @Benchmark public void testMethod() {     String[] myArray = myArrayList.stream().toArray(String[]::new); }      StreamToArrayLinkedListBenchmark.testMethod  avgt    5  4152.003 ± 59.281  ns/op   private static final List<String> myList = new LinkedList<>(IntStream.range(1, 1000).mapToObj(String::valueOf).collect(Collectors.toList()));  @Benchmark public void testMethod() {     String[] myArray = myArrayList.toArray(new String[0]); }      ToArrayEmptyLinkedListBenchmark.testMethod  avgt    5  4089.550 ± 29.880  ns/op   private static final List<String> myList = new LinkedList<>(IntStream.range(1, 1000).mapToObj(String::valueOf).collect(Collectors.toList()));  @Benchmark public void testMethod() {     String[] myArray = myArrayList.toArray(new String[myList.size()]); }      ToArraySizedArrayListBenchmark.testMethod  avgt    5  4115.557 ± 93.964  ns/op     To summarize:                | ArrayList | LinkedList stream        | 2846      | 4152 toArray sized | 1853      | 4115 toArray empty | 1417      | 4089     Using JMH (possibly naively), I'm still seeing that ArrayList::toArray is about twice as fast as Stream::toArray. However, this does seem to be because of the ability of the ArrayList to just do an array copy, as @Andreas pointed out because when the source is a LinkedList the results are about equal.  It's definitely good to know about myList.toArray(new String[0]).


If $a,b>0$ and $a+b=1\;,$ Then minumum value of $(a+\frac{1}{a})^2+(b+\frac{1}{b})^2$ is

If $a,b>0$ and $a+b=1\;,$ Then minumum value of $\displaystyle \left(a+\frac{1}{a}\right)^2+\left(b+\frac{1}{b}\right)^2$ is   $\bf{My\; Try::}$ Let $a=\sin^2 \theta$ and $b=\cos^2 \theta\;,$ Then We have to minimize   $$\displaystyle f(\theta) = (\sin^2 \theta+\csc^2 \theta)^2+(\cos^2 \theta+\sec ^2 \theta) = \sin^4 \theta+\csc^4 \theta+\cos^4 \theta+\sec^4 \theta+4$$  So $$f(\theta) = 1-2\sin^2 \theta\cos^2 \theta+\frac{1}{\sin^2 \theta \cos^2 \theta}+4$$  So $$f(\theta) = 1-\frac{\sin^2 2\theta}{2}+\frac{4}{\sin^2 \theta}+4$$  Now Put $\sin^2 2\theta = t\;, t\in \left(0,1\right]$  So we get $$f(t)=5-\frac{t}{2}+\frac{4}{t}\;,$$ So we get $\displaystyle f'(t) = -\frac{1}{2}-\frac{4}{t^2}<0\;\forall t \in (0,1]$  So $$f(1)_{\min} = 5-\frac{1}{2}+4=9-\frac{1}{2}=\frac{17}{2}$$  But answer given as $$\frac{25}{2}$$  plz help me, Where I am wrong, Thanks


Question about Big O notation for asymptotic behavior in convergent power series

Examples of such use of Big O notation can be found for instance on Wolfram Alpha . More details on the .  The idea, as I understand it, is that the term between parenthesis in Big O bounds the rest of the series asymptotically (as $x$ goes to zero or infinity) giving and elegant way of writing the series (if you don't like "$+ \dots$" or "etc") while also providing an error approximation. Taking the example of $e^x$:  $$ e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+O(x^5) $$  When we write $O(x^5)$ we mean that all the rest of the terms (like $(x^6)/6!+(x^7)/7!+(x^8)/8!+\dots$) are bounded by $x^5$ as $x$ goes to $0$. Giving a more concrete example if we take $e^2.42$ then this is more or less $1 + 2.42 + (1/2)(2.42)^2 + (1/6)(2.42)^3 + (1/24)(2.42)^4$ and the error between the approximation and the actual value is no larger than $2.42^5$.  The question is how do we know this?  Certainly $x^5$ bounds, as $x$ goes to $0$, each term individually ($Cx^n=O(x^5)$ as $x\rightarrow 0$ as long as $n>5$, $C$ constant) but how do we prove the sum of all the individual terms is bounded? We have to show that:  $$ O(x^5)=\frac{x^6}{6!}+\frac{x^7}{7!}+\frac{x^8}{8!}+\frac{x^9}{9!}+\frac{x^{10}}{10!}+\frac{x^{11}}{11!}+...),x\rightarrow 0 $$  Falling back on the previous example, maybe the infinite sum will actually be slightly larger than $2.42^5$. How do we prove this is actually not the case? While I have used the example of $e^x$, feel free to give a more general proof, and not one for this particular function only.  Your help with this issue will be greatly appreciated.  Thank you for taking the time to read this and have a good day.


Subscript and superscript need to be align

I want to align super and subscript in the display and inline equations  It should be:     Now:     There are n-number of occurrences in my manuscript, is there any possibility to achieve by a single move.  MWE:  \documentclass{article}   \begin{document}   $${_{gij}^{bj}\textbf{\textit{R}}}$$  \end{document}


I want to curve an object like a roller coaster using a path

I want to curve an object to make a path like a roller coaster.  I just made the basic shape (wooden tablet, left and right binary).  How to curve it?  Thank you so much.


Finding a way to discourage users from downvoting questions that have -8 DV's already?

Once a question has -8 votes, that's it - it disappears.  Perhaps we might discourage users from downvoting more at that point(i.e once it hits -8), because any more downvotes are functionally meaningless, while an upvote may help salvage something.  But once it's at, say, -10 or -15, any downvote behavior is merely a wasted click. Unless that user truly wants to downvote it, which leads to the idea of:  How about making a bold generic downvote symbol once a question hits -8  What about if we said, OK since it's -8, let's delineate that by marking it so and keeping it fixed at -8 even if it gets ten more downvotes( which still reflect on the reputation, even though for newbies and drive-by's they get stuck at "1" rep anyway ).  Related:   Thanks


(Q*,•) and (R*,•) is isomorphic.  This is false.    Why this problem false??  Would you ask to me counter-example?


Refresh site when accessed a second time

I would like to "force-load" an instance of a page every time it's accessed.   The website in question is a "build your custom product"-kind of site and uses a multi-step form to guide customers through the steps of the product building. The client wants the site to be such that every time a user access the site, whether by direct url or by clicking on the "back" and "forward" buttons on the browser, it must refresh. In other words, no caching (right?).  I've tried to use the solutions I found on SO and on other websites, which mainly consisted of  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache");   But that didn't work.  So I tried my own solution:  $location = "/fabriquer/"; if(isset($_COOKIE['first_load']) && $_COOKIE['first_load'] == "true") {     setcookie('first_load', 'false');     header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . $location); } else {     setcookie('first_load', 'true'); }   But that also seems to not be working properly. When I press the back button on my browser to get back on that site, the refresh does not happen, but the cookie is set to true/false in the second solution.   Any ideas?


Why choose a low latency kernel over a generic or real-time kernel?

After installing Ubuntu Studio 12.04, I have found that it uses a low latency kernel.   I searched for an explanation and how to change back it to a real-time or generic one. However, it looks like this part of Linux hasn't been covered to explain the details.   Q: Why choose a low latency kernel over a generic or real-time one?  PS: I have already read the answers from  question and  post.


am trying to wrap every row of wordpress posts with a div with a class of row.  Have been trying to follow the answers from another question linked below But seem to be having trouble as my loop is a little different. Also I would like any rows with 1 or more posts to be wrapped in a row also...  I need to wrap every 4 wordpress posts in a div     <?php query_posts('cat=2');           $i = 0;         $wrap_div = "
";          if ( have_posts() ) :              $total_posts = $wp_query->post_count;             echo $wrap_div;              while ( have_posts() ) : the_post();     ?>

               Click to Play</span
  <?php                   if ( $i % 4 == 0 && $i != 0 && ( $i + 1 ) != $total_posts ) {                     echo '
' . $wrap_div;                 }                 $i ++;                   ?>     <?php endwhile; endif; ?>     <?php wp_reset_query(); ?>


Hawking radiation (black hole evaporation)

I understand that one of the simplified ways of looking at Hawking radiation is a pair of virtual particles close to the event horizon (but outside of it). The particle with negative energy falls into the black hole, thus decreasing its mass/energy, while the one with positive energy escapes into the Universe outside of the black hole. My question is: Why is it that the negative energy virtual particle always falls into the black hole (with respect to the observer)? That is, why is there not a random distribution of either a negative particle or a positive particle falling into the black hole?


Php PDO UTF encoding issue even after charset UTF-8

I am facing some issue with PDP MySQL, I am trying store records in multiple languages, I set charset as UTF8 for all(PHP,MYSQL,PDO), still I am facing issue, the records updating as like below  Steps I followed:   Set UTF for MySQL DB Set UTF8 for MySQL table Set UTF8 for PDO (PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'utf8'") SET UFT8 for PHP output   But still facing the issue, how ever I can insert/update in phpmyadmin manually without any issue.  Please help me to resolve this.  Thanks, Ashok


I would like to know how to find out the sum of this series:  $$1 - \frac{1}{2^2} + \frac{1}{3^2} - \frac{1}{4^2} + \frac{1}{5^2} - \frac{1}{6^2} + \cdots$$  The answer is that it converges to a sum between $\frac 34$ and $1$, but how should we go about estimating this sum?   Thanks!


Detect new users to chat, display helpful info

Mesages such as this are very common in all rooms:  We have the data available to determine if a user is new, so what if we had the option to set up room guidelines and so forth when they enter to be predominately shown? I know some rooms have the rules, but it's obviously being ignored in many cases, and others, might not be important to who's in the room most of the time. It could be a floating box showing some text, or whatever. What "new user" means in this case is, new to that room. For instance, that user is familiar enough with the site to have a respectable site-wide rep, but the individual rooms may have their own social protocols or otherwise. We have, in the database, information on how much participation this person has with a room. We can detect their interaction in any particular room, or rooms in general. That detection would then trigger a room's setting some where-- if they so choose to configure one-- that welcomes new users and gives them the overview of the room, an FAQ about questions, etc. I know this room has a lot of questions where people don't get explaining the right details of problems, using common tools that are very helpful, if it's okay to ask, don't come in and say "I know you're not PHP but here's a PHP question..." etc.


Proving $a^{n-1} \equiv 1 \mod n $ when n is not prime.

Let $t∈\Bbb N$ and let $x=6t+1, \:y=12t+1$ and $z=18t+1$. $x, y$ and $z$ are all primes and let $n=xyz$. Prove that  $a ^{n-1} \equiv 1 \pmod  n\;$ whenever $ a∈\Bbb Z$ and $\gcd(a,n) = 1$.  I have started using the Euler-Fermat Theorem since $\gcd(a,n)=1$. Giving $\phi (n)=(1296t^3) $ But unsure how to proceed?


Using WPF Validation rules and the disabling of a 'Save' button

I have a page where a few textboxes cannot be empty before clicking a Save button.    <TextBox...                  <TextBox.Text>                     <Binding Path ="LastName" UpdateSourceTrigger="PropertyChanged">                          <Binding.ValidationRules>                             <local:StringRequiredValidationRule />                         </Binding.ValidationRules>                                                   </Binding>                 </TextBox.Text>   My rule works, I have a red border around my textbox until I enter a value.  I now want to add this validation rule to my other text boxes.  How do I disable the Save button until the page has no validation errors?  I'm not sure what to check.


I have some issues with this exercise. How should I use induction on k? Maybe someone can give me a hint :)


Is $x^6-3$ irreducible over $\mathbb{F}_7$?

I know that $\mathbb{F}_7=\mathbb{Z}_7$, and the all possible solutions of $x^6-1=0$ over $\mathbb{Z}_7$ are 1~6, so if we let the root of equation $x^6-3$ as $t $ then the solutions of $x^6-3=0$ is $t$~$6t$, which shows that all the solutions are not in $\mathbb{Z}_7$. However I can't say that $x^6-3$ is irreducible by this fact(since there could exist 2 or more degree polynomial divides $x^6-3$.) Is it irreducible over $\mathbb{Z_7}$? Why?


Baby breastfeeds for only 5 mins before sleeping again

My daughter is 2 months old and is exclusively breastfed. After drinking for only 5 mins she falls asleep again and wakes up crying again after 30 mins. We have tried different things like tickling her but have failed to keep her awake to drink for longer. Her weight is in normal range now but we are worried about of her not getting enough. Pls suggest some way of keeping her awake and feed longer.


Does the namespace of an XML element extend to its attributes?

[Duplicate question:  see  for answer ("No, don't qualify the attributes")]  This is my first time working with XML namespaces, and I want to make sure I'm doing this right.  Strangely, for such a simple thing, I can't find anything on SO that addresses the question:  I've got a namespace-qualified XML element with some attributes.  Do the attributes need to be qualified too, or does the scope extend to them?  <foo:tag value="bar" />   or   <foo:tag foo:value="bar" />


Proof that $a^b>b^a$ if $a<b$ are integers larger or equal to two and $(a,b)\neq (2,3),(2,4)$

I would like a proof that if $a<b$ are integers with $2\leq a,b$ we have $a^b>b^a$ unless $a=2,b=3$ or $a=2,b=4$ . I would like to use as little calculus as possible. Here is my current solution:  Case 1: $a>2$  Fix $a$ and start with $b=a$. notice $a^a=a^a$. Now increase $b$ by $1$ to now get $a^{a+1}>(a+1)^a$. When $a$ is at least three this is true because the left side was multiplied by $a$ and the right side by $(1+\frac{1}{a})^a$.  Since $(1+\frac{1}{a})^a=\sum\limits_{i=0}^a \binom{a}{i} \frac{1}{a^i}$ is the sum of $a+1$ elements all of them smaller than $1$ and the last two terms add $\binom{a}{a-1}\frac{1}{a^{a-1}}+\binom{a}{a}\frac{1}{a^a}=\frac{1}{a^{a-2}}+\frac{1}{a^a}<\frac{1}{3}+\frac{1}{27}<1$ we conclude the sum is less than $a$. Therefore the inequality holds. Notice that each time we add $1$ to $b$ the left side is multiplied by $a$ and the right by something smaller than $(1+\frac{1}{a})^a$, hence the inequality holds for all $b$ larger than $a$.  Case $a=2$ is the same thing only we check $b=3,4$ by hand and then do something similar.  I am not really happy with the current solution, can we find something simpler? If it can be more combinatorial it would be better. Notice I want as little calculus or inequalities as possible.


How to highlight Python syntax in LaTeX using verbments and utf8

I'm using Latex and the verbments package to display some python 3 code (with syntax highlighting) inside a document, but I have a problem with UTF-8. I'm using the verbments package  \begin{pyglist}[language=python, encoding=utf8] print(``Mañana será otro día'') \end{pyglist}   I use pdflatex -shell-escape  DocMaestro.tex to produce a pdf file, but nothing happens.  I see in the console log this error:  Error while highlighting: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf1 in position 10: invalid continuation byte    (file "/usr/lib/python3.3/site-packages/pygments/lexer.py", line 164, in get_tokens)  (./DocMaestro.pyg.sty) (./DocMaestro.pyg.vrb)) [62]  I've also noticed that when i run latex another file called DocMaestro.pyg.lst is created this file contains the following information:  print(``Mañana será otro día'')  but is encoded in ISO-8859-15 instead of UTF-8 as all my other files.


measurable set and complement in $[0,1]$

How can I Construct a measurable set A contained in C = [ 0, 1] such that for an arbitrary open interval B contained in C, $m(A\cap B)> 0$ and $m(CA\cap B)> 0$, CA is the complement respect to C.  My ideas give some of the measures zero, or can I construct with borel sets? Thanks.


Why the reference to an object in java is not modified when re-assigning the object?

I have this piece of code, and I would like to know why the reference of my variable x is not modified ? It still points to the first object assigned:  public class HelloWorld{   public static void main(String []args){     Object x = new Object();     Object y = x;     mutate(x);     System.out.println(Integer.toHexString(x.hashCode()));     System.out.println(Integer.toHexString(y.hashCode()));     System.out.println(x == x); // true     System.out.println(x == y); // true  }   public static void mutate(Object x) {      x = new String();  }   }


Worst-case number of transpositions needed to generate a permutation

For a permutation on $n$ elements, what is the worst-case minimal number of transpositions that need to be multiplied to give the permutation? The transpositions do not need to be adjacent.


Discrete mathematics - Find all integer solutions of the equation $a^2+ b^2 + c^2=a^2 b^2$.

Find all integer solutions of the equation $a^2+ b^2 + c^2=a^2 b^2$.  This is one of the questions we presented in one session to contest preparation PUTNAM. It turns out that I can't get from the problem. Could someone just give me a hint? (Please, don't give me the answer. Simply, an argument that can help me advance in the problem or theorem might suffice.)


How can I check the actual size used in an NTFS directory with many hardlinks?

On a Win7 NTFS volume, I'm using cwrsync which supports --link-dest correctly to create "snapshot" type backups. So I have:  z:\backups\2010-11-28\cygdrive\c\Users\... z:\backups\2010-12-02\cygdrive\c\Users\...   The content of 2010-12-02 is mostly hardlinks back to files in the 2010-11-28 directory, but there are a few new or changed files only in 2010-12-02. On linux, the 'du' utility will tell me the actual size taken by each incremental snapshot. On Windows, explorer and du under cygwin are both fooled by hardlinks and shows 2010-12-02 taking up a little more space than 2010-11-28.   Is there a Windows utility that will show the correct space acutally used?


Android app crashes after adding SharedPreference write

Thanks to this site, my app is coming along nicely. However, it crashes when switching to a new activity I just created. There are 6 activities where the user answers questions, on Activity #5 in the sequence, the app crashes when I press the continue button. I get the standard "Unfortunately, App has stopped." When I press OK, the app closes and re-opens, and I am taken back to Activity #4, which retains the user input which I saved to SharedPreferences.  Log from the time I press the continue button:  02-27 08:42:54.231 7307-7307/com.health.hermes D/ViewRootImpl: MSG_RESIZED: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1 02-27 08:42:54.541 7307-7307/com.health.hermes D/ViewRootImpl: ViewPostImeInputStage processPointer 0 02-27 08:42:54.611 7307-7307/com.health.hermes D/ViewRootImpl: ViewPostImeInputStage processPointer 1 02-27 08:42:54.621 7307-7307/com.health.hermes I/Timeline: Timeline: Activity_launch_request id:com.health.hermes time:1000022770 02-27 08:42:54.681 7307-7307/com.health.hermes D/TextView: setTypeface with style : 0 02-27 08:42:54.681 7307-7307/com.health.hermes D/TextView: setTypeface with style : 0 02-27 08:42:54.691 7307-7307/com.health.hermes D/AndroidRuntime: Shutting down VM 02-27 08:42:54.691 7307-7307/com.health.hermes E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.health.hermes, PID: 7307     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.health.hermes/com.health.hermes.KiPercentActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setFilters(android.text.InputFilter[])' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3253)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)         at android.app.ActivityThread.access$1100(ActivityThread.java:221)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)         at android.os.Handler.dispatchMessage(Handler.java:102)         at android.os.Looper.loop(Looper.java:158)         at android.app.ActivityThread.main(ActivityThread.java:7225)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.EditText.setFilters(android.text.InputFilter[])' on a null object reference         at com.health.hermes.KiPercentActivity.onCreate(KiPercentActivity.java:30)         at android.app.Activity.performCreate(Activity.java:6876)         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)          at android.app.ActivityThread.access$1100(ActivityThread.java:221)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)          at android.os.Handler.dispatchMessage(Handler.java:102)          at android.os.Looper.loop(Looper.java:158)          at android.app.ActivityThread.main(ActivityThread.java:7225)          at java.lang.reflect.Method.invoke(Native Method)          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)    If you see the cause, kindly point out how I can better understand the logcat so I can start diagnosing myself. Thank you!


Standard definition of graph says that it is an ordered pair G=(N,L) where N is set of nodes and L is set of lines which connect the nodes.   From what I've read, the set L can be empty, but can set N be empty too?  I'm mainly asking this because for my exam, I found numerous problems that go like this: Graph X is given. How many subgraphs with property Y exist? Often the number depends on the definition of graph.


Pendrive malware converting exe files into shortcut and displaying error on opening it

All the exe files are showing as Shortcut files on my PC. I tried installing the programs but it shows up an error of System Volume Information related.   On clicking the OK button, the installing popup comes. I think that it might be due to the virus attack. On the properties Tab, it is showing the Location of the exe files like C:\Windows....   I am attaching the screenshot of the error too. I tried scanning with K7 Antivirus too but it's not showing any Threat. Can I know how to overcome the issue.  Showing Shortcuts    Properties Tab of Safari as an example


How to set image open-with via terminal?

I am running openbox and so do not have access to standard Ubuntu control panel, but must set everything from the terminal. When I download an image in chrome and click open, it launches xdg-open which then launches an arbitrary program (it resorts to Internet Explorer on wine if I uninstall those programs).  How do I control which program is loaded for an image of type .jpg (and others)?


What is the best way to respond to students adding teachers to facebook?

As a teacher and a teacher manager, I noticed that the students frequently ask teachers for their facebook names or send them friend requests.  I think that students having their teachers' personal lifes on the facebook feed leads to situations inside the classroom that compromises the way students see the teacher.   How should I respond to a situation where teachers actually accept the friend requests?   UPDATE  Thanks to @JoBedard statement about the "age factor":     It depends on the age class of people your teaching.   We considered useful to specify that the students are age 13 to 20 years old. I would like to add that they are 90% women and from the south-american society, which has different behaviors and educational principles.


One day I installed wine 1.7.8 with mono and any game (also steam games) were working great. Few days ago my Linux broke completely so I had to reinstall it, then I updated nvidia drivers and wine like this:  sudo apt-get install wine1.7   Then I released that the new version (1.7.9) installed automatically but without mono package anymore. Until now all the wine games can't run due to fact it cannot find my graphic card drivers.  What can I do in this case? I'm a ubuntu noob btw.


Do I need to log in to an Ubuntu system as root to make a complete backup?

This is a re-edit, because no one seems to want to answer the actual question.  To simplify: Will a non-root backup save everything? Do I have to log in as root to copy sbin, home, etc to a backup disk?  Thanks for all the answers on logging in as root, but that wasn't the problem.


How to prove that $(k+1)^{\frac{1}{k+1}} = 3)$ using mathematical induction?

I've been trying to solve this for hours, but I just can't seem to do it. And yes, I know I have to show that $(k+2)^{\frac{1}{k+2}} < ... < (k + 1)^{\frac{1}{k+1}}$ from the starting assumption that $(k+1)^{\frac{1}{k+1}} < k^{\frac{1}{k}}$. Any hints would be highly welcome.


Finding an injection $f:\mathcal{P}(\mathbb{N})\rightarrow\mathbb{R}$

I am currently working through Abbott's analysis, and am asked to prove the following:     Denote the power set of $\mathbb{N}$ by $\mathcal{P}(\mathbb{N})$. Show that $\mathcal{P}(\mathbb{N})\sim\mathbb{R}$; that is, to show that there exists a bijection $F:\mathcal{P}(\mathbb{N})\rightarrow\mathbb{R}$.    I am quite sure that we have to use Schroder-Bernstein Theorem where we have to injections to show that there is a bijection, but I'm not sure how to find an injection in either direction.


What do you call a person that goes to extreme ends to accomplish a goal?

I've been trying to find a single word that describes a person that will go to extreme ends to achieve a goal.  For example, a person that would harm friends or leave behind a path of destruction to get what they want.   was the closest I could find, but didn't answer my question because of its more positive tone.


Is there a way to replicate Nikon D3100 live view on my laptop screen?

I own a Nikon D3100 and I need a way to see the live view of my camera on my laptop screen.  There must definitely be a way (I am not just aware of it). I have searched all around the web sites... I could not get a solution.  The Nikon Camera Control Pro 2 does not support D3100, and "Camera Control 5.1" connects and shoots remotely from a laptop but does not show live-view nor shoot in RAW.  There is a way of connecting my camera to a TV or monitor directly via an HDMI cable and getting the live view, but I want it displayed to my laptop screen.


I have a file, we can call it 'example.txt' and I've already called the file in my program. I want to add functionality to open the file when a JButton, myButton is clicked. This is my code so far:  myButton.setText("Button");  File example_file = new File("~/path/to/example.txt");  myButton.addActionListener(new java.awt.event ActionListener(){    public void actionPerformed (java.awt.event.ActionEvent evt){      myButtonActionPerformed(evt);    }  });  private void myButtonActionPerformed(java.awt.event.ActionEvent evt){    //open the file }   I'm sure there is a very simple way to do this, but I haven't been able to find anything.


how to echo the path of the script executed from another location?

I have a script file, let's say abc.sh. The full path is /home/path/to/script/abc.sh. Now I am currently executing the script from /path/to/current by executing this command - sh /home/path/to/script/abc.sh. I want this script to echo it's location. The output should be /home/path/to/script


How can I access my Windows from Grub again?

I have been dual booting Ubuntu and Windows 10 for quite a while now and noticed that after the most recent update in Ubuntu, I cannot access my Windows 10 partition from Grub anymore.  I have already reinstalled/repaired Grub and even updated it.  Does anyone have an idea how to go about this  Cheers,


I'm trying to solve $\lim_\limits{x\to0}{{\frac{x^2-7x+4}{x-3}}^{\frac{x+1}{x-7}}}$ and I'm given the following "property": $$\lim_\limits{x\to a}{[f(x)]^{g(x)}}=e^{\lim_\limits{x\to a}{[f(x)-1]·[g(x)]}}$$ With $f(x)>0$, $\lim_\limits{x\to a}{f(x)=1}$ and $\lim_\limits{x\to a}{g(x)=\infty}$  I can solve the limit with the property just fine. But I don't understand where it comes from, and I can't find anything like it by searching on Google or here, can someone shed a light on this? Does this "special limit" have a name? or more formal restrictions?


Pressing Esc when editing a comment should cancel editing

When editing a post, pressing Esc does the same thing as clicking the "cancel" link: it cancels the edit. However, when editing a comment, pressing Esc does nothing.  Could pressing Esc when editing a comment cancel that edit as well?


How do I copy Team Fortress 2 to other computers?

Since Team Fortress 2 is available for free, many of my friends have downloaded the game. Can I copy the game on a digital media (USB stick or external hard drive) without creating a problem with Steam? This will save me almost 6GB download.  EDIT: I said that this transfer must be made between two different user accounts.


Include the "People Reached" and "Helpful Flags (count)" data in SEDE

I know the new profile design hasn't been updated for  on the network yet, so maybe this is a bit too early. Nonetheless, please include the "People Reached" data in  at your earliest convenience. Also, I was just made aware that users helpful flag counts are now publicly displayed on their  towards the top-right, underneath the people reached stat. So please include this data in SEDE as well.


Is there a nice way to set directory/project local environment variables?

I have been working on several projects, and they require different environment variables (e.g., PATH for different versions of clang executables, PYTHONPATH for several external modules). Whenever I work on one project, I have to modify these environment variables myself (e.g., change .zshrc/.bashrc and source it); and I sometimes forget and make mistakes.  Is there a way/project that helps do this automatically, similar to what  does in Python?


Can I log file operations (create/modify/delete) in Windows?

Is there any logging mechanism in Windows XP to know whether a user has done a specific file operation (create/modify/delete)?


“She, as well as her parents, [love/loves] Dwayne.”

Which sentence is correct?  She, as well as her parents, love Dwayne dearly. She, as well as her parents, loves Dwayne dearly.  I thought it would be love as in “they love him dearly”.  But MS Word editor says it’s loves, as it is referring to the she in the statement. But MS Word editor is far from perfect.


So I'm wondering if anyone has any information about the Dell power supplies which have 3 contacts on the barrel.    I know the 3 are power, ground, and some sort of communication link. Does anyone know what the communication line is for and/or what kind of protocol it uses?  Thanks  EDIT The reason I ask is I'm considering trying to build my own semi-advanced charger (not for a laptop but something else... it's a long story) and while I'm sure I could figure out a charging circuit given the internet as a resource, I was wondering what they use the communication line for and if it's necessary for my purposes. It seems the answer is no since I will be the only one using my device and thus don't need to worry about people plugging in not kosher chargers...


I'd like to know how to insert Tikz code in Scientific Workplace tex file. Since SW doesn't support Tikz directly, now I just create Tikz code in another tex editor and export as pdf. Then I convert pdf to images, and import images into SW.


Generate elevation profile graphs for multiple line segments in shapefile?

I'm familiar with the profile graph feature in 3D analyst and I saw the stack profile tool as well.  However, I'd like to generate elevation profile graphs for 137 line segments.   I don't want to hand draw each segment, is there a tool to do this?   Does anyone have any suggestions?


In R, what does a probability density function compute?

I understand that the probability density function, pdf, of a continuous random variable is the probability of the variable taking on a given value. I also thought that for a continuous random variable, the probability of it taking a specific value is always 0 i.e. P(X=x) = 0.  Therefore, in R, I am wondering what does      dnorm(0)   compute?  I know it means the probability of obtaining a 0 from a normal distribution (which is one of the distributions a continuous random variable can take) with mean 0 and standard deviation 1. I had expected the output to be 0, since I am asking for the probability of a continuous random variable taking on a specific value. However, the output is 0.3989.  What does 0.3989 represent and why isn't the output 0?


External HDD is not accessible after using on TV

I cannot see any files on my external hard drive after using on TV. I have already posted details in  post. I can repair some files using recovery software, but I would like to know a reason of this behavior and I don't wish to recover all files every time after using TV. Please, help me.


I came across an odd thing. I searched "nice" in Lexico and see what it says about its origin: Middle English (in the sense ‘stupid’): from Old French, from Latin nescius ‘ignorant’, from nescire ‘not know’. Other early senses included ‘coy, reserved’, giving rise to ‘fastidious, scrupulous’: this led both to the sense ‘fine, subtle’ (regarded by some as the ‘correct’ sense), and to the main current senses.    How did it take the meaning of "Giving pleasure or satisfaction; pleasant or attractive"?


samsung laptop Battery Issue wont fully charge

I have a samsung laptop and recently had a pop up message saying for battery to not completely charge to save battery life after doing this my battery does not completely charge. It charges to approx 50% but this does not allow me to use my computer for very long which is very frustrating, Anyone know how I can change the setting of my battery to go back to fully charge as I cannot seem to find anything in my battery options that allows me to do this.


I looked around the site and  I couldn't seem to find a similar question. But, I came across this question: Let $f$ be analytic from the unit disc to the complex plane with the property that $|f(z)|\leq |f(z^2)|$ for all $z \in D.$ Show $f(z)$ is constant. I did a similar problem where we assume we $f(z)$ is an entire map and that  was straight forward since we could write $f(z) = c f(z^2),$and play around with the taylor coefficients. But now, I don't have any intuition for this problem. I want to use the maximum modulus theorem  but I can't apply it, since we are not continuous  on the closure. I also tried defining a few functions, such as the  difference of the two $f(z)-f(z^2),$ but I seem to be coming up short in either case. Am I missing something? Is there some trick I don't see?


How to make a mesh deform accurately with smaller rigid bodies (rope animation)?

I am trying to achieve a physically realistic and visually realistic dynamic rope simulation for knot-tying and untying in 2.80.   So far, I have an animation using rigid body cylinders linked together with rigid body constraints and I am able to get the desired physical behavior and tie knots that handle self-collision by keyframing the cylinder locations:    The problem is that it does not look like a visually compelling rope, just like a bunch of cylinders with gaps in between. Does anyone know of a good solution to have a realistic looking rope mesh (i.e. something like this) deform the same way as this set of connected cylinders?:    I know the above kind of rope can be made using a twisted mesh with a Bezier curve modifier, but this does not have the kind of realistic dynamic physical properties (like handling self-collision) for my use case.   Is there any way to parent the cylinders to the vertices of a separate mesh such that it follows the deformation? Or is there any way to "wrap" ALL the cylinders in a texture that will also deform with the rest of the rope? Or any other suggested solutions involving parenting/hooks/rigging? Thank you so much!!


Find $$\lim_{(x,y) \to (0,0)}  \frac{\tan(x^3+y^3)}{\sin(x^2+y^2)}$$  What do you guys think about this approach, and are there any faster and easier approaches? My approach:   $\frac{\tan(x^3+y^3)(x^2+y^2)}{\sin(x^2+y^2)(x^2+y^2)}$  2.$\frac{\tan(x^3+y^3)}{(x^2+y^2)}$  $\frac{\sin(x^3+y^3)}{\cos(x^3+y^3)\rightarrow 1(x^2+y^2)}$  $\frac{\sin(x^3+y^3)}{(x^2+y^2)}$  Polar: $rcos^3\phi + rsin^3\phi = 0 + 0 = 0$    Thus, $$\lim_{(x,y) \to (0,0)}  \frac{\tan(x^3+y^3)}{\sin(x^2+y^2)} = 0$$


I am having an issue with my homepage - I do not have enough content for a fullpage and I am trying to set the position of this section above the footer at the bottom.  I had success with using positon: fixed; and bottom: 50px; to sit above my footer, however when I was opening the navigation on an ipad, the navigation would disappear behind the section.  I'm not sure how to tackle the problem, I was attempting to use vertical-align: bottom; but could not get it to work.  My CSS:  section.hero {     max-height: 400px;     text-align: center;     img.hero-responsive {         width: 100%;         height: 100px;     }     h2 {         width: 90%;         margin: 0 auto;         font-size: 1.5em;         top: -90px;         font-weight: 800;         position: relative;     }     h3 {         position: relative;         top: -60px;         font-weight: 800;     } }  section.info {     background-color: #464646;     height: auto;     position: relative;     top: -50px;     width: 100vw;     padding: 0px;     left: -5px;     text-align: center;     color: white;     padding-bottom: 50px;     .row {         margin: 0px !important;         padding: 0px !important;         .col-lg-3 {             border-top: 2px solid rgba(160, 160, 160, 0.8);             margin-top: 5px !important;             padding: 0px !important;             i {                 font-size: 40px;                 padding: 10px;                 margin: 25px !important;                 padding: 0px !important;             }             i.laravel   { color: #f05340; }             i.wordpress { color: #21759b; }             i.sass      { color: #cd6799; }             img {                 width: 50px;                 height: 40px;                 margin: 10px !important;                 padding: 0px !important;             }             h2 {                 margin: 0px !important;                 padding: 0px !important;             }             p {                 width: 95%;                 margin: 0px auto 0px auto !important;                 padding: 0px 0px 10px 0px !important;             }         }     } } @media only screen and (min-width: 768px) {   section.hero {       img.hero-responsive {           width: 450px;       }       h2 {           width: 400px;           top: -80px;       }   }    section.info {       top: auto;       position: absolute;    } }  @media only screen and (min-width: 1000px) {     section.hero {         h3 {             top: -30px;         }     }     section.info {         min-height: 500px;         position: unset;         margin-left: -5px;      } }   codepen:     codep:


How to show bibliography alphabetically with biblatex?

I have read the posts related to bibliography topic, but they cant really help me. I hope someone can really help me for these questions, as I have to hand it in on next monday...  I have also written all my questions in my MWE, so if you want to, you can read my script directly to save sometime!    In order to keep reference citation work, I keep the script for footpartcite, partcite, and footnote.  How to list the bibliography alphabetically? Now I got the correct way of showing the citation in footnote, but each citation has 2 numbers, it comes out like   1[1], 2[2], 3[3], 4[4]    I want it show as  [1],[2],[3],[4]   how to remove the number 1 before [1]?   I have used \footnoteref instead of \ref, because \ref doesnt appear as superscript in the text, if you know how to set it as a superscript of the text, then it will be even better, because it can be written inside a caption directly!  Solution for single question is also really appreciated! Thank you very much!  \documentclass[a4paper, 12pt, headsepline, DIV=12,twoside]{report} \usepackage[english]{babel} \usepackage{mathptmx}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{parskip} \usepackage{filecontents} \usepackage[backend=bibtex,style=numeric,sorting=none,natbib=true]{biblatex} \usepackage{textcomp} \usepackage{graphicx} \usepackage{csquotes}  \begin{filecontents}{\jobname.bib} @Electronic{unintentional, Title                    = {Accidents or Unintentional Injuries}, Author                   = {{National Center for Health Statistics}}, URL                      = {http://www.cdc.gov/nchs/fastats/accidental-   injury.htm}, urldate                  = {2016-08-10},}  @Book{HP,  Title                    = {Harry Potter and the Philosopher's Stone},  Author                   = {{Rowling,J. K. }},   Date                     = {1997}} @Misc{ASH, Title                    = {Automotive Safety Handbook}, Author                   = {{Seiffert, Ulrich; Wech, Lothar}}, Date                     = {2003}, Editor                   = {SAE International}, Note                     = {pp. 91, 96, 97}} \end{filecontents}   \DeclareCiteCommand{\footpartcite}[\mkbibfootnote] {\usebibmacro{prenote}} {\usebibmacro{citeindex}% \mkbibbrackets{\usebibmacro{cite}}% \setunit{\addnbspace} \printnames{labelname}% \setunit{\labelnamepunct} \printfield[citetitle]{title}}% {\addsemicolon\space} {\usebibmacro{postnote}}  \DeclareMultiCiteCommand{\footpartcites}[\mkbibfootnote]{\footpartcite}   {\addsemicolon\space}  \DeclareCiteCommand{\partcite}  {\usebibmacro{prenote}} {\usebibmacro{citeindex}%  \mkbibbrackets{\usebibmacro{cite}}%  \setunit{\addnbspace}  \printnames{labelname}% \setunit{\labelnamepunct}  \printfield[citetitle]{title}%  \newunit  \printfield{year}} {\addsemicolon\space} {\usebibmacro{postnote}} \DeclareMultiCiteCommand{\partcites}{\partcite}{\addsemicolon\space}  \usepackage{remreset} \makeatletter  \@removefromreset{footnote}{chapter} \newcommand\footnoteref[1]{\protected@xdef\@thefnmark{\ref{#1}}  \@footnotemark}  \makeatother  \addbibresource{\jobname.bib} \begin{document}  Q1: Each citation has two numbers. \footnoteref{ftn:unintentional} How to remove the number in front of the squared brackets. \footnoteref{ftn:unintentional}  Q2: know how to list the bibliography alphabetically. \footnote{\label{ftn:unintentional}\partcite{unintentional}}  Q3: how to put a footnoteref inside of a caption? because if I put it inside a caption of a table or figure, it will show error, but if I put it outside the caption bracket, \footpartcite{ASH} the footnoteref will show in the next line rather than as superscript of the caption.  \footnote{\label{ftn:HP}\partcite{HP}}   \begin{figure}[h] \includegraphics[width=\textwidth]{example-image-a} \caption{I am a figure}\footnoteref{ftn:HP} \end{figure}  Does anyone know how to solve them? Thank you very much!  \printbibliography \end{document}