How do you get the Benefactor badge on Stack Overflow? First bounty you manually awarded on your own question?

What are badges? How do users get badges? How can users get tag badges? Can badges be lost/revoked/taken away after they are awarded? If so, how and when? How can I suggest a new badge?   For more information, see "" and the  in the .


Let $g(x) :\mathbb{R}\to\mathbb{R}$ be a non-decreasing function in the sense that $g(y)\geq g(x) \; \forall y \geq x$. Can $g(x)$ be nowhere continuous? My guess is that any such function that is non-decreasing must have at most countably infinite number of discontinuities. Otherwise, it will cease to be discontinuous due to non-decreasing nature. However, I couldn't come up with a rigorous proof of this. Am I right in my guess?   My attempt was to assume that for each $x_0 \in \mathbb{R}$ there exists a fixed $\varepsilon_{x_0}>0$ such that for all $x \in (x_0,\infty)$ we have the relation that $f(x)>f(x_0)+\varepsilon_{x_0}$ by non-decreasing nature because for each arbitrary $\delta$ neighborhood of $x_0$ there is at least one $x'$ in it that satisfies the relation (hence all $x>x'$[non-decreasing] works but $x'$ can be made arbitrarily close to $x_0$). My intuition is that such a strictly increasing relation can only be forced for countable number of points. Is there a nice way to show it? Or I am on the wrong track?  Nvm: This proof strategy is wrong. Take the Floor function.

I would like to prove the following:       Let $g$ be a monotone increasing function on $[0,1]$. Then the set of points where $g$ is not continuous is at most countable.     My attempt:    Let $g(x^-)~,g(x^+)$ denote the left and right hand limits of $g$ respectively. Let $A$ be the set of points where $g$ is not continuous. Then for any $x\in A$, there is a rational, say, $f(x)$ such that $g(x^-)\lt f(x)\lt g(x^+)$. For $x_1\lt x_2$, we have that $g(x_1^+)\leq g(x_2^-)$. Thus $f(x_1)\neq f(x_2)$ if $x_1\neq x_2$. This shows an injection between $A$ and a subset of the rationals. Since the rationals are countable, $A$ is countable, being a subset of a countable set.    Is my work okay? Are there better/cleaner ways of approaching it?


There is a South African English teacher (Austrian descent) said we have to use "go back home", not "come back home"?   Is he right?  I think South African English is different & maybe they have heir own styles.

Read this paragraph from this    My question is:  How to identify "deictic center" for distinguishing "come" & "go"?  Let say I am at home & I say "I am going to the zoo this evening", so the "deictic center" in this case is my home & I move away my "deictic center".  But let say my friend Tom & I currently at my home & Tom said "Are you Coming to the zoo to see the lion?" & I said "Ok, I am coming to the zoo this evening". So, the "deictic center" in this case is "the zoo" & we move towards the "deictic center" (ie the zoo).  It feels like it is very arbitrary.  Note: See this , it said the selection of "deictic center" could be due to sympathy & politeness.


Given the choice of these two, which sound most natural?  I wish there were something I could do for you. I wish there was something I could do for you.   If both sound equally natural, I'd prefer the first.

had declared the sentence below as follow: 1) STAR TURN, 2) BEST LINES.      I wish Bernard Cribbins was my grandad. Perhaps he would be willing to   adopt?     Rattigan: “If only that was possible.” The Doctor: “If only that were   possible. Conditional clause.”    Is 'was' after 'I wish', 'if only' and 'if' (in conditional clauses) colloquial?  Does it be used in formal speech and writing?


How to remove bad smell of food from fridge and refrigerator?

Storing various meals and products in fridge (or freezer) can result in mixing different flavours, which isn't that great. What are your best practises to avoid the smell?


I have accidentally enabled a mode which creates a kind of smooth brush whenever I move an object. And when I drag it across the axis everything inside the circle gets moved as well. How do I stop this and what is the keyboard shortcut?   - This is the difference in the tool bar, in other .blends without the problem there is no (Smooth).   - This is the circle in which everything in it also gets moved, this can be re sized but not removed. And even if I re size it until it is almost gone, it still creates problems.  If someone could help me figure out this problem it would be much appreciated.

I'm facing this frustrating "feature" that I can't seem to remedy; when I duplicate an object (and now, even when I create two completely new objects), their transformations/scaling is synchronized. This is extremely annoying when trying to use any sort of transformation keyboard shortcut.  It should be noted by going to the properties menu (N) and manually setting the properties works just fine.  For instance, here is just the camera selected (trust me, I made sure):   And when I try to transform by clicking+dragging on the X axis OR by hitting G->X, this happens:   They are not grouped (verified by going to the Groups list up in the Scene panel) and they do not have parents (verified by going to Object->Relations).  I have tried the unlink command as well, to no avail.  I have seriously run out of options; what did I change to have my G->X shortcuts transform multiple objects? It seems completely at random, too; certain objects seemed to be "linked" to other random objects, and this "linking" is guaranteed when duplicating even when I do a non-linking duplicate (Shift+D).  What gives?


We got into a big fight. It happened in/during the lunch break, so everybody was there. Question 1: In North America is "lunch break" the natural term for the break at work around noon where you eat? Question 2: Is both "in" and "during" possible?

Consider you are in a meeting. The meeting is going to continue for the next several hours. Therefore, some breaks have been devised in order to let people refresh themselves.  Now consider a brief conversation between two guys sitting near each others:     A: Did you notify C that you would be here until 9:00 ?      B: I will call him ........... the next break.   Which one of the prepositions listed below is the best choice?   within during in over     My interpretation:  Using , I can easily rule out "over" and "within" although I have no idea why they are wrong.  Now, the question is what is the difference between "in" and "during" in that context?


Creating some copy and want to make sure singular possessive name is correct...  If I have a name of an animal, Jaws, would correct grammar be, Jaws' Laws?

Many questions already ask about this topic ( , , etc.) and their answers vary, but they always give exceptions to the apostrophe-s rule, for example:      6.24 The general rule for the possessive of nouns covers most proper nouns, including most names ending in sibilants."   Examples they give include Kansas’s, Ross’s land, and Jones’s reputation. Exceptions include Jesus’  and Moses’.  Which names does this apply to?  Is the Aeneas’  form correct, or is it Aeneas’s instead?


I've read that it's bad to do this, but am looking for details as to why.  Suppose we're trying to fit the linear model $Y_i = \beta_0 + \beta_1 X_{1i} + \beta_2 X_{2i} + \epsilon_i$ where $Y$ is continuous and $X$s are categorical with many levels. We don't have any opinion on how the levels should be grouped. We then calculate the average response for each level of the predictors, then collapse levels with similar averages.  How badly does this screw up parameter estimates and inferences on them, and why?

I have a dataset that consists of only categorical variables and a target variable. I want to predict the (binary) target variable with the categorical variables.  I am trying to do this in Python and sklearn.  The categorical variables have many different values. I was thinking to create dummy variables for each value in all the categorical variables. However, in the end this results in a sparse data set with thousands of variables.  How would you go about to reduce the number of dummy variables? Would you use Chi2 to select useful features?  Or would you not make dummy variables at all?


I have been using AWS Free Tier for a year now.It is expiring in a week's time.  I'm trying to figure out how to make my currently running resources in the FREE Tier to be billed under reserved resources rather than pay-as-you-go service rates from next month when my Free tier ends. I'm planning to reserve the resources I'm using for another year under heavy utilization.

Am moving a Win2003 server onto Amazon.  I'd like to build it on the On Demand instance first, then if all goes well, move to a Reserved.  Question:  Is there any way to move from On Demand to Reserved, or will I have to manually rebuild the machine again.  Its not an easy build and I don't want to have to do it again :-)


How to show that the annihilation of an electron-positron pair under emission of one real photon (mass zero) is forbidden by energy-momentum conservation, the emission of two photons is allowed?

In reading through old course material, I found the assignment (my translation):     Show that a single photon cannot produce an electron-positron pair, but needs additional matter or light quanta.   My idea was to calculate the wavelength required to contain the required energy ($1.02$ MeV), which turned out to be $1.2\times 10^{-3}$ nm, but I don't know about any minimum wavelength of electromagnetic waves. I can't motivate it with the conservation laws for momentum or energy either.  How to solve this task?


An interviewer asked me this question in an interview.  He asked, suppose a service xyz stops due to any reason and you want it running all the time, what will you do so that it will start automatically

I have a process which is executed by init.d script on the background. Eg:  case "$1" in      start)        /bin/myprocess &     stop)        killall myprocess     restart)        killall myprocess        /bin/myprocess & esac   In certain conditions, myprocess can fail and return. Is there any (standard) way how to detect its fail and restart in automatically?


Sorry if this is a duplicate question. I'm working on my searching skills.   What I get from the original post is that this question was asked then tagged as a possible bug in 2009, and then tagged with status-completed in early 2013. Also from the discussion it seems that searching for special characters is no longer possible. This was what I experienced when I tried to search for :+ and ":+" on stackoverflow.  Am I reading this correctly? Thanks for your help.

We used to be able to , but that now appears to be broken.  I'd expect a  to return a result, but instead the search engine appears to put quotes around the whole request; the search box shows the search has been replaced with "[python] += list" and the  I was looking for doesn't appear among the returned questions.  Using quotes around the symbols do not seem to help here;  returns an empty result.


I've been solving different problems related with finding the moment of inertia in a set of different particles, and ojects of known rotational inertias. Let's say spheres, cylinders, rings, rods and so on.  To put it in perspective, let's assume that we have a cube with four point masses in each corner and I want to find the moment of inertia of the whole system when the moment is at minimum.  I'm assuming that when the degree of rotation (i'm not sure if the term is correct, please indicate me if this is wrong) is the least then the contribution of the rotational inertia is not affected by any additional radius as when there is some offset from the center of mass of the object.  Typically when I want to know what will be the rotational inertia of a system I would use the principle of superposition of rotational inertia for the system and then Steiner's theorem to find the moment of inertia for an axis paralell to that point.  Hence this formula is expressed as:  $I_{p}=I_{o}+mr^2$  where $I_{p}$ is the rotational inertia of the system about that point and $I_{o}$ the moment of inertia where axis of rotation for that object is in its center. Since there isn't any additional radius to add, the whole expression would be reduced to   $I_{p}=I_{o}$  But I'm not sure if this is a valid conclusion.  There exists a  which has attended this topic but in a mathematical aspect but it is lacking of a justification in the sense of how to visually explain this fact.   Therefore, does it exist a video or an animation or an experiment on how can this be proved? I don't know if at this point I'm explaining my major confusion. Can all of this be proved in layman terms?.  The existing mathematical proofs for this are a bit too sophisticated for my current knowledge of mathematics, but does there exist an introductory calculus explanation for this behavior? Can someone help me?

From  follows that, given a rigid body, the moment of inertia is minimum if calculated with respect to an axis passing through the center of mass. What is the physical meaning of this?   The moment of inertia plays the role of the mass on rotational motion, so it is linked to the reluctance of the body to rotate. Given a torque, if the axis passes through the CM the angular acceleration is maximum, while it decreases increasing the distance from CM. Why does that happen?  I tried to justify it as a consequence of the distribution of mass around the CM, but I do not know if that is right.


I am writing a bash script (just learning bash) to extract some lines from a file based on two patterns. The first pattern is just a sentence ending in a colon. The second pattern is a * repeated N (in this case 58) times.  An example file:  lines I don not want lines I don not want lines I don not want  A sentence here: ******************************************************** lines I want lines I want lines I want **********************************************************  lines I don not want lines I don not want lines I don not want   Desired output:  A sentence here: ******************************************************** lines I want lines I want lines I want **********************************************************   I can get the script to work if I explicitly type out A sentence here and \* 58 times within the call to awk, but cleanliness and readability I would prefer to do something like below:  pat1="A sentence here" pat2=`printf -- '\*%.s' {1..58} ; echo` pat2=${pat2//\\/\\\\} awk -v pat1="${pat1}" -v pat2="${pat2}" '/{pat1}/ {p=1}; p; /{pat2}/ {p=0}' $1   Where the first positional variable is the input file. The above code returns nothing. I initially tried it without the substitution on pat2, but got the warning:   awk: warning: escape sequence `\*' treated as plain `*'   I will have to run this command thousands of times and would ideally like a solution that is both clean and efficient. I'm not tied to using awk at all.   Edit:   I just noticed that even when I manually type the patterns into awk, I still receive the warning message. I am likely not passing the variables to awk correctly.

Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l >> "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l >> "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally.


File upload form style for all browsers    I use this JSF code for the form  <h:inputFile id="fileToUpload" value="#{contacts.file}"/>     <h:commandButton value="Upload" action="#{contacts.upload()}">         <f:ajax execute="fileToUpload" />     </h:commandButton>   How I can make the form to look like in one style for all browser?

How do you style an input type="file" button?


I have read multiple articles regarding floating point variables comparison, but failed to understand and get the required knowledge from those articles. So, here I am posting this question.  What is the good way to compare two float variables? Below is the code snippet:  #define EPSILON_VALUE 0.0000000000000001  bool cmpf(float A, float B) {   return (fabs(A - B) < EPSILON_VALUE); }  int main() {   float a = 1.012345679, b = 1.012345678;    if(cmpf(a, b))cout<<"same"<<endl;   else cout<<"different"<<endl;    return 0; }   The output: same although both the float variables hold different values.

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


How can we construct a group from any non-empty set of groups that is not in the original set (i.e. not isomorphic to any of its elements)?

According to ,  The collection of all algebraic objects of a given type will usually be a proper class. Examples include the class of all groups, the class of all vector spaces, and many others. In category theory, a category whose collection of objects forms a proper class (or whose collection of morphisms forms a proper class) is called a large category.  I am aware of Russell's Paradox, which explains why not everything is a set, but how can we show the collection of all groups is a proper class?


I am speaking specifically of a service as opposed to an application.  Environment.Exit(0) and Stop() both give a message box saying they were stopped unexpectedly (even if there's no actual error given).  The goal is to start a service on startup (it must be a service, not an app), have it perform a small task, and then exit. It should simply exit cleanly without a message box.

I have a service application written in C# and under certain circumstances, I would like it to terminate itself.  This would happen after the service has been running for a while, so this would not be happening in the OnStart() event.  Everything that I have read so far suggests that the only safe way to terminate a service is through the Service Control Manager.  My service runs as Local Service and does not have the rights to start or stop services, so I can't access the SCM from the service itself.  Is there another way to self-terminate while still playing by the rules of the SCM?


I remember when I was in high school, and we were told to write an essay of something. When our mentor was done checking our papers, a friend of mine raised his concern on why did our teacher put a big red X mark on the phrase porcelain-like skin. Our instructor explained that the used of hyphen was invalid.   Question is, when to know if it's valid to use hyphen of two or more words.

I am having trouble understanding the following:  "the achievable rate of the optimal AF scheme performs close to the cut-set like bound obtained in this paper"  I think that the word "like" (above) is intended to be used as a suffix to express the fact that the bound is "cut-set"-like.  My question is what to do in such a case to show the connection between the words. Is it  (a) "cut set-like" (b) "cut-set-like" (c) "cut set(en dash)like" (d) something else  Please help me.


I am by no means an expert in the realm of physics. I do from time to time, try to understand the concepts of modern physics and their applications.  I came across  video that I am currently watching, and in the beginning it explains what would happen to someone if they crossed over the event horizon of a black hole.  From my understanding, the time dilation is so great near a black hole, that if you were to cross over the event horizon someone viewing you from further away would never actually see you cross and you would appear frozen forever at the edge of the event horizon due to this time dilation near great mass.  If this is true, in the sense that the entire existence of the universe outside the black hole would unfold while you were stuck at the edge of the event horizon due to time dilation (Please fact check me here, I would love to know if time does actually stop for you if you cross the event horizon of a black hole), wouldn't it be true that you would actually spend no time at all inside the black hole due to hawking radiation and it's effect on the evaporation of black holes?  What I mean by this is that, apparently from what I've read, a black hole will evaporate and cease to exist at the end of some finite period of time in the universe due to it giving off hawking radiation. If this is true, and if the fact that you appear to be forever frozen at the event horizon due to time dilation is also true, wouldn't it seem from the perspective of the person crossing the event horizon that the black hole ceases to exist?  I am very intrigued by this possible paradox that I was questioning and I would love to know more about it's ramifications, if there are any, from many of you whom are more advanced that I.  Thank you in advance.

The event horizon of a black hole is where gravity is such that not even light can escape. This is also the point I understand that according to Einstein time dilation will be infinite for a far-away-observer.  If this is the case how can anything ever fall into a black hole.  In my thought experiment I am in a spaceship with a powerful telescope that can detect light at a wide range of wavelengths.  I have it focused on the black hole and watch as a large rock approaches the event horizon.  Am I correct in saying that from my far-away-position the rock would freeze outside the event horizon and would never pass it? If this is the case how can a black hole ever consume any material, let alone grow to millions of solar masses.  If I was able to train the telescope onto the black hole for millions of years would I still see the rock at the edge of the event horizon?  I am getting ready for the response of the object would slowly fade.  Why would it slowly fade and if it would how long would this fading take?  If it is going to red shift at some point would the red shifting not slow down to a standstill? This question has been bugging me for years!  OK - just an edit based on responses so far.  Again, please keep thinking from an observers point of view.  If observers see objects slowly fade and slowly disappear as they approach the event horizon would that mean that over time the event horizon would be "lumpy" with objects invisible, but not passed through?  We should be able to detect the "lumpiness" should we not through?


I currently have Dummit and Foote, but I was thinking of getting another textbook on abstract algebra to complement it. I've come across a few popular titles, but I'm not sure if they're different enough from D&F. What are your thoughts on the differences and approachability of the major abstract algebra books? Some of the popular titles that I've seen are:  Abstract Algebra by Dummit and Foote A First Course in Abstract Algebra by Fraleigh Algebra by Artin Contemporary Abstract Algebra by Gallian and any other book you recommend

Last semester I picked up an algebra course at my university, which unfortunately was scheduled during my exams of my major (I'm a computer science major). So I had to self study the material, however, the self written syllabus was not self study friendly (good syllabus overall though).  The course was split up into 3 parts, group theory, ring theory and field theory. As a computer science major we only had to study the first 2.  Now that I passed the exam for this course I want to study the field theory part ( which covers Galois theory, etc).  So, now I want to ask whether any of you know any good books on abstract algebra, which lift off at basic ring theory and continue to more advanced ring theory and to finite fields, Galois theory, ...  Please keep in mind that I am not a math major, and that I would like books which are suited for self study (thus a lot of examples and intuition).  Thanks in advance!


I do have a button to clone a input field. This input field should trigger a value in a second field after the own value was changed.  But the problem is it does only work on the first one and not on the cloned one.  $(".products:last #automenge").on("change", function() {});   It does work to change the value of the last like:  $(".products:last #autopreisges").val(gesamptpreis);   But the change function seem to not work like that.  Now working snippet !   var products = $(".products").clone();  $('#clone-search').click(function() {   var clonedRow = products.clone().insertAfter(".products:last").find(":input").val(this.value).end();  });  $(".products:last .clautomenge").on("change", function() {   alert("wow"); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>  <div class="products">   <input class="clautomenge" type="text" value="1" name="Menge[]" placeholder="Menge" required /> </div>  <button id="clone-search" class="formstylebutton" type="button">     add one </button>     A fiddle:

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


If I block a 5/5 attacked with a 2/3 during my blocking step, could I then bounce my blocker with  and prevent it from being killed, while also having the 5/5 blocked? If so, why?

Suppose Player 1 has a Dragon on the table and  in hand, while Player 2 has two Spiders on the table.  Player 1 chooses to attack with the Dragon and Player 2 chooses to block with one of the Spiders.  Before combat damage is to be dealt, Player 1 uses Unsummon on the blocking Spider.    Does Player 2 take any life damage from the attacking Dragon?


I have a system were there will be some config file that I would like to be able to specify some settings, such as:  size: 10 message: "foo" data: 12,12,39   I can parse these just fine as a container of key value pairs, like a std::unordered_map. However, when it comes time to actually apply these settings, I can't exactly figure out the best way to store the types or convert them as neccessary, let me explain.   I can deduce the type of the value based on the string after the : in my config file. But then I would need to store this type along side the value in my key/value pair. So I would end up with:  enum class TYPE {INT, FLOAT, VEC3, STRING, BOOL, FOO}; std::unordered_map<std::string,std::pair<TYPE,std::string>> params;   And from this, when it comes time to actually use my "value", I would need to run it through a switch statement based on the .first member of the pair, so do something like:  for(const auto& m : params) {     auto key = m.first;     auto value = m.second;      auto type = value.first;     auto theActualValue = value.second;      switch(type)     {     case TYPE::INT:         applyAnIntSetting(key,std::stoi(theActualValue));         break;     case TYPE::STRING:         applyAStringSetting(key, theActualValue);         break;     case TYPE::VEC3:         vec3 val;         /* do some string splitting etc */         applyAVec3Setting(key,val);         break;     } }   (this code is just to illustrate my point).  Is there a simpler/better way to do this? I'm sure I'm missing something.

What is the best way to have an associative array with arbitrary value types for each key in C++?  Currently my plan is to create a "value" class with member variables of the types I will be expecting. For example:  class Value {      int iValue;     Value(int v) { iValue = v; }      std::string sValue;     Value(std::string v) { sValue = v; }      SomeClass *cValue;     Value(SomeClass *v) { cValue = c; }  };  std::map<std::string, Value> table;   A downside with this is you have to know the type when accessing the "Value". i.e.:  table["something"] = Value(5); SomeClass *s = table["something"].cValue;  // broken pointer   Also the more types that are put in Value, the more bloated the array will be.  Any better suggestions?


How to install java-JDK 8 & maven in Ubuntu 16.04 without adding any PPA?

Since I upgraded to the latest version of Ubuntu, I cannot install the Java OpenJDK package needed to compile Android custom ROMs. When I run sudo apt-get install openjdk-7-jdk, the following error appears:  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:  openjdk-7-jdk :  Depends: openjdk-7-jre (= 7u51-2.4.6-1ubuntu4) E: Unable to correct  problems, you have held broken packages.   How do I fix this problem?


Following up on,    Using threading, How can I get a script to run starting at 8:00 am stop running at 5:00 pm  The solution should be coded within python, and be portable  tiA

I'm looking for a library in Python which will provide at and cron like functionality.  I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron.  For those unfamiliar with cron: you can schedule tasks based upon an expression like:    0 2 * * 7 /usr/bin/run-backup # run the backups at 0200 on Every Sunday  0 9-17/2 * * 1-5 /usr/bin/purge-temps # run the purge temps command, every 2 hours between 9am and 5pm on Mondays to Fridays.   The cron time expression syntax is less important, but I would like to have something with this sort of flexibility.   If there isn't something that does this for me out-the-box, any suggestions for the building blocks to make something like this would be gratefully received.  Edit I'm not interested in launching processes, just "jobs" also written in Python - python functions. By necessity I think this would be a different thread, but not in a different process.  To this end, I'm looking for the expressivity of the cron time expression, but in Python.   Cron has been around for years, but I'm trying to be as portable as possible. I cannot rely on its presence.


Suppose a creature gets some benefits when they take the Attack action. For example, the Horizon Walker ranger's Distant Strike lets them teleport at will, but only when they take the Attack action.  Could a creature take the Attack action and gain those benefits, without making attack rolls or otherwise targeting a creature (e.g. grappling and shoving)?  Could they "attack" an empty space, as though trying to hit an unseen enemy (even if they don't suspect an enemy is there)?  Note that I am asking about the general case, whether any and/or all creatures can do this, regardless of class or special features.    Inspired by this question:

Can you take the Attack action without attacking, just to get any side benefits?  For example, Blade Flourish says:     Whenever you take the Attack action on your turn, your walking speed increases by 10 feet until the end of the turn [...]   In all examples the bard has a speed of 30 feet and does not have Extra Attack.  First relevant scenario:     The Bard and the enemy is 40 ft apart. If the Bard can take Attack action before spending all 30 ft movement, then he can reach the enemy and attack them with the added extra movement. If not, the Bard and the enemy are now 10 ft apart.   Second relevant scenario:     There is an enemy around the corner. The Bard might or might not know there is an enemy there. With the added movement from Blade Flourish, he will be able to walk around the corner and attack the enemy.   Third relevant scenario:     Same as second scenario, but he will only be able to walk around the corner without being able to attack. He does not know if he can reach to attack the enemy at the end of the turn.   Is taking Attack action allowed without being able to make an attack?


If $f(x)$ is differentiable at $x=0, \space f'(0) = c \space$ where $\space c \space$ is a constant and $\space f(x) \space$ is not equals to $0$. Someone please help me. Im stuck on this question. I've no idea where to even start.

If $f\colon \mathbb{R} \to \mathbb{R}$ is such that $f(x+y)=f(x)f(y)$   and $f'(0)$ exists, then $f$ is differentiable on $\mathbb R$.   I know how to show it is continuous but no clue how to show differentiable.


I am a researcher and have made a new webpage using R studio that I'm more or less happy with. Trouble is I cannot seem to 'find' it when I google it (even though I know what I'm looking for). I imagine if I can't find it, nobody else will.  For the web-techies out there - am I missing something to make my website searchable, so that it comes up when someone googles my name? What can I do to make this come up at least in the top page or two?   Note: I have an old webpage with google sites that has the opposite issue - it keeps coming up in search even though I no longer want to use it. I've kept it with the link to the newer site until I see the new one coming up in searches.

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I find myself in the need of counting through lists with the help of for loops. What I end up doing is this:  L = ['A','B','C','D']  n = 0 for i in L:     print(L[n])     n += 1   I was wondering if there is a better way for doing this, without having to declare an extra variable n every time?  Please keep in mind that this is just a simplified example.  A solution like this would not suffice (although in this example the results are the same):  L = ['A','B','C','D']  for i in L:     print(i)

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


For any give the postive integer $n$,and for any give prime number $p$.  show that  there exsit  postive integer $x,y$ such $$p\mid(x^2+y^2+n)$$  My approach is the following:  Assmue that $n=1,p=2$,we choose$(x,y)=(1,2)$ $$2\mid6=1^2+2^2+1$$  Assmue that $n=1,p=3$, we choose $(x,y)=(1,2)$ $$3\mid6=1^2+2^2+1$$ Assume that $n=1,p=5$,we choose $(x,y)=(2,5)$ $$5\mid30=2^2+5^2+1$$ Assume that $n=2,p=2$, we choose $(x,y)=(2,2)$ $$2\mid10=2^2+2^2+2$$ Assume that $n=2,p=3$ we choose $(x,y)=(2,3)$ $$3\mid15=2^2+3^2+2$$ Assume that $n=2,p=5$,we choose $(x,y)=(3,3)$ $$5\mid20=3^2+3^2+2$$ and so on   Now I'm stuck and don't know how to proceed

I have heard somewhere that for all primes $p$, for all $k$, there exist $x, y$ s.t. $x^2 + y^2\equiv k \pmod{p}$? I recall that the proof is very elementary, but I can't remember such a proof. How would one prove this? One way is to use Cauchy-Davenport, but I don't think that this is the simplest solution.


My computer has only one storage device installed at the moment, a Samsung SSD 970 EVO Plus 1TB. It currently has two partitions on it:  /dev/nvme0n1p1: EFI System (537 MB) /dev/nvme0n1p2: Linux Filesystem (1000 GB)  I'd like to break the second partition, /dev/nvme0n1p2, into two smaller 500 GB partitions using the "Disks" utility that came Ubuntu. After asking me for authentication, it fails with the following error message: Error unmounting /dev/nvme0n1p2: target is busy (udisks-error-quark, 14)  This seems to make sense, because the partition is currently in use. However, it won't let me unmount the partition either, which seems to make it impossible to achieve what I want. Does anyone have advice on what I should do?

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


I want to call the stored procedure in select statement of SQL server. When I call the stored procedure it is generating error.  What can be wrong in the below select statement??  Select i.item as col1, exec StoreProc_name(i.item) as col2 from tbl_item as i where i.item>100   This is not working. What is the right way to call stored procedure in   SQL server.

For an instance I a select statement and it is returning 1000 rows. I need to execute a particular stored procedure for every row the the select statement is returning.  have you got any idea how can I do that?


Given a board of size $1 \times n$,in how many this board can be colored with the colors white,yellow and blue assuming the number of blue cells is an even number.  My try: Given a board of size $1 \times n$,then there are two possibilities for the color of the first cell:  If the first cell is blue then the it's needed to find another cell to color it with the blue color ,this can be done in $n-1$ ways and for each one of these choices there are $b_{n-2}$ ways to color the remaining $1 \times (n-2)$ board with the colors yellow,white and blue assuming the number of blue cells is an even number.  If the first cell is yellow or white then the remaining $1 \times (n-1)$ board can be colored in $b_{n-1}$ ways assuming the restriction on the number of blue cells is satisfied.   Gathering these cases follows: $$b_n=(n-1)b_{n-2}+2b_{n-1}$$ With $b_0=1$ and $b_1=2$ as initial conditions. Calling $G(x)=\sum_{k\ge 0}^{} b_k x^k$,omitting some elementary calculations follows: \begin{align*} G(x)&=\frac{-1}{\left(n+1\right)^{2}x^{2}+2x-1}\\ &=\frac{-1}{\left(n+1\right)^{2}}\frac{1}{(x-a)(x-b)}\\ &=\frac{1}{\left(n+1\right)^{2}(a-b)}\left(\frac{1}{a-x}-\frac{1}{b-x}\right)\\ &=\frac{1}{\left(n+1\right)^{2}(a-b)}\left(\frac{1}{a}\frac{1}{1-\frac{x}{a}}-\frac{1}{b}\frac{1}{1-\frac{x}{b}}\right)\\ & \end{align*} From which we conclude: \begin{align*} b_n=\left[x^{n}\right]G\left(x\right) &=\frac{1}{\left(n+1\right)^{2}(a-b)}\left(\left(\frac{1}{a}\right)^{n+1}-\left(\frac{1}{b}\right)^{n+1}\right)\\ \end{align*} Where $$a=\frac{-1+\sqrt{n+2}}{n+1},b=\frac{-1-\sqrt{n+2}}{n+1}$$ But the closed form does not coincide with the recurrence that I've found.(I only want the question to be solved using recurrence relations.)

a) Determine the number of ways to colour a 1 by n grid using the colours red and white if an even number of squares are to be coloured red.   Note that n is greater than or equal to 1 and the number of red squares could be 0.  I know I must consider the cases of n being even and odd, and determine the sum, from zero to n of the squares being red, where the number of red squares is even. But I just want to make sure I haven’t missed any arrangements by saying a) is $2^{n-1}$ when n is even and $2^{n-1}-1$ when n is odd.  b) Determine the number of ways to colour the squares using red, white and blue if an even number of squares are to be coloured red.  For this case, I can have arrangements including red only, white only, blue only, white and blue only, red and white only, red and blue only, and finally all three colours.  Thank you for any help provided.


I'm working with the following code example def main():     myList = [[None, None, 0]] * 25     myList[0][2] = 3     print(myList)  if __name__ == '__main__':     main()  I expected that when the print statement runs that only the first array within myList would have the value of 3 as its 3rd item, but instead all of the arrays do like this: [[None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3], [None, None, 3]] Not sure how to fix this issue, any help?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Why does a test return the p value?  I am looking at the Diebold-Mariano-Test (DM Test):   Basically, this test gives me a DM statistics, and also the p value. So, do I just the p-value to judge a null hypthoesis?  For instance, if p-val > alpha = 0.05, then I reject the null hypothesis, is this correct?

After taking a statistics course and then trying to help fellow students, I noticed one subject that inspires much head-desk banging is interpreting the results of statistical hypothesis tests.  It seems that students easily learn how to perform the calculations required by a given test but get hung up on interpreting the results.  Many computerized tools report test results in terms of "p values" or "t values".  How would you explain the following points to college students taking their first course in statistics:   What does a "p-value" mean in relation to the hypothesis being tested?  Are there cases when one should be looking for a high p-value or a low p-value? What is the relationship between a p-value and a t-value?


I have deleted multiple files from my system.  The Recycle Bin icon on the Desktop is also showing full but when I am exploring the Recycle Bin it is not displaying any items in it.  I am using Windows 7 Ultimate Edition.  How to fix this type of issue?

The icon shows that it's full. I just deleted stuff, so I know that it's full. But when I open it, it doesn't show the deleted items. The only option I have is to restore them or empty them.  Help me out. It's VERY VERY important for me to fix this problem since I use this workstation for my studio purposes.  P.S. It's a Windows 7 Ultimate (x86) machine.


I am awaiting the delivery of a new laptop that has no OS on it. I am going to install 14.04LTS and I am wondering what are the pros and cons of an encrypted Ubuntu installation?  I assume pros are to do with security but I would appreciate finding out how much different it is from an un-encrypted install. Cons I was thinking would it affect the computers performance level but interested would this be noticeable in everyday use.  Computer you mostly be used for browsing, some downloading, LaTeX, and a little gaming (steam).  Some basic spec on my computer are, Intel Haswell i3 2.6ghz chip, 4gb Ram, 120gb mSata SSD(also have a 1tb HDD that I'll use for data).

I'm in the middle of installing 13.10 and the Ubuntu page I was following on how to install from a USB stick says nothing about these two choices (on the Installation type screen):     1) Encrypt the new Ubuntu installation for security (you will choose a security key in the next step).      2) Use LVM with the new Ubuntu installation (this will set up Logical Volume Management. It allows taking snapshots and easier partition resizing)   I'm a writer using the computer for mostly writing ebooks but I also do all the things most people do: buy stuff online, online banking etc. I want my information to be safe but I don't want to overburden my system with security stuff either. And I've read a lot of the similarly themed questions here on the forum but they've all been about stuff more technical than I'm concerned about.   Can somebody please just tell me in real layman's terms about the implications of these two choices? Thank you.


I'm trying to find military records about my uncle, Chis CONSTANTIN.  As far as we know he was a Romanian pilot within Luftwaffe, who graduated from flight school in Medias, Romania, and from 1942 was stationed in Jüterbog.   Upon returning to Romania in 1948 he was imprisoned for 5 years as a political prisoner. He died in 1983.

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


(This question uses the Mac caffeinate tool as an example, but the concept applies to all tools (i.e. xargs) that accept a utility as argument.)  Mac's caffeinate tool accepts the name of a utility: caffeinate sleep 1, for instance, (where sleep is the utility).  Is there any way for it to accept a zsh function as well, without modifying the tool itself?  For example:  function mysleep {   sleep 2 }  caffeinate mysleep    # mysleep: No such file or directory   Edit: This question is indeed a duplicate for Bash—thanks for pointing me to the answer.  For zsh, however, export -f doesn't work.  Is there a way to do this in zsh?  (I'm removing the bash tag to reduce confusion.)

This is my code  #!/bin/bash  showword() {   echo $1 }  echo This is a sample message | xargs -d' ' -t -n1 -P2 showword   So I have a function showword which echoes whatever string you pass as a parameter to the function.  Then I have xargs trying to call the function and pass one word at a time to the function, and run 2 copies of the function in parallel. The thing that is not working is xargs doesn't recognize the function. How can I achieve what I am trying to do, how can I make xargs work with the function showword?


Since I've installed ubuntu 12.04 I have this problem (on mint 13 I also had this problem) now I have ubuntu 12.10 updated and windows 7 with it.   When I go to windows everything works fine but some times suddenly if I choose ubuntu, it will stuck in violet screen. Even the login screen wont come and I should press and hold the power button to reset my laptop I have to do this for 3 or 4 times.   After reseting and choosing ubuntu again a black screen come and there is a dash in it and nothing else. I'm woried about my lap top . if I reset it again I'm afraid it could get serious problems.  My laptop is hp probook 4520s 1GB swap space.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


I am trying to make a simple currency converter and and everything is OK... except when I leave the amount null (the app crashes). What should I do in this situation? Double tot; double amount = Double.parseDouble(ed1.getText().toString()); if (sp1.getSelectedItem() != null && sp1.getSelectedItem().toString() == "USD" && sp2.getSelectedItem().toString() == "TRY") {     tot = amount * 7.66429;     Toast.makeText(getApplicationContext(), tot.toString(), Toast.LENGTH_LONG).show(); } else if (sp1.getSelectedItem().toString() == "USD" && sp2.getSelectedItem().toString() == "EURO") {     tot = amount * 0.859542;     Toast.makeText(getApplicationContext(), tot.toString(), Toast.LENGTH_LONG).show(); } else if (sp1.getSelectedItem().toString() == "USD" && sp2.getSelectedItem().toString() == "GBP") {     tot = amount * 0.784503;     Toast.makeText(getApplicationContext(), tot.toString(), Toast.LENGTH_LONG).show(); } else if (sp1.getSelectedItem().toString() == "USD" && sp2.getSelectedItem().toString() == "CAD") {     tot = amount * 1.33866;     Toast.makeText(getApplicationContext(), tot.toString(), Toast.LENGTH_LONG).show(); } else if (sp1.getSelectedItem().toString() == "USD" && sp2.getSelectedItem().toString() == "AED") {     tot = amount * 3.67250;     Toast.makeText(getApplicationContext(), tot.toString(), Toast.LENGTH_LONG).show(); } else if (sp1.getSelectedItem().toString() == "USD" && sp2.getSelectedItem().toString() == "JOD") {     tot = amount * 0.709000;     Toast.makeText(getApplicationContext(), tot.toString(), Toast.LENGTH_LONG).show(); }

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?


$n$ is known, $\alpha$ is irrelevant, and you are looking for $x$? How do you simplify:  $$\sin(\alpha)+\sin(\alpha+x)+\sin(\alpha+2x)+\sin(\alpha+3x)+ \dotsb +\sin(\alpha+nx)$$

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


I'm not sure I worded my question correctly, but I wasn't sure how else to ask it.  I have multiple Safari windows open. In apps besides Safari, if I click on a link, it opens the link in one of the windows (the window that was opened first). This isn't always what I want. It appears that that first window is viewed as my primary window (or something similar). Is there a way I can set the 'primary window' to be one of my other Safari windows (without having to close and reopen all windows in a certain order)?

I have multiple Safari windows for tab organization. I usually have multiple tabs in each window.  When I click on a link from an app other than Safari, it opens the link in a new tab in Safari, as Safari is my default browser.   The problem is that it often opens in a Safari window that is currently minimized or that I am currently not using. So it doesn't open the link in my main, active, current window (basically the one I have used last). Instead, it chooses its own "default window" to open links in, which may be a window I'm not even using.   However, I would like these links to always open in the window that I used last, and not in a window that I'm not using. Is it possible to make links always open in the last active window you used, or at least set the "default" window which will open new links?  I am currently running macOS Sierra 10.12.1, with the default Safari version that comes with it.


Not sure if this is the right place to ask this, but ...  I have a small website where I showcase my work in design/art/photography/etc, and I have developed an article template which I would like to use as a promotional tool - local events, other artists work, personal blog posts, etc, etc.  As there is no set theme for what I write about, I was planning on simply placing the articles in a folder on the domain, giving each one a unique ID so that those featured in the article can link it from their social media accounts or websites. Like:  http://example.com/articles/id/40294092 ... A local business profile http://example.com/articles/id/53904930 ... A music event article   But, I have 2 problems.  First ... As all articles are placed withing the same articles/id path, it's quite easy for people to type in a code ( 24209429 ) to see any other article that I have written, which may mean they see material that is sensetive, as I plan on writng a lot about horror films and macabre art. However, as the code is randomly generated it's unlikely that people would find content in this way, but possible - Especially if they search for example.com/article in Google.  Second ... I plan on having adverts on these articles, and as there is no set homepage I was wondering how I could get verified on things like AdSense, as they would not be able to link to example.com/articles and see all of my content.  Any advice on a good way to both get verified by AdSense, AND keep my articles as private as possible?

I've posted a similar question (      ) earlier but this is now more relevant, so please give me a note to   delete the previous question if you feel it should be removed.   I have a section in my website where I want to publish articles based on my work ( art/design/photography ), promotional materials for local events/businesses and other more national promotional meterial ( plus maybe some personal posts ).  So as you can tell, it's a bit of a random section, meaning that there is no real home page. I simply want people to be able to visit the article directly from social media or 3rd party websites.  The url/links are structured as:  http://example.com/articles/id/40294092 ... A local business profile http://example.com/articles/id/53904930 ... A music event article   Meaning that simply visiting http://example.com/articles will result in a redirect back to http://example.com.  So if I want my articles to have AdSense adverts, I obviously need to give the root of my articles, which in this case will result in a blank page, followed by the redirect.  How can I get Google AdSense to verify my url?


I tried to count files in each subfolder. For example   first subfolder : 4 files second subfolder : 6 files  ...  Now my function count files in directory which I select in array:   if (!is_dir($subentry) && $gallery_dir[0]) {   How to can I count and list number of files in each subdirectory? But not sum elements from all subdirectories but in each subdirectory start counting from 0.  This is what I tried so far:  $folderCount = $fileCount = $galleryItemCount = 0; $dir ='./product_img/'; //. means current directory //if you wanna a learn a folders inside use opendir('path') $gallery_dir = array(); $gallery_subdir = array(); if ($handle = opendir($dir)) {     while (false !== ($entry = readdir($handle))) {         if ($entry != "." && $entry != "..") {             if (is_dir($dir.$entry)) {                 echo "Folder => " . $entry . "
";                      $gallery_dir[] = $entry;                      if ($subdir = opendir($dir.$entry)) {                          while (false !== ($subentry = readdir($subdir))) {                             if ($subentry != "." && $subentry != "..") {                                 if (!is_dir($subentry) && $gallery_dir[0]) {                                     echo "Folderrrr => " . $subentry . "
";                                       $gallery_subdir[] = $subentry;                                     $galleryItemCount++;                                     echo $gallery_dir;                                 }                             }                          }                         closedir($subdir);                     }                  $folderCount++;             } else {                 echo "File   => " . $entry . "
";                 $fileCount++;             }         }     }     //echo $galleryItemCount++;     echo "

";     echo "File in aech folder" . $galleryItemCount. "
";     echo "Total Folder Count : " . $folderCount . "
" ;     echo "Total File Count : " . $fileCount;     closedir($handle); }

Is there a better/simpler way to find the number of images in a directory and output them to a variable?  function dirCount($dir) {   $x = 0;   while (($file = readdir($dir)) !== false) {     if (isImage($file)) {$x = $x + 1}   }   return $x; }   This seems like such a long way of doing this, is there no simpler way?  Note: The isImage() function returns true if the file is an image.


I'm trying to figure out how to be able to host HTML files within either GitHub or DropBox, then perform an HTTPGet within a CloudPage like below: %%[     set @httpContent = HTTPGet('https://www.dropbox.com/s/0og6dbz3hbyqf1h/test.html') ]%%  %%=TreatAsContent(@httpContent)=%%  The expectation which I'm having trouble with is that I would like to be able to edit these HTML files in real time, and by doing so, the CloudPage will always be updated with the most recent changes.  Basically, if you consider the DropBox file above (test.html), I would want to go to DropBox, edit the file, save it, then immediately via the AMPScript above in the CloudPage, the CloudPage will be updated with the updated test.html.  I hope that makes sense.  When you run the following CloudPage URL which contains the code above:  It literally pulls in the actual HTML rather than rendering it.  Is there any way to accomplish what I'm trying to do?

Has anyone had any success connecting things like content builder or cloud pages to GitHub? I have been searching far and wide and have come across this amazing repository that almost does what I need (). The reason being as our organization grows and things become more complex we would love the ability to track changes and have reviewers before things are published. Most of my experience comes from GitHub and I am struggling to find any source of versioning within SFMC. Any recommendations would be helpful!


Quite often we see that the file we are trying to save in vim after edit is reported to be read-only. The way around this is to add !wq, i am trying to figure out what internally goes that allows the vim program to gain enough permission to write the read-only file ?   Is there a internal flag which is switched or the vim temporarily gains the privileges for some time ?

I understand that it means force to do something.  When doing $ vim -R file I enter in read-only mode, but this works as preventive mode only   -R  Readonly mode.  The 'readonly' option will be set for all the     files being edited.  You can still edit the buffer, but will     be prevented from accidentally overwriting a file.  If you     forgot that you are in View mode and did make some changes,     you can overwrite a file by adding an exclamation mark to     the Ex command, as in ":w!".  The 'readonly' option can be     reset with ":set noro" (see the options chapter, |options|).     Subsequent edits will not be done in readonly mode.  Calling     the executable "view" has the same effect as the -R argument.     The 'updatecount' option will be set to 10000, meaning that     the swap file will not be updated automatically very often.   But what I can't get yet is why it makes the instruction to skip permissions even if the file's owner is root user, besides it also change owner & group.


Or are some naturally better at it, but certain people with the right genes are able to use it better, like really powerful Jedis are mutants? I've wondered about this before and I've never had it cleared up.

One of the elements of midichlorians is that it canonized the idea that one's capacity for using the Force comes from heredity and/or environment.  Personally, I didn't see any issue with this, as the importance of Luke Skywalker to me always was partially due to his particularly high capability to use the Force.  I'd always taken Obi-Wan and Yoda's "The Force is strong with this one," and "The Force is strong with your father, you, and your sister," to indicate that Luke and Leia had this skill due to heredity.  When discussing the issues that the prequels bring up, a common discussion point is on the heredity of Force adeptness.  In the original trilogy, was skill in the Force something anyone could gain, or was it meant to be hereditary?


I had 12.04LTS and recently decided to upgrade to 13.10. 12.10 wouldn't ever start up and all I could access was the GRUB and the terminal, so I upgraded to 13.10 from there. I have a cd with 12.04 on it but I do not have the others on a disk and I cannot make one because I do not have a cd large enough to make one. After 13.10 was installed, it worked alright. There were black bars around every field and I could not acess the terminal at all. I restarted it and after I put in my password, the screen goes blank and after a moment or so there would be two boxes that say something along the lines of a system problem being detected and I could move the cursor to click either cancel or report the problem. Nothing would happen after that, but by using ctrl + alt + t I could access the terminal. I looked at a few other topics that others seemed to be having the same problem as I did but all of the solutions that were being suggested didn't work for some reason. I don't want to reinstall the system because I couldn't create a backup of my files before this happened.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Given the scrutiny that parents find themselves under from social workers, teachers, councils and any other busybody who stick their noses in, How is it possible that Muggle Borns such as Hermione can just "Disapear" from the system? Given that it is a legal requirement to stay at school till 16 the ministry would have to go full time to obliterate all documentation, and obliviate all personages with knowledge of such a child.  Therefore why was Hermione allowed to dissapear from the system?

So a bunch of kids all of a sudden "go missing" from school.  Harry Potter having attended school for a couple of years before starting at Hogwarts, one semester just doesn't show up.  How is this solved? What do parents say when a school teacher calls and wonders where their pupil is?  I assume that Hogwarts isn't an officially recognized school (though perhaps it is?), and due to education being compulsory, someone would do the math and find that low-hundreds of kids go missing in the transition from primary to secondary school every year.


Show that if $(a,p)=1$, $p$ an odd prime then, $\sum_{n=1}^{n=p}\left(\frac{n^2+a}{p}\right)=-1$, where $\left(\frac{n^2+a}{p}\right)$ is the Jacobi symbol.

How to calculate such sums as $\sum_{x\in\mathbb{F}_p} \left(\frac{x^2+ax+b}{p} \right)$  If $x^2+ax+b$has a root, $b$ may be eliminated and the sum is evaluated to be $0+\sum_{x\in\mathbb{F}_p^*} \left(\frac{1+ax^{-1}}{p} \right)=-1$. Otherwise to linearize it, you need to go into quadratic extensions. So I guess there may be a solution resorting to extensions of $\mathbb{F}_p$.  It is easy to extend the symbol since the extension is cyclic. But then I need to sum in an unfamiliar space. Can we fix this and eventually give a proof in this flavor?  Any reference is welcome.


I'm not sure if I'm misunderstanding this in any way, but surely evaluating the zeta function at, say, -2, would give  $1 + 2^2 + 3^2 + 4^2 + 5^2 + ...$  which seems to diverge to infinity. What am I missing?

A question that has been puzzling me for quite some time now:  Why is the value of the Riemann Zeta function equal to $0$ for every even negative number?  I assume that even negative refers to the real part of the number, while its imaginary part is $0$.  So consider $-2$ for example:  $f(-2) =  \sum_{n=1}^{\infty}\frac{1}{n^{-2}} =  \frac{1}{1^{-2}}+\frac{1}{2^{-2}}+\frac{1}{3^{-2}}+\dots =  1^2+2^2+3^2+\dots =  \infty$  What am I missing here?


In my textbook, it is given that drift velocity $$v=(eE/m)t$$ where $t$ is the relaxation time. But this is the maximum velocity an electron achieves before collision and hence the average velocity should be $$(1/2)*(eE/m)t.$$ Can someone tell me how my logic is incorrect?

this is a very short question, probably I'm missing  something really simple: according to Drude model, we have for the drift velocity of electrons, being also the average velocity: $$ v_d = \frac {-e E \tau } m  ,$$ where $ \tau$ is average free path time. Now, how can this be the average electron velocity? This velocity comes from the whole momentum increase during the free path, shouldn't we consider the average electron being only at half of the path, dividing the velocity by 2?


adverbs like inefficient, inexpensive, unnbelievable..., imbossible  Is there any roule? When to use? What to do

Are there any patterns to observe in choosing the correct negative prefix to use, as in unbelievable, disproportionate, asymmetric, and intolerable? (There are other negative prefixes as well, but these are the ones I usually mix up.)  Un- and in- are probably the ones I most frequently mix up, as in *untolerable/intolerable, *unedible/inedible, *unexact/inexact, *unappropriate/inappropriate, ... I realize these are all in-, but why? Is there anything to look for there?


Hello right now I have a task to do but I am kind of stuck with the color bit. I am working with three.js (a javascript library). In the task at a certain point, I need to convert decimal color code (e.g 12615680 into something like this: #FF0000 or 0xFF0000. The solution should be javascript code (function) which can convert the decimal color to hex.

How do you convert decimal values to their hexadecimal equivalent in JavaScript?


I want to compute the value of  $\sum_{k=1}^{\infty} k^{-k}$.   First i try to check whether this series converges,   \begin{align} \lim_{k \rightarrow \infty} k^{-k} = \lim_{k\rightarrow \infty} e^{-k \log(k)} =0 \end{align} Thus i see that series converges.   But how do we know the exact value of this series?

Earlier today, I was talking with my friend about some "cool" infinite series and the value they converge to like the Basel problem, Madhava-Leibniz formula for $\pi/4, \log 2$ and similar alternating series etc.  One series that popped into our discussion was $\sum\limits_{n=1}^{\infty} \frac{1}{n^n}$.  Proving the convergence of this series is trivial but finding the value to which converges has defied me so far. Mathematica says this series converges to $\approx 1.29129$.  I tried Googling about this series and found very little information about this series (which is actually surprising since the series looks cool enough to arise in some context).  We were joking that it should have something to do with $\pi,e,\phi,\gamma$ or at the least it must be a transcendental number :-).  My questions are:   What does this series converge to? Does this series arise in any context and are there interesting trivia to be known about this series?   I am actually slightly puzzled that I have not been able to find much about this series on the Internet. (At least my Google search did not yield any interesting results).


Let $f,g:\Delta_1\to X$ be two paths in $X$ such that $f(e_1)=g(e_0)$. Prove that $f*g-f-g\in S_1(x)$ is a 1-boundary. (Here $f*g$ denotes the concatenation of paths $f$ and $g$).  I have thought about solving this exercise in the following way:  Note that $$\partial(f*g-f-g)=\partial(f*g)-\partial(f)-\partial(g)=g(e_1)-f(e_0)-(f(e_1)-f(e_0))-(g(e_1)-g(e_0))=0$$ then $$f*g-f-g\in ker(\partial:S_1(X)\to S_0(X))$$, so $$[[f*g-f-g]]\in H_1(S_*(X))=\frac{ker(\partial:S_1(X)\to S_0(X))}{Im(\partial:S_2(X)\to S_1(X))}$$.  What I want to obtain is that $[[f*g-f-g]]=[[0]]$, because if the latter is true, then $f*g-f-g-0=f*g-f-g\in Im(\partial:S_2(X)\to S_1(X))=B_1(S_1(X))$ would have to be that $f*g-f-g\in B_1(S_1(X))$ and thus $f*g-f-g$ is a 1-boundary. How can I prove then that $[[f*g-f-g]]=[[0]]$? Is what I did fine? Thank you.

Let $X$ be simply connected and let $ \tau $ be a cycle in $X$. If $ \tau(0)=\tau(1)=x_0$ and $\gamma $ is a path between $x\in X$ and $x_0$, is $\tau$ homologous to $ \gamma\tau\gamma^{-1} $?  I think it is, but I'm not sure about the proof. Can I use the fact that $ \gamma\tau\gamma^{-1} $ is homologous to $ \gamma+\tau+\gamma^{-1} $, where $+$ is the operation between 1-chains (that is abelian)?


Last session, my DM ruled that my imp cannot help me perform checks (in this instance I was trying to have my little guy help me pick through some dead guards' pockets) because he deemed that giving me advantage on most checks all the time is OP. Also, my imp has to make stealth checks every time he enters a room to scout, regardless if he is invisible or not, which hasn’t always ended well. It seems to me that all the creative ideas that I’ve read about using a familiar are bound by what the DM would rule. My play group are mostly some long term friends that I have been playing with, along with the DM. It's also his first time as the DM. Should I see if my DM will let me change my pact? Or should I try to convince him to ease up on my familiar?

The PHB states: "A familiar can’t attack, but it can take other actions as normal."  What can a familiar do? Can it use a potion of healing on a character? Can it drop caltrops?


I'm trying to learn C, but currently stuck. I'm trying to get the same output as below, but I'm not sure how to round the last few decimals points in my code to get the same output below.  1. ENTER AN INTEGER 2. 5 3. DIAMETER: 10.000000 4. CIRCUMFERENCE: 31.415900 5. AREA: 78.539750     int main() {      float num1, diameter, circumference, area;      printf("ENTER AN INTEGER\n");     scanf("%f", &num1);      diameter = 2 * num1;     circumference = 2 * 3.14159 * num1;     area = 3.14159 * (num1 * num1);      printf("DIAMETER: %f\n", diameter);     printf("CIRCUMFERENCE: %.6f\n", circumference);     printf("AREA: %.6f\n", area);       return 0; }   The output of my result.  1. ENTER AN INTEGER                                                                         2. 5                                                                                3. DIAMETER: 10.000000                                                                      4. CIRCUMFERENCE: 31.415899                                                                  5. AREA: 78.539749

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


What I'm looking for is graphs that can be generated very easily? for eg just an x-y graph with some linear function or quadratic/cubic/quartic to be plotted? a general case nothing specific without numbered axis etc. I need to be able to distinguish between cases where I have different roots for eg for some general cubic i could have 2 negative and 1 positive etc is there a very easy way to do this? where i can just move different degree polynomials around a graph? I'm no expert using tikz well to be honest i wouldn't know the first thing about it. Also if some generic parabola can be added anywhere is the positive quartile and "slid" up and down anywhere... I don't need anyone to write up code just a push in the right direction would be greatly appreciated.

Which is the best way to put function plots into a LaTeX document?


I want to use USB on my VirtualBox Windows 10(guest).This is my USB   This is my VBoxManage output   VBoxManage list usbhost Host USB Devices:  UUID:               95889d61-8b37-4088-ae5b-fc6500bb05fc VendorId:           0x275d (275D) ProductId:          0x0ba6 (0BA6) Revision:           1.0 (0100) Port:               3 USB version/speed:  1/Low Product:            USB OPTICAL MOUSE  Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4//device:/dev/vboxusb/001/002 Current State:      Busy  UUID:               1d8a7ecf-85dd-4320-bd9b-03e7ae8540e3 VendorId:           0x058f (058F) ProductId:          0x6387 (6387) Revision:           1.5 (0105) Port:               0 USB version/speed:  2/High Manufacturer:       Generic Product:            Mass Storage SerialNumber:       35CE8FB1 Address:            sysfs:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-1//device:/dev/vboxusb/001/004 Current State:      Busy   But the problem is when I enter VirtualBox.Where should I find device to properly set host and guest?  EDIT  I HAVE SOLVED THIS,THIS helps

I'm using Ubuntu Maverick and Virtual Box 3+. I have Windows 7 Ultimate. The problem is that it doesn't detect USB drives in Windows 7, but USB peripherals (mouse + keybord) are working.  I followed , but I can't find the user group vboxusers. How can I continue? I would also like to upgrade to the latest version without any risk (without losing my virtual hard disk drive).


Here's my servlet code:  @WebServlet("/Admin") public class Admin extends HttpServlet {  // some code goes here  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     // TODO Auto-generated method stub     OrdersQuery query = new OrdersQuery();      if (request.getParameter("deleteOrderBtn") != null) {         deleteOrderById(Integer.valueOf(request.getParameter("deleteOrderBtn")));     }else {         Object allOrders = query.getAllOrders();         request.setAttribute("allOrders", allOrders);          RequestDispatcher rd = request.getRequestDispatcher("admin.jsp");         rd.forward(request, response);     } }   }  And my authentication filter:      @WebFilter("/Admin")     public class AdminFilter implements Filter {     public void doFilter(ServletRequest request, ServletResponse response,          FilterChain chain) throws IOException, ServletException {      String login = request.getParameter("adminLogin");     String password = request.getParameter("adminPassword");     if (login.equals(LOGIN) && password.equals(PASSWORD)) {         chain.doFilter(request, response);     }else {         RequestDispatcher rd = request.getRequestDispatcher("error.jsp");         rd.forward(request, response);     }  }   So when I am pressing the deleteOrderBtn button it gives me NullPointerException and refers to the Filter and this line from it:  if (login.equals(LOGIN) && password.equals(PASSWORD)) {   But I have no idea why. So can you please look at my problem?

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?


Consider Diophantine equation $2x^3+1=y^3$  There are two solutions  $$x=(0,-1), \, y=(1,-1)  $$  Are there anymore integer solutions for $x$ and $y$?  I've tried the following argument but am not satisfied with it.  Identity:    $$[(B^3)(x^6)+3(B^2)(x^3)+3(B)]x^3+1=(Bx^3+1)^3$$  Looks like:  $$[        2                  ]x^3+1=(  y   )^3$$  Let  $[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$ and $(Bx^3+1)=y$  Since $2$ divides $B$ we get possible values for $B$ are  $$B=\{-2,-1,1,2\}$$ Testing the $B$ set in equation $$[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$$ we can see that the only possible integer solution is $B=2$ and $x=-1$ and so $y=-1$.  The other solution is trivial $x=0,\,y=1$. So from this argument there are no other integer solutions for $x$ and $y$.  My problem with the above argument is that by me saying:  "Let  $[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$ and $(Bx^3+1)=y$"  I am indirectly saying from the start that there and no other solutions.  What I would have to do is prove that:   all possible solutions for $y$ are of the form $Bx^3+1$ and  equation $[(B^3)(x^6)+3(B^2)(x^3)+3(B)]=2$ is true for all possible solutions for $x$   But I cannot prove it.  thank you

I'm not familiar with diophantine equations. At most my approaches doesn't give results. I need to solve the following equation $$x^3-2y^3=1$$ Where $x,y,z\in\mathbb{Z}$ I know $x=-1,y=-1.x=1,y=0,$ Aware of any other integer solutions. Prove


I am new to Ubuntu. I am running 15.10. I'm trying to launch Steam but it doesn't do anything.  I saw that it still runs without showing anything on the screen.  What can I do?

After a botched upgrade from Ubuntu 14.04 to Ubuntu 16.04 I had to wipe my system and start all over. This time I decided to go with a much less CPU intensive desktop environment and installed Lubuntu 16.04-1.  My problem: when I run Steam from the menu shortcut it acts like it is doing nothing. However it does show up in the task manager. If I just type steam in the terminal I get the following.  michael@michael-HP-Pavilion-dm1-Notebook-PC:~$ steam Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc /bin/bash: /home/michael/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /bin/bash) grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc awk: /home/michael/.local/share/Steam/ubuntu12_32/steam-runtime/amd64/lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by /lib/x86_64-linux-gnu/libreadline.so.6) Installing breakpad exception handler for appid(steam)/version(1468023329) libGL error: unable to load driver: r600_dri.so libGL error: driver pointer missing libGL error: failed to load driver: r600 libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast   Then nothing happens including steam doesn't show up in the task manager. Now I did find the command.  LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam   This does run Steam but it is not a real solution in my eyes. How can I fix it?


On my way to work which is about an hour drive I had brought along my protein shake which contains 16oz of milk. The whole car ride was nice and cool due to the ac. Once I got to work I accidentally left it out for another hour in the car. I just grabbed it and put it in the freezer so it will cool. It did not smell bad. Is this still okay to drink? Or has it been too long?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


A good step by step math derivation based and self contained second graduate course textbook for a mathematical statistics textbooks?  Note: By saying second mathmatical statistics graduate course, i mean that it is after the first graduate level mathematical statistical course  The second book itself i've been refer to should be the same level as jun shao's mathematical statistics and it should be the focus on general mathematical statistics subjects but not too specific

Before I ask my question, let me give you a bit of background about what I know about statistics so that you have a better sense of the types of resources that I'm looking for.  I'm a graduate student in psychology, and as such, I use statistics almost every day.  By now I'm familiar with a pretty broad array of techniques, mostly as they are implemented in the general structural equation modeling framework.  However, my training has been in the use of these techniques and the interpretation of results -- I don't have much knowledge of the formal mathematical foundations of these techniques.  However, increasingly, I've had to read papers from statistics proper.  I've found that these papers often assume a working knowledge of mathematical concepts that I don't know much about, such as linear algebra.  I have therefore become convinced that if I wish to do more than blindly use the tools that I have been taught, it would be useful for me to learn some of the mathematical basis of statistics.  So, I have two related questions:   What mathematical techniques would be useful for me to know if I want to brush up on the mathematical foundation of statistics?  I've encountered linear algebra pretty often, and I'm sure that learning about probability theory would be useful, but are there any other areas of math that would be useful for me to learn about? What resources (online or in book form) can you recommend to me as someone who wants to know more about the mathematical foundations of statistics?


How to count the number of pages between two labels? I tried to fined a way using  but not helpful.  \documentclass[12pt]{book} \usepackage{lipsum} \begin{document} \lipsum[1-20]\label{start} \lipsum[1-20]\label{end}  As mentioned in $\the\numexpr\pageref{end}-\pageref{start}$ pages ... \end{document}

How can I calculate the difference between 2 counters (like page numbers), so that pdfLateX outputs "3" in the last line of my example? and how could I calculate the difference between the "current" page (where the calculation is printed) and \pageref{A} (without explicitly defining \label{B})?   Example:  \documentclass{scrbook}  \usepackage[ngerman]{babel}  \usepackage[latin1]{inputenc}  \begin{document}  Here is label A \label{A}  \newpage text \newpage text \newpage  Here is label B \label{B}  There are \pageref{B}-\pageref{A} pages between labels A and B.   \end{document}


The person in question is my sugar mother and she doesn't want any of my information, she's offering me her bank account # and she sent me a picture of her ID to prove that she's who she claims to be(and I've video chatted her before as well.) Any chance I'll get in trouble for this?

On thanksgiving day a woman posted in a facebook group that her father had just passed away (left her money) and in good deed because it was thanksgiving she was offering to pay people’s debts. Well I inboxed her and she pretty much wants me to open up a bank account with First Tech Credit Union and give her my log in and password info. Ofcourse its sketchy!   So I questioned her and asked why she wanted that instead of her sending me the money directly from her bank to mine. She then responded because she wants to keep records of my debts. (She asked for proof and I sent her screenshots ONLY of my outstanding balances) I heard about the depositing checks scam so I questioned her about how she would deposit the funds and she said cash.  Her facebook page is 100% legit, I screenshotted her pics and family profiles etc. We came to an agreement that I would only accept her help if she sends me a picture of her ID before me sending this info.   She literally just wants to deposit the money to me, She isn’t asking me to send nobody money from that account or anything. Of course the account will be empty when I provide it to her. When she does deposit the money I am planning to immediately change the password and obviously stay watching my account activity while she deposits the funds.   She actually also provided pics of other accounts she funded. My question is, is this a scam? And if so how could she possibly scam me? Specially if i have her information and A pic of her ID. She is a christian lady and looks like she has a good heart, We talked about my struggles and she actually looked into why I needed to be assisted with the money. By no means was she pushy or anything. I want to believe that she just wants to help me but I am also too skeptical.


How can I have a class which allows me to have a another variable when calling,  eg.  $class->variable1->variable2->function();

How can I do this in PHP  $myDBClass->users()->limit(5);//output you limited users to 5 $myDBClass->comments()->limit(3);//output you limited comments to 3   what I meant is nested methods or nested class (I don't know!) so when I call the limit method as a child of users it will know that I am calling it from  "users" method -or class- and when I call limit method -or class!- from comments It also knows that.  what is the possible structure for a PHP class to do this thing?    the reason for this question because I am working on my own class for database so I can easily use something like this       $DB->comments()->id(" > 3")->limit(10);   to generate the sql code "select * from comments where id > 3 limit 10" Thanks


I would like to know if it is worth me rooting my galaxy s7 sm g930f phone and if there are any problems after its done.   thank you

I see lots of tutorials telling me how to root my phone (Motorola Droid), but none of them mention any potential "side effects."  Aside from a few relatively minor issues that seem to require rooting to fix, I'm basically happy with the phone and therefore a little leery of messing with a device that cost me a lot of money and is only a few months old.  Assuming that I'm just talking about rooting, and none of the typical post-root actions (like installing a custom ROM), am I taking any risks by choosing to root?   Does it have the potential to brick the device? Will it void my warranty? Will I stop getting updates? Will the cops show up at my front door the next day? (Yes, I'm being facetious.) Anything else I should be aware of?   (See also: )


Maybe the bus already left. Maybe the bus has already left.  Maybe the bus has left already.    I am not a native speaker so don't know if there is any difference among those three sentences, not knowing if there is any grammatical error as well.   Which one is the best??

For example:     Ever wish you could share information broadly   Could it be rewritten to:     Ever wish you could broadly share information   Are there any rules for the position of the adverbs.


For some reason I need to disable a system service on boot. In my case this is the Avahi Daemon. I just don't want it to start on boot.  In previous Ubuntu releases (e.g. 12.04) I could do  sudo update-rc.d avahi-daemon disable   However on 14.04 it shows  update-rc.d: warning:  start runlevel arguments (none) do not match avahi-daemon Default-Start values (2 3 4 5) update-rc.d: warning:  stop runlevel arguments (none) do not match avahi-daemon Default-Stop values (0 1 6)  System start/stop links for /etc/init.d/avahi-daemon do not exist.   And Avahi is started on boot. How can I disable this? I'm looking for a command line way of doing this.  And please care to explain what happened here? Some change in a recent Ubuntu release broke the use of update-rc.d? I suspect I'm missing something here.

I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them.  The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents.  The other one I found is to edit .conf files in the /etc/init folder.  What's the recommended way to enable / disable / add services and why?  Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it?


I want to shrink C: drive by at least 30 GB but I can't go above 13GB using Windows 10 disk Management tool when 130GB is free     Why is the available shrink space so low even when 130 GB is free?

I have just bought an HP laptop with Windows 7 (64 bit). It has a 500 GB HDD with three partitions: a small hidden system partition, a 12 GiB HP recovery partition, and a 450 GiB C: boot partition.  I would like to split this large C: partition into two partitions, leaving only 100 GiB for the system, and giving the rest to a new data partition.  Although the Windows built-in Disk Management utility has an option to shrink the bootable partition, it only allows me to shrink it roughly by half, even though only 20 GiB on the partition is used. As far as I understand, system unmovable files lie in the middle of the partition, preventing Disk Management utility to do what I want.    And since new HP laptops don't come with OS installation disks (they only allow you to create recovery disks yourself), I can't just repartition HDD and then reinstall OS.  So, is there a way to shrink the C: bootable partition and preserve Windows 7 working?  P.S.: I have tried to use the third-party  utility, and after shrinking the partition, Windows 7 stopped booting, with a . System recovery didn't work, and I had to do factory recover. Since this is a long process, I would like to avoid doing it again :) So, please, suggest only proven solutions.


#include <iostream> using namespace std;  int main () {  int n = 100;  while (n > 50) {  cout << n << ", "; --n;  }  cout << "DONE!";  system("PAUSE");  }   Basically, this program will put the integer in a while loop and keep on subtracting one until it reaches 50, but I want it to do the opposite. Instead of --n (which keeps on subtraction one from the value), I want it to add one.   Okay, so how would you do this with multiplication? Because **n isn't working...?

This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles. Please edit the accepted answer to provide quality books and an approximate skill level — preferably after discussing your addition in . (The regulars might mercilessly undo your work if they disagree with a recommendation.) Add a short blurb/description about each book that you have personally read/benefited from. Feel free to debate quality, headings, etc. Books that meet the criteria will be added to the list.  Books that have reviews by the Association of C and C++ Users (ACCU) have links to the review. *Note: FAQs and other resources can be found in the  and under .


Long story short, I have an iPod 5, and I've been excited for this game for about a year now. I keep getting a GPS signal not found. Can I play under wifi or some sort of cellular data?


When i include .h files the compiler says no such file or directory i have installed MinGW in the default path C:\MinGW\ and i have added the MinGW path to environment variables path as C:\MinGW\bin   this is my code   #include <stdio.h> #include <main.h>  int main() { #if (DEBUG_MODE)     printf("Debug Mode!\n"); #else     printf("No Debug Mode!\n"); #endif     return 0; }   and this is my main.h file  #ifndef MAIN_H_INCLUDED #define MAIN_H_INCLUDED  #define DEBUG_MODE 1  #endif // MAIN_H_INCLUDED   and this is the error  11:02:58 **** Incremental Build of configuration Debug for project test **** Info: Internal Builder is used for build gcc -O0 -g3 -Wall -c -fmessage-length=0 -o main.o "..\\main.c"  ..\main.c:10:18: fatal error: main.h: No such file or directory #include <main.h>               ^ compilation terminated.  11:02:58 Build Failed. 1 errors, 0 warnings. (took 212ms)

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?   #include <filename>  #include "filename"


With Ubuntu 18.04, I can drag and drop files from Desktop to File manager and vice versa. On my other Ubuntu 20.04 install, this is no more possible. Has this fetaure been voluntarily removed or is it an accidental regression? How to enable it again? Many people seem to have noticed the same problem, see for example the 100+ voted comment about this on the video : "Love Ubuntu, but I'm still disappointed a basic feature like drag & dropping files to/from desktop into the file manager is missing.". Note: This is strange for a LTS; why did they accept this a-little-bit-broken state for a Release version, did they consider it's not important? All major OS support drag n drop out-of-the-box from/to Desktop since Win 95 probably. (Without having to tweak some parameters). Do you think there's a hope to have this solved in 20.04.1 or 20.04.2?

In Ubuntu 20.04, on the desktop, there is a number of actions I wish I could do, such as, by order of importance :  use keyboard shortcuts such as select all, copy / paste. use drag & drop with icons deactivate the "mouse over" highlight, and restrict the clicking area to only the icon, not the surrounding square  To put it simply, I'd like to have the exact same features as offered by the desktop of Ubuntu 18.04 (probably related to a specific version of GNOME, and not Ubuntu itself). Am I missing something obvious here? I actually see no reason why those actions are removed or deactivated on the desktop, since they all work in any Nautilus window.


I have browser and server on ip-address a.b.c.d Now I have 2 possible URLs to server:   Through Nginx from browser  browser -> https://a.b.c.d/ -> server  Through WSS from javascript  browser -> wss://a.b.c.d:10062 -> server    So, server listnes on 443 (nginx), and some other application on 10062. I want to change second connection to the same port (443):  browser -> wss://a.b.c.d/someurl -> server   So Is it possible to proxy in nginx to a.b.c.d:10062, something like this:  server {     listen 80;     listen 443 ssl;     ssl_certificate /path/to/crt/for/https;     ssl_certificate_key /path/to/key/for/https;      server_name a.b.c.d;      location /someurl  {                      -->> What to write here to create redirect for wss://a.b.c.d:10062 ?  << --     }      # the other locations here ('/', etc)     # ...      # ...  }     I tried next:  map $http_upgrade $connection_upgrade {     default upgrade;     ''      close; }  location /someurl {     proxy_pass http://127.0.0.1:10062;     proxy_http_version 1.1;     proxy_set_header Upgrade $http_upgrade;     proxy_set_header Connection $connection_upgrade; }   But when go to  for test it shows  2015/12/14 16:12:51 [error] 371#0: *113 connect() failed (111: Connection refused)  while connecting to upstream, client: my_ip, server: a.b.c.d, request: "GET /someurl HTTP/1.1",  upstream: "http://127.0.0.1:10062/someurl", host: "a.b.c.d"   BUT!: Netstat shows this:  sudo netstat -tnlp | grep :10062 tcp        0      0 a.b.c.d:10062          0.0.0.0:*                   LISTEN      5702/webrtc2sip   So seems like I need specify a.b.c.d instead of 127.0.0.1, so I tried  location /someurl {     proxy_pass http://a.b.c.d:10062;     proxy_http_version 1.1;     proxy_set_header Upgrade $http_upgrade;     proxy_set_header Connection $connection_upgrade; }   Result:  2015/12/14 16:54:11 [error] 13189#0: *123 recv() failed (104: Connection reset by peer)  while reading response header from upstream,  client: my_ip, server: a.b.c.d, request: "GET /someurl HTTP/1.1", upstream: "http://a.b.c.d:10062/someurl", host: "a.b.c.d"     Ok. I trunketed someurl when passing to proxy:  location = /someurl {     return 302 /someurl/; }  location /someurl/ {       proxy_pass http://a.b.c.d:10062/;       proxy_http_version 1.1;       proxy_set_header Upgrade $http_upgrade;       proxy_set_header Connection $connection_upgrade; }   Now when I go to  or , it shows:  2015/12/14 17:14:45 [error] 15836#0: *70 recv() failed (104: Connection reset by peer)  while reading response header from upstream, client: my_ip, server: a.b.c.d, request: "GET /someurl/ HTTP/1.1", upstream: "http://a.b.c.d:10062/", host: "a.b.c.d"   Why it shows upstream: ""? Should not it show  "wss://a.b.c.d:10062/"?

This is a  about Connection Refused    We see a lot of questions to the effect      When I try to connect to a system I get a message      Connection refused      Why is this ?


I am not sure to have fully understand when to use a smart pointers over raw pointers.   I have the following code structure.  First of all, Snake_cell defined as follow  struct Snake_cell {   Snake_cell(const unsigned int origin_x, const unsigned int origin_y)   unsigned int origin_x_;   unsigned int origin_y_; };   Then, I have a Snake which contains a vector of Snake_cell  class Snake { public:   Snake(const unsigned int first_cell_x, const unsigned int first_cell_y);  private:   std::vector<std::shared_ptr<Snake_cell>> cells_; };  Snake::Snake(const unsigned int first_cell_x, const unsigned int first_cell_y) {   // Create three successives cells   cells_.emplace_back(std::make_shared<Snake_cell>(first_cell_x, first_cell_y));   cells_.emplace_back(std::make_shared<Snake_cell>(first_cell_x + CELL_SIZE, first_cell_y));   cells_.emplace_back(std::make_shared<Snake_cell>(first_cell_x + 2 * CELL_SIZE, first_cell_y)); }   Finally, I have a main.cpp file following this format:  std::unique_ptr<Snake> snake(std::make_unique<Snake>(500-CELL_SIZE, 500-CELL_SIZE));  void func1(...) { }  void func2(...) { }  void func2(...) { } /** Main **/ int main(int argc, char* argv[]) {   return 0; }   Each of these functions either and some of them are rendering functions so they would be called a lot of time.    access Snake attributes modify Snake attributes   Hence, it made sense for me, in order to avoid unnecessary copy of Snake_cell or Snake objects to :    Define a vector of smart pointers to Snake_cell within Snake Create a smart pointer to Snake within main.cpp    Yet, I think I'm not doing it right and could use raw pointers.    Are my assumptions correct to use pointers here? I know we are not dealing with a huge amount of data but funcX will be called a lot of time so it might become expensive If yes, am I right to use smart pointers here? I've read that there should be preferred over raw pointers every time I'm considering using pointers. If yes, am I right to use shared_ptr here? In my code, I'm creating a new smart_ptr object based on snake object everytime I need to use it. I feel like it's not the right way to use it.    For instance, here is one function I'm using.   void display() {   glClear(GL_COLOR_BUFFER_BIT);   glColor3f(1.0f, 1.0f, 1.0f);    glBegin(GL_QUADS);     for(unsigned int i = 0; i < snake->size(); ++i)     {       std::shared_ptr<Snake_cell> cell(snake->getCell(i));       glVertex2i(cell->origin_x_, cell->origin_y_);       glVertex2i(cell->origin_x_ + CELL_SIZE, cell->origin_y_);       glVertex2i(cell->origin_x_ + CELL_SIZE, cell->origin_y_ + CELL_SIZE);       glVertex2i(cell->origin_x_, cell->origin_y_ + CELL_SIZE);     }   glEnd();    glutSwapBuffers(); }   Thanks for your help,

What is a smart pointer and when should I use one?


I'm using the long table environment, and I want to start the table on top of a new page (otherwise it starts anywhere in my paper) and make the long table stay where I want it to be without being affected by the text. Is there any command I can use to achieve this? Many thanks!

I want to use the longtable environment for a table. However, I do not know how to place it at the top of the next page, as I can do with the table environment. Do you know how to do it?