In C, is there a difference between  struct Foo foo; struct Foo* fooPtr = &amp;foo;   and  struct Foo* fooPtr = (struct Foo*) malloc(sizeof(struct Foo));
Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?
I'm level 10 on Pokemon Go. I've caught at least 150 Pokemon, and had no problems. Now, every time I try to catch a Pokemon, no matter the level, it just rolls twice in the pokeball, breaks free, then runs away. Can anyone provide some insight on how to fix this problem? The current process for self-deletion of a user account has several problematic aspects, both in the process itself and in the end result. Some of these issues are:   The process requires manual intervention of a mod or SE employee, leading to delays and sometimes mistakes. It is more complicated than it has to be, which can lead to the impression that SE is imposing some rather arbitrary-looking restrictions and steps one has to take. This can give the impression that the user isn't really in control of his private data at SE. It is irreversible once the account is deleted, although an account can be partially reconstructed with a lot of manual effort from an SE developer. There is no real protection against mod/SE employee errors, if an account is deleted in error, there is no easy way to undo the damage. Because it is manual, it consumes the time of SE employees that have to deal with it  (unless  is used), removing useful voting information and annoying users that lose reputation that way.   I'm proposing an alternative way of handling self-deletion that would be automated, and also reversible to some extent, while still being pretty much a hard-delete (and not a soft-delete that would be problematic with respect to user privacy). The process would work roughly like this:   The user clicks a "delete profile" button in his profile. There should be a way to indicate if you want to delete all profiles on all SE sites, only on this site and a way to select multiple sites from a list where the profile should be deleted. It is verified that the user has true access to the account in some way (confirmation mail?) and not just someone that found the unlocked computer of the user. A countdown until deletion is started (I'd go with 48h, but that could be different). The timer shouldn't be too long, but long enough to correct mistakes and leave users a bit of time to reconsider. Alternative options would be to enable users to override the countdown if they really want to nuke their account immediately. Another option would be to soft-delete the account immediately, and make the countdown only for hard-deletion of the user data. Upon deletion, the posts of the user and his votes are transferred to a newly created blank account, the original account itself is hard-deleted with all the remaining data it contains. The dummy account that holds the user's data should be flagged in some way as deleted, so that the profile links will be disabled, the profile won't be accessible and it won't appear in any user lists.  The user receives a private code that can be used to claim ownership of the account. Other ways are not possible as all private information is removed about the account. This allows for an automatic way of reclaiming most of the important parts of a deleted account. The ability to restore a deleted account might have to be somewhat restricted to avoid misusing it to get rid of the account history. It is more meant as an additional safeguard so that account reconstruction is more easily possible in rare cases. Such additional safeguards might be necessary as the deletion itself would be automatic and without oversight from SE or moderators.   I personally think that the information which posts and votes were connected to a (now anonymized) account is not sensitive enough that it would have to be removed on account deletion. My idea is that this would be close enough to a hard-delete that it satisfies any privacy concerns, but still allow reassociation of posts with a recovered account. The partial reversibility would alleviate concerns about removing the manual oversight by mods and SE employees over the account deletion process. How to add upload field in a custom taxonomy? Can't use my sprint key and jump at the same time Ok, so I do a lot of sprint jumping in minecraft because I pvp a ton everyday and every once in a while it won't allow me to do both at the same time. I set ctrl to my sprint key so when I want to sprint I hold ctrl. If I hold ctrl and space it won't let me jump. If I double tap w I can sprint and jump at the same time. Does anybody know why it does this? It's not something to do with my keyboard because it's just fine. It's done this a couple of times and it's quite annoying. What is Skynet's ultimate goal after defeating the resistance? Why do we notate the greatest common divisor of $a$ and $b$ as $(a,b)$? In my textbook on elementary number theory from a class last year, as well as elsewhere through my academic experience and even posts here, I often see the greatest common divisor notated as $(a,b)$ (where this represents the greatest common divisor of $a,b$).  My question is, why is such an unusual notation used? I say it's unusual (if not a bit absurd), for a couple of reasons:   It is unintuitive. It does not grant the reader an immediate knowledge of what it means. In particular, I can easily see it being misinterpreted as an ordered pair of points, and not as a function (which it basically is and I touch on in a second) or representing a single value. Good notation would be immediately understood, no? One should not struggle with parsing through the context or meaning. A clearer notation is often used, and just three letters away. You could certainly think of $(a,b)$ as an ordered pair, if we consider it a function. I often see the alternate $gcd(a,b)$: a function, which takes in two inputs ($a$ and $b$), and outputs their greatest common divisor (or factor, if you prefer). Merely adding the three letters makes the notation clearer by clarifying it is  a function, and using a relatively well-accepted acronym. (Or, at least, I often hear it abbreviated "g.c.d." in school.)   I've mulled this over for a while and I can't think of much without borrowing inspiration from other "unusual" notations. For example:   Common understanding in context: consider the $\log(x)$ function. Depending on context, without a base stated as seen here, it can be presumed to mean whatever is most "appropriate." It could be base $e$ (common in mathematics), base $10$ (common in engineering), or base $2$ (common in computer science). The ambiguity is essentially resolved by context in other words - personally, not a fan of that (I like the explicit stating of bases for full clarity), but if such a motivation holds elsewhere, it might stand to reason that $(a,b)$ could just be taken as a shorthand and "understood" in the context of number theory to simply be the greatest common divisor. That it is in fact used despite $gcd(a,b)$ being clearer and somewhat common also does seem to suggest this playing a role. Perhaps it just started that way and it kept being used. For example,  (based on a ) regarding how logarithms, roots, and exponentiation can be unintuitive from a notation perspective, and proposes an alternative, easier to understand notation. I haven't been in middle school in nearly a decade, but guessing from discussions online, that obviously hasn't really picked up too much. In that sense, perhaps it's like that for $(a,b)$: like we still notate exponentiation, etc., the same way today despite how counterintuitive it is (at least for students), perhaps it just "stuck" and proliferated?   I wasn't able to easily find any reason why online, and it bugs me a bit, so I ask:     Why do we so unintuitively notate the greatest common divisor of two numbers $a,b$ as $(a,b)$?   I of course recognize that this is somewhat moot in light of how easily it's made clear - as established above, all I have to do is append the front of the parenthetical by $gcd$ or $gcf$ to make it way better. And of course, people do that. But I'm more curious in where this ambiguous former notation arose and, in light of a better notation, why it is still used today. datetime conversion to CDT Can anyone please help me how to convert the given time into CST timezone.  Input timezone will change dynamically, so i want to convert the given timzone into CST and then need to get the hour from that CST timezone in apex. I have heard that two permutations are conjugate if they have the same cyclic structure. Is there an intuitive way to understand why this is? I shifted to Ubuntu 10.10 now I am facing problem to have C/C++ compiler. What are the possible ways so that I can use C/C++ compiler using all the libraries (like graphic, math, conio, stdlib, etc) as in Microsoft Windows creating executable file? Execute PowerShell Script from C# with Commandline Arguments I need to execute a PowerShell script from within C#. The script needs commandline arguments.  This is what I have done so far:  RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create();  Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration); runspace.Open();  RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace);  Pipeline pipeline = runspace.CreatePipeline(); pipeline.Commands.Add(scriptFile);  // Execute PowerShell script results = pipeline.Invoke();   scriptFile contains something like "C:\Program Files\MyProgram\Whatever.ps1".   The script uses a commandline argument such as "-key Value" whereas Value can be something like a path that also might contain spaces.  I don't get this to work. Does anyone know how to pass commandline arguments to a PowerShell script from within C# and make sure that spaces are no problem? I read  and thought that would easily be solved (not that it isn't solvable without) if one could write:   @Override public String toString() {     return super.super.toString(); }   I'm not sure if it is useful in many cases, but I wonder why it isn't and if something like this exists in other languages.  What do you guys think?  EDIT: To clarify: yes I know, that's impossible in Java and I don't really miss it. This is nothing I expected to work and was surprised getting a compiler error. I just had the idea and like to discuss it. What do the bars between keyframes mean? What is object serialization? Why does the reputation need to be publicly displayed? At what time intervals does ntpd update the time? I'm running the latest ntpd.   When I start ntpd my system time synchronizes with ntp server's ntp. After synchronizing I changed my system time manually using date command date -s '1997-02-22 12:00:00'   My system time got changed as per the date command.   NTPD is still running, I want to know at what time interval my system time will sync with the internet via ntp. Suppose I am a naturalized citizen of the US, but also a citizen of another country, "XYZ". I then boarded a plane and left the US to another country (maybe not necessarily to XYZ), without first getting a US passport, but using my old, but valid XYZ passport.   In this case what would be the best documents to have for me to gain entry back into the US as a US Citizen without a passport?  Would I need to contact the US Embassy for help in order to be able return?  If the airline does let me aboard to return to the US, even without the US passport, what are the best documents could I show at the border to prove I am a US citizen but that I just don't have a passport, for whatever reason? Is it possible to mount on a PC an SD card that has been encrypted by an Android Marshmallow device? I have a Samsung Galaxy S5 duos with stock Android Marshmallow, and I'm considering encrypting my SD card to prevent access to its contents in case I lose my phone. The main reason of not doing this is that I'm not sure if there's a way to mount an encrypted SD card on Windows (or other desktop OS's)   When I encrypt the SD card on my Samsung Galaxy S5, is it using a known implementation of encryption, or is it something that only works on Android (or perhaps Samsung) phones?   I do not want to use USB connection to my phone to access my SD card, it's terrible. Mounting the SD card is much easier and faster and less annoying.   EDIT: just to clarify, I am NOT talking about adoptable storage. I want a portable encrypted SD card that can both be read on PCs and Android phones (i.e. I want to be able to remove the SD card from my phone, plug it into my PC, provide a password to decrypt and read/write it like any other SD card) This is a question that keeps bothering me: much of mathematics was created by extending rules to new domains e.g. negative numbers were created by consistently extending arithmetic beyond positive integers. However, with number bases it seems impossible to do this. Number bases are integers, but could they be rational numbers? I've had previous discussions about this, see . One problem can be seen with this example: in base 2.5, 0.22 is greater than one. That's not what we want! What, if anything, can be done about this?  EDIT: To put it another way - if every positional number is less than any digit to its left, why doesn't this apply to fractional base positional numbers? It would be easier to ask for a user's password only once during registration.  The problem: The user could make a mistake while typing the password once because of hiding letters.  The solution: The user could have a toggle button for showing or hiding the password.    Working example with . This approach could be used on the registration or login page.   Are there any benefits to asking a user's password twice during registration vs just not masking the password? Why would you ask twice?  P.S. :        Users make more errors when they can't see what they're typing while filling in a form. They therefore feel less confident. This double degradation of the user experience means that people are more likely to give up and never log in to your site at all, leading to lost business. (Or, in the case of intranets, increased support calls.)   The more uncertain users feel about typing passwords, the more likely they are to (a) employ overly simple passwords and/or (b) copy-paste passwords from a file on their computer. Both behaviors lead to a true loss of security.      Update: I created a . So you may use it if you want to.    Update 2: .  Update 3: Internet Explorer 10 added a toggle password visibility icon. It looks like this:    Update 4: Article about .  Update 5: Example with . Add a downvote option in the VLQ review There are many answers that are well-formed and well-formatted but are simply plain wrong or misleading. When reviewing, I often have a hard time deciding which action to take, as:   Looks Good: is OK per se but I would never say "good" (would work if the wording was changed slightly), Edit: The question is formatted well and editing it to be right would go against the intent of the author, Recommend deletion: this looks like the most reasonable choice, but I wouldn't flag it if I were browsing the site in normal mode, Not sure: I am quite sure what is wrong but I end up clicking this because the other three options do not seem fitting.   My proposal is to add a fifth option - Downvote that would make it easier to choose in case of such answers.