Showing results 1 to 40 of 45
Search took 0.01 seconds.
Posts Made By: ilikerps
Forum: Java Nov 29th, 2006
Replies: 6
Views: 3,172
Posted By ilikerps
Re: Host's Non-Local IP Address

All of those do not give the public IP address, except the fourth one (http://forum.java.sun.com/thread.jspa?forumID=31&threadID=639572). However, the way suggested is just what I had thought of and...
Forum: Java Nov 27th, 2006
Replies: 6
Views: 3,172
Posted By ilikerps
Re: Host's Non-Local IP Address

Well, I have tried using that, and unless there is something I'm missing, that only gives addresses such as 192.168.1.100 when used with getLocalHost().getHostAddress();. I was looking for the...
Forum: Java Nov 26th, 2006
Replies: 6
Views: 3,172
Posted By ilikerps
Solution Re: Host's Non-Local IP Address

Ah, well, that won't really work in Java by itself, but, for those who care, this works (by utilizing a website like the one above):
try {
Socket sock = new Socket("www.edpsciences.org",...
Forum: Java Nov 26th, 2006
Replies: 6
Views: 3,172
Posted By ilikerps
Question Host's Non-Local IP Address

Hello, I was just wondering if it is possible in Java to get the host's IP address, as seen on the Internet, not network or by the computer itself. I mean, getting something like 87.253.145.35...
Forum: Linux Servers and Apache Oct 25th, 2006
Replies: 2
Views: 2,098
Posted By ilikerps
Re: No Redirection to my Apache Server

Well, if that is so, then my IP address has been blocked every time it's changed. It hasn't remained the same since this problem began.

Also, a DNS lookup for www.ilikerps.net works, even though...
Forum: Linux Servers and Apache Oct 24th, 2006
Replies: 2
Views: 2,098
Posted By ilikerps
Troubleshooting No Redirection to my Apache Server

Hello. I have been having trouble with my Apache server (or perhaps something else, like DNS) for a while now. I have tried to find a solution, but my keywords always come up with almost completely...
Forum: Java May 8th, 2006
Replies: 1
Views: 751
Posted By ilikerps
Re: Copying .class files

Okay, I am sorry for posting in the first place, but I found a solution. Using FileOutputStream and FileInputStream, the individual bytes are copied and the files are the exact same.
Forum: Java May 8th, 2006
Replies: 1
Views: 751
Posted By ilikerps
Copying .class files

Hello, I am trying to write a simple updater program (in Java). A client would connect to the server, which would hand out any files it needs updated. One example would be updating a Java .class...
Forum: Java Feb 22nd, 2006
Replies: 8
Views: 2,054
Posted By ilikerps
Re: Stupid question about java.exe

Thanks, the package thing did finally get it to work. Well, at first it didn't until I put the files into a folder with the same name as the package.
Forum: Java Feb 22nd, 2006
Replies: 8
Views: 2,054
Posted By ilikerps
Re: Stupid question about java.exe

I made my classes into a jar file. The folder it now is in is C:\jarme\
and the jar filename is
myjar.jar
I tried something to the effect of:
set cp=C:\jarme\myjar.jar;C:\jarme\
java -cp %cp%...
Forum: Java Feb 22nd, 2006
Replies: 8
Views: 2,054
Posted By ilikerps
Re: Stupid question about java.exe

Yes, I actually typed <location here>. No, just kidding; I am not quite that dumb. Its just that the folder was in my documents, which has some personal information in the name.
Forum: Java Feb 21st, 2006
Replies: 8
Views: 2,054
Posted By ilikerps
Re: Stupid question about java.exe

Hmm.... I don't need any jar files for this program, so I just used:

set cp = "<location here>"
java -cp %cp% TEditor

but I got the same error as before.
Forum: Java Feb 21st, 2006
Replies: 8
Views: 2,054
Posted By ilikerps
Stupid question about java.exe

Hello, I know this question is stupid, but I cannot find an exact answer to it.
I am using Eclipse, and have written some classes to be used as a small database editor for XML. It compiles and runs...
Forum: C++ Jan 30th, 2006
Replies: 7
Views: 1,356
Posted By ilikerps
Re: substr() Causing Runtime Error

Sorry, I guess I wasn't thinking when I wrote 'null pointer.'
Is it possible that either the "getline(ifstream, string)" method returns a null character at the end or "string.c_str()" does? Then it...
Forum: C++ Jan 28th, 2006
Replies: 7
Views: 1,356
Posted By ilikerps
Re: substr() Causing Runtime Error

K, figured it out. The first line was sending a blank line. This caused the error because there weren't enough characters. So I just told it to ignore the first line, and it is working fine.
But, I...
Forum: C++ Jan 28th, 2006
Replies: 7
Views: 1,356
Posted By ilikerps
Re: substr() Causing Runtime Error

Well, the statement
buffer[sr] = '\0'
seems to say that sr is the final character. The buffer is sent 1 line at a time, so there shouldn't be just 1 character in the buffer, because there is no line...
Forum: C++ Jan 28th, 2006
Replies: 7
Views: 1,356
Posted By ilikerps
Re: substr() Causing Runtime Error

The error still occurs:

sr = recv(acc, buffer, sizeof(buffer)-1, 0);
cout << "sr = " << sr << "\n";
buffer[sr] = '\0';
buffStr = buffer;
outfile << buffStr.substr(9,buffStr.size()-1) << "\n";

The...
Forum: C++ Jan 28th, 2006
Replies: 7
Views: 1,356
Posted By ilikerps
Question substr() Causing Runtime Error

Hello, I am trying to move data from a client to a server, and save it in a file. However, I am getting a "Runtime Error!" when I use the substr() function, here:
char buffer[256];
int sr = recv(acc,...
Forum: C Jan 27th, 2006
Replies: 6
Views: 1,335
Posted By ilikerps
Re: char to char*

Yes, I thought I could. I also thought that since that was so obvious, there might have been some exception.... I guess not. And I'd prefer just using c_str() than mutating a string, although I don't...
Forum: C Jan 27th, 2006
Replies: 6
Views: 1,335
Posted By ilikerps
Re: char to char*

Salem, I need to send the buffer through a socket, and that is what I had already used. I suppose it may not be neccessay.
Ancient Dragon, I had tried simply accessing it that way, but for some...
Forum: C Jan 26th, 2006
Replies: 6
Views: 1,335
Posted By ilikerps
Re: char to char*

Gah, sorry, just realized a solution;
string temp = ch;
strcpy(sendBuffer, temp.c_str());
Sorry for posting :(
Forum: C Jan 26th, 2006
Replies: 6
Views: 1,335
Posted By ilikerps
char to char*

Hello, I know this is probably a very elementary answer, but how does one convert a character into a character pointer, for use strcpy()? For instance, I need this:

char sendBuffer[5];
char ch;
//...
Forum: C++ Jan 25th, 2006
Replies: 2
Views: 1,147
Posted By ilikerps
Re: fstream.h + winsock2.h doesn't work?

Gah! Why does that work and why are my problems always so simple and stupid?
No, that was a rhetorical question. Thanks for the help.
Forum: C++ Jan 25th, 2006
Replies: 2
Views: 1,147
Posted By ilikerps
fstream.h + winsock2.h doesn't work?

Hello, I am working on a server program that deals with opening files, or at least that is all that is relevant for this post. I am using VC++.
I use multithreading so that it can be multi-client, of...
Forum: C++ Jan 20th, 2006
Replies: 3
Views: 4,512
Posted By ilikerps
Re: New Lines in Visual C++ Multiline Edit Boxes?

Hmm.... I tried this:
m_ChatText = "Hello!";
MessageBox(m_ChatText);
m_ChatText += char(13) + char(10);
MessageBox(m_ChatText);
m_ChatText += "How are you?";
MessageBox(m_ChatText);

The...
Forum: C++ Jan 19th, 2006
Replies: 8
Views: 2,340
Posted By ilikerps
Re: Multithreading error

Oh! I apolgize for my stupidity. I hadn't known it could be type-casted. I have almost never found type-casting to be useful, because when I need it, there is no type cast conversion avaliable for...
Forum: C++ Jan 18th, 2006
Replies: 3
Views: 4,512
Posted By ilikerps
Question New Lines in Visual C++ Multiline Edit Boxes?

I have an edit box, with its settings as "multiline", "want return", and "vertical scroll."
All I want to do is to have new lines between each output line. However, I have tried "\n", which did not...
Forum: C++ Jan 18th, 2006
Replies: 8
Views: 2,340
Posted By ilikerps
Re: Multithreading error

Thank you, that works :)

However, I need it to be able to use some variables in the class that creates the thread. You mentioned something about using "this", but I don't know if I should put that...
Forum: C++ Jan 18th, 2006
Replies: 8
Views: 2,340
Posted By ilikerps
Re: Multithreading error

Er, could someone possible provide a simple example (it would be best if you could do one that might be similar to the setting I described) in which the function CreateThread is used? The one at...
Forum: C++ Jan 18th, 2006
Replies: 8
Views: 2,340
Posted By ilikerps
Re: Multithreading error

Ah, that makes sense now; my server had it as a global class. CreateProcess() has so many parameters. Well, better start learning now; maybe I'll get through them by the end of the month. :P
Forum: C++ Jan 18th, 2006
Replies: 8
Views: 2,340
Posted By ilikerps
Multithreading error

Hello. I am trying to convert my chat client from a C++ program that runs in DOS into one that runs in a Windows Dialog. I am using Visual C++. However, I am already getting a second error (please...
Forum: C++ Jan 18th, 2006
Replies: 5
Views: 1,059
Posted By ilikerps
Re: Included, but not really?

No, I meant that before I had been reading a Java book, to learn Java. I can understand the confusion. Reading a Java book and doing a C++ project. Well, it may not be the wisest idea but at least I...
Forum: C++ Jan 17th, 2006
Replies: 5
Views: 1,059
Posted By ilikerps
Re: Included, but not really?

Hmm... that worked. I thought when I had had that there before, it had said "std is not a namespace". Strange. Thanks!

I suppose that would also work, Dragon. I am reading a Java book, and I guess I...
Forum: C++ Jan 17th, 2006
Replies: 5
Views: 1,059
Posted By ilikerps
Question Included, but not really?

Hello. I am trying to convert my chat client from a C++ program that runs in DOS into one that runs in a Windows Dialog. I am using Visual C++. However, I am already getting a strange error:
#include...
Forum: C++ Dec 8th, 2005
Replies: 3
Views: 3,378
Posted By ilikerps
Re: Getting a substring substring, but without 2 strings

Of course. I hadn't seen that in the cplusplus.com reference for cstring. In fact, cplusplus.com has apparently no documentation for substr at all.... Ah well, thanks for the function.
Forum: C++ Dec 8th, 2005
Replies: 3
Views: 3,378
Posted By ilikerps
Question Getting a substring substring, but without 2 strings

Hello, I just have a question about how to find a substring when one has only a string and coordinates for where the data will be? For instance, a string "why,hello", and data that is at the...
Forum: C Dec 7th, 2005
Replies: 9
Views: 1,994
Posted By ilikerps
Re: Trouble with Pointers and Arrays

Oh! Nevermind, I fixed my error. Perniciosus, you were correct. I had been so focused upon the "strlen(changingString) + 1" part that I forgot about the strcpy. Now it works. Sorry for the three...
Forum: C Dec 7th, 2005
Replies: 9
Views: 1,994
Posted By ilikerps
Re: Trouble with Pointers and Arrays

Neither of these work.... The latter makes the text very weird (some weird character, a black smiley face, and an 8, rather than the text "hello") and the former has the same result as what...
Forum: C Dec 7th, 2005
Replies: 9
Views: 1,994
Posted By ilikerps
Re: Trouble with Pointers and Arrays

Thanks for that information, perniciosus. I will try that as soon as I can get a compiler handy :P
Forum: C Dec 7th, 2005
Replies: 9
Views: 1,994
Posted By ilikerps
Re: Trouble with Pointers and Arrays

Sorry, the example I gave must have been incorrect; I hadn't tested it. The thing that is wrong with my example is that changingString is an array rather than a character pointer. This is more...
Showing results 1 to 40 of 45

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:40 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC