I hope that these code  express my question more clearly.  double xxxx(const double* const array){ //... } int main(){ double* array = new double [5]; xxxx(array); }   Is it actually create a new const array in the stack and heap by the input of the function?
How far do you go with const?  Do you just make functions const when necessary or do you go the whole hog and use it everywhere?  For example, imagine a simple mutator that takes a single boolean parameter:  void SetValue(const bool b) { my_val_ = b; }   Is that const actually useful?  Personally I opt to use it extensively, including parameters, but in this case I wonder if it's worthwhile?  I was also surprised to learn that you can omit const from parameters in a function declaration but can include it in the function definition, e.g.:  .h file  void func(int n, long l);   .cpp file  void func(const int n, const long l)   Is there a reason for this? It seems a little unusual to me.
I'm trying to show that for $b&gt;1$, $x&gt;0$ and $x$ irrational, that $$\sup \{b^p:p\in Q,\;0&lt;p&lt;x\} = \inf\{b^q:q\in Q,\;x&lt;q\}$$ I know this follows immediately if we define $b^x=\exp(x\log(b))$ and use the fact that the exponential function is strictly increasing and continuous over $\mathbb R$, but I'm not allowed to do that. In fact, I only have that $b^{m/n}=(b^{1/n})^m$, where $b^{1/n}$ means the positive $n^{th}$ root of $b$; $b^x$ is not yet defined for irrational $x$.  I know that the supremum and infimum both exist because if $b&gt;1$ and $p&lt;q$, then $b^p&lt;b^q$. Also, by assuming that the inf $&lt;$ sup, I got a contradiction. The part I'm stuck on is deriving a contradiction from assuming that sup $&lt;$ inf. Does anybody have any ideas?  Thank you. Is $L^{p}$ space with alternate norm Banach? I installed Drush for the first time (so it may be a configuration error) and I'm trying to update to the latest core version of Drupal.  Drush is giving me this error - I'm on an OSX box.  dev5:clientnamedirectory my.name$ drush pm-update projects drupal-7.25 &lt;h1&gt;Additional uncaught exception thrown while handling exception.&lt;/h1&gt;  &lt;h2&gt;Original&lt;/h2&gt;&lt;p&gt;PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_get_installed_schema_version() (line 155 of /Users/my.name/Sites/proface/includes/install.inc).&lt;/p&gt;  &lt;h2&gt;Additional&lt;/h2&gt;  &lt;p&gt;PDOException: SQLSTATE[HY000] [2002] No such file or directory in system_list() (line 165 of /Users/my.name/Sites/clientnamedirectory/includes/module.inc).&lt;/p&gt;&lt;hr /&gt;  Drush command terminated abnormally due to an unrecoverable error. Are black holes in a sense transparent? Meaning, they don't 'hide' any stars that happen to be 'behind' them?  A regular object obviously blocks a point source of light emanating from 'behind' it. Meaning it creates an area of space photons cannot get to us from. But a massive object curves space, and so via gravitational lensing we can sometimes see distant stars that are 'behind' other stars (by behind I mean that if the star in the middle would suddenly vanish, the trajectory of photons traveling from the distant star to Earth would have passed through the volume now occupied by the middle star).  My thinking, is that black holes curve space so much, that from ANY source of light outside it, light has a trajectory to reach us on Earth (assuming of course no other object blocks it on its way).  The reasoning for this is: Suppose we draw the straight line between us and the light source (as if the black hole wasn't there at all). Photons from our light source crossing the event horizon would obviously 'fall' inside. A photon in theory traveling exactly tangent to the event horizon would in a sense go 'into orbit' around the black hole (obviously there is no such thing, because the black hole isn't perfectly spherical, and there are quantum effects and so forth. But I'm focusing on the geometry), crossing our straight line exactly at the intersection of our line and the event horizon. Any photon passing near the event horizon, but a bit farther, would follow a curve that intersects our line a little farther from the event horizon. Continuing this, there would be at last be a photon that would exactly curve our way. Is there canon info on shelf life of various potions in Harry Potter? Do we know how long potions (in general, or at least specific ones) are potent (no pun intended) in Harry Potter canon?  E.g. do they last a couple of hours? Minutes? Years?   I seem to vaguely remember some comments of Snape's about Wolfesbane potion therfore I think at least some information exists. How do you determine the winner of a hand? In Texas Hold'em poker, there are some cases where a particular card, often called kicker, acts as a tiebreaker between players to determine who wins the pot, or if the pot has to be shared.  For some combinations such as three or four of a kind, there is no doubt: the kicker is the 5th card of the chosen combination, and determines the winner.  Example     Alice has 7 and 10   Bob has 7 and K   On the board are 7, 7, 2, 3, 4   In that case, both have a three of a kind. But because Bob has a king and Alice only a 10, he wins.  Most of poker websites explaining the rules clearly mention the role of the kicker applying to three of a kind and double pairs. But much fewer say something about colors, straights and full houses, and I found many contradicting answers. I also asked the question to some used online poker players and they also gave me contradicting answers.  I have tried to search for official tournament rules, but most of them only explain what happens with bad behaviors, bad deals, incorrect or confusing betting, showing cards when you shouldn't, acting when it's not your turn, etc. without mentioning subtleties about combinations at all.  To simplify my question, I will take three examples; I think it's better to start with examples before getting to the general answer if one exists. So, what's happening in the following 3 examples? Could you give a more generalized answer?  Example 1 - Flushes     Alice has 2&clubs; and 3&clubs;   Bob has 4&clubs; and 5&clubs;   On the board are 6&clubs;, 8&clubs;, 10&clubs;, 2&hearts;, 5&diams;   Contradicting answer 1: it's a tie, because the highest card included in the flush is the 10, which everybody chooses to include in their 5 showdown cards. Contradicting answer 2: Bob wins, because he has the greatest private card that is part of the flush  Example 2 - Straight     Alice has 6 and K   Bob has 6 and J   On the board are 4, 5, 7, 8, 10   Contradicting answer 1: it's a tie, because the greatest card in the straight is the 8 for both Alice and Bob Contradicting answer 2: Alice wins, because she owns an extra king, compared to the jack of Bob  Example 3 - Full house     Alice has 3 and 7   Bob has 3 and 6   On the board are 3, 3, 2, 2, 5   Contradicting answer 1: it's a tie, because one is supposed to choose only five cards to make a combination, and a full house is already five cards. There couldn't be any kicker, and thus their showdowns are strictly equals. Contradicting answer 2: Alice wins because of her extra 7, compared to the 6 of Bob  Thank you very much for your answers.  Note: I'm unable to post next to you, so I edit my own post; strange not be able to answer to an answer.  Ok, So if I summarize what you are saying :   In the flush case, Bob wins because at some point, their hand differs. Technically, I can continue comparing the highest private card to decide who wins. I had it correct. In the straight case, if the highest card of the straight is public, then it's technically always a tie, no matter what the players had as second private card (asuming that only one of the two cards was part of the straight). In a full house if both players have the same triplet and the same pair, it's always a tie, no matter what the players had as second private card (assuming again that only one of the two was part of the full house).   Please confirm me that what I summarized is correct.  Thank you for your answer. Values of the limit $\lim\limits_{x\to+\infty}\left(\sqrt{(x+a)(x+b)}-x\right)$ Hi I have a question regarding finding the values of limit for the following question.  Let $a, b \in \mathbb R$. Find the limit $$\lim_{x\to+\infty}\left(\sqrt{(x+a)(x+b)}-x\right)$$ How add 14 days on end date I have End Date column and I want to add 14 Days on it auto when created, can I do it by workflow? Can I do it via jQuery. If yes how? if no how I can do it? Why is James Bond less tech savvy in the Daniel Craig movies? The most recent installments of  (ones featuring Daniel Craig) have fewer gadgets but more raw action (like the chase sequences in Casino Royale and Quantum of Solace). Is it because of plot related changes to the MI:6 or have the movies been altered to suit the audiences? ASP.NET MVC controller actions that return JSON or partial html I am trying to create controller actions which will return either JSON or partial html depending upon a parameter. What is the best way to get the result returned to an MVC page asynchronously? I want to draw a perfect rectangle. How can I do that with QGIS v.3+?  .  Is there a similar solution for the latest QGIS version? Why do you need to know who I know on Google? I just created a SE account using my Google account. It said that it needs to "Know who you are on Google" (I guess my connections). As far as I know, SE is not a social network. I can't even follow other people (seeing when they post questions and answers).  What is the reason you need to know my Google connections?  This was on code review. Actually I have an account there, but for some reason it asked me to reconnect. This is the same on MSO; one sees this explained as "This app is requesting permission to associate you with your public Google profile": For a certain Hibernate entity we have a requirement to store its creation time and the last time it was updated.  How would you design this?   What data types would you use in the database (assuming MySQL, possibly in a different timezone that the JVM)?  Will the data types be timezone-aware? What data types would you use in Java (Date, Calendar, long, ...)? Whom would you make responsible for setting the timestamps&mdash;the database, the ORM framework (Hibernate), or the application programmer? What annotations would you use for the mapping (e.g. @Temporal)?   I'm not only looking for a working solution, but for a safe and well-designed solution. How to use aes-encryption in PostgreSQL? Find the volume of a cone whose length of its side is $R$ How can i compute the volume of a cone whose length of its side is $R$ and the vertex of the cone forms an angle $2θ$ .  The top cone is a cap of a sphere of radius $R$.    I tried to solve first in 2 dimension and then use solid of revolution:    Some help please to find the volume of this cone. How restrict page for users logged? I have a website with login page that works normal. The problem is that once logged in, the user still has access to the login page form to enter, which should not happen.  I would like to know a wordpres plugin that redirects this user to another page when they access it after login. We know that the trace of a matrix is a linear map for all square matrices and that $\operatorname{trace}(AB)=\operatorname{trace}(BA)$ when the multiplication makes sense.   On the , under properties, it says that these properties characterize the trace completely in the following sense: If $f$ is a linear function on the space of square matrices satisfying $f(xy)=f(yx)$, then $f$ and $\operatorname{tr}$ are proportional. A  of the page gives the justification, but I do not understand the logic of it. Thanks Changing color of already printed text For making a small quiz in class I am working on a presentation in beamer.  I want to change the color of statements to red (wrong statement) or green (right statement) but only after my class answered the question.  I was searching the internet, but only found the color package, where you apparently can only change the text color before it appears.  Can someone point me into the right direction? Say I had a Core i7 Laptop with 16GB of RAM and a 750gb drive.  Is there a mechanism where I can partition the HD into a Linux, Windows, OS X, Shared Data, Hypervisor setup where I boot a small hypervisor. I can start/stop a linux, Windows and OS X virtual machine and interact with them all from the hypervisor?   Code, Test, etc?  is this a type 1 Hypervisor?  I suppose I could run a small linux install and VmWare but could VmWare read the virtual machines from a physical hard disk partition versus a file based setup (.vmdk files)? Arrays in Unix Bourne Shell I am trying to use arrays in Bourne shell (/bin/sh). I found that the way to initialize array elements is:  arr=(1 2 3)   But it is encountering an error:  syntax error at line 8: `arr=' unexpected   Now the post where I found this syntax says it is for bash, but I could not find any separate syntax for Bourne shell. Does the syntax stand the same for /bin/sh as well?