I'm trying to read/write INI files in VISUAL C++ 6.0 (with MFC) I tried to load registry.hpp and CINIfiles and a few more but they don't exist in this version(because of constraints in the workplace I can't use the BOOST library). So which way should work with INI files?
I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually?
Sometimes, on the internet, particularly in online games, I see people using the  indefinite article before someone's name: "I see a Joey" or "I hug a Polly". I know some of these people and I'm positive that they are from English-speaking countries, which means it is not a mistake, they do it intentionally.  I was always taught that articles are not used in front of people's names. Maybe it is some sort of slang? What does it mean, when the indefinite article is put in front of someone's name?  Edit: There is a group of people standing somewhere. And somebody, named Joey, appears. They all know Joey. And someone in this group says "I see a Joey". So it is used when someone sees his or her friend. But I don't understand why they use the indefinite article here. Let $E$ be an empty set. Then, $\sup(E) = -\infty$ and $\inf(E)=+\infty$. I thought it is only meaningful to talk about $\inf(E)$ and $\sup(E)$ if $E$ is non-empty and bounded?   Thank you. Execute bash commands over SSH while staying in interactive mode afterwards Probably it is a weird thing I would like to achieve but: I would like to SSH to a remote host and then execute some bash commands like "alias" automatically to use them afterwards in an interactive mode. The remote host does not allow the personal environment.    Is this possible? Would "expect" do it? Or is there any other way to achieve this? Basically I would like to have my bashrc without modifying any files on the remote host. Can we have a moderator only "flag for community team/developer attention" link on posts? What is the difference between I play and I do play?  For example:  If someone were to ask to me, do you play soccer? Isn't the word "experience" wrongly used in this context? Friend: Have you ever flirted with a female cop?      Me: Nope.      Friend: I have done that experience.   I think experience is the wrong word here. What else should he have said? I need to add a new field in the @book or @InProceedings entries: this field is "tome", for I have for instance the following title:  Francesco Bertolini, Società di trasmissione orale: mito e folclore, in Lo spazio letterario della Grecia antica, a cura di G. Cambiano, L. Canfora e D. Lanza, vol. I, tomo I, Salerno, Roma 1992, pp. 47--75.   So the following code is not enough:  @InProceedings{ bertolini:1992,   author                   = "Francesco Bertolini",   title                    = "Società di trasmissione orale: mito e folclore",   booktitle                = "Lo spazio letterario della Grecia antica",   editor                   = "G. Cambiano and L. Canfora and D. Lanza",   publisher                = "Salerno",   location                 = "Roma",   year                     = "1992",   volume                   = "1,   pages                    = "47--75", }   Using othes codes, I was able only to produce the "tome" field, but with a general trouble about the other fields:  \DeclareSourcemap{   \maps[datatype=bibtex]{     \map{       \step[fieldsource=tome,fieldtarget=usera]     }   } } \DeclareFieldFormat{usera}{tomo\space{#1}}   \DeclareBibliographyDriver{book}{%   \usebibmacro{author/editor}%   \setunit{\labelnamepunct}\newblock   \usebibmacro{title}%   \newunit\newblock   \usebibmacro{journal+issuetitle}%   \setunit{\bibpagespunct}%   \printfield{pages}%   \newunit\newblock   \printfield{usera}%   \usebibmacro{finentry}} \renewcommand*{\finentrypunct}{}   (useful for articles, but not for my case). By real, I'm not able to understand  which bibmascros I have to invocate...  I tried to write a biblatex-tome.dbx:  \ProvidesFile{biblatex-tome.dbx}   \DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{tome}   \DeclareDatamodelEntryfields{tome}   Inside the main .tex file I put just this code:  \DeclareFieldFormat{tome}{\mkbibacro{tome}\addcolon\space #1} \newcommand*{\patchmoretome}[1]{   \xpatchbibdriver{#1}%     {\printfield{tome}}     {\printfield{tome}%           \newunit\newblock      \printfield{tome}}%     {\typeout{patching #1 to include more tome succeded}}%     {\typeout{patching #1 to include more tome failed}}% } % patch all drivers \patchmoretome{article} \patchmoretome{book} \patchmoretome{collection} \patchmoretome{inbook} \patchmoretome{incollection} \patchmoretome{inproceedings} \patchmoretome{manual} \patchmoretome{periodical} \patchmoretome{proceedings} \patchmoretome{report} \patchmoretome{thesis}   but it doesn't print the field in bibliographic entry. So I'm very confused about a (re)writing of driver I am stuck on the following question:     Find the volume of the torus obtained by rotating the circle $(x-a)^2+y^2=b^2$, where $a&gt;b$, around the y-axis. Transferring a Windows 8 license and proper un- and reinstallation Long story short  I have two computers: a laptop and a desktop computer. Both have Windows 7 on them.  I buy the Windows 8 Pro upgrade. To see if it screws up anything, I install it on my laptop as a guinea pig. I intend to use Windows 8 for my main computer, my desktop, but I want to test it on the laptop, so I know I don’t risk losing access to my desktop and the data on it. I never use my laptop, and only used it, because it already has a Windows 7 installation on it.  The problem  At some point, I must have entered the license key on my laptop, because when I go to the activation screen on my desktop, I get this:    Uh-oh. I can’t use the key on my desktop. Now how the hell do I transfer the key from my laptop to my desktop computer?  Answers and suggestions so far  Let’s just say that I tried everything possible to get some answers on this matter. The best response I got from Microsoft is this:     To install Windows 8 on your desktop, do the following:         Uninstall Windows 8 on your laptop   Afterwards, install Windows 8 on your desktop   If it won’t activate, call product activation at (...)      I am not a fan of that last point. The error message does allude to such a solution, however:     If you’ve reinstalled Windows or made changes to your hardware recently, you may be able to use your current key.   The question  My main question is this: has anyone been in a similar situation, and if so, what did you do to resolve this?  Failing that, what is the proper way to   uninstall the Windows 8 installation on my laptop, and reinstall the Windows 8 installation on my desktop?   Ad 1  I have already tried using the “reset” feature on my laptop, but that only resulted in a new Windows 8 installation that was already activated. But which is the right way to uninstall the installation in a way that allows me to use the license key on the desktop computer?  Ad 2  Which is the proper way to reinstall the Windows 8 installation on my desktop computer? Why do I even have to reinstall it in the first place?  I won’t get around to do this, until my USB key with 3.0 support arrives in the mail, but it is going to be a while, until I find a assuaging response to the best way to go about this anyway. I'm installing a brand new motion activated security light to an existing box on my garage. After removing the old light, I notice it only has white/black wiring while the new light fixture has of course white/black/green (ground) wires to attach. What do I do if no ground wire is available with the old box? Two envelope problem revisited I was thinking of this problem.  I believe the solution and I think I understand it, but if I take the following approach I'm completely confused. Problem 1:  I will offer you the following game. You pay me \$10 and I will flip a fair coin. Heads I give you \$5 and Tails I give you \$20. The expectation is \$12.5 so you will always play the game.  Problem 2:  I will give you an envelope with \$10, the envelope is open and you can check. I then show you another envelope, closed this time and tell you: This envelope either has \$5 or $20 in it with equal probability. Do you want to swap? I feel this is exactly the same as problem 1, you forgo \$10 for a \$5 or a \$20, so again you will always switch.  Problem 3:  I do the same as above but close the envelopes. So you don't know there are $10 but some amount X. I tell you the other envelope has double or half. Now if you follow the same logic you want  to switch. This is the envelope paradox.  What changed when I closed the envelope?? EDIT: Some have argued that problem 3 is not the envelope problem and I'm going to try and provide below why I think it is by analysing how each views the game. Also, it gives a better set up for the game. Providing some clarification for Problem 3: From the perspective of the person organising the game:  I hold 2 envelopes. In one I put \$10 close it and give it to the player. I then tell him, I have one more envelope that has either double or half the amount of the envelope I just gave you. Do you want to switch? I then proceed to flip a fair coin and Heads I put \$5 in and Tails I put \$20. And hand him the envelope. I then ask him. The envelope you just gave me has twice or half the amount of the envelope you are holding. Do you want to switch?  From the perspective of the player:  I am given an envelope and told there is another envelope that has double or half the amount with equal probability. Do I want to switch. I think sure I have $X$, hence $\frac{1}{2}(\frac{1}{2}X + 2X) &gt; X$ so I want to switch. I get the envelope and all of a sudden I am facing the exact same situation. I want to switch again as the other envelope has either double or half the amount. counting number of specific string in each row I have a SNP table looks like this  A N N N N N N N N N N N N C N N N C N N N N N N N N N N N N N N N N N N N C N N N C N N N N N N N N N N N N N N N N N N C C N N N N N N N N N N C C N N N C C N N N N N N N N N N N N N N N N N   I want to count total number of N in each row? any idea how to do that I read a short story (I think, but it might have been a novel), where most races discover a very easy way to travel faster than light at a certain point in their technological development.   What I remember:   The guys in wooden ships bounced around subjugating the people without FTL travel. Earth had never figured out the FTL, and so had poured its effort in a different path, achieving present day technology. The aliens were freaking out about handing the humans FTL travel. The story was told from the point of view of the aliens. I read it in the last 10 years, but there is no telling how old it actually was, although I do remember them mentioning F-18s or F-14s. How can I produce a 'ring (or wheel) chart' like that on page 88 of the PGF manual? I really like the 'ring chart' or 'wheel chart' given as an example on page 88 of the PGF manual. It is like a pie chart, but with a label in the centre. Unfortunately, the manual doesn't give the source for that chart. Does anyone have an example? Thanks. Using a wi-fi and an ethernet connection at the same time thus having more bandwidth? In his first lesson (transcripted in "Tips on Physics"), Feynman talks about math for physicists in a very cool and practical way. And at the end of the section he talks something like "so the first thing to do is to learn to learn derivative, integral and algebra" (I don't know how much precise I'm being because I've read it in Portuguese). I would to know if there is some book that deals with math as Feynman did it in this lesson (respecting formalities, but teaching how to use the practical rules)? Also, someone have any recommendations for algebra book (college level)? What is the difference between \emph{...} and {\em ...}?  When to use each of them? How can I redirect the user from one page to another using jQuery or pure JavaScript? Find the sum : $\frac{1}{\cos0^\circ\cos1^\circ}+\frac{1}{\cos1^\circ \cos2^\circ} +\frac{1}{\cos2^\circ \cos3^\circ}+......+$ Find the sum of the following :   (i) $$\frac{1}{\cos0^\circ \cos1^\circ}+\frac{1}{\cos1^\circ\cos2^\circ} +\frac{1}{\cos2^\circ \cos3^\circ}+......+\frac{1}{\cos88^\circ \cos89^\circ}$$  I tried :  $$\frac{1}{\cos1^\circ}\left[\frac{\cos(1^\circ-0^\circ)}{\cos0^\circ\cos1^\circ} + \frac{\cos(2^\circ-1^\circ)}{\cos1^\circ\cos2^\circ}+...\right]$$  = $$\frac{1}{\cos1^\circ}\left[\frac{\cos1^\circ\cos0^\circ}{\cos0^\circ\cos1^\circ} - \frac{\sin1^\circ \sin0^\circ}{\sin0^\circ\cos1^\circ} + \frac{\cos2^\circ \cos1^\circ}{\cos1^\circ\cos2^\circ} -\frac{\sin2^\circ \sin1^\circ}{\cos1^\circ\cos2^\circ}...\right]$$  For this, as well, I am not getting any pattern to solve further. Please suggest, thanks. Whenever I play a PC game with the directional keys, I can only press two buttons at a time.  For instance if I am playing a shooter like R-Type, I cannot hold down the fire button while moving diagonally at the same time.  The computer simply ignores the extra button press.  How do I remove this limit so I can shoot while moving diagonally?  This limitation seems to apply for every game.  I am running Windows 7 if it makes any difference.  I noticed the same problem back when I used Windows XP.