How to interface a SPST switch with minimal current (1µA)?

The usual way to wire up a SPST switch to a MCU is by means of a pull-up resistor. However, this wastes current when the switch is closed. If this switch is used to wake up the MCU from sleep, then this current (100-500 µA) is significant compared to the sleep current (< 0.1 µA). I imagine increasing the resistor value up to megaohms wouldn't be practical for a number of reasons. So is there a better way to interface a SPST in general? I have a couple of pins on the MCU to spare (but keep in mind the MCU has to be put in sleep most of the time - it should wake up and do its stuff only when the switch state changes).  The only solution that comes to my mind is to basically use the pull-up scheme, but buffer it through a P-MOSFET/N-MOSFET pair for increased input impedance.  And yes, I realize the solution is trivial if we were dealing with a SPDT or a push-button.


Using SFINAE, how to avoid 'has no member named ...'

Following on from  it gives the example of:  template<class T> std::string optionalToString(T* obj) {     if (FUNCTION_EXISTS(T->toString))         return obj->toString();     else         return "toString not defined"; }   However, if an object doesn't have, for example, a toString() function, instead of this case returning "toString not defined", even if we can detect whether or not the function exists, the compiler will still throw an error that object has no member named "toString", before highlighting the pointer toString call.  I'd like to be able to do the same operations on objects that come from C++ libraries that have different naming conventions, for example:  if(R_Contains_SetPosition<TemplateObject>::Value) { TemplateObject->SetPosition(X,Y); } else if(R_Contains_setPosition<TemplateObject>::Value) { TemplateObject->setPosition(X,Y); //TemplateObject doesn't have a setPosition defined! }   Which the code can already do, but the compiler throws an error on whichever statements that call functions that the object doesn't have defined.  Is there some way to get the compiler to accept code (either by re-writing it or modifying compiler flags, preferably the former) that has the ability to call a member function (which in this case won't be run anyway), even if the compiler knows said member function doesn't exist?  Clarification:  This isn't asking how to detect a function exists. I already have this ability., it's asking how can I write code that refers to functions that a object won't necessarily have without the compiler complaining about it?  The system is C++03, so experimental C++14 like solutions won't be valid here.


What mapping application also leaves digital Breadcrumbs?

I've moved into a new area of the city and it would be nice to feel like I've explored the area properly. I'd like to be able to say that I've walked down every street within, say a mile.  I'm looking for an app that might help me track any I've missed.   Esentially I want an app that overlays a gps breadcrumb over where I've been walking. Googling for this hasn't got me very far because there is a app called 'breadcrumb' that let's uses mark about eight locations they want to come back to.  I'd just like to start the app, leave the house for a bit, and then see where I've got to.  Any ideas for what would be a useful app for me?


Pdf of the square of a standard normal random variable

Given a known Gaussian distribution, $X \sim \mathcal N(\mu_x, \sigma_x^2)$, how does one determine the the distribution of $Y$ if $Y = X^2$?


Ubuntu 18.04 configure vlc always on top

Ubuntu 18.04 with Cinnamon desktop.   VLC option View / Always on top doesn't work. Right click on window title + Always on Top does work, but only for the current video   The first item is likely due to a bug in either VLC or GTK.   I'd like to configure VLC to always be on top when playing, without having to click on the frame title each time I open a video. Any answer to work around the bug in item 1, or to automate the workaround in item 2 is welcome.


Difference between javascript Iffy structure

What is the difference between these js function structure   (function () { console.log("Foo!"); }());  (function () { console.log("Foo!"); })();  ;(function () { console.log("Foo!"); }());  +function() { console.log("done!"); }();


I'd like to read a question that I viewed yesterday. Unfortunately I do not remember the exact words used in the question or answers. I only know what was written in the question conceptually. I tried all the search options including advance search in SO. The only remaining option is to go through viewed questions. I can see that those questions are in a different color. But not sure how to search all of them by date.  So my question is, Is there any way to search the questions that I previously viewed?


I have an enum defined as follow:  public enum MyEnumValue {      A0, A1, A2, A3,     A4, A5, A6, A7,... }   Now, I need to match a user selection string to one the value of the enum , "A1" or "A2", etc...  Unfortunately, I have not been able to find a way to match the string value of the "A1" as an example to my enum value MyEnumValue.A1  without an explicit switch statement.  Any idea how this could be done more elegantly will be highly appreciated.  Thanks in advance.


Edit: The problem was that I did not update the scene after scaling the object. I am trying to move the origin of the object to the center of its bounding box. I tried this solution  o = bpy.context.object  vcos = [ o.matrix_world @ v.co for v in o.data.vertices ] findCenter = lambda l: ( max(l) + min(l) ) / 2  x,y,z  = [ [ v[i] for v in vcos ] for i in range(3) ] center = [ findCenter(axis) for axis in [x,y,z] ]  bpy.context.scene.cursor.location = center  bpy.ops.object.origin_set(type='ORIGIN_CURSOR')  This is how it always ends up:  Clearly, the origin doesn't sit at the center of the bounding box. Any help would be greatly appreciated!


After installing Ubuntu in a iMac, I cannot boot my system, why?

After installing Ubuntu Desktop (latest version) onto my iMac (latest version) via CD and following its instruction to remove the CD and to reboot my machine won't boot. It gives me a blinking underscore at the top left hand side of my screen.  I'm in the "Try Ubuntu" phase, working with this...   I'm eager to have my workstation functional again. I looked around here and on the web all of today with not much luck; my guess is that I have improperly set up the boot partition. I chose to remove everything during the install process in the hopes that I would be able to have a fresh machine. I'm a novice but would love to learn and appreciate any help that anyone's able to give.


I upgraded to ubuntu 11.10 from 11.04, shocked to see few things...    My system is behind a proxy, so I did set a proxy setting. Being a web developer, I want to remove a lot of addresses that I type in browser address bar to not hit proxy. There's no such ignore list in ubuntu 11.10, what/where do I do it? What was the requirement to change the way network gui worked?


Does $\displaystyle\sum^{\infty}_{n=1}\left(\frac{n!}{n^n}\right)$ converge or diverge?   I've tried the ratio test, but i'm unsure if I can continue this way.  $$\displaystyle\lim_{n\to\infty}\frac{(n+1)!}{(n+1)^{n+1}}\cdot\frac{n^n}{n!}=\lim_{n\to\infty}\frac{(n+1)n!n^n}{(n+1)^n(n+1)n!}=\lim_{n\to\infty}\frac{n^n}{(n+1)^n}$$  If this approach works, how do we proceed? If not, what test might be worth trying?


Based on: $\frac{1}{n*(n+1)}=\frac{1}{n}-\frac{1}{n+1}$ where n is element of N find the sum of the following:   $\frac{1}{1*2}+\frac{1}{2*3}+\frac{1}{3*4}+ ... +\frac{1}{38*39}+\frac{1}{39*40}$  How should one deal with this kind of problem? Is this  a mathematical induction, arithmetic series, geometric series? I'm lost on this one.  Here are the options: a)$\frac{31}{40}$                       b)$\frac{33}{40}$                       c)$\frac{37}{40}$                       d)$\frac{39}{40}$


Does LastActivityDate for a question from Posts.xml consider answers, comments, votes?

From some answers regarding LastActivityDate, I know that LastActivityDate of a question considers:  a) Posting a question,  b) Answering a question,  c) Edits to either question or answer(s)  I want to know if LastActivityDate of a question from Posts.xml considers the following scenarios:  a) Comment on a question,  b) Comment on any answer of a question,  c) Vote (upvote/downvote) to a question,  d) Vote (upvote/downvote) to any answer of a question,  e) Upvote to any comment on a question or any answer of a question?


Does the CDATA tag change anything in javascript

What does the cdata tags do in javascript? As in:  <script type="text/javascript">      //<![CDATA[          code...      //]]> </script>


Remove function definition (unalias equivalent)

I'm currently building a program which adds to the current user's shell depending on the project he's working on, by defining per-project aliases and functions. These aliases and functions may and will certainly have the same name like for instance cdproj, which would cd to the project's root.  I would like to remove previously defined aliases and functions when changing project (before (re)defining aliases and functions for the other project. I know I can remove an alias with unalias in both bash and zsh, but how would I do the same for a function?


When I try creating a new face at a certain place, it seems to be back to front or something for some reason. When I bevel the edge the vertices are also in the wrong places. Here's a few images to show what I mean: Before I add the new face:  When I add the face:  When I add another face adjacent:  When I try to bevel:


Should CMSIS libraries be included in version control?

Normally, I used to include device specific headers & sources provided by the chip vendor (ST) and CMSIS-Core headers in version control. There are not many of them and I didn't have a habit to update them. I use STM32 microcontrollers, but I don't use the CUBE framework or the Standard Peripheral Library.  Recently, I needed to use CMSIS-DSP libraries. CMSIS-DSP library comes with a large number of header and source files. I decided to use the precompiled library (libarm_cortexM4lf_math.a), which is around 5.4 MB. But now I started to question if they should go into the version control.  I know that managing the binary files in version control isn't a good idea. But as far as I know, CMSIS is not updated very often. So I'm confused. These are the options I can think of:   Include CMSIS headers and static binaries in repo: It may be good idea if I decide not to update these libraries. CMSIS itself doesn't get new releases very often and even if a new version is released, it may not be necessary to update it in the project. Or I may skip a few releases before I update it in my project. Include CMSIS header and source files in repo: Similar to option 1, but git will be happier to work with text files instead of a 5+ MB binary. But I'm not sure if letting 3rd party code changes to contaminate my source history is a good idea (Option 1 suffers the same problem, but header files only). Don't include CMSIS in repo: This results in a clean repo, but then I have to manually copy library files into project directory after cloning the project. I can also specify a system wide installation folder for CMSIS and add it to the project but it causes a "works-on-my-machine" situation. Find a way to fetch the library automatically: The first thing comes to mind is git submodules. However, I'm not sure if fetching the whole CMSIS repo will work, because I need to restructure it as there are lots of unneeded files, including precompiled binaries. I guess I need some kind of post processing script?   What is the best approach here? Can there be other options?  There is a similar question here:  It seems people have different opinions about the subject. But I believe using CMSIS in an embedded C project is a specific case and deserves its own question.


How to completely deactivate the touchpad in Windows 7?

Is it possible / how to deactivate the touchpad so, that it even stays disabled, if no mouse is connected?  System: Dell Inspiron 6400, Windows 7.


I upgraded to Xcode 8 and now I really regret it. I'm trying to download Xcode 7.3.1 here:    It is a 4.8 GB file.  After three attempts - the download appears to finish around the 1-2 GB mark - and then I can't open or resume the download:    How do I download this without the download being disrupted? Is there another place to download older version of Xcode?


matching parentheses in python regular expression

I have something like      store(s)     ending line like 1 store(s) .. I want to match , it using python regular expression.  I tried something like re.match('store\(s\)$',text) but it's not working .  EDIT : adding the code , I tried   import re s = '1 store(s)' if re.match('store\(s\)$',s) :     print('match')   Pls help.  Thanks Jijoy


Robert Sheckley short story about a chaotic world

I have a vague memory of a short story that I think was by Robert Sheckley about a chaotic world without the usual laws. So, for example, the protagonist would open his inside jacket pocket to reach for his wallet (?) and a bat would fly out, to be casually crushed by the man with a ruler (?) ...


Android app for decorating destination numbers

I have set up a IP-PBX with a GSM gateway. This lets me call into my PBX. At this point I reach a IVR. One option lets me forward a call over VOIP by sending a destination.  To automate this I decorated the destination with the gateway number and pauses. As described .  So I end up having to enter a number for each of my contacts like so:  #gatewayNR#,,6,*pass*,#destinationNR#   Anybody knows an app who let me do that for Android?


Lost my Downloads folder both from Dock and Finder

I did something stupid apparently and lost my Downloads folder both from Dock and then when I opened Finder to drag it down to the Dock it somehow got deleted in the desktop.  Now although I can see the folder exists (e.g. by searching in Spotlight) I do not know how to restore it in the Dock and in Finder as well. Any help please?


Why is "$A$ unless $B$" equivalent to $A \lor B$?

$A$ unless $B$ surely means, 'given that $B$ does not happen, $A$ will happen'.  So if $B$ happens, $A$ does not happen.  Yet I've read, by those officially accredited, that $A$ unless $B$ = $A$ or $B$. However, if $B$ happens, and $A$ still happens despite the fact, that this is apparently true.  Surely, the sheffer stroke is appropriate here? So that: $A$|$B$.  If $B$ occurs, $A$ does not, thus, $A$ unless $B$. If $B$ does not occur, $A$ does.


How can I disable the "no backup in x days" from TimeMachine?

(Updated answer choice for High Sierra. See the old answer if you are still on Yosemite)  I'm running OS X Yosemite, and I want to disable the notifications from Time Machine. I rarely do a hard-drive backup because all of my essential files are in the cloud. I don't need to run timemachine as often as it suggests/warns/annoys me about.  How do I disable the notifications? Time Machine is not in the Notifications preferences, and I don't want to stop using it entirely.


Undefined Control Sequence despite \newcommand using tikz package

I want to create a new command to do a certain diagram using tikz. The code looks like this:  \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{matrix} \newcommand{\D}[4]{ \begin{tikzpicture}   \matrix (m) [matrix of math nodes,row sep=1.5em,column     sep=1.5em,minimum width=2em]           {             &#1&\\             #2& &#3\\             &#4&\\};            \path[thick]            (m-1-2) edge (m-2-1)            edge (m-2-3)            (m-3-2) edge (m-2-1)            edge (m-2-3); \end{tikzpicture} } \begin{document} \D{a}{b}{c}{d} \end{document}   But I get this message:  ! Undefined control sequence. <argument> \pgf@matrix@last@nextcell@options   l.23 \D{a}{b}{c}{d}   How can I solve it?


How can I raise a soldiers hacking ability?

My main specialist seems to have a hard time hacking stuff. How can I make him better at it?


What font package do I use to get the vertical Russian/German style integral signs? (subject says all)


I bet this topic was on before, but I haven't found anything like what I want to ask / recommend.  As a programmer, I'm mostly active on Stack Overflow, it has helped me countless times. Therefore I try to give some of my knowledge back, I try to find some time to answer a question or two at least once a week.  I have seen many occurrences where users, I have learned that they're called moochers, have 1k+ reputation, mostly generated from their many questions. Usually, they have very little answers, sometimes the ratio is worse than 1/10 and many of the answers I have checked are often times bad quality.  I don't have a problem with helping them, although I was very discouraged after the following incident. I had some free time and I saw a question, which looked a bit like a school assignment, although I wasn't sure. As I had the spare time, I decided to help, just to receive bunch of subquestions which asked for minor changes in logic of my initial example. I first told them it's simple and what should the to change, describing the solution, I just didn't want do serve it, with a mindset nothing is learned if I just provide (copy-paste ready) code. I got a very disrespectful response, basically it felt like they are trying to call me dumb. I decided to still help, so edit the answer to include code they wanted and be done with it. After that, nothing, no response, no upvote. And when I checked back next day, question was gone. I absolutely do not expect to be praised or anything, but I believe some basic respect and maybe a thanks or just an upvote if I was helpful isn't too much to ask.  I have rumbled enough here and haven't gotten to the point, which is how to deal with those people -- help them, ignore them or do something else?  I also mentioned a recommendation, I was thinking of a limit for question-to-answers ratio, so everyone has to "give something back" before asking more questions. And it has to be a quality answer, it has to get an upvote or be accepted to prevent spamming with useless answers. Or maybe someone else has even better idea on how to stop this behavior. Although on the other hand, users like these could always create new accounts and get over the limitation.  There might already exist a mechanism similar to that recommended, I must admit I'm not familiar since I rarely ever ask a question.  Edit: When reading it again, I have realized I worded my recommendation badly, I don't know what exactly I was going at, but I agree with the answers.


How do you prevent certain mobs from spawning in vanilla minecraft?

I like the /gamerule command, but how would I make it so only zombies or ghasts don't spawn? Ghasts are really annoying... I'm sure you understand.


Showing that a divisor of zero in a commutative ring with unity can have no multiplicative inverse"

A divisor of zero in a commutative ring with unity can have no multiplicative inverse.   I don't understand why this statement is true.  So for $a,b$ in the ring, $ab=0$ by zero divisor.  How can we guarantee that there does not exist $c$ such that $ac=1$?


How can i send multiple value using get_option();

If suppose I have :-  function dr_add_adminp() {      // Generating dr_theme_options Admin page     add_menu_page( 'USR THEME OPTIONS', 'User Options', 'manage_options', 'theme_options', 'theme_page', 'dashicons-admin-customizer', 110 );      // Generating dr_theme Admin Page      add_submenu_page( 'dr_theme_options', 'Theme Options', 'Theme Options', 'manage_options', 'theme_options', 'theme_page' );     add_submenu_page( 'dr_theme_options', 'AEAC Options', 'AEAC Options', 'manage_options', 'aeac_options', 'aeac_options' );    }   add_action( 'admin_menu', 'dr_add_adminp' );    register_setting( 'a-group', 'a-name' );   register_setting( 'a-group', 'a-age' );     add_settings_section( 'section-a-options', 'Name', 'someName', 'aoptions' );    add_settings_field( 'a-settings-id', 'Name', 'namefunction', 'aoptions', 'section-a-options' );  add_settings_field( 'a-age-id', 'Age', 'agefunction', 'aoptions', 'section-a-options' );    function someName() {   echo '
Enter Your Info
';  }   function namefunction() {    $name = esc_attr(get_option( 'a-name' ));    echo $usr_name = '<input type="text" id="name" name="a-name" value="' . $name .'">';  }  function agefunction() {   $age = esc_attr(get_option( 'a-age' ));   echo $usr_name = '<input type="text" id="age" name="a-age" value="' . $age .'">';  }   how can I send multiple values using an array or the best way.


Can I use one charger for all MacBooks from years 2008 to 2013? ... or did Apple change the charger in the last 5-6 years?  A friend of mine has a Macbook from 2007 or 2008 , she can lend it to me but she lost the charger, so I have to buy one here in the Czech Republic... I need the laptop now, so I will have to buy it tomorrow ...


How to force regex to capture shortest group?

I have two sentences like these:   "How is the weather of Paris in next day" "How is the weather of Paris next day"   I want to extract "Paris" as the city name from both of them. I wrote this regular expression:  "How is the weather of (?P<city>[^.؟!?]*) (in next day|next day)"   This expression extracts "Paris in" for the first sentence which is not right!   I want to match an input sentence with my regular expression in a way that it will be matched with the longest alternative of the second group, so I can get the shortest city name. (I thought the order of alternative in the second group matter so I put "in next day" before "next day" but It seems that the order doesn't work!) How can I rewrite my regular expression to solve this problem?


I am using BibTeX. For overall configuration I use a .cls file. I am looking for a way to sort the bibliography in this order: Books, articles, and miscellaneous. Currently all types of materials get sorted according to author name. As I am not using author parameter for misc, all misc categories appear first, which I don't want to happen.


I have a text file which has 1000 rows/entries. These 1000 entries correspond to the column names  for my dataframe. These are the  new features that need to be added to the dataframe  for  model development. My input text file looks like this: show temperature all#Total Numbers Approved#g2/3 show temperature all#Total Numbers Approved#g2/2 show temperature all#Total Numbers Approved#g2/4 show temperature all#Total Numbers Approved#g0/2 show temperature all#Total Numbers Sent#g1/2 show temperature all#Total Numbers Sent#g1/3 show temperature all#Total Numbers Sent#g1/1 formulastat gpucores all parameter function-frames#formula:1#gpucores:11 formulastat gpucores all parameter function-frames#formula:1#gpucores:10 formulastat gpucores all parameter function-frames#formula:2#gpucores:10 formulastat gpucores all parameter function-frames#formula:2#gpucores:11 formulastat gpucores all parameter function-frames#formula:0#gpucores:8  I was looking to automatically add '' for each line, remove the line break and add a comma after each line entry. Expected  output is as follows: 'show temperature all#Total Numbers Approved#g2/3', 'show temperature all#Total Numbers Approved#g2/2', 'show temperature all#Total Numbers Approved#g2/4', 'show temperature all#Total Numbers Approved#g0/2', 'show temperature all#Total Numbers Sent#g1/2', 'show temperature all#Total Numbers Sent#g1/3', 'show temperature all#Total Numbers Sent#g1/1', 'formulastat gpucores all parameter function-frames#formula:1#gpucores:11', 'formulastat gpucores all parameter function-frames#formula:1#gpucores:10', 'formulastat gpucores all parameter function-frames#formula:2#gpucores:10', 'formulastat gpucores all parameter function-frames#formula:2#gpucores:11', 'formulastat gpucores all parameter function-frames#formula:0#gpucores:8'


What does Kylo Ren know of his predecessor?

In the film Star Wars: The Force Awakens we learn that Kylo Ren      Is Anakin Skywalker's grandson, his predecessor    We also learn that he was trained by       Luke Skywalker   Surely his master would have told him about his predecessor, how he was seduced by the Dark Side and how he eventually returned to the Light Side of The Force?   And yet we hear him say he wants to finish what his predecessor started.  What does Kylo Ren know?


Why should one favor composition over inheritance? When should I choose to use composition rather than inheritance?

In the text, Effective Java by Joshua Bloch, he states 'Instead of extending an existing class, give your new class a private field that references an instance of the existing class. This design is called composition because the existing class becomes a component of the new one.' He further adds that one should always prefer composition over inheritance. Is this generally applicable to all general programming scenarios? Till now I have always used inheritance and considered it to be a solid concept. In what context should one decide to use composition?


Is there a place where I can look what updates I've installed?


I was following a tutorial video on YouTube on how to make a coffee cup, but in the middle of doing so I accidentally changed which type of selection I was using. For example I can usually drag a rectangle over object and it will select the faces, but now it's a circle and I have to run it over each face individually. I've tried googling the answer but nothing that I found has worked. Does anyone know how to get out of this?


Real Time Physics Based Mesh Deformation

I'm working on a game through unity that draws one of is essential elements from traditional tool forging techniques for building tools and such. I want the feel of the game to be able to create a tool that is truly yours and slowly make it better in both design and functionality over time. One major thing I cant't seem to figure out is to be able to take a mesh (in this case a hot piece of meta) and deform it in such a way that you aren't loosing any of the mesh, its just being shifted slightly with each hit of a hammer (or in my testing case click of a mouse). I have looked all over youtube and various forums and I can't seem to find an efficient way of going about it. Any thoughts?


To make your opinion known on MSE you need both up and downvotes. Given at the moment you need 125 rep to downvote on this site, the voting patterns will be skewed positive because not everyone is active on the site.   This is to be expected for regular Stack Exchange sites as you are expected to be involved in the community before you are deemed knowledgeable enough to be part of the community voice. However, MSE is different because you are voting for the entirety of the Stack Exchange network and you shouldn't need to be active on MSE itself to have a voice on changes to the entire network.  This is especially important for questions like  because it will effect every network to do with coding at all. This was brought up in .  I would suggest reducing the rep required to downvote on MSE down to 100 (or 101) rep. This is the amount you get for the site association bonus. This is given once you achieve 200 rep on any network site and shows that you are active in at least one community. I think this would be the perfect use of the association bonus in showing that you are a member of the Stack Exchange community.


What is this First Order weapon that can block a lightsaber?

A  apparently had tons of stuff not shown in English ones.  One of the most intriguing pieces for me was a scene where      ... Finn ...   armed with a lightsaber fights a stormtrooper armed with some sort of weird weapon - which Blocks the lightsaber!.    What is that weapon and how does it manage to block?  UPDATE: found an animated GIF of the fight. I hope nobody gets a headache, sorry in advance:


Why did my Turkey Stock turn into gelatin?

We took our left-over turkey carcass and parts and simmered them for a few hours with water in a pot with some herbs and veggies.  After removing the solids, and separating the fat, we placed it in the fridge to be frozen the next day.  When we pulled it out, the entire bowl - not just the top - was completely gelatinous.  It is truly like Jello.    Is this OK?  Why did this happen?   We plan to vacuum seal and freeze it if safe.


I have seen some articles talking about the role of sigma meson in nuclear force, but more articles omit it and only mention pion, rho and omega (e.g., Wikipedia). What is this sigma meson?


Can access to all SE sites that I am a member of be provided from the SE website?

I have only recently started getting into the SE network of sites. As a new user it was a little confusing that I had to create a new account for each site, as I would have imagined that these would be combined into one account. I now understand why, Open ID requires new authorization for each site so it is out of SE's control.  The SE drop box on the top left corner is nice, but is it possible to get a feed of information about activity, my own and others, from all the SE sites which I am a member of in one area.  I know this will probably sound similar to this question, , but instead of only getting a feed of network wide replies I think it would be good to get a feed of information from each site that I have an account, all consolidated into one overall feed on the SE website. This way I could view the interesting, featured and hot feeds of multiple sites at one time. For example I could see SO and Tex questions together.  "But you can already view multiple site feeds at once by choosing sites in the right hand side of the SE page!!" Yes, that is true. I couple of problems with this: I have to manually select the sites (not a big deal, but automatic select of the sites that you are a member seems like a smart option). It is also displayed in a different style to the feeds in the full sites, there is no way to switch between the interesting or month viewing modes etc.  The other area of improvement is the User page, which again could consolidate statistics, activity, favourites etc into one place. This is very similar to the suggestions in the previous question that was linked above, but it is something that I think would be a very useful feature, which would still benefit from more discussion.


Stimulus check never received, should I claim it on my US tax return?

I am an American citizen living abroad. I never received my economic impact payment checks even though they were apparently sent to my address. I understand that I can claim the money on the 1040 tax form, however if the check was printed, how can I inform the IRS that I never received it? Should I ensure that they somehow know that I did not receive it before sending my tax return?


I am trying to write data with setValue() to firebase database, but it throws NullPointerException. I have no idea what can cause NullPointerException with this method, so i am asking for help. Here is the error:  Exception in thread "Thread-24" java.lang.NullPointerException     at com.example.maxgm.myapplication.backend.EnergyBar$1$2.onComplete(EnergyBar.java:81)     at com.google.firebase.database.core.Repo$6.run(Repo.java:329)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)     at com.google.appengine.tools.development.BackgroundThreadFactory$1$1.run(BackgroundThreadFactory.java:60)   Here is my code:  @Override public void onDataChange(DataSnapshot snapshot) {     if (snapshot.exists())     {         for (DataSnapshot childSnap : snapshot.getChildren()) {             if (childSnap.child("Character").exists()) {                 int energyCurrent;                 int energyMax;                 int energyObtain;                 energyCurrent = (int) (long) childSnap.child("Character").child("energyCurrent").getValue();                 energyMax = (int) (long) childSnap.child("Character").child("energyMax").getValue();                 energyObtain = (int) (long) childSnap.child("Character").child("energyObtain").getValue();                  float finalEnergy = energyCurrent + (energyMax * (energyObtain / 100));                 if (finalEnergy > energyMax) {                     childSnap.getRef().child("Character").child("energyCurrent").setValue(energyMax, new DatabaseReference.CompletionListener() {                         public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {                             throw databaseError.toException();                         }                     });                 } else {                     childSnap.getRef().child("Character").child("energyCurrent").setValue((int) finalEnergy, new DatabaseReference.CompletionListener() {                         public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {                             throw databaseError.toException();                         }                     });                 }             }         }     } }


Minimum Requirements of ubuntu 18.04 LTS

I want to install ubuntu 18.04 LTS on my computer. But I am a little worried about system requirements. I can find 'Recommended' System Requirements on ubuntu website. But I am unaware of 'Minimum System Requirements' as they have been discontinued for publishing on the ubuntu website after the release of version 12. I have 512MB of RAM, 1GHz Processor and 8 GB of storage. I doubt that I might be able to run it as I saw my friend running version 16 on a age-old computer a few months back. Would I be able to run ubuntu on my system. I don't want to try any other OS or Linux disro.


Fastest, surest way to erase a hard drive?

I'm looking for a quick, simple, and effective way to erase the hard drives of computers that my company will be getting rid of (donation to charity, most likely). Ideally, I would like a single-purpose bootable utility CD that upon booting, finds all attached hard drives and performs an "NSA grade" disk erasure.  Is anyone aware of such a utility (even one not quite as automated as what I've described)?


When is partial differentiation commutitive

Consider a function: $$f:\mathbb R ^2\to\mathbb R $$ when does $$\dfrac {\partial f(x,t)}{\partial t\partial x}=\dfrac {\partial f(x,t)}{\partial x\partial t}$$  Thinking about it in terms of the limit definition of derivative,  and thinking about it as taking slices of surfaces and measuring the slope on the edge, seems to be giving me the feeling that answer is always.  However I have some memories of there being requirements like piecewise continuous, and smooth.   What is the full set of conditions?


How to reach out to strangers that could be relatives from an illegitimate birth?

I am trying to determine the best approach to reach out to a group of people that may be related to my immediate family but these people could be surprised by the news.  After my grandparent's death, my mother discovered that her father was not her biological father.  The only record we have is the biological father's name listed as the father on my mother's birth certificate.  There are other details but that information is beyond the scope of this question.  The biological father passed away in 2002.  I know through research that he had 5 children and we believe 4 are still alive.  I have what we believe to be their physical addresses and would like to reach out to them, not for any monetary reason, but for information about the man only.  I know this could be quite a shock to them to learn after 50 years that they might have a sister and other family they had no idea about.  For that matter the biological father might not have even known since he was in the army during this time and may have gone overseas before the pregnancy was known.  So the question is...  Do I write and send a certified letter to each of the surviving children?  Do I hire a third party... say a lawyer... to be the intermediary and don't contact them directly?  Any other suggestions?  I just wanted to pose this question to this group and see what opinions others might have on this approach.  Thank you


running script with ". " and with "source "

I was wondering if the following two ways of running a bash script are equivalent?  . ./myScript.sh  source myScript.sh  Are they both running the content of the script instead of running the script, i.e. not creating a subshell for running the script?


Why does the application portal ask 'To what other programs/universities are you applying?' while applying in US universities?

I am applying for higher studies in US universities. Every time I fill up the online form, there is a section where they asked which other universities or programs I am applying too? Why do they ask these questions? Do they check where I am applying? What if I wrote a university name but later drop the idea to apply?


How to combine two command outputs line by line?

let's say I have these two commands:  $ cat file1 file1_a file1_b file1_c file1_d   And:  $ cat file2 file2_a file2_b file2_c file2_d   How can I combine these outputs using a custom separator (e.g. ...) so that I get the following output:  $ # some fancy command like { cat file1 & cat file2 } | combine --separator='...' file1_a...file2_a file1_b...file2_b file1_c...file2_c file1_d...file2_d   ?


Fire not showing up when I make the background transparent

I cant figure out why the fire disappears when I switch to a transparent background with cycles.


Trying to get rid of Spotify's startup at login time I found an interesting behavior: while its plists are not present in any of the known locations such as Library/LaunchAgents and Library/LaunchDaemons and it's also not set to Open at Login either in the Dock or during logout, it still manages to start up somehow.  I've created a new test user, started the app just once, was greeted with a login prompt, closed the app and it decided it would start ever since. I've tried deleting the entire contents of the user's home folder in the Terminal while running as another user (rm -rf /users/testuser/*), but Spotify would start anyway.  Wonder how they do that? It's pretty easy to check by downloading and running the app, there's no need to even create an account.  The point of the question is to understand the mechanism rather than actually stop it from opening (there's a switch in the app).


Hi all I'm stuck on a homework question. The question is as follows:  "For $a,b\in\mathbb R$ we define $a∗b:=a+b+ab\in\mathbb R$. Furthermore let $G =\mathbb R\setminus\{-1\}$.  Show  that  $G$  together  with  the binary  operation $G × G → G, (a, b)  → a ∗ b$, is a group"  I know I must show that it's associative, there exists a neutral element and there exists an inverse. So far I've managed to show it's associative and I think the neutral element is letting $b=0$ but I don't know what the inverse element would be so that $a*b=0$. Any help would be very much appreciated.


I have a style file which includes another .sty file with \usepackage. Everything works fine. Since this is a  small file written by myself I decided to insert it verbatim at the same place were I use \usepackage in the surrounding file. But this results in errors. This gives raise to the general question in the title. More specific:  What do I have to do to make such an inclusion work?


Difference Boolean 2.8 not working as expected; Weird shading and not removing face

I'm only on my third day of trying out Blender after hearing about 2.8 changing the workflow. I followed the classic donut tutorial and now I wanted to try a simple project of my own.  I'm trying to use a boolean modifier difference operation to remove an object from a cylinder. I imported a SVG and solidified it and turned it into a mesh as the object I would like to remove out of the cylinder, but it's not working as expected. I suspect the SVG is the weird part because I can remove a sphere from a cube and it works as expected.  In the cylinder object mode using X-Ray, I can see that the shape is cut into the object but the face between the two objects is still there. In smooth shading mode you can see a hint of the process. I haven't seen this problem in any other question about booleans, including the ones this question is marked as a duplicate of. It doesn't even show up/cut the shape out.      The only time I've seen it work correctly is if I'm in edit mode for the SVG Shape and I've hidden it from viewport but I can't do anything from there. The shading is weird, but it removes the geometry how it should.    I've tried searching around but I'm not quite solid on 3D terms yet, and it's talked about normals, limited dissolve, merge by distance, etc. I've tried a bunch of things suggested but I can't seem to figure it out after a few hours.


Is there a way to access QGIS plugins in Python?   I'd like to write a script to do some geoprocessing, and I'd like to use the clip, regular points and convex hull tools in fTools, as well as the Road graph plugin. The latter is probably a different can of worms because it is a C++ rather than Python plugin.


How to get rid of Windows 10 search web results triggered from the start menu

I am trying to disable Windows 10 start menu search web results on Windows 10 professional v2004 slow ring preview release build 19033.1.  Here is a list of things that do not work for me:  [DISABLE WINDOWS WEB SEARCH ON REGISTRY EDITOR]  I've googled how to get rid of windows 10 search web results and tried the suggested registry editor hacks on:|  Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search    Setting CortanaConsent and BingSearchEnabled to DWORD32  value 0 but they are not working.   [REWRITE ENDPOINTS]   I've even tried to rewrite all bing.com endpoints in windows (WTF most of them are HTTP, not HTTPS! Anyone can sniff those searchs on an unsecured WiFi network!) but they are restored on windows restart.   [REMOVE EDGE AS DEFAULT APP]   I've tried to restrict edge in every way I could and removing it from default apps but the bastard keeps popping up every time I make a typo while trying to search/run something on my local system.   [RESTRICT CORTANA AND EDGE USING FIREWALL RULES]   I've disabled windows firewall rules allowing outbound and inbound connections for Edge and Cortana. Still no effect.   Are there any other more current hacks that would work on this release?


How to achieve List/Tree view in Nautilus?

How to achieve List/Tree view in Nautilus like the following screenshot?    Cant find information about this. ps Im using Ubuntu Remix with pure Gnome 3, and last version of Nautilus.


Is "hash-then-XOR" a good way of incrementally hashing an unordered set?

Is hashing the individual items, and then XOR-ing the results together, a good way of uniquely hashing an arbitrary unordered set of items?  I am thinking of using hash-then-XOR since I want some sort of function that can compute the hash of a set incrementally: given the $H(S)$, I want to be able to calculate $H(S \cup \{x\})$ and $H(S \setminus \{x\})$ without knowing the elements of $S$. In my particular application it's assured that already existing elements will not be added to sets, and nonexisting elements will not be deleted from sets.  With hash-then-XOR, whenever an element is inserted or removed, its hash can simply be XORed onto the set hash, allowing identical sets formed by arbitrarily different series of insertions and removals to arrive at the same hash. This is due to XOR being commutative, associative, and its own inverse.  Is this sort of set hashing scheme secure, in the sense of preimage, collision, and second-preimage security? If not, can some other more secure scheme (perhaps hash-then-modular-addition?) have the same sort of incremental properties as hash-then-XOR? I am specifically asking for an incremental set hashing algorithm, where the hash can be updated as elements are removed and added to the set, without knowing the whole set. Schemes such as hashing a lexicographically sorted set won't work in this case.


Group of invertible elements make a multiplicative group

Working with a nontrivial ring with unity, the set S of all the invertible elements in a ring is a multiplicative group.   So this is saying the invertible elements(or units) make a group that is closed under multiplication. So should I assume to have some invertible elements from my ring and show they are equal to 1? Then multiply the elements together to show the group is closed?  Let $a,b \in R$, where $R$ is a nontrival ring. $a$ and $b$ are invertible, thus for some $c$, $a\cdot c = c\cdot a =1$ and $b\cdot c =c\cdot b =1$. So $(a\cdot c) \cdot (b\cdot c) = 1\cdot 1 = 1$ thus $R$ is closed?


How to import obj and convert and export as fbx from command line in Python

I would like to import an obj file and export it as an fbx file without having to use the Blender GUI. The command: blender --background --python myscript.py Is not working for me from Terminal on mac. My first real problem is I'd like to be able to do anything (even open blender using .exe) using Terminal. I've tried including the path to the Blender app but nothing seems to be working and I am just given the error "blender is not a command"


How does APT work (apt-get, cache, search)

I have some questions about the APT package manager.     As I understand we have repositories URLs located at /etc/apt/sources.list and /etc/apt/sources.list.d/*      When apt-get update is called, apt tries to connect to all specified repositories in the file and download information about those repositories about what programs are available and so on.      It caches all retrieved data locally in order to use it later without making internet requests to the repository.      When apt-get install is called it searches local cache package list from available repositories and if package is not found it does nothing except display an error.      apt-get search also looks into local cache and doesn't make any requests to the internet.      Am I right? I am not sure about commands that make requests instead of searching data in the local cache.        Also, what is the difference between apt-cache search and apt search? I can guess they both use the local cache.


What is "cloning a hard drive" and how does one go about doing it?

What does cloning a hard drive mean? Is it just simply copying over all the "CONTENT" of the hard drive EXCLUDING the operating system, drivers, all the installed programs? or is it copying the ENTIRE hard drive BIT for BIT? Is the cloned hard drive bootable?  I have an external USB hard drive and trying to make a exact copy of my computer system by cloning, so that I can connect the cloned hard drive to another machine and boot into it, or install the cloned disk on another computer system and boot into it. Is this possible? Or am I going about this totally wrong?  What is ghosting a hard drive?


I’m trying to track when Garuda Indonesia flight GIA 714 from DPS (Bali / Denpasar, Indonesia) landed at SYD (Sydney, Australia). The flight departed on 26th August 2019 at around 23:40, but I am unsure of the officially recorded landing time.  I can only go back 3 months on flight trackers like  as a basic user.  Can someone look up the information for me?


How can you tell if an introductory comma is used correctly? Here is an example.      Outside, the rain was coming down hard.   I do not know how to tell whether it's correct or not; is there a way to tell a difference?


Why divide the learning rate by the size of the mini batch?

In Michael Nielsen's online book , in chapter one (and onwards) he divides the learning rate, $\eta$, by the size of the mini batch when he performs stochastic gradient descent (). Why?  Effectively, this means that when large mini batches, e.g. all of the training data, is used to do SGD, a very small learning step is made. Reversely, if only a very small amount of data is used to to SGD, then a very large learning step is made. This seems very unintuitive to me.  There are some related questions on this, but they are more focussed on why increasing the batch size can have the same regularizing effect as lowering the learning rate.


Buying gold / silver as a hedge against hyperinflation

I'm becoming more interested in buying gold / silver coins as a hedge against inflation and especially hyperinflation. I know very little about this, and there are thousands of sites on the internet about this. I'm sure many of them are a little less than honest.  For those of you who are experienced with this, could you point me to reputable sites that can explain how to go about doing this and perhaps reputable sites where gold and silver coins can be purchased?  Thanks very much.


Will all the drives be formatted if I replace Windows 7 with Ubuntu?

Hello I am a Windows 7 user and I am planning to replace it by Ubuntu. I have three drives and windows 7 is installed in drive C. I just want to know that weather all my drives will be formatted while replacing it with Ubuntu or only C drive (where my Windows 7 is currently installed)?


Tracking the questions you've recently viewed or visited

On your user profile page there are six (6) tabs; stats, activity, reputation, favorites, prefs and accounts.  I would like to see in a new tab, maybe named 50 latest viewed questions, which would contain the 50 latest viewed questions.  This would help when I want to follow a question but don't want to bookmark it or add it to my favorites list.   Sometimes, or a few hours later, I can't even find it again. I think this would be good for when you're viewing questions at work and want to check it up at home but can't because it's not in the same browser history.


/bin/bash -c access to unexported variables

I am trying to understand why the following happens: After setting up a variable like var1=test in the current shell, without exporting it (so it will not be available in child processes) and execute  /bin/bash -c "echo $var1" right after, I can see the unexported variable. I am aware of the fact that a builtin command like "echo" does not fork() or exec(), so it would have access to the unexported $var1 or about the fact that a SUBSHELL would have access to the unexported variables too. But in my case, /bin/bash -c "command" is not a SUBSHELL either as /bin/bash -c "echo $BASH_SUBSHELL" would show me "0". And I thought it should behave the same as an external command, so -> fork -> exec and inherit environment variables from the parent. So, for example, I see the following behaivor: [nimus@localhost ~]$ echo $var1 test [nimus@localhost ~]$ /bin/bash [nimus@localhost ~]$ echo $var1  [nimus@localhost ~]$ exit exit [nimus@localhost ~]$ /bin/bash -c "echo $var1; echo $BASH_SUBSHELL" test 0 [nimus@localhost ~]$  So how is /bin/bash -c "command" different then an external command or fork and exec a new whole bash Shell like above? Thanks!


How to generate a Python output file with color formatting?

How can I instruct python to generate an output file which keeps the color formatting specified in the main script?  I am working on the WRDS Cloud and I am using a shell file to execute a python script. The Cloud returns an output file which I can download and open like it is a txt file. However, this does not keep the color formatting that I specified in my original code.   I have tried to use different formatting packages in my python script but the result is always the same: the color is not displayed in the output file. I would really need to see the color because I use it to highlight some particular messages that represent warnings or errors. Therefore, I assume the only way around this is to instruct my python script to generate a different type of output, but I cannot figure out how.  my python script looks like this:  from colorama import * init() print(Fore.MAGENTA + 'Warning: The query failed' + Fore.RESET)   the output file looks like this (with no magenta color):  Warning: The query failed


Trying to multiply two large matrixes of dimension 1000*1000 causes Segmentation Fault

Trying to multiply two matrices of the dimension 1000*1000 . However, trying to do so causes Segmentation fault. what is possibly causing this and how to resolve it?   #include <stdio.h> #include<stdlib.h> #include<time.h> int main() { clock_t t;     t = clock();    long int a[1000][1000], b[1000][1000], result[1000][1000], r1=1000, c1=1000, r2=1000, c2=1000, i, j, k;     // Column of first matrix should be equal to column of second matrix and   /*  while (c1 != r2)     {         printf("Error! column of first matrix not equal to row of second.\n\n");         printf("Enter rows and column for first matrix: ");         scanf("%d %d", &r1, &c1);         printf("Enter rows and column for second matrix: ");         scanf("%d %d",&r2, &c2);     } */      // Storing elements of first matrix.     printf("\nEnter elements of matrix 1:\n");     for(i=0; i<r1; ++i)         for(j=0; j<c1; ++j)         {           a[i][j]=rand()%20;         }      // Storing elements of second matrix.     printf("\nEnter elements of matrix 2:\n");     for(i=0; i<r2; ++i)         for(j=0; j<c2; ++j)         {             b[i][j]=rand()%20;         }      // Initializing all elements of result matrix to 0     for(i=0; i<r1; ++i)         for(j=0; j<c2; ++j)         {             result[i][j] = 0;         }      // Multiplying matrices a and b and     // storing result in result matrix     for(i=0; i<r1; ++i)         for(j=0; j<c2; ++j)             for(k=0; k<c1; ++k)             {                 result[i][j]+=a[i][k]*b[k][j];             }  // Displaying the result     printf("\nOutput Matrix:\n");     for(i=0; i<r1; ++i)         for(j=0; j<c2; ++j)         {             printf("%ld  ", result[i][j]);             if(j == c2-1)                 printf("\n\n");         } t = clock() - t;     double time_taken = ((double)t)/CLOCKS_PER_SEC; // in seconds      printf("\n \nfunction took %f seconds to execute \n", time_taken);     return 0; }


Which (if any) mission changes are predetermined?

Sometimes missions will change partway through, like getting additional objectives, ice damage, a second faction joining the fight and so on. Some of these happen randomly (I'm sure the environmental ones are), while others seem to always occur on certain assignments: for example, Earth:Mantle will always have Corpus invade about halfway to the objective.  Which ones occur randomly, and which are designed as part of a mission? Is there any overlap between the two?  Note: this question was originally asked before invasions happened. Random events seem to be much less common in the current version, but still seem to happen occasionally. It seems that they're much more heavily related to specific circumstances. What are those circumstances for each kind of mission variable?


Is there any situation in which disagreement between subject and verb is acceptable?  For example, I heard this song     ... 'Cause it's late and your mama don't know ...   I think it's used in informal contexts. Am I right?


I originally only had Ubuntu 14.04.4 on my notebook, but as I sometimes also need windows I wanted to make a dualboot. So I booted Ubuntu from my USB stick, repartitioned my HDD and installed Windows 7 on the second partition.   The problem is that now it automatically boots into windows without giving me the option to choose between Linux and windows.  The notebook is a msi GT628.  I already looked at  post and  post but as I am a helpless greenhorn when it comes to linux (or computers in general) they went way over my head.  Thanks!


"remember visiting" vs. "remember to visit"

Remember is one of the verbs which we always put to + infinitive after it:     I always remember to do my homework.   But actually not always. This sentence is an exact example of what I mean:     Do you remember visiting Church of the Holy Sepulchre?   or     Do you remember to visit Church of the Holy Sepulchre?   I think the first sentence explains the meaning of your visiting to the church I really ask if you can remember that visit you made.  But think about the second sentence, it really asks if you remember to do what I've advised you (visiting the church)  I think it depends on meaning. I have to say that the first sentence is more accurate, which gives the meaning clearly.


Are Red Dead Redemption save files on PS3 compatible with the GOTY Edition?

My brother is getting me a GOTY edition of Red Dead Redemption and I have a vanilla save with a 100 percent.  When I get the game, will the dlc be on the disk and be on my save?


Find the $n^{\rm th}$ digit in the sequence $123456789101112\dots$

Basically, the question asks us to find the nth digit in the following sequence:  $$12345678910111213\dots9899100101\dots$$  where the 10th digit is $1$, the 11th digit is $0$, etc.  EDIT: Here are my workings: I was thinking about defining intervals in some way, for example, I know that there are 9 digits in this interval $0\dots9$ and $10\dots99$, and later try to find a sum. However, I am stuck on this point.


Integral of cosec squared ($\operatorname{cosec}^2x$, $\csc^2x$)

According to my sheet of standard integrals,  $\int \csc^2x \, dx = -\cot x + C$.  I am interested in a proof for the integral of $\operatorname{cosec}^2x$ that does not require differentiating $\cot x$. (I already know how to prove it using differentiation, but am interested in how one would calculate it without differentiation.)


The following image shows a small excerpt from an article in American Mathematical Monthly from 1968:    What font is being used here, and can it be reasonably easily implemented in LaTeX?


Firstly I would like to say that as a learner I am deeply indebted to Stack Overflow and it has saved me many sleepness nights but I have found that I am sometimes reluctant to post a question, no matter how desperate I am for the answer, for fear of being patronised by other members.  There maybe times when I don't phrase a question as well as perhaps I might, but that would be because I am learning about the language I'm asking the question about and I don't know the 'correct' way to phrase it.  And the same goes for searching for answers.  I always search for an answer first because I want to work it out for myself but sometimes I don't know how to phrase the question, draw a blank, post the question and get marked down for not looking or asking a duplicate.  Answers that consist of just links to the php manual with a comment telling me I should have read it doesn't help either, I would have looked there before posting and not been able to understand how to put the answer in context with my problem.  There are times when I ask a question and people are very quick to make sarcastic comments about how I edited it etc and mark it down whether it has any bearing on the actual question or answer.  Like I said, I am very grateful to this site and this is not meant in anyway to be a criticism but more a request for other users to be more tolerant of newbies like myself rather than making them feel intimidated and not wanting to post, which is sometimes how I and other Stack Overflow users that I know feel.  The idea is to encourage learners, not put them off.


I attacked with 4/4 creature with first strike and life link.   My hubby blocked with his only card, a 2/2 with “when this creature is dealt damage, it deals 5 damage to target creature an opponent controls”. He chose to deal that damage to my attacking creature.   Can I then play an instant to give my creature +2/+2, so his damage does not kill my creature? (My attacking creature is 4/4).


How can I get back to Blender's default theme?

Even though I am relatively new to Blender I am recording a tutorial for a Blender exporter. I have been advised that I should use the Default colour scheme (for the UI). I have no idea which one that is. Can anyone tell me?


Does Python have an equivalent to (expression) ? option-1 : option-2 syntax?

In java script there is an alternative to if statement i mean like ternary operator  : (boolean expression )? option 1: option 2, it is elegant compact and sometimes less confusing. I have searched a lot to find an alternative for 'if' statement in python but i couldn't find anything. Is there any way to trick python so we can avoid if statement ?


Jquery event is not working on a class that i added dynamically(on success of an ajax function)

I have created an element a with addCart class from php from db and I have used click event to run ajax on addCart.  When the ajax returns a true value addCart class is removed and instead another class with name delCart is added.   I already have a click event for delCart but for some reasons delCart event is not working.  I tried using event delegatiion using on  $('.delCart').on('click',function () {  $('.addCart').on('click',function () {   on success addCart class is removed and delCart is added.  });  $('.delCart').on('click',function () {   on success delCart class is removed and addCart is added.  });
Add To Cart

Remove From Cart
    I understand that jquery cannot interact with element created after page load and I want a solution for that.


Isolating two variables from multiple trig ratios

I have 3 functions of the same form, $x(p, q)$, $y(p, q)$, and $z(p, q)$ for which I am trying to evaluate $p$ and $q$. I know that $x+y+z=0$. I know I need to express p and q in terms of each other, but as you can see below, the three functions together are quite complex. I've been futzing around with trig identities to try and isolate either variable, but am stuck. Perhaps fresh eyes will help; can anyone here see a way forward?  All values are known, except $p$ and $q$.  $x(p,q) = [v_{1x} \cos(p)-u_{1x}\sin(p)][(C_{2x}+u_{2x}\cos(q)+v_{2x}\sin(q))-(C_{1x}+u_{1x}\cos(p)+v_{1x}\sin(p))]$  $y(p,q) = [v_{1y}\cos(p)-u_{1y}\sin(p)][(C_{2y}+u_{2y}\cos(q)+v_{2y}\sin(q))-(C_{1y}+u_{1y}\cos(p)+v_{1y}\sin(p))]$  $z(p,q) = [v_{1z} \cos(p)-u_{1z}\sin(p)][(C_{2z}+u_{2z}\cos(q)+v_{2z}\sin(q))-(C_{1z}+u_{1z}\cos(p)+v_{1z}\sin(p))]$


How to replace marshmallows in rice krispies cakes?

I'm making rice krispies cakes, but I just realized I'm out of gelatin and marshmallows. My mate suggested mixing normal granulated sugar with some water and it will give me the stickiness I need. Is he right? If not sugared water, what else could I use here?


I seem to be experiencing recurring memory issues with Netty 4. My app queries Minecraft servers for information and updates a database with that information. Currently it creates 300 connection requests every 10 seconds and sends packets if those connections are successfully completed.  A previous iteration of my querying app used Netty 3.2.5 and it ran for months on end nonstop with no issues. With Netty 4 however, it only runs a few hours before exhausting all available resources. Here is a screenshot of the memory sampling over a JMX connection.    As we can see, io.netty.channel.ChannelOutboundBuffer$Entry is using up a large amount of memory. Any idea how to go about troubleshooting this? I'm available to provide code if you guys need. Thanks!  Edit: This is not a duplicate of "How to find a Java memory leak". This has to do with Netty specifically, and I'm not trying to find out how to discover a memory leak - I've already discovered one with Netty.


How can I render the way the render preview renders?

I'd like to be able to render in cycles without the annoying tile system, just letting Blender keep working on the overall image, until I like the way it looks. Just like when I hit shift+Z, with preview samples set to zero. Is there a way to do this?


What is the experimental uncertainty of an ensemble measurement?

Let's say you measure the time it takes for 10 oscillations of a mass undergoing simple harmonic motion to within ± 0.01s, what is the uncertainty of the period of one oscillation?


How to customize Nautilus to display directory tree in the sidebar?

I'm using Ubuntu 14.04 LTS a little while and I consider myself a beginner.  I am using the Nautilus file manager:    I wonder if you can navigate the folders through the directory tree, like in Windows through folders or the + sign.


What is the symbol you'd use for Boolean results?

What I mean is that $\mathbb{CRZ}$ etc. are used for different classes of numbers, allowing me to do stuff like this:   $$f:\mathbb{R}\to\mathbb{R}$$ $$f:x\mapsto 3x$$  But say I have an expression like this:  $$g:x\mapsto x>4$$  What symbol would you use to represent a boolean result? a $\mathbb B$?


How can I make a Random Number Generator with vanilla redstone?

I'm working on a game for my Minecraft server that includes the element of chance.  The idea is that there are 6 buttons. One of them (randomly determined by redstone circuitry) results in wealth, prizes, etc. The other five result in doom.  When you enter the room the doors close initiating the game and beginning the primary circuit which selects which of the 6 buttons is the winning button. How to actually make the circuitry do this is my problem! I've got the door controls, win/lose circuits, and the reset circuit to prepare the room for the next player all worked out, but I'm stumped on how to make redstone do something random.  How can I use redstone to choose one of the 6 buttons to be active, randomly?


How far can Sea Sorcerer's Curse of the Sea and the Warlock's Repelling Blast Invocation push a target?

If I'm playing a Sorcerer/Warlock multi-class and I cast eldritch blast with the Repelling Blast invocation and I have Curse of the Sea from Sea Sorcery how far can I push foes away?


Difference between two independent binomial random variables with equal success probability

Let $X$ ~ $Bin(n,p)$ and $Y$ ~ $Bin(m,p)$ be two independent random variables. Find the distribution of $Z=X-Y$.   see also   I figured this out:  $$ P(Z=z)=\cases{\sum_{i=o}^{min(m,n)} Bin(k+i,n,p)*Bin(i,m,p), &if $z\ge0$;\cr \sum_{i=0}^{min(m,n)} Bin(i,n,p) * Bin(i-z, m, p),&otherwise. \cr}$$  I also validated it by Monte Carlo simulation. For $n=30$, $m=20$ and $p=0.5$, I get the following distribution, where the circles are the analytical probabilities and the line connects the MC estimates.    Because that looked to me pretty much like a binomial distribution, I gave it a try and figured out that its actually a binomial, just shifted by m to the left. This can be simply written as $P(Y=y) = Bin(y+m, m+n, p)$. Hence, given equal success probabilities, the sum of two independent binomially distributed random variables is binomial, but also their difference, just shifted to the left.  This question here  is actually the same as mine, but received no answer and only the comment that there would be no simple formula. But the above formula looks pretty simple to me.   Is it correct that for the case of equal success probabilities, the above equations actually describes the distribution of $Z=X-Y$? I read in a book that $Z$ could not be binomial distributed because it had negative support. Is it right to call it a shifted binomial?


Why use "need not" instead of "do not need to"?

The header of  states:     High-level languages need not be slower than low-level ones.     Why use need not instead of do not need? What does it mean? Also, why no to before be?


How to find and compare flights carried out by a specific type of plane?

I'd really like to fly with an Airbus A380. But how do I find and compare the price of flights that are carried out by specific kind of plane? I don't want to fly just anywhere; I plan to go from Vienna, Austria to Indonesia this summer, possibly with a stop-over in Hong Kong, Singapore or Bangkok.  I checked if any there are any regular commercial flights with A380s to/from my home town. There aren't, so the way to go is probably to first fly to a major hub somewhere in the Middle East or South East Asia (which I'd have to do anyway since there don't seem to be many direct flights from Vienna to SEA).   So far, I simply searched for flights like you'd usually do and then checked which planes they use; this is very, very tedious, especially when one is very flexible in dates.    How do I find cheap flights that are carried out by a specific type of plane?


Which star trek series main ship/base/structure had the most events that destroyed it?

It just occurred to me that across the different Star Trek series, there are many instances where the show's main ship or base is destroyed.  For example, in Next Gen, alternate (time looped) Picard ran from his ship while it exploded, or the crew keeps ramming Dr Frasier Crane's ship (presumably because his radio show was drawing attention away from Troi). Which show has the most separate instances of this?  To be clear, anytime a ship was physically replaced (the defiant, for example) would be the end of its run.  The new ship or base would begin as its own string of destructions.  Ships magically becoming two of the same ship,  time travel events, and the ship/base's actual destruction count.  In the situation of exploding over and over again in the same event, count it as one occurance.  As a technicality, if the ship melts instead of explodes, or is somehow destroyed in a non fiery manner, that counts too.  Finally, DS9 and the Defiant qualify as "main" for the purpose of my question.


How do I set the default beamer font to Computer Modern serif?

The default beamer font seems to be Computer Modern sans serif. How do I change this to serif?    Note: \setbeamerfont{<element>}{family=\rm} seems to work for specific elements such as title, but I want this to be a global change.


Simplifying radicals for limit leads to extra minus symbol

I am asked to calculate the limits of $\dfrac{x}{\sqrt{1+x^2}}$ for $x\to\infty$ and $x\to-\infty$  When I simplify the radical for $x\to\infty$, I generate:  $\dfrac{x}{\sqrt{1+x^2}} = \sqrt{\dfrac{x^2}{1+x^2}}$, after which I can use l'hopital the two parts because they are $\infty / \infty$.   I do lim lim $x\to-\infty$ in similar fashion, but here an extra minus appears in the simplying radicals step that I can't quite place. I never actually use that $x\to -\infty$, so I'm kind of lost how that gets there?


A restricted view I can't turn off in Solid & Wireframe preview

For some reason I keep getting this strange restricted view only in solid & wireframe viewport mode. Doesn't appear in render preview. See the attached pics to see what I mean. Can anyone tell me what this is and how to remove it please. In solid preview: And in render preview:


I tried to combine this answer  with my answer  But the pdflatex -shell-escape table.tex ignores linebreaks and the 3 tables are horizontally aligned and not vertically. table.tex \documentclass[convert]{standalone} % \documentclass{article}  \usepackage{booktabs} % for nice lines \usepackage{siunitx}  % nice numbers and units and 'S' in table \usepackage{multirow} % enable \multirow command  \begin{document} short answer to your question:\\ \begin{tabular}{|c|c|S|} \hline Genre & Name & {Weight}\\\hline Humain & Aragorn & 102 \\\hline \multirow{4}{*}{Hobbit}&Frodon & 32.1\\\cline{2-3}     &Sam & 3.2 \\\cline{2-3}     &Peregrin & 2.232\\\cline{2-3}     &Meriadoc & 23 \\\hline Elfe&Legolas & 34.5 \\\hline \end{tabular}\\[1cm]   You can also use the power of booktabs and siunitx:\\ \begin{tabular}[ht]{l c S} % alignment l = left, c = centre, S = at decimal - needs siunitx \toprule Genre&Name& {Weight}\\  % protect non numbers with {} in S columns \midrule Elfe&Legolas & 34.5\\ Dwarf&Peter & 103.31\\ \bottomrule \end{tabular}\\[1cm]  And combine that with your table:\\ \begin{tabular}{c c S} \toprule Genre & Name & {Weight}\\\midrule Humain & Aragorn & 102 \\\midrule \multirow{4}{*}{Hobbit}&Frodon & 32.1\\\cline{2-3}     &Sam & 3.2 \\\cline{2-3}     &Peregrin & 2.232\\\cline{2-3}     &Meriadoc & 23 \\\midrule Elfe&Legolas & 34.5 \\ \bottomrule \end{tabular}   \end{document}


Get variable types inside a Python class

For the following example, is there a way to get the type of a and b as int and string?   class test(object):     def __init__(self):         self.a = 1         self.b = "abc"  test_obj = test() for var in vars(test_obj):      print type(var) # this just returns string type as expected (see explanation below)


How to make Nautilus remember the windows position?

I can't see any tweak about this in dconf or compiz. Can someone explain is there any way to make Nautilus remember its position before the closing?  Ubuntu 12.04


Pi is defined as circumference/diameter, but it is an irrational number. And by definition an irrational number can't be defined by a fraction. So how is it that pi is circumference/diameter and on a side note: how are important irrational numbers like e normally found?


What do you call a person who expresses strong opinions on things they know nothing about?

Is there a word to describe a person who habitually expresses strong opinions on a subject without having any facts or background knowledge to base their opinion on. Examples include many politicians, the media when they don’t do research, and many loud opinionated people who “Like the sound of their own voice”. With so many words in our language with very specific meanings it seems a single word to describe this [commonly occurring] situation would useful?


Do we need to prove that if x∉A in proposition "if A⊆B then A⋃B=B"?

we translate "if $A⊆B$ then $A⋃B=B$" to $$∀x( ( x∈A → x∈B) → ((x∈A ∨ x∈B) ↔ (x∈B)))$$  My work: we need to prove $A⋃B⊆B$ first.  1) $∀x( x∈A → x∈B)$ (given)  2)$x∈A$  3)$x∈A$ ∨ $x∈B$  --- (addition laws)  4)$x∈B$ ∨ $x∈B$  --- (1,3 implication)  5)$x∈B$ ---(Idempotent laws)  6)($x∈A$ ∨ $x∈B$) → ($x∈B$) ---(3,5condition proof)  7)$∀x((x∈A$ ∨ $x∈B$) → ($x∈B$)) ---(universal generalization)  then we proved that $A⋃B⊆B$.  we need to prove $B⊆A⋃B$.  1)$x∈B$  2)$x∈B ∨ x∈A$ --- (addition laws)  3)$x∈B → (x∈B ∨ x∈A)$ ---(1,3 condition proof)  4)$∀x(x∈B → (x∈B ∨ x∈A)$) ---(universal generalization)  then we proved that $B⊆A⋃B$.  Therefore, $A⋃B=B$ when $x∈A$.  However,what if $x∉A$?  The statement $( x∈A → x∈B)$ still hold true if $x∉A$ ,should i also prove that when $x∉A$ ,it will not make the consequence $((x∈A ∨ x∈B) ↔ (x∈B))$ be false?  There are two possibility for $∀x( ( x∈A → x∈B) )$:  $x∉A → x∈B$ (because F → T = T)  $x∉A → x∉B$ (because F → F = T)  Actually,Do we need to prove these?


Whenever I have a sprite frame, and I open it in Preview app, I can't see the exact edges of the image because the background of an image is transparent. Therefore, I can't see if there is any padding around it. Is it possible to turn on image borders in Preview app?


How do you run Ubuntu from USB on a Windows 8.1?

I have Ubuntu installed on my USB (FAT32). Now how do I run it from the USB without deleting C: drive?


Optimize pairings of two types of points with respect to the maximum distance inside any pair

I'm trying to find an efficient algorithm for the following problem:  Given two different sets, both of size $N$. Each element in the two sets has coordinates $(x,y)$. The task is to optimize the pairings between these two sets such that the maximum distance between the paired elements given a pairing, is minimized. I have only found algorithms that deal with the squared sum of all distances between paired elements or the smallest distance between any two points from the two different sets.  For example: Given a list of $N$ pair of points that are associated with locations $(x_0,y_0), (x_1,y_1), (x_2,y_2),\dotsc,( x_{n-1},y_{n-1})$, name them $a_0,a_1,a_2,\dotsc,a_{N-1}$ accordingly. And another list of $N$ pairs of different points (locations) $(x_0,y_0), (x_1,y_1), (x_2,y_2),\dotsc,( x_{n-1},y_{n-1})$, name them $b_0,b_1,b_2,\dotsc,b_{N-1}$ accordingly. How can I pair all elements (each element is a pair of points) from list 1 $(a_0,a_1,a_2\dotsc,a_{N-1})$ to the other elements in list 2 $(b_0,b_1,b_2,\dotsc,b_{N-1})$ so that we chose the shortest distances? eventually, I'd need to print the maximum distance among all minimum distances (that we have found for each of the elements). Any idea how can this be achieved in reasonable run time? or name an algorithm that might help here.


Damage to freezer food after a power outage

My freezer went without power for 70 hours while we were out of town.  The power was restored before we returned and refroze everything.  The unit was full and did have some solid ice packs within.  Is anything safe to consume in this freezer?


Determinant of a Matrix Proof: $\;\det(qA) = q^n(\det A)$

I am required to show that: $\det(qA) = q^n(\det A)$, where $A$ is a real $n\times n$ Matrix, and $q$ is a constant   I believe that this claim is true after doing few examples. However, but I do not know how to start the proof.


How to migrate SVN repo with full codebase to GIT repo?

Can anyone please provide proper urls pdf or detailed steps to migrate SVN/CVS repos to GIT_repo ?


I'd like to use a mid 2011 iMac screen as target video of my Dell PC (using dock station display link). I want to work on my Windows PC, but using 27" LCD monitor of my iMac.  How do I do it? Is it possible using software (display link?) or using a common USB cable?


Closed-form likelihood. Why to use Bayesian parameter estimation instead of maximum likelihood?

Given a model with a closed-form likelihood, what are reasons to use Bayesian parameter estimation instead of maximum likelihood? In other words, what are additional estimation results that you can get with Bayesian parameter estimation but not with maximum likelihood estimation? I am NOT looking for a discussion of the different underlying paradigms but rather something more "tangible". For example, something along the lines of more accurate intervals for predictions or observation-specific parameter estimates for exogenous covariates or handling of missing values or...


Stuck on "Removing conflicting operating system files" while upgrading from 14.04 to 15.04

I'm trying to update to Ubuntu 15.04 from 14.04. I created a live usb, booted to it, and chose to upgrade to 15.04 in the install menu. It's been stuck on "Removing conflicting operating system files" for around 5 hours so far. Is it supposed to take this long? If not, what can I do about it?


What is the policy on use of Community Wiki? (2013)

Today I came across a question that I felt it was better suited as a community wiki. Both the question and its accepted answer consisted of a single line, and both had almost 300 upvotes. On top of that, the question was mainly asking for "good practice". It had all the signs of a community wiki to me.  However, when I flagged it as such, the flag got denied on the grounds that "We stopped doing that ages ago".  I was unable to find a recent explanation of what the current policy on making things community wiki is, so I decided just to ask: What is the current policy on making things community wikis?  Is it that posts should never be converted to CW by a moderator, or are there still some cases in which it makes sense to convert a question? (and, by extension, flag it for that purpose)


How do I detach a process from Terminal, entirely?

I use Tilda (drop-down terminal) on Ubuntu as my "command central" - pretty much the way others might use GNOME Do, Quicksilver or Launchy.  However, I'm struggling with how to completely detach a process (e.g. Firefox) from the terminal it's been launched from - i.e. prevent that such a (non-)child process   is terminated when closing the originating terminal  "pollutes" the originating terminal via STDOUT/STDERR   For example, in order to start Vim in a "proper" terminal window, I have tried a simple script like the following:  exec gnome-terminal -e "vim $@" &> /dev/null &   However, that still causes pollution (also, passing a file name doesn't seem to work).


Finding determinant for a matrix with one value on the diagonal and another everywhere else

Let us look the the matrix  $\left(\begin{array}{ccccc} a & b & b & b & b\\ b & a & b & b & b\\ b & b & a & b & b\\ b & b & b & a & b\\ b & b & b & b & a \end{array}\right)$  It has one value, $a$, on the main diagonal, and another value, $b$ everywhere else. Let us assume that we are over a ring and that $a$ is invertible.  I wish to find the determinant of every $n\times n$ matrix of this form ($a$ on the diagonal, $b$ everywhere else). Using row and column operations I have managed to transform the matrix to upper-triangular form and found formula for specific cases. Generalizing it I got to the following formula:  $\det(A) = a\left(a-b\right)^{n-2}\left(a+\left(n-2\right)b-\frac{\left(n-1\right)b^{2}}{a}\right)$  I think I can prove it with row-operations in the general case with a little patience.  However, I'm wondering if there is a "smart" way of getting to this formula that I'm missing and if there is a nicer representation of it. Also, what can be said when $a$ is not invertible? (esp. the case where we are over a field and $a=0$).


each time I open Ubuntu I have to turnoff bluetooth function from the top panel. my questions is that is there any method to make it disabled by default?


How to create real tilt-shift lens blur in Blender?

I basically want to rotate the DoF-Plane just as a real tilt-shift lens does, so that the depth influences the blur and not a gradient. Is there a way to recreate this effect in blender?


I need assistance in integrating $ \frac{x \sin x}{1+(\cos x)^2}$

Find the integral  $$ \int_0^{\pi} \frac{x \sin x}{1+(\cos x)^2}$$


Travel with two passports different from previous

OK I want to travel parts of Europe but my Indian passport won't let me without all via restrictions. I hold a Portuguese national ID issued to me by a consulate as my father is Portuguese. Now India only allows single citizenship but Portugal allows dual.   If I have to leave India with my Portuguese passport I will have to surrender my Indian passport (I love my country so I don't want to leave Indian citizenship, but I love to travel)  Can I take a visa from India to a country where only Portuguese national ID card is required for travel and from there travel to European countries, before going back to the country with the visa to come back to India?  Would that be a problem?


MH algorithm, how much samples should be discarded?(how many burn ins)

Suppose I have a 20d distribution, and i'm using MH to simulate 1024 draws from that 20d distribution, how many samples are burn ins?


Is there some way to get download metrics on PPA packages?  It would be nice to know how many users are using my application from my PPA and what distributions they are using.  If not, any idea of the feasibility of implementing such a feature?  For example, are PPAs mirrored?  I can imagine that that would complicate things.


Double Integral $\int_0^\infty \int_0^\infty \frac{\log x \log y}{\sqrt {xy}}\cos(x+y)\,dx\,dy=(\gamma+2\log 2)\pi^2$

Hi I am trying to solve this double integral $$ I:=\int_0^\infty \int_0^\infty \frac{\log x \log y}{\sqrt {xy}}\cos(x+y)\,dx\,dy=(\gamma+2\log 2)\pi^2. $$ Thank you.  The constant in the result is given by $\gamma\approx .577$, and is known as the Euler-Mascheroni constant.  I was thinking to write $$ I=\Re \bigg[\int_0^\infty \int_0^\infty \frac{\log x \log y}{\sqrt{xy}}\, e^{i(x+y)}\, dx\, dy\bigg] $$ and using Leibniz's rule for differentiation under the integral sign to write $$ I(\eta, \xi)=\Re\bigg[ \int_0^\infty \int_0^\infty \ \frac{\log (\eta x)\log(\xi y)}{\sqrt{xy}} e^{i(x+y)}dx\,dy.   \bigg]\\ $$ After taking the derivatives it became obvious that I need to try another method since the x,y constants cancel out.  How can we solve this integral I?  Thanks.


Testing end points of the interval of convergence of a series.

Find the interval of convergence including endpoints of $$\sum_{n=0}^{\infty}  \frac{n(x+3)^n}{2^n(n^2+1)}.$$ I can find the interval of convergence but I don't know how to test endpoints $x=-5$ and $x=-1$. I don't know whether the series convergences at $x$ = $-5$ and $x$=$-1$ and need help. I don't think the series converges at $x= -5$ and  $x= -1$.   No this is not a duplicate question because the starting index of the series is different.


Basically this is the action I want to achieve:  Please type your new password: 1234 Please enter your password: 1234 This password is correct. (And Vice Versa)   Everytime I launch or edit this code, all I get is "This password is incorrect" P.S: I'm new to all this! This is my main class:   package PasswordValidation; import java.util.Scanner;  public class Main { public static void main(String[] args){     Scanner kbrdIn = new Scanner(System.in);      PasswordDB pwdObject = new PasswordDB();         System.out.println("Please type your new password: ");      String userPwd;         userPwd = kbrdIn.nextLine();      pwdObject.setPwd(userPwd);     pwdObject.checkPwd();          kbrdIn.close();     } }   This is my PasswordDB.java class:  package PasswordValidation; import java.util.Scanner;  class PasswordDB {  Scanner pwdInput = new Scanner(System.in);  private String passWord;  public void setPwd(String name){     passWord = name; }     public String getPwd(){     return passWord; } public final void checkPwd(){      System.out.println("Please enter the password: ");         String pwdIn = pwdInput.nextLine();   if(pwdIn == passWord){      System.out.println("Your password is correct."); }else{      System.out.println("Your password is incorrect.");      }   } }


Can we use CAPITAL LETTERS to indicate actions?

While designing for the web or the mobile applications, a natural free flowing text can be used for the general content, but when it comes to actions... can we use CAPITAL LETTERS.


What are the IDs for the spawners in minecraft?

I tried to do /give Nickbrownie 52 1 58 the ID is 52:58 and its supposed to give an Enderman Spawner I placed it and it was a piggy spawner please help me!


What is the opposite of the suffix -cide?

All the words ending with the suffix -cide explain what was killed. Is there a suffix for what did the killing? Killed by hammer, killed by fall, etc.? Thanks.


I am just working through some questions for fun, and can't seem to prove this statement: (Proof that $(a+1)^p\equiv a^p+1\pmod p$ where $p$ is a prime and the proof is by Fermat's theorem). So far I have deduced the following: $a^{p-1}\equiv 1 \pmod p \implies a^p \equiv a\pmod p\implies a^p + 1 \equiv  (a + 1) \pmod p \implies (a^p + 1)^p \equiv (a + 1)^p\pmod p$ So, I figure if I can find a way to show that $(a^p + 1)^p \equiv a^p + 1\pmod p$ or $(a + 1)\equiv (a^p + 1)^p\pmod p$ then the proof will be complete. But, I can't seem to make that final step.


how to install nvidia GEFORCE 720M driver on ubuntu 12.04 32-bit?

I have an Asus laptop I try to install Nvidia drivers but I failed.  $ sudo service lightdm stop $ sudo init 3 $ chmod +x NVIDIA-Linux-x86-340.65.run $ sudo ./NVIDIA-Linux-x86-340.65.run


Let $n \ge 1$ and $u_{1},u_{2},...,u_{n}$ are all root of unity for $n+1$ and there are different from $1$.(a) Find polynomial $f \in \mathbb R[x]$ of degree $n$ for which: $f(u_{k})=0$ for $k=1,2,...,n$.(b) Calculate real coefficient and imaginary part for $(2-u_{1})(2-u_{2})\cdot...\cdot(2-u_{n}).$    I have a knowledge about root of unity but I completely don't know how to do it because I think that I need some extra trick to do it but my ideas finished. I know that $\varepsilon_n^{(k)} = \cos\left(\tfrac{2k\pi}{n}\right) + i\sin\left(\tfrac{2k\pi}{n}\right) = e^\frac{2\pi i k}{n}$ and for $n>1$ $\sum _{{k=0}}^{{n-1}}e^{{\frac  {2\pi ik}{n}}}=0$ but I think it is too little knowledge to solve this task.Can you help me?


I can't unfollow a deleted post. This may be a regression, or a corner case which has not yet been reported. I have very low rep on Economics (currently 105) and my "Following" tab simply says I have no questions which I follow:  And yet I have received multiple inbox notifications for a question I followed which was then deleted, and which has apparently then still been edited by its author:  I  and Glorfindel helpfully pointed me to  but ... it doesn't work; as reported above, I don't see the post in the Followed tab. The "solution" at  does not work; it only fixes it for users who have the privilege to see deleted questions in the first place.


Geometric Mean of Uniform random variables convergence

I am doing some independent study in asymptotic statistics and point estimation and am aware that you can get from log transformations of uniform random variables (exponential) all the way up to chi-squared distributions but I came across an intriguing question and I'm not sure how to handle it. I was thinking CLT or Delta Method but am unsure of myself. The thing I am trying to sort out is:  Given $X_1,\ldots X_n\overset{iid}{\sim}Uniform(0,\theta)$ and $Z_n=\left(\prod_{i=1}^nX_i\right)^{1/n}$ what is an example of a function of $Z_n$, i.e. $g(Z_n)$, so that $g(Z_n)\overset{d}{\rightarrow}\chi_{(1)}^2$, where $\overset{d}{\longrightarrow}$ denotes convergence in distribution and $\chi_{(1)}^2$ is a chi-squared random variable with 1 degree of freedom?  Maybe something like $g(h(Z_n))$ where $h(Z_n)\overset{d}{\rightarrow}Normal(0,1)$ and $g(t)=t^2$? Any help is greatly appreciated.


How to create bootable installer USB for macOS in Windows?

I purchased a 2008 Mac from a friend. It's now formatted and internet recovery option is not working for a fresh install. I want to create a bootable USB drive in a Windows machine. I am unable to download El Capitan without the Mac App Store. How do I install a fresh copy?


Is there anyway to enable system wide inverse scrolling?

Is there any way to enable inverse scrolling like on Mac OSX?


Audio Visualization with Background Image

I am not able to render background image and audio visualization into one video. I have tried compositioning audio visualization(spectrum) and background image into one but the render gives me only images 0001.png, 0002.png and so on.  Here's how it looks in blender:    Here's what I get:    Basically if there's another way to render audio visualization with background image, please mention it. I have no experience in blender.


How to unzip files with Python without reading them all into memory?

I am currently using zipfile to unzip files with Python. However it seems all the data is loaded into memory, which causes some problems with my application.  Is it possible to unzip a zip with Python and not write all its content into the memory?


If U contains A and B, and X is 80% of A, how much % is X in U?

Let's suppose that U is the universe set and it contains the sets A that is 60% of U and B that is 40% of U, so they are disjoints, the set A contains the set X that is 80% of A, how much in percent is X in U?


Why is "nobody" called the "most privileged user after root"?

When I was first learning Linux I recall reading that because it is so widely used, "nobody" is (jokingly?) known as the "second most privileged user, after root" on Unix machines.  A quick google search seems to corroborate that it is a common saying, not just a quirk of the author I was reading.  Why is this a common saying?  Is it really true?


Why does a TeX point differ from a Desktop Publishing point?

From  to , I found out that PDF and TeX have different ideas about the size of the point (pt). A TeX point is 1/72.27 inch, where Desktop Publishing Point (DPP), or a Big Point (BP) is 1/72 of an inch.  What is the historical and/or technical reason for this difference?


In the example above, there are two loops. Why is running the second loop valid? We already trained the network 1000 from the first loop, does running the second loop mean we trained it 2000 times?


I have an animation where a cube goes from point A to B. When it reaches B, he will be out of sight from the camera.  How can I make a "cut", a.k.a., make the camera now show point B, where the cube is?  Kind of like transition from Scene 1 over to Scene 2; I don't have any scenes, though.


what adapter will work for a canon 70-200mm to nikon dslr?

I have a 70-200 canon lens that I would like to put on a 3200 dslr. Can someone please advise me of an adapter that would work?Thanks!


How do I combine the !.5! operator with the -| operator?  I want a node that has x-coordinate equal to the average of x coordinates of nodes A and B, and a y-coordinate equal to the average the y coordinates of nodes C and D.


Change "power-button-action" comand for "hibernate" option in GNOME 3.18

I am used to have an interactive menu when i press my power button, but since I recently installed GNOME 3.18, i found out that the only available actions for power button press are : "nothing", "suspend" and "hibernate".  In dconf-editor, there are two entries for this:  org.gnome.settings-daemon.plugins.power button-power org.gnome.settings-daemon.plugins.power power-button-action   The first one contains all options (hibernate, interactive, suspend, poweroff, nothing,..), but the second one contains only three (hibernate, suspend, nothing).  The problem is that it seems that GNOME uses the second entry (power-button-action).   Since i don't want to use hibernate, and suspend does not work on my computer (that's another issue), i'd like to map an interactive menu to be executed when power-button-action is set to hibernate.  The command for the interactive menu i want is:  gnome-session-quit --power-off   I run Ubuntu GNOME 16.04 LTS 64-bit with GNOME Shell 3.18.4 on a Dell Inspiron 3537.  More generaly, i would like to be able to display the interactive shutdown menu when pressing the power button (by any means necessary, no especially going through this way). I tried to map the power button to gnome-session-quit --power-off using the GNOME keyboard setting, but it doesn't seem to be triggered.  Thank you.


How do I mirror/copy/save a harddrive from an old macbook that has an account in a logged-in state?

I have an old macbook that I wish to keep all the data from the drive as it currently exists - in the state that it is presently, exactly. Why does this matter? Because the laptop, when suspended and the battery drains, will retain that state upon restoration of power ... and the account is super old - and I don't know the password. I'd like to upgrade the laptop to newer RAM and maybe an SSD, but I have to keep the old hard drive with state and everything intact (to save session, login, etc.).  I'm concerned that if I pull the hard drive, something will result in the drive getting corrupted, or the login state getting corrupted, and I'll lose everything. Ideally, I could clone the drive to an external hard drive, including power-state, and boot using target-disk mode. Copying the data will be an option eventually, but I have software on that computer that only runs on that computer. (If I were to upgrade, I'd have to re-buy licensing, etc.)  Again, this is important because I don't know the password - the laptop is from 2008 (I think), and I've lost data from old macs before (mini and iMac) when I did the 'change the password for this user' trick, which resulted in losing the keychain access (login keychain saved with different password), and loss of data access.  I'm not opposed to using John (the Ripper) to recover the password. (It's my laptop, after all, and I can let the recover run for days or even weeks without being concerned about it ... it would actually be quite nice, since then I could just change my password to something recent I'll actually remember!) But I've only ever heard of that program in passing, and I don't know how to prepare a mac for its use.  UPDATE: After extracting the hard drive and attempting to boot with it as an externally-attached drive, I received a hardware-level error that I "must reboot the computer". This does not bode well. I'm hoping that by hard-powering-down the computer I haven't corrupted the hard drive image of the logged-in session. I'm now attempting to copy the disk info to another external disk using the Restore function in Disk Utility, as suggested by in a referred answer...


How can I get my Android camera system working more like Google Earth's?

I'm implementing a touch screen interface whereby the user dragging their finger on the screen will rotate the camera in a sphere around the central point.  My code works well for the horizontal swipe (rotation around the y axis), but only covers a smaller angle from the vertical swipe (rotation around the x axis) instead of the full 360. I used the article - Spherical coordinate system form Wikipedia (), specifically the Cartesian Coordinates section, to do this. I've posted my code below. Can anyone help get this working through the full 360 degrees on both axis? See how Google Earth works when you swipe the globe for what I want.  This must have been done a billion times, but Google searches confuse with the phone built in camera, gps and the like. Thanks!  //Get current position oldX = getPosition().x; oldY = getPosition().y; oldZ = getPosition().z;  //convert to inclination/azimuth camRadius = Math.sqrt((oldX * oldX) + (oldY * oldY) + (oldZ * oldZ)); inclinationTheta = Math.acos(oldZ / camRadius); azimuthPhi = Math.atan2(oldY,oldX);  . . .  //use touch screen changes (deltaTouchX and Y) inclinationTheta = (inclinationTheta + deltaTouchScreenX) % (2 * pi); azimuthPhi = (azimuthPhi + deltaTouchScreenY) % (2 * pi);  //get new co-ordinates newX = camRadius * Math.sin(inclinationTheta) * Math.cos(azimuthPhi); newY = camRadius * Math.sin(inclinationTheta) * Math.sin(azimuthPhi); newZ = camRadius * Math.cos(inclinationTheta);  //set new position setPosition(newX, newY, newZ);


The "add comment" link is too close to the bounty notice, at least on beta sites

Now that , the "add comment" link on is too close to the bounty notice on posts with bounties and 0 comments.    The "add comment" link could do with a few more pixels of whitespace above it. You can see this behavior at . Note that the "add comment" link is adequately spaced for duplicate notices (and, I assume, other closure notices) - see :


I just recently bought a used Orbea road bike. The tires are currently iRC Jetty 700x23c on Omega ETRTO 622x13c rims.  is possible to change my tires to a bigger ones than the existing/ Possibly changing to 28c tires.  I am using the road bike to commute to work and cycle leisure on weekends but in my area there are lot of tram lines. Twice I got stuck in them, which is quite scary and dangerous. So I'm hoping this is possible, as I can't afford to get new rims too. Not at the moment.