Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
22
Posts with Upvotes
22
Upvoting Members
6
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
0 Endorsements
Ranked #505
~143.21K People Reached
About Me

Sr. Software Engineer

Favorite Tags

228 Posted Topics

Member Avatar for winbatch

Here's a question for you: I often use remote desktop to connect to my office pc. Often times, I'm writing a document on the office pc and I need to include a screenshot of an application etc. Over RDP, how do I make the office pc take a screen shot …

Member Avatar for Mike_45
0
8K
Member Avatar for winbatch

Is there a standard algorithm that can take the output of difftime (which is in seconds) and use it to print out the number of minutes, hours, days, weeks, etc.? I was going to try and calculate this myself by using the modulo, etc. but thought that something might pre-exist..

Member Avatar for Reverend Jim
1
9K
Member Avatar for djbsabkcb

Here's what I went with. Note you want to do a break if you find out it's divisible as there is no point in checking all the numbers beyond it for divisibility.. [code] #include <iostream> using namespace std; void prime_num(int); int main() { cout << " Enter a number and …

Member Avatar for duskoKoscica
-2
2K
Member Avatar for JoBe

[code] #include <iostream> #include <sstream> using namespace std; int main() { int a =23545; ostringstream o; o<<a; cout<<o.str().size()<<endl; return 0; } ./Temp 5 [/code]

Member Avatar for jimmyraynor
0
344
Member Avatar for Phaelax

Basically, the only way to do this is what narue suggested and pass in the actual size as a parameter to the function. Either that, or use an STL collection, and use .size()

Member Avatar for Diego.Corso
0
27K
Member Avatar for porterrj

Let me give you this hint - since several of the months have the same behavior - ie 1,3,5,7,8,10,12 are all 31 days, while 4,6,9,11 are all 30 days, then you could easily use a 'switch' statement on your month and not have to repeat all of that logic.

Member Avatar for NathanOliver
0
463
Member Avatar for winbatch

Hi Guys, So I'm trying to experiment with threads, though I'm running into some problems. Basically I'm trying to create multiple threads, where each thread is passed a different set of data. In my small example below, I'm starting off with a vector<string> of data. Each element of the vector …

Member Avatar for anurag.kyal
1
246
Member Avatar for SpS

Try making the service not 'automatic', and then try starting it yourself manually via the service. See if it has the same problem...

Member Avatar for Vadim_Invar
0
2K
Member Avatar for degamer106

[QUOTE=degamer106] If x > y then the result is x. Am I tripping out o_O?[/QUOTE] if x is 6 and y is 2, then the result is 0.

Member Avatar for Shankye
-1
248
Member Avatar for michrob15
Member Avatar for xshashiy

You are using time for purposes of generating the random number, but only once before the loop. You should probably reset the time each part of the loop. (void) time(&t1); (Though you may continue to have the same problem as I think time only holds seconds... ) Also, what you …

Member Avatar for DKdontKNO
0
547
Member Avatar for winbatch

I am trying to write a variable argument function on SUN solaris. According to MSDN, the _vscprintf function that I'm using on windows should work on unix as ANSI is listed. [b]_vscprintf[/b]<stdio.h>ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP [size=2]However, including stdio.h doesn't seem to help. Is …

Member Avatar for noormanman
0
600
Member Avatar for winbatch

I sometimes get a lot of traffic from certain ip's that are clearly trying to break in/snoop. Is there a way in IIS to block access for certain ip's? (or ranges?). I can do this in my ftp server software (non IIS)...

Member Avatar for donnidore
0
306
Member Avatar for amen

If you want to make sure there are no numbers in a string, you can do a find_first_of( "01234567890"). If it equals anything other than string::npos, it's got a number in there.

Member Avatar for Ancient Dragon
0
154
Member Avatar for AhmedHan

I found this: [url="http://www.eskimo.com/~scs/C-faq/q2.13.html"]http://www.eskimo.com/~scs/C-faq/q2.13.html[/url] and this: [b]9.10: Why does sizeof report a larger size than I expect for a structure type, as if there was padding at the end? [/b] Structures may have this padding (as well as internal padding; see also [url="http://www.lysator.liu.se/c/c-faq/c-9.html#9-5"][color=#800080]question 9.5[/color][/url]), so that alignment properties will be …

Member Avatar for bala2nd
0
360
Member Avatar for Leontyne

Missing a semicolon here: unsigned long k //k as an unsigned long integer also, either change cout to std::cout or put a 'using namespace std;' at the top after the include.

Member Avatar for olejarskiw
0
155
Member Avatar for trevs234
Member Avatar for j1979c

You must be using visual studio 6. You can disable the warning with a pragma statement.

Member Avatar for borlys
0
580
Member Avatar for gebbit
Member Avatar for themoon49
0
2K
Member Avatar for indianscorpion2

This won't compile: k=n*[color=red]fact[/color](n-1); should be k=n*[color=red]facto[/color](n-1); After making that change, seems to work fine.. enter the number for which you want to find the factorial 7 the factorial of yhe number 7 is 5040 (Be careful though factorials get large very quickly and you have a risk of blowing …

Member Avatar for sanjeevtanwar
-1
395
Member Avatar for winbatch

Hi, I'm trying to write some code that will validate if we are trying to write to nfs and if so, complain. From what I've read, the stat() call populates the st_dev with value of the file system type. On an nfs mount it tells me that it's '14'. I'd …

Member Avatar for winbatch
0
177
Member Avatar for cymerman

Couple of problems: if (day = "m" || "M") must be if ( day == 'm' || day == 'M' ) because day is a single character. (Even if it were a string you couldn't do a comparison like that, you'd need to use strcmp) You must specify day once …

Member Avatar for miami99
0
540
Member Avatar for winbatch

Consider this working code: [icode] #include <iostream> using namespace std; class Base { public: void print(string val) { cout<<val<<endl; } virtual void print(int val) { char temp[1000]; sprintf( temp, "%d", val ); string tempstring = temp; print ( tempstring ); } }; int main() { Base a; string whatever= "BLAH"; …

Member Avatar for winbatch
0
183
Member Avatar for winbatch

Hi, Trying to play with multithreading by taking some of my existing apps and converting them over. In doing so, I noticed a strange phenomenon that I've been able to reproduce in a very simple program. let's say I create 2 threads. Each thread simply does a for loop from …

Member Avatar for Ancient Dragon
0
142
Member Avatar for winbatch

OK - so I installed windows 2003 server on my desktop, which is in the basement. I have a laptop upstairs (xp) which I want to connect to the desktop over remote desktop. This is working ok (networking, etc), except the way that 2003 server is working, it's making it …

Member Avatar for isfana
0
842
Member Avatar for winbatch

Hi, I have a swing app where I am using (among other things obviously) an editable JComboBox and a jButton. when the JButton is clicked, it does some processing and uses the value in the JComboBox as one of it's inputs. I'm finding that everything is fine when: - The …

Member Avatar for winbatch
0
202
Member Avatar for maciac

inside the if, you should be comparing $CHECKA and $CHECKB, not CHECKA and CHECKBKeep the space there. Also, try removing the ; and move 'then' to the next line. (not sure if this matters)

Member Avatar for eggi
0
104
Member Avatar for comwizz
Member Avatar for winbatch

Hi, If I have a JComboBox which has a list of Strings which can be selected, is there a way to insert a line/horizontal rule inside to indicate some sort of grouping of values? If so, how do I do it? (Also, the actual line ------ should not be selectable …

Member Avatar for masijade
0
214
Member Avatar for Dani

You should look into one of the online savings banks like ING, Emigrant Direct, HSBC, etc. Really good rates, no minimum balance, etc.

Member Avatar for ddyrr
0
271

The End.