I have conducted a moderation analysis as follows:  x (continuous independent variable, centered) m (continuous moderator, centered) y (dependent variable)  By entering x, m, and the product of x and m (x.m, interaction factor) into simultaneous regression, I get an overall significant model, with significant regression coefficients for x (beta x=0.273), for m (beta m=0.215) and for x.m (beta x.m=-0.034), all p<0.05. I understand that this means that m is a significant moderator of the relationship between x and y.   However, when I try to plot simple slopes at high (+1SD) and low (-1SD) levels of m, both slopes are nonsignificant (unstandardized slope 0.029, t=0.314 and p=0.89 for high m, and unstandardized slope 0.1349, t=0.902 and p=0.37 for low m). I believe this means neither slope is different from zero.  My question is, does this invalidate my interaction? Should I therefore not consider m a significant moderator of y on x? If the interaction is still valid, how do I report the results of the simple slope analysis?

I have two non-significant main binary variables in my binary logistic regression model, but their interaction is significant. The variables are centered and no multicollinearity is the case (all VIFs about 1.0). The main variables are nonsignificant, but their interaction is. I want to interpret that significant interaction of two non-significant estimates.   It would read something like this: the effect of the variable A is less visible in the level 1 of the variable B (B1) and more visible in the second level of B (B2). Or I can say the same thing about the effect of B being less visible in A1 and more visible in A2...  However, the problem is that neither the effect of A, nor the effect of B are significant! So the above interpretation, although seemingly correct, sounds inconsistent or strange. (How a non-significant effect is supposed to be boosted by the other variable?)...   On a second thought, it seems that it is actually possible. For example, if I exclude cases with B2 from my sample, now the effect of A in the sample would show up as significant (it is B2 cases in the sample that disallow A to appear as significant)... This is getting more clear in my head now, but do you still have something other than the above interpretation in mind?


I know this is something really small and stupid but I don't know why this doesn't work. Basically there are only two names of employees that can be used to login. These two names are stored in an array. Once the user enters a name and it's not one of the two correct ones, the program keeps asking for the user name.   String [] userNames = {"Jack", "Jill"};   logIn(userNames);  public static void logIn(String [] name) {     String userName = "";     Scanner kb = new Scanner(System.in);     System.out.print("Enter Username: ");     userName = kb.nextLine();     while (userName != name[0] || userName != name[1])     {         System.out.print("Enter Username: ");         userName = kb.nextLine();     }     System.out.println("Correct"); }

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


EDIT 1 This question was closed almost immediately, since it's supposed to be a . I beg to differ since the "original" question is about general argument binding, where this question (correctly) resolves a new issue via @Phil's comment. I believe that .bind prepending arguments before the hidden argument event on which you may then call event.preventDefault() is not common knowledge for all. For other's sake, I believe this question will stay open. EDIT 2 Another knowledge bomb (no sarcasm) from @Phil. In original question it is shown, that instead of .addEventListener('event', callable.bind(this, data)) a possibly clearer way would be .addEventListener('event', e => callable(e, data)) meaning using an intermediate anonymous function that you may put arguments into. A bonus here is that any data fetched (e.g. from a form) is fetched at the time of triggering event, which is clearly advantageous. ORIGINAL QUESTION I likely didn't do the title rightly, so please comment a more appropriate one for me to edit. Best explaining with an example. This works: <script> form.addEventListener('submit', (e) => {     e.preventDefault();     const data = {         name: form.name.value,     };     fetch('logics-url.php', {             ...,             body: JSON.stringify(data),         })         .then(r => r.json())         .then(d => console.log(d))         .catch(e => console.error(e)); }); </script>  Then I need the same logic-url.php called with different (additional) data when a button outside of the form is clicked. First I extracted the callable from inside of the addEventListener and this still works: <script> const callable = (e) => {     e.preventDefault();     const data = {         name: form.name.value,     };     fetch('logics-url.php', {             ...,             body: JSON.stringify(data),         })         .then(r => r.json())         .then(d => console.log(d))         .catch(e => console.error(e)); } form.addEventListener('submit', callable); button.addEventListener('click', callable); // button *is* defined in this scope </script>  Now I want to send different data these two addEventListeners and this where it fails me. <script> const callable = (e, data) => {     e.preventDefault();     // Removed data here     fetch('logics-url.php', {             ...,             body: JSON.stringify(data),         })         .then(r => r.json())         .then(d => console.log(d))         .catch(e => console.error(e)); }  const data1 = {     name: form.name.value, }; form.addEventListener('submit', callable.bind(null, data1));  const data2 = {     name: form.name.value,     trigger: 1, }; button.addEventListener('click', callable.bind(this, data2)); </script>  I foolishly tried binding e, when it does not exist yet, so I removed it. Then (as you can see) I tried binding null and this and they both resulted in error: # console Uncaught ReferenceError: e is not defined at callable  I tried different variations but most resulted in the above error. I also tried passing just dataN as a lone parameter and it resulted in: # console POST {...}/logics-url.php 400 (Bad Request) Error: SyntaxError: Unexpected token < in JSON at position 0  Do I have to duplicate my code or is there another way?

The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.


According to Newton's Gravitation Equation $$F=G \dfrac{M\cdot m}{r^2}$$ force of gravity depends upon mass of both objects, and $$F=ma$$ means force is proportional to acceleration. Then why do objects with different masses reach the ground at the same time in vacuum?

I'm far from being a physics expert and figured this would be a good place to ask a beginner question that has been confusing me for some time.  According to Galileo, two bodies of different masses, dropped from the same height, will touch the floor at the same time in the absence of air resistance.  BUT Newton's second law states that $a = F/m$, with $a$ the acceleration of a particle, $m$ its mass and $F$ the sum of forces applied to it.  I understand that acceleration represents a variation of velocity and velocity represents a variation of position. I don't comprehend why the mass, which is seemingly affecting the acceleration, does not affect the "time of impact".  Can someone explain this to me? I feel pretty dumb right now :)


Today I am starting to learn C++. And I have a question. But first I want to say that I searched the internet and I still haven't found the answer to my question. Please do not throw with dusty slippers in me. I am a beginner and my question is : Are C++ && G++ differents compilers or is it one compiler with many drivers for the programming languages? More precisely, for C and C ++. From what I understand, g++ is a driver for the C++ programming languages. But even here I vaguely understand what a driver for the C++ programming language is and why it is needed. In general, I'm confused. Could you kind people answer this question, because I can't understand? Please. And in the end, I want to say that maybe this question is stupid. But I'm just curious. Or am I not understanding something?

What is the difference between g++ and gcc?  Which one of them should be used for general c++ development?


I'm seeing : used in JavaScript a good bit and I can not figure out what exactly what its doing. Is it naming something? For example is the function being named onSave? Example is below.   onSave: function() {         var properties = this.getFormData(),             request = this.wfsBody("usa", "usa:pecotest", "geom",                               properties);             console.log(request);             this.makeRequest(request);enter code here

I'm learning JavaScript and while browsing through the jQuery library I see : (colon) being used a lot. What is this used for in JavaScript?   // Return an array of filtered elements (r) // and the modified expression string (t)    return { r: r, t: t };


I am interested in learning category theory, but I am concerned about its applications. I know its extremely important in functional programming but I want to know how this theory applies to the natural sciences like physics or biology etc. Moreover, how good is category theory in abstract theoretical mathematics? Why do we need this highly abstract theory in doing mathematics?

Okay, so I understand what calculus, linear algebra, combinatorics and even topology try to answer (update: this is not the case in hindsight), but why invent category theory? In Wikipedia it says it is to formalize. As far as I can tell, it sort of generalizes a bunch of fields in mathematics, like in topology, graphs and groups we have isomorphisms and automorphisms and homomorphisms, it seems to me like it just finds a bunch of results that are true to these functions in a bunch of disciplines. But why would generalizing that be of use? I mean, wouldn't it be easier to prove them specifically in each of the important disciplines?


I want to say that "now, I'm studying things other than what I learn in school" with this present perfect sentence: Due to quarentine, I have begun to study things out of school, especially languages. Is out of school idiomatic in this context? What could sound better? Thank you

By taking courses, I have learned topic A. Through self-studying and discussion with others, I have explored topic B.    I also study topic A outside the classroom. What I want to emphasis is that topic B is not in my curriculum, but I study it on my own. Extracurricular activities can include both activities contributed to academic study although outside the normal curriculum, but also activities not contributed to academic study such as sports, volunteer work, etc. I want to emphasis the former activities. Do you say "outside classes", when mentioning study by yourself, i.e.      Outside classes, I have explored B.      If it were you, how would you rewrite the first quote for the same       meaning?    Thanks!


For this exercise I am trying to create a mailbox mostly based on javascript. After all the emails are fetched, I display them with a for-of-loop. What I need to do now is provide an event listener to each email that runs the "show_email" function when I click on the mail. Unfortunately when I run this code and then try to click on an email, it always loads the email with the email.id that is 1, instead of the email with the email.id according to the loop position. Right now I have no idea how to fix this. Thanks for any help! function inbox() {   console.log('running function inbox');   fetch('/emails/inbox')   .then(response => response.json())   .then(emails => {     // looping through all mails to display them on the screen     for (email of emails){       const element = document.createElement('div');         element.innerHTML = `
         ${email.sender}         ${email.subject}         ${email.timestamp}
`;       // Link to open individual email (here it does not do what I want)       element.addEventListener('click', () => show_email(email.id));       document.querySelector('#emails-view').append(element);     }        }); }  function show_email(id) {   console.log(`Email ${id} is loaded...`) }


It looks like 'find', 'bash' and 'sed' in some cases does not work as one expects.  The following example should first create file 'sample.txt', then find the file and finally process it by '-exec' command. The executed command prints found filename, test specimens, and modified filename. The 'sed' command itself is used to replace 'txt' to 'TXT'.  touch sample.txt find ./ -maxdepth 1 -name "*.txt" -exec echo {} $(echo Specimen_before.txt {} Specimen_after.txt |sed -e "s/txt/TXT/g") \;   The expected output is:     ./sample.txt Specimen_before.TXT ./sample.TXT Specimen_after.TXT   Instead it produces:     ./sample.txt Specimen_before.TXT ./sample.txt Specimen_after.TXT   (the example has been tested also with old-school command substitution through backquotes '`' with the same result)  What am I doing wrong?

I was just trying to list all directories and files under current directory and also write if they are file or directory with the following command:  find -exec echo `echo {} : ;if [ -f {} ]; then echo file; else echo directory;fi` \;   I know it is a silly command, I can use other things like -type f or -type d, but I want to learn why that piece of code did not work as I expected. It just prints directory to all of them. For example while output of find is:  . ./dir ./dir/file   output of my code is :  . : directory ./dir : directory ./dir/file : directory   And output of   echo `echo dir/file : ;if [ -f dir/file ]; then echo file; else echo directory;fi`   is  dir/file : file   I am working on Ubuntu 14.10 and using find (GNU findutils) 4.4.2


Here is an example of file path:  /isf/GCM/VPfig/Aas/AR/ClCo el Doma Republic/VMN CRTro.txt   What I want to get is the file basename:  VMN CRTro.txt   So I try the following:  echo /isf/GCM/VPfig/Aas/AR/ClCo el Doma Republic/VMN CRTro.txt | sed s'/\// /g' | awk '{print $NF}' CRTro.txt     <-- not as expected   Or  basename  /isf/GCM/VPfig/Aas/AR/ClCo el Doma Republic/VMN CRTro.txt basename: extra operand `Doma' Try `basename --help' for more information.     <-- basename cant handle spaces    What the best way to get the basename of a file with spaces in it?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


Show that if $K_9 $is coloured red and blue and contains no red triangle and no blue $K_4$, then every vertex must have red degree $3$ and blue degree $5$.  I have absolutely no idea how to proceed :(

I am working on the following problem on 2-coloured complete graphs:     $K_9$ is coloured red and blue and contains no red triangle and no   blue $K_4$ then every vertex must have red degree 3 and blue degree 5.   Is this possible?   I am pretty sure the answer is 'no' but I am not sure how to explain my answer.  Any help would be greatly appreciated!


I'm looking for a VERY rough label for every county, so low-res data is fine here. Is there data on existing elevation change per county? Or should I get an elevation layer of the US and do a zonal summary of intersecting features? Where could I find a rough elevation raster of the US?

I need to classify every county in the US as either hilly, moderately hilly, or flat. Accuracy is not critical, just a rough classification. I used R and followed the advice in  answer to import elevation and counties and calculated the zonal variance. This was inherently biased towards larger counties since they have more surface for hills, so I need to divide by area. If I divide variance by square miles does that reasonably represent hilliness? The preliminary results seem decent, with the highest values being places like Colorado, Hawaii, Montana, etc.


I'm the lead developer of an open source software called GDevelop (): I'd like to distribute it on Ubuntu and benefit from the Launchpad platform to get it automatically compiled for most recent Ubuntu versions.  For now, I distribute a .deb package that can be installed normally. The package is built "manually" using an home-made script calling dpkg. It works well but I can only build the software for a single version of Ubuntu (the one I'm using to develop the software) and it would obviously be better if GDevelop had a PPA, instead of asking users to go on GDevelop website to download the latest .deb file each time a new version is released.  But I struggle to build a source package: I've been reading this article , but the link to the Ubuntu packaging guide is broken. I've been searching for information and there's lots of articles about packaging everywhere on the web but most do not have a step by step guide that start from the source until I get a package ready to be sent to Launchpad :/  Would you help me by pointing me to some nice articles/tutorials/Ask Ubuntu answers? I must admit that I'm a bit lost. For example, I can't get information about some very specific details :   My software is build using CMake. How does the build system can integrate with the packaging process? Is using make mandatory?  How can I specify the dependencies of my software? GDevelop uses wxWidgets and SFML for example. Is there any way I can get the output of a build made on Launchpad? I've tried to upload some source package but I got zero notification when the upload finished (I was excepting to get at least error messages or a notification, but nothing). How can I simulate the build of a source package when I get one?   Thanks for any help :)

Let's assume I have a working application written in C, C++ or Python. I want to create a Launchpad PPA so others can easily install it from a package. Please give step by step instructions for doing this from beginning to end. (Or provide a link that does the same ;)   Does the programming language matter? (Could it be a bash script?) Do I need to add anything to my build? Where should the build install itself to? How do I define dependencies? How do I use dependencies? How do I create a .deb? What do I need to do before uploading to Launchpad?


It occurred to me that this could be a very convenient way to keep a little bit of information sitting just in the background, ready whenever I need it.  I am referring to this list

As per this bug , shortcuts for the keyboard shortcuts overlay get pulled dynamically from user's settings.Is it possible to change which shortcuts are included (i.e. show more of them - Alt+F9 minimizes window on my computer but it is not included)?


The blog is currently a blogspot blog. Used part of the name of the real website that I got the idea to start a blog for. Time to get a registered domain for it, instead of the( name.blogspot.com )it is now I got itchy and bought a domain name that has 4 words and hyphens. Also, I believe it is an exact match domain. I see now that hyphens are possibly bad and so maybe are exact match domains. I am not sure if it is wise to use this new domain name or get a different one. Or, if I use this domain name should i just get it with no hyphens, just a run on of 4 words. A different alternative is to use the name of the site i originally started the blog for and add a couple words which I think would be exact matched domain. If I do that should I use hyphens or no hyphens.  Summary, Use hyphens or not in domain with 4 words but the 3 word is actually the letter n such as cookies-n-creme for example. Or, use the real websites name plus the two word exact match meaning NAMEwordword.com If I go this route do i use hyphens or not. I hope you can understand this question. Hard for me to put it into typing. The reason it is exact match name is that it is actually descriptive of the blog and I haven't been able to come up with anything descriptive that isn't.

Both in terms of SEO and user friendliness, is it better to put hyphens in a multi-words domain name or not ?  For example, is www.stackoverflow.com better than www.stack-overflow.com ?


A few minutes ago, while trying to post a question on , I was shown the dreaded error "You can only post once every 40 minutes"    According to , my last post for any Stack Exchange site was made  on Ask Different, while my last post on UX was from .    My only activity within the last four hours has been submitting two edits to existing posts, and accepting an answer on Anime & Manga.  Why am I being rate-limited when my last post was 15 hours ago?    Edit: I tried re-submitting my post on UX just after submitting this post on Meta SE. Strangely enough, Despite posting on Meta SE a few minutes prior, my post went through this time.  This leads me to believe there is some related issue here where posts on my high-rep account don't count towards the limit, but posts by different users on the same IP address do count.

I've literally just signed up to Stack Overflow and I tried asking my first question, unfortunately I keep getting this error message      You can only ask 50 questions in a 30-day period.   Having just signed up, I haven't asked any questions yet, and definitely not 50!  I am currently living in the halls at my university, could this be causing the problem? And if so, is there anyway I can get around this as I really need some help :(


Hi I'm currently working on a website project for a "fictional plane company". I want to be able to center the "main div" but for some reason I have a lot of margin at the right side. I've tried setting margin to 0 and setting width to 100%, but I can't figure out the problem.     .main{   position: absolute;   margin: 0px;   align-items: center;   width: 80%;   line-height: 2em;   display: flex;   flex-direction: column; }

Bestill fin flyreise
         <select class="" name="">             <option value=""><-- Fly fra--></option>             <option value="">Sarpsborg</option>             <option value="">Fredrikstad</option>             <option value="">Askim</option>             <option value="">Moss</option>             <option value="">Halden</option>         </select>         <select class="" name="">             <option value=""><-- Fly fra--></option>             <option value="">Sarpsborg</option>             <option value="">Fredrikstad</option>             <option value="">Askim</option>             <option value="">Moss</option>             <option value="">Halden</option>         </select>
Utreisedato
         <input type="date" name="" value="">
Antall reisende
         <input type="number" name="" value="" max="5">                  <input type="radio" name="" value=""> VIP plass (250,-)                  <button type="button" name="button">Bestill flyreise</button>

     JSFiddle:

How can I horizontally center a
 within another
 using CSS?

Foo foo


Though I am not sure, I believe the noun "interest" is uncountable, hence using an indefinite article before that must be incorrect, yet it sounds so weird without it. Which one is correct? My limited knowledge leads me to the latter, however, my ears lead me to the first one.  Happy Holidays,

"Mornings came and cast a blinding sunlight over everything, and he felt like nothing worthwhile could be accomplished."  For some reason, I feel like "a blinding light" is ok, but if its sunlight, then I should drop the "a" and write "cast blinding sunlight", but I'm not sure why I feel this way.   Can anyone offer some enlightenment?  edit - alternate phrasing, closer to being a literal translation: "Mornings came without warning, flooding the day with a strong sun, and he felt like nothing worthwhile could be accomplished."   I would still like an answer to the technical question of whether I should drop the "a", but would also appreciate knowing if anyone thinks option #2 is a better choice.


I am a citizen of two non-EU countries, both of which are allowed 90-day visa-free stays in the EU. Can I stay in the EU 90 days on one passport, leave the EU for one day then re-enter the EU on the other passport for a further 90 days? Looking to spend (up to) 6 months straight in the EU without breaking visa rules. Which comes first - the passport or the individual I guess?

If I have two passports with different numbers can I stay 90 days in a country, leave for a few days and return for another 90 days with my second passport? Is my information stored in some database or do they just check your passport stamps? I am asking about visiting Ukraine specifically


In reinforcement learning we use lot of expectations, what's the logic behind them?  Like in reward function, we use expected return instead of return, in value functions V and action-value functions Q we use expectation. Almost every-term in reinforcement learning is written in the form of expectation. Why?  Why do we use expectations?


I installed transmission-daemon in order to have a command-line torrent downloader which I could access through SSH. My problem is that I am struggling to understand how to use it.  I have run transmission-daemon -c $HOME/TorrentFiles in order to set a folder to watch for new .torrent files  I have run transmission-daemon -w $HOME/Downloads to set the destination folder of downloaded files  As soon as I add a torrent file to the TorrentFiles folder, the extension .added is added, but the download of the torrents don't seem to begin !!  How to make it work ??  Thanks in advance !!  --  EDIT : It seems like the daemon does not start automatically the download and I'm supposed to run either transmission-remote -s or click on a button from the web interface. But I can't do it for authentication reasons (on the web interface, I get a 403 Error) : I've tried to edit .config/transmission-daemon/settings.json, but it doesn't help modifying "rpc-whitelist"'s value to "127.0.0.1,192.168.*.*" nor setting "rpc-whitelist-enabled" to false.  PS : rpc-authentication-required is already false.  PS : Obviously, I have stopped the daemon before editing and started it again afterwards.

Since I upgraded my ubuntu server installation from 16.04 to 16.10, the transmission-daemon service seems to be ignoring settings.json.  The symptom is that the web interface gives me:  403: Forbidden  Unauthorized IP Address.  Either disable the IP address whitelist or add your address to it.  If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.   but in /etc/transmission-daemon/settings.json we have, unchanged from before the upgrade:  "rpc-whitelist": "127.0.0.1,192.168.23.*", "rpc-whitelist-enabled": true,   /var/lib/transmission-daemon/.config/transmission-daemon/settings.json also points to /etc/transmission-daemon/settings.json:  jast@achilles:/etc/transmission-daemon$ sudo ls -l /var/lib/transmission-daemon/.config/transmission-daemon/ lrwxrwxrwx 1 root root 38 Sep  5 12:56 settings.json -> /etc/transmission-daemon/settings.json   syslog after doing service transmission-daemon restart (I think it should usually be also tellung me what ips it adds to the whitelist:  Jan  7 13:16:37 achilles transmission-daemon[4087]: Closing transmission session... done. Jan  7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84) Jan  7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95) Jan  7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set receive buffer: requested 4194304, got 425984 (tr-udp.c:84) Jan  7 13:16:38 achilles transmission-daemon[5025]: [2017-01-07 13:16:38.552] UDP Failed to set send buffer: requested 1048576, got 425984 (tr-udp.c:95)   So where is it trying to get its config from now?


The communities section under profile, when empty, the empty state doesn't have space after the heading. This happens throughout the Stack Exchange network.  This happens everywhere. Update: I am unable to find this where it happens. Could even be a loading part. How did this come in BTW?

Padding is missing under the "Communities" border line, and the list is also showing "Communities (0)" (maybe the reason is due to caching as it shows 0 Communities):  Generally, padding is present:


When a metal or rubber is bent and deformed, it heats up. What is the reason for this? I know that when deforming it, work is done on the object. If the object is perfectly elastic, all of the energy is stored as elastic potential energy, which is released when the stress is removed. But if it not perfectly elastic, by energy conservation, some of the energy is dissipated as heat. By what mechanism does the energy stored due to compression/stretching of chemical bonds (e.p.e) end up increasing the temperature (proportional to avg translational k.e of molecules)?

I  always used to wonder why this happens..   when one stretches a rubberband to nearly it snapping point holding it close to your skin - preferably cheek(helps feel the heat), it emits heat. While releasing the stretched rubberband holding it close to the skin produces a cooling effect on the skin. Can some one explain the physics behind this pls?


Is there a geometric intuition for integration by parts? $$\int f(x)g'(x)\,dx = f(x)g(x) - \int g(x)f'(x)\,dx$$ This can, of course, be shown algebraically by product rule, but still where is geometric intuition? I have seen geometry of IBP using parametric equations but I don't get it. Newest edit: few similar questions has been asked before, but they use parametric equations to show geometry behind IBP. I am interested if there is geometric intuition which uses functions in Cartesian plane or some other, maybe more natural, explanation.

Integration by parts comes up a lot - for instance, it appears in the definition of a weak derivative / distributional derivative, or as a tool that one can use to turn information about higher derivatives of a function into information about an integral of that function. Concrete examples of this latter category include: proving that $f \in C^2(S^1)$ implies that the Fourier series of $f$ converges absolutely and uniformly, and the Taylor series expansion with the integral formula for remainder.  However, I don't feel like I really understand what integration by parts is really doing. To me, it is just an algebraic trick that follows from the fundamental theorem of calculus and the product rule. Is there some more conceptual way to think about it?  How do you think about this useful idea?


What is the best practise in terms of JavaScript and CSS versioning?  If we don't version then the browser could have a older cached version is z_1.0.js  Using version control will solve this issue but I don't see it used a lot on other websites?

I have noticed that some browsers (in particular, Firefox and ) are very zealous in using cached copies of .css and .js files, even between browser sessions. This leads to a problem when you update one of these files, but the user's browser keeps on using the cached copy. What is the most elegant way of forcing the user's browser to reload the file when it has changed? Ideally, the solution would not force the browser to reload the file on every visit to the page.  I have found  and  suggestion to be useful. It turns out there is a term for this: auto-versioning. I have posted a new answer below which is a combination of my original solution and John's suggestion. Another idea that was suggested by SCdF would be to append a bogus query string to the file. (Some Python code, to automatically use the timestamp as a bogus query string, was .) However, there is some discussion as to whether or not the browser would cache a file with a query string. (Remember, we want the browser to cache the file and use it on future visits. We only want it to fetch the file again when it has changed.)


(focal)kia@localhost:~$ sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu $(lsb_release -cs) main" Get:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease [6,257 B] Err:1 https://dl.winehq.org/wine-builds/ubuntu focal InRelease             The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease Hit:4 http://archive.ubuntu.com/ubuntu focal-security InRelease Reading package lists... Done W: GPG error: https://dl.winehq.org/wine-builds/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F E: The repository 'https://dl.winehq.org/wine-builds/ubuntu focal InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  How do I fix this?

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


I have a text area in my form that users generally copy-and-paste text into from their word document, as they prepare it beforehand. I am having issues with a single-quotes, but not all of them. If I am not mistaking, I do believe that its some sort of a different characters possibly from Mac side of things.   When saving to database, characters are escaped so I don't get &rsquo; or something like that, but the quote itself is not "regular" one, it comes up as don’t instead on don't (see the different in quote?) It does not cause issues anywhere else in the code, but I do have fpdf export where that quote shows us as donâ€™t and I don't know how to address this issue.  I would much rather "convert" the characters to regular format before they are saved, then to deal with them retroactively during fpdf export. What am I doing wrong? Thanks!

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I just edited /etc/systemd/logind.conf to ignore lid close, as opposed to suspend, which seems to have worked. But now when I close the lid my external monitor goes to sleep. The system is still running though - if I move the mouse the monitor wakes up immediately.  Why is this happening?

I would like closing the laptop lid to be a no-op. How can I do that?


As my title - can I see the comments given by me with their score?  Of course I can track my all comments in profile-->activity-->comments  It will show the list of all comments given by me with timestamps. But it doesn't show the score I have got on my comments. If i have to see their score I have to open each comment given on a question or answer.  Is there another way to see the score with the comment list, just like I can see the score of posts?

Pundit  Left 10 comments with score of 5 or more   I saw a discussion question that mentioned Pundit, which that stated that , however, something like top voted comments seems to fit in with the rest of stackoverflows feature set, as well as indirectly provide a method to track progress on this badge. Should there be (or is there already) a list of my top voted comments somewhere?


I use biblatex to create the formatted bibliography, and I want to order citations in an alphabetical order of auther's name and then publicated year by ascending. I post a picture to show what I want:   As we can see from above, the style is like plain,which is what I want.However, the order of references is not in an alphabetical order of auther.  I found several methods on the forum but none of them satisfy my needs.   I tried this, but it fails:  \documentclass{article} \usepackage[sorting=ydnt]{biblatex} \addbibresource{\ref.bib}  \begin{document} \nocite{*} \printbibliography \end{document}

I'm facing a problem with biblatex citation order.  Using this configuration:  \documentclass {article} \usepackage[brazil]{babel} \usepackage[utf8]{inputenc} \hyphenation{es-ta-bi-li-da-de} \usepackage{setspace} \singlespacing \usepackage[natbib=true,style=numeric]{biblatex} \addbibresource{frameworks.bib}   Being frameworks.bib this:  @Article{JONHSON88, author = {Ralph Johnson, Brian Foote}, title = {Designin Reusable Classes}, journal = {Journal of Object-Oriented Programming SIGS}, year = {1988}, key = {Johnson:88}, volume = {1}, number = {5}, pages = {22-35}, month = jun }  @book{UML-F:00, author = {Fontoura M., Pree W., Rumpe B.}, editor = {Addison-Wesley}, title = {The UML Profile for Framework Architectures}, year = {2000}, }   The PDF is generated with a text like:  Something about something[4], and moo foo other children[1].   This citation [4] is the first in all text. How can I order this correctly to [1]...[2] ...?


I am using the Hamilton's formulation of the geodesic equation in order to obtain geodesic equations in terms of the particle's coordinates and the conjugate momenta. Now, I am figuring out a way to distinguish timelike, null and spacelike geodesics. How do I treat timelike geodesics in particular when using the Hamiltonian formulation?

I try to understand constructing of Hamiltonian mechanics with constraints. I decided to start with the simple case: free relativistic particle. I've constructed hamiltonian with constraint:  $$S=-m\int d\tau \sqrt{\dot x_{\nu}\dot x^{\nu}}.$$  Here $\phi=p_{\mu}p^{\mu}-m^2=0$  $-$ .  Then $$H=H_{0}+\lambda \phi=\lambda \phi.$$   So, I want to show that I can obtain from this Hamiltonian the same equation of motion, as obtained from Lagrangian.  But the problem is that I'm not sure what to do with $\lambda=\lambda(q,p)$. I tried the following thing:  $$\dot x_{\mu}=\{x_{\mu},\lambda \phi\}=\{x_{\mu},\lambda p^2\}-m^2\{x_{\mu},\lambda\}=\lambda\{x_{\mu},p^2\}+p^2\{x_{\mu},\lambda\}-m^2\{x_{\mu},\lambda\}$$$$=2\lambda \eta_{\mu b} p^b+p^2\{x_{\mu},\lambda\}-m^2\{x_{\mu},\lambda\}=2\lambda \eta_{\mu b} p^b+p^2\frac{\partial \lambda}{\partial p^{\mu}}-m^2\frac{\partial \lambda}{\partial p^{\mu}},$$  $$\dot \lambda=\{\lambda, \lambda \phi \}=\{\lambda,\lambda p^2\}-m^2\{\lambda,\lambda\}=\lambda\{\lambda,p^2\}+p^2\{\lambda,p^2\}=2\lambda\eta_{ak}p^{a}\frac{\partial \lambda}{\partial x^{k}},$$  $$\dot p_{\mu}=\{p_{\mu},\lambda p^{2}-m^2\lambda \}=p^{2}\{p_{\mu},\lambda\}-m^2\{p_{\mu},\lambda\}=-p^{2}\frac{\partial \lambda}{\partial x^{\mu}}+m^2\frac{\partial \lambda}{\partial x^{\mu}}.$$  If we recall that $p^2-m^2=0$, then we get from the third equation: $\dot p=0$, and from the first: $$\dot x_{\mu}=2\lambda\eta_{ak}p^{a}.$$  So we have    $\dot x_{\mu}=2\lambda\eta_{\mu b}p^{b}.$ $\dot \lambda=2\lambda\eta_{ak}p^{a}\frac{\partial \lambda}{\partial x^{k}}.$ $\dot p=0.$   But I don't know what to do next. Can you help me?


I found a bug in c++. I tested it with some compilers, and they all gave me the wrong. Basically we have two variables: a and b. a equals to 2.85f and b equals to 0.85f. If we do a - b we'll end up with two. If we do floorf(a), it also equals to two. That means they both equal. But if we compare their equality, somehow that gives us false. If we test it with different numbers (a = 2.84f, b = 0.84f etc.) it gives us the right answer which is true. I tested the code with TDM-GCC 4.9.2, TDM-GCC 5.1.0 and Visual Studio 2017. Here is the code:  #include <iostream> #include <cmath> using namespace std;  int main() {     float a = 2.85f;     float b = 0.85f;      cout << "a: " << a << endl          << "b: " << b << endl          << "floorf(a): " << floorf(a) << endl          << "a - b: " << a - b << endl          << "floorf(a) == (a - b): " << (floorf(a) == (a - b) ? "True" : "False");     return 0; }

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Being a German mastering the English language and having to read specialist literature in both languages for business reasons, it is likely ....   I am referring especially to the first part of the sentence...

I am considering to set up a cyber cafe.   I am considering setting up a cyber cafe.      I think it should be version #2 where the verb considering is followed by the gerund setting. But it sounds unnatural to me.  Can we use a gerund after "Verb+ing"?


yields a Runtime Error:  Server Error in '/' Application.    Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

When using data.stackexchange.com I fail to remember if as [post link] is the correct alias to get the url for the post. Luckily the site has an  link. Unfortunately it is now broken. Can this be fixed?


One of the cops escorts Tim out of the house and toward a police car. Curious neighbors have gathered outside. Tim spits on the cop escorting him. (1) - Tim spits on the cop who's escorting him. (2) - Tim spits on the escorting cop. (3)  Are the three suggested sentences all OK or are some of them awkward-sounding?

One of the cops escorts Tim out of the house and toward a police car. Curious neighbors have gathered outside. Tim spits on the cop (who's) escorting him.   Is "escorts" the more natural choice of verb to use in this context?  Is the emboldened sentence phrased naturally without adding "who's"?


Hi I am newbe in Drupal 8 and learning the new plugin system introduced in Drupal 8. I understood the concept of pluggin and also created few plugins like block and field fomatters. But I am not able to undestand the defination of pluging. Like it says     "A plugin is a small piece of functionality that may be swapped in and   out of your drupal site"   Can someone please explain (with example) the term swapped is used in context of Drupal 8.

Let's say that I want to replace the block_content_type plugin of the core block_content module to ad some features while not having to rewrite a whole module to achieve this.  It is very easy to replace a service by providing your own service definition with the same key as the to-be-replaced service. How do I replace a plugin with another one?


I am trying to detect if exactly 1 player is in a radius using testfor. To my understanding, I should be able to use the c argument to count players, but I am having no such luck.  /testfor @e[x=0,y=0,z=0,r=100,c=1]   The intended output of this command is to return true if exactly 1 players is within 100 blocks of 0,0,0, and false if not.  If it makes any difference, testing for less than 2 players would solve my problem as well.

I want to run a command when there are only 10 entities left. I know you can use /execute unless entity to detect when all matching mobs have died, but it doesn't work if you want to run a command when there are for example 10 entities left.  A command like /execute if entity @e[limit=10] does not work, it also triggers if there is only one entity.  Such a counting system could also be used to determine once there is only one player left in an arena, meaning they have won a battle or similar.


As far as I understand, to make kernel execve a non-ELF file, the file must be a script started with a she-bang #!, but I have a script run successfully without it, why does this happen?  xtricman⚓ArchVirtual⏺~🤐ls a.sh -l -r-xr-xr-x 1 xtricman users 23 9月  26 18:45 a.sh xtricman⚓ArchVirtual⏺~🤐cat a.sh echo "FDHDSFHGFKJJHGO" xtricman⚓ArchVirtual⏺~🤐./a.sh FDHDSFHGFKJJHGO   This a.sh script doesn't contain a she-bang, so how does it run?

Suppose the default shell for my account is zsh but I opened the terminal and fired up bash and executed a script named prac002.sh, which shell interpreter would be used to execute the script, zsh or bash? Consider the following example:  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % sudo cat /etc/passwd | grep papagolf [sudo] password for papagolf:  papagolf:x:1000:1001:Rex,,,:/home/papagolf:/usr/bin/zsh # papagolf's default shell is zsh  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % bash # I fired up bash. (See that '%' prompt in zsh changes to '$' prompt, indicating bash.)  papagolf@Sierra:~/My Files/My Programs/Learning/Shell$ ./prac002.sh  Enter username : Rex Rex # Which interpreter did it just use?   **EDIT : ** Here's the content of the script  papagolf@Sierra ~/My Files/My Programs/Learning/Shell % cat ./prac002.sh  read -p "Enter username : " uname echo $uname


$\sqrt{2 + \sqrt{2+\sqrt{2+\sqrt2...)}}}$.  Pretty classic question, I think - and the limit is equal to 2.  But how do I prove this rigorously?  An epsilon-delta proof wouldn't work, since I wouldn't know the limit is equal to 2 - the question asks, if the limit exists, compute it.  This was for an old analysis exam, not a calculus class, so I feel that I can't just set the above = some number L, and then make algebraic manipulations on both sides of the equation, until I get what I want.  We can't assume the limit exists, I think.  Thanks,

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


What is the simple demonstration with elementary means for Lalescu Sequence: $$\lim_{n\to\infty}(\sqrt[n+1]{(n+1)!}-\sqrt[n]{n!}) = \frac{1}{e}?$$  (Traian Lalescu-romanian mathematician (1882-1929))

Could be the following limit computed without using Stirling's approximation formula?  $$\lim_{n\to\infty} \frac{1}{\sqrt[n+1]{(n+1)!} - \sqrt[n]{(n)!}}$$  I know that the limit is $e$, but I'm looking for some alternative ways that doesn't require to resort  to the use of Stirling's approximation. I really appreciate any support at this limit. Thanks.


What is the meaning of the line int operator ()(int n) ?  It looks like a function but what is it?  class collatzer { private:     int counter = 0;  public:     int operator ()(int n)     {         if(n==1)             return counter;          else if(n%2==0) //if n is even         {             counter += 1;             return (*this)(n / 2);         }         else         {             counter += 1;             return (*this)(3 * n + 1);         }     }      int getCounter()     {         return counter;     } };

I keep hearing a lot about functors in C++. Can someone give me an overview as to what they are and in what cases they would be useful?


I want to sudo apt build-dep r-base under Ubuntu 16.04 (running in Linux on DeX Beta). To this end, I followed  and put  deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe   into /etc/apt/sources.list, then did  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9   and then  sudo apt update sudo apt build-dep r-base   ... but obtain:   Reading package lists... Done E: Unable to find a source package for r-base   I've done these things before and recently under Ubuntu 19.04 (guess that's not relevant), is the aarch64 architecture a possible problem here? (I could install all sorts of preliminaries to build R from source (Tcl/Tk, GSL, GMP, MPFR...), all no problem). Let me know if you need the output of certain commands.   Note:  Concerning /etc/apt/sources.list: There was already a line deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted and I also commented in the same line starting with deb-src instead of deb. This led to exactly the same output. The file also contains the lines deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe.

I need to install build-dependencies of something, how do I ensure the source code section of my software sources is enabled?


I've been working on a large model in Blender 2.7, and I split it into layers to manage it better. Now I've updated to 2.83, and I've learnt about layers being replaced by collections. However, when I open my file in 2.83, I get this in the Outliner:  Even though all collections have the open eye, only the first one is visible, and the View submen only shows the first one:  Is this something related to my file being migrated to 2.83? How do I get all my objects back again?

I just got a updated to blender 2.8 and my objects that were in hidden layers are gone now, the collection layer tells me that they are in the scene but I cant unhide them also the collection is grayed out as well.


I am asking if there is a similar idiom like the German expression "Jemanden die Trauben in den Mund legen" - "to lay the grapes into somebody's mouth".  To say: You need to study that for yourself and should not expect that others always give you the fruits of effort.

I don’t know how to describe this properly. I just translated what description to English that I use in my native language (Bangla/বাংলা) The situation is like this: Some people always need others’ help to do things. They seek help for every little step. If you aggregate the help, you'll find that they didn't do anything by themselves. They got someone to help them to do every small task. For example, Robert asks Andrew how to post question on . Then he asks where to type the title even though the Title input label is seen very clearly. After that Robert will ask “Hey Andrew, Could you tell me some good title sentences that I can put here?” It goes on. Robert is not actually asking questions. He is asking for so many details that it makes Andrew do the whole task. My question is how to tell Andrew, “I can not feed you every time by my own hand”? Is there any single word? Any idiom?


I'm trying to prove the following result: If $f : [0,1] \to \mathbb{R}$ is integrable and the integral of $f$ is $0$ on every subinterval $I$ of $[0,1]$, then the integral of $\int_0^1|f|$ is $0$.  I have no idea how to proceed. Can you please suggest a method of attack or provide a proof?  Thank you.

Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be a Borel measurable function, such that $\displaystyle \int_{a}^{b}f(x)dx=0$ for every $a<b$ in $\mathbb{R}.$ Is it true that $f(x)=0$ for every $x\in \mathbb{R}$?  Comments: the starting point of this is to prove that the (Borel measurable) density function $f$ (if exists) of a symmetric random variable $X$ (meaning that $X,~-X$ have common cdf's) is even. If my question has a positive answer, it follows easily.   Thanks a lot for any comments!


I had a dual boot setup on my system, with Ubuntu 11.04 and Win7. Yesterday I updated Ubuntu to 11.10. Now , I cannot seem to be able to load Win7. I do see an entry for it on the boot menu, but when I select that entry and the screen goes black, with everything coming to a standstill. I tried waiting for it to respond but nothing happened.  I went through the forums and tried grub-update but when I do that, nothing really happens. I am not sure of this, but I get no output from grub for up to 10 minutes (can grub-update be made verbose?)  How can I fix this and get back to booting both OSs properly?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I have a directory in my home-directory, which I share with a UNIX-group, but now want to delete.  If there is a file owned by an other user in this directory, I can remove it with rm, because the directory is owned by me. Not so with sub-directories, which are owned by other users. I can not delete them with rm -rf or rmdir.  me@unix:~/blub.git$ ll total 3 drwxrwxr-x 5 me collab 5 Nov 30 13:32 objects me@unix:~/blub.git$ cd objects/ && ll total 8 drwx------ 2 bob collab 3 Nov 30 13:31 bb drwx------ 2 bob collab 3 Nov 30 13:31 cf drwx------ 2 bob collab 3 Nov 30 13:32 e6 me@unix:~/blub.git/objects$ rm -rf bb rm: cannot remove `bb': Permission denied   How do I get rid of this shared folder anyway? Without help from root or the other user?  Or to ask the question in an other way: How can I really rmdir a not-empty directory without having to recursively rm -rf all the stuff in it?  Edit:       To delete a directory (with rm -r), one must delete all of its contents recursively. This requires that one must have read and write and execute permission to that directory (if it's not empty) and all non-empty sub-directories recursively (if there are any). The read permissions are needed to list the contents of the directory in order to delete them. This sometimes leads to an odd situation where a non-empty directory cannot be deleted because one doesn't have write permission to it and so cannot delete its contents; but if the same directory were empty, one would be able to delete it.   Is this really true?

I am a non-root user, and have made a directory into which other users in my group can write. The directory is setgid, so files and directories within it have the same group.  I can delete files placed into this directory, but if a user creates a subdirectory with files in it, I can't seem to delete those. Is there something special I can do (other than, say, bothering the user in question or the sysadmin about it) to get rid of this subdirectory?  EDIT: Inevitably, of course, someone asks "why?"  The shared folder in question is a mercurial repository. We can't use a shared-account ssh-key-based server for this like mercurial-server, and we can't just host it externally for various reasons. But that part works fine. We use Redmine for project management, but it does not yet read the repo index for file contents - it reads the working directory. So the working directory must be kept up-to-date. crontab has been disabled by the sysadmin, so that's out. So I naïvely put a changeset hook in the shared repo that performed an "hg update". This seemed to work fine initially, until, of course, someone pushed a commit with a new directory. While I had vague thoughts of trying to make a setuid script for the hook, I'll probably just consider safer avenues.


The notion I have received while trying to study Measure theory that it is helpful when we move from discrete domain to continuous domain because in discrete domain we can count individual entities but in continuous domain we can't count. So are we replacing counting to measuring in such scenarios? A set has a measure defined on it such as an open set of $\mathcal{R}$ because its domain is infinite?

We have a random experiment with different outcomes forming the sample space $\Omega,$ on which we look with interest at certain patterns, called events $\mathscr{F}.$ Sigma-algebras (or sigma-fields) are made up of events to which a probability measure $\mathbb{P}$ can be assigned. Certain properties are fulfilled, including the inclusion of the null set $\varnothing$ and the entire sample space, and an algebra that describes unions and intersections with Venn diagrams.  Probability is defined as a function between the $\sigma$-algebra and the interval $[0,1]$.  Altogether, the triple $(\Omega, \mathscr{F}, \mathbb{P})$ forms a probability space.  Could someone explain in plain English why the probability edifice would collapse if we didn't have a $\sigma$-algebra? They are just wedged in the middle with that impossibly calligraphic "F". I trust they are necessary; I see that an event is different from an outcome, but what would go awry without a $\sigma$-algebras?     The question is: In what type of probability problems the definition of a probability space including a $\sigma$-algebra becomes a necessity?       provides a plain English accessible explanation. The idea is a spinning pointer rotating counterclockwise on a circle of unit perimeter:       We begin by constructing a spinner, which consists of a circle of unit   circumference and a pointer as shown in [the] Figure. We pick a point   on the circle and label it $0$, and then label every other point on the   circle with the distance, say $x$, from $0$ to that point, measured   counterclockwise. The  experiment  consists  of spinning the pointer and    recording the label of the point at the tip of the pointer. We let the random   variable $X$ denote the value of this outcome.  The sample space is   clearly the interval $[0,1)$.  We would like to construct a   probability model in which each outcome is equally likely to occur. If   we proceed as we did [...] for experiments with a finite number of   possible outcomes,  then we must assign the probability $0$ to each   outcome,  since otherwise,  the  sum  of  the  probabilities,  over    all  of  the  possible  outcomes,  would not equal 1.  (In fact,   summing an uncountable number of real numbers is a tricky business;    in  particular,  in  order  for  such  a  sum  to  have  any  meaning,   at  most countably many of the summands can be different than $0$.)    However, if all of the assigned probabilities are $0$, then the sum is   $0$, not $1$, as it should be.   So if we assigned to each point any probability, and given that there is an (uncountably) infinity number of points, their sum would add up to $> 1$.


I have a level 17 sorceress with a Scroll of Wish, and a Tome of Leadership and Influence. I also have the wish spell.  I was wondering if I could use my scroll to go back in time 5000 years (or however many), read my tome, use the wish spell to cast sequester on myself to reawaken in a century, and read the tome again. Repeat till back to present day.  As far as I can find, there is no limit to how many times you can read tomes of the same type, and i have found nothing on reading the same one multiple times because everyone assumes you dont live long enough to read it again.

Assume we have a Wizard who is at least level 13 and can reliably cast  many times (either through acquired spell scrolls, or has acquired enough material components for it to be a non-issue), has a safe place (through the spell ) to be under the influence of Sequester for many centuries, and has access to the Manual of Bodily Health, Manual of Gainful Exercise, Manual of Quickness of Action, Tome of Clear Thought, Tome of Leadership and Influence, and Tome of Understanding.  Per the item descriptions in the DMG:     ...your [STAT] score increases by 2, as does your maximum for that score. The manual then loses its magic, but regains it in a century.   Now, normally this would be a once-in-a-lifetime use, or maybe twice (due to the lifespan of the races), but if a wizard used Sequester on themself, many years can pass without growing older:     ...[willing target creature] falls into a state of suspended animation. Time ceases to flow for it, and it doesn't grow older. You can set a condition for the spell to end [before the spell is dispelled by the caster].   So, assuming that time continues to flow for the magic items, but not for the sequestered wizard, can they study these books and take the necessary long rests, Sequester for a hundred years,  “wake” from the Sequester, and then repeat an arbitrary-but-finite number of times for an arbitrarily high (but finite) improvement to their stats?  To end the cycle and escape the demiplane, the wizard would simply Plane Shift out:     ...You can specify a target destination in general terms ... and you appear in or near that destination.


From the question on SuperUser, , I tried to make a hyperlink out of this:  chrome://net-internals/#dns   It didn't work:         It would be nice if it did though. How much work would it be to add chrome:// as a trigger for a link, in much the same way as ftp://, https:// and http:// do?  However, I do realise that this could open the floodgates for all sorts of weird and wonderful URL support requests.

Possible Duplicate:          I would like to link to chrome://net-internals/ (a local Google Chrome page for debugging purposes), but it won't let me do that:   When I click the link button, it results in chrome://net-internals/ (notice the http:// prepended to the actual URL). When just pasted, it doesn't show up as a link: chrome://net-internals/   I understand that there are hardly any links of this type, but since this format (foo://bar/) is clearly a link, could such links be parsed as actual links?


So in quantum mechanics, most of the people uses exponential equation to handle the problem and present the relationship. Another word, we often handle the classical wave function in trigonometric way by utilizing sine and cosine. How can these two be correlated?  Using Euler's formula the exponential equation will finally result in an excess imaginary term of $i\sin(kx-\omega t)$. What is the formal process to deal with this?

I've read that plane wave equations can be represented in various forms, like sine or cosine curves, etc. What is the part of the imaginary unit $i$ when plane waves are represented in the form $$f(x) = Ae^{i (kx - \omega t)},$$ using complex exponentials?


My friends are planning a game with a group of paladin characters. One of my friends is interested in the Oath of Devotion, which has the following tenets:  Honesty. Don’t lie or cheat. Let your word be your promise. Courage. Never fear to act, though caution is wise. Compassion. Aid others, protect the weak, and punish those who threaten them. Show mercy to your foes, but temper it with wisdom. Honor. Treat others with fairness, and let your honorable deeds be an example to them. Do as much good as possible while causing the least amount of harm. Duty. Be responsible for your actions and their consequences, protect those entrusted to your care, and obey those who have just authority over you.  However, he doesn't want to have to actually do any of these things when he takes the oath. Does he have to keep these vows to have his paladin abilities and spells, or can he ignore them?

I'm looking through the PHB and I notice that none of the Classes explicitly state an Alignment or Race limitation.  There is flavor text, but there is nothing that looks like a rule. I see some stuff scattered around, e.g., Alignments lists Paladins under Lawful Good. This seems like an actual rule since it doesn't say "Many Paladins" or "Most Paladins" but very definitively "Paladins". I know that Paladins are Lawful Good in older revisions, but assuming I knew nothing about D&D, is there a definitive (RAW) grid somewhere in the PHB or supplemental documentation?  Or is a Neutral Good Tiefling Rogue perfectly acceptable?


I really don't know why the if statement below is not executing:  if (s == "/quit") {     System.out.println("quitted"); }   Below is the whole class.  It is probably a really stupid logic problem but I have been pulling my hair out over here not being able to figure this out.  Thanks for looking :)  class TextParser extends Thread {     public void run() {         while (true) {             for(int i = 0; i < connectionList.size(); i++) {                 try {                                    System.out.println("reading " + i);                     Connection c = connectionList.elementAt(i);                      Thread.sleep(200);                      System.out.println("reading " + i);                      String s = "";                      if (c.in.ready() == true) {                         s = c.in.readLine();                         //System.out.println(i + "> "+ s);                          if (s == "/quit") {                             System.out.println("quitted");                         }                          if(! s.equals("")) {                             for(int j = 0; j < connectionList.size(); j++) {                                 Connection c2 = connectionList.elementAt(j);                                 c2.out.println(s);                             }                         }                     }                 } catch(Exception e){                     System.out.println("reading error");                 }             }         }     } }

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


How do I get the restricted drivers update on xubuntu, does not show-up in update manager? The restricted driver icon is not available on the launch bar on top.

I'm aware there's already been  regarding Nvidia drivers, but my case is a little different. My wireless adapter's driver is proprietary, and for a minimal install, I need a command to install it. A general command for any other restricted driver that I may come across in the future would also be extremely helpful.


I remember watching this as a child, it was very scary for me, I had nightmares. I think it's around 25-30 years old.  It's happening on an airport, there is some time traveling included I think, and then some huge round creatures with mouths full of scary teeth like saws appear and eat everything.

I thought it was The Tommyknockers by Stephen King, but after a check with Wikipedia, it appears that's not the case.  What I remember about the story (a TV movie I think, but definitely based on a book) was that the world is created anew every night, and that the old, used up, Earth was eaten nightly by some scary creatures.  The major plot point involved some protagonists not getting onto the new world at midnight, and having to escape from the monsters that were eating up yesterday's planet.  Does this ring a bell for anyone? I'm finding it very hard to Google for.


A diﬀeomorphism $f : S_1 \to S_2$ is conformal if and only if there exists a smooth positive-valued function $\lambda : S_1 \to \mathbb{R}$ such that $$\langle(df)_p(v_1),(df)_p(v_2)\rangle_{f(p)} = \lambda(p)^{2}\langle v_1,v_2\rangle_{(p)}$$ for all $p\in S_1$ and all $v_1,v_2 \in T_pS_1$.  How can we show this if and only if statement, this in the textbok of Differential Geometry of Curves and Surfaces. Are we going to use the definition that "a diffeomorphism is conformal if $\text{d}f$ preserves angles"?  Can you help me?

Let $\phi: S \to \bar{S}$ be a diffeomorphism between two surfaces in $\mathbb{R^3}$. Such a map is called conformal if for all $p \in S$, and $v_1, v_2 \in T_p(S)$ (the tangent plane) we have  $$\langle d\phi_p(v_1), d\phi_p(v_2) \rangle = \lambda^2 \langle v_1, v_2 \rangle_p$$  for some nowhere-zero function $\lambda$.  $\phi$ is said to be angle-preserving, if  $$\cos(v_1, v_2) = \cos(d\phi_p(v_1), d\phi_p(v_2)),$$  which I take to mean  $$\frac{\langle v_1, v_2\rangle}{\lVert v_1 \rVert \lVert v_2 \rVert} =  \frac{\langle d\phi(v_1), d\phi(v_2)\rangle}{\lVert d\phi(v_1) \rVert \lVert d\phi(v_2) \rVert} $$  From do Carmo, "Differential Geometry of Curves and Surfaces", 4.2/14:     Prove that $\phi$ is locally conformal if and only if it preserves angles.   The "only if" part is obvious, but how can the "if" portion be proved (i.e. how does preserving angles imply conformality)?


I mean if I just use bash to run the file like bash ./myscript.sh will it be enough or there are some pitfalls?

I have written a simple script.  When I runsh <myscriptname.sh>, i got the correct output, but when I run ./<myscriptname.sh>, I got an error.  What is difference between when I do sh and ./?


I’m new to Latex, and I know I must learn Latex, the question: is Latex the only typesetting to write Math ? and it’s quite old, what is its future, is there any new (emerging/trending) typesettings are better and more advanced (like in IT, they have a lot of programming languages?)

Are there any  professional alternatives  to TeX/LaTeX which produce equal or even better typesetting? Maybe expensive commercial ones. The software counts if it is comparable or superior to LaTeX (with microtype) in typesetting text or math (or both). In any case, please mention both aspects in your answer.  I am only aware of ConTeXt (which is partly based on TeX).  Note that I am not looking for an alternative for my personal use, I am just asking out of curiosity.


I can't properly wrap my head around this odd concept, though I feel I'm almost there.  A non-zero base raised to the power of 0 always results in 1. After some thinking, I figured this is the proof: $\frac{{x}^{2}}{{x}^{2}}= x^{2-2}=x^{0}=1$  Assuming that's true, would it be correct to assume that anything raised to 0 is a "whole" (1)? Because if $\frac{{x}^{2}}{{x}^{2}}=1$, then no matter what x is, it will always result in 1.  I would like to understand this concept intuitively and deeply, rather than just memorizing that $x^{0}=1$  EDIT: Thank you all for the answers. Each and everyone of them have been insightful and I've now gained a deeper understanding. This is a new account, so it seems I can't upvote, but if I could I would upvote each and everyone of you. Thanks :)

I have been a witness to many a discussion about numbers to the power of zero, but I have never really been sold on any claims or explanations.  This is a three part question, the parts are as follows...    1) Why does $n^{0}=1$ when $n\neq 0$?  How does that get defined?  2) What is $0^{0}$?  Is it undefined?  If so, why does it not equal 1?  3) What is the equation that defines exponents?  I can easily write a small program to do it (see below), but what about in equation format?    I just want a little discussion about numbers to the power of zero, for some clarification.    Code for Exponents: (pseudo-code/Ruby)  def int find_exp (int x, int n){     int total = 1;     n.times{total*=x}     return total; }


This is what I use to allow Google Sheets to auto-populate the date/time in column "N" whenever any cell in that row is updated.   function onEdit() {   var s = SpreadsheetApp.getActiveSheet();   var r = s.getActiveCell();   if( r.getColumn() != 8 ) { //checks the column     var row = r.getRow();     var time = new Date();     time = Utilities.formatDate(time, "GMT-04:00", "MMM/dd/yy, hh:mm:ss");     SpreadsheetApp.getActiveSheet().getRange('N' + row.toString()).setValue(time);   };  }   I want to be able to auto populate the Google user/name who made an any changes when a cell in that row is updated.   Is this possible?

In Google Spreadsheet I am having the following issue:  I am using Session.getActiveUser().getUserLoginId() to fetch the current user's email id but other than creator of the spreadsheet it is returning empty string. I have also used getEffectiveUser() but no help.  I have even deployed this to "User accessing the web app" but still it's not working.  How can I fix this?


I am studying the Jordan Canonical Form of a matrix and I noticed that most of the books put the $1's$ of  the Jordan blocks on the superdiagonal like this for example  :   \begin{pmatrix}  \lambda & 1 \\ 0 & \lambda \end{pmatrix}  But my professor puts it on the subdiagonal :  \begin{pmatrix}  \lambda & 0 \\ 1& \lambda \end{pmatrix}  Does it make any difference ? I know this might change the position of the vectors of the Jordan basis on the matrix $P$ such that $J = P^{-1} A P$  , but can  can I say that one of this constructions is better than the other or that one of them is more correct  than the other ?

I am currently reading two linear algebra books. One is Hoffman/Kunze's and the other one is Friedberg/Insel/Spence's.  They define Jordan canonical form of linear operator in different ways.  In Hoffman's book, Jordan forms are obtained by the primary decomposition and cyclic decomposition. In this case, 1's can appear some sub-diagonal entries. For example,  $M = \begin{array}{cc} 2 & 0 & 0 & 0 & 0 \\ 1 & 2 & 0 & 0 & 0 \\ 0 & 0 & 3 & 0 & 0 \\ 0 & 0 & 1 & 3 & 0 \\ 0 & 0 & 0 & 0 & 3 \\ \end{array}$  But in Friedberg's (And almost any other linear algebra books for engineers..), 1's can appear some super-diagonal entries. For example,  $M' = \begin{array}{cc} 2 & 1 & 0 & 0 & 0 \\ 0 & 2 & 0 & 0 & 0 \\ 0 & 0 & 3 & 1 & 0 \\ 0 & 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 0 & 3 \\ \end{array}$  Can someone explain why they define differently and relation of each other?


Question  Please advise why python3-boto cannot be installed as in below.  $ sudo apt install -f python3-boto Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  python3-boto : Depends: python3-requests but it is not going to be installed                 Depends: python3:any (>= 3.3.2-2~)                 Depends: python3-six but it is not going to be installed E: Unable to correct problems, you have held broken packages.   The python3-requests and python3-six are already installled.  $ sudo apt install -f python3-requests Reading package lists... Done Building dependency tree        Reading state information... Done python3-requests is already the newest version (2.18.4-2ubuntu0.1). 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.   $ sudo apt install -f python3-six Reading package lists... Done Building dependency tree        Reading state information... Done python3-six is already the newest version (1.11.0-2). 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.   Tried  but made no difference.  Environment  64 bit DELL laptop.  NAME="Ubuntu" VERSION="18.04.3 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.3 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I recently got a new laptop and I am using Ubuntu 16.04 LTS. It is unable to detect the wireless drivers.  Tried:  - No Detection.  Tried: installing sudo apt install rtlwifi_new-dkms - No go.  System Information:  Manufacturer: HP Product Name: HP Laptop 15q-bu0xx Version: Type1ProductConfigId Serial Number: CND7320DQD UUID: 805531E3-F277-E711-B753-186024BEECB0 Wake-up Type: Power Switch SKU Number: 2LS59PA#ACJ Family: 103C_5335KV HP Notebook    Network Hardware:  - 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.      RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)   - 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723   ifconfig output:  eno1      Link encap:Ethernet  HWaddr 18:60:24:be:ec:b0         inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0       inet6 addr: fe80::80b3:39a0:695a:e93c/64 Scope:Link       UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1       RX packets:18904 errors:0 dropped:0 overruns:0 frame:0       TX packets:13915 errors:0 dropped:0 overruns:0 carrier:0       collisions:0 txqueuelen:1000        RX bytes:19799702 (19.7 MB)  TX bytes:1643667 (1.6 MB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:5095 errors:0 dropped:0 overruns:0 frame:0           TX packets:5095 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:404876 (404.8 KB)  TX bytes:404876 (404.8 KB)   also tried,  sudo modprobe -r rtl8723be - no output, doesn't throw any errors. sudo modprobe rtl8723be - no change. restarted network-manager - no change.   I Read all the related posts and still the problem exist. I am not sure, if the drivers i am installing are correct?   Edit:  Command:  lspci -knn | grep Net -A2   Output:  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723] DeviceName: WLAN Subsystem: Hewlett-Packard Company Device [103c:8319]

I am having an issue with wifi; it seems when I'm trying Ubuntu without installing, it only detects connection via the ethernet cable.  I can't connect and none of the available wifi networks are detected.  $ lspci 00:00.0 Host bridge: Intel Corporation Device 5904 (rev 02) 00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02) 00:04.0 Signal processing controller: Intel Corporation Skylake Processor Thermal Subsystem (rev 02) 00:08.0 System peripheral: Intel Corporation Sky Lake Gaussian Mixture Model 00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21) 00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21) 00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI (rev 21) 00:17.0 SATA controller: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] (rev 21) 00:1c.0 PCI bridge: Intel Corporation Device 9d10 (rev f1) 00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1) 00:1c.5 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port (rev f1) 00:1f.0 ISA bridge: Intel Corporation Device 9d4e (rev 21) 00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21) 00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21) 00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21) 01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330] (rev 83) 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15) 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723     $ lspci -knn | grep Net -A3 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723]     DeviceName: Hanksville Gbe Lan Connection     Subsystem: Hewlett-Packard Company Device [103c:8319]


My array is like this:   Array (   [0] => Array (     [0] => aaa-aaa     [SKU] => aaa-aaa     [1] => 12/1/1     [date] => 12/1/1     [2] => 1.15     [cost] => 1.15 )   [1] => Array (     [0] => bbb-bbb     [SKU] => bbb-bbb     [1] => 10/1/1     [date] => 10/1/1     [2] => 0.15     [cost] => 0.15 ) )   I'd like to merge the matching values to each other, or make a new array selecting the indexes, or use a php tool to print specified indexes to csv: aaa-aaa, 12/1/1, 1.15 \n bbb-bbb, 10/1/1, 0.15  It cannot be queried because this information is coming from 4 different tables, from 2 different sql providers. These arrays are the result of mapping previous arrays.   array_unique() doesn't work, array_diff() doesn't work, array_diff_key() doesn't work.  You direction is much appreciated!

How can I remove duplicate values from an array in PHP?


A short story I read somewhere, possibly Analog Magazine. The US government assembles a team of Scientists to reverse engineer a wrecked antigravity backpack. The word 'noise' is in the title. It turns out the film of it working was faked. The government thought that there was no progress in antigravity research because of the bias that it was impossible.

This is a short story from the 50s or 60s.  A scientist or inventor has invented either teleportation or a space drive and has disappeared - leaving no documentation or clues except his extensive home library.  The government gathers all types of scientists to attempt to duplicate his research.  Several months later, as they are about to launch the first space drive space ship, the officer in charge reveals that there was no 'disappeared inventor'.  The greatest step toward a new impossible concept is knowing that it has already been done.


I was rendering this single image and wanted to get the best quality render with proper lighting and least (If possible, no) fireflies. I am currently rendering with these settings.  Filter Glossy 0.5  Refractive Caustics Off  Reflective Caustics On  Clamp Direct 0  Clamp Indirect 3  GPU Nvidia GeForce 840m  Tile Size 64x64  Samples 200  Estimated Time per Frame 30 minutes   Is there any way to remove the fireflies further. If so please do tell me.

I often use Cycles' built in Glass BSDF shader to achieve realistic refraction effects, but in many cases, it seems that Cycles' glass caustics creates an unfortunately large number of fireflies (pixels that are abnormally bright relative to their surroundings). In some models of mine, even when I render for 3000 or more samples/pixel, my final image is still covered in fireflies. While I can improve this in many cases by increasing the total amount of light available in the scene, this loses a lot of the potency of the refractive effects I'm looking for, especially in scenes with low light levels.  So my question is, how can I reduce the amount of fireflies while using Cycles' caustics without sacrificing the quality of the refractive effects?  Note: I am aware that Cycles' caustics will perform much better once Cycles has full support for bidirectional path-tracing, but it looks unlikely that that will become , unfortunately.


we have one test class on execution process builder is getting fired. is there any way where I can avoid to run process builder while running test class.

Is there a way to soql procesbuilder to tun activation off?  For example  List<Processbuilder> pbColl = new List<Processbuilder>();   Processbuilder pb=[SELECT status FROM Processbuilder WHERE status Active];  for(Processbuilder turnoff : pb){             turnoff.status = false;             pbColl.add(pb)} update pbColl;   If not is there a simple way to turn all activated Processes off/on?


I have installed Ubuntu 14.04 some days ago. Now I am trying to update software using Software Updater, but it stops at:   Reading Database   I ran some commands on reading some websites, this is what I get as errors, please help:  $ sudo apt-get update && sudo apt-get upgrade E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?  $ ps -ef | grep apt root      2206     1  0 17:56 ?        00:00:05 /usr/bin/python3 /usr/sbin/aptd root      2347  2206  2 17:56 pts/12   00:00:16 /usr/bin/python3 /usr/sbin/aptd root      2583  2347  0 17:57 pts/22   00:00:00 /usr/bin/dpkg --status-fd 52 --unpack --auto-deconfigure /var/cache/apt/archives/dpkg_1.17.5ubuntu5.1_i386.deb sp        2948  2899  0 18:06 pts/24   00:00:00 grep --color=auto apt

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


An open set $U\subset \mathbb{R}^n$ contains the closed origin-centered unit ball $B=B(0,1)$. If a $C^1$ mapping $f:U\rightarrow \mathbb{R}^n$ with rank $n$ obeys $\|f(x)-x\|<1/2$ for all $x\in U$, show that, a) $\|f\|^2$ must attain a minimum in the interior of $B$. b) $f(p)=0$ for some $p\in B$.  Honestly I don't know how to solve such problems. I am planning to take an exam in few weeks which contains such problems. So I want to learn how to solve this. So I appreciate if someone would help me. First of all what can be inferred from the fact that $f$ is of rank $n$? Does it imply that $f'$ is invertible?

I am looking for any help, hints, or suggestions in how to go about this problem from a previous qualifying exam.  We are given a smooth mapping $f: U \rightarrow \mathbb{R}^{n}$ whose differential $df_{p}: \mathbb{R}^{n} \rightarrow \mathbb{R}^{n}$ is of rank $n$ and we have that $\|f(x)-x\|<\frac{1}{2}$. Here $U \subset \mathbb{R}^{n}$ is an open subset which contains the closed unit ball $B=B_{1}(0)$. The problem asks us to show that $\|f\|^{2}$ attains a minimum on the interior of  $B$.   As of right now, the only thing that comes to mind is the inverse function theorem, that there is an open subset $V \subset U$ where $f$ is an diffeomorphism on.


If $X$ is uncountable, then the set of bounded injective functions: $f: X \rightarrow \mathbb{R}$ has empty interior.   Attempt:  In order to prove that the interior is empty, we must show that for any $f$ in the set and for any ball centered on $f$: $B(f;\epsilon)$, one can find a function $g\in B(f;\epsilon)$ such that $g$ is not injective.  Take any $f$ in the set and any $\epsilon>0$. We note that the image of $f$, $f(X)$, is an uncountable subset of $\mathbb{R}$. Therefore, it contains at leats one of its accumulation points, say $f(x_0$), where $x_0\in X$. Hence it follows that $B(f(x_0);\epsilon/2)\cap f(X) \neq \emptyset$. We take $f(y_0)\in B(f(x_0);\epsilon/2)\cap f(X)$ such that $f(x_0)<f(y_0)$, where $y_0\in X.$   Define the following function:  $g:X\rightarrow \mathbb{R}$ by letting: $g(y_0) = f(x_0)$ and $g(x)=f(x)$ elsewhere. Clearly $g$ is not injective and:  $$\mbox{sup}_{x\in X}|f(x)-g(x)| = |f(y_0)-g(y_0)|=|f(y_0)-f(x_0)|<\epsilon,$$  since we chose $f(y_0)\in B(f(x_0);\epsilon/2)$. This shows that $g\in B(f;\epsilon)$, $g$ being not injective.  Is this fine? Any different idea?

Here I'm working with the metric: $$d(f,g)=\sup_{x \in X}|f(x)-g(x)|.$$  Let's take $h$ in the set and let $\epsilon>0$ be given. I need to prove that there exists another bounded, not injective function $j$ such that $d(j,h)<\epsilon$.   I would be done if there where two images of $h$ to a distance less than $2\epsilon$. Cause in such case, let them be $h(x_0)$, $h(y_0)$ and suppose that $h(x_0)>h(y_0)$. Then setting $j(x_0)=h(x_0)-\dfrac{h(x_0)-h(y_0)}{2}$ , $j(y_0)=h(y_0) + \dfrac{h(x_0)-h(y_0)}{2}$ and $j(x)=h(x)$ otherwise, we would have the required.   Suppose, by way of contradiction, that no two images are that near, i.e., in each open interval of lenght $2\epsilon$, there is at most one image of $h$. Since $h$ is bounded, its image can be covered by a finite number of intervals of lenght $2\epsilon$, which implies that there are only finite images of $h$. Finally, like $h$ was injective on an infinite set $X$, this cannot be.   I have my doubts because I didn't use that $X$ was uncountable, just infinite. Is this proof ok?


I'm having a problem with my little c program.  I'm trying to print out a warning if an overflow occurs, I'm using the limits.h library to recognise an overflow with INT_MAX. I guess the problem is in my if loop, but I can't really find the problem...  #include<stdio.h> #include<limits.h>  int main() {     int x = 1627964;     int y = 9;      for(int i=1; i<y; ++i){         x*= i; // x= x * i         printf("%d * %d \n",x , i+1);         if(x >= INT_MAX){             printf("An Overflow has occured!\n");             return 0;             break;         }     } }   I think the overflow occurs after multiplying with 7:  1627964 * 2 3255928 * 3 9767784 * 4 39071136 * 5 195355680 * 6 1172134080 * 7 -384996032 * 8 1214999040 * 9   I can't really tell why the warning is not printed out...  Some help would be really appreciated, thanks :)

I was writing a program in C++ to find all solutions of ab = c, where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and it ran a digit-counting routine each time on a, b and ab to check if the digits condition was satisfied.  However, spurious solutions can be generated when ab overflows the integer limit. I ended up checking for this using code like:  unsigned long b, c, c_test; ... c_test=c*b;         // Possible overflow if (c_test/b != c) {/* There has been an overflow*/} else c=c_test;      // No overflow   Is there a better way of testing for overflow? I know that some chips have an internal flag that is set when overflow occurs, but I've never seen it accessed through C or C++.    Beware that signed int overflow is undefined behaviour in C and C++, and thus you have to detect it without actually causing it. For signed int overflow before addition, see .


I have a template class called Interpolator.  Interpolator.hpp  namespace interpolation {     template< class Abscissa >     class Interpolator; }  template< class Abscissa > class interpolation::Interpolator {  public:      Interpolator();      virtual     ~Interpolator();  };   Interpolator.cpp  template< class Abscissa > interpolation::Interpolator< Abscissa >::Interpolator() { }  template< class Abscissa > interpolation::Interpolator< Abscissa >::~Interpolator() { }   Then, I have a class for an specific interpolation shape. The shape is a quadrilateral and is handled by the class Abscissa_Quad. The interpolation of this shape is handled by the Interpolator_Quad class.  Interpolator_Quad.hpp  namespace interpolation {     class Abscissa_Quad;     class Interpolator_Quad; }  class interpolation::Interpolator_Quad      : public interpolation::Interpolator< interpolation::Abscissa_Quad > {  public:      Interpolator_Quad();      ~Interpolator_Quad();  };   In the .cpp file I have:  Interpolator_Quad.cpp  interpolation::Interpolator_Quad::Interpolator_Quad()     : Interpolator() { }  interpolation::Interpolator_Quad::~Interpolator_Quad() { }   Finally, I use the class in my main.cpp file as follows:  main.cpp  #include "interpolation/Interpolator_Quad.hpp" #include "interpolation/Interpolator.hpp" #include "integration/Abscissa_Quad.hpp"  int main(         int    argc,         char * argv[] ) {     interpolation::Interpolator_Quad interpolator;      // Do some stuff with the interpolator. }   But now I keep getting this error:  undefined reference to `interpolation::Interpolator<interpolation::Abscissa_Quad>::Interpolator()'   I have tried different approaches, mainly from these questions:    I tried using in main.cpp:  interpolation::Interpolator_Quad< interpolation::Abscissa_Quad > interpolator; But of course that did not work because Interpolator_Quad is not a template. From this question:  I know that the implementation of the template must be in the header file. What I don't understand is why the compiler does not find the reference to the template constructor since Interpolator_Quad defines the template class as Abscissa_Quad in the header file.   I understand that similar questions have been asked before regarding undefined references to template constructor; however, the examples I found either didn't work or perhaps I did not understand them fully.  I'm sorry I went a bit crazy with the namespaces in my question. I just want to make sure my error is not in the improper use of them.  I'm using gcc 4.8.2 with a Ubuntu machine.  Any feedback is appreciated. Thanks!

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Forgive the riddle-like question, but that's what I'm experiencing (I think). What I'm trying to do is delete a specific file. When I originally tried to delete it, Explorer tells me it's in use by System. What I did was to deny Full Control to NT AUTHORITY\SYSTEM (the "user" under which the process "System" was running, as told by ) on the file, and restart the machine.   After restarting, I go to delete the file and get a File In Use dialogue saying "The action can't be completed because the file is open in another program". I return to the ever useful Process Explorer to search for that file name (my default method for finding what process has locked a file) but when searching for Handle or DLL substring, Process Explorer returns 0 results, as if the file is not in use by any process at all. I'm running Process Explorer as Administrator by the way. I was even able to rename the file and restart again, but still cannot delete it.  Can anyone elighten me as to how this happens? How can I find out what process is holding on to that file, so I can kill it and delete the damned thing?  Edit:  suggested this a duplicate of , and although it provides a solution to my specific problem, I would like an answer explaining why I can't find out what process is using the file I wish to delete.

When I try to delete the file, using the GUI it says      The action cannot be completed because the file is open in another   program   And using the del /f /q command line it says     Access is denied   I have tried unlocking the file with Unlocker, as well as trying to locate which process is using the file with the Resource Monitor or the Process Explorer, but no locking handle was found in either case.  I am able to rename or move the file, but not to delete it or change its content.


So, I would say I'm pretty novice at programming and most of my background comes from C++, where I'm dealing with pointers and references and whatnot. I've started to learn Java, and I had to write this example program but for some reason I cannot escape the NullPointerException in the program. I tried searching for answers, and I understand the other answers I've seen but I can't see why I would have a null pointer. Thinking maybe I was coding it entirely wrong, I rewrote the program in C++, but it seems to work with no problems which just boggled my mind even more. I'm thinking it's possibly because of the way Java handles references, since there's no concepts of pointers and addresses.  If it would help at all, I could post the header/class and a stack dump as well.  package com.company;  import java.util.Random;  public class Main {      public static void main(String[] args)     {         // Create some bank accounts.         BankAccount[] accountsList = new BankAccount[5];         // Create a list of random names.         String[] namesList = {"Bob", "Alice", "John", "Matt", "Billy"};         // Set all account names, and print initial balance.         for (int x = 0; x < 5; x++)         {             accountsList[x].SetCustomerName(namesList[x]);             System.out.println("Initial Balance // Account: " + accountsList[x].GetCustomerName());             System.out.println("Balance: $" + accountsList[x].GetBalance());             System.out.println();         }         // Conduct n rounds of simulated deposit/withdrawal transactions for each account.         for (int rounds = 5; rounds < 0; rounds--)         {             for (BankAccount x : accountsList)             {                 System.out.println("Transaction Inquiry // Account: " + x.GetCustomerName());                 x.DepositFunds(Math.abs(new Random().nextInt()));                 x.WithdrawFunds(Math.abs(new Random().nextInt()));                 System.out.println();             }         }     } }   The same program rewritten in C++ (compiles fine and runs no problem)  #include "BankAccount.h" #include <iostream> #include <cstdlib> #include <ctime>  int main(int nArgs, char* pszArgs[]) {     // Seed the RNG.     srand(time(NULL));     // Create some bank accounts.     BankAccount accountsList[5];     // Create a list of random names.     std::string namesList[] = { "Bob", "Alice", "John", "Matt", "Billy" };     // Set all account names, and print initial balance.     for (int x = 0; x < 5; x++)     {         accountsList[x].SetCustomerName(namesList[x]);         std::cout << "Initial Balance // Account: " << accountsList[x].GetCustomerName() << "\n";         std::cout << "Balance: $" << accountsList[x].GetBalance() << "\n\n";     }     // Conduct n rounds of simulated deposit/withdrawal transactions for each account.     for (int rounds = 5; rounds > 0; rounds--)     {         for (BankAccount &x : accountsList)         {             std::cout << "Transaction Inquiry // Account: " << x.GetCustomerName() << "\n";             x.DepositFunds(abs(rand()));             x.WithdrawFunds(abs(rand()));             std::cout << std::endl;         }     }     return 0; }

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