Showing results 1 to 40 of 188
Search took 0.02 seconds.
Posts Made By: bops
Forum: Java Oct 12th, 2008
Replies: 1
Views: 256
Posted By bops
Setting the content of a JTree without creating a new object.

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 with...
Forum: Java Sep 15th, 2008
Replies: 2
Views: 263
Posted By bops
Re: Get desktop rectangle

Worked perfect, thanks.
Forum: Java Sep 15th, 2008
Replies: 3
Views: 301
Posted By bops
Re: "Posrt Listener"

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: 263
Posted By bops
Get desktop rectangle

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 for...
Forum: Java Aug 31st, 2008
Replies: 1
Views: 218
Posted By bops
Re: how to relocate swing component automatically???

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: 242
Posted By bops
Getting the base location of a project

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 package...
Forum: C Jul 24th, 2008
Replies: 3
Views: 289
Posted By bops
Re: Sorting strings - segmentation fault

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: 1,104
Posted By bops
Re: Dynamic memory allocation with strings

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: 1,104
Posted By bops
Re: Dynamic memory allocation with strings

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: 1,104
Posted By bops
Dynamic memory allocation with strings

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";


My...
Forum: C++ Jul 2nd, 2008
Replies: 4
Views: 348
Posted By bops
Re: Making gcc/g++ output errors to a file

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: 348
Posted By bops
Making gcc/g++ output errors to a file

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: 1,103
Posted By bops
Re: Swing mouseover events

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: 1,103
Posted By bops
Swing mouseover events

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: 569
Posted By bops
Re: "Press enter to go back"

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: 764
Posted By bops
Re: Problem with translating data with comma to array

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: 1,005
Posted By bops
Re: OpenGL setting screen coordinates

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: 1,005
Posted By bops
Re: OpenGL setting screen coordinates

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: 1,005
Posted By bops
Re: OpenGL setting screen coordinates

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: 1,005
Posted By bops
Re: OpenGL setting screen coordinates

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: 1,005
Posted By bops
OpenGL setting screen coordinates

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: 1,294
Posted By bops
Brute Force Search

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: 800
Posted By bops
Re: Desert Island problem in Java3D

Anyone have any idea?
Forum: Java Jan 2nd, 2008
Replies: 1
Views: 800
Posted By bops
Desert Island problem in Java3D

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: 1,240
Posted By bops
Re: Uses of Array List

=java]
public class Statistics
{
public double getAverage( ArrayList<Integer> source)
{
int count=0;
for( int i=0; i < source.size(); i++ )
{
count += source.get( i...
Forum: Java Dec 21st, 2007
Replies: 1
Views: 440
Posted By bops
Re: help with GUI (calling one class from other class)

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: 1,435
Posted By bops
Java 3D Picking

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: 5
Views: 1,141
Posted By bops
Re: Get Directory Listing

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: 5
Views: 1,141
Posted By bops
Re: Get Directory Listing

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 has...
Forum: PHP Dec 18th, 2007
Replies: 5
Views: 1,141
Posted By bops
Re: Get Directory Listing

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: 5
Views: 1,141
Posted By bops
Get Directory Listing

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: 2,818
Posted By bops
Re: Failure of CreateFile()

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: 2,818
Posted By bops
Re: Failure of CreateFile()

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: 2,818
Posted By bops
Failure of CreateFile()

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: 815
Posted By bops
Re: Check windows passwords

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 can...
Forum: C Aug 31st, 2007
Replies: 7
Views: 815
Posted By bops
Re: Check windows passwords

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: 815
Posted By bops
Check windows passwords

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 stored...
Forum: C Aug 30th, 2007
Replies: 0
Dll
Views: 823
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: 1,897
Posted By bops
Re: Reading and writing from files works selectively...

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 what...
Forum: C++ Aug 4th, 2007
Replies: 6
Views: 854
Posted By bops
Re: Never worked with C++ Guis before....

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

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:08 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