Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~54.8K People Reached
Favorite Tags

35 Posted Topics

Member Avatar for WDrago

All, For the life of me I cannot get this program to compile. The error message "error: non-static variable this cannot be referenced from a static context" occurs on lines 23 and 24. Here is the entire program: [CODE]public class ThreadTest { public static int x = 0; public class …

Member Avatar for JamesCherrill
0
28K
Member Avatar for WDrago

All, I am somewhat confused by the way modern dbms handle timestamps. It seems as though date and time can be together in one field yet still be queried as if they were in different fields. Say I wanted to do a SELECT where time is between 1AM and 2AM. …

Member Avatar for WDrago
0
127
Member Avatar for WDrago

All, I'm trying to decide if I should use an auto-increment field or GUID field in a database. Either way I get a unique number identifying the record, so I'm not sure what way is best. Any thoughts? Thanks, -Bill

Member Avatar for WDrago
0
196
Member Avatar for WDrago

All, I want to insert data into 6 tables. One of those tables has a primary key field that auto-increments (let's call it ID). The other tables use that ID number as a foriegn key. My question is, how do I know what the newly generated value of ID is …

Member Avatar for Admin ESSL UK
0
167
Member Avatar for WDrago

All, Anyone have any suggestions for completing the last line below: public/private define a variable's scope. int/char/double define a variable's type. static/non-static define a variable's ____________. I know what static variables are, I just can't think of a word or even 2 words to fill in the blank. (I'm building …

Member Avatar for deceptikon
0
171
Member Avatar for zachattack05

I'll take a shot at this, and this may be a very naive idea since I've only been using SQL Server for a short time, but I think I'd put the database behind a master application and have the clients communicate with the master app instead of directly with the …

Member Avatar for zachattack05
0
211
Member Avatar for WDrago

All, I don't understand namespaces. Yes, I read the msdn and some online tutorials and although they explain what namespaces are, they don't explain clearly what the benefit of using them is, why I need them, when I need them, and why they're generated automatically. I have 10 classes in …

Member Avatar for Ketsuekiame
0
205
Member Avatar for WDrago

All, How do I convert a DataTable double from a row object to a normal double? I'm creating the DataTable like this (note that Temp and Hum are doubles): private void readDummyData(DataTable dt) { string fileName = "dummydata.csv"; string[] lineCSV = new string[5]; StreamReader myReader = new StreamReader(fileName); // Define …

Member Avatar for WDrago
0
3K
Member Avatar for gronkite

I found the information and animations on this site quite useful: [sorting-algorithms.com](http://www.sorting-algorithms.com/) Of course, you should have a pretty good understanding of how each algorithm works before trying to figure out which one is which in your .jar file. Good luck, -Bill

Member Avatar for somjit{}
0
802
Member Avatar for WDrago

All, I wonder if anyone has an opinion on this. What's better, this: // Diagonal checks if (board[0][0] == turn) { if (board[1][1] == turn) { if (board[2][2] == turn) { System.out.println(); System.out.println(turn + " IS THE WINNER!!!"); writeBoard(); return true; } } } Or this: // Diagonal checks if …

Member Avatar for WDrago
0
189
Member Avatar for WDrago

All, If you've ever visited the L.L. Bean website or some of the furniture manufacture websites you may have seen how you can pick a color and frabic and see how it's going to look on a particlular piece of cothing or furniture. Car manufucturers do it too on their …

Member Avatar for DoRight
0
113
Member Avatar for WDrago

All, Is this adeqaute to close all resources associated with clientSocket? public void readAll(String[] s) { using (TcpClient clientSocket = new TcpClient(host, port)) { NetworkStream clientStream = clientSocket.GetStream(); StreamWriter toOmega = new StreamWriter(clientStream); StreamReader fromOmega = new StreamReader(clientStream); toOmega.Write(readTemp); toOmega.Flush(); //Command is not sent until buffer is flushed s[0] = …

Member Avatar for WDrago
0
243
Member Avatar for WDrago

All, I am using lock() to try and sync threads writing to the same file, but my threads are still stepping on one another. Can anyone tell me why this doesn't work and how to fix it? Here is some sample code. In the real program the writes are very …

Member Avatar for WDrago
0
6K
Member Avatar for WDrago

All, How do I get the `readSensor()` method to run in threads? Thread location1Thread; Thread location2Thread; Logger location1 = new Logger("187.20.150.20", 2000); Logger location2 = new Logger("187.20.150.21", 2000); // The next 2 lines lines result in the following error message: // "An object reference is required for the non-static field, …

Member Avatar for darkagn
0
213
Member Avatar for WDrago

All, I am pulling my hair out with this. I need to make a constant String avaiable to all classes in my program and I can't figure out how to do it. This is a simple console app... I've tried the obvious, `public static const myString = "whatever";` but I …

Member Avatar for WDrago
0
105
Member Avatar for WDrago

All, I'm trying to use a RichTextBox to display the revsion history of my program, and I can't figure out how to format the text (bold, italic, etc.). I'm using the String Collection Editor in the Lines Property. Anyone know how to do this, or if I should be using …

Member Avatar for tinstaafl
0
609
Member Avatar for WDrago

All, I am working on a project in C# with Visual studio 10 (on WinXP 32bit with .NET 4.0) and I need to use SQLite. I am totally confused by the SQLite installation process. [This FAQ](http://system.data.sqlite.org/index.html/doc/trunk/www/faq.wiki#q8) says that there is no need to install SQLite, but the [instructions given here](http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki) …

Member Avatar for JOSheaIV
0
334
Member Avatar for WDrago

All, I am collaborating by email on a project with 2 other programmers. We're all pretty new to Visual Studio and C#. One of us is designing and bulding all the GUI forms, I'm doing the database work, and the third guy is doing the main app code. What files …

Member Avatar for TnTinMN
0
123
Member Avatar for WDrago

All, I am working on a simple program that reads temperature, humidity, and dew point from a sensor and logs the result to a .csv file. I am using netbeans and using alt-enter to surround code with try-catch whenever netbeans suggests. The result is pretty ugly and I can't imagine …

Member Avatar for WDrago
0
1K
Member Avatar for WDrago

All, I am using Netbeans 7.2 to build a form. I added a Swing JTextArea to my form and all is well. I'd like to add a titled border to my JtextArea (or the JScrollPane in which it lives) but can't figure out how. I tried Right Click > Properties …

Member Avatar for WDrago
0
351
Member Avatar for WDrago

All, I am working on my first forms app (using NetBeans). I don't like to mix GUI code with app code, so I have my main class, GUI class and core code class nicely seperated. When the user clicks a button on the GUI form it calls a method in …

Member Avatar for WDrago
0
215
Member Avatar for WDrago

All, I usually write console apps, but now I have to do a forms app. Hopefully that will explain the sillyness of the following question: I created my project in NetBeans and NetBeans automatically generated a class with the project name, and this class has a main() method. Then I …

Member Avatar for WDrago
0
935
Member Avatar for HankReardon

I'm not sure what exactly you're looking for, but does this help? -Bill import javax.swing.JOptionPane; import java.text.DecimalFormat; import java.util.Scanner; /** * CIS-151, Input Validation Loop */ public class Checkpoint4_6 // Name the file. { public static void main(String[] args) { DecimalFormat formatter = new DecimalFormat("#0.00"); // Create decimal format object. …

Member Avatar for WDrago
0
1K
Member Avatar for WDrago

This seems like a pretty basic question, but I'm still learning Java and all the nuances of OOP. I have several classes in my program and they all need access to the same ArrayList (the one with all the data in it.) What's the best way to share that list? …

Member Avatar for WDrago
0
107
Member Avatar for WDrago

All, I can't seem to find a good example of how to work with databases in C#. I'm using sqlserver and I can do simple things like insert and retrieve data, but when I am retrieving data I have to refer to the ordinal index values of the columns (reader[0], …

Member Avatar for Pamilerin
0
168
Member Avatar for jefferson9

I use [Audacity](http://audacity.sourceforge.net/) for editing .mp3 files. You posted in the C# forum--if you're asking about how to do this in C#, I have no idea.

Member Avatar for jefferson9
0
104
Member Avatar for WDrago

Hi Folks, I just got a new 64 bit Windows 7 system and I'd like to install the 64 bit versions of Java and Netbeans. I found the 64 bit Java download here: http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html But I can't find the 64 bit Netbeans. I'm pretty sure it exists because I see …

Member Avatar for rubberman
0
187
Member Avatar for behemothdave

That's exactly what is going to happen. You forgot to update numValue inside the while loop. It's stuck at the first value that entered before the loop. Also, the while loop is going to run as long as numValue is between 10 and 50. You need a NOT (!) before …

Member Avatar for thines01
0
190
Member Avatar for WDrago

All, How do you specify a target framework version for the csc.exe c# compiler via command-line? I need to force csc.exe to compile for .NET Framework 2.0. I can target .NET 2.0 from VS, but VS is not an option in this case. I must work from the command line. …

Member Avatar for WDrago
0
3K
Member Avatar for WDrago

All, I can't seem to find anything on the web about how to connect to a LibreOffice database. I am currently using the following code to connect to a MS Access database and would like to know how to change it to work with LibreOffice. [CODE]String strConnect = "jdbc:odbc:DRIVER=Microsoft Access …

Member Avatar for WDrago
0
3K
Member Avatar for WDrago

All, This is driving me crazy. How come only the last thing I send to a textbox is displayed? In the following example I would expect 'abcdefghi' to be displayed then, 1 second later, '123456789' should be displayed. But the only thing I see is 123456789. What is going on …

Member Avatar for Unhnd_Exception
0
931
Member Avatar for WDrago

All, I am using VB.NET in VS10. After I add items to a list box I'd like it to scroll down so that the most recent items are visible. I tried this with no luck: [CODE]StatusListBox.SelectedItem = StatusListBox.Items.Count - 1[/CODE] Can anyone tell me how to make the box always …

Member Avatar for WDrago
0
212
Member Avatar for WDrago

All, I am trying to build a simple event driven program to monitor a com port until there is data and then respond. The basic serial IO is working, but I can't figure out how to make it event driven. Specifically, how do detect when there is data ready to …

0
85
Member Avatar for WDrago

Hi All, I'm doing some serial I/O in VB.NET for a project at work. I'm new to VB.NET so I'm not sure if I'm doing this correctly. I need to determine what ports are free and which ones are in use. Presently, I try to open the port and if …

Member Avatar for WDrago
0
2K
Member Avatar for WDrago

Greetings everyone, This is my first post, so I hope I don't break any rules by mistake... I am an experienced programmer trying to learn VB.NET. The problem I'm having is that it seems like strings have to be initialized differently than other types and I don't know what I'm …

Member Avatar for WDrago
0
177

The End.