- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 8
- Posts with Upvotes
- 8
- Upvoting Members
- 8
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Computer Science and IT Student
- PC Specs
- AMD -power2da ppl- Athlon 3000+
78 Posted Topics
Re: I'd like to help... but I have no knowledge of magic squares or the mentioned algorithm... or perhaps I do and it just sounds foreign. Care to explain what a magic square is? An example would suffice. It appears that you just need a bunch of criteria to verify if … | |
Re: Hi, I'm trying to gain access to a postGres database. I've tried to use Npgsql but I get an error with the Mono.Security.dll file (the version is incorrect > but I can't find v2). So I thought I'd give the above method a try. I was just wondering in the … | |
I'm creating a custom `ComboBox` that allows the user to select a date; the calendar display is localized making the built-in `DateTimePicker` undesirable (see [here](http://support.microsoft.com/Default.aspx?scid=kb;en-us;889834&x=18&y=19) for more information). I need the UI control to mirror the look and feel or the existing components. Here's what I've tried and the problems … | |
Greetings :) I'm trying to intercept some Win32 messages; in particular I want to respond to a [icode]TVN_GETDISPINFO[/icode] notification. This notification is sent in the form of a [icode]WM_NOTIFY [/icode](see [URL="http://msdn.microsoft.com/en-us/library/bb773518(v=vs.85).aspx"]here[/URL]) and contains a pointer to [icode]NMTVDISPINFO [/icode]which gives access to a [icode]TVITEM[/icode]. [icode]TVITEM [/icode]has a [icode]LPTSTR pszText[/icode] field that … | |
Re: You can think of a [B]static [/B]method as a [B]class [/B]method; methods must be contained within a [B]class [/B]in C#. The following should work: [CODE]if (MyClass.IsPostponed()) { .. }[/CODE] Where [I]MyClass [/I]contains the definition of the [B]static [/B]method. | |
Good day :) I'd like to be able to change the [I]Region and Language[/I] options of [I]Windows 7[/I] from a C# program. Changing this setting manually requires a system restart so I imagine if this is possible at the programming level, the system would also have the restart? Any thoughts? … | |
Good day :) I'm trying to display some Unicode text (Выход) on a Button. C# uses UTF-16 encoding but I'm reading my data from a UTF-8 encoded file so I take the necessary steps to ensure that I've read the data correctly. In debug mode I see that the string … | |
Re: It appears that you're having problems creating a class hey? So I'm going to give you and example and clear up some of the termonolgy. Consider: [code]class A { private String name; public A() { name = "Test"; } public void setName(String n) { name = n; } public String … | |
Re: I agree with Masijade, and I think you could probably just change the [I]JFrame[/I] inheritance to [I]JPanel[/I], well depending on your actual coding hehe Anyway, what I wanted to recommend is NetBeans. It’s a very innovate IDE when one is dealing with GUI applications :icon_cool: You’d just create a new … | |
Greetings! I have a win32 native dll (perhaps that's not the correct term - it's basically a C compiled dll) that I'm accessing in C#. The method signature of the C code (not the actual signature in the dll): [code=C++] char* TestMethod() [/code] I'd like to access the [B]char*[/B] as … | |
Greetings! I have a C# dll generated from a .resx file (I believe it's called a satellite dll). This stores simple key to string mappings (used for language localization). I was wondering if it's possible and feasible to access the information stored in the C# dll from a C++ unmanaged … | |
Hi there, I'm trying to access a resource only dll (compiled with the [i]/NOENTRY[/i] linker option) within C#. The dll file was created using a rc file that contains a [b]STRINGTABLE[/b]. I used [b]CComBSTR[/b] to load the string resource from the dll in C++; I'm not sure how to do … | |
Hey guys, I was wondering: suppose I created a standard console application and but I now want to make the program (well the code behind the program) into a dll file or some other reference object that can be added to other projects - how would this be done? I'm … | |
Re: I agree with Masijade, one would tend to not create an 'exe' file from a Java program. Indeed there should exist a byte code to exe compiler, though I wonder how efficient/valid one would be; Java is a growing language and some of the specifications of Java aren't easily portable … | |
Re: sabithpocker, so that's how you'd access an image? I agree that the image can be included in the generated [I]jar[/I] file. However, my feeling is that the file will not be accessible via the Java code since the current path (using relative addressing) would be the path the [I]jar[/I] executable … | |
Re: The whole point of declaring something private (which as it was explained means that it is only accessible within the scope of that class) is to prevent the value of the variable changing without supervision. In your case perhaps we would want the number of jackets to lie between 0 … | |
Re: I'm a bit perplexed... since this topic is in the Java forum I'm assuming that some Java programming is involved. As such, I'm imagining a Java Applet since we're speaking about something that's web based. Please correct me if I'm wrong, but if the server knows both users that belong … | |
Re: I'm not sure why you said 'no,' [I]sillyboy[/I]? But yes, since chicago1985 instantiated the object to [B]null[/B], there wouldn't be anything to 'get.' What concerns me is that he actually declared the variable [B]request[/B]. I'm assuming the class this method belongs to, is a [U]servlet[/U]? That is, the class extends … | |
Re: Please marked this post as solved, thank you. | |
Re: Hi there, I'm not entirely sure why you're running that [I]for[/I] loop that contains the undeclared variable. Remember that the end of line terminator is not returned by the [B]readLine()[/B] method of [B]BufferedReader[/B]. Also, if you just want to get rid of leading/following whitespaces (like a space) then you can … | |
Re: So my first question would be: what are you comparing? I only see that you've implemented the [I]Selection Sort[/I]... are you wanting to compare different methods of carrying out the [I]selection sort[/I]? Next, your criteria for comparison isn't clear. Runtime seems like the best criteria and would require that you … | |
Re: Read this thread: [URL="http://www.daniweb.com/forums/thread42410.html"]http://www.daniweb.com/forums/thread42410.html[/URL] You'll find that there are multiple ways to do what you need. I suggested [I]getResource()[/I]. | |
Re: I agree with stephen84s, you need some sort of overall view of how the different parts of your system pull together. Generally if you have an applet, it would probably have to communicate with a server that would fulfil requests such as user authentication. It would communicate with the server … | |
Re: lol that was funny! The [I]Timer[/I] class is definitely the way to go. And since the Timer class uses [I]ActionEvent[/I]s, the way the count down is displayed is controlled by you (that is, the [I]ActionEvent[/I] can be to simply [U]repaint()[/U] the updated time). Hmmm, and what if you wanted an … | |
Re: Interesting... I haven't actually dealt with applet windows before but there is a method [COLOR="Green"][I]setResizable()[/I][/COLOR] that belongs to the [B]Frame[/B] class. I believe this method will prevent the user from resizing the window thus disallowing the maximize option. So if you could tell me how you create the applet window … | |
Re: While there isn't a stringent specification for these files, I doubt Microsoft Excel will allow such character encodings. So I tested it out... I copied one of the characters you gave as an example and pasted in Excel - it showed. I then saved the file as CSV (Excel gave … | |
Hi guys, I'm a MSc student and my research topic involves developing a Sensor Web application that predicts the spread of wildfire in South Africa. Part of that research involves creating a wind movement simulation using computational fluid dynamics. I don't have any engineering background and have only begun exploring … | |
Re: You make use of certain classes that aren't part of the standard Java API so I'm unable to really follow the code you've given. I did notice that you create a [I]Pixel[/I] array in method [I]decryptPicture()[/I] and then you begin to populate the array depending on a Boolean evaluation. Since … | |
Re: I'm a little confused and that's probably because I'm not sure what a dynamic row is? I looked at your attachments which are quite long when opened... I noticed you're using JavaScript. Is there a problem with using Java embedded code? The way that I've been taught to retrieve data … | |
Re: Hi there, well your approach is actually one of the best ways to pass data between classes. One usually does this via the class constructor just as you have in the parking ticket class. The class that handles the parking tickets would require both objects to achieve its goal. What … | |
![]() | Re: Indeed the problem at hand it rather complex and evolutionary programming has given results much better than previously employed mathematical models. There input set space has too many dimensions making the mathematical solution too complex. The nice thing about the Evolutionary Algorithm is that the bet fit test helps prune … ![]() |
Re: lol well said Ezzaral! As per rules, member help other members with programming... we don't give out solutions > we assist in making them work. Regardless, your question is very vague, you have to be more specific. | |
Hi guys, I'm not really sure how to ask this or what to even search for. I want to write a Java program that can feed data into another program. If the other program had command line parameters then I'd know what to do, but suppose the program I want … | |
Hi there, I'm trying to connect to a PostGIS database (which is basically an enriched PostgreSQL database) and I'm having trouble with the [I]INSERT[/I] statement. Here's my code: [code=python] import psycopg2 try: conn = psycopg2.connect("dbname='postgis' user='fdi' host='localhost' password='fdi'"); print "Database connection established" except: print "Critical Error: Unable to connect to … | |
Hi guys, I'm trying to make sense of some Perl code. I haven't actually programmed in Perl before but I do image the functions/methods are similar to other languages. Here's the code: [code=perl] function [dir, wspd] = conv_wind(uwind, vwind) usize = length(uwind); vsize = length(vwind); if(usize ~= vsize) dir = … | |
Re: Hi there, just curious, why do you want to use a [I]char [/I]array and not a [I]String[/I] object? Possibly using a [I]char[/I] array would save memory or be faster, but if you used strings, then there are methods that allow you to easily search the string for any substring. In … | |
Re: I think I might have made the same mistake. The way Scanner works, is by matching patterns in some stream. When you use nextInt() it will attempt to [I]find[/I] an integer value in the input stream. If it is successful, it will move forward in the stream. If it is … | |
Re: Alex is correct: [QUOTE]You're still trying to add an object (which does NOT have any direct implementation of a LayoutManager) as a LayoutManager.[/QUOTE] There is already a [I]LayoutManager[/I] that will allow you to achieve your goal. It's called the [I]GridLayout[/I] and you should certainly check the Java Docs on that … | |
Re: Hi guys, [I]drawLine()[/I] doesn't require the points to vary. In fact [I]drawLine(10,10,10,10) [/I]would simply result in a point being drawn. It's Math.PI because all constants, as per the Java convention, are in uppercase. He isn't using degrees though so there isn't a need to convert between degrees and radians; [I]Math.sin(x)[/I] … | |
Re: I've not checked if Alex is correct, but as per your question regarding the storage of your array information. It can so easily be done by writing the entire array object to a file. The is a [I]ObjectOutputStream[/I] class and if you check out the API you'd see an example … | |
Re: I think it's because you're using the [I]start[/I] command. This command actually asks Windows to execute the command and since you're using [I][B]dir[/B][/I] this will result in Windows opening up a [I]command prompt[/I]. I advise you to simply remove the word [I]start[/I] so that you only have [inlinecode]runtime.exec("cmd /c dir");[/inlinecode]. … | |
Re: I agree with Jwenting, once you've learned how to do Object Oriented Programming, you should be okay doing any. Though Java tends to be the easiest to use (hehe and in my opinion, more logical). However, to answer your question, I would certainly think you'd be doing Java in College. … | |
Re: Interesting, well on the command line one would type [inlinecode]java -version[/inlinecode] but you want to execute code within your program to determine the runtime version. Well I think this should work: [code=java] Process java = Runtime.getRuntime().exec("cmd /C java -version"); BufferedReader in = new BufferedReader(new InputStreamReader(java.getInputStream())); String line; while ((line = … | |
Re: Oh gosh, that's a large post! First, I don't think you require [I]throws IOException[/I] in the constructor of [B]ENTITY[/B]. Second, please use the [URL="http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html"]Java convention [/URL] for identifier names, it's your friend honest :icon_mrgreen: Instead of [I]ENTITY[/I] it should be [B]Entity[/B]. At first glance, I think your error is because … | |
Re: Very interesting project. I think your first step is to test open ports and then assume the service running on that port. Windows NT for example, have alota open ports and if enough of them are open then we can safely say that we have a Windows NT box. If … | |
Re: Well the first step is to identify that indeed Apache Tomcat is up and running. If you go to [COLOR="Green"]localhost:8080[/COLOR] it should display a Tomcat page. If that doesn't work then the Tomcat service is not running. It can usually be started using the [I]/bin/startup.bat[/I] or [I]/bin/startup.sh[/I] file. What OS … | |
Re: Well you'd have to search through the [I]Vector[/I]; once you've found the code, you'd have access to the [I]Object[/I] you need to remove and thus [inlinecode]v.remove(empData);[/inlinecode] will work. The easiest way to iterate over the [I]Vector[/I] is: [code=java] for (EmpData empData: v) if (empData.code == empCode) v.removeElement(empData); [/code] Here I … | |
Re: Perhaps try the JSP forum under Web Development? I don't have that much experience with JSP but of course if you're using a text box in the form then the data would be received as a String object and the German characters would be represented in Unicode (escape sequences). Perhaps … | |
Re: 6) Let’s try an elimination process. I'm not really sure what's meant by [I]field[/I]. Most likely it refers to the attributes of a class, then most certainly option [B]A[/B] is not valid. To me there is a distinction between global and local variables. If we assume that global variables are … | |
Re: I think that you've added [inlinecode]private System.out.printIn;[/inlinecode] in attempt to fix the error you would have gotten with [inlinecode]System.out.printIn("wear some shorts and sandals");[/inlinecode] I agree with Masijade, you meant [inlinecode]println[/inlinecode]. Java would have complained that it had not found the method you where trying to use. Regardless, I think you … |
The End.