I'd like to select the most recent row in a MS SQL Server 2008 R2 database based on a couple of factors.  I've seen a lot of people want to do the same thing online, and a lot of different proposed solutions, but most seem overcomplicated, and I can't get anything to work properly or do what I want.  I have data in a table where a particular thing (Room) will have a name, and a most recent status (AnalogValue; it correlates to online status) with a corresponding date/time (LogTimeStanp).  I'm most interested in the current online status for each room, so I just need the most recent row for each room.   There can be a number of rooms, for an example 1 - 5,000 (there's no imposed upper limit). There is a lot of data that pulls back when I look at the historic online status. There is other data in this table that I'm not interested in for this query. I have to join tables to get a readable room name, otherwise I just have a GUID. I'm not sure if I need to use MAX(), SELECT DISTINCT, Group by, or something else.  I have not been able to get these to work to my satisfaction.   This code does not work, but should give you an idea of what I want to do:  SELECT r.RoomName, a.AttributeID, a.AnalogValue, max(a.LogTimeStamp)   FROM CRV_AttributeLog a join CRV_Rooms r on a.RoomID=r.RoomID   where a.AttributeID like 'online_status'   My intent is to get the AnalogValue with the max (most recent) LogTimeStamp per individual room.  I have gotten a query to run with group by, but it doesn't seem to be grouping it (and certainly not by room name), so I guess I am doing it wrong.  Update 1, 2, 3, 4  Added pics for context.  Also, this query will form the basis of a report, so it has to be entirely referential, that's why I just want "the latest" online status.  Further complicating things, "the latest" may not have happened today, this week, or this month.  But it's in there, somewhere, sometime.  Each row in CRV_AttributeLog will have its own AttributeID and AnalogValue, and the row is made unique by the time stamp (LogTimeStamp).  Otherwise, it's entirely possible for AttributeID and AnalogValue to be matching across rows (and that's OK).  This table is logging information about when a few different somethings change: online status, if there is an error, etc.  ONLINE_STATUS can change from 0-2 (Offline, partially online, online) and will change between them periodically.  The other AttributeIDs' AnalogValues may also change back and forth depending on other conditions.      Desired Output  Room Name          AttributeID     AnalogValue     LogTimeStamp Conference Room    ONLINE_STATUS   0               2016-06-11 21:21:25:123 Gymnasium          ONLINE_STATUS   1               2016-07-21 20:23:45:456 Boardroom          ONLINE_STATUS   2               2017-02-17 05:15:37:951 Great Hall         ONLINE_STATUS   0               2016-10-23 07:28:54:753 ...


is about having colored links on screen while printing them black. The solution is  \documentclass{article} \usepackage[ocgcolorlinks]{hyperref} \begin{document} \href{https://tex.stackexchange.com/}{TeX Stackexchange} \end{document}      I would like to have the same functionality in ConTeXt. The only commands touching link colors that I know of are:  \setupcolors[state=start|stop] \setupinteraction[state=start|stop,color=...]   /edit: The question  provides the building blocks for a solution. Now we only need to find the code that renders links and replace it with \viewerlayer[view]{\color[#gotocolor]{#text}}\llap{\viewerlayer[print]{#text}}

It used to be possible to add hyperlinks to ConTeXt documents in the style of the LaTeX hyperref package. Minimal formerly-working example:  \def\href{\dodoubleempty\dohref} \def\dohref[#1][#2]{\leavevmode     \pdfstartlink     attr{/C [1 0 0] /Border [0 0 1]}     user{/Subtype /Link /A << /Type /Action /S /URI /URI     (#1) >>}\ifsecondargument #2\else #1\fi\pdfendlink}  \starttext Here is a \href [http://tex.stackexchange.com] [link] to my favourite web site. \stoptext   \stoptext  But it doesn't work with recent ConTeXt installations! As far as I can tell, the \pdfstartlink and pdfendlink commands are either silently ignored or treated as some sort of switch in/out of a verbatim mode. My guess is that something has changed in luaTeX.  What can I change in my old ConTeXt source files to make them compilable with current ConTeXt? I do know about the esoteric alternatives in  but that's not what I'm asking.


How to show that... $$x^4-10x^2+1$$ is reducible modulo $p$ for every prime $p$. I can show it, for say $2$,$3$....but should one proceed if he has to show for all primes.  Just don't seem to get it. Can somebody help me?

How do we show that  $X^4-10X^2+1$ is reducible modulo every prime $p$?    I've managed to show it for all primes less than 10, for primes greater than 10 we have $X^4+(p-10)X^2+1$. Where do I go from here?


Let say we have some DC voltage source which produce some voltage which I will label as V. Let also say that we have some real bulb which is supposed to work when voltage V is applied across its terminals. That bulb has some internal resistance R_internal. I will model real bulb as ideal bulb in series with its internal resistance R_internal. We know that for current to flow we need closed path between source and load so if we connect our voltage source and our bulb like on picture below, we will see light from bulb because current will flow:  I draw two equivalent schematics for this situation.  Let us now see another situation. We know that in AC wall outlet there are two "holes". Mathematical expression for voltage waveform between these two "holes" is shown on picture below:    If we represent voltage between these two "holes" as voltage generator like on picture below and if we connect to it some real bulb which is supposed to work with this AC voltage we will see light from bulb because we have completed circuit and alternating current can flow:    Why is it dangerous for human being to touch one of contacts in "holes" in AC wall outlet? I mean, according to previously discussed situations, there should be no closed path for current to flow If I stand on earth and touch one of contacts in AC wall outlet. I should touch both contacts in wall outlet for current to flow through me and that will be very dangerous. Thanks in advance.

If the live wire in above illustration touches to the metal case, a high short circuit current will flow to the earth through the safety earth wire and the fuse will trip.  Now imagine a 9V battery staying on a wooden table. If now its plus terminal is tied to the earth through a wire almost no current will flow.  Above two points shows that it is not the case that the earth is a reservoir that sucks all electrons, but simply current needs a loop to flow.  In the battery case it is obvious that there is no loop because the negative terminal is floating.  But what is the loop in the first AC case? Is that the AC generator star connection? Can you draw this loop to illustrate better?


I bought a lot of vbucks on mobile. I even bought the battle pass and a few skins and dances (on mobile). I also have a ps4 account which has the exact same username as my mobile. I linked my account to my ps4 and everything, but none of my purchases are showing up on my ps4, not even my progress. I've tried re-installing fortnite (on both platforms) as well as tried unlinking and linking it back on Ps4. Nothing is working. My skins and emotes on mobile, are not showing up on my Playstation. I've run out of ideas, help!

So I'm thinking of buying some V-Bucks on Fortnite, Battle Royale mobile. Do the purchases save cross platform?


In Windows 10 different software behaves differently when I am trying to save files to the C:\ root directory. Some simply fail/refuse, saying I have no permission (MS Word, console copy command etc.), others let me do that after I confirm my administrator permissions through UAC. Such behavior is not a problem I am trying to solve. There seems to be the third kind of software which behaves rather strange. So far I have only observed such behavior with , but I don't think it's IrfanView-specific. This is what IrfanView does when asked to save a file in C:. It doesn't ask for administrator permission, and neither it fails. It looks like it saves the file to C:\ silently and without a question. However, such files can only be seen in IrfanView: they are invisible for FileExplorer or for dir /a, but if I run IrfanView first and select its "Open" menu command, the files are there, can be opened, edited, saved again, moved, copied etc. So, what's happening? Is it some sort of a compatibility thing for software that is too dumb to ask for permissions? What does Windows 10 really do with those files?

I'm using an audio program called Supercollider on Windows 10. I have saved some files in a folder called "tunes" from SC via Save As, but Windows Explorer and CMD both seem unable to recognise access or recognise the "tunes" folder.  C:\Users\HP>cd "C:\Program Files (x86)\SuperCollider-3.7.2\supercollider-robin\tunes" The system cannot find the path specified.  C:\Program Files (x86)\SuperCollider-3.7.2\supercollider-robin>dir/a doesn't show it either.  However, when saving from SC with Save As, it's there clear as day. I can even shift+right-click to get the path: "C:\Program Files (x86)\SuperCollider-3.7.2\supercollider-robin\tunes"  This makes no sense to me. Can anyone explain and tell me how to access my folder tunes folder please?


Say you have two planes flying next to each other at the same speed and one decides to pick up speed by burning a tank of rocket fuel.  If someone on the ground wanted to know that plane's new speed after burning the fuel and knew the plane's mass, initial speed, and energy stored in the fuel, he could calculate it using conservation of energy.  If the pilot of the other plane wanted to calculate the same thing but didn't know his own speed, he could calculate the speed of the first plane relative to himself using conservation of energy--the initial relative speed is 0 and all the work done by the rocket fuel is converted into the plane's new kinetic energy.  He could then relay this relative speed to someone on the ground who knew his plane's speed, but adding the speed of the second plane to the calculated speed of the first relative to the second would give a different value for the first plane's speed than the first guy on the ground would have calculated.  I see why this doesn't work mathematically (a^2+b^2 isn't (a+b)^2), but why can't the second pilot calculate the new speed of the first plane relative to himself by converting the stored fuel energy into kinetic energy? Why when on the ground do we not consider our motion relative to, say, the moon when calculating the first plane's speed relative to us, but the second pilot must consider his speed relative to the ground before calculating the first plane's speed relative to himself? Or maybe to put it better, why is having no movement relative to the Earth instead of relative to the plane's initial speed (the second plane) or anything else the correct way to approach this problem?

If the velocity is a relative quantity, will it make inconsistent equations when applying it to the conservation of energy equations?  For example:  In the train moving at $V$ relative to ground, there is an object moving at $v$ relative to the frame in the same direction the frame moves. Observer on the ground calculates the object kinetic energy as $\frac{1}{2}m(v+V)^2$. However, another observer on the frame calculates the energy as $\frac{1}{2}mv^2$. When each of these equations is plugged into the conservation of energy, they will result in 2 distinct results (I think).


What are the multidimensional versions of the median and what are their pros and cons? I confess this doesn't have a single answer, but I think it is a useful question to ask and will be a benefit to others as well.  How stable it is (i.e. how many samples one needs to get a reasonable estimate of it) is one potential, but not necessary, pro and con issue, i.e. if you know that the number of samples necessary grows exponentially with each increase in dimension making it useful in 10 dimensions but effectively useless in 200 dimensions, that would be useful to know. (I would kind of expect all of them have that, really, because there is so much "freedom" in 200 dimensions it just takes a bazillion points to nail the basic middle of a distribution down along that many directions).  Note: I found  after accepting an answer for this. I hadn't seen it before because I didn't realize there was both a multivariate-analysis and a multivariable tag. I am not sure why geometric median was an unpopular answer there (1 vote and near the bottom) but a popular answer here.

If so, what? If not, why not?  For a sample on the line, the median minimizes the total absolute deviation. It would seem natural to extend the definition to R2, etc., but I've never seen it. But then, I've been out in left field for a long time.


I have Ubuntu 13.10 installed.  When I try to install intel-linux-graphics-installer_1.0.2-0intel3_i386.deb  I have error:  dependency is not satisfiable libpackagekit-glib2-14   Why this happens ?

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I created a regex to parse two floating point numbers and a * symbol between them using Python. As I am completely new to both I've tried basic online guides on using re library and regex itself. I came up with ((\d+)?(\.?)\d+)\*((\d+)?(\.?)\d+) which works fine  even for the string in question, 2+21.0*2*2.  But if I use this expression and string in Python like so m = re.match(r"((\d+)?(\.?)\d+)\*((\d+)?(\.?)\d+)", "2+21.0*2*2") it gives me "None" object. I do not see any obvious problems, any ideas why it does not work?

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I'm having a little trouble with this integral:  $\int^\infty_0 (\sqrt{x^4+1} - x^2)\,dx$.  Using the likes of Maple, I can easily find that it takes the form  $-\frac{2}{3}\sqrt{2}(1+i)K(i) - \frac{1}{3}\sqrt{2}(1+i)K(\sqrt{2})$,  where   $K(m) = \int_0^{\pi/2} \frac{d\theta}{\sqrt{1 - m\sin^2\theta}}$  is the complete elliptic integral of the first kind. However, I am looking at a textbook which tells me the solution is simply  $\frac{\Gamma^2(1/4)}{6\sqrt{\pi}}$,  with $\Gamma$ denoting the usual gamma function  $\Gamma(t) = \int^\infty_0 e^{-u}u^{t - 1}du$.  I've thrown a fair amount at this: trying to reduce it via various substitutions to, for instance, a combination of beta functions which can be rewritten as gamma functions via  $B(m,n)= \frac{\Gamma(m)\Gamma(n)}{\Gamma(m+n)}$,  or just a combination of elliptic $K$ functions. Even after a fair amount of time consulting Gradshteyn and Ryzhik, I can't seem to get anywhere... I'd like to eventually get to the gamma function solution, and I'd be most grateful to anyone who can help me get there, even if it's just via a nudge in the right direction.

I have in trouble for evaluating following integral  $$\int_0^{\infty}  \left(\sqrt{1+x^{4}}-x^{2}\right)\ dx=\frac{\Gamma^{2}\left(\frac{1}{4}\right)}{6\sqrt{\pi}}$$  It seems really easy, but I don't know how to handle it at all. (The results are well known, here I tried to evaluate it but I failed)  I tried to use the relation   $$\sqrt{1+x^{4}}-x^{2}=\frac{1}{\sqrt{1+x^{4}}+x^{2}}$$   but I couldn't find the desired results.


In a Neural Network training, the cost of the model changes throughout the training process when using gradient descent (or something analogous), this is the point of the algorithm. However the cost might not decrease monotonically. In some points the cost might even increase.    So, Is it OK to keep track of the parameters that output the lowest cost and use those as the best parameters for the model? In the image it would imply using the parameters that output the lowest cost instead of the last parameters found.  Assume that the cost returned by the lowest cost outputs an acceptable model accuracy.  Does doing this cause some kind of problem?

I have a deep neural network model and I need to train it on my dataset which consists of about 100,000 examples, my validation data contains about 1000 examples. Because it takes time to train each example (around 0.5s for each example) and in order to avoid overfitting, I would like to apply early stopping to prevent unnecessary computation. But I am not sure how to properly train my neural network with early stopping, several things I do not quite understand now:   What would be a good validation frequency? Should I check my model on the validation data at the end of each epoch? (My batch size is 1) Is it the case that the first few epochs might yield worse result before it starts converging to better value? In that case, should we train our network for several epochs before checking for early stopping? How to handle the case when the validation loss might go up and down? In that case, early stopping might prevent my model from learning further, right?   Thank you in advance.


I am trying to convert the following code which is in c# to java. And I am facing difficulty in converting it. Please can anyone suggest me a simple way to do it in Java.   if (Password.Length <= 8)             Password = Password.PadRight(8);         else             Password = Password.PadRight(20);

Is there some easy way to pad Strings in Java?  Seems like something that should be in some StringUtil-like API, but I can't find anything that does this.


Let $A,B \in M(n,\mathbb C)$ ; if $\exists P \in M(n, \mathbb C)$ and $f(X) , g(X) \in \mathbb C[X]$ such that $A=f(P) , B=g(P)$ then $AB=BA$ . Now suppose $AB=BA$ ; then does there exist $P \in M(n,\mathbb C)$ and $f(X) , g(X) \in \mathbb C[X]$ such that $A=f(P)$ and $ B=g(P)$ ? If this is not true in general , then what if we assume that both $A,B$ are diagonalizable ? Is it true then ?

Consider square matrices over a field $K$. I don't think additional assumptions about $K$ like algebraically closed or characteristic $0$ are pertinent, but feel free to make them for comfort. For any such matrix $A$, the set $K[A]$ of polynomials in $A$ is a commutative subalgebra of $M_n(K)$; the question is whether for any pair of commuting matrices $X,Y$ at least one such commutative subalgebra can be found that contains both $X$ and $Y$.  I was asking myself this in connection with frequently recurring requests to completely characterise commuting pairs of matrices, like . While providing a useful characterisation seems impossible, a positive anwer to the current question would at least provide some answer.  Note that in many rather likely situations one can in fact take $A$ to be one of the matrices $X,Y$, for instance when one of the matrices , or more generally if its  (so coincides with the characteristic polynomial). However this is not always possible, as can be easily seen for instance for diagonal matrices $X=\operatorname{diag}(0,0,1)$ and $Y=\operatorname{diag}(0,1,1)$. However in that case both will be polynomials in $A=\operatorname{diag}(x,y,z)$ for any distinct values $x,y,z$ (then $K[A]$ consists of all diagonal matrices); although in the example in  the matrices are not both diagonalisable, an appropriate $A$ can be found there as well.   I thought for some time that any maximal commutative subalgebra of $M_n(K)$ was of the form $K[A]$ (which would imply a positive answer) for some $A$ with minimal polynomial of degree$~n$, and that a positive answer to my question was in fact instrumental in proving this. However I was wrong on both counts: there exist (for $n\geq 4$) commutative subalgebras of dimension${}>n$ (whereas $\dim_KK[A]\leq n$ for all $A\in M_n(K)$) as shown in , and I was forced to correct  in the light of this; however it seems (at least in the cases I looked at) that many (all?) pairs of matrices $X,Y$ in such a subalgebra still admit a matrix $A$ (which in general is not in the subalgebra) such that $X,Y\in K[A]$. This indicates that a positive answer to my question would not contradict the existence of such large commutative subalgebras: it would just mean that to obtain a maximal dimensional subalgebra containing $X,Y$ one should in general avoid throwing in an $A$ with $X,Y\in K[A]$. I do think these large subalgebras easily show that my question but for three commuting matrices has a negative answer.  Finally I note that  to the cited MO question mentions a result by Gerstenhaber that the dimension of the subalgebra generated two commuting matrices in $M_n(K)$ cannot exceed$~n$. This unfortunately does not settle my question (if $X,Y$ would generate a subalgebra of dimension${}>n$, it would have proved a negative answer); it just might be that the mentioned result is true because of the existence of $A$ (I don't have access to a proof right now, but given the formulation it seems unlikely that it was done this way).  OK, I've tried to build up the suspense. Honesty demands that I say that I do know the answer to my question, since a colleague of mine provided a convincing one. I will however not give this answer right away, but post it once there has been some time for gathering answers here; who knows somebody will prove a different answer than the one I have (heaven forbid), or at least give the same answer with a different justification.


I am implementing DTLS 1.2 and using ECDHE_RSA_AES_128_GCM_SHA256 cipher suit.  Below is my client finished message    Can anyone explain this message?  How many bytes for verify data?  Is there authentication tag if yes then how many bytes for authentication tag?  And how many bytes for nonce?  And is all the message encrypted if not then how many bytes are encrypted?  How can i verify this message?

I am implementing TLS 1.2 and using ECDHE_RSA_AES_128_GCM_SHA256 cipher suit.  According to RFC 5246 finished messages have {verify_data[verify_data_length]} and verify_data = PRF(master_secret, finished_label, hash(handshake_messages)  Some people said client finished contain Authentication tag and nonce along whit verify data. Can anyone tell me the structure of finished message in this cipher suit and exactly the size of verify data, authentication tag and nonce.  Below is my Client Finished message @Makif can you tell me how may bytes are encrypted and where is authentication tag in this message?    @Makif, Got it.  -8 byte nonce  -16 byte ciphertext  -16 byte authentication tag  Total is 40 byte but my finished message contain 48 bytes. What is about last 8 byte?


I've installed Lubuntu and replaced the default players with Clementine for audio and VLC for video.  The problem I have is that neither pick up the GTK theme, the way they usually do in Gnome/Xfce. Instead they use some pretty ugly and totally off theme.  To be clear, both are Qt4 applications and should pickup the theme by default.  How can I fix this?

When I start any Qt app, I get this message in the terminal, and the Qt app doesn't use the same theme as my Gtk apps:  QGtkStyle was unable to detect the current GTK+ theme.   How do I make QGtkStyle detect my current GTK+ theme?  It seems that LXDE is using a settings daemon, and there is no gtkrc-2.0 file in my home folder.


I was trying to install Ubuntu 16.04 on my flash drive, but it installed on the computer (at a public library) that I was using (although the computer still runs Windows 7). The librarians asked me to uninstall it because the Ubuntu purple boot menu pops up every time somebody starts the computer. How do I uninstall Ubuntu (preferably without a cd). This question is not a duplicate because I am asking for instructions when Windows is still on the computer, and I specified that I would rather not use a cd.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I'm trying to convert all wav and mp3 files to ogg files recursively with find and FFmpeg. I have made the following bash script to do so:  #!/usr/bin/env bash  # Converts samples to ogg  find samples \( -iname '*.wav' -o -iname '*.mp3' \) -execdir ffmpeg -i "$(basename "{}")" -qscale:a 6 "${$(basename "{}")%.*}.ogg" \;   This however errors in:  ${$(basename "{}")%.*}.ogg: bad substitution   How would I need to format the last substitution to make it give back the basename of the file suffixed with .ogg, and why does this not work?

I'm trying to use find to echo 0 into some files, but apparently this only works with sh -c:  find /proc/sys/net/ipv6 -name accept_ra -exec sh -c 'echo 0 > {}' \;   But using sh -c with find -exec makes me feel very uneasy because I suspect quoting problems. I fiddled a bit with it and apparently my suspicions were justified:   My test setup:  martin@dogmeat ~ % cd findtest  martin@dogmeat ~/findtest % echo one > file\ with\ spaces martin@dogmeat ~/findtest % echo two > file\ with\ \'single\ quotes\' martin@dogmeat ~/findtest % echo three > file\ with\ \"double\ quotes\" martin@dogmeat ~/findtest % ll insgesamt 12K -rw-rw-r-- 1 martin martin 6 Sep 17 12:01 file with "double quotes" -rw-rw-r-- 1 martin martin 4 Sep 17 12:01 file with 'single quotes' -rw-rw-r-- 1 martin martin 4 Sep 17 12:01 file with spaces  Using find -exec without sh -c seems to work without problems - no quoting necessary here:  martin@dogmeat ~ % find findtest -type f -exec cat {} \; one two three  But when I'm using sh -c {} seems to require some kind of quoting:  martin@dogmeat ~ % LANG=C find findtest -type f -exec sh -c 'cat {}' \; cat: findtest/file: No such file or directory cat: with: No such file or directory cat: spaces: No such file or directory cat: findtest/file: No such file or directory cat: with: No such file or directory cat: single quotes: No such file or directory cat: findtest/file: No such file or directory cat: with: No such file or directory cat: double quotes: No such file or directory  Double quotes work as long as no file name contains double quotes:  martin@dogmeat ~ % LANG=C find findtest -type f -exec sh -c 'cat "{}"' \; one two cat: findtest/file with double: No such file or directory cat: quotes: No such file or directory  Single quotes work as long as no file name contains single quotes:  martin@dogmeat ~ % LANG=C find findtest -type f -exec sh -c "cat '{}'" \; one cat: findtest/file with single: No such file or directory cat: quotes: No such file or directory three    I haven't found a solution that works in all cases. Is there something I'm overlooking, or is using sh -c in find -exec inherently unsafe?


Let the sequence of real numbers is defined as follows: $x_1=\frac{1}{2}$ and $x_{n+1}=x_n-x_n^2$. Show that $\lim_{n\to \infty}nx_n=1$.  I've shown that the limit of $x_n$ is zero since this sequence  is bounded and monotone. How to show that $nx_n\to 1$ as $n\to \infty$?  I have no ideas how to handle this problem.  It would be interesting to see approach.

$n\in N,   a_{n+1} = a_n  (1 - a_n)$ , $0 < a_0 < 1$. Prove that $\lim\limits_{n\to\infty} a_n\cdot n = 1$. I proved that $\lim\limits_{n\to\infty} a_n = 0$ and that $a_n$ is strictly decreasing. I tried Cezaro Stolz but didn't get anywhere. Thanks in advance.


I want to prove that $\lim_{x\to 0}\frac{\ln (1+x)}{x}=1$ by Taylor series. I have get to the step: $$\lim_{x\to 0}\frac{\ln (1+x)}{x}=\lim_{x\to 0}\frac{x-\dfrac{x^2}{2}+\dfrac{x^3}{3}-\dfrac{x^4}{4}+\cdots}{x}$$  Next, when $x\neq0$, $\frac{x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\cdots}{x}=\frac{1}{x}\left(x-\frac{x^2}{2}+\frac{x^3}{3}-\frac{x^4}{4}+\cdots\right)=1-\frac{x}{2}+\frac{x^2}{3}-\cdots$. This is valid because $\sum_{n=1}^\infty(-1)^{n+1}\frac{x^n}{n}$ converges for every $x\neq 0$ near $0$, and then we can multiply a constant $\frac{1}{x}$ inside it. However, how can I rigorously and easily say that $\lim_{x\to 0}(1-\frac{x}{2}+\frac{x^2}{3}-\cdots)=1$?

How would I use the definition of derivative to prove  $$\lim_{x\to 0} \frac{\ln(1+x)}{x} = 1$$  I got to $$\frac{\frac{\ln(1+x+h)}{(x+h)} - \frac{\ln(1+x)}{x}}{h}$$ but have no idea where to go from here.   On another site I found someones answer where they stated the following: $$ \lim_{x\to 0} \frac{\ln(1+x) - \ln(1+0)}{x-0}  = [\ln(1+x)]'\rvert_x = 0 $$ but I am unsure why the $x$ in the $x-0$ is removed. Can someone please explain?


When somebody replies to or pings me, and I click on the little notification circle, their message is highlighted in yellow. It also makes the right side of the .message div shorter by about 50 pixels.  The problem with that is that the flag, star, and reply buttons are contained within the .message, so they are moved ~50px to the left from where I expect them to be. Of course by the time I figure out where they've moved to, the message becomes un-highlighted and they move back to where they normally are.  This bug is most likely caused by this snippet that's in :  .message.highlight {     margin-right: 48px }   Is this supposed to be that way? Is there even any point to the .message.highlight section? Should it be removed?

The chat is pretty great. But it has an obscure and frustrating phenomenon. When I get pinged, the message gets highlighted, which shoves the icons over to the left a little for some reason.    Since I'll very often want to reply to a message that pings me, I'll move my mouse to that reply icon...    ... and it just so happens that the amount of time it takes to position my mouse on that small icon is the same amount of time it takes for the highlight to end, so the margins shift over to the right again just when I'm ready to click.  The culprit!  This line of CSS appears to be the troublemaker:    With it disabled, I think the phenomenon would disappear.    (I'm using Firefox 26.)


Edit: Let $a$ and $b$ be two real positive numbers. If $\frac{1}{a} + \frac{1}{b} = 2$, show that $a+b+\frac{1}{1+ \sqrt{ab}} \ge \frac{5}{2}$. How to factorize the term $\frac{1}{1+\sqrt{ab}}$ out, to get ineq by the AM-GM ineq?

Kazakstan 2012 Suppose that $a, b \in\mathbb{R}$, and $a,b>0$. If $\frac{1}{a}+\frac{1}{b}=2$ prove that $a+b+\frac{1}{1+\sqrt{ab}}\geq\frac{5}{2}.$ My idea : $a+b+\frac{1}{1+\sqrt{ab}}$ can be written as $ab(\frac{a+b}{ab}+\frac{1-\sqrt{ab}}{1-ab})=2ab+\frac{1-\sqrt{ab}}{ab-a^2b^2}$, but where  can I use the fact that $\frac{1}{a}+\frac{1}{b}=2?$


It is well-known that the only continuous functions $f\colon\mathbb R\to\mathbb R^+$ satisfying $f(x+y)=f(x)f(y)$ for all $x,y\in\mathbb R$ are the familiar exponential functions.  (Prove $f(x)=f(1)^x$ successively for integers $x$, rationals $x$, and then use continuity to get all reals.)  The usual example to show that the identity $f(x+y)=f(x)f(y)$ alone doesn't characterize the exponentials requires the axiom of choice.  (Define $f$ arbitrarily on the elements of a Hamel basis for $\mathbb R$ over $\mathbb Q$, then extend to satisfy the identity.)  Is there an explicit construction of a discontinuous function satisfying the identity?  On the other hand, does the existence of such a function imply the axiom of choice or some relative?

A UC Berkeley prelim exam problem asked whether an additive function $f\colon {\mathbb R} \to {\mathbb R}$, i.e. satisfying $f(x + y) = f(x) + f(y)$ must be continuous. The counterexample involved taking a positive-valued Hamel basis $X$ of $\mathbb{R}$ as a vector space over ${\mathbb Q}$, and then letting $f(x_1) =1$ and $f(x_2)=-1$ for two different $x_1,x_2 \in X$, and letting $f(x)$ be arbitrary for other $x \in X$, and then extending the function to all of ${\mathbb R}$ using the property of additivity. Then a sequence $a_n = {p_nx_1 + q_nx_2}$ could be found with rational $p_n,q_n$ such that $a_n \to 0$ but $\lim \limits_{n\to \infty} f(a_n) \neq 0$, showing discontinuity. But is Zorn's Lemma necessary to produce such an example? In other words, is Zorn's Lemma saying we can find a Hamel basis of ${\mathbb R}$ over ${\mathbb Q}$ equivalent to being able to construct a discontinuous additive function $f\colon {\mathbb R} \to {\mathbb R}$?


related question:     for setting  my existing Ubuntu 12.04 server has LANGUAGE as en_US: And I can set it to en_US:utf8 as well. What is the difference ?  existing configuration is, which i found by typing locale    LANG=en_US.utf8 LANGUAGE=en_US: LC_CTYPE="en_US.utf8" LC_NUMERIC="en_US.utf8" LC_TIME="en_US.utf8" LC_COLLATE="en_US.utf8" LC_MONETARY="en_US.utf8" LC_MESSAGES="en_US.utf8" LC_PAPER="en_US.utf8" LC_NAME="en_US.utf8" LC_ADDRESS="en_US.utf8" LC_TELEPHONE="en_US.utf8" LC_MEASUREMENT="en_US.utf8" LC_IDENTIFICATION="en_US.utf8" LC_ALL=   EDIT: right now LANGUAGE is en_US:. notice the colon at the end

For setting locale in Ubuntu, what does the LANGUAGE environment variable mean?  It is not defined in  or on .  Related question:


I cannot seem to figure this out. It's frustrating, as there is no information in the help file, control settings, or even their guide.  How do you holster weapons? I would like to stop scaring civilians away.  I am playing on Xbox One.

Seems like you spook civilians whenever you walk by them, is there a way to hide weapons to appear less aggressive?


I made a major mistake by putting in this code:   vim /etc/lightdm/lightdm.conf    and then changing the line   greeter-session=unity-greeter    to  greeter-session=lightdm-gtk-greeter   But now I get a low graphics error. I found some answers on how to fix this, but I am struggling with opening the terminal to do it. The instructions on this website  would be helpful if I could get into the terminal, but when I press Ctrl+Alt+F1 nothing happens except the cursor freezes.   So I am looking for a workaround and I considered changing grub as the terminal does open up there. But I ran into a new problem - grub does not recognize sudo and other commands.

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


From wikipedia  :     because a biased estimator gives a lower value of some loss function (particularly mean squared error) compared with unbiased estimators (notably in shrinkage estimators)   Further evidence is provided in the linked wiki article on shrinkage estimators  :      A well-known example arises in the estimation of the population variance by sample variance. For a sample size of n, the use of a divisor n − 1 in the usual formula (Bessel's correction) gives an unbiased estimator, while other divisors have lower MSE, at the expense of bias. The optimal choice of divisor (weighting of shrinkage) depends on the excess kurtosis of the population, as discussed at mean squared error: variance, but one can always do better (in terms of MSE) than the unbiased estimator; for the normal distribution a divisor of n + 1 gives one which has the minimum mean square error.   An insight into the tradeoffs of minimizing MSE vs retaining the properites of unbiased estimation and  consistency would be helpful. Some practical insights and/or examples into when a biased estimator would be preferred would also be appreciated.

It's obvious many times why one prefers an unbiased estimator. But, are there any circumstances under which we might actually prefer a biased estimator over an unbiased one?


I tried to prove an inequality in an inner product space $X$ which is as follows,  Let $M$ be a linear set in an inner product space $X$, and $x$$∈$$X$ such that $ρ$ = $inf$$_y$$_∈$$_M$ $\|$$x$$-$$y$$\|$. Prove that for any $y$$_1$, $y$$_2$ $∈$ $M$, $\|$$y$$_1$$-$$y$$_2$$\|$ $\leq$ $($$\|$x$-$$y$$_1$$\|$$^2$$-$$ρ$$^2$$)$$^1$$^/$$^2$ $+$$($$\|$x$-$$y$$_2$$\|$$^2$$-$$ρ$$^2$$)$$^1$$^/$$^2$. I tried to use the property of inner product and best approximation but somewhere lost in the middle and couldn't get the desired result. How should I proceed?

Let $X$ be an inner product space, let $L\subset X$ be a vector subspace, let $x\in X$, let $d=\inf_{y\in L}\left\|x-y\right\|$, and let $y_1,y_2\in L$.  Could someone please provide a hint of how to show that  $$\left\|y_1-y_2\right\|\leq\sqrt{\left\|y_1-x\right\|^2-d^2}+\sqrt{\left\|y_2-x\right\|^2-d^2}\tag*{?}$$  I have tried the parallelogram law and orthogonal decomposition to no avail. The case where $x\in\overline L$ is straightforward.


My defrosted dough hard to handle once I put stuff on it. I make a horrible mess getting onto the pizza stone. I wind up with at least part of the pizza dough folded over on itself. I never used to have quite so much trouble. I was using a wooden pizza peel; I just tried a metal one for the first time and still have the same problems. what am I doing wrong

After I have made my pizza and put the toppings onto it, I find that I am unable to transfer the pizza on to the pizza stone in the oven.  When I try to do it the pizza goes out of shape, gets folded, the toppings get messed up and sometimes it sticks or rips. I have tried putting lots of flour under the pizza before I add the toppings but it didn't really help.  I am having to make the pizza on a metal tray and then put the tray onto the stone. Put I think that doing this prevents my pizza base from crisping properly.  What am I doing wrong? Is there some technique I should use, or am making the dough to wet, or to thin or something?


I am working on a unix-like file system and I need to take in commands from the command line. Some commands are one argument like mkfs, ls, etc. But some are two commands like mkdir foo, rmfile hello. My question is, how can I parse the string to take in a command (cmd), but also take in a second argument (next)? Here is my code so far: (I have not included the functions for the sake of space)  int main(int argc, char *argv[]){      string cmd;     string next;       while (1){         cout << "Russ_John_Shell> ";         cin >> cmd;            //Checks to see whether the string has a file/directory name after the command         if (next == ""){             //mkfs command             if (cmd == "mkfs"){                 makeFS();             }             //exit command             else if (cmd == "exit"){                 exitShell();             }              //ls command             else if (cmd == "ls"){                 listDir();             }             //command not recognized at all             else {                 printf("Command not recognized.\n");             }          }         else{              //mkdir command             if (cmd == "mkdir"){                 makeDir(next);             }             //rmdir command             else if (cmd == "rmdie"){                 remDir(cmd);             }             //cd command             else if (cmd == "cd"){                 changeDir(next);             }             //stat command             else if (cmd == "stat"){                 status(next);             }             //mkfile command             else if (cmd == "mkfile"){                 makeFile(next);             }             //rmfile command             else if (cmd == "rmfile"){                 remFile(next);             }             //command not recognized at all             else {                 printf("Command not recognized.\n");             }         }     } }   Thanks in advance for any help!

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


I am trying to install steam for Ubuntu, yet I get forbidden messages when following these two tutorials:     http --download http://repo.steampowered.com/steam/archive/precise/steam_latest.deb HTTP/1.1 403 Forbidden    http --download http://media.steampowered.com/client/installer/steam.deb HTTP/1.1 403 Forbidden    it seems those guides are outdated. How to install the latest steam client on Ubuntu?


Find maximum possible $n$ in the equation $61!=3^n\cdot m$.   Some textbooks gives a solution to this question like this: \begin{align*} 61&=\textbf{20}\cdot 3+1 \\ 20&=\textbf{6}\cdot 3+2 \\ 6&=\textbf{2}\cdot3+0 \end{align*} $n_{max} = 20+6+2$. But this comes me unintuitive. And seems like it's working. Why this solution is true. Can you give an explanation?  I don't think the answer in  gives an understanding directly to solution i wrote since the algorithm continues dividing with the last full part.

How does one find the highest power of a prime $p$ that divides $N!$ and other related products?  Related question: How many zeros are there at the end of $N!$?    This is being done to reduce abstract duplicates. See   and  for more details.


We know that if the integers $a$ and $b$ are coprime, then there exist integers $x$ and $y$ such that $xa+yb=1$. I am wondering whether we could have the following statement true: Statement A: if gcd($a,b$)=$\pm 1$, then there exists an integer $x$ or $y$ (okay if either one of them exists) such that $|xa+b|$ or $|a+yb|$ is a prime number or $1$. Or could we have the following statement: Statement B: if gcd($a,b$)=$\pm1$ and both $a$ and $b$ divide $c\neq0$, then there exists an integer $x$ or $y$ such that gcd($xa+b,c$)=$\pm1$ or gcd($a+yb,c$)=$\pm1$. (Again that either one of $x$ and $y$ exists is OK.)

I can't crack this one.      Prove: If $\gcd(a,b,c)=1$ then there exists $z$ such that $\gcd(az+b,c) = 1$ (the only constraint is that  $a,b,c,z \in \mathbb{Z}$ and $c\neq 0)$


I've read in several places that it's better to omit "that" in sentences, because it's best to omit extra words. Also in programs like "Grammarly" and "Pro Writing Aid" they recommend removing it for that reason.   But sometimes it feels/sounds like it's not grammatically correct. Are there rules that govern whether one can/should remove it? Is it a matter of style?  "...the plane Bill had folded..." vs. "the plane that Bill had folded..."

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


setTimeout(() => {   var x = element.getBoundingClientRect().x;   var y = element.getBoundingClientRect().y;   element.style.left = x + 'px';   element.style.top = y + 'px';   element.style.position = 'fixed';   window.scrollX; // (comment out this line to break the code!)   element.style.left = parseFloat(element.style.left) + 30 + 'px'; }, 1000); #element {   background-color: #fa4;   width: 100px;   height: 100px;   position: static;   transition: 1s; }

         I want to take  a static positioned element and changed to fixed in the same place, then change the left value to move it around. The element's style.transition property is set to 1s.  The following does not work in chrome/safari/firefox (the element jumps to its new position instead of smoothly transitioning):  let x = element.getBoundingClientRect().x; let y = element.getBoundingClientRect().y; element.style.left = x + 'px'; element.style.top = y + 'px'; element.style.position = 'fixed'; element.style.left = parseFloat(element.style.left) - 500 + 'px';   On the other hand, the following slightly different code does work:  element.style.left = element.getBoundingClientRect().x + 'px'; element.style.top = element.getBoundingClientRect().y + 'px'; element.style.position = 'fixed'; element.style.left = parseFloat(element.style.left) - 500 + 'px';   In fact, even this works:  let x = element.getBoundingClientRect().x; element.style.left = x + 'px'; element.style.top = element.getBoundingClientRect().y + 'px'; element.style.position = 'fixed'; element.style.left = parseFloat(element.style.left) - 500 + 'px';   Or this (!!):  let x = element.getBoundingClientRect().x; let y = element.getBoundingClientRect().y; element.style.left = x + 'px'; element.style.top = y + 'px'; element.style.position = 'fixed'; window.scrollX; element.style.left = parseFloat(element.style.left) - 500 + 'px';   I am trying to deepen my understanding of javascript. Can someone explain to me what causes the last 3 examples to work?  Obviously, I can guess this is something to do with the browser being forced to "recognize" the new left and top values before the left value is changed again in the last line, but I would like to know exactly why and how this is happening, and also if this phenonemon is known by some name.

What kinds of activities will trigger reflow of web page with DOM?  It seems there are different points of view. According to ,  it happens   When you add or remove a DOM node. When you apply a style dynamically (such as element.style.width="10px"). When you retrieve a measurement that must be calculated, such as accessing offsetWidth, clientHeight, or any computed CSS value (via getComputedStyle() in DOM-compliant browsers or currentStyle in IE).   However, according to , taking measurement triggers reflow only when there is already reflow action queued.  Does anybody have any more ideas?


When you have written in the shell $ somecmd and double tab, you get all the suggestions that apply for that command. How can you redirect this output?   I am aware of , it seems to be able to do what I want, but I can only make it print possible completions for the command name, but not for the command arguments.  Edit:  Just to clarify. As I mentioned above, I know how to get the list of all possible command name completions as is described in . The question here is how to get the completion list for an argument?  If you have in shell $ somecmd and then double-hit tab, it will show for example a, ab, abc.\  If you have in shell $ somecmd ab, double-tabbing returns ab and abc.

On the command line, I can redirect or pipe output of a command to a file or another command using the > or | operator after the command. I have come across a less standard situation that I would like to redirect the output to a file, but I don't seem to have the oppurtunity to redirect it:  When at a new terminal,  [chiliNUT ~]$   if I press Tab without typing anything first, I get asked   display all 1725 possibilities? (y or n)   and if I then type y, I get a nice long list of different commands. How can I redirect or pipe this output to a file? I don't seem to get the chance to type > myfile.txt anywhere.  Using CentOS release 6.4 (Final).


Not sure if this is a Ubuntu specific question or something specific to the DE I am using (MATE).  Is there any way to increase the area to drag-resize windows on the desktop? This is the spot in the lower right of each desktop window. When you hover over you see the 'drag-resize' icon with a diagonal arrow. It can be very difficult to precisely select.

It takes me about 5 tries to resize a window on my computer.  Is there a way to increase the resize margin on the edge of windows?


Installing Deb packages on the command line, using dpkg -i, only installs the package in question and displays errors of unresolved dependencies (manually solved by apt-geting the packages it complains about). How do I automatically resolve dependencies when installing standalone packages?

I'm trying to install  on my Ubuntu box (11.04). The website has a Ubuntu .deb available for download (for 10.10 and 10.04 so I chose 10.10).   However,   sudo dpkg -i mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb   yields:  (Reading database ... 194069 files and directories currently installed.) Preparing to replace mysql-workbench-gpl 5.2.34-1ubu1010 (using mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb) ... Unpacking replacement mysql-workbench-gpl ... dpkg: dependency problems prevent configuration of mysql-workbench-gpl:  mysql-workbench-gpl depends on libctemplate0; however:   Package libctemplate0 is not installed.  mysql-workbench-gpl depends on libpython2.6 (>= 2.6); however:   Package libpython2.6 is not installed.  mysql-workbench-gpl depends on libzip1 (>= 0.8); however:   Package libzip1 is not installed.  mysql-workbench-gpl depends on python-paramiko; however:   Package python-paramiko is not installed.  mysql-workbench-gpl depends on python-pysqlite2; however:   Package python-pysqlite2 is not installed. dpkg: error processing mysql-workbench-gpl (--install):  dependency problems - leaving unconfigured Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for python-gmenu ... Rebuilding /usr/share/applications/desktop.en_US.utf8.cache... Processing triggers for python-support ... Errors were encountered while processing:  mysql-workbench-gpl   My question is, is there a way to tell dpkg to automatically fetch missing dependencies, or do I need to manually apt-get install missing packages like libctemplate0 and  libpython2.6?   (Or alternatively, is there some other way to get MySQL Workbench easily up & running?)


Prove that if function $f: [0,1] \to [0,1] $ is continuous and $f(0) = 0, f(1) = 1, f(f(x)) = x \ \forall x \in [0,1]$, then $ f(x) = x \ \forall x \in [0, 1]$. I have tried to prove this by contradiction, but all I could get is that if for some $a$ $f(a) \neq a$, then the function should have a "symmetrical" point $(f(a), a)$

If $f$ is continuous from $ [0,1]$ to itself and $f(0)=0$, $f(1)=1$ and $f(f(x))=x$ then show that $f(x)=x$ for every $ x $ in the domain of function.  I'd like to prove this statement, my idea goes like below:  Suppose that the converse of the statement holds. then without loss of generality, assume that there exists some $c$ in $[0,1]$ such that $d=f(c)>c$. By symmetry, $f(d)=f(f(c))<f(c)=d$. And $f$ is bijective because $f$ has an inverse function in this domain. So $f$ should be strictly increasing function. But on $[c,d]$, $f$ is decreasing. This is a contradiction.  So it should be that $f(x)=x$ on $[0,1]$.  Is this argument right? And I'd like to know another argument which prove this statement. Thank you for your answer in advance :)


I would like to align the equation like this but instead have the label (40.a) and (40.b) for the last two lines. I don't know how to do this with subequations because of the \times\left{ that should be aligned with the =.    The code (moved from comment):  \documentclass{article}  \begin{document} \begin{eqnarray}  \begin{array}{cl} a & =b(x)\[10pt] & \times\left\{ \begin{matrix}   c&\text{if }x<1, \[10pt] d&\text{if }x>1.    \end{matrix} \right.  \end{array}  \end{eqnarray}. \end{document}

As much as I have tried, it doesn't seem possible to use separate labels when using a casesconstruction (from the amsmath package).  Ideally, I would like to be able to write something like  \documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation} f(x)=\begin{cases}   1&x\geq0\label{positive}\\   0&x<0\label{negative} \end{cases} \end{equation} \end{document}   and later refer to both cases at different places. What would be the best way to achieve this result?


It's like I'm just trying to get some content on my layout page for which will appear in the menu.  Right now, it only presents problems as it does not show it.  It looks like this in my "Helper" class that displays menu content.  public readonly DBContext _dbContext;      public HelperViewClass(DBContext context)     {         _dbContext = context;     }      public static List<ContentInfo> ListMenu()     {         return _dbContext.ContentInfo.Where(i => i.ShowMenu == true).OrderByDescending(i => i.Id).ToList();     }   Error: An object reference is required for the non-static field, method, or property 'HelperViewClass._dbContext'  How should it be?  What I want this piece to do is send the content back with showmenu == true. That's just what it's supposed to do.

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


What happens to flags waiting for review for an account, when that account is deleted?  Are they deleted with the account or do they stay in the queue anonymised?

Let's say a user who we'll call "Jim" has raised X number of flags on various posts around a particular Stack Exchange. Those flags haven't been resolved yet by a moderator, i.e., they haven't been marked as helpful / declined / disputed.  Jim then asks for his account to be deleted, and it's deleted. What happens to the unresolved flags that Jim has raised? Are they automatically removed from the moderators' flag review queue before they've been marked as resolved, or do they remain in the queue until they've been resolved (like normally)?


I got multiple entry schengen visa issued by Greece.. Can I directly travel from India - Qatar - Romania or should I have stamping in schengen state?

I'll be travelling to Europe next July, but I want to visit Romania and stay for a week and also go to Amsterdam for 4 or 5 days. Can I apply for a Schengen visa from the embassy of The Netherlands? Will it permit me to enter Romania?


I was googling for best c# string concatenation, and I found this at microsoft c# code conventions:      Use the + operator to concatenate short strings, as shown in the following code:   string displayName = nameList[n].LastName + ", " + nameList[n].FirstName;   But I really prefer (String.Format) "$" for more readability IMHO:  string firstName = "MyName"; string lastName = "MyLastName"; string displayName = $"{lastName}, {firstName}"; Console.WriteLine(displayName); // "MyLastName, MyName"   Can you tip me which one do you think is better one? or is just about personal preference?  Thanks!

What's the most efficient way to concatenate strings?


I've got 1 solution contains 2 project - 1 console app, 1 class library. Class library:  Istep.cs  interface Istep {     bool Excute(); }   Sample.cs  bool Istep.Excute() {    // do something }   Console app - program.cs  Sample sample=new Sample(); sample.           // this can't found Excute method   if i change Sample.cs as following:  Public bool Excute()   sample can find excute method .  public class Sample : Istep   after i changed Excute without full qualified function name, right click Istep, click implement interface, VS will genarate a new excute method with full qualified name. so that's my question.  Thanks in advance!

What are the differences in implementing interfaces implicitly and explicitly in C#?  When should you use implicit and when should you use explicit?  Are there any pros and/or cons to one or the other?    Microsoft's official guidelines (from first edition ) states that using explicit implementations are not recommended, since it gives the code unexpected behaviour.  I think this guideline is very valid in a pre-IoC-time, when you don't pass things around as interfaces.  Could anyone touch on that aspect as well?


There was this 90s-2000s TV cartoon show (like the old-style cartoons X-Men, Spider-Man, Superman etc) about an alien being stranded on Earth and fathering a child with a woman. Then something happened to the woman I think (not sure though I don’t remember it); the boy grew up and they were at war with the aliens (I think) and he found out his father was an alien, and it was kinda them-against-the-world things. It happened in a dystopian world, I think that the first episode happened like the woman enters in a cave after the alien (who looked like human and had the appearance of a human, he had the haircut similar to Gaston from Beauty and the Beast), and the guy says something like "people are chasing me" he probably was hurt, and then she sits with him and they get really close and sleep together. And I think the alien really loved the kid's mom too, he didn't stay in their lives for their own safety and only came for him when the mom was gone. It was a Western cartoon, not Japanese. That's all I can remember, because I was really young at the time, maybe 6-7.

I can remember only a few things regarding the show, as it was long ago, and probably late at night.  However, I do remember it had to be a series, because it ended on a cliffhanger, and it was animated, and it was on the T.V. I had an antenna, not cable or satellite at the time, so I'm thinking it was on Fox or ABC or CBS or PBS or something like that, sometime between the late 90's and the early 2000's. I remember the protagonist had something of a metallic/robotic hand, which he used as something of a key to access alien devices and converse with a motorcycle he received during the episode I watched. The motorcycle looked like an antique out of Indiana Jones and the Last Crusade, and would function normally, unless you "knew how to ask".  I remember in one chase scene, the protagonist could not get away until he held his hand over something that looked like a glass disk embedded in the gas can, and asked, "Please".  Then the motorcycle transformed into a hoverbike and got the protagonist out of the tight spot. I remember the episode ended when he went to something of a below-ground alien house, ship or bunker, but I don't remember much else.


I was unable to find a proof (let alone a short one) for the proposition that $$|A\times A| = |A|\text{ for any infinite set }A.$$  The function from right to left is trivial, but I cannot find one from left to right.  Would be happy for help.

Is the cardinality of the Cartesian product of two equinumerous infinite sets the same as the cardinality of any one of the sets? I couldn't find this explicitly stated in any handout or text. This certainly seems to be true from the examples I have seen:  The Cartesian product of two infinitely countable sets is again infinitely countable. The Cartesian product of two sets with cardinality of continuum again has cardinality of continuum.


I am currently unemployed and is helping on my family's business.They give me money but not monthly and when they give it is in bulk( like for instance they will give me a big money that is worth for months of work) I do save it on my bank account but I don't do it on a  monthly basis cause of busy schedule.   What proof should I show when applying for a UK Visa?

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


In the sentences below:     The result of a man's jumping from the 10th floor is death.      The outcome of a man's jumping from the 10th floor is death.   They seem the same in the sentences above, what's the difference between them?   edit: The answer that reads:      "Result is preferable if you are describing what you get after following an organized or orderly process..."   It suggests result applies in a usual causation , but what shall it used when describing something abruptly happen like the one in my sentence mentioned? is it correct to say the death is an result of jumping off?  and     "Outcome can imply something was happening but no one party was in total control of things."   So it implies outcome should be used when things are unpredictable, but in my sentence above, isn't the outcome of death inevitable? and is it prosper to use outcome to refer to the aftermath of jumping off?  So my question is, what's the difference between them(the two sentences in comparision above)?   Any comment and answer regarding the question are appreciated. Please help to clear this confusion, thanks.

Suppose after a meeting among a company's board of directors, a member who missed the session and arrives e.g. one hour later, asks one of the presented members:        What was the meeting outcome?      and the second person answers:        The outcome was somewhat acceptable.      I need to know if it's possible to use "result" instead of "outcome' here or not?


I read this  but I'm still confused.  using (Font font1 = new Font("Arial", 10.0f))  {     byte charset = font1.GdiCharSet; }   In the code, does it mean that we are introducing a new instance of Font class called font1. However, this instance will be alive ONLY within the curly brackets. Further on in the code we can again instantiate font1 but that will be a completely different instance since the previous font1 was disposed.  Is this correct? Then what is the purpose? We could reassign different values to font1 without disposing the previous one?

User  answered the wonderful  question by mentioning the using keyword. Can you elaborate on that? What are the uses of using?


While reading Hatcher, he stated "If $p: \tilde{X} \rightarrow X$ is a covering space, then the cardinality of the set $p^{-1}(x)$ is locally constant. I have trouble seeing that this is the case.  I suppose we would want to take a neighborhood $U$ of $x$ then take another point $y \in U$. We would want to look at the path from $x$ to $y$ and this should lift to a path in $\tilde{X}$. But I fail to see how to proceed to show that the cardinalities of $p^{-1}(x)$ and $p^{-1}(y)$ should be the same. Moreover, how would we choose our $U$ 'sufficiently small' for this to be so? Is it the case that if $X$ is connected then all of the fibers have the same cardinality?

In "Knots and Primes: An Introduction to Arithmetic Topology", the author uses the following proposition   Let $h: Y \to X$ be a covering. For any path $\gamma : [0,1] \to X$ and any $y \in h^{-1}(x) (x = \gamma(0))$, there exists a unique lift $\hat{\gamma} : [0,1] \to Y$ of $\gamma$ with $\hat{\gamma}(0) = y$. Furthermore, for any homotopy $\gamma_t (t \in [0,1])$ of $\gamma$ with $\gamma_t = \gamma(0)$ and $\gamma_t(1) = \gamma(1)$, there exists a unique lift of $\hat{\gamma_t}$ such that $\hat{\gamma_t}$ is the homotopy of $\hat{\gamma}$ with $\hat{\gamma_t}(0) = \hat{\gamma}(0)$ and $\hat{\gamma_t}(1) = \hat{\gamma}(1)$.  The author then follows with; "In the following, we assume that any covering space is connected. By the preceding proposition, the cardinality of the fiber $h^{-1}(x)$ is independent of $x \in X$."   I am not sure why this results is true. This is my attempt at explaining it to myself. Take two different $x_1, x_2$ and their fibers $h^{-1}(x_1), h^{-1}(x_2)$ such that $y_1 \in h^{-1}(x_1)$ and $y_2 \in h^{-1}(x_2)$. Take two paths $\gamma_1, \gamma_2$ such that $\gamma_1(0) = x_1$ and $\gamma_2(0) = x_2$. Then we get two lifts $\hat{\gamma_1}, \hat{\gamma_2}$ with $\hat{\gamma_1}(0) = y_1$ and $\hat{\gamma_2}(0) = y_2$. Now, since our covering space is connected we can continuously deform $\hat{\gamma_1}$ into $\hat{\gamma_2}$ and conclude that every elements in $h^{-1}(x_1)$ is also in $h^{-1}(x_2)$ and vice versa. I feel that this is wrong but cannot figure out the right way to see this. Any help would be appreciated.


This is my apex class  public class ClaimAttachment_1 {       public Id recId{get;set;}       public String contIdChosen {get; set;}  public Attachment attachment {get;set;}      public string fileName{       get;set;}    public Blob fileBody {       get;set;} public string contentType {       get;set;}      public ClaimAttachment_1(ApexPages.StandardController controller){     recId = controller.getRecord().Id;       attachment = new Attachment();}     public List<Attachment> getAttachments(){       string AttParentId = apexPages.currentPage().getParameters().get('id');       list<attachment> att = [select Id,Name,BodyLength,CreatedDate,CreatedById,OwnerId,contentType from Attachment where parentId =:AttParentId ];       return att;}      public PageReference returnPage(){   return Page.ClaimAttachment_1;}      public PageReference UploadFile() {     PageReference pr;     if(fileBody != null && fileName != null)     {        attachment.Body = fileBody;       attachment.Name = fileName;         attachment.contentType = contentType;        attachment.ParentId = recId;       insert attachment;     //  pr = new PageReference('/' + myAttachment.Id);       //pr.setRedirect(true);        // return pr;       return Page.ClaimAttachment;     }     return null; }           public PageReference delCont(){   attachment toDel=new attachment(id=contIdChosen);   delete todel;   return null;}   public PageReference Back() {  return Page.ClaimAttachment;     } }

I have implemented custom search and displaying 10000 records on page using pagination. Pagination is done by using StandardSetController only. I also have implemented sorting of data. Can anybody suggest any solution to reduce view state?


I have the below  foo = ['a', 'b', 'c', 'd', 'e'] from random import choice while True:     print choice(foo)   The output is:  a c a e ...   I want the terminal output to overwrite the old output on the same line  thanks

I am new to python and am writing some scripts to automate downloading files from FTP servers, etc. I want to show the progress of the download, but I want it to stay in the same position, such as:  output:     Downloading File FooFile.txt [47%]   I'm trying to avoid something like this:       Downloading File FooFile.txt [47%]      Downloading File FooFile.txt [48%]      Downloading File FooFile.txt [49%]   How should I go about doing this?    Duplicate:


Getting null pointer exception please help    protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main_appbar);      toolbar=(Toolbar) findViewById(R.id.app_bar);     setSupportActionBar(toolbar);      getSupportActionBar().setDisplayShowHomeEnabled(true);      NavFragment drawerFragment = (NavFragment)             getSupportFragmentManager().findFragmentById(R.id.nav_frag);     drawerFragment.setUp(R.id.nav_frag, (DrawerLayout) findViewById(R.id.drawerLayout), toolbar);     listEvents= new ArrayList<>();        Parse.enableLocalDatastore(this);     Parse.initialize(this, "xxxxxxxxxxxxxxxxxxxxxxx", "xxxxxxxxxxxxxxxxxxx");      //TEST PARSE     final TextView t =(TextView) findViewById(R.id.textView);     ParseQuery<ParseObject> query = ParseQuery.getQuery("Test");     //query.whereEqualTo("playerName", "Dan Stemkoski");     query.findInBackground(new FindCallback<ParseObject>() {         public void done(List<ParseObject> eventList, ParseException e) {             if (e == null) {                 Log.d("Events", "Retrieved " + eventList.size() + " Events");                  for (int i = 0; i < eventList.size(); i++) {                     Events events = new Events();                     events.setTitle((String) eventList.get(i).get("teststr"));                     events.setId((String) eventList.get(i).get("id"));                     listEvents.add(events);                 }             } else {                 Log.d("score", "Error: " + e.getMessage());             }         }     });      eventAdapter.setEventList(listEvents);       eventsList=(RecyclerView)findViewById(R.id.list_events);     eventsList.setLayoutManager(new LinearLayoutManager(this));     eventAdapter= new EventAdapter(this);     eventsList.setAdapter(eventAdapter);     }   this is the place where i get the exception ..  logcat:     Caused by: java.lang.NullPointerException: Attempt to invoke virtual   method 'void   com.squaredbytes.eventlane.EventAdapter.setEventList(java.util.ArrayList)'   on a null object reference

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


I was reading  Wikipedia article and found that $0$ is a purely imaginary number. Why? Is it because $i0=0$? So zero is the only number which is real as well as purely imaginary? Any explanations on this please?

A purely imaginary number is one which contains no non-zero real component.   If I had a sequence of numbers, say $\{0+20i, 0-i, 0+0i\}$, could I call this purely imaginary?   My issue here is that because $0+0i$ belongs to multiple sets, not just purely imaginary, is there not a valid case to say that the sequence isn't purely imaginary?


How can I mathematically prove that the function $f(x) = x^3$ is not convex?  Graphically it's clear. I computed the Hessian to be $6x$, but not sure how I can conclude the positive definiteness of $6x$.

Drawing the graph of a function is not intuitive. For example, the function $f(x)=x^2$ is special, we can say that given two points of the function the straight line that join those points is above the function. So we write  $$ x_2<(x_1+x_0)(x-x_0)+x^2  $$ How did I obtain the part of the right?  $$ (Y-x_0^2)/   (x-x_0)  =     (x_1^2 -  x_0^2)   /      (x_1 -   x_0) $$ Now I just isolate Y in the equation above.  My question is, can I do the same with $f(x)=x^3$?  And how do I prove it? Can I say that $x^3$ is below the straight line that join two points of the function $x^3$? If and only if $x$ is positive.


As written in the title, my question is, which version of the sentence is grammatically correct, if not both. I've been arguing with some guy on 9gag for roughly 10-15 minutes already, and I'm not sure myself anymore by now. Again, which of the following is correct?   Can you tell me what this is? Can you tell me what is this?   In my opinion, the first version is correct, and the second version lacks a colon, like this:   Can you tell me: What is this?   I would be delighted to hear your opinions.  PS: Please note that I did some research online, also with the help of "online grammar checks", but a) couldn't find anything or b) both sentences were identified as correct.

Is the general word order of this sentence correct?     We investigate how strong the effect of X on Y is.   Or, as an alternative,     We investigate how strong the effect of X is on Y.   In a preprint for a scientific publication I came across the formulation:     We investigate how strong is the effect of XZY.   and now I'm all confused.


Manuscript submitted in an elsevier journal is now in "Revise and Resubmit" status. Journal editor provided only one reviewer's comments. The comments suggested some minor changes only and revision time is given 2 weeks. What do you guys think? What's the possibility of getting rejected?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I want to copy a visible file to a hidden folder.  In this case, I want to copy a program folder to the  /.wine folder

I've only been using Ubuntu for two weeks and have been able to find answers to any problem I had, however this one defies my searches.  I want to move a visible programme file (wallch) to a hidden directory ./config/autostart.  I have been able to enter this directory and the subject file is not there and I want to have this program start at bootup.  Can anyone assist?  Thanking you


So this a fundamental assumption in mathematics. Can someone explain informally what it actually is please.  My guess is that its when we say in proofs that "Let $x \in X$". But I am not sure.

As I'm sure many of you do, I read the  webcomic regularly. The  involves a joke about the Axiom of Choice, which I didn't get.     I went to Wikipedia to see what the Axiom of Choice is, but as often happens with things like this, the Wikipedia entry is not in plain, simple, understandable language. Can someone give me a nice simple explanation of what this axiom is, and perhaps explain the XKCD joke as well?


In the book "mathematical logic", it is said that $(a,b)$ is an abbreviation for $\{ \{a,a\},\{a,b \}\}$.  I don't understand this, since firstly, $\{a,a\}=\{a\}$, and secondly, even if this weren't the case, how does  $\{ \{a,a\},\{a,b \}\}$ capture the ordered relation of $(a,b)$?  i.e. how do we see a tuple as a set?

My book says  \begin{equation} (a,b)=\{\{a\},\{a,b\}\} \end{equation}  I have been staring at this for a bit and it doesn't make sense to me. I have read several others posts on this, but none made any sense to me.  For example,   Based on how my ignorant brain is viewing this, I don't see why the definition could not be.  \begin{equation} (a,b)=\{\{a\},\{b\},\{a,b\}\} \end{equation}  aka the power set. What is the significance of the {a} in that definition? Please keep things simple if possible. Normally definitions have a valid and clear reason for being defined that way.    Clarification  First, I understand what an ordered pair is. I just don't see how the set notation says that.   Second,  \begin{equation} (a,b) = \{\{a\},\{a,b\}\}=\{\{a,b\},\{a\}\} \end{equation} Sets don't preserve order, but ordered pairs do. How does the third part of the equality apply to the definition?  Third, another issue with the notation that I have starts with the Product Property of Sets  \begin{equation} \text{Let $X$ and $Y$ be sets} :\ X=\{a,b,c\}\text{ and }Y=\{a,d,e\}. \end{equation} \begin{equation} \text{Then }X \times Y = \{(a,a),(a,d),(a,e),(b,a),(b,d),(b,e),\dots,(c,e)\} \end{equation} If we look at the first ordered pair and our given definition we have  \begin{equation} (a,a)=\{\{a\},\{a,a\}\} \end{equation}   How can this be so, you can't have duplicates in sets? I guess what I am looking for in an answer, is not a proof or a definition of ordered pairs, but rather something like, "This notation says what it says because...". Except for the second to last point I get the terminology, I just don't get the connection between the two different uses of notation.


So when you hold an action using the Ready action you use your reaction to act when the trigger happens. however you're able to ignore the trigger. So while you are using the Ready action, are you able to take a DIFFERENT reaction before the trigger (or after if you ignored it) at the cost of losing the readied action?  Scenario: Fighter is fighting a bird and a goblin. The goblin is in melee range. The fighter readies a sword attack for when the bird comes into range. The goblin acts before the bird and leaves the fighter's range. Can the Fighter take an attack of opportunity - expending his reaction, and thus unreadying the attack on the bird?

Example:   Player 1 uses the ready action to do something when something happens (unimportant) Goblin, decides to charge across the battlefield and attack Player 2, but happens to cross paths with Player 1 possibly provoking an opportunity attack (here lies my question)   Could Player 1 decide to ignore their readied action and use their reaction to attack the goblin? This would of course take up their reaction so they could no longer take their readied action when it triggers.  If so; let's say it is a fireball that was readied (or any spell), would Player 1 be required to drop the fireball spell? They technically cast it as part of their ready action, but I would understand if this would be a downside to using a reaction before their readied action triggered (maybe this should be another question, but please answer it anyway and tell me if I need to create a separate one so you can answer it there too :P).


Equipment is Canon EOS 5D3 (5760x3840) with a 24-105 f/4 L lens at 105mm, ISO 200. The following are crops from the same small (676x449) section of a couple of blue sky shots I did to test for sensor dirt.  The first image is unmodified other than Raw->JPEG conversion in Lightroom with no setting changes, and shows some faint dark circles. f/22 Unedited  To enhance the circles I cranked up contrast and clarity to 100%, giving this: f/22 Contrast-Enhanced  However, the same area of an image taken 1 second earlier at f/7.1 shows no evidence of these spots, even after cranking up the contrast/clarity to 100%. f/7.1 Contrast-Enhanced  Other Information  The spots seem to be more prevalent towards the edges of the original (full-size) image, although there is one spot near the center.  None of the spots are visible at f/7.1. All the spots appear to be the same size, but have different densities.  Given all this evidence can I deduce that these are lens defects (or dirt on a lens element)? Since they're completely undetectable at "normal" apertures I don't consider this a problem.  I just would like to know what I'm seeing. BTW, the obvious test is to shoot the same image with a different lens and compare, but I won't be able to do that for several days and thought this might be an interesting question for photo.se.

Recently, I've been doing a lot more photography, particularly with my 100-400mm telephoto and 16-35mm wide. I am skilled enough that I can capture the shot mostly as I want with just the camera gear, requiring minimal post processing. I'm a huge fan of ETTR now, so most of my shots are overexposed to support more shadow DR and improve the noise performance of my el-chepo 450D body.  I've noticed quite a bit lately during post processing in lightroom that my sky's or any other lighter areas of my shots tend have spots on them. They are soft and dull to one degree or another (seems to depend on the zoom factor), so probably something either on the sensor or the lens. I'm having a hard time figuring out exactly what they are, as I try to use my lens pen brush before any shoot, yet I still have them. I am having to make quite a few healing corrections post-process to get rid of them.  Is there an easy way to identify where the spots are on my lenses? Once identified, if a quick brush of the outer lens element with a lens pen (or soft camel hair brush) doesn't do the trick, does that mean the spots are on my sensor? Is it possible there is particulate inside the lens body (all of my gear is less than a year old outside of my 450D body, and its all Canon L-Series gear, so I would home that I don't already have detrimental particulates floating around inside my lenses messing up my shots. :|)  Here are a couple examples. The spots are harder to see on screen, and I first noticed them when I printed a few of my more recent shots. There are quite a few, and the shot the examples below were taken from, where the sky took up about 30% of the top edge of the photo, there were probably 10-12 different spots, some of them darker, many of them lighter. The darker ones are the ones that are very visible in prints, where as the softer ones are not as visible, but still apparent enough to ruin an expensive print.


Responsive designs allow websites to adapt to different screen sizes and display types. However, some designers suggest that a responsive design should also adapt to orientation changes.     a good responsive design will still adapt when transitioning from portrait to landscape on any device!    Source:      In addition to designing for both landscape and portrait (and enabling those orientations to possibly switch in an instant upon page load), we must consider the hundreds of different screen sizes.   Source:   However, I'm slightly concerned that a design changing when the user rotates their device could be confusing. Users frequently rotate their devices to get a better look at some content. If the design changed suddenly, would we not be getting in the user's way?  So my question is are there any benefits to adapating to orientation? If a design does adapt to orientation, what is the best way to do that?

Currently, the standard behaviour for viewing web pages on a mobile is that:   If viewed in portrait the text is smaller because the width of the device is small and the whole page width needs to fit into view. If viewed in landscape the view 'zooms in' as the width is now wider so that the text is larger and more readable, but with less content on screen as a result.   So, this brings a dilemma. When creating a responsive website what should happen on device rotation? (Not on initial page load, I am referring to what should happen once the site is loaded and you decide to then rotate the screen)   When rotated from portrait to landscape should you:   a) Re-detect the device widths and map the contents according to the new dimensions (thereby retaining the same font / images sizes as when viewing portrait). b) Keep the same dimensions and on rotation just bring the content to fit the window (thereby zooming in the content to make it more readable for viewers if the portrait orientation text is too small).          – Wireframes created with   Bear in mind that with a traditional web-page viewed in the mobile you have the option of pinch-to-zoom the text, so if it's too small you can zoom in. With a responsive site this isn't an option because the site will fit the dimensions so there is nothing to zoom into.  (I guess there is a third option too - use responsive fonts so that the font sizes change according to the screen width. But that's probably a different question altogether).


So if a certain sequence $a_n$ is convergent then its bounded.So from Bolzano-Weierstrass $a_n$ has a convergent sub-sequence, but where do I continue from here?

Came across the following exercise in Bartle's Elements of Real Analysis. This is the solution I came up with. Would be grateful if someone could verify it for me and maybe suggest better/alternate solutions.  I also looked up these related questions - , ,  - but was not happy with proofs given there. I seem to need some help understanding these. Any such help is appreciated.      Show that every sequence in $\Bbb R$ either has a monotone increasing sub-sequence or a monotone decreasing sub-sequence.   Let $(x_n)$ be a sequence in $\Bbb R$. Suppose $(x_n)$ is not bounded. Without loss of generality we may assume that $(x_n)$ is not bounded above. Therefore given any real number there is a member of the sequence which is greater. Let $x_{n_1}$ be any member of the sequence.   There is $x_{n_2} \gt \sup\{x_1, x_2, ..., x_{n_1} \}$. For $i \gt 1$ let $x_{n_i} = \{x_1, x_2, ..., x_{n_{i - 1}}\}$ then $(x_{n_k})$ forms a monotone subsequence of $(x_n)$.   Now suppose instead that $(x_n)$ is bounded. By the Bolzano-Weierstrass Theorem there is a subsequence $(y_n)$ of $(x_n)$ which converges to a limit $y$. Without loss of generality there are infinitely many distinct values in $(y_n)$ that are unequal to $y$. Let $y_{k1}$ be the first such element. Let $y_{k2}$ be any element in $\{ y' \in (y_n) \ \ | \ \ |y' - y | \lt |y - y_{k1}|  \}$.   For $i \gt 1$ let $y_{ki} \in \{ y' \in (y_n)  \ \ | \ \ |y' - y | \lt |y - y_{k \ i - 1}|  \}$. Such $y_{ki}$ exists for every $i \in  \Bbb N$ since $ \lim (y_n) = y $. Now let $(y_{kn})$ be the sub-sequence of $(y_n)$ thus formed. At least one of the two following sets must contain infinitely many elements.    $\{ y \in (y_{kn}) \ \ | \ \ y \gt x\}$ $\{ y \in (y_{kn}) \ \ | \ \ y \lt x\}$   The one which does forms a monotone subsequence.


So for various reasons I can't boot off an install usb. So instead I have been taking the Hard drive out of my laptop and then writing to it with Universal USB installer. The result though is that I can boot up on my computer into an installer but I cant run it because it would install on the very HD im installing from.  How can I run the installer you normally get when you boot up onto the HD on windows?

So basically as it stands I have a laptop which has no cd/dvd drive, and I don't have a usb drive.  The laptop has windows 7 installed with ubuntu 11.04 installed through wubi.  What I want to do is remove windows completely, and make ubuntu the only OS installed on the system.  Is there a way to do this without re-installing ubuntu? (i.e. can I take my wubi install away from windows?)  or is there a way to from inside ubuntu have it run the ubuntu iso somehow so I can just wipe the system and install it fresh? (even if it means I need to have an e.g. 2gb partition just for the image to reside in).


window.onload = function() {     var count = 0;     var message = "You clicked me ";     var div = document.getElementById("message");     var button = document.getElementById("clickme");      button.onclick = function() {         count++;         div.innerHTML = message + count + " times!";     }; };   Once the function assigned to the onload property has been executed the var div should become unreachable. Then why the hack the function assigned to the onclick property can still use the variable in question? The function executes only after the button has been clicked (var button).

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I am using the above function to add paragraphs(it works fine). I want to use this event to remove something onclick, but it doesn't run at all. Thank you!  function add() {   text = $('.textfield').val();   $('.list').append('
' + text + '
');   $('.textfield').val(''); }  $('.target').click(function(){         $(this).remove(); });

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


I want do put right brace to group two cases (mixed normal and math mode) but when I try something, it says that I can do it only in math mode. Can someone help me, please?

How can I get a brace on the right, not the left, to group cases, using cases? (I know actual cases look better with the brace on the left, but the items I need to group are not literally cases. They are a set of steps in an algorithm which I want to consider as an item.)  The following puts the brace on the left. All I need to do is to flip it to the right.  \begin{align} \begin{cases} a&=bbb\\ c&=ddddddd\\ e&=ffffffffff \end{cases} \end{align}   Thanks for any help with this!


if (foo) {     // code to run if foo exists     }   results in Uncaught ReferenceError: foo is not defined  So how am i supposed to check if foo exists?

How to check whether a JavaScript variable defined in cross-browser way?  I ran into this problem when writing some JavaScript utilizing FireBug logging. I wrote some code like below:  function profileRun(f) {     // f: functions to be profiled     console.profile(f.constructor);     f();     console.profileEnd(f.constructor); }   It works fine in FireFox/FireBug, but it reports error in IE8 RC1. So, I'd like to do some checking whether console variable exists in the execution environment.  Below code works fine in FireFox, but not in IE8 RC1.   function profileRun(f) {     if (console != undefined) {         console.profile(f.constructor);     }      f();      if (console != undefined) {         console.profileEnd(f.constructor);     } }   However, if I do it this way. It works in IE8 RC1. Why?   function profileRun(f) {     if (window.console != undefined) {         console.profile(f.constructor);     }      f();      if (window.console != undefined) {         console.profileEnd(f.constructor);     } }   Is there any cross-browser way to check it?


Now that chrome has ended support for 32 bit linux, I was wondering if chromium is as secure and as reliable as chrome. If not what changes can be made to chromeium?

I used Google Chrome in Windows, and am now using Chromium in Ubuntu.  Is there any difference to the two programs?  What are the advantages and disadvantages to each program?  Which one seems better?


In my tex documment, I use circuitikz and tikz libraries together. When I try to draw decision block for flowchart, I found annoying behavior. Miktex puts in center of the Diamond shape some character, that should not be there at all (see figure below). If I comment circuitikz library, everything si OK, but it is not solution for my documment.      NWME:  \documentclass{minimal} \usepackage{tikz} \usepackage{circuitikz} \usetikzlibrary{shapes.geometric}  \begin{document}   \begin{tikzpicture}    \node [draw, diamond, aspect=2] {hello};   \end{tikzpicture} \end{document}

I am making a flow chart and in the standalone TikZ file everything looks fine, but when I use \input into my thesis all of the diamonds have a small black diamond in the dead center of the shape. This happens with or without text in the node.  It's hard to include a working example due to the template of my thesis, but everything else looks the same.  Any idea what could be causing the small diamonds in the center?  \usetikzlibrary{shapes.misc,arrows, positioning}  \tikzstyle{startstop} = [draw, rectangle, rounded corners, top color=white, bottom color=red!30] \tikzstyle{process} = [draw, rectangle, align=center, top color=white, bottom color=blue!30] \tikzstyle{decision} = [draw, diamond, aspect=2, align=center, top color=white, bottom color=green!30] \tikzstyle{arrow} = [thick,->,>=stealth]  \begin{tikzpicture}  \node (start) [startstop] {start}; \node (plf) [below=of start, process] {text \\ text}; \node (3) [below=of plf, decision] {text \\ $||$ \\ text}; \node (4) [below=of 3, process] {text $\pm$ 1}; \node (5) [below=of 4, process] {text \\ text}; \node (6) [below=of 5, process] {text \\ text}; \node (7) [below=of 6, process] {text}; \node (empty1) [right=of 3] {}; \node (9) [right=of empty1, decision] {text \\ text}; \node (10) [below=of 9, process] {text \\ text}; \node (stop) [below=of 10, startstop] {stop};  \node[coordinate] (12) [left=of 3] {}; \node[coordinate] (13) [right=of 9] {};  \draw [arrow] (start) -- (plf); \draw [arrow] (plf) -- (3); \draw [arrow] (3) -- node[anchor=west] {no} (4); \draw [arrow] (4) -- (5); \draw [arrow] (5) -- (6); \draw [arrow] (6) -- (7); \draw [arrow] (7) -| (12) --  (3); \draw [arrow] (3) -- node[anchor=south] {yes} (9); \draw [arrow] (9) --  node[anchor=west] {no}(10); \draw [arrow] (9) -- node[anchor=south] {yes} (13) |- (stop); \draw [arrow] (10) -- (stop);  \end{tikzpicture}


I'm currently reading through Pugh's Analysis (for fun.) I'm currently stuck on this question:  Given two cuts $x=A|B$ and $y = A'|B'$, then $x+y=(A+A')|\text{rest of $\mathbb Q$}$, show that although $B+B'$ is disjoint from $A+A'$, their union might not be $\mathbb Q$.  I understand this question is basically asking why cut addition isn't defined to be $x+y=(A+A')|(B+B')$. I keep trying to find a degenerate case, but can't seem to really get started. Showing that they're disjoint is easy enough, but I haven't really made any progress from there. Hints would be appreciated.

Can you help me with this?  Let $x=A \mid B$ and $x'=A' \mid B'$ be cuts in $\mathbb Q$. It is defined  $$x+x'=(A+A') \mid \text{ rest of } \mathbb Q$$  Show that although $B+B'$ is disjoint from $A+A'$, it may happen in degenerate cases that $\mathbb Q$ is not the union of $A+A'$ and $B+B'$.   EDIT: As the comment below asked, I'll include the definition of a cut in $\mathbb Q$.  A cut in $\mathbb Q$ is a pair of subsets $A,B$ of $\mathbb Q$ such that   (a) $A\cup B=\mathbb Q$, $A\neq \emptyset$, $B\neq \emptyset$, $A\cap B=\emptyset$  (b) if $a\in A$ and $b\in B$ then $a<b$.  (c) $A$ contains no largest element.


Goal  I'm trying to map a texture on a cube;   Since my texture is not exactly fitting the correct orientation, I need to rotate it. The results are not as expected.  Setup description  I'm using the setup shown in the following pictures. I've set the projection mode to Box have the texture visible on all faces. Texture mode is set on Repeat to avoid undesired clamping (default value). What I'm trying to achieve is to have the planks horizontal instead of vertical on the front face (rotate around X axis). The rotation is applied in a Mapping Node.   Results   The face I need is properly rotated, but the others get this blurry effect, which reminds me of the "Clamp" mode in OpenGL. Is this expected behavior ? How to solve this ?  **Additional note (edits) **  Both the cube and the material are simplified versions of the original problem. The meshes I have are more complex, a few thousands faces, and with complex shapes (such as switches or sockets outlets). Very few faces are not aligned with the world axes, and thus they can be ignored. The material needs to be applied on various shapes, so UV map can't be made manually. The purpose of this is to automatically create a diffuse map of each textured item, where every face with a similar direction/normal would have a similar rotation applied.  For simplificity sake, the cube seems to be a good sample

Is it possible to have tri-planar mapping in cycles?  Like in corona renderer or fstorm?


I became a linux user with 16.10, about 4 months ago. I'm loving it, but since the final version of 17.04 is about to come out, I'd like to upgrade. Is there any benefit to a clean install? I don't really want to have to reinstall, but if there's anything, anything, that would give me a reason to clean install, I'll do it. I prefer to go on the safe road. Also, how do I update? With update-manager -d and following the instructions, with sudo apt dist-upgrade, or with sudo do-release-upgrade?

Is it better to install Ubuntu completely new or is the upgrade process just as good? In other words, will my computer run just as problem-free and efficiently when I upgrade as opposed to a fresh install?