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.0K People Reached
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
125
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
191
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
166
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
164
Member Avatar for zachattack05

So I've been thinking about SQL security lately and wanted to see what others are doing. I have been using integrated security (window's authentication), stored procecedures when necessary and have done my best to limit access to tables and those stored procedures with SQL server in conjunction with my application. …

Member Avatar for zachattack05
0
205
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
199
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 have a homework task where I need to determine which sorting algorithms are implemented in a .jar file provided by my teacher. Obviously I need to design my own tests to do this, so I was doing a bit of research on best/worst case scenarios but what I found …

Member Avatar for somjit{}
0
768
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
184
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
111
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
235
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
208
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
100
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
605
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
229
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
118
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
309
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
213
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
925
Member Avatar for HankReardon

How do you write an input validation loop that compares strings? My attempt at the code is included. Thank You, Hank Question 4.6. Write an input validation loop that asks the user to enter “Yes” or “No”. import javax.swing.JOptionPane; import java.text.DecimalFormat; import java.util.Scanner; /** CIS-151, Input Validation Loop */ public …

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
102
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
165
Member Avatar for jefferson9

Say i have a complete mp3 file with 10 seconds of silence at the end of the track. How can i chop off the X seconds from the end?

Member Avatar for jefferson9
0
95
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
184
Member Avatar for behemothdave

Okay I have created a validation loop which addresses the user entering a number between 10 and 50, as long as it is within these parameters it is supposed to ask for another number. When it is out of these parameters the program should let the user know it is …

Member Avatar for thines01
0
184
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