Search Results

Showing results 1 to 40 of 188
Search took 0.02 seconds.
Search: Posts Made By: bops
Forum: Java Oct 12th, 2008
Replies: 1
Views: 1,018
Posted By bops
Hey everyone,

I was just wondering if there is a method as part of the JTree class that would accept a parameter such as an instance of DefaultMutableTreeNode and change the content of the tree...
Forum: Java Sep 15th, 2008
Replies: 2
Views: 859
Posted By bops
Worked perfect, thanks.
Forum: Java Sep 15th, 2008
Replies: 3
Views: 786
Posted By bops
I'm not sure about SCTP, but java is able to use Sockets to listen on a specified port, using either UDP or TCP protocols. If this is sufficient, then I would suggest googling "Java Socket...
Forum: Java Sep 15th, 2008
Replies: 2
Views: 859
Posted By bops
Hey all, very simple question here..
How in Java can I get a Rectangle object that represents the Desktop coordinates?
In fact just the width and height of the Desktop will do..
I'm just looking...
Forum: Java Aug 31st, 2008
Replies: 1
Views: 491
Posted By bops
Possibly use a LayoutManager, theres many to choose from. If you want more control you can handle the event when the holding window is resized, in which you can calculate from the size and location...
Forum: Java Aug 31st, 2008
Replies: 1
Views: 450
Posted By bops
It is quite hard to explain what I mean here, but...

Say I have a class that is stored on a hard drive like this..
project/helpers/MyToolkit.class

i.e. the class MyToolKit is stored in the...
Forum: C Jul 24th, 2008
Replies: 3
Views: 508
Posted By bops
I think a segmentation fault occurs when you are trying to use a memory location that it is not allowed to. For example, trying to write to a read only memory location or maybe even trying to use a...
Forum: C Jul 24th, 2008
Replies: 17
Views: 2,590
Posted By bops
Ok, thanks a lot.

Actually, can you use sprintf like this, and is it safe?


int len;
len = sprintf(NULL,"This is my forename: %s",fname);


And then use len to allocate the memory for msg?
Forum: C Jul 24th, 2008
Replies: 17
Views: 2,590
Posted By bops
Yeah, I assumed so. But what is the best way to go about doing this? What kind of practices do you use when dealing with such things?
Forum: C Jul 24th, 2008
Replies: 17
Views: 2,590
Posted By bops
Hey all,
I was just wondering, is it safe to do something like this?


char *msg;
sprintf(msg,"Forename: %s", fname); //where fname has been previously defined as char fname[ ] = "Jonathon";

...
Forum: C++ Jul 2nd, 2008
Replies: 4
Views: 1,103
Posted By bops
Thanks, it works perfectly.
Is this "2>" a g++ functionality or an OS functionality? I.e. will the same command work on Unix i.e.

g++ "~/HelloWorld.cpp" 2> "~/out.txt"


Cheers.
Forum: C++ Jul 2nd, 2008
Replies: 4
Views: 1,103
Posted By bops
This is not a question about C/C++ as such, but I couldn't think of where else to put it.
I would like to know how to call either gcc or g++ and specifying that all error messages that are to occur...
Forum: Java Jun 9th, 2008
Replies: 4
Views: 4,266
Posted By bops
Yeah I have tried that but it didn't seem to work either. The thread idea sounds cool but a little much work for such a simple task.

For the first idea the e.getSource() method on the mouseExited...
Forum: Java Jun 8th, 2008
Replies: 4
Views: 4,266
Posted By bops
Hey, I am trying to make a little MDI control with tabs, but my problems lies in the following:
I want it so that when the mouse is over a tab, a close button i.e. an X is displayed on the tab, then...
Forum: C Mar 22nd, 2008
Replies: 9
Views: 825
Posted By bops
We would need a little more information than that to help you. Is it a console application? or a GUI? Windows? Linux? Can you post any code so we can see exactly what you are trying to get at?
Forum: C Mar 20th, 2008
Replies: 4
Views: 1,026
Posted By bops
You could try reading the whole file into memory and store it in a character array i.e. char*. Then you could use the function strtok() to "tokenise" the character array, i.e. split up the character...
Forum: C Mar 19th, 2008
Replies: 9
Views: 2,101
Posted By bops
Doesn't the translate function simply move an object i.e. in your example so far in a specified direction? I don't think it's what I'm after, thanks anyway. I think it could be something along the...
Forum: C Mar 18th, 2008
Replies: 9
Views: 2,101
Posted By bops
Its not a problem. My point is that I cannot start off by just writing code because there is a specific function that I need to do it. I am just asking if there exists a function that would set the...
Forum: C Mar 18th, 2008
Replies: 9
Views: 2,101
Posted By bops
What attitude? I'm simply stating that I cannot in this case just "have a stab" at it which is why I posted the question I did.. and a somewhat useless reply is not helpful. I am well aware of the...
Forum: C Mar 17th, 2008
Replies: 9
Views: 2,101
Posted By bops
How about..
I am not a new member here and I am well aware of the rules and expectations when posting.
When someone posts asking for help, useless replies like the one you have just given are...
Forum: C Mar 17th, 2008
Replies: 9
Views: 2,101
Posted By bops
Hey, I'm relatively new to OpenGL but I have a little experience in C and I was wondering how I would set the pixel coordinates of an OpenGL windows. Its a little hard to explain what I mean but for...
Forum: Java Feb 5th, 2008
Replies: 4
Views: 2,997
Posted By bops
Hello, for a University assignment I am attempting to use a brute force search to generate all possible combinations of a list of numbers. This is only a small part of what I must do. I realise that...
Forum: Java Jan 8th, 2008
Replies: 1
Views: 1,099
Posted By bops
Anyone have any idea?
Forum: Java Jan 2nd, 2008
Replies: 1
Views: 1,099
Posted By bops
As part of my University coursework I have to implement a simulation of a desert island with 2 sharks swimming around it in opposite directions and when a button (I have chosen the island) is...
Forum: Java Dec 22nd, 2007
Replies: 3
Views: 2,663
Posted By bops
=java]
public class Statistics
{
public double getAverage( ArrayList<Integer> source)
{
int count=0;
for( int i=0; i < source.size(); i++ )
{
count +=...
Forum: Java Dec 21st, 2007
Replies: 1
Views: 798
Posted By bops
I'm not quite sure but maybe you could access an object from within its panel by creating accessor methods in your panel classes such as..


public class MyTopPanel extends JPanel
{
private...
Forum: Java Dec 21st, 2007
Replies: 1
Views: 2,623
Posted By bops
I am trying to implement a feature when the user clicks a specified shape (trigger) on the screen that an event is triggered. The following code is a class that I have written that implements mouse...
Forum: PHP Dec 19th, 2007
Replies: 6
Views: 3,170
Posted By bops
Nevermind, I have found the mistake.. I was using closedir() inside the loop where I should have been using it outside the loop.
Forum: PHP Dec 19th, 2007
Replies: 6
Views: 3,170
Posted By bops
I have tried the @ to suppress warnings on all the functions I am using, I don't get any messages from PHP but now all my function displays are the testing echos..


TESTING: ARG=..
TESTING: dir...
Forum: PHP Dec 18th, 2007
Replies: 6
Views: 3,170
Posted By bops
sorry about that, the only error I get is:

Warning: readdir(): 41 is not a valid Directory resource in C:\Program Files\Apache Group\Apache2\htdocs\index.php on line 24
Forum: PHP Dec 18th, 2007
Replies: 6
Views: 3,170
Posted By bops
Hey, I am trying to recursively retrieve the directory listing of a given directory that is, print out all files and folders (and sub folders) of a given directory. My function #1 does not work,...
Forum: C Sep 2nd, 2007
Replies: 7
Views: 4,437
Posted By bops
Ooh, Yes I see where its gone wrong now. I'm returning before Closing the Handle to the file. So really I should return pszFileText at the end, and obviously remove GlobalFree( pszFileText )..
...
Forum: C Sep 1st, 2007
Replies: 7
Views: 4,437
Posted By bops
Do you mean CloseHandle()?

Before when I call this function I am using a function to getContent() of a file. Within that function I do make sure to Close the handle to the file after reading the...
Forum: C Sep 1st, 2007
Replies: 7
Views: 4,437
Posted By bops
BOOL setContent( LPSTR szContent )
{
HANDLE hFile;
BOOL bSuccess = FALSE;
DWORD dwTextLength;

hFile = CreateFile( "data.txt" , GENERIC_WRITE , 0 , NULL , CREATE_ALWAYS ,...
Forum: C Sep 1st, 2007
Replies: 7
Views: 1,159
Posted By bops
Just what I was looking for thanks.

But is there anything you can use when you don't have such permissions, i.e.

the user of which you would like to impersonate is already logged on already and...
Forum: C Aug 31st, 2007
Replies: 7
Views: 1,159
Posted By bops
Yeah, I'm not after password cracking or anything, I simply want to be able to check if a password entered in my application matches the one for the currently logged on user.

Which API's would be...
Forum: C Aug 30th, 2007
Replies: 7
Views: 1,159
Posted By bops
Hey, I want to write a function with the following signature -

[code=c]
BOOL checkPassword( char * input );
[code]

In this function I want to be able to check this password against the...
Forum: C Aug 30th, 2007
Replies: 0
Dll
Views: 1,133
Posted By bops
Dll
I have created a simple DLL in C that in which contains a function to implement a Low-Level Mouse Hook to Clip the Cursor to a window. I have done this because I feel the ClipCursor() API is...
Forum: C++ Aug 10th, 2007
Replies: 20
Views: 2,657
Posted By bops
Are you even using the FUNCTIONS in a main program.. in C/C++ you need to implement them in main() i.e.

[code]
int main( int argc, const char* argv[] )
{
// CODE HERE..
}

I'm confused as to...
Forum: C++ Aug 4th, 2007
Replies: 6
Views: 1,186
Posted By bops
I'm not sure how to do it in the way you are talking about. You can quite easily create GUI's using the win32 API. It may be hard to get into your head at first but once its in you are sorted. This...
Showing results 1 to 40 of 188

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC