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.59K 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
345
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
464
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
247
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
254
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
551
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
601
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
310
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
156
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
362
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
Member Avatar for borlys
0
581
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
178
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
541
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
184
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
143
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
846
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
203
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
272
Member Avatar for Koteswar
Member Avatar for winbatch

Is there a way using file handling functions to search within a text file to find the position of certain text WITHOUT having to read each character/line and evaluating it? For example, let's say I have a file of 'messages', where a message has a distinct start and end characters. …

Member Avatar for vijayan121
0
365
Member Avatar for winbatch

I'm new to perl (and actually not even really trying to develop this skill - I inherited some code and am trying to enhance it). Basically, I want to get the text between parts of a text string. How do I get the parsed variable to contain "WHATEVER IT IS"? …

Member Avatar for winbatch
0
148
Member Avatar for bops

[quote=bops;278440] I need to know how to connect to my computer from outside also on a specified port. anyone know how?[/quote] You need to set up port forwarding on the router, which says when a request comes in on this port, send it to this ip address inside the network …

Member Avatar for winbatch
0
131
Member Avatar for indianscorpion2

If you've been working on it for 3 days, surely you have developed a starting point. Why don't you post your code, indicate specifically what's not working, and someone will help you.

Member Avatar for Nick Evan
0
563
Member Avatar for wani_raj

There is also sqlapi [url="http://www.sqlapi.com"]www.sqlapi.com[/url]

Member Avatar for priya_2006g
0
257
Member Avatar for winbatch

So here's what I'm trying to do. Basically, I have a huge text file of strings which are delimited by a delimiter. I would like to read each string separately based on the delimiter. Note that each chunk can span several lines, so I don't want to read it line …

Member Avatar for Ancient Dragon
1
221
Member Avatar for winbatch

Hi, I've inherited some code in C that acts as a server and receives requests over a socket. That is all working fine. I wanted to make a very small change to the server code to print out the hostname of the client connection. However, I'm always getting 0.0.0.0 as …

Member Avatar for kris.c
0
167
Member Avatar for iamthwee

[quote] void bull(char[]); void bull( char crap[] ) { std::cout << crap; } [/quote] Assuming you won't in fact attempt to change 'crap' inside the 'bull' function, simply change the above to: [code] void bull( const char[] ) and void bull( const char crap[] ) { std::cout << crap; } …

Member Avatar for Jessehk
0
649
Member Avatar for winbatch

So I'm trying to learn how to use function pointers (ie to pass the address of a function to another function to execute it - like a call back). I have it working when I use it as follows: Classes.h: [code] #include <iostream> using namespace std; class Class1 { public: …

Member Avatar for dubeyprateek
1
736
Member Avatar for gminis3

Show us the code where you are requesting and accepting the string to begin with, then we'll show you how to modify it for the error checking.

Member Avatar for Lerner
0
194
Member Avatar for winbatch

If I have a swing app where I have 3 JPanels inside the content pane. By default, it makes it so that all 3 panels take up 33% of the overall size of the app. I would like to make it so that the first panel takes up a smaller …

Member Avatar for jwenting
0
257
Member Avatar for vurdlak
Member Avatar for djbsabkcb

The Senate, This: [url="http://www.eternallyconfuzzled.com/about.html"]http://www.eternallyconfuzzled.com/about.html[/url] Should help clear up any confusion.... (read the second paragraph)

Member Avatar for Narue
0
808
Member Avatar for bofarull
Member Avatar for bofarull
0
298
Member Avatar for winbatch

I am trying to write a large file, but it always stops writing when it hits 2GB. (2147483647 bytes to be exact). I know it's not an O/S or disk issue (I'm on solaris) as I'm able to use the mkfile command to create a 3GB file. I'm using the …

Member Avatar for winbatch
0
203
Member Avatar for stupidenator
Member Avatar for stupidenator
0
170
Member Avatar for MrBrilliant

You're gonna have to give us a bit more than that - how about some source code?

Member Avatar for MrBrilliant
0
246
Member Avatar for caseg

Why are you doing cout so many times inside the loop? You're going to get like 400 printouts...

Member Avatar for Whodey
0
145
Member Avatar for vicky_dev

I'm probably missing some math aspect here, but couldn't you convert 4.33 to a string, find out what position the . is and have your answer?

Member Avatar for vicky_dev
0
135

The End.