How can I give a specific name to every saved image?  This is the code that I have now    for i in img_list:     im = PImage.fromarray(i)      im.save(dir + '/' + 'img' + str(i) +'.tiff', 'tiff')    The problem is that when they are saved the name of the images is img and the respective numpy array.  I would like to have an output like  img_1.tiff  img_2.tiff  and so on

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


Cast fireball, have it counterspelled, can i counterspell the counterspell with my reaction?    Need specifics from the book.

Imagine Wizard A tries to cast fireball. Wizard B casts  as a reaction to try to nullify said fireball.    Can Wizard C cast counterspell as a reaction to nullify Wizard B's counterspell? Can you have a group of Wizards of an indefinite population counterspelling each other ad nauseam?


documentation states that clearInterval() is required to be passed in a setIntervalId, therefore the function has to look like:  var logMe = setInterval(function () {...}, interval)   Above function is also being self-invoked as soon as the page loads.  If i try to put it in an anonymous function as below:  var logMe = function (interval) {     setInterval(function () {         console.log("whatever");     }, interval); };   I can pass an interval argument, but I cannot stop it with:  function stopLogMe() {     window.clearInterval(logMe); };   So the question is, can I create a function "setInterval" that I can pass an argument (interval) and also stop it using clearInterval ?

I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event?   I want the user to be able to stop the repeated refresh of data.


I have a problem to solve that is the following,  I have a big prime number and i need to test if for example 2 is a primitive root a this big prime number, is there any easy way of doing this?  Thanks in advance.

How would you find a primitive root of a prime number such as 761? How do you pick the primitive roots to test? Randomly?  Thanks


I want to be able to compare to large spreadsheets side by side...  Since you can not natively expand to all monitors I would like to have the two documents open in two instances.  These files are links on Sharepoint.

Whenever I "double click" on an Excel file and another Excel file is open, the newly opened file automatically opens in the same application window as the previously opened Excel file. This isn't limited to just Excel, as I've seen Word do this as well. This poses a problem when wanting to compare documents side by side.    The current solution I have for this is to actually open another Excel or Word instance, and then open the file from within that application window itself. Is there a way to force Office to open a new instance of the application when double clicking on the file icons?  I'm currently using Office 2007 and Windows XP, but I've seen this on Office 2010 and Windows Vista and 7. I'm looking for an overall solution if possible.


When I try to back up my home folder with grsync to an external drive  I'm getting this error  rsync: opendir "/home/jackie/.cache/dconf" failed: Permission denied (13)   Can anyone help? Not related to my question but do all the applications and settings get backup as well?

I am creating backup and after completion I got this..  Could not back up the following files. Please make sure you are able to open them.      /home/vinay/.cache/dconf     /home/vinay/.gvfs   I through terminal to open these file using  cd /home/vinay/.cache/dconf   It shows  bash: cd: /home/vinay/.cache/dconf: Permission denied   How can I get access to these files?  Is it fine to get permissions or leave as it is and not creating any backup for these files?


Is there a mechanism by which we can flag user-names as offensive?

I think the community does a great job policing questions/answers, etc. and the community has some good tools available to do this.  Between flagging questions with some reasons behind it and editing posts, closing them, and deleting them, the only thing that seems to be missing to me is the ability to flag a user.  Reasons to flag a user as abusive:   Duplicate User Abusive Behavior Offensive user name or profile User profile consists of spam Others?


I'm new to Stack Exchange.  I've noticed time and time again, questions get little "clarification requests" in a shaded blue directly beneath. These comments are clearly not posted answers, but I don't see how to post them myself. My options are "answer" or "suggest edit" (I'm on the mobile app). The first posts an answer, the latter asks for me to change the question's content.  Are those comments edit suggestions? Do I need to visit the full website?

Across the Stack Exchange network you may leave comments on a question or answer.  How do comments work? What are comments for, and when shouldn't I comment? Who can post comments? Who can edit comments? How can I format and link in comments? My comment doesn't contain some of the text I typed in it; why? My comment appears to be long enough, but I can't post it because it's too short; why? Who can delete comments? When should comments be deleted? Why can't I comment on specific posts even if I have enough reputation to comment? When can comments be undeleted? What are automatic comments? How can I link to comments? Anything else I should know about comments?  Also see the FAQ articles on  and .


After authorization,  redirects to the main page.  Could you redirect to the original page (from which I've tried to log in)?

Recently, the redirect behaviour of login on SEDE has changed (for the worse). Steps to reproduce:   When logged off, go to a query page Click the "login" link Login   Previously, you would be returned to the query page in a logged-in state (ready to run the query without captcha).  Currently, you are redirected to the SEDE front page (http://data.stackexchange.com/#) (so you then have to re-navigate back to where you were). The returnurl parameter passed in the first few steps is lost somewhere along the way.  Could  be reinstated?


Please explain why in Photoshop setting a font size to 16pt or 16px looks exactly the same size but if I do the same test on a web site, the font-sizes are VERY different.      Why would Photoshop consider 1px = 1pt but the web show them as very different sizes? What are they doing differently?

What is the difference between points and pixels?


Harry: Not Slytherin. Not Slytherin. Sorting Hat: Not Slytherin, eh? Are you sure? You could be great, you know. It's all here in your head. And Slytherin will help you on the way to greatness, there's no doubt about that. No?  According to Sorting Hat, Harry was best suited for Slytherin. Was this a confusion came because of Voldemort's soul part in Harry? Or, did Harry originally had attributes to be a great Slytherin?

The Sorting Hat is a sentient magical artifact that has the ability to initiate communication and have conversations with the person wearing it. There's two things that make me wonder if it would have been possible for the Sorting Hat to have told Dumbledore which student was a Horcrux:  First, the nature of the Sorting Hat itself:     There's nothing hidden in your head,   The Sorting Hat can't see.   So try me on and I will tell you   Where you ought to be . . .      Sorcerer's Stone - Page 117 - US Hardcover   Second, we know Harry is definitely a Horcrux:     "You were the seventh Horcrux, Harry, the Horcrux he never meant to make."       Albus Dumbledore - Deathly Hallows - Page 709 - US Hardcover   If Dumbledore had put on the Sorting Hat and had a conversation with it about Harry Potter, would the hat have been able to tell Dumbledore that Harry was a Horcrux?


Since updating to iOS 11, I've lost the ability to surface apps from the swipe-down Spotlight search field. This was my preferred method of launching apps as it was quite a lot more convenient than swiping through endless pages of icons.  I found a couple of references (, ) pointing out that this behavior has been changed in iOS 11. Users are now forced to enable Search & Siri Suggestions for EACH app (found under Settings > Siri & Search)    If you do not do this, then the only way to surface an app via Spotlight is to type out the FULL APP NAME verbatim. Yes, that's C-a-l-c-u-l-a-t-o-r.  Not enough, apparently...    That last R — convenient!    Also, search does not yield the same result as past versions. Now, content from within the apps is also displayed. For example, if Evernote has its Siri function enabled, not only will the app itself show up in Spotlight, but also any notes inside Evernote that contain your search term. This is unwanted and potentially hazardous to privacy.  There seems to be no way to disable this or revert its behavior. I am posting this as a warning as well as a plea to any Apple engineers who might stumble onto this post. Apple, please fix this broken feature.

Since updating to iOS 11, search is unable to find my apps. Is this a new feature of iOS 11; a bug; or something that will eventually resolve itself over time?  I have so many apps that the only practical way to find them is to search for them, and in the past this has worked perfectly. E.g. simply typing "stack" (in fact just "st") suggests several apps including the one I'm looking for,  listed right at the top of the screen.  Now however I get a very different result:    A bunch of useless search results at the top, and a suggestion from the app store for an app I'd never want. No sign of the frequently used app sitting right on my device.  What's going on here. Is there anything (short of restoring iOS 10) that I can do do address this?    Judging from the behavior I'm seeing I wonder if Apple hasn't changed the meaning of the Siri setting for apps from meaning "search in the app" to "search for the app": the only apps I see at all are ones where this setting is enabled. Is that perhaps what's happened (or does having this on just get those apps indexed first)?


I have a directory with a very large number of subdirectories (~800) that were generated programmatically. I want to get a count of the number of files in each of these subdirectories to check for anomalies (if the code broke on a run then some of the files will be missing). What's a quick way to do this? The sort of output I'm looking for is:    Name_of_Folder_1 [# of files in Folder 1]    Name_of_Folder_2 [# of files in Folder 2] ...

I want to see how many files are in subdirectories to find out where all the inode usage is on the system. Kind of like I would do this for space usage  du -sh /*   which will give me the space used in the directories off of root, but in this case I want the number of files, not the size.


I am using webform module. it is good for fulfil reqs. but there is a problem here.  i want to add placholder in textfields and in textarea. i am failed to do so.  Anyone can suggest any solution?

I'm trying to add the placeholder attribute to all textfields across my website, but I'm having no luck.  I've created a module that overrides hook_form_alter  function mymodule_form_alter(&$form, &$form_state, $form_id) {     foreach ($form as $key => $value) {         if ("textfield" == $value["#type"]){             $value['#attributes']["placeholder"] = t($value["#title"]);         }     } }   I should tell you that I'm also using the webform module.


this series has been driving me crazy, the thing is I need to determine if the series converges or not, and if it does I need to find the value at which converges.  $\displaystyle{\sum_{n=1}^{\infty}{\frac{1}{2^n n (3n-1)}}}$  I know that this series converges by the ratio test, but I can't find yet at which value converges, I tried to find the partial sums but I couldn't get anywhere.   I would appreciate any advice that you guys could give me. Thank so much.

I'd appreciate any help, I know it has something to do with the geometric series but I still can't figure out how. I thought about integration but couldn't find a way to do it. $$\sum_{n=1}^\infty \frac{1}{2^nn(3n-1)}$$  Thanks.


This compares the values in both lists for common numbers.   a = [1, 2, 2, ]  b = [1, 2, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 12]  c = a + b  new = []   for i in c:     if i not in new:         new.append(i)   print(new)   Why is new = [] necessary? Is there no way to figure this out with just c?

Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:  def uniq(input):   output = []   for x in input:     if x not in output:       output.append(x)   return output   (Thanks to  for that .)  But I'd like to avail myself of a built-in or a more Pythonic idiom if possible.  Related question:


has a great write up relevant for hyper-V. But it is very hyper-V specific. It does not address how to measure cpu steal on Win servers in EC2 and RS Cloud environments (I have tried the steps there, and they do not apply -- the counters are not available,and I have not spotted similar counters with diff names)  Question is: How do I measure it on win2008 and win2012 servers hosted on EC2 and Rackspace clouds?  I understand there may be no explicit answer to this question (e.g. a performance counter or such may not be available on Xen). So then interpret the question in a more meta manner: "How do I measure CPU Steal?" As there appears to be no explicit way to measure it, what is an effective implicit way?  Additional: Like on other cloud platforms, you can spin up 5 instances on rackspace cloud, and see wildly different performance on each. Because.... noisy neighbors.... so how to directly measure this, from a CPU and networking perspective?

In order to assess performance monitoring accuracy on virtualization platforms, the CPU steal time has become an increasingly relevant metric - see  for an instructive summary in the context of  and IBM's paper on  for a more in-depth technical explanation (including illustrations) of the concept:     Steal time is the percentage of time a virtual CPU waits for a real   CPU while the hypervisor is servicing another virtual processor.   Accordingly, it is exposed in most related Unix/Linux monitoring tools nowadays - see e.g. columns %steal or st in sar or top:     st  --  Steal Time   The amount of CPU 'stolen' from this virtual machine by the hypervisor   for other tasks (such as running another virtual machine).   I've been unable to figure out how to capture the same metric on Windows though, is this possible already? (Ideally for the  on EC2 and via a respective  of course.)


I'm trying to figure out how this function is  working depending if it's called inside a setTimeout or not.  var myFunc = function(){     console.log('function executes');     return function(){        console.log('return');     } }   then if I call  var exe = myFunc();   it logs 'function executes' in the console  but if I call  var exe = myFunc(); setTimeout(exe,1500);   I got 'function executes' and after 1500ms 'return', but not 'function executes' again, so just the code inside the return part of the function is getting executed.  Can anyone explain this behavior??

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


What about an RSS feed for activity like the one shown ?

For me the distinction between sites is purely topical. I get that there's a right and a wrong place to ask questions, but I regularly ask questions across a number of sites. They all log me in (in a weird sort of way), and now there's the global inbox.  I've read that there's a feed  and that there's a  but neither of these are what I want.  What I'd like is to have an RSS feed from my global inbox, i.e. to include notification of updates to my public questions, answers, comments. Is this possible?


Let's say my 2 Google accounts are called Primary and Secondary. I chose these names to reflect their function: I almost exclusively use "Primary". But I'm logged into both (intentionally). Every time I open Gmail, the Secondary account is used ("is active"). Every time I switch to "Primary" (which works), but when I close Gmail and open it again, it's Secondary again.  Is this because of the order in which I logged into the two accounts? Or why? And can I fix it?  Note: I don't have this problem in YouTube.

After I enable multiple sign-in, and login to multiple accounts, I see that one of them says "(Default)". How do I change which of the accounts is the default one?


I need to analyze complexity for some algorithms in Java. For that I am planning to give large number of input and measure the time taken by Java implementation. What is the most precise and accurate way to check time between some lines of code? I need precision in milliseconds...

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


How can you put animated gifs on your desktop? (in windows 7)   I have wanted to do this for a long time. Whenever I put a gif on my desktop it never animates. Is there any software I could use? Thanks in advance.

I have an animated .gif I created using Photoshop CS4, but I can't get animation on my desktop although I can set it as a background from the context menu by opening it in Internet Explorer.  How can I set an animated .gif as the desktop background on Windows 7?


How do you prove that: $$ \begin{pmatrix} 1 & 1\\ 1 & 0 \end{pmatrix}^n =  \begin{pmatrix} F_{n+1} & F_n\\ F_{n} & F_{n-1} \end{pmatrix}$$

$$\begin{pmatrix}1&1\\1&0\end{pmatrix}^n=\begin{pmatrix}F_{n+1}&F_n\\F_n&F_{n-1}\end{pmatrix}$$  Somebody has any idea how to go about proving this result? I know a proof by mathematical induction, but that, in my opinion, will be a verification of this result only. I tried to find through the net, but in vain, if someone has some link or pointer to its proof, please provide, I'll appreciate that.  Thanks a lot!


My visa was issued in October 2015, valid for 2 years. and it is C type Business. Since I received my visa a little later than the proposed meeting dates, I did not travel. Now I intend to travel as a tourist for 9 days. Can I still use that visa?

I already have a 6 month valid UK business visa received prior to April 24 2015. I was supposed to travel to the UK in April, but my trip was cancelled on medical grounds.  I am now planning to visit the UK in July for tourism. Would it be fine for me to do so? Will I be allowed to enter the UK? Should I carry the original invite letter and medical certificate to prove why I didn't go the first time?


The expression "nothingburger" to mean in essence "nothing to see here" has become extremely common in political discourse in the USA. From what I remember it really only became prominent in the last two or three years.  What is the origin of this rather odd word, and what provoked the very recent spike in its usage?  (BTW, please, no politically provocative comments in your answer.)

Breitbart today:   What is the source for the term nothing-burger?


Ok, so define a tromino as a $1$x$3$ tile. If a corner is removed from an $8$x$8$ board, is it possible to tile it with these trominoes? So far, I have concluded that you would need $21$ trominoes to tile the remaining $63$ squares. If you color the squares three different colors, it is possible to have an equal number of each. I alternated the diagonals for each color. Theoretically, a tiling should be possible right? I have been trying to find such a tiling, but each time I end up with three squares that cannot fit the shape of the given tromino. Are there any possible tilings? Thanks.

If we remove the square in the upper right corner of a $8\times 8$ chessboard.  The question is: Is it possible to cover the entire remaining area, with $1\times 3$ chocolate bars? (they can be laid on the chessboard vertically and horizontally aswell)  For the answer: We know that there will be $63$ squares left on the chessboard, of which $32$ are white and $31$ are black, since the one in the upper right corner was black. $63$ is divisible by $3$, so it could be possible to cover the area, but that doesn't prove that an arrangement exists to do it. I'm not sure how to continue and am seeking help. Thanks.


Every morning, there's a little window urging me to upgrade to Windows 10 hanging off the taskbar.  Is there a straightforward way to create a Windows 10 VM under Windows 7 x64, so I could see what it's like, without having to take the plunge?  Again, I'm using Windows 7 x64, not Windows 8.

I am currently running 8.1. I'd like to try out Windows 10 and if I like it upgrade. If not, I'll keep running as I am.   I've never used a virtual machine before: can Window 10 be used from a virtual machine as a "sandbox", and if so how?


Let $G$ be an abelian group with all proper subgroup finite, then is $G$ finite or at least finitely generated ?

I found this question in Arhangel'skii and Tkachenko's book Topological Groups and Related Structures. The first chapter of the book is devoted to algebraic preliminaries.  The question actually reads:     Give an example of an infinite abelian group all proper subgroups of which are finite.   What I have done is: Every element of this group has finite order, else we could find an infinite proper subgroup, namely the group generated by $x²$ if $x$ has infinite order.  I think this can be strengthened: every element should have a prime order. Although I haven't proved this.  Intuitively this group cannot be and infinite product of smaller groups, because you could take the product of the even group factors and find an infinite proper subgroup.  Well, this is it, a highly non-trivial problem. Thanks in advance.


Let $\{e_n\}$ and $\{f_n\}$ be orthonormal sequences in a Hilbert   space $H$ with $\|e_n\|=\|f_n\|=1$ and   $$\sum_{n=1}^{\infty}\|e_n-f_n\|^2<\infty.$$   Prove or disprove: If $\{e_n\}$ is complete, then $\{f_n\}$ is also complete.   Actually if the condition is changed into $\sum_{n=1}^{\infty}\|e_n-f_n\|^2<1$, then the conclusion holds:  If $\{f_n\}$ is not complete, then there exists a nonzero $x \in \{f_n\}^{\perp}$. Since $\{e_n\}$ is complete, then $$\|x\|^2=\sum_{n=1}^{\infty}|(x,e_n)|^2=\sum_{n=1}^{\infty}|(x,e_n-f_n)|^2 \leq \|x\|^2\sum_{n=1}^{\infty}\|e_n-f_n\|^2,$$ which leads to a contradiction.  But now the method doesn't work so I am stuck. Thanks for any help!

Suppose $\{e_i\}_{i\in I}$ is an orthonormal basis for some Hilbert space. $\{f_i\}_{i\in I}$ is an orthonormal family with the property $\sum^\infty_{i\in I} \|e_i-f_i\|^2<\infty$, show that $\{f_i\}_{i\in I}$ is also orthonormal basis.   I can think of for a $x$ with $(x,f_i)=0$ for all $i$, prove $x=0$. However, I don't know how to continue to the next step.


Was Starkiller Base a rogue planet, wandering through the galaxy/universe?  The planet could be similar to Zonama Sekot,( a sentient world born from the homeworld of the Yuuzhan Vong, and capable of hyperspace travel.)

In The Force Awakens, we see the First Order using a new superweapon -- Starkiller Base -- to siphon up the power of stars and use it to destroy multiple planets within that same solar system at a time.   The superweapon portion of this resembles a large Death Star trench, but the rest of the weapon is clearly an icy planet, complete with life (trees, at the very least, and a breathable atmosphere).  So, going by the logic that this has to have been a superweapon using a planet as the base structure, is there any canon evidence (perhaps in the blueprint in the movie or in the novelization) as to which planet it was?


I have been to the Ubuntu website:  , where it appears that you can get it for any smartphone, but where do I do so? I don't see a specific 'download' or 'installation process' link. The only thing I find is where I can fill out a form to contact them, but that is just for developers. I only want to install it on my personal phone, no developing.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I want to model the earth 1:1 in unity, but I can only zoom to a certain value in the scne window of unity

I am making a sphere with the radius of earth (6371000 meters). I have only limited zoom out and that makes it impossible to add something on the terrain. If I press F, it does not zoom out further than I could before. I tried to add a very large object like terrain and hitting F, but the zoom was still not sufficient.   I am using Unity 5.2.1


I heard several times that coding like this is suboptimal:  if weapon == "sword":  print("Knight")  elif weapon == "katana":  print("Samurai")  elif weapon == "axe":  print("Viking")   How do I write such code optimally?

I want to write a function in Python that returns different fixed values based on the value of an input index.    In other languages I would use a switch or case statement, but Python does not appear to have a switch statement.  What are the recommended Python solutions in this scenario?


When Ubuntu publishes a new release - say, for example, from 16.04 to 16.10 - do the applications automatically get updated? For example, if as a part of 16.04 it has application ABC at version 1.0, and as part of 16.10 it has the same application ABC but at version 2.0, does going through the upgrade from 16.04 to 16.10 include replacing application ABC from version 1.0 to 2.0?   Does "Ubuntu Software" contain applications of the version that is part of the Ubuntu release that my system is using? For example, if I have 16.10 installed, will the applications in "Ubuntu Software" be at a version that is more current than the versions I'd see for them in "Ubuntu Software" if I were running 16.04 instead?   If I am primarily concerned with stability, I assume the best strategy to follow is to use the version of those applications that come with the release of Ubuntu that I am using; and, if there is some software I want and it is in "Ubuntu Software", I should obtain it from there. However, sometimes I see very large discrepancies between the most current version of an application, and the version of that application available from Ubuntu. For example, in 16.10 the version of Calibre is 2.6; in 17.04 it is 2.75.1; but the current version available is 3.6. So, my questions are: Does this significant lagging in versions provided by Ubuntu ever happen due to people simply not putting in the effort to ensure Ubuntu provides a version somewhat close to the current version? And if that is the case, how would I know that (so that I could possibly decide to uninstall the version provided by Ubuntu, and instead rely on the version and subsequent updates provided by the application's provider)? In other words, how would I know the problem is simply that the developer isn't "sending" updated versions of his application to Ubuntu?

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


I have used the following code:      \begin{figure}[h]   \begin{tikzpicture}          \draw[->] (-0.5,0) -- (4,0) node[right] {$x$};         \draw[->] (0,-0.5) -- (0,4) node[above] {$y$};         \draw (0,0.5) -- (4,2);         \draw [dashed] (0,1.5) -- (4,4);   \end{tikzpicture}   \caption{No Interaction} \label{fig:M1}    \begin{tikzpicture}         \draw[->] (-0.5,0) -- (4,0) node[right] {$x$};         \draw[->] (0,-0.5) -- (0,4) node[above] {$y$};         \draw (0,0.5) -- (4,2.5);         \draw [dashed] (0,1.5) -- (4,3.5);   \end{tikzpicture}.  \caption{Interaction} \label{fig:M2}   \end{figure}     to insert two figures, however it places them one on top of the other and I would like them next to each other but labelled independently, is this possible?

I have the following tikzpictures, and I would like to present them in two columns. However, no matter what I try, whether it be multicol or minipage or subcaption, they stubbornly stay in one column. You may think this is a duplicate question, but I've tried all the others and they don't work!  \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx}  \usepackage{tikz} \usetikzlibrary{positioning}  \usepackage{float}  \begin{document}     \begin{figure} [b]         \centering         \begin{tikzpicture}         [pool/.style={circle, draw=blue!50, fill=blue!20, thick,             inner sep=0pt, minimum size=10mm}]         \node[pool] (A)              {A};         \node[pool] (B) [right=of A] {B};         \draw [<->] (A) -- (B);         \end{tikzpicture}         \caption{Two-site exchange.}         \label{fig:simple2}     \end{figure}      \begin{figure} %[h]         \centering         \begin{tikzpicture}         [pool/.style={circle, draw=blue!50, fill=blue!20, thick,             inner sep=0pt, minimum size=10mm}]         \node[pool] (A) {A};         \node[pool] (B) [below left=of A] {B};         \node[pool] (C) [below right=of A]{C};         \draw [<->] (A) -- (B);         \draw [<->] (A) -- (C);         \end{tikzpicture}         \caption{Partial three-site exchange.}         \label{fig:partial3}     \end{figure}      \begin{figure} %[h]         \centering         \begin{tikzpicture}         [pool/.style={circle, draw=blue!50, fill=blue!20, thick,             inner sep=0pt, minimum size=10mm}]         \node[pool] (A) {A};         \node[pool] (B) [below left=of A] {B};         \node[pool] (C) [below=of A]{C};         \node[pool] (D) [below right=of A]{D};         \draw [<->] (A) -- (B);         \draw [<->] (A) -- (C);         \draw [<->] (A) -- (D);         \end{tikzpicture}         \caption{Partial four-site exchange.}         \label{fig:partial4}     \end{figure}      \begin{figure} %[h]         \centering         \begin{tikzpicture}         [pool/.style={circle, draw=blue!50, fill=blue!20, thick,             inner sep=0pt, minimum size=10mm}]         \node[pool] (A) {A};         \node[pool] (B) [below left=of A] {B};         \node[pool] (C) [below right=of A]{C};         \draw [<->] (A) -- (B);         \draw [<->] (A) -- (C);         \draw [<->] (B) -- (C);         \end{tikzpicture}         \caption{General three-site exchange.}         \label{fig:general3}     \end{figure}  \end{document}


Typed in deno upgrade and after telling me new version was found, displayed error: No such file or directory (os error 2) Originally installed from snap if that matters. I'm new to Ubuntu, so any pointers in the right direction would be much appreciated.

I know that I can update a snap package using  sudo snap refresh <package>   But is there a way to update all snaps, like   sudo apt dist-upgrade


I have that $x_1, x_2,...,x_n$ are from a rv $X$ that has the density function $f_X(x)=\frac{2x}{\theta^2} \quad$ for $0 \le x \le \theta  \quad$ and $f_X(x)=0 \quad$ otherwise. Ihave to determine the MLE of $\theta^*$ of $\theta$  Here is how I have done it:  $L(\theta)= \frac{2}{\theta^{2n}}\prod_{i=1}^nx_i$  $\frac{\partial L(\theta)}{\partial \theta} =...=\frac{-4n}{\theta^{2n+1}}\prod_{i=1}^nx_i + \frac{2}{\theta^{2n}}\frac{\partial(\prod_{i=1}^nx_i)}{\partial \theta}$  Is this correct? and also how do I calculate the CDF $F_{\theta^*}$, the pdf $f_{\theta^*}$ and the expectation $E[\theta^*]$ of the maximum likelihood estimator $\theta^*$?

Find the maximum likelihood estimator for $\theta$ when $f(x)=\frac{2x}{\theta^2}, 0\leq x \leq \theta$.  This should be a really easy question but I somehow cannot seem to get the right answer. My likelihood function is $\prod\limits_{i=1}^n \frac{2x_i}{\theta^2}$ which gives me after some simplification $n\ln(2\theta^{-2}) + \sum\limits_{i=1}^n ln(x_i)$ as my log-likelihood function. Then the derivative becomes $\frac{-2n}{\theta}$. If I equate this to $0$ to obtain the maximum I obtain $\hat{\theta}\rightarrow\infty$. However, this answer does not seem plausible. What did I do wrong?


Let $\Omega\subset \mathbb R^n$ be open, connected and $\Omega=\Omega_1 \cup \Omega_2$ where $\Omega_1\cap \Omega_2=\emptyset$, $\mu(\Omega_1)>0,\mu(\Omega_2)>0.$ Then show that there exists $\phi\in C_c^{\infty}(\Omega)$ such that $\displaystyle \int_{\Omega_1}D\phi(x)dx\in S^{n-1}.$  There is one theorem in Sobolev Space called :  Let $\Omega\subset \mathbb R^n$ be an open set and $K\subset \Omega$ be a compact set. Then there exists $\phi\in C_c^{\infty}(\Omega)$ such that  $0\leq \phi(x)\leq 1$ for all $x\in \Omega$, $\phi(x)=1$ on $K$.   Here $C_c^{\infty}(\Omega)$ is the set of all $C^{\infty}$ functions in $\Omega$ which are compactly supported. $S^{n-1}=\{x\in \mathbb R^n:||x||_2=1\}$ Any help is appreciated . Thank you

Let $\Omega\subseteq \mathbb R^n$ be open, bounded and connected set with $\mathcal{L^n}(\Omega)>0$. Let $\Omega=\Omega_1\cup\Omega_2$ where $\Omega_1\cap\Omega_2=\emptyset$ with $\mathcal{L^n}(\Omega_1)>0$ and $\mathcal{L^n}(\Omega_2)>0.$ Also $\Omega_1,$ $\Omega_2$ are $\mathcal L^n$-measurable sets.  Prove that  $\exists$ $\Phi\in C_c^{\infty}(\Omega)$ such that $\displaystyle \int_{\Omega_1}\nabla\Phi(x)dx\neq 0.$   Here $\Phi$ is real valued function and $C_c^{\infty}(\Omega)$ consists of all $C^{\infty}(\Omega)$ functions which have compact support in $\Omega.$   I tried to show by contradiction and wished to have $\mathcal{L^n}(\Omega_1)=0 $ but couldn't be able to do that.  Any help is appreciated. Thank you.


How to install Android SDK from android-sdk_r10-linux_x86.tgz in Ubuntu 10.10 for using in Eclipse IDE?

What all needs to be done to install Android SDK / ADT Bundle on Ubuntu?  Each of the steps in the answer was found on some different forum as I encountered obstacles getting started with my Android SDK and posted questions in appropriate forums thereafter. So I thought this would be useful in that it is a one stop solution available, in case one ever needs to re-install Ubuntu and install the Android SDK / ADT Bundle from scratch!


My application is in the selected taskbar(GNOME, dash-to-panel). When a window opens, a new icon appears in the taskbar. How to make so that the favorites icon is activated and a new one does not appear (as in other applications: Gedit, Nautilus)  Desktop file exist. The program is packaged without errors and installed from the repository on github. OS rebooted

I'm using Ubuntu 17.10 with GNOME shell and Numix-Circle icon theme.   When I hover over the Numix icon for Nightly Web Browser, which is pinned to the dock I get the title "Nightly Web Browser".      But when I launch the program, another icon pops up at the bottom, with the name "Nightly".


I am to assume that $K$ is a compact metric space.  I must prove that there are two points $x,y$ contained in $K$ such that $d(x,y)=\text{diam}(K)$.  Recall $\text{diam}(K)= \sup \{ d(x,y) \mid x,y \in K \}$.  I'm having trouble figuring out exactly what I need to do to get started on this proof and what it is I need to prove along the way.  I know the definitions, but I'm having trouble applying them to this problem.  Thanks

I have troubles showing the following:  Let $(X,\rho)$ be a compact metric space and $F \subset X$ a closed subset. Prove that if diam $F < \infty$, then there exist $x_{0}, y_{0} \in F$ such that diam $F= \rho(x_{0},y_{0})$.  It looks so trivial yet hard to find the trick.


I am a Bangladesh passport holder and a Canadian permanent resident.  On my way from Dhaka Airport (DAC) to Toronto Airport (YYZ) one of my layovers will be at Istanbul Airport (IST) for 2 hour 20 minutes for a connecting flight.  Will I need any visa just to change flights at IST airport?

I have an Indian passport and am planning to visit Germany with a valid visa. To book a flight for Germany (Mumbai – Dusseldorf), I came across some connected flights that stop at Istanbul.  Do I need to have visa for Turkey?  This is the first time I am travelling outside my country, and any information on this will be helpful.


I’m asking this so I can start a dnd session with some friends of mine, I already have the Mines of Phandelver starter pack with the character sheets and lore of the story, it there anything else I should get?

I have GM'd several RPGs before that are not D&D (Fate, Deathwatch, Star Wars). We first tried to play D&D using the 3.5 edition and it went horribly — too many books and too many options with no idea of where to start.  I have been told that 5E takes care of all that and is easier and more fun so I want to try that but I would like a definitive list of what I need.  I expect that the kinds of books we need divide up like this:   Rulebook for me as GM Rulebook for players Fluff for everyone Monster book for me as GM   Links to these would be helpful as we got very confused with the 3.5 books — who should use what books confused us.  What other things do we need to play a campaign? I expect things like:   Dice: what kinds and how many of each kind, roughly. Models and maps. Do we need these? Does 5E need models and a grid or can it be played without (which is preferred)?   Is there anything else that we need that I haven't anticipated?


There is a extra slash added to the chat room URLs in the side bar. This is not causing any redirection issue or 404 not found error. Just observed it and want to notify to the development team about this. Seems it is not a bug, but that can . Currently the following URLs are binded against the chat rooms in the side bar.  Tavern on the Meta https://chat.meta.stackexchange.com//rooms/89  The Fire Department https://chat.meta.stackexchange.com//rooms/1181   GIF for the reference:

I was chatting in a chat room and I went offline after some time. When I came back online, I checked my inbox and there was a chat reply in the chat room. The URL of the transcript (which I opened from inbox) had two slashes after "chat.meta.stackexchange.com". Like this:   Even if I remove one of the slashes, it's still the same website. So what's the need of two slashes when we can use one? Is this a bug?


I am developing a project and a plugin for a company working with QGIS 2.14.4.  I want to update - through the plugin - a user created project variable which is used for rule-based styling purposes by i am not able to find the way by reading the api.  I found a workaround by using QGIS' own project variables in particular QgsProject.instance().setTitle() and changing the layer styles' rules to use @project_title variable but this is far away from clean.  Can anyone help with how to access and change user created project (or even layer) variables?

I'd like to change the value of a user-defined project variable (can be manually edited in Project Settings | Variables) using the Python console. I tracked down the  but haven't succeeded in actually changing the variable in the project settings. My code so far:  iface.mapCanvas().mapSettings().expressionContext().scope(0).setVariable('myvar',1)   I guess I'm getting lost in the different expression contexts ...


I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


I just made my first brew and I started the fermentation process in a plastic container. Should I transfer the brew into a glass fermenter? It's only been sitting in the plastic one for 2 days.

The conventional wisdom in homebrewing has been challenged in recent years.  This wisdom held that a beer should be transferred from the primary fermentation vessel to a secondary one after 7-10 days.  In recent years, many homebrewers have advocated for leaving the beer in primary until packaging, rather than racking to a secondary fermenter.    What are the advantages and disadvantages of the two methods? Are there limits to how long a beer should remain in primary, in the long primary scenario?


I'm using postfix + spamassassin (amavis) now and I'm trying to increase my hit rate, so I've been looking at the logs to try to see any patterns in email that is obvious spam but gets low scores.  One thing I've noticed is I'll get a series of emails from the same sender to email accounts on my domain. If any of the recipients are to specific very old, closed accounts then the series of emails is almost certainly spam (but not all of my closed email accounts are good for this).  So what I'd like to do is create a auto-generated black-list (that I can edit) or spamassassin rule for senders who send to these specific email addresses. I know it wouldn't stop everything, but once they hit the tripwire email accounts they would be stopped.  Does anyone know of something that already exists that does this (I've looked, but maybe not with the right search terms), or can point me in the right direction as far as building a solution myself?

How do I setup spamtraps with Postfix so clients that send to trapped addresses are prevented from sending me more spam?


Well, here's the thing. I'm a 2nd year ME master but enrolled in a CSE course and got flunked. So up to now, I enrolled 8 course in my first year (4+4). Without the failed course, I get GPA 3.52 for the rest seven courses. My GPA drops to 3.0, if that course is included. So I plan to take one more course to balance my GPA in this semester. Actually, I feel confident about the courses in this semester.  Meanwhile, I'm gonna apply for phd in this semester. So how will the failed course affect on my application for phd? Am I supposed to submit transcript with 7 or 8 courses?

I'm currently an M. Phil student in Math and I failed a course last semester because I was not able to hand in a home work assignment (which was worth 40% of my grade) on time (I was 30 minutes late).   Apart from that I'd say I'm a fairly decent student, I got an upper second class honours bachelors degree, I have a B+ and A's for all my other courses in my current programme and I'm almost finished with my first paper to be published.   I've however been deeply worried about this failure as it would reflect poorly on my transcript if I were to apply to a Ph.D or another Master's programme.   Will my failing grade affect my chances of getting into a competitive programme or greatly lower my chances of getting a scholarship?


I see "enter new UNIX password" but I can't type the new password. No keys work; the only thing I can do is hit the enter key which takes it a step further to the "Retype new UNIX password" prompt.  What do I do?

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


I saw the related posts, and I tried a different proof. Please have a look.  Let $D$ be any field with $|D|=6$.  $|D|=6<\infty \Longrightarrow Char(D)\neq 0\Longrightarrow Char(D)=prime\ number$  From the theorem of Lagrange in $(D,+)$ we have that: $$ord(1_R) \mid  |D| \Longrightarrow Char(D)\mid  |D|\Longrightarrow Char(D)\mid 6$$ So, $Char(D)=2$ or $3$.   $Char(D)=2$   $\forall x\in U(D):ord(x)=Char(D) \Longrightarrow ord(x)=2 \Longrightarrow 2x=0_D \Longrightarrow x=-x $ (*)  If $H= \{0_D, a,b,a+b\} $ from (*) $(H,+)\leq (D,+)$ and from Theorem Of Lagrange we have that $|H|\mid |D| \Longrightarrow4|6$, contradiction.   $Char(D)=3$   Can we find another additive subgroup of $(D,+)$ with 4 or 5 elements to work on the same say as above?

Are there any galois fields which consist of product of two primes, as in $\mathrm{GF}(2\cdot 3) = \mathrm{GF}(6)$?


I use the code below for representing three pictures in order as subsections. But, the Figure number is not showing in the caption. Thanks.  \begin{figure}     \centering     \begin{subfigure}[b]{0.3\textwidth}         \includegraphics[width=\textwidth]{Fig1}         \caption{Social Networks}         \label{fig:Social Networks}     \end{subfigure}     ~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.        %(or a blank line to force the subfigure onto a new line)     \begin{subfigure}[b]{0.3\textwidth}         \includegraphics[width=\textwidth]{Fig2}         \caption{Energy Networks}         \label{fig:Energy Networks}     \end{subfigure}     ~ %add desired spacing between images, e. g. ~, \quad, \qquad, \hfill etc.      %(or a blank line to force the subfigure onto a new line)     \begin{subfigure}[b]{0.3\textwidth}         \includegraphics[width=\textwidth]{Fig3}         \caption{Internet}         \label{fig:Internet}     \end{subfigure}     \caption{Examples of graph data modelling}     \label{fig:graph modelling} \end{figure}

I am giving a presentation and therefore I am using the  class. I have included some figures and it works, but there is no number after "Figure".  My code:  \documentclass{beamer}  \usepackage{graphicx} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{listings} \usepackage{xcolor} \usepackage{eso-pic} \usepackage{mathrsfs} \usepackage{url} \usepackage{amssymb} \usepackage{amsmath} \usepackage{multirow} \usepackage{hyperref} \usepackage{booktabs} \usepackage{wallpaper} \usepackage{bbm} \usepackage{cooltooltips} \usepackage{eso-pic} \usepackage{everyshi} \usepackage{calc} \usepackage{graphicx} \usepackage{ifthen} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{animate} \usepackage[singlespacing]{setspace} \usepackage[absolute,overlay]{textpos} \usepackage{enumerate} \usepackage{hyperref} \newenvironment{changemargin}[2]{%   \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%   }%   \item[]}{\end{list}}  \setbeamercolor{frametitle}{fg=red,bg=white}  \hypersetup{pdfpagemode=FullScreen} \renewcommand*{\UrlFont}{\normalfont}  \usetheme{Goettingen} \useinnertheme{circles} \beamertemplatenavigationsymbolsempty  \setbeamerfont{page number in head/foot}{size=\large} \setbeamertemplate{footline}[frame number]   %%% \begin{document}  \frame[plain]{ \titlepage }  \setbeamertemplate{background canvas}[default]  \frame{ \frametitle{}  \begin{figure} \begin{center} \includegraphics[scale=0.2]{varweakness} \caption{VaR as a quantile} \end{center} \end{figure}  }   \end{document}   Which gives the following frame with the figure:    (I am not sure what is causing the problem, therefore I did not delete any package.)  How can I get a number, e.g. Figure 1:?


My company has an office365 setup for all employees. We also have just implemented a domain controller locally which we want to use to authenticate a few things here in the office. The problem is that we want to have a way to use single sign on/password synchronization. The Azure dirsync tool syncs from the local domain controller up to office365, but not the other way around. Is it possible to get this done?

My company uses Office 365 for Exchange, SharePoint, Lync etc. including the build-in user administration via Azure Active Directory.  Now we want to switch to a local AD on a Windows Server. It shall sync changes to Azure, but the primary user and group policy administration happens on the windows server.      How do we initially get the user accounts from the Azure AD into the on-premise (windows-server) AD?  edit1: Has anybody looked into this using Microsoft Forefront Identity Manager? It looks like this tool comes with DirSync. Open “miisclient.exe” on the DirSync server (Located in “C:\Program Files\Windows Azure Active Directory Sync\SYNCBUS\Synchronization Service\UIShell”). It may be possible to configure it to sync the other direction... may.


Please, I need to prove this for positive reals $a,b,c$:  $a^3+b^3+c^3 \geq a^2b+b^2c+c^2a$  I know many things involving maths(I am graduating in half-year time) but, here I am an absolute beginner, so, please be as 'methodic' as you can.

Let $a,b,c$ be positive real numbers. Prove that $a^3+b^3+c^3\geq a^2b+b^2c+c^2a$.   My (strange) proof:  $$ \begin{align*} a^3+b^3+c^3 &\geq a^2b+b^2c+c^2a\\ \sum\limits_{a,b,c} a^3 &\geq \sum\limits_{a,b,c} a^2b\\ \sum\limits_{a,b,c} a^2 &\geq \sum\limits_{a,b,c} ab\\ a^2+b^2+c^2 &\geq ab+bc+ca\\ 2a^2+2b^2+2c^2-2ab-2bc-2ca &\geq 0\\ \left( a-b \right)^2 + \left( b-c \right)^2 + \left( c-a \right)^2 &\geq 0 \end{align*} $$  Which is obviously true.    However, this is not a valid proof, is it? Because I could just as well have divided by $a^2$ rather than $a$:  $$ \begin{align*} \sum\limits_{a,b,c} a^3 &\geq \sum\limits_{a,b,c} a^2b\\ \sum\limits_{a,b,c} a &\geq \sum\limits_{a,b,c} b\\ a+b+c &\geq a+b+c \end{align*} $$  Which is true, but it would imply that equality always holds, which is obviously false. So why can't I just divide in a cycling sum?  Edit: Please don't help me with the original inequality, I'll figure it out.


I want to install Ubuntu for first time. if I install ubuntu alongside Window 7 or 8 there will be no problem ?

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


The RenewEconomy article  details the recently installed Tesla battery in Queensland Australia's response to a sudden change in line frequency of the power grid. Why would a frequency change be the thing that the battery responds automatically to? Naively thinking, since the grid may have several different power sources operating independently but connected to the same grid, wouldn't they all be designed to remain synchronized to a stable frequency? Loading might lower the voltage, but I'm surprised the frequency would be allowed to drift.  Last Thursday, one of the biggest coal units in Australia, Loy Yang A 3, tripped without warning at 1.59am, with the sudden loss of 560MW and causing a slump in frequency on the network. What happened next has stunned electricity industry insiders and given food for thought over the near to medium term future of the grid, such was the rapid response of the Tesla big battery to an event that happened nearly 1,000km away. Even before the Loy Yang A unit had finished tripping, the 100MW/129MWh had responded, injecting 7.3MW into the network to help arrest a slump in frequency that had fallen below 49.80Hertz. Data from AEMO (and gathered above by Dylan McConnell from the Climate and Energy College) shows that the Tesla big battery responded four seconds ahead of the generator contracted at that time to provide FCAS (frequency control and ancillary services), the Gladstone coal generator in Queensland.

I have been an EE for over forty years and never did find out the right answer to this one....  How do power-stations and transformer switching stations ensure that the power they are feeding into the grid is in-phase with the existing power on the lines.  I know they are VERY serious about setting the line frequency to a ridiculously good accuracy. However, obviously, you can not connect a power line to another line that is 180degress out of phase. Even a small deviation would presumably cause a huge drain on the system and generate a rather strange, and out-of-spec AC waveform.  OK I can imagine a solution at the power station that uses the target line frequency to synchronize the alternators before flipping the switch perhaps. However, that switching station 100km away maybe switching onto a line from a different alternator that is much closer or farther away and consequently at a different point in the phase cycle...  How do they do that...   Note his is NOT the same as  That article only pertains to a local generator and is not, in my mind, the same as the main power grid and transformer switching.


What is the sequence to select two cylindrical (or round) objects, and snap together with their central axis aligned? Thanks!

Hi! I'm a beginner learner and I'd like to know how to snap these three objects. I'd like to snap the two cylinders with the different faces of the cube. The short one on the left and the highest cylinder on the top of the cube. I'd like to have the center of the cylinder aligned with the center of the cube (the base of the cylinder inscribed into the face of the cube)  I'm sorry for bad explanation I hope someone can help me  Thanks!   I add a screenshoot in which you can see what I have to do   Thanks again if someone can help me with this!


(Exercise 1.1.5 in Real Analysis 2 by Terence Tao) Let $n\ge1$, and let $a_1,a_2,...,a_n$ and $b_1,b_2, ..., b_n$ be real numbers. Verify the identity   $$(\sum_{i=1}^n a_ib_i)^2 + \frac12\sum_{i=1}^n\sum_{j=1}^n(a_ib_j - a_j b_i)^2 = (\sum_{i=1}^na_i^2) (\sum_{j=1}^nb_j^2).$$    This is a part of Exercise 1.1.5, and I am struggling with it. Can you give some hint?


I'm just coming into a company on what is essentially my first gig as a team member rather than the sole Windows developer, and I'm not liking the current version control setup.  We're developing for Windows machines using VB.net at the moment, with live software dating back to VS2005, being updated to newer Visual Studio versions as and when major upgrades are made to the software. Most jobs are admittedly one-developer-at-a-time things, so there's possibly not as great a need for good version control as there is on larger, multi-developer projects, but what we've got now sucks pretty hard, so I'm trying to put together a proposal for something that sucks less.  First problem is that they're still using SourceSafe (Boo! Hiss!), but everyone seems pretty open to moving over to something else if I can come up with an alternative. SourceSafe isn't the reason for my question, though.  Basically, there's a single SourceSafe repository, and into this has been thrown every single project that's ever been worked on in the company.  The "layout" (such as it is) of the repository is that if it's a startup project it goes in root directory of the repository, and if it's not a startup project it also goes in the root. If it's a non-startup project which has [companyName] at the start of its name then it goes in the top level of the [companyName] directory. Certain other non-startup projects live in [companyName], too, even if they don't have [companyName] in the title.  Trying to pull a project off the repository onto a new machine breaks the .sln file of the project because you lose whatever directory structure was on the original development machine. I've never been entirely sure whether I'm supposed to be creating a new .sln for each new machine or not, though, so maybe that's just my own screwup...  Anyway, basically, the "system", or lack thereof, that we have now is so obviously and blatantly broken and wrong that I can't even work out how we should be doing it other than "Not like this". I'd like to hear what the community's opinions are on how best to run a revision control system, what practices to follow, and links to any articles I should be reading in order to put together a proposal for switching to another, better-organised system.

I am going to be using Subversion for source control on a new J2EE web application. What directory structure will you recommend for organizing code, tests and documentation?


Every time I try to run the built-in software updater it tells me that it needs an additional 11.8 mb on "/boot" and to empty my trash, clean my system with sudo apt-get clean.  I've tried both methods and even ran bleachbit but it still says the same.

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


Are the following contractions okay to use:  The man's working on the roof for The man is working on the roof The dog's running behind the ball for The dog is running behind the ball

How compelled should I feel to use non-contracted forms (do not rather than don't and so on) when writing in a rather formal text, say an academic paper? In one case I am afraid to seem too stilted, in the other, too casual. Are there good guidelines?  And are there differences in this regard between British and American English?  (In this  there was not much more than "Contractions are more frequent in informal than formal contexts".)


I am looking to find recipes for desserts, specifically brownies and cakes although others are greatly appreciated, that do not contain eggs.  Is there a sort of egg substitute that works just as well as eggs in all foods?

My girlfriend is vegan.  How can I replace eggs in a recipe?   Maybe with banana or soy? How much?  The egg is the key ingredient to keep everything from falling apart.


I have two List :  List<Object> listA = new ArrayList<Object>(); List<Object> newListB = new ArrayList<Object>();   How can i copy the contents of listA into newListB such as if i change one of the elements in my copied list, i dont want to change it in my original list.

I have an ArrayList<String> that I'd like to return a copy of.  ArrayList has a clone method which has the following signature:  public Object clone()   After I call this method, how do I cast the returned Object back to ArrayList<String>?


In the K&R book in chapter 2.9, I am stuck on understanding this sample function getbits()  getbits(x,p,n)   Returns the (right-adjusted) n-bit field of x that begins at position p. Here's the function body  /* getbits: get n bits from from position p */ unsigned getbits(unsigned x, int p, int n) {    return (x >> (p+1-n)) & ~(~0 << n); }   I am actually not facing problems with the bitwise operators but I can't actually get the question. I am stuck on understanding the question mainly not solving it. Ultimately "What do we need to find in this function".

In chapter 2, the section on bitwise operators (section 2.9), I'm having trouble understanding how one of the sample methods works.  Here's the method provided:  unsigned int getbits(unsigned int x, int p, int n) {     return (x >> (p + 1 - n)) & ~(~0 << n); }   The idea is that, for the given number x, it will return the n bits starting at position p, counting from the right (with the farthest right bit being position 0). Given the following main() method:  int main(void) {     int x = 0xF994, p = 4, n = 3;     int z = getbits(x, p, n);     printf("getbits(%u (%x), %d, %d) = %u (%X)\n", x, x, p, n, z, z);      return 0; }   The output is:     getbits(63892 (f994), 4, 3) = 5 (5)   I get portions of this, but am having trouble with the "big picture," mostly because of the bits (no pun intended) that I don't understand.  The part I'm specifically having issues with is the complements piece: ~(~0 << n). I think I get the first part, dealing with x; it's this part (and then the mask) that I'm struggling with -- and how it all comes together to actually retrieve those bits. (Which I've verified it is doing, both with code and checking my results using calc.exe -- thank God it has a binary view!)  Any help?


I need to change the order of the Data Frames in the .mxd that I created as a template so that the task of changing the layout is done easily. My question is this:  However, the solution presented to change the data frame up or down in the table of contents does not work. The first DataFrame in the Table of Contents list is not the DataFrame labeled "1" when I need to load this .mxd to change the layout.

I am using ArcMap 10.1. The background: I have an .mxd that I intend to roll out across the company as our default template for all future maps/figure production. This .mxd contains two Data Frames; the first ("Main") is larger (occupying almost the entire page) and is designed to be used to hold the majority of mapped data whilst the second ("Inset") is much smaller and is to be used as an overview map. The problem: When choosing to import this new .mxd to an existing .mxd (using the Change Layout button on the Layout toolbar) the wizard automatically selects the smaller ("Inset") Data Frame to occupy the larger part of the page. The screenshot below shows this interface with a red box indicating the two possible locations of each Data Frame:  Whilst it is possible to manually alter the order of the Data Frames using the Move Up or Move Down buttons, how do I change the default option for this setting (i.e. so that the "Main" Data Frame always appears in the larger space - "2")? The reasoning is that I would like the process of using this new .mxd template to be as simple as possible, this is especially important as we have a wide range of users with varying abilities. Does anyone know how to choose/change this default setting? It does not appear to be in the Data Frame Properties > Data Frame menu where I would expect it to be.


I have a long C code which gets segmentation fault because a pointer variable x is pointed to NULL somewhere in the code (there are many writes to this variable and I did not write the code myself), and later an attempt has been made to read it's value resulting in a segmentation fault.  Now I can get the line where the variable x was accessed which resulted the segfault using gdb, but I'm interested to know when it (x) was assigned to the value NULL. There are many writes to this variable in the code and checking this manually soon becomes tedious. Is there an automated way to find when some variable x is assigned to a specific value? Maybe using gdb or some value analysis tool?

I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in other ways to monitor a variable in C/C++ to see if/when it changes.


Say I have a fighter who has three attacks and uses ready action/hold action to "Attack the next person to come through that door". If someone comes through the door, does he get his reaction to get three attacks then on his regular initiative when his turn comes around make his normal three attacks for that round as well?

Do you get to use the additional attack from the Extra Attack feature as well when you Ready an Attack action?  One of my players, a monk, decided to Ready an action as an earth elemental was about to attack. The trigger was the elemental moving within five feet of him. When this occurred, he took his Attack action, and then proceeded to take the extra attack as well.  I was unsure at the time whether or not the extra attack would also happen, and I haven't had much luck figuring it out.


Can machine learning be used to improve encryption algorithms e.g.image encryption algorithms that use ECC ?

I am about to go study for my masters in machine learning, data mining and high performance computing, but have recently become very interested in cryptography after taking Dan Boneh's Cryptography course on coursera.com.   I was wondering if there are any practical applications for machine learning in cryptography? A quick google search didn't seem to reveal much for me so i was wondering if someone here knows something.  My first impression would be that machine learning techniques could be used to learn the inverse function for some cipher and passphrase given enough plaintext/ciphertext pairs, but i am not sure how capable things like neural networks are at learning functions which are not linearly separable.


According to , "A dimensionless quantity is a quantity to which no physical dimension is applicable." The article then explains, a few sentences later, that time, as an example, is a quantity with dimension.   states that "the International System of Units assigns special names to 22 derived units, which includes two dimensionless derived units, the radian (rad) and the steradian (sr)."  Why are radians "dimensionless" if a unit like seconds aren't? I feel like angle measures have more of a "physical dimension" aspect to them than seconds.

Can't understand why we say that radians are dimensionless. Actually, I understand why this is happening:  theta = arc len / r   Meters/meters are gone and we got this dimensionless. But also we know that angle 57.3 degrees = 1 rad. So, can we use it as dimension?  In such a situation we can say that degrees are also dimensionless, because 1 degree = 1/360 of circle.  How we define the value is dimensionless or not? Why meter is not dimensionless? Where I'm wrong in my conclusions?


Say you have an HTML page of input elements with JavaScript connected to the input elements. You have the ability to press the TAB key, which by default browser behavior will highlight select the input element. Pressing TAB key again will then highlight select the next input element that is declared in the source code.  My question is, in JavaScript, how can I check if a specified input element is currently highlight selected?  I have tried researching this on my own prior to this post, but didn't find anything.

I would like to find out, in JavaScript, which element currently has focus. I've been looking through the DOM and haven't found what I need, yet. Is there a way to do this, and how?  The reason I was looking for this:  I'm trying to make keys like the arrows and enter navigate through a table of input elements. Tab works now, but enter, and arrows do not by default it seems. I've got the key handling part set up but now I need to figure out how to move the focus over in the event handling functions.


I'm fairly new to python, and I'm wondering how I can copy and paste a file from one location to another with first checking to see if the copied file exists in the destination folder?  The reason I want to check if the file exists is this script will be put on a task scheduler and run on a set schedule, so I don't want to be copying everything every single time, just those files that don't exist in the destination folder?  Thanks in advance!

How do I check whether a file exists or not, without using the  statement?


I typed a chat message including sticky returns (Shift +  Enter), [tag:nameoftag] markup and [links](http://interwebz.com). The markup didn't work, it just displayed the markup itself. A user  that sticky returns break markup. Is this considered a bug? It doesn't seem like intended functionality.

We've come to rename Markdown to Letdown in the  because it lets you down so often. I've now just found a pattern. It seems markdown . That is, this  Letdown can't cope with multi-line comments. Let's see code?  fails to display code marked as code, while this works  But code works.  Now, I think it would be Ok if you said chat messages shouldn't be multi-line. (Although I'd be a bit annoyed, because I like them.) But if so, please don't render them as multi-line (as is the case with comments), so we aren't tempted to use them.


The question I am about to ask is somehow general and may apply to all OOP languages but I'm coding in C#.  How we decide to make a property read-only? In my current program I have made all the properties read-only for all the classes and pass the values via constructor when I initialize them. So all of my classes look like this:   public class Point {    private double _x;    private double _y;     public double X    {       get { return _x; }    }     public double Y    {       get { return _y; }    }      public Point(double x, double y)    {       _x = x;       _y = y;    } }   But now I doubt if this is a good idea!? Because now some of the constructors in my classes are getting big and ugly with too many arguments! I'm a bit lost now! What are some guidelines to decide what properties are allowed to be set later and do not need to be passed via constructor!?

I'm trying to get my head around mutable vs immutable objects. Using mutable objects gets a lot of bad press (e.g. returning an array of strings from a method) but I'm having trouble understanding what the negative impacts are of this. What are the best practices around using mutable objects? Should you avoid them whenever possible?


My B1/B2 visa expires on 23 November 2018, and I have to stay in the US up to 2 December 2018. As I heard while I entered the USA they will grant me a 6 months visa.  My one off friend with the same B1/B2 visa; his will expire in two days but he got a 6 months visa on arrival in USA.  Does the same rule and law still apply now?

I am a Mexican citizen with a visa that expires May 31, 2015. I need to enter the US for five days in the last week of January.    Can I do so or do I need to renew it before entering the US?


through SEDE that has a non-null value of "JavaScript" in the Tags column (query below),  SELECT -- TOP 5   p.Id AS [Post Link],   p.Tags,   p.PostTypeId,   ph.* FROM Posts p INNER JOIN PostHistory ph ON ph.PostId = p.Id WHERE PostTypeId = 2 AND Tags IS NOT NULL ORDER BY ph.CreationDate ASC   and for the lazy (aren't we all?), .  A PostTypeId of 2 corresponds to answers, . This is the only answer in the entire database that has a non-null tag. It's not supposed to have a tag, right? Does anyone have a clue about how this happened?  Updated info  I just queried the database with  SELECT * FROM PostTags WHERE PostId = 310914   and it resulted in an empty set, so at least according to that table, the answer has no tags.

It is (currently)   to tag answers. Yet, if I query , then  does have a tag, namely javascript. I'm at a loss: how did that happen?†  SELECT Id, Tag FROM Posts, PostsTags  WHERE Posts.PostTypeId = 2 AND Posts.Id = PostsTags.PostId   Edit: The are also five answers (, , ,  and ) with a view count of 1 instead of 0:  SELECT Id, ViewCount FROM Posts WHERE PostTypeId = 2 AND ViewCount <> 0   These results also hold through at least January 10.      †: PostTypeId = 2 means that the post is an answer, not a question (PostTypeId = 1).


For a non empty set $S$ of a group $G$,define $$S^k=\{\Pi_{i=1} ^{n} s_i |  s_i \in S\}$$ for any positive integer $k$. Prove that, if $G$ has $n$ elements, then $S^n$ is a subgroup of $G$.   I am a beginner in abstract algebra so couldn’t achieve something that I could discuss

Let $G$ be a group with $|G| = n$ and let $ \emptyset \ne S \subseteq G$.   I want to show that $S^n$ is a subgroup of $G$ where by $S^n$ I mean the set $\lbrace s_1\cdots s_n \; | \; s_i \in S\rbrace$.


How can I remove a student from the course by using the drop method down below? I tried by accessing the roll book for the course parameter. But I do not how to remove the student id from the roll book.   public static class Student {      private int studentID;     private String first;     private String last;     private int credits;     private boolean graduate;      public Student(int id, String first, String last, boolean graduate) {         this.studentID = id;         this.first = first;         this.last = last;         this.graduate = graduate;     }      public int getID() { return studentID; }      public String getFirstName() { return first; }      public String getLastName() { return last; }      public int getCredits() { return credits; }      public boolean isGraduate() { return graduate; }      public void setCredits(int credits) { this.credits = credits; }      public String toString() { return "[" + studentID + "] " + first + " " + last; }      public boolean isEnrolled(Course c) {         return (c.findRollBookEntry(this.getID()) != null);     }      public void drop(Course c) {          for(int i = 0; i<c.getRollBook().length; i++){             c.findRollBookEntry(i).getStudent();         }     } }

Given an array of n Objects, let's say it is an array of strings, and it has the following values:  foo[0] = "a"; foo[1] = "cc"; foo[2] = "a"; foo[3] = "dd";   What do I have to do to delete/remove all the strings/objects equal to "a" in the array?


i am writing a jQuery file using onClick() to be an event for a button. But i want to load another js function from an external js file. How can i do that ? i have been trying but no result  This is my main.js  $(document).ready(function(){     $("#dashboard").on("click", function(event){         event.preventDefault();         $('#content').html(dashboardTemplate);         // I want another js external file will be loaded here      }); });   This is my external js file: The element #btnAddGroup is inside dashboardTemplate which is just a html file      $("#btnAddGroup").on("click", function (event) {         event.preventDefault();         alert('test');     });   Thank you    Edit : Based on your suggestion  external.js  function addGroup(){     $("#btnAddGroup").on("click", function (event) {         event.preventDefault();         alert('test');     }); }   main.js  $(document).ready(function(){     $("#dashboard").on("click", function(event){         event.preventDefault();         $('#content').html(dashboardTemplate);          $.getScript('external.js', function() {             addGroup();         });      });   });  Its still not working. I am trying troubleshoot. thanks again

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


I know how to get the sum of geometric series, but otherwise.  How do I get the sum of this series?  Thank you.  $$\sum\limits_{n=0}^{\infty}\frac{1}{n^2+3}$$

How to show the following equality? $$\sum_{n=0}^\infty\frac{1}{a^2+n^2}=\frac{1+a\pi\coth a\pi}{2a^2}$$


I made a sketch on a piece of paper, photographed it and . Now I have a vector image with a lot of detail.    I'd like to clean it up by removing those white and gray-ish chunks, and keep the dark strokes.  covers the Select → Same → Fill color, which selects only identical colours, and therefore doesn't really do it for me.   Do you think there's a way to automatically select all colours darker/lighter than a given threshold?

You know how you can select individual colours? And you can go to the select menu, and click select fill?   I need to do that but for a colour range.  Say for instance, you trace a photograph and expand it, and you want to remove a red stamp from the image (the expanded trace). You can select a red bit, and select, select fill, delete, or paint transparent, or set opacity to 0%, but you're still left with bits and pieces of different shades of pinks and reds.  You can sometimes just reduce the complexity of the trace so there's fewer colours or whatever, but that distorts the whole image.  I've tried just selecting a range of colours simultaneously by holding shift and clicking objects with the selection (U) tool. but it didn't work that way.


Pretty much like the title says. I'm curious if it would be possible to use my dedicated graphics card for gaming and other intensive tasks, while using my IGP for general usage to get power usage down?  I have an intel 3770k @ stock clock, GTX 660 Ti 2GB

I've got an Asus P8Z77 motherboard with a core i7 3770 processor, and a Geforce 660 video card. I'm running Windows 8.   While I primarily use the latter, there's situations where I want to use the HD4000 video adaptor built into the core processor - for example where I want to take advantage of quicksync. How would I do this?


I have the following equality :  $$I_1=-\frac{ab}{2\pi}\int_0^\pi \frac{\cos(2t)}{a^2\sin^2(t)+b^2\cos^2(t)}dt=\frac{a}{a+b}-\frac{1}{2}$$ $$I_2=-\frac{ab}{2\pi}\int_0^\pi \frac{\sin(2t)}{a^2\sin^2(t)+b^2\cos^2(t)}dt=0$$  where $0 <b \leq a$.  I used the residues but I could not prove this equality

I want to compute this integral $$\int_0^\pi \frac{\cos(2t)}{a^2\sin^2(t)+b^2\cos^2(t)}dt$$  where $0<b \leq a$.  I have this results $$I_1=-\frac{ab}{2\pi}\int_0^\pi \frac{\cos(2t)}{a^2sin^2(t)+b^2cos^2(t)}dt=\frac{a}{a+b}-\frac{1}{2}$$ But I don't know how to prove this equality.  Which can help me, Thanks for all.


I know this isn't allowed on Stack Overflow, but I was hoping there was a section on Stack Exchange that would allow this question.  I just need advice for my future career: Currently I'm enrolled in a computer science degree, and I'm not sure what to do next without wasting time. For example, I wanted to learn to make a website (HTML, JavaScript, and CSS) and create a game app (Java, Android SDK) as well as a desktop game (C++).  So basically I wanted to know if I should bother learning all of it, or focus on one thing and what do companies look for in employees. Where can I get this kind of advice (among other questions like this)?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


recently, I downloaded Android 5.0 on my nexus 7. I hate it, and want to reset my tablet. If I do, will that take me back to the original factory setting (4.1), and if so, can I upgrade to 4.4 kit kat?

I have upgraded my phone to Android 2.1. I need to reset my phone but I don't want to lose the upgrade. Is it possible to do this? How?


If one twin goes with an extremely fast rocket to Alpha Centauri and back, time is going slower for him, so when he comes back, the twin that stayed on the Earth is older.  But... if we look from the relative position of the rocket, the Earth rushed 4 light years away and then came back -- so the twin on the rocket should be older.  When the rocket is at cruising speed, neither accelerating nor decelerating, aren't Earth and the Rocket equally "correct"?  So, does that mean that acceleration and deceleration make the twin in the rocket younger?  But then acceleration and deceleration cause time dilation and not speed?  I know there are multiple questions already there about twins, but I can't understand the answers...  Can this be explained for someone with no physics background, in plain 5th-grade level English without manifolds, integrals, homotopy, etc?

The paradox in the  is that the situation appears symmetrical so each twin should think the other has aged less, which is of course impossible.  There are a thousand explanations out there for why this doesn't happen, but they all end up saying something vague like it's because one twin is accelerating or you need general relativity to understand it.  Please will someone give a simple and definitive explanation for why both twins agree on which twin is younger when they meet for the second time?


I have an object of class and want to re initialize the object by a function So I am writing a discord bot and there's one object that i want to be recreated every time the bot gets a command. import discord client = discord.Client() obJ_class = bot_friendly.Exec() # this creates the object and everything works fine   now @client.event async def on_message(message):     if message.content.startswith("&&exit"):     await message.channel.send("Exiting")     await client.close()     print("Successfully logged out")     if message.content.startswith("&&update"):     await message.channel.send("Wait a few seconds")     obJ_class = bot_friendly.Exec()  here the error is Shadows name 'obJ_class' from outer scope I would like to know if this is even doable or should i just make another function that does what the __init__(self): does but just name it update():

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


Given a measurable set $A$, if we square every element $B=\{a^2: a\in A\}$, is $B$ still measurable? I have no idea about this question, can someone help me?

Suppose $E \subset \mathbb{R}$ is Lebesgue measurable. Define $$ E^2 = \{x^2 : x \in E\}. $$ Is $E^2$ Lebesgue measurable as well?  I believe the answer is yes, but I am struggling to prove it. I tried forming interval covers of $E$ for which the sum of the lengths of the intervals is very close to $m(E)$, then considering the square of these intervals. However, if $E$ is unbounded, there is no guarantee these intervals will remain "small".


I currently know: $$Var(XY)=E(X^2Y^2)−[E(XY)]^2$$ $$=E(X^2)E(Y^2)−[E(X)]^2[E(Y)]^2$$ but I am lost where to go from there. I can vaguely see the the formula $Var(X)=E(X^2)-E(X)^2$ hidden somewhere, but I do not know how variance out of the equation. Thanks!

We know the answer for two independent variables: $$ {\rm Var}(XY) = E(X^2Y^2) − (E(XY))^2={\rm Var}(X){\rm Var}(Y)+{\rm Var}(X)(E(Y))^2+{\rm Var}(Y)(E(X))^2$$  However, if we take the product of more than two variables, ${\rm Var}(X_1X_2 \cdots X_n)$, what would the answer be in terms of variances and expected values of each variable?


My understanding about thread safe method parameters is: Parameters passed into a method by value are delivered as copies of the data that was given in the arguments to the method call, so they are unique to that method call and cannot be changed by any other task. Reference parameters, conversely, are susceptible to change by code running in other tasks.  With that said, It is not perfectly clear to me why the following code (without making a local copy of the loop counter) returns the same number in every thread.  static void ExampleFunc(int i) =>             Console.WriteLine("task " + i);   for (int i = 0; i < 10; i++) {     int taskN = i; //local copy instead of i     Task.Run(() => Func(i)); }   The actual output is: task 10 ten times   I get the correct output (task 1 to 10) by passing taskN instead of i.  I expected the same result since I'm passing a type value parameter.

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I know that $S_4$ have 6 abelian subgroups of order 4 and 12 abelian subgroups of order 2, if i choose a subgroup $H$ of order 4 in $S_4$ and a subgroup $K$ of order 2 in $S_4$, when i do the direct product $H \times K$,this will be abelian (theorem). Then not exist two subgroups such that the direct product be isomorph to $\operatorname{Dih}_4$.  But, i've needed see the subgroups of $S_4$ for show that. Exist another way to show the same thing?.  I appreciate your help. thanks.

I like to know why the dihedral group $D_4$ can't be written as a direct product of two groups. It is a school assignment that I've been trying to solve all day and now I'm more confused then ever, even thinking that the teacher might have missed writing out that he means normal subgroups.  On another thread it was stated (as the answer to this question) that the direct product of two abelian groups is again abelian. If we consider the direct product of abelian subgroups $H$,$K\in G$ where $HK=G$ (for all $g \in G$, $g=hk$ $h \in H$, $k \in K$.) I can't understand why this would imply $g=kh$? It is not stated anywhere that $H$,$K$ has to be normal! But if this implication is correct I do understand why $D_4$ (that is non-abelian) can't be written as a direct product of two groups. But if it's not, as I suspect, I need some help!  We know that all groups of order 4 and 2 are abelian, (since $4=p^2$), but only 4 of the subgroups of $D_4$ are normal:  Therefor I can easily show that $D_4$ can't be a direct product of normal subgroups: The only normal subgroups of $D_4$ is the three subgroups of order 4, (index 2 theorem): $\{e,a^2,b,a^2b\}$, $\langle a\rangle$, $\{e,a^2,ab,a^3b\}$ and the center of $D_4=\{e,a^2\}$ We can see that these are not disjoint. So $D_4$ can't be a direct product of normal subgroups. The reason for this being that the center is non-trivial. But why can't $D_4$ be a direct product of any two groups?  If we write the elements of $D_4$ as generated by $a$ and $b$, $a^4=e$, $b^2=e$, $ba=a^3b$ why isn't $D_4=\langle b\rangle\langle a\rangle$ ? I calculated the products of the elements of these two groups according to the rule given above and ended up with $D_4$, and also $\langle a\rangle$, $\langle b\rangle$ is disjoint...? Why is this wrong? Very thankful for an answer!


So, i am trying to find a good linux distro that is similar to windows* (my main os) and it has to be lightweight. I will run the distro on my 2GB RAm, Core 2 Duo Late 2009 MacBook. Does someone please have a suggestion of a lightweight distro similar to windows. I will be thankful if i recieve an awnser. *with many google searches i think kubuntu is great, but i don't think it will run PS: sorry for bad english

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


I am trying to get the colors in the video to be changeable. I need something that could completely change any one color in a video, specifically black to white, but I don't want to invert it to make all white objects black. I can work without changing the other colors, but it would be nice if I could do them too. I am not very experienced with Blender, so there may be a very obvious answer here that I am just not seeing. One thing I tried was turning the black into a green screen with the keying node, but that messes with the other colors. Any help is appreciated. Thank you.

I am very new to blender still.  I want to simply change the color of an object in the video.  I want to know if there is good way to do this.  I am including what I have to test.


I have an idea to use my pc to access my friend's pc's user remotely from home while he is using the other user on the his pc. How can I setup this multi-user system?

I need to allow someone to remotely connect to my windows 10 computer, and am wondering if this is possible:  I have two user accounts right now on my computer, one for me to work on and one for my friend remotely. I want to use my user account locally for myself, and I want to allow him to RDP and log into the other account when he needs to work without disturbing my computer experience.   In other words, I don't want to have to stop what I am doing and log off of my user account when he needs to access his account remotely. Can two user accounts run simultaneously in this regard, with one being connected to via RDP?  If so, can you please explain how to set it up properly?  Thanks for your help!


Specifically, this is referring to creatures with a Bite and two Claw attacks. As far as I understood previously, they are both Primary natural attacks, and ruled that my player's Eidolon could use them all at full BAB in a full attack.   My basis for that was as such; Natural attacks are listed in this way (using the grizzly bear example I'd seen in another question)  Melee 2 claws +7 (1d6+5 plus grab), bite +7 (1d6+5)  Whereas Weapon attacks for say, a Cyclops, are listed this way;  Melee greataxe +11/+6 (3d6+7/×3)  It pretty clearly marks the BAB -5, indicating it's full attack setup. But I've also read that the PF rules for natural attacks are basically the same as 3.5. So, in that line of thinking, I've pulled up the listing for a tiger, which specifies full attacks as such;  2 claws +9 melee (1d8+6) and bite +4 melee (2d6+3)  So! I'm fairly confused. I'm thinking that if my player's Eidolon wants to full attack anymore, should it use the -5 BAB (and half strength) for his bite?

Okay, I need some clarification. The  state this about natural attacks:     You do not receive additional natural attacks for a high base attack bonus. Instead, you receive additional attack rolls for multiple limb and body parts capable of making the attack (as noted by the race or ability that grants the attacks).   Let's say that I can shape into an . My BAB is +8/+3 and STR 5. An Oliphant has two natural attacks: Gore and Stomp (x2).  Reading the rules, it seems that I can't do two Gore attacks, like:   1st attack: AB +13. DAM 2d8 + 5 2nd attack: AB +8. DAM 2d8 + 5   because I don't get additional attacks for a high BAB. Does that mean I need to combine attacks instead? Example:   (Gore) 1st attack, AB +13. DAM 2d8 + 5 (2 Stomps) 2nd attack, AB +6*. DAM 2d6 + 5 * With the Multiattack feat, reduces secondary weapon penalty to −2.   Also, does the damage from the two stomps equal 2d6 + 5, or should I roll damage for each stomp? (1st foot = 2d6 + 5, 2nd foot = 2d6 + 5).


Designer/Artist here using Ubuntu for some neural network projects. I am pretty new to Ubuntu/Linux and I don't quite know how to get things looking the way I want.   The main thing annoying me is how if I have two Mozilla windows open they stack. I don't want them to stack. I want to see multiple mozilla things in my launcher, similar to the way that windows taskbar does. I'd also like if instead of just icons it could have an icon plus text.   I've seen things for Gnome to do this I think but I don't quite know how to get that working on Ubuntu? I'm on Ubuntu 16.

For example, I ran Firefox and opened . Then opened some link in a new window. As a result, I have two windows of Firefox and one icon of Firefox on the launcher. I want to have an icon for each opened window.  How do I do?


I've run into a unique little error in my basic chat program which states that I cannot send a  from another thread:  An exception of type 'System.InvalidOperationException' occurred in System.Windows.Forms.dll but was not handled in user code  Additional information: Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on.   This occurs when I call popupNotification.Popup(); from this method:  void ChatServer_OnDataReceived(object sender, ReceivedArguments e)     {         string machine = e.Name;         string message = e.ReceivedData;         popupNotification.TitleText = "New  message";         popupNotification.ContentText = machine + " sent a message at " + DateTime.Now.ToShortTimeString() +             ", saying  \"" + message + "\"";         popupNotification.Popup();         changeTextBoxContents(e.Name + " sent a message at " + DateTime.Now.ToShortTimeString() +             ", saying  \"" + e.ReceivedData + "\"");     }   I'm trying to create the cross-thread code which should look like this:  public delegate void UpdatePopup(PopupNotifier notificationPopup);  void sendAPopup(PopupNotifier notificationPopup)     {         if (notificationPopup.InvokeRequired)         {             Invoke(new UpdatePopup(sendAPopup), new object[] { notificationPopup });         }         else         {             notificationPopup.Popup();         }     }   However, the notification popup window library doesn't have a Invoke Required method, so I'm out of luck on that fix.  Can anyone help?

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


if GCD of $(a, b) = 1$, prove that GCD $(a+b, a-b) = 1$ or $2 .$ The proof goes like: Let GCD $( a+b, a-b ) = d$ and let there exist integers m and n such that $ a+b =md$  and $ a-b = nd.$ By adding and subtracting these two equations we get: $2a = (m+n)d$ and $2b = (m-n)d$ , because $a, b$ are coprime then $2$ GCD $(a,b)$ = GCD $(2a, 2b),$ and so on. My question is, why do we have to add and subtract above equations? I need to understand the concept of this prove in some more details. Thanks!

I want to show that for $\gcd(a,b) = 1$ $a,b \in Z$   $\gcd(a+b, a-b) = 1$ or $\gcd(a+b, a-b) = 2$ holds.      I think the first step should look something like this:      $d = \gcd(a+b, a-b) = \gcd(2a, a-b)$   From here I tried to proceed with two cases. 1: $a-b$ is even, which leads to $\gcd(a+b, a-b) = 2$ 2: $a-b$ is odd, which leads to $\gcd(a+b, a-b) = 1$  My main problem I think is, that I do not know how I should include $\gcd(a,b) = 1$ in the proof.  Any help is appreciated. Thx in advance. Cherio Woltan