I am a newbie in the field of website making. I currently made a website using Django and host it using digital ocean, I learn all of it by myself and I am very interested. However, I would like to learn google search engine optimization now and let people have a higher chance of visiting my website. And I wonder, because I am just testing my website status so I use Digital Ocean, what if in the near future, I change the hosting location ,and thus the ip address change, could google still keep the rank of the website when searching a particular website.

We're about to change our website from a shared hosting account to run on a VPS, mainly so we have our own resources and control over server settings.   An IP address is included with the VPS. What I was wonder is if the IP address change will have a similar affect to changing the domain name?   Obviously the links will still come from the same domain, so that's fine, but I was thinking more along the lines of the way a search engine sees the site - would it downgrade you for switching IP's?


I encountered some confusing issue with using typeof function when the function is declared or when the function is defined as a variable assignment. Here is a sample code:       //This displays "undefined"      console.log(typeof window['a']);       //This displays "function"      console.log(typeof window['b']);       function a() {};      b = function() {};   EDIT: This has nothing to do with hoisting. I have added the following equivalent Node.js code, which is complete so there are no doubts about what else is going on in the program:       function a() {};       b = function() {};       console.log(typeof global['a']);      console.log(typeof global['b']);   The output is:      undefined     function   Can someone explain in light of the above updates why a function declared has no entry in the global/window object?   This is NOT a duplicate. The other questions do not address this specific issue about the returned value of typeof when function is declared as a function or as a variable assignment.

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I have a 120GB SSD and a 2TB HDD  Is there a way to "merge" this, so I just store my programs and data to the respective folders, and let the system move the less frequently used stuff from SSD to HDD.   I don't want to be bothered with deciding to put stuff on SSD or HDD.  I have a laptop, so it must be a software solution; nothing like HighPoint RocketHybrid 1220  I have seen  but that question is 6 years old.

I have a 90GB SSD but 90GB soon gets filled up.  My users folder alone is 26GB.  To get round this I use Symlinks (read the  for more).    Is there any way to make a separate SSD and HDD work like a hybrid so that frequently accessed files are moved to the SSD automatically?  This would be a nice addition to Windows 8 but I'm not holding out my hopes.    I guess ReadyBoost is a bit like this but its more designed for USB sticks I think.  I did try installing Windows 7 with the SSD as a readyboost but didn't really notice any much improvement over just using the HDD.


Recently I was reading about magic methods in Python, which make the code a lot easier to read. Can we define our own mappings? If so, is there any pointer for this and how complicated it would be?  For example, + is always mapped to __add__. Could I define a mapping for ?, which would call __is_valid__ in my class?  c = Car() print(c?)  # invokes __is_valid__ of Car to get the result

Can you add new statements (like print, raise, with) to Python's syntax?  Say, to allow..  mystatement "Something"   Or,  new_if True:     print "example"   Not so much if you should, but rather if it's possible (short of modifying the python interpreters code)


I first wrote the following comment.  It is not true that there is just a _White House_: In Moscow, there is a [government building](http://en.wikipedia.org/wiki/White_House,_Moscow) that is called _White House_.   It was not rendered correctly, as it appeared as follows. (See the first comment for this question.)     It is not true that there is just a White House: In Moscow, there is a  that is called _White House.   To make it render correctly, I had to rewrite it as:  It is not true that there is just a _White House_: In Moscow, there is a [government building](http://en.wikipedia.org/wiki/White_House,\_Moscow) that is called _White House_.   In this case, it is rendered correctly also in comments.     It is not true that there is just a White House: In Moscow, there is a  that is called White House.   Looking at the HTML produced for the comments, I understand what happened. In the first comment, the HTML is the following.  It is not true that there is just a White House: In Moscow, there is a government building that is called _White House.   In the second comment, the HTML is the following.  It is not true that there is just a White House: In Moscow, there is a government building that is called White House.   In the first comment, the URL is http://en.wikipedia.org/wiki/White_House,%3Ci%3EMoscow which means the underscore is changed to , and then the brackets are encoded, giving as result the %3Ci%3E part that is visible in the URL.  This happens only in comments. If I write the following Markdown in a post, it is rendered correctly, as visible here.  It is not true that there is just a _White House_: In Moscow, there is a [government building](http://en.wikipedia.org/wiki/White_House,_Moscow) that is called _White House_.      It is not true that there is just a White House: In Moscow, there is a  that is called White House.   The HTML in this case is the following one.
It is not true that there is just a White House: In Moscow, there is a government building that is called White House.

I was answering  question and was trying to post following url in comments but everytime it failed -    I searched on Meta and came across  post and tried the solution posted but url is already encoded and doesn't work.   Is there a way to make this work in comments?


I want to know the OST played at Boku no Hero Academia ep. 54 when Todoroki fought that guy who can make things big. The timing is 20:40 in episode 54.  I tried to find it in YouTube but failed.  What's the song?

What is the music on season 3 episode 16 of My Hero Academia around 20:07 when Todoroki was fighting a group of ninjas?


I stumbled upon "the God proof" which goes:  $0 = 0 + 0 + 0...$  $  = (1-1) + (1-1) + (1-1) + ...$  $= 1 - 1 + 1 - 1 + 1 - 1 + ...$   $= 1 + (-1+1) + (-1+1) + (-1+1) + ...$   $= 1$  Even though this result is obviously wrong, I can't quite pinpoint exactly what the 'illegal' operation here is? I know that it's possible to make a conditionally convergent infinite series converge to any value, so that can't be the issue (?).  It makes me think there's something dangerous about representing numbers by infinite series that aren't absolutely convergent, but I haven't been able to find something that specifically addresses this, if someone could tell me where to look for more information, I'd be grateful.  [background: undergrad student]

$0 = 0 + 0 + 0 + ...$   $0 = (1 - 1) + (1 - 1) + (1 - 1) + ...$   $0 = 1 - 1 + 1 - 1 + 1 - 1 + ...$   $0 = 1 + (-1 + 1) + (-1 + 1) + (-1 + ...$   $0 = 1 + 0 + 0 + 0 + ...$   $0 = 1$   I can't really tell what is obviously wrong with this. It seems to use the same logic as we see in the derivation of things like $\sum_{k=1}^{\infty} k = -\frac{1}{12}$ which appears to be a quirky but accepted fact in mathematics.


Are there alternatives to Calabi-Yau spaces describing dimensions in superstring theory? If yes, what are they? If no, why?

I think I've missed this point somehow. I've just started with Compactification and so far, I don't really see why it is restricted to the above mentioned types of manifolds?   I have to admit, when studying T-Duality, I simply took Toroidal compactification as a kind of "why not"-thing.  Could someone point me in the right direction? Been skipping through my books to look for some explanation of this, but couldn't find anything. Thanks!


Most, if not all, of the Stack Overflow JavaScript appears to be broken with the error:     Uncaught SyntaxError: Variable 'n' has already been declared   In full.js on Meta Stack Overflow and on some other script on Stack Overflow itself. Of course taking out the use strict at the beginning of the script should fix the issue - was that just added or something?  The serious implications here are that nobody using Chrome Canary 18.0.1017.0 with Experimental JavaScript turned on can upvote this question until this is fixed ;) Nor downvote nor flag, delete, comment... maybe it's time to add some more graceful degradation?

As the photo - Variable 'n' has already been declared.  I've tried clearing my cache, as well as using a new user profile with no extensions, but it doesn't work.  Might be useful to know so it can be fixed before more people are using Chrome (If it's SO's fault of course!)


Let's say we have a simple linear regression model, that is, $y = X\beta + r$ where $y$ is a vector of size n x 1, $X$ a matrix of size n x p, $\beta$ the regression coefficient vector of size p x 1 and $r$ is a residual error of size n x 1.  Most of papers I read consider that $y$ follows a multivariate normal distribution. My question is whether $y$ can follow a distribution different from normal, for example elliptical, etc. Is it necessary that in linear regression, for $y$ to be assumed Gaussian?   I discussed with a researcher and he told me that linear regression models are only suitable (or efficient) for Gaussian assumption. Is this true?

What are the usual assumptions for linear regression?   Do they include:   a linear relationship between the independent and dependent variable independent errors normal distribution of errors homoscedasticity   Are there any others?


Can EFTs go negative? Serious question. After seeing CLK20 drop below zero, I am a bit unsure about my USO position. Also, what's the default mechanism of an ETF? Which part of '40 funds act regulates the case of possible liabilities emerging from the assets?   If someone can provide a bit of background instead of a simple yes/no.

With Oil futures trading at negative prices yesterday, what happens to ETFs like USO that hold these contracts? If one buys such an ETF, is it possible to lose more than the price at which it is purchased, i.e. could it have a negative price, which the investor would be on the hook for?


How I know all IP on my LAN Wireless using ubuntu 14.04

What is the equivalent to:  iwlist wlan0 scan   to see who (what computers and smartphones) are around me? Maybe putting the card into monitor mode before doing it.


The files application is not showing Desktop, Documents Music and so on in the left sidebar.    What can I do to get it back?

I'm on Ubuntu 14.04 LTS and would like to set the Files (Nautilus) sidebar (where it shows Places, Devices, Network) to default to not being displayed.   It can be toggled on/off with F9. In preferences you can set hidden files to display or not, but there's no option to set the sidebar to not display by default.


I have attempted to use the division theorem, but I am unsure exactly where to begin. Any hints/direction would be appreciated.

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


Well, Monday night i went out to hangout with some friends and my iphone 5s cellular internet was working fine, midway into the night a few hours after hanging out my cellular data internet completely shut off, I usually have LTE but now not a single icon was in place of where the LTE one originally was. Is there a way to fix this? and no i havent went over my data plan. It does work on wifi as well.

I have an iPhone 5S 64 GB, ME312LL/A) I purchased as a refurb from a reputable vendor in November 2014. It's my wife's, and her previous phone didn't have LTE, so neither of us noticed right away that even in areas AT&T has good LTE service, her phone never registers an LTE connection. Only 4G.  Update:  When a SIM card from a phone with working LTE is inserted into this iPhone 5S, the service indicator shows LTE. I suppose I need to contact AT&T then?  By all appearances the phone had never been used (original packaging, pristine accessories,OEM screen protector wrap still on). What would cause a phone to function normally all ways, but not register an LTE connection?   I've tried:   toggling LTE off/on in Cellular Settings.  checking for carrier updates resetting network settings


If I would like to reinstall Windows 7 on the same laptop as 64-bit instead of 32-bitusing the original key, would I need to deactivate Windows first using the process shown  or could I just reinstall and activate over the web or using something like ?

We get a lot of questions on Super User about Windows activation and licensing. This question is an attempt to answer the most common questions in one place with a .   When reinstalling Windows, the following questions often come up:   Can I transfer the copy of Windows from my old computer to a new one? Does the license key on the sticker on my computer work on any computer? If I have a 32-bit version, can I install a 64-bit version? I have an OEM version of Windows, but only a retail disk. Can I still use it? I want to install Windows with a different language. Do I need a new license in that language? I changed some hardware. Will I be able to reactivate my computer? Can I back up my activation before doing a reinstall? How many computers can I install my license on? Do I have to deactivate my old installation before transferring a license? If so, how? How does licensing work in Windows ? What are the restrictions on transferring, reinstalling, and changing versions of Windows?


An exercise in the second chapter of Stein-Shakarchi's Complex Analysis, asks us to evaluate the famous integral  $$\int^{\infty}_{0}\frac{\sin(x)}{x}dx=\frac{\pi}{2}$$  We are expected to do this via Cauchy's theorem by evaluating a contour integral about an indented semi-circle. The text hints that this integral equals $\frac{1}{2i} \int^{\infty}_{-\infty} \frac{e^{ix}-1}{x}$, so I think the complex function being integrated is   $$f(z)=\frac{e^{iz}-1}{z}$$  I am struggling with the integral about the indention, that is let $\gamma_{\epsilon}(\theta)=\epsilon e^{i\theta}$ parametrized clockwise so that the integral I am having issue with is  $$\int_{\gamma_{\epsilon}}\frac{e^{iz}-1}{z}dz.$$  If I consider the Taylor expansion of $e^{iz}-1=iz + E(z)$ where $E(z) \to 0$ as $z\to 0$ and then try to evaluate this integral, I obtain that   $$\int_{\gamma_{\epsilon}}\frac{e^{iz}-1}{z}dz \approx -\int_{\pi}^{0} \epsilon  e^{i\theta}d\theta  $$ Where I am confused is that it looks like the later integral goes to $0$ as $\epsilon \to 0$, which is not what I am looking for.

So I integrate the holomorphic function $\frac{e^{iz} -1}{iz}$ over the half disk in the upper half plane, let me name it $\Gamma$. By using Cauchy's theorem, it equals 0.  $$0 = \int_{\Gamma} \frac{e^{iz} -1}{iz} = \int_{0}^{\pi}(e^{iRe^{i\theta}}-1)d\theta + \int_{-R}^{R} \frac{e^{it}-1}{it}dt$$  ($Re^{[0, \pi]}$ and $t: [-R, R]$ being the respective parametrizations.)  By splitting the left integral in two, I get $\int_{0}^{\pi} e^{iRe^{i\theta}}d\theta \rightarrow 0$ by dominated convergence, and $\int_{0}^{\pi} -1d\theta = -\pi$. By making $R \rightarrow \infty$, I'm left with  $$\pi = \int_{-\infty}^{\infty} \frac{e^{it} - 1}{it}dt = \int_{-\infty}^{\infty}\frac{\sin t}{t}dt + \int_{-\infty}^{\infty}\frac{\cos t -1}{it}dt.$$  How do I get rid of the integral on the right? I welcome all feedback.


I am working with a small company that purchases the XP downgrade when they order there computers from dell. They then apply an image to the systems, and need a CD key when it is finished. Unfortunately because it is a downgrade they only have the Vista Business sticker. I have asked Dell for the key but this is generally a 4 to 5 hour process of talking to them until they agree to supply the key to me. Is there an easier way? (that is legal)

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


I am trying to typeset a table, wherein some headers do not apply to a particular row, i.e. for certain cells.  I do not want to use "N.A". According to the package author of booktabs, it is sufficient to draw a blank, but in my IMHO, for this specific table, these gaps looks glaring more pronounced.   An emdash seems to be doing 90% of the job, and to my eyes seems a satisfactory solution. But latex does not seem to have anything longer than emdash. How can one obtain ---- typeset as one long separator of the size of 4 hyphens joined?  PS: A mechanism for possible extensions (with an argument) to longer widths would be a bonus, e.g. maybe a macro like \crazyconjoinedhyphen{5} for typesetting 5 hyphens back to back as a single symbol.

Is there a way to get a custom-length horizontal line that appears like a "longer em-dash", if you will?


I'm generating a binary file as test data for a piece of software. The test data should consist of a long array of the same byte. If it was a zero byte I would use /dev/zero. Is there a command to transform the zeros from there into another byte, or a command to do a similar thing?  I came up with this bash script, but this solution doesn't feel ideal. It can only generate a fixed number of bytes. There is surely a way to do this with a simpler script.  for i in $(seq 5); do     echo $'\x10' done

How can I put a bit mask on /dev/zero so that I can have a source not only for 0x00 but also for any byte between 0x01 and 0xFF?


Let's say I want to make a hyperlink like this:  A link is placed \href{www.google.com}{here} to google.     Then I decide to make a macro for that:  \newcommand\Myhref[2]{ \href{#1}{#2} } A link is placed \Myhref{www.google.com}{here} to google.     The spacing is wrong for the second example.  The motivation is that I want to apply a very custom style (with underlines and colouring and font-sizes) that is too complicated for the \hypersetup global style. So I write a macro that applies the style to the hyperlink text. But the spacing is all wrong.

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


I am using REST service that is being invoked from bootstrap form submission which is being opened from hyperlink click event.REST is containing GET,POST,DELETE methods but for one of my requirement i want DELETE to be invoked but GET is being Called..Here is my form..

         <form action="~/GetStudent" class="form-horizontal" role="form" method="delete" id="frmDelete">
                 <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
Confirm Delete

                  <input type="hidden" name="id" id="id" />

                     <button type="submit" class="btn btn-success"> DELETE</button>                     <button type="button" class="btn btn-danger" data-dismiss="modal"> CANCEL</button>

         </form>

   and here is how to perform click operation..   $('#frm .glyphicon-trash').on('click', function () {         var table = $('#tbl').DataTable();         var data = table.row(this.closest("tr")).data();         $("#id").val(data[3]);     });   Please help me to get it done.Thanks..

I've seen a couple questions around here like , which mentions:     Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST.   I've also heard that browsers support only GET and POST, from some other sources like:        However, a few quick tests in Firefox show that sending PUT and DELETE requests works as expected -- the XMLHttpRequest completes successfully, and the request shows up in the server logs with the right method. Is there some aspect to this I'm missing, such as cross-browser compatibility or non-obvious limitations?


If $\alpha + \beta + \gamma = \pi$ prove that $\sin(2\alpha)+\sin(2\beta) + \sin(2\gamma) = 4\sin(\alpha)\sin(\beta)\sin(\gamma)$  I am really confused of how to utilize the information given.   Can someone please help.  Thanks.

Prove that $\sin(2A)+\sin(2B)+\sin(2C)=4\sin(A)\sin(B)\sin(C)$ when $A,B,C$ are angles of a triangle   This question came up in a miscellaneous problem set I have been working on to refresh my memory on several topics I did earlier this year. I have tried changing $4\sin(A)\sin(B)\sin(C)$ to  $$4\sin(B+C)\sin(A+C)\sin(A+B)$$ by making substitutions by reorganizing $A+B+C=\pi$. I then did the same thing to the other side to get $$-2(\sin(B+C)\cos(B+C)+\sin(A+C)\cos(A+C)+\sin(A+B)\cos(A+B))$$ and then tried using the compound angle formula to see if i got an equality. However the whole thing became one huge mess and I didn't seem to get any closer to the solution. I am pretty sure there is some simpler way of proving the equality, but I can't seem to figure it out. Maybe there is a geometric interpretation or maybe it can be done using just algebra and trig. Any hint's would be appreciated (I would prefer an algebraic approach, but it would be nice to see some geometric proofs as well)


How can i reach the treasure in the right door of Desert Temple? I can't jump there.

It's big and empty and I can't get up to the top, what should I do? I can't jump high enough, anti-gravity doesn't seem to do anything either.  My first tactic was to use the octopus summoning crown to create a pile of octopi that I could climb up, but when I teleported to the back of the room they followed me back, trapping me in the entrance.


I'd like to know what is thought of when saying the universe is infinite.  I've read about what is meant when astronomers are speaking of a "flat" universe and I have read that its size is most likely infinite. Yet Google couldn't forward me to a site where it's actually explained what that should mean.    These are some sites I looked but which did not explain it:   , another Phys.SE question   , on esa.int , on www.space.com

This question is about cosmology and general relativity. I understand the difference between the universe and the observable universe. What I am not really clear about is what is meant when I read that the universe is infinite.   Does it have infinite mass or is it dishomogeneous?  How can the universe transition from being finite near the big bang and infinite 14 billion years later? Or would an infinite universe not necessarily have a big bang at all?


I read  about glob.glob(pathname, *, recursive=False), but have no idea of the symbol *, It seems not necessary, because  In [6]: glob.glob("*")                                                                                Out[6]: ['third.html', 'test.sh', 'second.html', 'first.html'] In [7]: glob.glob("*","/Users/me/Desktop/draft")  TypeError: glob() takes 1 positional argument but 2 were given   glob takes 1 positional argument and 1 option recursive.  What does * mean ?

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


In Harry Potter and the Prisoner of Azkaban chapter 19, when Peter Pettigrew is in a really tight situation, he is pleading to Remus Lupin this way.     ‘Remus!’ Pettigrew squeaked, turning to Lupin instead, writhing imploringly in front of him. ‘You don't believe this … Wouldn't Sirius have told you they'd changed the plan?’      ‘Not if he thought I was the spy, Peter,’ said Lupin. ‘I assume that's why you didn't tell me, Sirius?’ he said casually over Pettigrew's head.      ‘Forgive me, Remus,’ said Black.      ‘Not at all, Padfoot, old friend,’ said Lupin, who was now rolling up his sleeves.    (In that conversation changing the plan refers to using Peter as the Secret-Kepper instead of Sirius.)  Had Sirius really believed at some point that Lupin was the spy?  Was Lupin suggesting it seriously that Sirius would believe that?    I have the impression that neither of them actually thought that.  Lupin had been convinced that Peter was guilty from the point when he saw him in the map, and at this point they managed to convince Harry as well.  Lupin may have had enough of Peter's pointless objections and wanted to get over with this conversation as fast as possible, which is why he said this, and Sirius went along.  But other readers didn't seem to have perceived the dialog that way.  What's the truth?

Remus: "...he thought I was the spy, Peter. I assume that's why you didn't tell me, Sirius?" Sirius: "Forgive me, Remus."  — Remus and Sirius reflecting on the first wizarding war while confronting Pettigrew. In the first wizarding war James and Sirius had come to distrust Remus and also James and Lily Potter wanted to use Sirius as their Secret-Keeper, but Sirius thought that would be too obvious, and thus suggested Peter Pettigrew instead. Why did they distrust Lupin and trust Pettigrew?


I can find lots of examples for $ax + by = c$, but how do I get started with the $\text{^2}$ there?  My specific equation is; $2x^2 - 154y = 116$  I thought I would reduce and substitute to get a familiar form; $s - 77t = 58$  which I realized has a trivial solution; $(s_0,t_0) = (58,0)$  I'm not particularly sure where to go from here, or even if this is the right path to take.

I understand what the Chinese remainder theorem is. However I am not sure how to apply it to my question. Can someone explain please?


I am trying to reinstall Ubuntu (tried 12.04 to 17.10) but I always get the error error: file /boot/grub/i386-pc/normal.mod not found then drops me into grub rescue.   I have installed using USB (unetbootin) and CD but get the same result. If I boot from the live CD and browse the HDD the files are actually there.   I have tried boot rescue and it mentions the files are quite far from the start of the disk and the BIOS might not be able to see them? Boot repair supplied a report here    I thought it might have been a dodgy HDD but I have tried another one with the same result. I usually never have an issue installing Ubuntu but this PC just refuses.

error: file '/grub/i386-pc/normal.mod' not found. grub rescue>   What can I do? I just sit and stare at it.   I found my old netbook (Dell Inspiron 1010) which I have not used for about four years. I replaced Windows XP with Ubuntu 12.10. I used my bootable USB drive. I installed and rebooted. I got the message that normal.mod is not found.   What should I do? Type exit, reboot, or quit? Should I re-install?


How do I prove that the Complete Graph with $n$ ($n$ is even) vertices can have as much as $n / 2$ disjoint spanning trees (spanning trees that does not share an edge)? So complete graph has $n(n-1)/2$ vertices and the spanning tree has $n - 1$. Then if we divide the first number by the second one we will get the answer, but I can't get why this is correct, because any $n-1$ edge may not form the spanning tree.

I have to show that the edges of a complete graph on $n$ vertices for even $n$ can be partitioned into $\frac n2$ edge disjoint spanning trees.   I know that a complete graph has $\frac{n(n-1)}{2}$ edges. And for reference, a spanning tree is a tree on all $n$ vertices, so it has $n-1$ edges. But I don't know how to show my statement.


Do modern compilers optimize a piece of code like if(CONSTANT) { ... }, where CONSTANT is a literal, template argument, const variable or constexpr variable? Do they remove the whole if(0) { ... } expression or "throw out" the if(1) part in if(1) { ... }?

I've read all the advice on const-correctness in C++ and that it is important (in part) because it helps the compiler to optimize your code. What I've never seen is a good explanation on how the compiler uses this information to optimize the code, not even the good books go on explaining what happens behind the curtains.    For example, how does the compiler optimize a method that is declared const vs one that isn't but should be. What happens when you introduce mutable variables? Do they affect these optimizations of const methods?


Most of the time I have 2, 3 or more Linuxes (usually ubuntu-family) side by side and I want to limit the number of my partitions.  So, I only use / partition for each of them and never had problems. A home folder is present anyway and I do not see why that should be on a separate partition.  But I see that many people recommend almost as a necessity to have a separate /home partition.  I would see that as an advantage if it could be used for different systems at the same time or something like that, which, while doable, is not what I need, I think, as the home folder contains settings which are very system-specific and also program-specific and program-version-specific.    As far as settings are concerned: using an old home folder/partition with a new system seems useless or even dangerous to me. As far as data files (multimedia, documents etc) are concerned: as indicated in a comment under  answer - a completely separate partition (outside any system installation) and possibly symlinks is a better choice: isn't it?

This is not a question about how to create a home partition, just as a caveat. :)  What are the pros and cons to having a separate home partition? How do I know if having one is right for me? Will it increase or decrease speed of file retrieval? Are there any risks?


In a junior football match, one of the players had picked up an unusual habit. She would make a sliding tackle but end up on the ground, with the ball between her legs. She would then keep possession, using her legs while still sitting on the floor.  It seemed unorthodox and possibly dangerous, as she was at risk of being fouled by opposition players trying to get the ball.  Rugby union has a rule whereby the ball must be released; the player that is tackled and the tackling player must immediately release the ball to allow for play to continue.  I couldn't find a similar rule in football's laws of the game. Can a player hold the ball under their body or legs in association football?  This is distinct from , as there is no attempt to move the ball or score a goal.

On occasion you see sometimes players try this tactic where they squeeze the ball between two feet and hop across the goal line in an attempt to score. This is usually kids learning the game or adults goofing around.  Is this legal or must a ball be kicked across the line to count as a goal?


What sort of operations make sense with swipe gestures? For dating apps, swiping left and right make sense because the context of the operation is sorting. Some go left, others go right. Goats and sheep etc.  Our app is a game, and it's possible to send messages to other users. There would be a send message screen. If the background of the screen has a mailbox on the right, and a garbage bin on the left, then swiping left and right can be used as the user input for "send the message" and "cancel message" respectively. However, does that make sense?

There are a lot of mobile UI design patterns that support swiping, and these are designed based on interaction and animation that indicate the behaviour. Examples include the 'swipe/pull down to refresh' and also the page flip when users swipe left or right.   I also know that there are some applications that show swiping interactions for only specific sections of a page, but I generally don't see any cues or hints to suggest that this behaviour is possible. An example of a discussion about this for Android applications . Are these supposed to be discoverable interactions or are there some standard notations for this type of behaviour?


For some reason on the mobile web, the selected tab that determines the questions that pop up (active, newest, featured, unanswered...) doesn't show on the mobile site:  It is kinda weird and it is not helpful at all. Can the name of the selected tab come back please? This is not a dupe because whether there is the message or not, the selected tab name does not show up.

When a site has a "system message" shown (such as the message shown on recently launched beta sites, like ), the mobile layout suffers:         Compare the above with how the mobile navigation bar normally looks:        Worse yet, a selected tab on the navigation bar is shown in white on white:         Observed in mobile Opera 27 on Android, and also in desktop Chrome 41 on Chrome OS, from where the screenshots are taken.   The problem is that  <div class="system-message-container"> is positioned where the navigation bar is supposed to be; if it is  deleted, the normality is restored.


I'm thinking of buying this computer and doing a dual boot with Linux and Windows 8. In all of the forums that I have read I found out that its hard to do. If anyone can please tell how to install Ubuntu on Lenovo Y410P I would greatly appreciate it.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have 2 arrays namely x and y and I wish to convert them into one Point array.  This is what I've tried, but it doesn't seem to be working.  public class Point {      public static void main(String[] args) throws Exception {          Point[] objectPoints;          double x[] = {3,4,5};          double y[] = {4,5,6};           for (int i = 0;i < 2; i++) {              objectPoints[i] = new Point(x[i],y[i]);          }      } }   How do I achieve that?

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?


Can someone please help me in merging sda4 with sda8(ubuntu).

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I am sure this is just something stupid. The main model doesn't render, just the eyes and the beard for some reason!

for some reason, my person will not show up when rendered. I have checked the material and it is fine. Not sure what i did. Hoping that someone can figure it out for me.   here's a link to the .blend file:


As illustrated , my computer always displays taskbar (Ubuntu dock) after waking from sleep:    I searched online for a solution but it didn't quite help me at all. Sometimes, it'll show the message: Your system has an internal error or whatever. Any suggestions, please?

The dock doesn't work correctly after I enter my password, either.


I'm not at all sure what the title of this question should be.  In the following image, you can see how I've used the Shading editor to create a texture.  What I want to do is to do this via python.  I would like a single script to both create my mesh, and fill in all it's faces (these things I can do), and define and apply a procedural texture. I've been searching for tutorials for how to do this, and found several that show me how to create custom nodes (and even node groups..), but.. that's not what I'm after. I've found this: , but it seems to me like there must be a tutorial that covers this more comprehensively.. I just don't know what key-words to use yet to find it. Any help appreciated, including with figuring out what the title of this question should actually be.

How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting?


So, there's odds and ends of 'their world is our world' about Harry Potter. Quite a lot about the series suggest that wizards are in our world, in secret. Of course, non-magical folks wouldn't notice anything, right? Because they're a secret...  So here's the thing, great seismic events in history would have happened the same way, presumably. So did, for instance, the second world war happen in the world of Harry Potter.  And if so, why didn't the wizards do anything about it?

Update to the question, contains spoilers for "Fantastic Beasts: The Crimes of Grindelwald":      In the speech that Grindelwald gives to his supporters in Paris (in 1927), he references future events, including WWII, the holocaust and the atomic bomb. One can assume that the events leading up to his battle with Dumbledore have a definite connection to WWII, although it is not clear exactly what that connection is.       Dumbledore defeated Grindelwald in 1945. From the books you get the impression that Grindelwald was the most terrifying thing to happen at the time. But we know that among muggles, that was the time of the holocaust, WWII and the first nuclear attacks. As scary as the war with Grindelwald would have been, the world as a whole was facing a much bigger problem.  We also know that wizards interact with the muggle world, why else would the minister of magic talk to the British prime minister? Presumably, good wizards care about muggle well being as much as they do about magical people's well being. They could also intervene in the affairs of muggles and cover their tracks or make whatever happened look like natural events.   But then that raises the question, why didn't Dumbledore, given his powers, intervene in WWII to stop Hitler and the holocaust?   I can think of 3 possible answers:    In the Potterverse WWII never happened, and so Grindelwald was the biggest problem facing humanity (both wizards and muggles) at the time.  As good as the wizards seem in the books, they actually are pretty self centered and don't really care about muggles at all. As long as the wizarding community is safe, the muggles could commit all the genocides and nuclear attacks they wanted, magical people wouldn't care less.  The events of WWII were all actually side effects of the battle between Dumbledore and Grindelwald (Or Grindelwald and the Nazis were both side effects of some greater underlying evil phenomenon). That's why both Grindelwald and Hitler were defeated in 1945.      Which one of 1, 2 or 3 is most likely? Or is there another explanation?


How can I generate multi-dimensional data from a (estimated) Gaussian mixture pdf? In general, what would be ways to generate multi-dimensional data from a pdf? I read rejection sampling can be used, but it requires estimating an upper bound for the pdf, which is not an easy task for me.

How can I sample from a mixture distribution, and in particular a mixture of Normal distributions in R? For example, if I wanted to sample from:   $$ 0.3\!\times\mathcal{N}(0,1)\; + \;0.5\!\times\mathcal{N}(10,1)\; + \;0.2\!\times\mathcal{N}(3,.1) $$  how could I do that?


I'm looking for the way (assuming there is one) of putting the current page's chapter title in the header of the page. Basically, what I want is:    where only the chapter's title ("First Chapter" in this case) shows up.  However, what I get is:    or some variant, but always with "Chapter 1" or just "Chapter" in there.  My code is:   % AUTHOR: Enter the title, all letters in upper case \def \booktitle{Trial Title} \def \currentrevision{A} \def \documentnumber{ME-MAN-001}  \title{\booktitle}   \pagestyle{fancy} \fancyhf{} \fancyhead[LE,RO]{\leftmark}  % \fancyhead[LE,RO]{FIRST CHAPTER}  \fancyhead[RE,LO]{\documentnumber~Rev.~\currentrevision} \fancyfoot[LE,RO]{\thepage}   Yes, I am using fancyhdr and I've reviewed the documentation and tried the variants, but nothing seems to work. I've also tried too many things to detail here.

MWE is below:  \documentclass{report} \usepackage{fancyhdr} %\newcommand{\currentchapter}{} %\let\oldchapter\chapter %\renewcommand{\oldchapter}[1]{\oldchapter{#1}\renewcommand{\currentchapter}{#1}}  %\renewcommand{\sectionmark}[1]{\markright{#1}}  %\renewcommand{\chaptermark}[1]{\markboth{\textbf{#1}}{}} \rhead{\leftmark}   \fancypagestyle{newstyle}{ \fancyhf{} \fancyhead[LE]{{\nouppercase{\leftmark}}} \fancyhead[RO]{{\nouppercase{\rightmark}}} } \begin{document}   I want to have      'Introduction'   in place of     'Chapter 1. Introduction'   as the header for my pages inside the document. So, is there a command set I can use instead of \leftmark to get the desired results? Or can I redefine \leftmark in any way to get the desired results?


Hello everyone I'm new user of Ubuntu.  Today I've installed the Ubuntu 16 on my laptop, whole life I was using windows so I'm totally new to this system.  I was using cable connection but when I unplug the cable I recognize that system does not show any wifi connection...  I tried few solution from this site - neither worked for me and I think that I mess up something by pasting all those solution commands into my terminal...  When I was looking for nvidia drivers In additional driver menu I found something below nvidia driver - there is Unknow: Unknow (I think it might be the problem). I'm lenovo y720 user - all drivers are made only for windows 10. I just want to say something else - when I change the driver of Unknow: unknow in additional drivers for suggested on my cable connection stops working and the wifi doesn't work anyway.  Can anyone help me locate the problem? I would be gratefull :)  @edit lspci -nnk | grep -e 0200 -e 0280 -A3 resault:     02:00.0 Network controller [0280]: Intel Corporation Device   [8086:24fd] (rev 78)  Subsystem: Intel Corporation Device [8086:1010]     Kernel driver in use: iwlwifi   Kernel modules: iwlwifi 03:00.0   Ethernet controller [0200]: Realtek Semiconductor Co., Ltd.   RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168]   (rev 15)  Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit   Ethernet Controller [17aa:3881]   Kernel driver in use: r8169     Kernel   modules: r8169   now rfkill list all:     0: ideapad_wlan: Wireless LAN    Soft blocked: no    Hard blocked: yes 1:   ideapad_bluetooth: Bluetooth  Soft blocked: no    Hard blocked: yes 2:   phy0: Wireless LAN    Soft blocked: no    Hard blocked: no 3: hci0:   Bluetooth     Soft blocked: no    Hard blocked: no   and uname -r:     4.13.0-32-generic

I recently got a lenovo Y40 laptop and after i installed ubuntu 14.04 (also in the live usb) Wireless doesn't work. It says that it is disabled by hardware switch, however the hardware switch doesnt work (its intention is to put on airplane mode but does nothing when pressed in ubuntu) wireless works in windows and the BIOS has it enabled. I tried resetting the BIOS but it still doesn't work. Here are some command outputs  lspci:  03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10) 04:00.0 Network controller: Intel Corporation Wireless 3160 (rev 93)   rfkill list all:   0: ideapad_wlan: Wireless LAN     Soft blocked: no     Hard blocked: yes 1: ideapad_bluetooth: Bluetooth     Soft blocked: no     Hard blocked: yes 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 3: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   lswh:     *-network         description: Ethernet interface         product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller         vendor: Realtek Semiconductor Co., Ltd.         physical id: 0         bus info: pci@0000:03:00.0         logical name: eth0         version: 10         serial: f8:a9:63:31:2e:b6         size: 1Gbit/s         capacity: 1Gbit/s         width: 64 bits         clock: 33MHz         capabilities: bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation         configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168g-3_0.0.1 04/23/13 ip=192.168.1.4 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s         resources: irq:64 ioport:4000(size=256) memory:c0604000-c0604fff memory:c0600000-c0603fff *-pci:3      description: PCI bridge      product: Lynx Point-LP PCI Express Root Port 4      vendor: Intel Corporation      physical id: 1c.3      bus info: pci@0000:00:1c.3      version: e4      width: 32 bits      clock: 33MHz      capabilities: pci normal_decode bus_master cap_list      configuration: driver=pcieport      resources: irq:59 memory:c0500000-c05fffff    *-network DISABLED         description: Wireless interface         product: Wireless 3160         vendor: Intel Corporation         physical id: 0         bus info: pci@0000:04:00.0         logical name: wlan0         version: 93         serial: a0:88:69:90:0a:38         width: 64 bits         clock: 33MHz         capabilities: bus_master cap_list ethernet physical wireless         configuration: broadcast=yes driver=iwlwifi driverversion=3.13.0-32-generic firmware=22.24.8.0 latency=0 link=no multicast=yes wireless=IEEE 802.11abgn         resources: irq:66 memory:c0500000-c0501fff


I woke up this morning to a notification email with some rather disturbing system log entries.  Dec  2 04:27:01 yeono kernel: [459438.816058] ata2.00: exception Emask 0x0 SAct 0xf SErr 0x0 action 0x6 frozen Dec  2 04:27:01 yeono kernel: [459438.816071] ata2.00: failed command: WRITE FPDMA QUEUED Dec  2 04:27:01 yeono kernel: [459438.816085] ata2.00: cmd 61/08:00:70:0d:ca/00:00:08:00:00/40 tag 0 ncq 4096 out Dec  2 04:27:01 yeono kernel: [459438.816088]          res 40/00:00:00:4f:c2/00:00:00:00:00/40 Emask 0x4 (timeout) Dec  2 04:27:01 yeono kernel: [459438.816095] ata2.00: status: { DRDY }   (the above five lines were repeated a few times at a short interval) Dec  2 04:27:01 yeono kernel: [459438.816181] ata2: hard resetting link Dec  2 04:27:02 yeono kernel: [459439.920055] ata2: SATA link down (SStatus 0 SControl 300) Dec  2 04:27:02 yeono kernel: [459439.932977] ata2: hard resetting link Dec  2 04:27:09 yeono kernel: [459446.100050] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300) Dec  2 04:27:09 yeono kernel: [459446.314509] ata2.00: configured for UDMA/133 Dec  2 04:27:09 yeono kernel: [459446.328037] ata2.00: device reported invalid CHS sector 0   ("reported invalid CHS sector 0" repeated a few times at a short interval)   I make full nightly backups of my entire system to an external (USB-connected) drive, and the above happened right in the middle of that backup run. (The backup starts at 04:00 through cron, and tonight's logged completion just before 04:56.) The backup process itself claims to have completed without any errors.  There are two internally connected SATA drives and two externally (USB) connected drives on my system; one of the external drives is currently dormant. I don't recall off the top of my head which physical SATA ports are used for which of the internal drives.  When googling I found  which indicates that a very similar error occured after 8-10 GB had been copied to a drive, but the actual failure mode was different as the drive switched to a read-only state. The only real similarity is that I did add on the order of 7-8 GB of data to my main storage last night, which would have been backed up around the time that the error occured.  smartd is not reporting anything out of the ordinary on either of the internal drives. Unfortunately smartctl doesn't speak the language of the external backup drive's USB bridge, and simply complains about Unknown USB bridge [0x0bc2:0x3320 (0x100)]. Googling for that specific error was distinctly unhelpful.  My main data storage as well as the backup is on ZFS and zpool status reports 0 errors and no known data errors. Nevertheless I have initiated a full scrub on both the internal and external drives. It is currently slated to complete in about six hours for the internal drive (main storage pool) and 13-14 hours for the backup drive.  It seems that the next step should be to determine which drive was having trouble, and possibly replace it. The ata2.00 part probably tells me which drive was having problems, but how do I map that identifier to a physical drive?

Consider following kern.log snippet:   ata4.00: failed command: WRITE FPDMA QUEUED  ata4.00: cmd 61/00:78:40:1e:6c/04:00:f0:00:00/40 tag 15 ncq 524288 out         res 41/04:00:00:00:00/04:00:00:00:00/00 Emask 0x1 (device error)  ata4.00: status: { DRDY ERR }  ata4.00: error: { ABRT }  ata4: hard resetting link  ata4: nv: skipping hardreset on occupied port  ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)  ata4.00: configured for UDMA/133  ata4: EH complete   How can I identify which hard drive the kernel actually means when it talks about ata4.00?  How can I find the corresponding /dev/sdY device name?


Reading around I can see that Android Market doesn't yet support Gift tokens or similar, and while Amazon's Android market does, its only available in the USA. So the question is, what sort of workarounds are there for this?   For example, could I log in to android market from the recipients phone with my google credentials, buy and then download the application, then logout again? Would the application still work? Can I pay with my credit card with the other persons Google wallet? Is this consistent with the usage policy of the Android market? What other options might I have?

I would like to buy a game (well several copies of it really) for some of my friends for Christmas. Is there any way to do this? Would I have to rely on the publisher, or is there some way to "gift" apps from the market?


Let $X_1,...,X_n$ be i.i.d. with common density $$f(x)=\theta x^{\theta -1}I\{x \in [0,1]\}$$ where $\theta >0$. e) Determine whether the MLE is unbiased for $\theta$.  If not unbiased, could you redefine it to make it unbiased?  I found the MLE in a previous part of the problem to be $\frac{n}{-\sum_{i=1}^n \ln(x_i)}$ (I hope I'm correct on this; please inform me if I'm not).  I know for an estimator to be unbiased, $E(\theta)=\theta$, but taking the expectation of the MLE is proving challenging.  Any help?  Or did I just find the MLE completely incorrectly?

Let $\hat{\theta}_n= -\frac{n}{\sum_{i=1}^n \log(X_i)}$, where $X_i$ are i.i.d. samples from distribution with pdf $\theta x^{\theta-1}$ for $x \in (0,1)$. How to prove that $\hat{\theta}_n$ is consistent estimator of $\theta$.


The only proof I've seen of Conservation of Angular Momentum assumes that the internal forces of the system act along the line joining particles i and j (i.e. - all internal forces are central.) Can we prove Conservation of Angular Momentum without this assumption?  If not, how can we apply conservation of angular momentum to systems that involve collisions, such as the following:  A uniform circular turntable is at rest in the $xy$ plane and is mounted on a frictionless axle, which lies along the vertical $ z$ axis. I throw a lump of putty (mass $m$) with speed $v$ toward the edge of the turntable. When the putty hits the turntable, it sticks to the edge, and the two rotate together with angular velocity $\omega.$ Find $\omega.$

We know that angular momentum is defined as the cross product of position and linear momentum. By taking the time derivative, we can deduce that the time rate of change of the angular momentum equals the net torque.  Then why is the conservation of angular momentum considered a law, when we can easily show it is conserved when no net torque is applied, by using Newton's laws?  It truly confuses me.


I want to use Asmptote to draw a small triangle in red inside a unit cube. Here is my code:   settings.outformat="pdf"; settings.prc = false; settings.render = 0; defaultpen(fontsize(10pt)); size(4cm,0); import three; draw(unitbox); triple p0 = (0.8,1,0); triple p1 = (1,0.8,0); triple p2 = (1,1,0.2); draw(surface(p0 -- p1 -- p2 -- cycle),red); draw(p0 -- p1 -- p2 -- cycle);   However, color of the triangle is not desired. How could I resolve it? Thanks in advance!

I'm trying to display a white 3D ball with Asymptote (3D PDF), but it always turns up gray:    import graph3; import solids;  defaultrender.merge=true; size(10cm,0);  currentprojection=orthographic(-Z);  //currentlight=Headlamp; //currentlight=light(-10,1,1); //currentlight=White; currentlight=Viewport;  draw(unitsphere,rgb(1,1,1));   I understand it's a lighting issue, and I've tried playing with its settings (the lines commented out in my source are some of my attempts), but I never manage to have white be white. If I understand correctly, I need a whiter diffuse component in my light, but I cannot see how to achieve that. And the documentation is not very clear…    This will be part of a molecular model, and the rendering I'm going for it something like this:


I have made some adjustments to my code and now is working , i just wonder if this is a good and safe way or i have to change or add something to the code.  <?php  session_start(); $db = mysqli_connect("localhost", "root", "", "store"); if (isset($_POST['register_btn']))  {     $username= mysqli_real_escape_string($db, $_POST['username']);     $email = mysqli_real_escape_string($db, $_POST['email']);     $pas= mysqli_real_escape_string($db, $_POST['pas']);     $stmt = $db->prepare("INSERT INTO users (username,email,pas)                            VALUES(?,?,?)");     $stmt->bind_param("sss", $username, $email, $pas);     $stmt->execute();            mysqli_query($db, $stmt);     header("location: login.php"); } ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I am an Indian citizen travelling from Toronto to Delhi. I have a valid Canadian long term Visa. I am thinking of booking a flight from Toronto to Lisbon, Lisbon to Vienna, Vienna to New Delhi. I'm wondering if I will be asked for an Airport Transit Visa?  It seems the connecting flights are from the same terminal and the layover is less than 4 hours on both connections in Vienna and Lisbon.

I am an Indian citizen. I am flying from Toronto to New Delhi. I have two transits: one at Lisbon airport and the second one at Madrid airport.  While the Consulate of Portugal has assured me that I do not need an airport transit visa during my 2 hours stay in Lisbon airport, I did not get a definitive answer from the consulate of Spain in Toronto.   At Madrid airport, I need to make a transfer from Terminal 2 to Terminal 1.   Does anyone here know whether I need to pass through immigration while making this transition in Madrid and if so, do I need a Schengen visa for that?


I tried sudo apt-get remove popcorn time but popcorn is not being recognized, then I installed the Synaptic Package Manager but it also does not recognize it, so how can i uninstall popcorn time?

I've installed Popcorn Time using the following command:  cd wget https://raw.github.com/hotice/webupd8/master/popcorn-build chmod +x popcorn-build ./popcorn-build   that I .   How can I uninstall it?


I own a Acer Aspire es1-532-c5yw, and it's celeron processor is no where near what I need. I don't have enough money, however, to afford to buy a laptop with at least an i5. I was therefore wondering if you would be able to replace the CPU (that's soldered to the motherboard) with a better one, and if so what would be the upgrade limits?  Thanks, Owen

I want to upgrade the CPU of my T430s laptop from i7-3520M to i7-3632QM. I'm sure i7-3632QM is supported (same socket (BGA1224), same TDP (35W) and microcode found in BIOS (306A9.PAT)).  So my question is: 1) is it possible to de-solder the current CPU without damaging it, and to solder the new CPU without damaging it and the motherboard ? 2) if so, what tools are necessary? who can do that at a reasonnable cost?  Until now, I was unable to find anyone able (or willing) to do that (I'm located in France, and I have tried a local fablab, electronics shops, TV repair shops, ...). Any hint would be appreciated.


I have Xubuntu 12.04 with latest updates on Toshiba Satellite A210-15K laptop  semen@bloknot:~$ uname -a Linux bloknot 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux   ...and I can't adjust LCD brightness (. I tried to use fnfx tool:  semen@bloknot:~$ fnfx-client FnFX Client v0.3 (c) 2003, 2004 Timo Hoenig <thoenig@nouse.net>  fatal error: Could not open "/home/semen/.fnfxrc". Please make sure that the default config is accessible.   ...and xbacklight:  semen@bloknot:~$ xbacklight No outputs have backlight property   ...and I tried to add acpi_osi=Linux and acpi_backlight=vendor parameters in GRUB config, but nothing happens.  I soppose .fnfxrc file must be available after installation or first fnfx demon lauch. Isn't it?  semen@bloknot:~$ cat /sys/class/backlight/toshiba/brightness -5 semen@bloknot:~$ cat /sys/class/backlight/toshiba/max_brightness 7 semen@bloknot:~$ echo 6 | sudo tee /sys/class/backlight/toshiba/brightness [sudo] password for semen:  6 ...   ...but brightness is the same.  Help, please.  P.S. Execuse me for my poor English.  UPD. I have spent 2 days to solve this boring problem, but I can't. So. If I wish linux work correctly, I have to choose another distro.

I installed xbacklight, hoping that it would be able to control my brightness. When trying to change brightness, I was told "No outputs have backlight property". After looking around, I found that this has to do with my computer not having a /sys/class/backlight folder. I know that this is the problem but don't know exactly how to fix it.  Not sure if its needed or not but here some system info from inxi:  System:   Kernel: 3.16.0-57-generic x86_64 (64 bit, gcc: 4.8.2)            Desktop: LXDE (Openbox 3.5.2) Distro: Ubuntu 14.04 trusty Machine:  HP EliteBook 8460p CPU:      Dual core Intel Core i5-2520M CPU Graphics: Advanced Micro Devices [AMD/ATI] Seymour [Radeon HD 6400M/7400M Series]    Does this have to do with drivers (perhaps Intel/AMD graphics drivers)?


I'm building this calculator app with two textviews (one for the formula and one for the result). Now the result after calculations is stored in a variable called result which is left empty by default. But when I run it, after the function executes, everything works but the result variable still remains an empty string. Please help me.  ScientificCalculator.java   int prevAnswer = 0; TextView formulascreen; TextView resultscreen; String formuladisplay = ""; String resultdisplay = ""; String result = ""; String operator;  public void onClickEquals(View view) {      Toast toast = Toast.makeText(getContext(), "Equals to: " + String.valueOf(result), Toast.LENGTH_SHORT);     toast.show();      if (operator == "+" || operator == "-" || operator == "x" || operator == "÷") {          getResult();         updateresultdisplay();      }  }  private boolean getResult() {      if (operator == "") return false;      String[] operation = formuladisplay.split(Pattern.quote(operator));      if (operation.length < 2) return false;      result = String.valueOf(res.format(simpleOp(operation[0], operation[1], operator)));      return true;  }  public double simpleOp(String a, String b, String op) {      switch (op) {          case "+":             return Double.valueOf(a) + Double.valueOf(b);          case "-":             return Double.valueOf(a) - Double.valueOf(b);          case "x":             return Double.valueOf(a) * Double.valueOf(b);          case "÷":             return Double.valueOf(a) / Double.valueOf(b);          default:             return -1;      }  }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I want to prevent DML operations during certain processing-situations and provoke a Database.SaveResult with an Database.Error[]-List.  According to , the method addError() should "prevent any DML operation from occurring". As it turns out, this is not true. The following code commits the record to the database without any errors.  Account a = new Account(Name = 'Valid Corp Name Ltd.'); a.addError('Error one'); a.addError('Error two'); Database.SaveResult sr = Database.insert(a, false); System.debug(sr.isSuccess()); System.debug(sr.getErrors());   Debug log:  16:11:01:548 USER_DEBUG [5]|DEBUG|true 16:11:01:548 USER_DEBUG [6]|DEBUG|()   How can I prevent a record from beeing commited? I am aware of the similar question , which did not get answered. So I am trying again.

I moved a method that sets addError() from a trigger into a Helper class. As I started writing test code for it it seems like the addError() is not actually preventing DML operations for the records that get modified in the helper class.  The information from the SF  states: Marks a trigger record with a custom error message and prevents any DML operation from occurring.  Does this mean that addError() will not work outside of a trigger class?  EDIT  Adding some sample code.  public class MyHelperClass() {     public static void someMethod(Opportunity opp) {         opp.My_Field__c.addError('Some error');         insert opp;     } }   And sample test for it without any asserts:  @IsTest private class MyHelperClass_Test() {     @IsTest     static void someTest() {         Opportunity opp = new Opportunity();         opp.Name = 'Some Name';         opp.StageName = 'Prospect';         opp.CloseDate = Date.today().addDays(30);          MyHelperClass.someMethod(opp);     } }   The above inserts the opportunity and does not trigger an exception. Am I doing something wrong?


I am creating a module in which a dictionary is used. This dictionary contains some key/value pairs, whose order must be preserved when using in other modules. But whenever I iterate over dictionary and print the keys, the keys are not in the order in which they key/value pairs are inserted.  So my question is how should I preserve the order of key/value pair in a dictionary?  Any help will be highly appreciated...  Thanx in advance...

Is it possible to retrieve items from a Python dictionary in the order that they were inserted?


I have a custom logger class which implements the ILogger interface. The custom logger is a separate assembly/nuget. I was trying to use stacktrace to find the name of the calling method but it seems it differs if used in the program versus a unit testing project. Is there a more convenient way to get the calling method e.g. the calling assembly method name? public class MyClass {     private void HelloWorld() {         var myLoggerProvider = new LoggerProvider(Config);         LoggerFactory.AddProvider(myLoggerProvider);         var logger = LoggerFactory.CreateLogger<Program>();         LogInformation("HelloWorld");    } }  //   Inside custom logger  ////...      public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter)     {        //   Get the calling function name       var classFunction = new StackTrace(4).GetFrame(0).GetMethod().Name;     }  ///....

When logging in C#, how can I learn the name of the method that called the current method? I know all about System.Reflection.MethodBase.GetCurrentMethod(), but I want to go one step beneath this in the stack trace. I've considered parsing the stack trace, but I am hoping to find a cleaner more explicit way, something like Assembly.GetCallingAssembly() but for methods.


Find all functions $ f: \mathbb R \to \mathbb R $ such that for all reals $ x $ and $ y $, $$ ( x + y ) \big( f ( x ) - f ( y ) \big) = ( x - y ) f ( x + y ) \text . $$ I actually got the answer by guessing and checking, $ f ( x ) = a x ^ 2 + b x $, but I want to see the solution. My friend suggested surjectivity but I don't see how to continue. $ f ( x ) = f \left( \frac x { f ( x ) ^ 2 } \right) $; this is what I just got. The answer is correct, just need a solution. Thanks!

Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$(x+y)(f(x)-f(y))=(x-y)f(x+y)$$  My attempt:   If $x=-y \not = 0$ then $0= 2x f(0)$ so $f(0)=0$.   Suppose for the sake of contradiction that $f(x)=f(x+\epsilon)$ for some $x$ and $\epsilon>0$. Let $y=x+\epsilon$. Then $$0=\epsilon \cdot f(2x+\epsilon)$$ therefore as $2x+ \epsilon$ can take any real value $f$ is either strictly increasing or strictly decreasing or $f(x)=0 \; \; \forall \; \;x \in \mathbb{R}$.   Note that $f(x)=ax$ is a solution $\forall \; \;a \in \mathbb{R}$. Thanks so much for any help!


Informally, I realize that ~(P->Q) is the same as P^~Q, since the only way that the original conditional P->Q would be false is if we had both P^~Q.  I think that given ~(P->Q), the next step would be to assume ~(P^~Q) and try to obtain P^~Q via proof by contradiction, but after this step, I am not sure how to proceed.   The system I am using is Fitch. Unfortunately, I cannot use AnaCon or TautCon, nor can I use truth tables.

I'm trying to solve the following by natural deduction:  ~(P → Q) : P & ~Q  It's a trivial problem if identities are used, as can be seen by the following:   {1}      1.   ~(P → Q)                    Prem. {1}      2.   ~(~P ∨ Q)                   1 Mat. Impl. {1}      3.   ~~P & ~Q                    2 De Morgan's {1}      4.   P & ~Q                      3 DNE   Starting from step 2 of the previous proof, it's also fairly straightforward to reach a conclusion using natural deduction; i.e. starting from ~(~P ∨ Q), which is an identity of ~(P → Q):  ~(~P ∨ Q) :  P & ~Q   {1}      1.   ~(~P ∨ Q)                   Prem. {2}      2.   ~P                          Assum. {2}      3.   ~P ∨ Q                      2 ∨I {1,2}    4.   ~(~P ∨ Q) & (~P ∨ Q)        1,3 &I {1}      5.   P                           2,4 RAA {6}      6.   Q                           Assum. {6}      7.   ~P ∨ Q                      6 ∨I {1,6}    8.   ~(~P ∨ Q) & (~P ∨ Q)        1,7 &I {1}      9.   ~Q                          6,8 RAA {1}      10.  P & ~Q                      5,9 &I   I also found that it's fairly easy to conclude ~Q:   {1}      1.   ~(P → Q)                    Prem. {2}      2.   Q                           Assum. {3}      3.   P                           Assum. {2,3}    4.   P & Q                       2,3 &I {2,3}    5.   Q                           4 &E {2}      6.   P → Q                       3,5 CP {1,2}    7.   ~(P → Q) & (P → Q)          1,6 &I {1}      8.   ~Q                          2,7 RAA ... {1,2}    12.  P & ~Q   In spite of how easy it looks, I can't figure out how to do it. I believe it can be done in 12 steps. Thanks!


I have plugged in USB 2.0 Wireless 802.11N Adapter in my Ubuntu 20.04LTS Desktop. I have got a driver disk with my purchased Adapter. It has a folder of Linux driver. I can't install it. So it is showing - No Wi-fi Adapter Found! I have read their Release note: Check it here  It is showing it supports only Linux (kernel 2.6.18 ~ 3.6.6)  But I have checked with uname -a command and found the following result: Linux elliyaspc 5.4.0-38-generic #42-Ubuntu SMP Mon Jun 8 14:14:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux  From lsusb command - lsusb Bus 002 Device 004: ID 046d:c077 Logitech, Inc. M105 Optical Mouse Bus 002 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120 Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 007: ID 2e04:c022   Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  After executing install.sh file, I am getting this errors:  I need to know - is it possible to install this Adapter in my PC? If yes, how? Please help me.

I'm trying to install driver for my newly bought USB Wifi adapter. I tried installing driver provided in the CD that came with the adapter, it gave me this error  error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]   init_timer(ptimer);   ^~~~~~~~~~   _init_timer   The driver name in the provided cd is      RTL8188EUS_linux_v4.1.4_6773.20130222   so I tried installing all the driver available on internet with name of rtl8188EUS or rtl8188EU but nothing worked. Either they give an error like above or they just don't work. I think it is because my kernel version is      5.0.0-25-generic   and they all work with some old kernel version. Please guide me how do get rtl8188EUS driver working on my Ubuntu 18.04.2 lts.


There were some legitimate concerns about Drupal 8 potential performance regressions as a result of being built on top of Symfony2. Drupal 8 Beta-14 is the latest release; It seems that the Drupal 8 big release it comes apace. As per all the benchmarks I saw until I noticed that Drupal 8 is much slower than Drupal 7 especially for logged in users which is kind of a bummer.   Isn't Drupal supposed to be used for online communities where logged in users could interact? For displaying news and blogs there are already other software much convenient to use such as Wordpress. What kind of server would support such an expensive product? In this scenario, will be Drupal 8 a solution for high traffic online communities where logged-in users could post things and make comments and interact with each other?  Shouldn't this newer version of Drupal better than the old one? In terms of performance it doesn't seems so. This is why I'm thinking to find alternatives to Drupal for my potential clients. I'm not sure that financially speaking would worth to develop an online community website in Drupal and pay a lot for hosting and development.

Are there any reliable performance comparisons between vanilla Drupal 8 versus Drupal 7?  I have searched the web but only find the post "", which is far from encouraging.


Can I be allowed to move around within the Schengen zone on a single entry visiting visa of Norway, travelling from Norway to Germany or other Schengen countries before returning back to Norway for my final departure?

I have a single entry Type C Schengen visa (Sweden). While in Sweden, can I visit Italy or Germany and return to Sweden before I return to the UK?


I'm running 12.04 64bit, and every time I update using the command land, I always get   W: Duplicate sources.list entry http://gb.archive.ubuntu.com/ubuntu/ precise/restricted amd64 Packages (/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_precise_restricted_binary-amd64_Packages) W: Duplicate sources.list entry http://gb.archive.ubuntu.com/ubuntu/ precise/restricted i386 Packages (/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_precise_restricted_binary-i386_Packages) W: Duplicate sources.list entry http://gb.archive.ubuntu.com/ubuntu/ precise-updates/restricted amd64 Packages (/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-amd64_Packages) W: Duplicate sources.list entry http://gb.archive.ubuntu.com/ubuntu/ precise-updates/restricted i386 Packages (/var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_precise-updates_restricted_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   I've looked at loads of suggestions from previous problems including unselecting the sources from software sources, or manually removing the 'duplicates' manually from sources.list.  However, when trying to fix it, I've not found the duplicates highlighted anywhere? So I have no idea why this message keeps coming up.  The errors aren't causing anything detrimental to my system but it just looks a bit messy and I would like to know what's causing it.  Any ideas?  Thanks!

I keep getting this warning whenever I try to run sudo apt-get update.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   Below is the output from /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu precise main restricted deb-src http://archive.ubuntu.com/ubuntu precise main restricted  deb http://archive.ubuntu.com/ubuntu precise-updates main restricted deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted  deb http://archive.ubuntu.com/ubuntu precise universe deb-src http://archive.ubuntu.com/ubuntu precise universe deb http://archive.ubuntu.com/ubuntu precise-updates universe deb-src http://archive.ubuntu.com/ubuntu precise-updates universe  deb http://archive.ubuntu.com/ubuntu precise multiverse deb-src http://archive.ubuntu.com/ubuntu precise multiverse deb http://archive.ubuntu.com/ubuntu precise-updates multiverse deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse  deb http://archive.ubuntu.com/ubuntu precise-security main restricted deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted deb http://archive.ubuntu.com/ubuntu precise-security universe deb-src http://archive.ubuntu.com/ubuntu precise-security universe deb http://archive.ubuntu.com/ubuntu precise-security multiverse deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse   How do I fix it?


My output:   What it's supposed to look like:   My code:   My output:  Jersey number: 84, Rating: 7 Jersey number: 4, Rating: 5 Jersey number: 66, Rating: 9   Asking for:  Jersey number: 4, Rating: 5 Jersey number: 66, Rating: 9 Jersey number: 84, Rating: 7   I am not sure how to get the jersey numbers in the desired order, I've tried a variety of ways and I'm still unsure. The specific order is where it's getting me. Any ideas? Thank you for reading!

There's an existing function that ends in the following, where d is a dictionary:  return d.iteritems()   that returns an unsorted iterator for a given dictionary. I would like to return an iterator that goes through the items sorted by key. How do I do that?


I think this is fairly straightforward but I am not sure.  I am trying to insert copies of an object into an array, changing the value of some of them.  Ideally I would like to do this without a constructor function.  Here is what I have:  var person = {   gender: 'Male',   age: 50 }  var people = [];  for (var i = 0; i < 5; i++) {   var favoriteWord = "hi";   person.favoriteWord = favoriteWord;   people.push(person); }  for (var i = 0; i < 5; i++) {   var favoriteWord = "goodbye";   person.favoriteWord = favoriteWord;   people.push(person); }  console.log(people)   What happens is that every item in the array takes on the same favoriteWord property. In essence all of the items in the array are the same.  Is there a way to change this or do I have to use a function?

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


To be clear: this isn't a question about whether or not choosing one necklace or the other has an impact on gameplay, or a duplicate of , since (please read in full)...      refers to the scene where Booker enters the lighthouse and is drowned by the other Elizabeths (all without a necklace), implying that "his" Elizabeth hasn't entered with him at all (possibly to avoid the threat to her very existence should she enter since she would be killing her father before her own conception). The below refers to the scene in the rowboat before they enter the lighthouse where Elizabeth is seen with a different necklace (not the lack thereof)--this is therefore a different question with different implications (i.e. that the Elizabeth guiding Booker through the Sea of Doors to the drowning already is a different Elizabeth for some unknown reason).   I personally chose the bird for Elizabeth during a second play-through, and tried to pay attention to it the whole way through, now aware of its significance.   I noticed the following:     when I was rowing to the lighthouse with her and the Luteces for the third and last time before entering the lighthouse at the very end of the game, her pendant was briefly changed to the cage right up until Booker climbs the ladder of the dock (i.e. right after you cross the tear in the wall of your apartment of "20 years later" to join the Luteces waiting for you, they comment on the mark on your hand, and you board the rowboat for a third time).   The game gives you plenty of time to catch the switch during this scene:     as light reflects off the pendant multiple times while you're rowing to the dock and Elizabeth says "Booker wake up, this is where it started" to which he replies "I sold you... I sold you...", you can clearly see the pendant is now a cage when it should be a bird (in my case).   My question is: does this mean the Elizabeth that is with you during that very short segment is actually another Elizabeth? And, if so, what possible implications does it have?

Spoilers within. Finish the game before reading on.      I've already . But I did notice that at the end, the Elizabeth that drowns me in the baptizing pond doesn't wear either brooch, just an unadorned neckband. Is this an oversight or what is the meaning of it? She still wears it on the way to the lighthouse. Did the brooch go missing? Did she take it off? Or was my Elizabeth at some point replaced by another, and how/why?


I'm working on a simple password generating script and i'm essentially trying to use a global string variable called password but i'm unsure if i'm using it properly because i'm getting this error:     File "C:\Users\bkrause080\Desktop\Free Time Projects\LearningPythonProjects\passwordGenerator.py", line 34, in <module>     if __name__ == "__main__": main()   File "C:\Users\bkrause080\Desktop\Free Time Projects\LearningPythonProjects\passwordGenerator.py", line 32, in main     print "Your strong password is: ", strong(lowercase, uppercase, numbers, specials)   File "C:\Users\bkrause080\Desktop\Free Time Projects\LearningPythonProjects\passwordGenerator.py", line 22, in strong     password += random.choice(lowercase).rstrip('\n') + random.choice(uppercase).rstrip('\n') + random.choice(numbers).rstrip('\n') + random.choice(specials).rstrip('\n') UnboundLocalError: local variable 'password' referenced before assignment   Here is my source code:  import random  lowercase = ['a', 'b', 'c', 'd','e', 'f', 'g', 'h', 'i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] uppercase = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] numbers = ['1','2','3','4','5','6','7','8','9','0'] specials = ['~','!','@','#','$','%','%', '^', '&','&','*','(',')','?','<','>','[',']'] password = ""  def weak():     with open("EnglishWords.txt", "r") as f:         weakWords = f.readlines()     password = random.choice(weakWords).rstrip('\n') + random.choice(weakWords).rstrip('\n')     return password  def medium(lowercase, numbers):     for i in range(0,4):         password += random.choice(lowercase).rstrip('\n') + random.choice(numbers).rstrip('\n')     return password  def strong(lowercase, uppercase, numbers, specials):     for j in range(0,3):         password += random.choice(lowercase).rstrip('\n') + random.choice(uppercase).rstrip('\n') + random.choice(numbers).rstrip('\n') + random.choice(specials).rstrip('\n')     return password  def main():     passStrength = raw_input("What strength password would you like? (weak/medium/strong): ")     if passStrength == 'weak':         print "Your weak password is: \n", weak()     elif passStrength == 'medium':         print "Your medium password is: ", medium(lowercase, numbers)     elif passStrength == 'strong':         print "Your strong password is: ", strong(lowercase, uppercase, numbers, specials)  if __name__ == "__main__": main()   I'm very new to python and only really have experience in java and C so any info would be very appreciated!

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


I'm trying to do an in-place replacement of an IP address in a file using sed. I know that . is a wildcard, so I've tried doing the following:  sed -i -e 's/.\..\..\..\./127.0.0.1/g' /.../myfile.txt  however I'm not sure how many digits each section of the IP address could be (1-3), and I'm also not sure if my escape works as well. Any advice? Much appreciated

I need to find and replace either one or two numerical characters in strings in a file.  The strings are IP addresses of the form:   10.xx.y.z    Where xx can be one or two characters.    I want to replace the xx with the single character 0, so I have  10.0.y.z    preserving the values of y and z.   The string may appear multiple times in the file.  What is the sed invocation to do this?


I often find myself in the situation that I'm riding my bike on the road, holding up several cars whom I can tell are getting impatient (there are oncoming cars so its hard to overtake safely). A lot of the time the pavement is completely empty. Would I be wrong to then switch to the pavement in order to (1) allow the cars to pass (2) reduce the risk of impatient drivers carelessly overtaking me? Where does the law stand on this? Moreover if it is allowed, does the pavement have to be completely empty?  Edit: Clarification - I'm more asking what more experienced bike riders do in this situation, rather than the exact legislation. If you've had any encounters with the police with such a situation, then that would be even more helpful.

UK only, just wanted to check if it's actually legal. The area I'm living on is deadly on the roads, so want to know about riding on pavements (sidewalk/pedestrian walkways) instead where there is no bike lane (half of the roads have bike lanes around here and suddenly they disappear...).


I have created my account on stackoveflow from my company email address. link :     Now as I have left the company so my email account has been closed. How I can recover my account.

A while ago I lost my password database (and since then do the obvious and have encrypted backups...) and as a result I lost my password to most websites and I was unable to recover one of my emails. I decided just now to see how the SE site works on mobile (I use the app exclusively), but I just realized which email this account is associated with!  Is there any way I can get the password or/and email of this account changed?  If not should I try to use this account for as long as possible, or just start over now? I'm finally at a happy place with my account and it'd be a shame to start over.


I would like to permanatly remove AisleRiot Solitare and all of the games from dash, so I am not tempted to play them.  How can I do that?

I've searched the net for such information and found different command lines, like these ones:  sudo apt-get remove application sudo apt-get remove application*  sudo apt-get remove --purge application sudo apt-get remove --purge application*  sudo apt-get purge application sudo apt-get purge application*   So, what is the correct way? Is it necessary to use that "*"?  After that, I also found these commands:  sudo updatedb sudo locate application sudo rm -rf (file/folder name)


I see  but here I am not reporting an issue; I am asking what it's called and what it's for When I edit the tags on a question using the tag editor, sometimes I see a display of large gray bands scrolling from right to left. Once the edit is accepted they disappear. Question: What is the purpose and name of these big gray bands moving left to right when I try to save a tags edit? Details if relevant: It's generally on my old laptop: macOS 10.11.6 and Chrome version 91.0.... (incognito mode)

While I'm doing the inline tag edit by clicking on the "Edit tags" (privilege earned ) on a post, there is a loader image which is briefly visible. However, the loader image is very big and not looking good. I was able to reproduce this issue on the following browsers:     Configuration Version     Operating System Windows 10 Pro   Mozilla Firefox 87.0 (64-bit)   Google Chrome 89.0.4389.90 (Official Build) (64-bit)   Zoom 100%     Can this be fixed? GIF for the same:


Given $n$ fair coins, we define round $i$ as flipping all of them and obtain one observation $\vec{o_i}$.   We know the domain $O$ has $2^n$ variations.  If the game is designed as terminate as whenever all $2^n$ variations have being observed. What's the expected number of rounds $I$ for the game to terminate?   Even though all the coins are fair, but not necessarily independent. Assume we design the procedure of producing $\vec{o}$ and we know the correlation $\Sigma^{n \times n}$.

There are $n$ coupons in a collection. A collector has the ability to purchase a coupon, but can't choose the coupon he purchases. Instead, the coupon is revealed to be coupon $i$ with probability $p_i=\frac 1 n$. Let $N$ be the number of coupons he'll need to collect before he has at least one coupon of each type. Find the expected value and variance of $N$. Bonus: generalize to the case where the probability of collecting the $j$th coupon is $p_j$ with $\sum\limits_{j=1}^n p_j=1$  I recently came across this problem and came up with/ unearthed various methods to solve it. I'm intending this page as a wiki with various solutions. I'll be posting all the solutions I'm aware of (4 so far) over time.    EDIT: As mentioned in the comments, this question is different from the one people are saying it is a duplicate of since (for one thing) it includes an expression for the variance and it covers the general case where all coupons have unequal probabilities. The case of calculating the variance for the general case of coupons having unequal probabilities has not been covered anywhere on the site apart from , which this one intends to consolidate along with other approaches to solve this problem.    EDIT: Paper on the solutions on this page submitted to ArXiv:


So I understand setting up this proof and the basis step just fine, however, it is the induction step where I am completely lost. I went and asked the math tutors at my school, the the tutor that spoke with me even had a tough time with this problem... it is supposed to be tricky, any help would be appreciated, thank you!  Suppose you begin with a pile of n stones (n ≥ 2) and split this pile into n piles of one stone each by successively splitting a pile of stones into two smaller piles. Each time you split a pile you multiply the number of stones in each of the two smaller piles you form, so that if these piles have p and q stones in them, respectively, you compute pq. Show that no matter how you split the piles (eventually into n piles of one stone each), the sum of the products computed at each step equals n(n − 1)/2. (Hint: use strong induction on n.)  My attempt at this question makes no sense, and I just couldn't make sense of the tutors words in the time I had with her. Again, any help would be much appreciated!

Problem: James has a pile of n stones for some positive integer n ≥ 2. At each step, he   chooses one pile of stones and splits it into two smaller piles and writes the product   of the new pile sizes on the board. He repeats this process until every pile is exactly   one stone.      For example, if James has n = 12 stones, he could split that pile into a pile of size   4 and another pile of size 8. James would then write the number 4 · 8 = 32 on the   board. He then decides to split the pile of 4 stones into a pile with 1 stone and a   pile with 3 stones and writes 1 · 3 = 3 on the board. He continues this way until he   has 12 piles with one stone each.      Prove that no matter how James splits the piles (starting with a single pile of n   stones), the sum of the numbers on the blackboard at the end of the procedure is   always the same.   Hint: First figure out what the formula for the final sum will be. Then prove it using strong induction.  The formula I came up with is $n(n-1) / $2. It could be totally wrong...  My (Partial) Solution:  1) Base Case: (n=2) James has one pile of 2 stones. Suppose he takes the top-most stone and puts in one pile A, which now has size 1. He takes the remaining stone and places it into another pile B, which now has size 1. Then the product of the sizes is 1. The sum of all the products on his board is 1. Now, if he were to start again, and take the bottom stone first and put it in pile A, he has a pile of size 1, and then takes the top stone and puts it in pile B, he has a pile of size 1, and the product is 1, with sum of all products on the board is 1.   2) Inductive Hypothesis (Strong Induction): Suppose for some $k \geq 2$, $n$ stones can be split in $ 2 \leq n \leq k $ stones and $k-n$ stones.  3) Inductive Step:  Consider $n=k+1$. What do I do now?


Novice here  sudo lshw     Description: VGA compatible controller   Product  Thames [Radeon HD 7550M/7570M/7650M]   Manufacturer: Advanced Micro Devices, Inc. [AMD/ATI]    Physical ID: 0   Bus-Inormation: pci@0000:01:00.0   Version: 00   Width: 64 bits   Frequency: 33MHz   Abilities: pm pciexpress msi vga_controller bus_naster cap_list rom   (System language is German, please excuse possible translation errors)    System is Ubuntu 19.04 freshly installed, :~$ sudo apt install ubuntu-restricted-extras is also done.    So I know that 19.04 has driver support for Radeon HD 7xxxM series. Is there any document or instruction out there how to install that driver?

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


Just wondered if it is possible to do BBC-style multiple "Zoom Levels" output in QGIS 3 like this:      I used to use another app such as Adobe Illustrator to overlay the maps of different scales. However, as the maps were independent, it was neither fast (another step in another App) or precise (centres' coordinates may differ).  In the report I am working on, I intend to analyse a number of cases around the world, each of which is accompanied by a group of maps like the above example.  How can I have one underlying map for each location and export, say, three maps of different scales?

i want to create 4-5 detailed maps, and then an overview map that has rectangles that markes the locations of the detailed maps. Best case would be if the rectangles were links to the detailed map.   I have managed to make the overview and the rectangles, and think I know how to make the detailed maps one by one. The rectangles are drawn manually on the overview map. All layers that I plan on using are in the same QGIS project.  The final product that I hope to create would be the overview map on the first page, followed by the detailed maps. The overview would have links to the detailed maps, click on the rectangles to open the right detailed map.  Is there a way to link the detailed maps to the overview in QGIS 2.8 print composer?  I'm still not sure if I'm doing something wrong, when I try to create the overview. I want it to show the extents of all of my detailed maps.   Is this possible?


I tried to show items without duplicate in List Box.  private void Lst_Box_SelectedIndexChanged(object sender, EventArgs e) {     if (Chk_Multi.Checked == true)     {         Lst_Box.SelectionMode = SelectionMode.MultiSimple;         if (Lst_Box.SelectedItem == "Janvier")         {             Lst_Selected.Items.Add(Lst_Box.Text);         }     }     if (Chk_Multi.Checked == false)     {         Lst_Box.SelectionMode = SelectionMode.One;         Lst_Selected.Items.Add(Lst_Box.Text);     } }

Anyone have a quick method for de-duplicating a generic List in C#?


I am developing a search control, where user types in and it returns search results. When I get no matching result what message would be correct in that case?  a)  0 result  b)  0 results

When using zero as a quantifier, is it correct to use the singular form on the object of the quantifier, or the plural form?  It sounds confusing when I put it that way, but what I mean is: Which is correct?   Your password expires in 0 days. Your password expires in 0 day.   Essentially I suppose I'm asking, does "singular" mean "one" or "the opposite of more than one", as zero is not "plural" in the traditional "more than one" sense?  I'm pretty sure "days" sounds correct, but I can't be sure.


Suppose a question has a good answer, but I have a correction or further information to add - more than would work nicely in an edit or a comment. How should I add my incremental improvement answer? In either case, it seems clear that I should link to the original answer (vs. refer  to the "accepted answer") to give credit.  Should I rely on the link to direct people to the answer's content and just include my incremental content in my answer? Or should I incorporate a copy of the original answer's content so that my answer stands alone?  Distinction clarification: This question is distinct from , which solely addresses links to outside material. This question is about links to material within the same question on StackExchange. See  for implications of the distinction.

Should posts be self-contained; that is, should questions and answers avoid linking to outside material?  For example, I  to inline code the author had put in a paste bin.  Was that appropriate?


I've tried , but to no avail, and since I don't have the ability to move questions to other parts of Stack Exchange, I'm posting the question here.  Essentially, my question is regarding Stack Exchange's implementation of the numeric ID that gets generated every time a question is created. I'm looking to do something very similar, but in my case it is generating a customer number every time a customer signs up for my site. Since this number is what they will use to log in, I'd like it to be fairly short (in length) so it's not too overwhelming for them to remember. The catch though is that I'm looking for a way to do it in a distributed environment, which means using the auto increment won't work here.  I have to assume that a huge site like Stack Overflow/Stack Exchange is distributed, so I would very much like to know how it's able to create these unique integers without any collisions.

First of all, I should say that I think that this question does not belong on Meta.    StackOverflow URLs are inspirational to me, the way they are designed is very clever and they work really well but I can't seem to understand the logic being the IDs, here are some examples:  stackoverflow.com/questions/2121720/   If you change the ID to ID++ (2121721) one could think it would fetch the next question. Wrong, instead you're redirect to another question whose ID seems to be totally unrelated (2121212):  stackoverflow.com/questions/2121212/   Why does this happen? Is there some checksum algorithm on the IDs? Here is a sample trace:  2121720 -> exists 2121721 -> 2121212 2121213 -> exists 2121214 -> 2121155 2121156 -> exists 2121157 -> 2120884 2120885 -> exists 2120886 -> 2115014 2115015 -> 2114896 (what happened here?) 2114897 -> 2114799 2114800 -> 2114670 (what happened here?) 2114671 -> exists 2114672 -> 2110215 2110216 -> exists 2110217 -> 2106982 2106983 -> 2106955 (what happened here?)   The IDs seem to decrease. Can someone bring some light on this strange redirect behavior?