How to insert elements in a nested List in Python?

I do not have much experience in Python.  All I want to do is to insert elements in nested lists.I have two lists which seems to be similar but their behaviour is completely different.  list1 = [['a','b']] * 3 list2 = [['a','b'],['a','b'],['a','b']]   When I output print these two lists both give same output:  [['a', 'b'], ['a', 'b'], ['a', 'b']]  But when I try to insert elements in nested lists both do that in a different way. Below is the code for inserting elements in nested list.  list1 = [['a','b']] * 3 for item in list1:   item.append("Hello") print (list1)   This outputs  [['a', 'b', 'Hello', 'Hello', 'Hello'], ['a', 'b', 'Hello', 'Hello', 'Hello'], ['a', 'b', 'Hello', 'Hello', 'Hello']]  While when I define list in the following way it does exactly what I want.  list2 = [['a','b'],['a','b'],['a','b']] for item in list2:   item.append("Hello") print (list2)   This gives following output: [['a', 'b', 'Hello'], ['a', 'b', 'Hello'], ['a', 'b', 'Hello']].  Why are these two behaving differently?     list1 = [['a','b']] * 3     list2 = [['a','b'],['a','b'],['a','b']]


If every linear operator on $X$ is bounded then is $\dim X<\infty$?

I have started learning Functional Analysis:  I have encountered a theorem which states that if     If $X(NLS)$  is finite dimensional then every linear operator on $X$ is bounded.   Is the converse true?i.e if every linear operator on $X$ is bounded then is $\dim X<\infty$?  In order to show this ;Proceed by contradiction; suppose that $\dim X=\infty$ I want to show that there exits an unbounded linear operator on $X$.Let $X$ have a Hamel Basis say $(e_n)$,then any $x\in X$ can be expressed uniquely as $x=\sum_{k=1}^n c_ie_i$.  How should I define $f(x)$ now to get $f(x)$ unbounded?Any hints will be helpful. Please ensure to give some hints why it should be unbounded ?


What causes a random giant mouse cursor?

After upgrading my late 2012 Mac Mini from Yosemite to Sierra I notice a weird occurrence - briefly when moving the mouse it suddenly jumps to about 10x the normal size for just a tiny moment.   A timed screen capture from Skitch shows this happening:        What on earth could be causing this?


Why is it 'grand theft auto' and not 'auto grand theft' or 'grand theft of an auto'?

If it's applied to an act of theft, then why is the last word of the expression 'grand theft auto' is 'auto' instead of 'theft'? It's constructed as if it's 'auto' modified with 'grand theft', i.e. an auto that has been "grand-thefted", so to speak. Why is the word order so unusual?


What is so special about being multiples of 22, 47 and 56 for standard capacitor and resistor values?

Why is that special numbers instead of multiples of 10? Same goes with some resistor values of 47, 560 220 ohm ect.?  Where and why is this issue originate from?


Analysing slope gradient from LiDAR .asc data?

I'm new to using QGIS. I have purchased some LiDAR data which downloads as .asc format, is there a way to analyse the terrain slope angle from this data or does it need to be converted into DEM? Ideally I would like to display the steeper slope angles (>35 degrees) as a different colour to the shallower (less steep) slope angles.  I'm using QGIS 2.0 Dufour on windows vista platform.


printglossary makes abbreviations ending with periods

I use the glossaries package for my glossary and some acronyms: \usepackage{datatool} \usepackage[ngerman]{translator} \usepackage[nonumberlist,acronym,toc,section]{glossaries}  \makeglossaries  ...  /% Glossary \printglossary[style=altlist,title=Glossar]  /% Acronyms \deftranslation[to=German]{Acronyms}{Akronyme} \printglossary[type=\acronymtype,style=long]  Curiously, glossaries makes a period after each acronym. Screnshot:  How can you change that?


What is the process of a photon transforming into an electron and positron?

How did they come into existence from a photon? Is it really understood how the process works? Is there even a process or is it just something fundamental?


i was trying to write a project in C but it is not working  can someone tell me why? and what do i need to change? i am trying to recive the day in week the birthday of a man will be next year after he tell me the date in this year( example 14/11 day 2(monday)  #include<stdio.h>  int day,month,day_in_week;  void main() {     printf("Enter the date of your birthday in 2015 (day,month, day in week):\n");     scanf("%d%d%d",&day,&month,&day_in_week);     if(day_in_week<1 || day_in_week>7)    {        printf("Error date entered");        return;    }    if(month<1 || month>12)    {        printf("Error date entered");        return;    }    switch(month)    {    case 2:        if(day<1 || day>28)               {                   printf("Error date entered");                   return;               }    case 1: case 3:case 5:case 7:case 8:case 10:case 12:        if(day<1 || day>31)               {                   printf("Error date entered");                   return;               }    case 4:case 6:case 9:case 11:        if(day<1 || day>30)               {                   printf("Error date entered");                   return;               }    }     switch(month)    {    case 1:case 2:            day_in_week++;            if (day_in_week>7)                day_in_week= day_in_week-7;    case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:               day_in_week=day_in_week+2;            if (day_in_week>7)                day_in_week= day_in_week-7;    }     switch(day_in_week)    {    case 1:        printf("Sunday");    case 2:        printf("Monday");    case 3:        printf("Tuesday");    case 4:        printf("Wednesday");    case 5:        printf("Thursday");    case 6:        printf("Friday");    case 7:        printf("Saturday");    }    getch();    return 0; }


Remove post from the related list if it's in the linked list already

In my  I noticed that one post exists in both: linked and related lists.        I can't find any reason to duplicate it on the single page.   Is it possible to remove question from the related list if it's in the linked list already?


I connect to my company VPN for email, intranet, fileshare etc, but when I'm working I also like to listen to Spotify which is blocked through the company network, so I have to disconnect to the VPN to use it. Is there anything I can do which will enable me to remain connected to the VPN but bypass it for Spotify? I use the Cisco VPN client.


I've come to notice that when I lock my computer, with my second monitor turned on, even though I have a dual screen wallpaper, the lock screen only shows the background on one of the screens, and the other the start menu colors.  Is it possible, either using a third party program or an inbuilt feature of windows 8, to allow the wallpaper to overflow onto the second screen when the lock screen is activated, just like desktop mode wallpapers (it spans across both screens).  Thanks in advance.


Does voting up too many posts from a single user trigger an automatic undo of those votes?

I thought suspicious voting patterns were just noted in the mod's "Suspicious voting patterns" list and it was up to them to determine if the votes should be undone.  Is there more to it than this?  If the voting pattern reaches a certain threshold, will the votes be undone automatically?  The reason I ask is because Fog Creek has created a  user on  to post documentation.  I have recently voted on many of this user's posts only to see all those votes disappear.


Is epoch optimization in CV with constant mini-batch size even possible?

Assume that you found the optimal hyperparameters of a neural network (e.g. a multi layer feed forward NN) with k-fold cross validation in a grid search. Lets assume you have varied the number of epochs and got the optimal epoch number as a result.  Now you want to train the network for the optimal number of epochs on the whole data used for CV. In my opinion following problem arises: When using a constant mini batch size, number of iterations varies for datasets of different size - so your optimal epoch number found for the smaller training split in the CV can not be applied to training with the whole CV data. Am I missing something here? Right at the moment I can not find a proper solution for finding the optimal training epochs for my NN. I searched the net for some time now, but could not find an answer.  P.S. I only described the problem after the inner loop of nested CV, but the same problem arises after the outer loop (training the model on ALL data, not only on CV data for putting the model to production).


I want to convert  to a pdf file. Calibre's command ebook-convert ebook-convert 1.chm 1.pdf only converts the first 7 pages of the chm file into a pdf file, while the chm file has much more pages. How can I convert the whole chm file into a pdf file? Thanks.


Change default Blender render output format?

Does anyone know if there's any way to change Blender's default render output format for saving? I prefer to save my renders as OpenEXR files, but Blender insists on keeping PNG as the default, forcing me to manually change it each time I save.


Slow connection with a Broadcom BCM4318 wireless card

I recently upgraded to 14.04. I just recently had an issue where my wifi wouldn't connect. I restarted the computer and it connected fine but now my wifi speeds are extremely slow. I saw a similar issue posted that said to use a script to provide info, which I've provided below. Where should I go from here?    Thanks for any help!


Number of ways to choose at least 0 elements from n

I have a practical combination of maximum n number of input pairs for example n=3:  query=lorem&region=maharashtra&city=dombivali  It could also be empty input meaning one special case. The following are all valid inputs but order does not matter:  region=maharashtra&city=dombivali  city=dombivali  query=lorem&region=maharashtra  region=maharashtra  query=lorem&city=dombivali  query=lorem  Order does not matter for example the inputs query=lorem&city=dombivali and  city=dombivali&query=loremwill have identical meaning.   Since the empty string is also valid input, three inputs results in 7 combinations if I am not mistaken. I look at problems of type "n choose k" but in this case it is more like "n choose none or more" or number of unique subsets from a set with n elements.   $\frac{3!}{3!(3-3)!} + \frac{3!}{2!(3-2)!} + \frac{3!}{1!(3-1)!} $ $ = 1 + 3 + 3= 7. $   Therefore the number of possible inputs from four input pairs will be  $\frac{4!}{4!(4-4)!} + \frac{4!}{3!(4-3)!} + \frac{4!}{2!(4-2)!} + \frac{4!}{1!(4-1)!} $ $ = 1 + 4 + 6 + 4= 15. $   Are my calculations correct or is there an easier way than my attempt?


Why is there no motion when adding clips into Image texture node in Cycles?

No matter what I choose, it shows me only the 1st frame as if it was a single image although I choose the Movie option and the number of frames is more than 1.  How can I fix it?  I tried different projects and different videos, it is always the same. Also I'm not sure if it's the same problem, but I've seen lots of tutorials using Images as Planes feature and they could see a picture on a plane in Material View. I can't.


I tried to find a topic here on this (possible problem) but I didn't.   I reported it at  but Tim Hoffmann pointed me that it is not a problem of editor. After tested with nano and pdflatex I'm posting here.  The minimal code produces errors. OK, we can solve it using \\{}.   But is this a problem with TeXlive 2014 or there are some good reasons to have that behavior.  \documentclass{report} \begin{document} test\\ [foo]  test\linebreak [foo]  test\newline [foo] \end{document}      ! Missing number, treated as zero.                        f l.3 test\ [foo]


Im not sure why my code does not do what I want (I want to return a list of unique items)  B = ["blue", "blue", "red",   "green", "red",  "blue", "yellow", "green", "blue", "red"] def makeUnique(list):     unique = []     for i in range(0, len(list)):         if list[i] not in unique:             unique.append(item)     return unique print makeUnique(B)   It returns  ['red', 'red', 'red', 'red', 'red', 'red', 'red']   Edit: idents might be incorrect, when pasting some was missing, so its not a ident error or sth


I'm using sharelatex and pdflatex as a compiler. I am using the memoir class. (It's for a book.)  At first I used .png images but the compiler always took too long so I converted all my image files to .pdf in order to gain a smaller file size=faster compilation speed and I realized that vector images' quality are better than raster so I want to keep working with vector formats (and I didn't use .svg or .eps because sharelatex doesn't support them).  The image has to fit the page's width margins (for the vector image) or if it does ever exceed, it can be floated(but still centered; and again, I used this trick for png images but they were too big and never loaded properly).  I've tried many solutions, but none of them managed to work. They used to work when the extension was still .png. But once I've switched to pdf they're all broken. (or worked differently so I didn't got my results).  I'm going to add the document's frames so it'll be easier to get an idea of how much the image is off-bounds to the center.  \documentclass[14pt]{memoir} \usepackage[utf8]{inputenc}  \usepackage{graphicx} \graphicspath{ {images/} }  \usepackage[paperwidth=6in, paperheight=9in, margin=0.9in, showframe]{geometry}  \begin{document}  \begin{center} \includegraphics[scale = 1]{001} \end{center}  \end{document}   Which got me this:   \documentclass[14pt]{memoir} \usepackage[utf8]{inputenc}  \usepackage{graphicx} \graphicspath{ {images/} }  \usepackage[paperwidth=6in, paperheight=9in, margin=0.9in, showframe]{geometry}  \begin{document}  \begin{center} \includegraphics[scale = 1]{001_pngversion} \end{center}  \end{document}   Result:   Which gives me the high resolution png version. Somehow, it looks like more aligned to the left...? Maybe it was because it's too big, it exceeded the page limits and couldn't center properly?  I then decided to use the \centering trick and the \linewidth trick to resize it:  \documentclass[14pt]{memoir} \usepackage[utf8]{inputenc}  \usepackage{graphicx} \graphicspath{ {images/} }  \usepackage[paperwidth=6in, paperheight=9in, margin=0.9in, showframe]{geometry}  \begin{document}  \begin{center} \includegraphics[width=1\linewidth]{001} \end{center}  \end{document}   Which got me this, the exact result I was looking for:   Now, let's try the same trick with pdf images:  \documentclass[14pt]{memoir} \usepackage[utf8]{inputenc}  \usepackage{graphicx} \graphicspath{ {images/} }  \usepackage[paperwidth=6in, paperheight=9in, margin=0.9in, showframe]{geometry}  \begin{document}  \begin{figure} \centering \includegraphics[width=1\linewidth]{001} \end{figure}  \end{document}   Results:   Which obtained the same exact result as the FIRST ONE (failed one)  I then tried \begin{figure} \begin{floatrow} or \centerfloat , etc but it still failed. Only worked for pngs...  What I want to achieve is the result I got from the png version, while using .pdf images.  (On a side note, could someone explain the difference in using /centering, /centerline, and /centerfloat? While I was looking for answers concerning centering floating images that surpassed the page's margins. Which one is usually recommended?)


What can I do to improve my computer's speed when using Ubuntu?

My computer is limited in resources and it just has 2GB ram and 1.8ghz cpu. I want to use Ubuntu, but only Xubuntu 15 seems to run well.   So if I want to use Ubuntu, what can I do to improve my experience and computer's speed and avoid slowness?


Find the values of a>0 for which the improper integral $\int_{0}^{\infty}\frac{\sin x}{x^{a}} $ converges .

Find the values of $a>0$ for which the improper integral   $$\int_{0}^{\infty}\frac{\sin x}{x^{a}}dx$$  converges.  Will the Taylor series expansion of $\sin$ be a better method than testing the integral?


Is Biot-Savart Law valid for time-varying currents unlike Ampere's law?

I have just finished learning the basics of magnetism, and it should be noted that I am not very familiar with Maxwell's equations.  Note:    In the question, when I say , I am referring to the equation without Maxwell's correction. Also, when I say , I am referring to the equation: $\mathrm dB= (\mu_0/4\pi)(I)(\mathrm dL~ X~\hat r)/r^2$     Consider an infinitely long straight wire, carrying a time varying current I(t) such that dI(t)/dt is non-zero. Also consider a point P which is at a distance r from the wire. Using Biot Savart Law, we find out that the magnetic field is $\mu_0\cdot I(t)/2\pi \cdot r$, at any instant t.   Now, I have read that Ampere's Circuital law is NOT valid for cases in which the currents are time varying. However, if we consider an Amperian loop along a circle of radius r and centre at the perpendicular from P to the wire, using symmetry arguments, we obtain the same value of field: $\mu_0 I(t)/2\pi\cdot r$. Since Ampere's law is invalid for such a current, the expression mentioned for the magnetic field must be incorrect.  So, can Biot Savart Law also NOT be used for time varying currents? Also, just out of curiosity, what would be the actual value of the magnetic field at time t?  My book (Halliday and Resnick) derives the equation for the magnetic field created due to a moving point charge. However, after the derivation, it states that the result obtained is not really valid, since "a point charge cannot be assumed as a steady current by any stretch of imagination". This makes me believe that even Biot-Savart Law is only true for non time varying currents. Am I right or wrong?


Give full permission to a folder in an Ethernet

I have two ubuntu machines (machineA and machineB)connected through a wired Ethernet cable. I'm asking how I can give full permission and access of machineA to a certain folder Folder1 in the machineB over the network using terminal?


Or is it now the other way around?  From what I've heard there are some areas in which C# proves to be faster than C++, but I've never had the guts to test it by myself.  Thought any of you could explain these differences in detail or point me to the right place for information on this.


Why is it that on all my calculators, when I subtract 12% from $56$, I get $49.28$, but when I add 12% to $50$, I get $56$?


I came up with this line somewhere:  To properly experience $n$ dimensions the retina of the organism should be at least of $n-1$ dimensions. And human eye has $2$ dimensional retina, so we can experience at most 3 dimensions properly.  Now my question is:  Do more than 3 dimensions exist?  What is the proof that 'there exist only 3' or 'more dimensions do exist'?


I am wondering how to make a window that can’t usually be opened in full-screen (i.e. TextEdit or Dictionary) able to be opened in full-screen by using the full-screen button. Is this possible?


Can I travel to Spain on a UK visa? I am a Fillipino

I am a Filipino living in Dubai and I have a two year visa for the UK.  I need to travel to Spain, can I do this using my UK visa ?


Why do heterozygous individuals have increased resistance to malaria?

I am aware that there is such a thing called heterozygous advantage, which is due to the presence of a certain single allele, and that an example of this could be with "sickle-cell anemia".  I am quite curious as to how exactly this heterozygous advantage is created.   Could the increased resistance against malaria be due to natural resistance or natural selection?


Getting "An error occurred on the server" when trying to login to ask.libreoffice.org

Trying to login to ask.libreoffice.org. Their login page is at  Where I click openID button and key in url https://openid.stackexchange.com/. Then I click "Sign In", and I get:  An error occurred on the server This event has been recorded. If you believe you encountered this message in error, please report it.   Am I doing something wrong, or is it broken? Using Firefox 27.0.1, Windows 7. The red plugin shown in the screenshot is lastpass, which should not have an impact here. I'm using the same login for stackexchange sites, where the login works fine. Tested also on IE 11 without any plugins, and seeing the same behaviour. Test from another site, , worked without issues.


Meaning: "waiting for 6 hours" vs. "6 hours since I was waiting"

Do the following sentences denote the same thing?   I have been waiting for you for 6 hours.   It's been 6 hours since I was waiting for you.


I'm technically a beginner when it comes to anything other than point and shoot photography so I apologise if I don't explain myself clearly.  I have a Pentax Q with an 85-200mm K lens, I'm using a Q to K mount.  I've only tested it once on the moon but I couldn't seem to get a clear image of it. I set my metering to the center to it removed the "glow" from the moon and you could see the detail but no matter what I couldn't quite focus onto it properly.  Adjusting the focus only brings the moon into focus so much.  Are there any tips or tricks I'm missing that can help me achieve this? I've read a few posts about moon photography but I'm wondering if there's anything wrong with my equipment in this case that's stopping me from achieving a clear image?  *****EXAMPLE SHOT*****    Thanks.


How to apply normal-, gloss-, occlusion-, specularity- and displacement map on one cycles material?

I try to apply all these textures to one material in cycles. These are all my textures:    My attempt (no idea at all how occlusion map works)


Background Scrolling like Zelda - A Link To The Past with XNA

i am trying to create a background that scrolls like the one in zelda - a link to the past. in other words: i have a bigger "screen" than the camera covers, so i need to scroll over it, when moving. if the player reaches an edge of the screen, the camera is going to stop and the character moves out of the center.   my actual problem is, that i have to draw the objects in an other way than the background. i am getting the camera to track the player, but if i want to add another object like an enemy, i have to draw it with screen coordinates, which are not the same as the background coordinates. (background image is 1280x720 with a source rectangle of 640x360). so the player is usually drawn at 640/2, 360/2. but the player also is at position 600,600 of the background image. so, if there is an enemy at 200,200 and the player moves to that point i want to draw the enemy on the screen. but, of course, i cant draw it at 200,200 in the screen that displays the sorucerectangle of the texture.  so i am looking for a way to kinda get the object into the texture, that there is only one coordinate system or at least a second coordinate system where all the object are in., which is as big as the texture itsself. with such a coordinate system i could get the absolute positions of the objects and draw it like the sourcerectanlge of a texture.


Is there a method to update support vector machine (SVM) parameters?

Consider, there are two classes of data and we have learned the SVM parameters in terms Lagrange multipliers. There are many learning techniques to learn these parameters quadratic programming or sequential minimal optimization etc.   The question is, once we have learned our classifier, can we update the parameters somehow, once we get a new unknown sample . We can easily pass the unknown sample through the classifier and get a result.     But is there a way to  learn something blindly from the sample?  This is essential for our case: in our application the input to the classifier  changes slowly over time. So we need to capture the slow changes somehow blindly. Is it possible?    The list of answers from  are related to how to train when you get a new sample. Kindly note in that case you know the label of the new sample, in other words the class of the new sample is known or using oracle. The question here refers to the case when the class of the sample is not known As such in my opinion this is not duplicate. This question may not have an answer though. The closet approach so far seen is  active learning, however this not answer the original question of slow changing. To be more specific some active learning considers support vectors and weights as a metric to decide a label but here question is related to change of support vectors to cope with slow changes.  Let me write other way, I am looking for active learning without knowing the label. All those references deal with how to choose a sample, the oracle or somebody would specify the class of the sample.


Basic quantum mechanics- violation of the time-energy uncertainty principle by pure eigenstates of the infinite potential well?

Just beginning to learn quantum mechanics and my textbook says that all pure eigenstates of the Schrodinger equation ( with a specified potential function) have a zero standard deviation for the expectation values of energy.So every measurement of the energy yields a fixed value. I've also read that pure eigenstates are physically realisable solutions in some situations ( like the infinite potential well). But wouldn't that violate the uncertainty principle? the standard deviation in expectation of energy is zero and hence $$ΔE~Δt=0.$$ Where am I going wrong? Also could someone also give me an insight as to what uncertainty in time even means? I haven't been able to grasp that concept clearly yet.


Can posts that have been favorited be viewed in a list on the iOS app similar to the desktop web version? If not, I'd like to request such a feature.


Manually Installed new Python to /usr/bin, how to get Repo version back?

Yes, I'm a moron, and I tried to manually install a higher point release of python 2.7.16 to /usr/bin/  (i did ./configure --prefix=/usr) on my Ubuntu 16.04 machine. It seems to work fine EXCEPT for packages that depended on python, like apt-listchanges, which fails with messages like ImportError: No module named apt_pkg  there's no make uninstall available, I've tried manually removing files, and still when I try apt --reinstall install python, Nothing gets overwritten and the python executable still gives the new 2.7.16 version...   Any idea how to get the official repository version back??


Should I say      I look forward to hearing from you   or     looking forward to hear from you?   I have doubt because I know that the form of a verb is "to+ infinity" without the addition of the -ing that changes it to become a noun.


I have a shapefile containing many points.  Some of these points fall within an area for which I have raster data.  I would like to load the values of the raster which underlie each point into the shapefile such that they appear as a column in its DBF.  Is there a way to do this with, say, GDAL?


How do you integrate $ \int \csc^{3}x\,dx $ ?  I know that you have to change the integral into $\int \csc x (1 + \cot^2 x)\,dx$  But what do you do next?


I want to make a for loop in python to go over a list. However, I would like to have it going through the list in the opposite direction. For example    foo = [1a,2b,3c,4d]   for number in foo:       print number   the result of this code should be: 4d 3c 2b 1a and not 1a 2b 3c 4d.  Any elegant way to do this? Or is it best to reorder the initial list itself?  Many thanks for your advice


How do I verify a value from a CSV file using Postman test

I'm using Postman to push data from a CSV in my Google cloud bucket to an app. I need to write a test to verify that one of the values in the CSV is all in uppercase.


Prove that a graph $G$ is a forest if and only if every induced subgraph of $G$ contain a vertex of degree at most $1$  =>  Let $G$ be a forest. Then $g$ is the collection of a bunch of trees. For the tree there at least one vertex of degree $0$ or $1$, so every induced subgraph of $G$ contain a vertex of degree at most $1$  <=  Assume that every induced subgraph of $G$ contain a vertex of degree at most $1$. I want to show that these subgraph are tree, meaning I want to show that non of them contain any cycle and all of them are connected graph. But I'm not sure how.


Pressing SUPER+L once locks screen but leaves side bar (dock) and desktop visible

Pressing SUPER+L second time hides desktop but leaves side bar visible, not very safe situation.  Is there any fix for this?


UK Standard Visitor Visa: how long does it take to get application acknowledgement?

My wife and I applied for a UK Standard visitor visa at the New York consulate. We sent in the documents and they have reached the mail room yesterday according to UPS.  Does anyone know how long it takes to get an email stating that they have received everything and are processing the applications?


How many lands do I need for a Commander deck?

A Commander deck consists of 100 unique cards, of which one is designated as the Commander and must be either a Legendary Creature or an allowed Planeswalker.  I'm still very unfamiliar with this format.  How would you go about figuring out the number of lands to put into your commander deck?


Which is a good book on math History?  I want to give it as a gift to a mathematician.


A possible bug: The right margin of printed SE content is way too large

I am viewing a Stack Exchange question in Chrome on a Windows machine.  If I now click on "Print...", I obtain the following preview:    Visually, there appears to be way too much white space to the right of the question, and this continues down through the comments and answers of this question.  In this format, just this single question and a few short comments and answers require seven pages to print.  Multiple other meta.se questions have noted this margin issue (see , , , and possibly  for examples), and the fix seems plausibly trivial (possibly just changing several widths to "auto" in the relevant CSS).  So my question is, what hope do we have that this may be corrected in the near future?  P.S.  For interested users, there are great SE-developed tools to download SE content.  See  for a description of these.  I see these as complementary to, not a replacement for, well-formatted printing directly from the primary landing page.


Separate time series regressions or a panel (with dummies)?

What is the difference between running N separate time series regressions relative to running a panel (POLS for example) with and without dummies for the N entities? It would be useful to get some intuition about the impact on the coefficients and standard errors.


Is there a direct proof that pi is not the root of an algebraic equation whose degree is a power of 2

All known proofs that the circle cannot be squared are based on Lindemann's theorem that $\pi$ is not analgebraic number.  But this seems to be a case of using an atomic bomb to kill a fly.    What really has to be proved is that $\pi$ is not the root of an algebraic equation with rational coefficients whose degree is a power of $2$.  Lindemann proves it for all degrees, which is much much more than what is needed for the classical construction problem.    It is not too hard to prove that $\pi$ is not the root of a quadratic equation, and perhaps some clever induction argument could carry the day.  The point is that a direct proof for degree $2^n$ has not only never been published, it does not even seem to have been noticed that this much less powerful result is all that is needed.


Lines in figure are not shown on pdf output

I have prepared a graph in pdf format by using graph_tool, which is:    I have imported the figure as pdf into tex file. It looks properly on latex preview. However, if I take a pdf output of the tex file, then the lines disappears.    I am working on Overleaf site. They use Tex Live 2016. The tex file is as follows:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{graphicx}  \begin{document} \begin{figure} \includegraphics[width=0.45\linewidth]{synthetic_out}\label{sfig:synth_out} \caption{Capt} \end{figure} \end{document}   How can I achieve to see lines on pdf output, too ? Thanks.  EDIT: I have made the lines thicker. But it didn't help too. You can achieve the pdf file via .


W: The repository 'http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu yakkety Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/gnome-terminator/ppa/ubuntu/dists/yakkety/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.


Does a countably infinite power set exist?

Let $A$ be a set.  If $A$ is finite then so is $\mathcal{P}(A)$.  If $A$ is not finite then it has a countably infinite subset $B$, in which case $\mathcal{P}(B)$ is uncountable and thus so is $\mathcal{P}(A)$.  Can I say that given an arbitrary set its power set may be finite or uncountably infinite but never countably infinite?


I have tried compiling c programs and it fails  I tried gcc-0 hello hello.c it said gcc-0 command found I also tried sudo gcc-0 hello hello.c and it said gcc command not found  I have installed all developer tools I have ran the commands sudo apt-get build-essential and the result is that i have installed latest version


I was wondering if a photon is divisible.   If you look at a photon as a particle, then you may be able to split it (in theory).  Is it possible and how do you split it?


Why is a linear transformation called linear?

$T(av_1 + bv_2) = aT(v_1) + bT(v_2)$  Why is this called linear? $f(x) =ax + b$, the simplest linear equation does not satisfy $f(x_1 + x_2) = f(x_1) + f(x_2)$.  Thank you.


Should the questions put on hold be marked on questions list with a color?

When browsing on questions that I would like to answer or flag, I now ended up to a question that was put on hold. I had to open the question to realize it was not an eligible one and it was already put on hold. So nothing to do about, basically.  On software design one rule is to avoid clicks. If I look for questions to answer, I normally skip ones marked as green on list because these have an accepted answer already there. For put on hold questions the only indicator is maybe a flappy title, put for being sure there is no need to even flag the question, I would like to see a yellow color on status (votecount, answer count) box to tell the question is on hold. That way my moderating and answering double focus would immediatedly go for the next one. Desicion of open or not would be easier.  (You may discuss the color, light grey is ok, too.)


How do I find out what these partitions are?

I purchased a computer and installed Ubuntu 16.04 from a USB drive which I created myself. I then upgraded the computer to 16.10 and installed SpaceView to see the disk usage on the computer as an applet. There are three partitions it shows:   /dev/mapper/ubuntu--vg-root sda1 sda2   I am confused, though, because I did not partition my system myself at all, and am totally new to partitioning at all. I also don't have any external drives plugged in.  Are these partitions default partitions for Ubuntu? If so, what are they for?


Where can I pay for the Extra Bag on the American Airlines Site?

I have booked a Ticket on American Airlines for London-Chicago for a trip in  March 2018, from the British Airways website (So that I would get BA miles on this booking).  American Airlines charges $100 for the second bag, and hence I need to pay this, since I'll be traveling with 2 checked in bags. The British Airways customer care says that I need to pay American Airlines directly for this excess baggage charge.  I went into the 'My Trips' section on the American Airlines, but I couldn't find where to pay this Excess Baggage Charge in Advance.  On the American Airlines Site, where can I pay for the Extra Bag in advance?


How can I tell which release my org is running?

Usually you can tell what release (e.g. Winter '14) you are running under by looking at the logo in the top left, but if that has been customized or removed it's not an option. Is there some place in the setup or settings that let's you know what release you are running?


Android activity class gives NullPointerException

My problem is that one specific activity in my app can't be launched for some reason, and it throws:   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference  All other launching code that looks like this work fine, the problem is ONLY when I'm launching Player1. The class surely exists, and I can't understand what is the problem.  I'm launching an activity called Player1 from an activity called ChooseLevel. When some button is pressed, the call is:  Intent intent = new Intent(ChooseLevel.this, Player1.class); Bundle b = new Bundle(); b.putInt("game_level", 1); intent.putExtras(b); startActivity(intent); finish();   The logs show that the error is in: Player1.onCreate(Player1.java:50)  The code in line Player1:50 is:     @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_player1);      changeIndex = 0;     cards = new ArrayList<Card>(8);     score = (TextView) findViewById(R.id.score_text);     message = (TextView) findViewById(R.id.msg_text);     timer = (TextView) findViewById(R.id.timer);     timer.setText(String.valueOf(definitions.TIMER_START)); # LINE 50      Bundle b = getIntent().getExtras();      ...  }   When this launching code runs, I get this in my logs:  33:04.338 18302-18302/com... D/AndroidRuntime: Shutting down VM 01-18 10:33:04.338 18302-18302/com... E/AndroidRuntime: FATAL EXCEPTION: main            Process: com..., PID: 18302 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.../com....Player1}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference         at com....Player1.onCreate(Player1.java:50)     EDIT:   I found my answer, it had to do with some object that I had in my Player1.onCreate() method. In a wierd way, android-studio raised the exception regarding getClass(). If someone knows why this happend, please share :)


Your motivation and expertise already (make/makes) you a great asset to our team and we can’t wait to see you become a leader in this company.


The problem: How many minimum number of integers must be selected from the set $\{1, 2, 3, 4,\dots,99, 100\}$ to ensure that there are at least two integers in the selection such that one divides the other. My sloppy thinking: If we select $25$ primes, none of them of course will divide the other. If, however, we choose a $26^{th}$ number, it must divide some or the other. So the answer is 26. The actual answer, however was 51. Hints?


On the Collatz Conjecture with odd multiplier of five and with the starting value, n_0 = 7.

In the Collatz Conjecture,  if the odd multiplier is changed from three to five,  what is the outcome for a starting value of seven? Does the Collatz sequence converge to one or diverge? (Reference link:)  We know that division by 2 or by 4 occurs 75% of all possible divisions in the Collatz process according to the Law of Large Numbers ...  That leaves at most 25% of all possible divisions by 2^k > 4.  That fact explains the divergent tendency of the Collatz sequence starting at 7 with an odd multiplier equal to 5.  However, there is an extremely unlikely possibility that the Collatz sequence could converge to one if 5n + 1 = 2^k  for an extreme value of n.  I strongly believe this problem is undecidable!  Mathematica 11 Code for Collatz Processing: f[l_]:=( n = l;i=0; Print[n]; While[n>1,n = 5n +1; x = n; While[ EvenQ[x],x = x/2]; n=x; Print[n]; i = i + 1; ]; Return[i] );  f[7] = ?  (Undecidable)  {7, 9, 23 , 29, 73, 183, 229, 573, 1433, 3583, 4479, 5599, 6999, 8749, 21873, 54683, 34177, 85443, 26701, 66753, 166883, 52151, 65189, 162973, 407433, 1018583, 1273229, 3183073, 7957683, 310847, 388559, 485699, 151781, 379453, 948633, 2371583, 2964479, 3705599, 4631999, 5789999, 7237499, 4523437, 11308593, 28271483, 17669677, 44174193, 110435483, 69022177, 172555443, 6740447, 8425559, 10531949, 26329873, 65824683, 41140427, 25712767, 32140959, 40176199, 50220249, 125550623, 156938279, 196172849, 490432123, 306520077, …}  The 2280th odd integer > 10^200.


Post Tax 401k or Taxable Brokerage Account?

I max out my pre-tax 401k, HSA, and do a roth IRA or backdoor Roth IRA.   With my additional savings is there any reason i would want to do a post-tax 401k instead of keeping it in a regular taxable brokerage account? Right now I have always been doing a brokerage account because I never considered the after-tax 401k.   Pros of post-tax 401k (after Tax EE deferrals)  - capital gains deferred  - dividends tax-deferred  Pros of Brokerage account.  - I can withdraw the money to invest in buy & hold real estate or other asset classes  - It can be withdrawn without penalties (but with taxes) for expenses outside of what an emergency fund would cover.   definitions per fidelity   AFTER TAX EE DEFERRALS The amount you can contribute to a retirement savings plan, using a portion of your salary that has already been included in your taxable income. Income taxes have already been calculated on the amount contributed. However, any earnings on these contributions can grow tax-deferred. Income taxes are not due on any earnings until they are withdrawn from the plan.  Your company may match all or a portion of your after-tax contributions in order to provide them with the most flexibility regarding taxes. (It may be advantageous for some people to pay taxes on the contributions now, because they would be in a higher tax bracket during retirement).


Java NullPointerException when accessing value from extended parent class

abstract class Library {   private String day;   public String getDay()   {     return day;   }   public void setDay(String oo){       day = oo;    }    public abstract String setDate(); }  class Books extends Library {   public String setDate() {     DateTimeFormatter formatter = DateTimeFormatter.ofPattern("d-MMM-yyyy");      String dat = this.getDay();     LocalDate localDate = LocalDate.parse(dat, formatter);      LocalDate when = localDate.plusDays(7);      String waitString = when.format(formatter);     return waitString;    } }  class Main {    public static void main(String[] args) {    for (int i=0; i<10; i++){         System.out.println(rent[i].getDay() + rent[i].setDate());    } }   Java gives me an Exception in thread "main" java.lang.NullPointerException from String dat = this.getDay();, but when I change it to like String dat = 23-Mar-2019it works fine. It seems like java is not responding to "this.getDay()" from the extended class, but I do not know how to fix this.


Does the limit $\lim_{(x,y)\to (0,0)} \frac{x^3y^2}{x^6+y^4}$ exists?

I was trying to find if the the following limit exists: $$ \lim_{(x,y)\to (0,0)} \frac{x^3y^2}{x^6+y^4} $$ From  I tried to switch to polar coordinates: $$ \frac{x^3y^2}{x^6+y^4}=\frac{r^3\cos^3\theta\cdot r^2\sin^2\theta}{r^6\cos^6\theta+r^4\sin^4\theta}=\frac{r\cos^3\theta\sin^2\theta}{r^2\cos^6\theta+\sin^4\theta}\to 0 $$ But apparently this limit does not exists (proved it in another way). Why this method worked for the limit in that topic and here it didn't work?


The difference between the superlative with "the" and without "the"

My house is the tallest in my town.   My house is tallest in my town.      Are these two sentences the same or different in meaning?


I have a 250GB HDD with a partition for Windows 10. I am currently trying to install Ubuntu on the unused partition.How can this be achieved?


How do I get iperf on a Ubuntu 13.10 Live disc?

I have Ubuntu 13.10 running from a live DVD disc. Unfortunately it does not include the iperf tool, so it will need to be added separately. I already tried the command below.  apt-get install iperf   It returns an error. I think it has something to do with sources.  root@ubuntu:/# apt-get install iperf Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package iperf root@ubuntu:/#   By using pico /etc/apt/sources.list this is what I get.  deb cdrom:[Ubuntu 13.10 _Saucy Salamander_ - Release amd64 (20131016.1)]/ saucy main restricted deb http://archive.ubuntu.com/ubuntu/ saucy main restricted deb http://security.ubuntu.com/ubuntu/ saucy-security main restricted deb http://archive.ubuntu.com/ubuntu/ saucy-updates main restricted   I see there's a "cdrom" entry in there. Is it looking for iperf on the DVD and when it fails to find it returns that error? What about those URLs listed below it, is it ever looking for iperf in those locations?  Do I have to do something about the sources file to fix this? Or is this caused by something else?  I found some  on how to manually compile and install iperf. But that failed at the step where I'm supposed to run make install clean and iperf is still not installed.  The whole purpose of using the Ubuntu live disc is to run iperf. So I need this thing up and running. Please advise, what do I need to do?  Update 1 - Adding the "Universe" repository  As suggested, I tried adding the Universe repository. But that didn't work.  I know the solution I listed as my own answer works. But I wanted an easier way to do this so I rebooted and issued the following commands.  ubuntu@ubuntu:~$ pico /etc/apt/sources.list ubuntu@ubuntu:~$ sudo pico /etc/apt/sources.list ubuntu@ubuntu:~$ pico /etc/apt/sources.list ubuntu@ubuntu:~$ sudo apt-get update E: Type 'http://archive.ubuntu.com/ubuntu/raring/universe' is not known on line 5 in source list /etc/apt/sources.list E: The list of sources could not be read. ubuntu@ubuntu:~$    I used the pico editor and added the following line at the end of the file.  http://archive.ubuntu.com/ubuntu/raring/universe amd64 Packages   I couldn't write it out at first, because of permissions. So I had to use sudo and this is what it looks like now.  deb cdrom:[Ubuntu 13.10 _Saucy Salamander_ - Release amd64 (20131016.1)]/ saucy$ deb http://archive.ubuntu.com/ubuntu/ saucy main restricted deb http://security.ubuntu.com/ubuntu/ saucy-security main restricted deb http://archive.ubuntu.com/ubuntu/ saucy-updates main restricted http://archive.ubuntu.com/ubuntu/raring/universe amd64 Packages   Do I need the extra space in front of "raring"? And do I need to begin the line "deb"? It was not specified in the instruction.


java.lang.NullPointerException when trying to add elements to a circular linked list

I'm trying to add an element to the circular linked list but it throws NullPointerException whenever I try to access the node. Here's my code: EDIT: I already read the post explaining NullPointerExceptions but nothing worked.  public class CircularLinkedList<T> { static private class Node<T> {     public T data;     public Node<T> next;      Node(T data, Node<T> next) {         this.data = data;         this.next = next;     } }  private Node<T> first;  public void addFirst(T x){     if (first.data.equals(null)){         first.data = x;         first.next = first;     }else{         Node<T> second = first;         first.data = x;         first.next = second;     } }   EDIT: I already initialized the Node with private Node<T> first = new Node(null, null);, keeps throwing the error. Also compared with first.data == null, now it terminates the process.  EDIT:Here's the full code:  public class CircularLinkedList<T> {     static private class Node<T> {         public T data;         public Node<T> next;          Node(T data, Node<T> next) {             this.data = data;             this.next = next;         }     }      private Node<T> first = new Node(null, null);      public void addFirst(T x){         if (first.data == null){             first.data = x;             first.next = first;         }else{             Node<T> second = first;             first = new Node(x, second);         }     }      public void print() {         while (first.data == null) {             System.out.println(first.data);             first = first.next;         }     }      public static void main(String[] args) {         CircularLinkedList<String> lst = new CircularLinkedList<String>();         lst.addFirst("Z");         lst.addFirst("A");         lst.addFirst("B");         lst.print();     } }


How can I extract volume and surface information from objects?   I create an objects (e.g. a monkey). With a Python command how do I extract an object's information like: volume, surface, location etc.?


I live in a country where nutritional yeast is not readily available. I'd like to make it. Anyone know how?  Other forms of yeast, such as baking yeast and brewer's yeast are easily found here. I understand these yeasts are essentially the same organism (Saccharomyces cerevisiae?), so I'm wondering if I can't combine yeast—instant baking yeast for example—with some kind of nutritional base like sugar water, let it ferment, dry it out, and "harvest" it.


Inconsistent map exporting using the composer tool in QGIS

I am using QGIS Desktop 2.8.5 on a windows machine and I am using the composer tool to create images with a scalebar and legend. The following is a screenshot of the my working environment:     The image above appears exactly how I would like.  Now, when I export as a PDF, the resulting image is:    And when I export as an image (tiff, jpg, png), the resulting image is similar (my reputation is <10 so I cannot upload a third image).  In both cases, the exported image is distorted from the original. I've tried to export the image several times and the amount of distortion varies each time. I have also tried to use a different computer (also Windows with 2.8.5) and I get the same results.   Why is this happening and how can I remedy it?


Why does my bigification inside a block quote show during preview but self-destruct when I accept changes?

When I block quote a bit of a post that contains a Big Title generated by **Big Title** --  It shows as big while am previewing the post during edit. But as soon as I click Save Changes the appearance changes and the bigification disappears. Similar behavior when the ** marks are removed. Is this (what I feel to be) unexpected behavior by design? From :


What's the meaning of "complexity" - how do I calculate it?

As the title say: I don't know the meaning of "complexity"  When I visit a web page of sonar result I would very much want to know how to calculate it.


LightRoom 5 Export looks different to the Develop screen

I hope that someone might be able to help me here, I have recently started with DSLR photography and I jumped straight in at the deep-end I think (although i've used compacts and bridge cameras for a few years prior). I am using Lightroom 5 to developer my RAW files, I make them look how I like them in LR however when I export the image changes completely, can anyone advise why this may be and what I can do to change this?


Can't update because the word prox* is blocked

I live in Ethiopia and the government blocks all urls with the word "proxy" in them. I couldn't use that word in the title above because that would make the url contain the word proxy.   When I apt-get upgrade I get errors because some packages like libproxy1, libproxy1-plugin-gsettings, libproxy1-plugin-networkmanager, python-libproxy all contain the p word.  Therefore, it is all blocked. I tried putting the urls into proxy sites, but they all just returned to their home page.   Are there any other solutions?


1) Custom Post Type named "Buying_Locations"  2) Each Post has three meta values of: State, City, Store Name  QUESTION:  How can you show a list of these posts sorted alphabetically by State, then City and then the Store Name? For example...  STATE 1   CITY 1   STORE NAME STORE NAME STORE NAME  CITY 2   STORE NAME STORE NAME STORE NAME  CITY 3   STORE NAME STORE NAME STORE NAME    STATE 2   CITY 1   STORE NAME STORE NAME STORE NAME  CITY 2   STORE NAME STORE NAME STORE NAME    STATE 3   CITY 1   STORE NAME STORE NAME  CITY 2   STORE NAME STORE NAME STORE NAME  CITY 3   STORE NAME    I've gotten a little further with this:   $mypost = array(  'post_type' => 'buy_locations',  'posts_per_page' => -1,  'meta_key' => 'store_city',  'orderby' => 'meta_value title',  'order' => 'ASC'  );  $loop = new WP_Query( $mypost );    Just need to figure out how to sort by the State first, then the city, then title.   Not sure how to add the extra "meta_key" value.  How do I add the 3rd sorting request?   $mypost = array(      'post_type' => 'buy_locations',      'posts_per_page' => -1,      'meta_key1' => 'store_state',      'meta_key2' => 'store_city',      'orderby' => 'meta_value1 meta_value2 title',      'order' => 'ASC'      );


I have a new hat... but it's not clear why. And the description needs some help     post a message in chat within ±12 hours of the UTC New Year’s begin that gets starred   "New Year's begin"? Did you mean      within ±12 hours of the start of UTC New Year’s Day   And it's Dec 8 to boot. I think we're well outside 12 hours of UTC New Year's


How to detect if browser is Internet Explorer or Microsoft Edge and if so, redirect it too another website?

I am new to this so please go easy - I need to redirect a website because the video background I'm using won't play on Internet Explorer or Microsoft Edge. So I'm hoping to redirect it elsewhere. Could anyone with more knowledge than me write this in Javascript for me? I would be really appreciative.


Problem:     Let $a, b, c, d, e, f$ be nonnegative real numbers such that $a^2 + b^2 + c^2 + d^2 + e^2 + f^2 = 6$ and $ab + cd + ef = 3$. What is the maximum value of $a+b+c+d+e+f$?   How would I do this? Would we need to use Cauchy-Schwarz or any of those types of inequalities?  Edit: My question is different from the possible duplicate because the answers on that question are based on Lagrangian multipliers and mine is based on Cauchy-Schwarz


Problem with creating edge rings on a model

I always mess up my model in blender. At some point I manually add vertices on edges with subdivide and then I connect them with J, and sometimes I have to fill faces with F.   As you can see my model is a little bit messed up and this happens all the time. And I can't properly use the loop cut tool anymore. Any idea how to fix this? Update: Here is the blend.file


What's the best way to check if a String represents an integer in Java?

I normally use the following idiom to check if a String can be converted to an integer.  public boolean isInteger( String input ) {     try {         Integer.parseInt( input );         return true;     }     catch( Exception e ) {         return false;     } }   Is it just me, or does this seem a bit hackish?  What's a better way?    See my answer (with benchmarks, based on the  by ) to see why I've reversed my position and accepted  to this problem.  I think this original code will be used by most people because it's quicker to implement, and more maintainable, but it's orders of magnitude slower when non-integer data is provided.


Why did Harry get in trouble for performing magic “in front of a Muggle“ when Dudley knew about magic?

So in Harry Potter and the Order of Phoenix, Harry gets in trouble for use his patronus. He was charged with performing underage magic inform of a Muggle. But that Muggle, Dudley, knew about magic.   Hogwarts even broke this rule when they sent hundreds of letters to Harry in the philosophers stone, and that was when Dudley knew nothing about magic.   (Just want to add I know this ended up a plot by Umbridge to get Harry kicked out of school, or killed,  but the use of improper magic department wouldn’t have been in on it.)


The following output surprised me:  1.1 + 2.2 => 3.3000000000000003   An unexpected small digit came up from the sum. The same does not happen for other addends, e.g.:  3.0 + 0.3 => 3.3   I tried both in Python 2.7 and in 3.4, but the result is the same. What is the reason for this unexpected result of the sum?


I'm writing a command for a customised enchantment that teleports a player holding a certain item to the direction that it's facing. However, according to my knowledge, there's no statistic in /scoreboard that could simply detect a player's left-click. The scores that I've though about include damage_dealt that detects whether a player causes damage. However, I don't actually need the player to cause damage to activate the teleporting, so this may not work because the player can click without causing damage also thought about the ITEM_USE score, but this does not include left-click either, only right click. Anyone could tell me how to detect the player's left-click please? Thank you!


What is this style of graphic called and is there any guide for how to create it

You see this style of graphic usually as a background in a banner or similar.  I'm interested to know if anyone know if there's an established term for graphics in this style (like "irregular matrix" or who knows), and also if you know how to create them fairly easily (preferably using Sketch 3, but CC tools would do as well).


How can i call the selenium webdriver when we build the project in azure DevOps with the windows hosted Agents

I'm trying to build a maven project in Azure DevOps used the VS2017 windows hosted agent but it fails cause it could find the selenium webdriver  here's my code when I run it on local   System.setProperty("webdrive.firefox.drive", "C:\\Users\\hkefi-ext\\Desktop\\Webdriver\\Chrome\\geckodriver.exe");  WebDriver driver = new FirefoxDriver();  driver.get("Website URL");   I tried to upload the exe in the Project repo in azure and call it but it fails  I found this "The paths to the folders containing these drivers can be obtained from the environment variables named IEWebDriver (Internet Explorer), ChromeWebDriver (Google Chrome), and GeckoWebDriver (Firefox)." in microsoft document but I couldn't find a way to the path of these webdrivers


Can't make Windows 7 computer wake up from sleep on schedule

I am currently trying to automatically wake up my PC early in the morning after I put it to sleep at night. I have created a task via Windows task scheduler (enabling it to wake up the PC) but it's not working at all and I have to wake up the PC manually and it's not even showing up as a wake timer.    In the above album are my task settings and current power plan's wake timers settings. Is there anything else I should check?


Is there an irreducible polynomial which cannot be judged by Eisenstein criterion

We know sometimes if we cannot use Eisenstein criterion directly to prove a polynomial $f(x)\in \mathbb{Z}[x]$ is irreducible,we can take $f(x+1)$ to use the criterion.  So I wonder can all irreducible $f[x]\in \mathbb{Z}[x]$ be judged with Eisenstein criterion at least after such a kind of translation?


How can I change an attribute of an element in an XML file, using C#?


When I try to run the smoke simulator in Blender 2.62 I get no smoke at all. When I attempt to render, the only output is a black screen. What am I doing wrong here that is making the smoke simulation not render?  Is it a mistake I made, or a problem with Blender version 2.62?


Adding space around section title for in-register in KOMA-script context

I saw recepts from answers on  , and can I do this without titlesec, only with KOMA tools, f.e. via   \RedeclareSectionCommand[afterskip=<amount>,beforeskip=<amount>]{section} ? titlesec is fine, but it redefine some KOMA's features.    My MWE:  \documentclass{scrbook}  \usepackage{blindtext} \usepackage{atbegshi,picture,xcolor} %\usepackage{gridset}  % baseline grid \newcommand{\printbaselines}{%     \AtBeginShipout{%         \AtBeginShipoutUpperLeft{%             \color{red}%             \put(\dimexpr 1in+\oddsidemargin,             -\dimexpr 1in+\topmargin+\headheight+\headsep+\topskip)%             {%                 \vtop to\dimexpr\vsize+\baselineskip{                     \hrule                     \leaders\vbox to\baselineskip{\hrule width\hsize\vfill}\vfill                 }%             }%         }%     }% }%  \printbaselines  \begin{document}  \chapter{First} \section{Lorem I} \Blindtext[1] \section{Lorem II} \Blindtext[1] \section{Lorem III} \Blindtext[1]  \end{document}   I try set     \RedeclareSectionCommand[     beforeskip=-2\baselineskip,     afterskip=1\baselineskip]{section}       but it work only for first paragraph (and without \chapter), - on second paragraph syncing is lost.     I try use \vskipnextgrid from gridset after  \section but it not work with \chapter on some page with \section.     It is possible? (pdflatex)


Rendering fire animations with transparent background

I'm creating a simple fireball sprite for my game and I want to render a fire animation.  I would like to get the upper images with transparent background, but when is set the transparency on under Render -> Film one of my frames will look like lower pictures.  You can see the difference of these two images.


Distorted circles in axis environment with TikZ

With a fresh installation of TeX Live (updated just before writing this post), circles in axis environments are distorted. Consider the following MWE:  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.16}  \begin{document}  \begin{tikzpicture} \begin{axis}[   ymin=-3, ymax=3,   xmin=-3, xmax=3 ]  \draw (1,0) circle [radius=1.5]; \fill (1,0) circle [radius=1];  \end{axis} \end{tikzpicture}  \end{document}   The output looks like this:   Obviously, the circles aren't even circles. I haven't encountered this problem before. Did I do anything wrong while setting up my new system?  EDIT: It's not an issue of using axis equal or not since the axes are scaled more or less equally already. Instead, the circles appear as rotated ellipses that are strongly stretched out in one dimension.  EDIT 2: Here's the output of \listfiles:  article.cls    2019/12/20 v1.4l Standard LaTeX document class   size10.clo    2019/12/20 v1.4l Standard LaTeX file (size option) pgfplots.sty    2018/03/28 v1.16 Data Visualization (1.16) graphicx.sty    2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)   keyval.sty    2014/10/28 v1.15 key=value parser (DPC) graphics.sty    2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)     trig.sty    2016/01/03 v1.10 sin cos tan (DPC) graphics.cfg    2016/06/04 v1.11 sample graphics configuration   pdftex.def    2018/01/08 v1.0l Graphics/color driver for pdftex     tikz.sty    2020/01/08 v3.1.5b (3.1.5b)      pgf.sty    2020/01/08 v3.1.5b (3.1.5b)   pgfrcs.sty    2020/01/08 v3.1.5b (3.1.5b) everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS) pgfrcs.code.tex  pgfcore.sty    2020/01/08 v3.1.5b (3.1.5b)   pgfsys.sty    2020/01/08 v3.1.5b (3.1.5b) pgfsys.code.tex pgfsyssoftpath.code.tex    2020/01/08 v3.1.5b (3.1.5b) pgfsysprotocol.code.tex    2020/01/08 v3.1.5b (3.1.5b)   xcolor.sty    2016/05/11 v2.12 LaTeX color extensions (UK)    color.cfg    2016/01/02 v1.6 sample color configuration pgfcore.code.tex pgfcomp-version-0-65.sty    2020/01/08 v3.1.5b (3.1.5b) pgfcomp-version-1-18.sty    2020/01/08 v3.1.5b (3.1.5b)   pgffor.sty    2020/01/08 v3.1.5b (3.1.5b)  pgfkeys.sty pgfkeys.code.tex  pgfmath.sty     pgfmath.code.tex pgffor.code.tex tikz.code.tex l3backend-pdfmode.def    2020-02-03 L3 backend support: PDF mode supp-pdf.mkii epstopdf-base.sty    2020-01-24 v2.11 Base part for package epstopdf epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live


Using different numbering systems/notations, "normal" decimal numeric expressions can be presented variously.  For example, my age (57) is represented in hexadecimal as "39"  However, once I'm 58, it would be "3A"  How are hex numbers pronounced? Is it proper (ethics aside) to say that (in hexadecimal) I'm "thirty-nine"? Or is it pronounced "three nine" or some other way?  And what about "3A" - would it be "thirty ten" or "three A" or...???  Of course, the same question applies to other numbering systems: octal, or one of your own derivation, etc.


Best remote desktop tool(other than teamviewer)

what is the best remote desktop tool for controlling a remote pc with ubuntu?  I am using TeamViewer and it keeps crashing all the time, I can't stand it anymore.  Thank you.


What happens to global variables declared in a DLL?

Let's say I write a DLL in C++, and declare a global object of a class with a non-trivial destructor.  Will the destructor be called when the DLL is unloaded?


Should I write IEEE membership in my CV?

Does it worth to add IEEE membership to my CV? It seems every body can pay a fee and become an IEEE member.


How to prove that $x^2 - \lfloor x\rfloor^2$ is onto?

The function's domain and codomain are nonnegative real numbers. I've given this countless attempts and I'm out of ideas on how to prove this. What is proving to be tricky to me is writing $x$ in terms of $y$ due to the floor function.


If the earth has gravity, why don't we all collapse to the center?

I'm sorry if the answer is obvious for you guys, but why don't we all (including buildings, road, people, the ground) collapse to the center of the earth because of gravity? Is it because we have velocity, just like the earth not falling to the sun (or electrons not falling to the protons)? But that analogy doesn't sound right because those involve wide empty space.


Most efficient way of launching and separating a program from the terminal?

I'm trying to launch a program from the Terminal in such a way that the following occurs:   Closing the Terminal does not close the program The program is not outputting anything to the Terminal while opening, using, or closing The Terminal is free to be used for other things The command is short and sweet There is no output file to worry about


Did user connect via AG Listener or directly to the server?

How do I tell whether a SPID connected via the AG Listener name or the server name (or its IP address)?


I just ran into a small null pointer problem. I was setting up an EditView (textInputNewWeight) for my Dialog Window. The code you see down here is a button (confirmer), which checks the editView after clicking on it. It should make a toast message that the field is empty but it crashed every time when the editView is empty and I press the confirm button (code below). But when I put a some number it works fine. I know that its gonna something easy and simple but I have been stuck with this for hours and I couldnt find an answer on how to fix this haha Thanks for any help in advance How should I write the first if statement to make it showing the toast message instead of crashing? confirmer.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                  if (textInputNewWeight == null){                     Toast.makeText(getContext(), "The field cannot be empty.", Toast.LENGTH_SHORT).show();                 } else {                     int weightNumberInput = Integer.parseInt(textInputNewWeight.getEditText().getText().toString().trim());                      if (weightNumberInput > 0 && weightNumberInput < 100){ //1 - 99                         confirmInput(1);                         dismiss();                     }                     else if (weightNumberInput > 99 && weightNumberInput < 1000){ //100-999                         confirmInput(2);                         dismiss();                     } else {                         Toast.makeText(getContext(), "The number was set incorrectly.", Toast.LENGTH_SHORT).show();                     }                  }               }         });


What can you say about a continuous function that is zero at all integer values?

Written with .      Let $f: \Bbb R \to \Bbb R $ be a continuous function such that $f(i) = 0 \ for \ all \ i \in \Bbb Z$. Then which of the following is true : -          A. Image(f) is closed in $\Bbb R$     B. Image(f) is open in $\Bbb R$     C. f is uniformly continuous     D. None of the above   For the correct option, look at the end of the question.     I tried to contradict the options by bringing examples(It was obviously the first step considering 'None of the above was' an option)      I wasn't able to think of a single function that contradicts either of the options. However, graphically I would say that these functions satisfy the hypothesis and contradict the options (Image uploaded)  Here's what the functions are   1) Just like $sin x,$ the function touches 1 and -1. The major difference would be that this function touches the x-axis at all integral values and no where else.  2) The second graph touches the integers and zero and in each interval $(m,m+1)$, the graph's maximum and minimum value tend to increase slightly and they tend to +1 and -1 as $x \to \infty$ Thus, the function gets arbitrarily close to 1 and -1 without touching them.    3) The third graph is just like $x Sin(x)$. The difference is that this one touches the x-axis at integer values. With each interval $(m,m+1)$, our graph has its 'magnitude of difference' increasing.    Are my graphs correct? If they, can they explicitly be expressed as familiar functions? If not, which explicitly express-able  examples can be used to contradict the first three options?  The correct answer is D    Source - Tata Institute of Fundamental Research Graduate Studies Exam 2016


Showing that a topological space is ${\rm T}_1$

Let $X$ be a topological space and let $\Delta = \{(x,x) : x\in X \}$ be the diagonal of $X\times X$ (with the product topology).     I was asked to prove that $X$ is ${\rm T}_1$ if and only if $\Delta$ can be written as intersection of open subsets of $X\times X$.   I think is better (maybe easier) to use the well-known result "$X$ is ${\rm T}_1$ if and only if $\{x\}$ is a closed set $\forall x\in X$".  What I've done:  Assuming that $X$ is ${\rm T}_1$, let $Y=(X\times X) \setminus\Delta$ and note that (trivially) $$Y = \bigcup_{y\in Y} \{y\}.$$ Then $$\Delta = (X\times X) \setminus Y = (X\times X) \setminus \left(\bigcup_{y\in Y} \{y\} \right) = \bigcap_{y\in Y} (X\times X)\setminus \{y\},$$ where $(X\times X)\setminus\{y\}$ is open since each $\{y\}$ is closed.  The other direction seems be a bit harder, I've tried unsuccessfully. Any ideas?  Thanks in advance.


Babel's automatic spacing seems to disappear in \href when the target is an URL

Babel provides automatic spacing around some characters for French, but hyperref's \href command seems to mess that up in certain particular contexts. See this example:  \documentclass{minimal}  \usepackage[french]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage{hyperref}  \begin{document}  a: b; c?  \href{target}{a: b; c?}  \href{http://a.b}{a: b; c?}  \end{document}     Interestingly enough, the problem does not seem to occur when the target is not an URL, but that does not help me much…  Any idea how to prevent this? Adding \, and ~ manually in each link is rather annoying. Thanks!


Is $ (((\sqrt{2})^ \sqrt{2})^ \sqrt{2})^{\cdots} $ an irrational number?

It is well known that $ \sqrt{2} $ is an irrational number. Is there someone who can show me if this number: $$ \left(\left(\left(\sqrt{2}\right)^ \sqrt{2}\right)^ \sqrt{2}\right)^{\cdots}   $$   is irrational?  Thank you for any help.


I'm running Ubuntu 10.10 on my laptop using an external monitor. The monitor is connected by a HDMI cable. The external monitor does not have boxes, it does have an audio exit for a headphone/.. .   Now when I plug in my external monitor, I want to keep using my laptops boxes. Now it automatically sends the sound through the HDMI port instead.   I can easily change the appropriate settings in the sound configuration menu: I go to hardware and can select the device I want to use: Analog Surround 4.0 Output, instead of the HDMI one. This works and I can hear sound through my laptop boxes.  But I have to change this setting every time again when I plug in my external monitor, when I wake my laptop from the suspended state, etc.  How can I make this the default setting, without having to reset it all the time?  Thanks!


Which one is correct "Can I please call in few minutes" or "May I please call in few minutes"?

While having this conversation with my manager, my manager wanted to discuss few things with me. So since I was busy with another project which one is appropriate to use? "Can I please call in few minutes" or "May I please call in few minutes"?


I have read that $coproc < command > is different from $< command > & in that coproc will execute command in a sub-shell process.  But when I tested it, it worked just like $< command > &. The test is as follow:  First: test the behavior of $< command > &.   Run $nano & on tty1 On another tty, output from $ps -t tty1 --forest indicates nano process is child process of the -bash process (login bash shell process -> no sub-shell process was created)   Second: test the behavior of $coproc < command >   Run $coproc nano on tty1 On another tty, output from $ps -t tty1 --forest is the same as above (no sub-shell process was created)   So is $coproc < command > simply the same as $< command > &?  The shell used was a bash shell


How can I block access to my Windows partition from Ubuntu?

I have a dual boot setup with Ubuntu and Wiindows. I can see Windows partitions from Ubuntu. How can I remove access permission for these partitions?


If you finish a short rest while Wild Shaped, do you get both uses of Wild Shape back?

Let's say you're a level 8 druid, so you have 4 hours per use of Wildshape. Now, at 11:00, you expend one use of it to turn yourself into a Raven (or any other beast). From 12:00 to 13:00, you take a rest, while still being in your raven form ().  Obviously, you can stay in raven form until 15:00, at which point you revert to your regular form.  Then, from 13:00 to 15:00, you are in raven form. The PHB states on Wildshape:     You can use this feature twice. You regain expended uses when you finish a short or long rest.   You just finished a short rest, meaning you would still be transformed and get both uses back (assuming you expend your use of Wildshape when you transform, not when you end it, which would make this question irrelevant). This might not be a balancing issue if you're a CR0 raven, but it might very well be relevant for other Wildshapes.  Hence my question:  If you finish a short rest while Wildshaped, do you get both uses back and can therefore "overstock" your total maximum Wildshape time per rest?  Or would you simply auto-expend one use, and reset the timer on that use?


Here is my code:  public class Main extends JFrame{  static int NoOfUsers; static String[][] Accounts = new String[NoOfUsers][2];  public static void main(String[] args){     Login(); }  private static void Login() {     final String FileName = "F:/TextFiles/loginaccs.txt";     try {         BufferedReader file = new BufferedReader(new InputStreamReader(new FileInputStream(FileName)));         int NoOfUsersL = Integer.parseInt(file.readLine());         String[][] Accounts = new String[NoOfUsersL][2];         NoOfUsers = NoOfUsersL;         for (int i=0; i<NoOfUsersL; i++) {             Accounts[i][0] = file.readLine();             Accounts[i][1] = file.readLine();         }         for (int i=0; i<NoOfUsersL; i++) {             System.out.println(Accounts[i][0]);             System.out.println(Accounts[i][1]);         }         file.close();      } catch (IOException e) {         System.out.println("ERROR: unable to read file.");         e.printStackTrace();        }          String username = null;     String password = null;     JTextField usernamejtf = new JTextField(username);     JPasswordField passwordjtf = new JPasswordField(password);     String[] buttons = {"Login", "Create new account"};     Object[] InputDialog = {             "Username: ", usernamejtf, "Password: ", passwordjtf     };      do {      int option = JOptionPane.showOptionDialog(null,              InputDialog,              "Login",              JOptionPane.DEFAULT_OPTION,              JOptionPane.PLAIN_MESSAGE,              null,              buttons,              buttons[0]);     System.out.println(option); //Check      if (option == JOptionPane.CLOSED_OPTION ) {         return;     }     else if (option == 0) {         if (CheckAccount(username,password)) {             System.out.println("Logged in");         } else {             System.out.println("Wrong Password/Username");         }     } else if (option == 1) {         System.out.println("Create Account.");         }      } while (!(CheckAccount(username,password))); }   private static boolean CheckAccount(String username, String password) {     for (int i=0; i>NoOfUsers; i++) {         if ((username == Accounts[i][0]) && (password == Accounts[i][1])) {             return true;          }     }     return false; }   }  In "main", I called the Login() method, and Eclipse is forcing me to put the word "static" in front of the method name. Is there anyway I can modify the program so that the line can be written as:  private void Login() {...}; private boolean CheckAccount(...) {...} etc.?  [Extra question:  Because of the word "static", I can't put something like the word "public" before String[][] Accounts = new String[NoOfUsersL][2]; Which makes the Accounts array can't be accessed by CheckAccount. How can I modify the program to fix this problem as well.] Thx everyone in advance.


How is consensus determined on Meta sites?

On our main sites "the best answer" is  as the superposition of the highest voted answer and the accepted answer.  Truth be told, the system is rather insistent on allowing multiple "right answers" and that's one of its strengths: you can be the judge of who you believe. But that doesn't always translate well on the per-site metas, which serve as a sort of policy-creation body.  People who are active on meta help decide how policies are enforced on the main site.  Moderators who have ♦-powers tend to take mandates on meta very seriously.  , accepted answers to meta-questions are no different than any other answer.  Does that leave just votes to determine consensus? Closely related: Not everyone participates on meta-sites.  It can be hard to tell if enough people have looked and voted on questions for real consensus to be declared.  Size of the site determines how many people could be voting on questions.  What counts as a quorum? Finally, sometimes people change their minds about a meta-question, but, , it's not really possible to change one's mind without a pointless edit to someone else's answer.  When should meta-questions be revisited?  On graduated sites, ♦ moderators are elected, which makes them representatives of the active participants, but on beta sites, we are appointed.  It's doubly pressing for beta sites to determine "the will of the people" since part of the point of a beta is to get a working policy framework in place before electing permanent moderators. I'm interested in figuring out how sites already answer these questions and what might be done network-wide to make discovering consensus a little bit easier.  N.B.: Obviously this assumes that consensus matters.  It does to me when I'm making my decisions and I suspect it matters to others.  But that isn't to say that it always makes a difference.  I'm really not interested in answers that hope to use this question as a grindstone for all the axes stored up against certain people who have made unpopular decisions and have the power to make those decisions stick.  Feel free to ask your own question(s).  (Thank you.)


"She need not worry" or "she needs to not worry"?

I just came across this weird use of "need not" on :  Madam/sir, My daughter is stuck in Uk . She has lost her  . She is difficult to return back India home [sic]. Please help  In response,  says:  She need not worry. She should stay where she is. Just tell her to keep herself safe. Please delete your tweet.  Shouldn't it be "she doesn't need to worry" or "she needs to not worry" given that the subject is "she" (singular)? Or is this some kind of grammatical construction I don't know? I believe who wrote it was a native speaker of English and they might be correct. Can someone explain this please?


How can I disable my internet connection from terminal?

The connect automatically option is allowed for my wired Wired connection 1. Disconnecting the connection works when I do it from the panel's Network > Disconnect menu. But when I do that with command:  nmcli con down id "Wired connection 1"   no sooner than it disconnects, the connection is back on.  How does Network > Disconnect work? Could we do the same with nmcli without disabling the automatic connection?  Note:   nmcli con down id "Wired connection 1" works as with automatic connection disabled (but again that's not an option), I don't want to use sudo (wouldn't be good to implement in a script!).


How to cheat and avoid cheating in Flash games?

I'm writing a small online flash game that keeps high scores of players. Obviously I'd like to keep the players from cheating and getting an arbitrarily high score.   What are the most common methods for cheating in flash games and what can I do to make it hard to use them?


Induction proof of $\sum_{k=1}^{n} \binom n k = 2^n -1 $

Prove by induction: $$\sum_{k=1}^{n} \binom n k = 2^n -1 $$ for all $n\in \mathbb{N}$.   Today I wrote calculus exam, I had this problem given.  I have the feeling that I will get $0$ points for my solution, because I did this:   Base Case: $n=1$ $$\sum_{k=1}^{1} \binom 1 1 = 1 =  2^1 -1 .$$  Induction Hypothesis: for all $n \in \mathbb{N}$: $$\sum_{k=1}^{n} \binom n k = 2^n -1 $$  Induction Step: $n \rightarrow n+1$ $$\sum_{k=1}^{n+1} \binom {n+1} {k} = \sum_{k=1}^{n} \binom {n+1} {k} + \binom{n+1}{n+1} = 2^{n+1} -1$$  Please show me my mistake because next time is my last chance in this class.


//Testing Function function testEqual(test, expect, got){   console.log(`Testing ${test}`);   if (expect === got){     console.log(`${test} has passed`);     return true;   } else {     console.log(`${test} has failed, expected ${expect} but got ${got}`);     return false;   } }  //Run the tests let passed = 0; let tests = {   "temperatureCtoF":[75, temperatureCtoF(24)],   "temperatureInF Part 1":["88F", temperatureInF(88, 'F')],   "temperatureInF Part 2":["75F", temperatureInF(24, 'C')],   "makePersonObject": [{"id": 5, "name": 'Leia', "email": 'leia@leia.com'}, makePersonObject(5, "red", "leia@leia.com")], } console.log(tests["makePersonObject"]);  console.log(testEqual("makePersonObject", tests["makePersonObject"][0],tests["makePersonObject"][1]));   On the above code, I created a testEquals function and a bunch of tests, for the final test, I get the output "Testing makePersonObject index.js:212 makePersonObject has failed, expected [object Object] but got [object Object]" and I can't seem to figure out how to compare them correctly, I tried using === and .value in my test function but that didn't work.


What does a new Ubuntu user need to know about installing on an Acer Aspire a515-51g?

I am new to Linux based systems. My laptop hardware is i5-8250u 8gb ddr4 RAM MX150 ddr5 2gb GPU 1TB hdd.   I would like to know if Ubuntu 16.04 LTS will work fine on this setup.  Also, the seller installed Windows 10 on it. I think he fiddled with the BIOS and I used MBR partition for UEFI while writing the USB image for Ubuntu. Do I need to change anything in the BIOS before installing on it?


Just want to verify about Pax and grsecurity in ubuntu

I want to know whether latest ubuntu version has Pax and grsecurity patched by default or not. In other words, if I want to install Pax and grsecurity in ubuntu, do I have to implement manually? Moreover,is it a good idea to use these in ubuntu? Is it compatible?


Is it possible to invert display colors on Windows like Macs can?   I have nVidia GeForce 6200 graphics card and 17" Samsung SyncMaster display.


Can you notify @user who commented on another answer?

Will notification of @user in comment to an answer actually notify user which was commenting on another answer of the same question? The user autocompleter doesn't autocomplete the name.   I think information on this is missing in .


random number finder, generates - n must be positive. Sometimes

I’m trying to create a “secret” number finder without using a loop that counts from 1 to 10. Now what I am trying is to random out 10 numbers that if they are higher than the secret number in this case number 5 the loop will only look for number between 5 – 10 or if its lower 0-5.  Sometimes the function gives me an output that can look like this Higher: 0 Lower : 8 And then the error  Exception in thread "main" java.lang.IllegalArgumentException: n must be positive     at java.util.Random.nextInt(Unknown Source)     at test1.testvoid$TestVoidMethod.main(testvoid.java:31)   Otherwise  I can get the output  Higher : 1 The secret number is: 3   Without an error.   This is as far I get. I know this is a wot, but its hard to point out where the problem could be.   import java.util.Random;     public class testvoid {         public static class TestVoidMethod {             static int secretNumber = 3;             public static void main(String[] args) {                  Random randomGenerator = new Random();                 String result = "";                  int[] myIntArray = new int[10];                 int i = 0;                 int lastGuess = 0;                  result = checkWhichNumberThisIs(0);                   while (!result.equals("Equal"))                    {                     if(result.equals("Higher"))                     {          int randomInt = randomGenerator.nextInt(10 - (lastGuess - 1)) + lastGuess;                         lastGuess = randomInt;                         result = checkWhichNumberThisIs(randomInt);                     }                         else if(result.equals("Lower"))                     {                         int randomInt = randomGenerator.nextInt(lastGuess);                          lastGuess = randomInt;                             if(myIntArray.equals(randomInt)){                         result = checkWhichNumberThisIs(randomInt);                         }                     }                      myIntArray[i] = lastGuess;                     i++;                 }             }              public static String checkWhichNumberThisIs(int numberGuess) {                  String result = "";                  if (secretNumber < numberGuess) {                     result = "Lower";                       System.out.println("Lower " + numberGuess);                   }                   else if (secretNumber > numberGuess) {                     result = "Higher";                      System.out.println("Higher " + numberGuess);                    }                   else if (secretNumber == numberGuess) {                     result = "Equal";                      System.out.println("The secret number is: " + numberGuess);                   }                  return result;                 }             }      }


Is Canadian Visa Expert a legitimate company or a scam?

I came across these guys: Canadian Visa Expert, who claim to be able to process visas to Canada, for work or study, for a fee of $467 (four hundred and sixty-seven dollars), and to carry out some assessment tests too. They claim to be legit (which is what most scammers would say), and to be recognised by he Canadian government.  I'm not sure if these guys are scammers, or if they are genuine. Please, has anyone used their service successfully before? Or do you know of anyone who has fallen victim to their scam? I just want to be sure.  A message in their terms of use saying they're not affiliated to the Canadian government:     By visiting or using any of CanadianVisaExpert's Websites or Offered Products you acknowledge and are aware that CanadianVisaExpert is a private corporation and is not and does not pretend to be, an official organ of the Canadian Government or otherwise connected to the Canadian Government in any way whatsoever. CanadianVisaExpert is not part of the Canadian Government or immigration authorities, or a law firm. In this respect CanadianVisaExpert neither intends nor claim to provide Legal advice or solutions to an individual's specific problems."


MySQL Database User: Which Privileges are needed?

The short installation instruction for WordPress () state that:     Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and modifying it.   While setting up a new blog professionally I was wondering how that maps to what the MySQL database user privileges/permissions configuration offers me:   Data: SELECT, INSERT, UPDATE, DELETE Definition: CREATE, ALTER, DROP Extra: INDEX More:  LOCK TABLES REFERENCES CREATE TEMPORARY TABLES CREATE VIEW SHOW VIEW CREATE ROUTINE EXECUTE ALTER ROUTINE    I'm pretty sure for the first three groups, I named them Data, Definition and Extra here. But what about the others below the More entry? Normally I would say, those are not needed, but I would like to get a second opinion.


How to run a python program in one folder and import and run a python program from another folder

Good evening.  I have scriptone.py in folderone and scripttwo.py in foldertwo.   How do I tell scriptone.py to run scripttwo.py from foldertwo  If both scriptone.py and scripttwo.py are in the same folder I can run scripttwo.py with  import scripttwo   But I would really like to run scripttwo.py from foldertwo  Thankyou.


Would it be possible to make the Bounty-Dialog (to start a bounty on a question) movable.  All other Dialogs, like Flagging or Closing, are movable.  Flagging-Dialog !  Bounty-Dialog !


Proving $\lim_{x\to9}\sqrt x=3$ using Cauchy's definition

Prove: $\displaystyle\lim_{x\to9}\sqrt x=3$ using Cauchy's definition for a limit.   After doing the scratch work I get that: $\delta=\epsilon^2+6\epsilon$, so going back, I have to show that $|x-9|<\delta\Rightarrow |\sqrt x -3|<\epsilon$.  So we have: $\epsilon^2+6\epsilon-9<x<\epsilon^2+6\epsilon+9 \iff \epsilon^2+6\epsilon-9<x<(\epsilon+3)^2$ but what about the left side of the inequality? How can I simplify it to $(\epsilon-3)^2$?  Edit: if $\delta=3\epsilon$ then how can you justify the move from: $3\epsilon-9<x<3\epsilon +9$ to $\epsilon-3<\sqrt x<\epsilon +3$?


I want to conduct research on the inner part of the pumpkin seeds. I find it difficult to remove the shells one by one by hand. What is the best method for dehulling pumpkin seeds (for research purposes)?


I want to unwrap a label which has a transparent area

Well, i am new to blender so this question might be easy for some to answer. My problem, you can see on the picture. i want unwrap the label which has a transparent area (though it is not a square). The problem i have you can see. I want the transparent area to have same material as the glass. Is this possible without changing the faces? I know about baking all to single image, but i don't think the glass material would be good if i did that. Hope I can get some advice.   EDIT  I think I need attach a photo so you understand what i mean,i want to fix the edges and faces on the model so they fit the label, but how can i do ? seems like it all get distorted when i try.    i think i need attach a photo so you understand what i mean,i want to fix the edges and faces on the model so they fit the label, but how can i do ? seems like it all get distorted when i try.


I work with Blender 2.81a and I have a problem with some artifacts in the shadows of objects with smooth shading. Based on the release note of Blender 2.81 ,(), I expected this problem to be solved. There’s a note with a comparative screenshot saying: “Reduced shadow terminator artifacts for bump mapping with diffuse BSDFs.“   There’s no detail about the issue. There’s a mention about “bump mapping”. I have another scene with bump mapping and the problem is the same as in my test shown below. Here’s a screenshot of my test below.  The only solution right now is to increase of the number of polygons with a “Subdivision Surface” modifier. However that makes a crazy amount of polygons and the modifier cannot fit all situations.  Another element of solution is about the light. I noticed that happens particularly when there’s one directional light in the scene like a sun light. Increasing the “Angle” parameter creates a smoother effect. Too much of this becomes blurry and unrealistic. My screenshot shows a sun with the angle 6.4 degrees.  These artifacts only happen in Cycles. Eevee seems to be correct.  I expected this problem to be solved. However it is still present. Am I missing something?


Using PHP Variables in Javascript with JSON

<?php    $heros=array("Spiderman","Batman","Superman"); ?>  <script type="text/javascript">    var heros = <?php echo $heros;?> // I don't want to do this.    for(i=0; i<3; i++)    {         if(heros[i]=='Spiderman')       {         alert('Hey! I am Spiderman.');       }    } </script>   I want to use a php array inside javascript for loop but i don't want to reopen php tags inside <script></script> tags. How can i use php variables in javascript?


I have a layer of street segments that are within a given distance of a fire station. Now I want to make a border around these street segments. If I use Buffer, it puts a buffer around each segment. If I use Convex Hull it makes a border around the street segments but does not follow the street segments but rather cuts across them. What I really need is an outside buffer of the street segments that follows the outermost street segments.   Is it possible in QGIS?  The image below shows the problem. The lines in green represent street segments that can be reached from a given point within 4 minutes. The yellow is 6 minutes and the blue is 8 minutes from the same point.  When I put a convex hull around the green segments (shown in purple), the hull includes some of the yellow segments because a convex hull is based on the smallest polygon that contains all of the lines. I see that a concave hull is what I really need, but QGIS does not support the concave hull.


Methods of finding unknown object properties

Some of the incoming objects I handle in my projects have unknown structures; properties I cannot depend on.  I decided to try to  to help.  function getObjKeys(obj) {   var keys = [];   var regex = /"([^:,{}]+)":/g;   var str = JSON.stringify(obj);   var m;   while (m = regex.exec(str)) {     keys.push(m[1]);   }   return keys; }   My question is, is there a better way of getting all the properties of an object with unknown structure? A mini-question also is; could the regex be improved? This is assuming the object is one level deep.  I figure, after getting the keys, one could iterate through them to find other objects and therefore other keys.


A exception when I read the files inside a JAR file

I assembly my project to a jar with maven, and the there is a "data" folder contained a lot of .bat files inside the jar, the structure is:   jar---      ---data(this folder contains 1.bat,2.bat...)                ..... I used the method in , but when I run the jar in cmd, there still is the NullPointerException, I tried a lot and don't know where is the problem. my code is :  CodeSource src=ParcelLayerTree.class.getProtectionDomain().getCodeSource();     List<String> list=new ArrayList<String>();     if(src!=null){         URL jar=src.getLocation();         ZipInputStream zip=new ZipInputStream(jar.openStream());         ZipEntry zipEntry=null;          while((zipEntry=zip.getNextEntry())!=null){             String entryName=zipEntry.getName();             if(entryName.endsWith(".dat")){                 list.add(entryName);             }         }     }     if(list.size()<=0){         throw new IOException("not found the dat file");     }     for (String filePath : list) {         String fileName=fileNameSplit(filePath);         InputStream inputStream=ParcelLayerTree.class.getClassLoader().getResourceAsStream(fileName);         try (BufferedReader reader = new BufferedReader(new     InputStreamReader(inputStream))) {             int label = Integer.parseInt(fileName.split("\\.")[0]);


Understanding scope of a variable defined in global scope in python

num = 0 def func():     print(num) func()  The above function is supposed to print the value held by variable num and it works. By this, i would assume that func has access of num. But when i try to change the value of num inside the function, it gives me an error. UnboundLocalError: local variable 'num' referenced before assignment num = 0 def func():     print(num)     num += 1 func()  Why is this happening?


I have seen wine glasses being filled up with water and played as an instrument. I would like to know the physics behind how these are played. Links and explanations are much welcome. Thanks!


how to glue multiple CPUs together, I mean How openstack achieves it. What do they really mean when they say create CPU cluster using Openstack Nova. Openstack is written in Python, Any example ( Basic one ) would be appreciated.


Is “Sith Witch” a title, or a general term for female Sith?

In the story of Star Wars there have been instances where the specific Sith female was considered a "Sith Witch." However there have also been instances where the Sith female was just a Sith.  Now my question is... is "Sith Witch" an actual title bestowed upon certain Sith females that have completed some achievement, or is "Sith Witch" a general term for all Sith females?  Also any other terms and info about the title would be most helpful.


Always making a starter vs. following package description

I have noticed that the smackpacks say on the package that the package is meant for a 5 gal. batch and that you should pour the pack directly into the wort.   On the otherhand - nearly everyone tells me to always make a starter.   Is this just because making a starter never hurts or does the package contain wrong instructions?   I would have guessed that the yeast producers would tell you on the package if you should need some extra steps to get a good product.


How to prevent Google from finding my admin index page?

I am running a website but for some days i stopped it and put the under-construction page because the Index of admin page is visible to the outside world through the Google search. One of my friend told me that your websites index is visible and its one step away to access the password file and he shows me that very simply using the Google search.  How can i prevent this and i am hosting my site with a hosting company and i report about this to them but they simply replied to me still its secure so you no need to worry...  am i really don need to worry and continue my site with the visible index of admin page?