Spotted in email headers = "Reduction in Work Force" as in "URGENT RiWF" "Re: RiWF" "RiWF Alternative Staffing Measures" "RiWF Implementation Guidlines" (complete with PDF attachment) X|
Jeremy Thornton
Posts
-
RiWF -
What percentage?At least you only get 100 parts to play with I have to complete forms that ask "... what is the probability of reaching goal (blah-blah) by date (some stupid date in the near future)" so that would be a number plucked from the infinity between 0 and 1 then? :confused:
-
Alternative for TIMERs in MFC??from MSDN article: How To Use QueryPerformanceCounter to Time Code Function Units Resolution --------------------------------------------------------------------------- Now, Time, Timer seconds 1 second GetTickCount milliseconds approx. 10 ms TimeGetTime milliseconds approx. 10 ms QueryPerformanceCounter QueryPerformanceFrequency same not so much in MFC but Win32 perhaps? your best resolution is probably 10ms NB multicore breaks simple RDTSC approaches you may read about my old article on timing: http://www.codeproject.com/KB/cpp/precision_timer.aspx[^]
-
Codeproject for Macintosh (?)...but it sucks;P The codeproject site succeeds due to the size of the PC user base and its longevity. My point was not to bash macs but that even template library programming can attract regular posts for PC programming. I doubt that a mac offshoot would be able to muster even that level of interest! 3million plus users are what imbue this site with almost most real-time repsponse and their years of input are what provides its knowledge base. How will you recreate this with a mac-codeproject? I wonder what the critical mass of users is to make such site fit for purpose? And how would you recruit them? So, imho a macish version would fail due to the lack of useful input
-
nanosecond:confused:I am most intrigued by an application that requires an event to occur every second but to 1 billionth of a second accuracy, please tell us more... If you need +/- 1ns accuracy then because the windows OS family are not real time operating systems this will not be acheivable, perhaps +/- 10ns but realistically +/- 100ns should be assumed. If this is not adequate, then in order to measure to 1ns with an acceptable error then you actually need sub nanosecond timing solutions. Have you calculated what level of error you can tolerate in the application to which this problem pertains?
-
Codeproject for Macintosh (?):confused:Have you ever looked at Objective-C??? X| :wtf:And as for COCOA... :suss: OK so they have an Intel in now, but I ask you... is that really enough??? Just write it in Java or use wxWidgets under Visual Studio and recompile it under that crap that comes with the Mac, what is it? X-Studio or something??? Better still Bootcamp your Mac into XP! Besides, I think your forum would be even quieter than the ATL/WTL/STL template library one! :laugh: -- modified at 21:02 Tuesday 25th July, 2006
-
Question about recursionIf you are trying to track the stages of recursion with the cout line then I suggest that you minimise your confusion by calling your recursive function just ONCE and storing the result to use in your cout line and to return, I think that this will you help dissect what is going on? Good luck I´m sure it will just click and you will go "Ah!":)
-
Scripting Languagestrue, but didnt want over complicate things and as the most popular language of all time Javascript doesn´t need much promotion. So I thought giving PHP(5) a shove in this august site might be fun if a little like shouting into the wind:sigh: wikipedia and www.devarticles.com have good info on Javascript for the full story... php.org has what else you might need too...
-
Scripting LanguagesThey don´t... PHP is server side open source cross platform Javascript is client side They have strengths and weaknesses but do mix well. PHP at version 5 is a mature OOP language and I use it to implement business logic & database patterns over a MySQL database serving pages with embedded Javascript to handle UI patterns (thanks yahoo btw) A good book? Unusally I think the dummies PHP book is a good place to start (let the flames begin) Is this the first PHP question on CP :confused: And why am I answering :~ Hope this helps?
-
Forum confusionWell I did wonder... Okay then, so that helps me individually but what about other confused postees wondering where to put their stuff without causing the 'regulars' to cough up a fur ball and trial off on some unrelated thread about where a posting does/does not belong? (upto 12 nested levels of mud-slinging i've noted) :confused: I still think the C++ forum titles are a little confusing and practically opaque to the novice. Or are you going to tell me that if I cant figure out where put my post i'm too stupid to be on the site? Are you aiming to facilitate or humiliate?:suss:
-
How do you know the duplicate key insertion in STL mapI'm sorry my views drove you to angry expletive I have tried to move what I thought was an important topic to the suggestions forum.
Christian Graus wrote:
People who are learning C++ are now required to understand it well enough to know which bits are STL before they are allowed to ask for help ?
No that is the opposite of what I had intended to convey.
-
Forum confusionThe C++/CLI and Visual C++ forums seem to have a lot "wrong forum" replies. C++/CLI would seem to be suggesting generic C++ ie including the STL and the command line interface and to be less MS orientated Visual C++ all things WIMP/MS Why then does the forum ATL/WTL/... (overtly Microsoft) then also have STL (which is inseparable from C++?) in its name? Sure it's a template library but it seems counter intuitive to mix it with the MS stuff :confused: Some respondents seem to have been a bit rude about their redirection suggestions which can also seem to be wrong!:doh: I am clearly not the only noob confused by this. Wouldnt C++/STL/CLI make more sense? Before you remove the splinter from your brothers eye... First remove the plank from your own!
-
How do you know the duplicate key insertion in STL mapYou have to test!:) A STL map can only store one value per key. If you use a second instance of the key it will supercede the existing one. If this is not intended then you should use a multimap. You can see if a key is pre-existing by using the maps own find method and comaparing the result with the map's end iterator. If it reaches the end it isnt in the map :doh:
map::iterator it
it = some_map_or_other.find( the_key );
if ( it != some_map_or_other.end() ) {
//the key exists
}further, you can test if an item already exists in a map with the single arguement version of insert. This method returns a STL pair cpnsisting of an iterator & a bool. Now if the insertion was unsuccesful the bool will be false and the iterator will be at the duplicate key. hope this helps? -- modified at 8:46 Thursday 24th November, 2005
-
How do you know the duplicate key insertion in STL mapWhy on earth would a query about the C++ standard template library aka STL be in the microsoft foundation class or visual C++ forum? :confused: I doubt that Alexander Stepanov and Meng Lee at Hewlett-Packard in Palo Alto, California, Dave Musser at General Electric's Research Center in Schenectady, New York, Andrew Koenig, and of course "Mr C++" himself, Bjarne Stroustrup at AT&T Bell Laboratories would put such a query in a MS forum? And rather than give out a terse (bordering on rude) reply like Nish's why not suggest an answer and if it genuinely belongs in another forum educate the user so? Dissapointed I am :(
-
PC casing leaking currentbuy new high quality PSU http://www.directron.com/psu.html and replace your current (no pun intended) one
-
Freah Meat =)In my oppinion it is all about idioms, resources, computer science and fun. Depending on your resources (time & money) choose a path that will result in as much fun learning computer science and the most translatable programming idioms. C++ Java C# and even at a stretch PHP(particularly 5) share so many idioms that starting in this set would seem most productive. For example, you might choose Java because it is open, excellent free development software, widespread and fun results are relatively easy to achieve. Choose some fun puzzles to solve like anagram solving and learn what really matters - the underlying computer science. Along the way pick up the dominating idioms and ease yourself into object-oriented programming (OOP). Become part of the culture of programming via (for example) codeproject, get hot under the collar about some things but keep your perspective. As your confidence grows dip into other languages, perhaps near relatives to begin with and try and rewrite a succesful piece of code in that language. Maybe have a look at some of the more unusual languages which play with the whole concept of programming such as snobol and headf**k they might even lead you to Alan Turing and computability itself! Learn the science, learn the concepts, languages are just tools. Programming truly does allow you to combine science and art and express yourself as well as enable you to make some money too :) And to pick up on a divergent thread... Regardless of how you perceive C++, even if it is as a preprocessor for C, as languages they are conceptually divergent and what few basic programming idioms they share does not compensate for this. It is a gross error to divine a progression from C to C++ beyond the for loop they are wholly different. Like all languages regard them, respect them and avoid winding up their proponents... you might need their help with a problem one day. (I know a retired COBOL programmer who loves to relate how grovelling C++/Java programmers came to him in the build up to the year 2000) :cool:
-
Unicode File I/O problemfirstly a good unicode editor helps: http://www.unipad.org/main/[^] secondly the STL way is to convert to wide strings and streams and (essential) use locales to 'imbue' them with the ability to handle the unicode conversion that you desire //include all the culture specific information you need
#include <locale>
//reveal the current localelocale default_locale = wcout.getloc(); cout << default_locale.name();
which if nothing has been imbued is C for classic //create a new localelocale french_locale("french");
//reveal its namecout << french_locale.name();
//French_France.1253 in windows //the names are non standard //but the locales construct happily with intuitive language name or abbreviation //see: http://www.microsoft.com/globaldev/nlsweb/default.asp[^] //set a new localelocale old_locale = wcout.imbue(french_locale);
use the widen and narrow methods to convert and you should be away:-D a good code project article is here... http://www.codeproject.com/vcpp/stl/upgradingstlappstounicode.asp?df=100&forumid=16224&exp=0&select=557556[^] -
Help with connect 4 AItry this great web site by Erwin Francis D'Souza http://personal.vsnl.com/erwin/connect4.htm[^] :cool:
-
fstream helpqfegd wrote:
In those situation stringstream can be cool!
and (IMHO) utterly superfluous... there is already and input stream open in the form of the input file stream why read a line convert it to another input stream and then use operator>> on that stream:confused: as the input text file is rigorously defined why not use >> directly on the input file stream? operator>> is overloaded for the inbuilt types & defaults to consuming white space and newlines (thanks Bjarne) thus...
char n1[255]; char n2[255]; double total, mean, grade; int count = 10; //specified in the input file format ifstream in_file(IN_NAME); //checking omit'd for clarity while(!in_file.eof()) { in_file >> n1 >> n2; total = 0.0; for(int i = 0, i < count, ++i) { in_file >> grade; total += grade; } mean = total / count; }
i will leave writing to the output file for you (it can all be fitted into the above loop in 3 lines) if your input file might be dirty you could addin_file.ignore(255,'\n');
to ignore upto 255 characters at the end of the line and any new line. hope this helps? :) -
fstream helpChristian Graus wrote:
you can use the << operator to read
correction: operator >> is overloaded to read the inbuilt types from an input stream operator << is for writing to an output stream