43,549 Solved Topics
Remove Filter ![]() | |
I developed a method to query a database and return the specific values that I'm looking for except that the value being returned is the last value. In my while loop I can do a system.out.println(answers)and I can see all of the values, my return answers only returns the last … Software Development java | |
I know this makes no sense at all, but hear me out and maybe someone can supply me with some info on how this can be accomplished correctly. Using an invoicing type example. You have a table of clients who can receive invoices, a table of invoices with invoice numbers … Software Development sql | |
[CODE]void printer(char x) { int d, b, z; for(z=x; z>=1; z--) { for(b=z; b<=x-1; b++) printf(" "); for(d=z; d>=1; d--) printf("%d ", d); printf("\n"); } }[/CODE] that's my code which is supposed to print 4 3 2 1 4 3 2 4 3 4 when input is 4. however, it … | |
Java - How to use system clipboard to copy and paste objects(JLabel or JButton) in a JFrame | |
Hello everyone, I have a question regarding a Japplet that I am creating for a theatre. The program is supposed to take a yes or no response from the user, take which section the user will be sitting in, ask how many tickets they would like to purchase, and then … Software Development java java-swing | |
I was reading a book and i faced an issue here [CODE]39 template< typename NODETYPE > 40 void Tree< NODETYPE >::insertNode( const NODETYPE &value ) 41 { 42 insertNodeHelper( &rootPtr, value ); 43 } // end function insertNode 44 45 // utility function called by insertNode; receives a pointer 46 … Software Development c++ | |
hello I'm writing a program using winsock..whenever i try to send some data from the client i get the following error "Run-time error '40006' Wrong protocol or connection state for the requesting transaction or request" please help me in finding what's going wrong...my client code is given below [CODE]Private Sub … Software Development visual-basic | |
I'm having problems with my code regarding the value of the string I get with the JTextfield.getText() method my code goes this way: [CODE](keypressedevent evt){ int id=evt.getId(); char c = evt.getKeyChar; String s = JTextField.getText()+c; System.out.print(s); } [/CODE] if the textfield contains for example: apple and you type s, it … | |
Hy , i read all the other posts about this error but didn`t helped me , tried google but notheing. I have the following method : [CODE] private void jButton1MouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: DefaultTableModel model = (DefaultTableModel)jTable2.getModel(); int nrrows = jTable2.getSelectedRowCount(); int[] rows = … Software Development java java-swing | |
Hi there. Using VB5 I am a real novice to VB but slowly getting the grasp of thing but at the moment writing things out long hand (thinking there must be short cuts) Like filling a VB form with MSACCESS data I am detailing every field e.g. [CODE]txtCompGST.Text = tldt.Rows(rowpos)("CompGST").ToString() … Software Development visual-basic | |
I want two function names that do the same thing, allowing the user to use whichever they prefer. For Vec a, i use "const" because a is never changed. Correct me if this is the wrong usage. For int n in operator|, i do NOT use "const" because n is … Software Development c++ | |
Hi i am just new to VB.NET and our teacher told us to experiment on for loop in a ODD SUM Program you need to add all odd numbers from Input One to Input Two like that but i can't stop it from adding continuously for example i input the … Software Development mathematics programming-construct vb.net | |
I am trying to use CString's LoadString function but it never retrieves the text from the string table. I ported the application from Visual Studio 6 to visual studio 2003. I looked all over the web but nothing is working. Somebody help me! And if you could be very specific. … Software Development c++ visual-studio | |
Hi guys, my keyboard has not [B]Break[/B] key, so i cant braek a test run with the conventional [B]Ctrl + Break[/B]. Is there any other way to break a test run? Thanks in advance. Software Development visual-basic | |
I was advised that I should not import the std namespace in a header. Also, I should create my own namespace for my library (a header file I created with function in it). Why is it a bad idea to use the std namespace for my new functions? If all … Software Development c++ | |
Whenever I command my datareport to show, my computer halts. Their are other four report that work well. Then there is the only one that is pulling on my legs. Can any one tell me what the problem might be? Software Development visual-basic | |
I have a piece of code that takes two strings, puts them together, then attempts to save that result into a table in a database. For some reason, the database is only showing the second half of the string ([ICODE]Me.txtRev.text[/ICODE] in this case). When in debug, I can see that … Software Development open-source sql vb.net | |
I'm trying to format a DataGridView, with style color, etc. The DGV loads (via buildGrid method) at the startup of the form, as you can see in the constructor's code: [CODE]public Report1(DataSet dsReport1, string sDateRep) { InitializeComponent(); sDate = sDateRep; dsReportGrid = dsReport1; orgDataset(); buildGrid(); } [/CODE] Here's the code … | |
I have started dabbling in Objective-C for iOS developing. Is using the C forum of this website appropriate for questions regarding Objective-C? If not, what would the correct forum be? Thanks! Software Development apple ios objective-c | |
hi guys, i'm trying to write a program in C# to read a SRF04, through a USB I2C connnector. this is my first time working wiht I2C and usb and i need some help. [URL="http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm"]http://http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm[/URL] im using the I/O settings to write to the Sonar. Can someone provide me wiht … Software Development | |
Hi everyone I've been having a small problem. on learning process of vb.net and sql server 2005 I hit a wall I want to know how can I filter the items on my datagrid which is displaying the data from my SQL server database, through a textebox text. sorry the … | |
There is an error concerning lines 10-14. I had been using this code previously without errors. I'm not sure what I may have changed. The error is "invertMatrix.cpp:14: error: invalid use of incomplete type ‘struct std::stringstream’ /usr/include/c++/4.2.1/iosfwd:83: error: declaration of ‘struct std::stringstream’ " [CODE]#include <iostream> #include <vector> #include <cmath> using … Software Development c++ | |
Hi there, I'm trying to teach a few students how to create a text adventure game. In the past, I've generally gone about the route of using nested if-statements because it seems a bit easier to visualize. Here's what one has done in the past, and ignore the crazy code-formatting … Software Development c++ | |
I want to iterate through a list of objects, then erase all objects from the list which meet a certain criteria. Here is an example using int type as my object: [CODE] list<int> m_list; // Fill list with int values... // Find ints == 4 and erase them auto it … Software Development c++ | |
WHY WHEN I EXECUTE THE BELOW CODE I GETS AN EXCEPTION [B]java.sql.SQLException: No ResultSet was produced[/B].........BUT EVEN THOUGH INSERTION OPERATION WORKS FINE........CAN ANYONE TELL ME WHY THIS EXCEPTION COMES [CODE=java] Connection co; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); co = DriverManager.getConnection("jdbc:odbc:hh"); Statement st1; ResultSet result; st1 = co.createStatement(); result=st1.executeQuery("select count(*) from rooms"); result.next(); … | |
Hello, i was wondering how you would create a file association in c++ with the registry, in lua it would be something like this... [CODE] function File.SetAssociation(Ext, Exe, Icon, Long) local cKey = Long; Registry.SetValue(HKEY_CLASSES_ROOT, Ext, "", Key); Registry.SetValue(HKEY_CLASSES_ROOT, Key, "", Long); Registry.SetValue(HKEY_CLASSES_ROOT, Key.."\\DefaultIcon","",Icon..",0"); Registry.SetValue(HKEY_CLASSES_ROOT, Key.."\\shell\\open\\command", "", "\""..Exe.."\" \"%1\""); end … Software Development c++ | |
this is code which opens new window link in same programe [CODE] Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow ' This will be triggered only when link tries to open in new window. ' That means active element in web document will always be a … Software Development vb.net web-browser | |
Hey there, seems like this part of DaniWeb is not as active as other parts, but in hope I get an answer, I'm asking. I have this xml file: [CODE] <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="site.xsl"?> <navigation> <link> <name>About</name> <content></content> <target>www.google.com</target> </link> <link> <name>Friends</name> <content></content> <target>www.google.com</target> </link> <link> <name>Archive</name> <content></content> … Software Development xml | |
I am writing a prg which take a value from user and check weather its present in table or not.... [code] table.getValueAt(i,j).toString().toLowerCase() == searchfield.getText().toLowerCase(); [/code] Well if yes then make that cell red... What to write to make cell red? Software Development java | |
Hello, I have been tasked with writing a test application to convert between geographic coordinate systems. Now math is not my strong suit but I was assured I wouldn't actually have to do any of the calculations since the formulas are provided. The trouble is trying to get the lengthy … Software Development c++ | |
hello, I have this question to ask from you... when passing a object to a method is it pass by reference or pass by value ? I'm talking about calling another class's method... Software Development java | |
Hi, Dear Friends i m developing a Inventory System, and i want to show a progress bar until the data loaded from the database and displayed on the screen, so for that time a progress bar should be displayed and show the progress of retrieving of data from database, and … Software Development c# | |
Hi I want to know what's the problem with my code. I'm just a beginner. I'm trying to display the smallest number, but everytime I run the program, the output is always equal to zero. However if I use this code to find the largest number, wherein the boolean condition … Software Development java java-swing | |
hello friends, i've 2 forms 1) Home1 and 2)NewAccountForm in Home1 when a button clicked i perform NewAccountForm newAcc= new NewAccountForm (); newAcc.setVisible(true); this.setVisible(false); i.e. make invisible current(Home1) form and visible NewAccountForm , no problem here. [COLOR="Red"]BUT[/COLOR] in NewAccountForm after a button clicked when i try to make invisible current(NewAccountForm)form … Software Development java | |
I have a long stream of numbers that I need to be able to input all at once (basically copy and paste) into an array somehow. I need to do this so I can make every pair of those numbers to correspond to a letter. For example, I need to … Software Development c++ | |
I am trying to change assign the pointer "c" to the pointer "a" below using the function "change()", but I am doing something incorrectly, not exactly sure. The direct assignment within the main() function works (ie a = c), but does not work using the change function. [CODE] void change(float … Software Development c++ | |
Hi all, Quick question, Is there a way to store a GregorianCalendar object in a hard-coded array? Such as you do an int or String ? Or do I have to send 3 ints for dd/mm/yyyy and then create a new GregorianCalendar object in the Constructor? If this is the … Software Development java | |
I was at msdn looking at some coding and saw [CODE] public delegate void EventHandler1(int i); public delegate void EventHandler2(string s); public class PropertyEventsSample { private System.Collections.Generic.Dictionary<string, System.Delegate> eventTable; public PropertyEventsSample() { eventTable = new System.Collections.Generic.Dictionary<string, System.Delegate>(); eventTable.Add("Event1", null); eventTable.Add("Event2", null); } public event EventHandler1 Event1 { add { lock … Software Development | |
HI ALL! Let me start by letting you know that I'm still new to VB. All I know about Programing is with the use of google, Videos, and some good help from DaniWeb. I'm doing a program which searches datagrid colums with some classes That I have wrote. I have … Software Development vb.net | |
I am building a library of matrix and vector operations. As my library has grown bigger, I have found that there are MANY by element operations which I need to program. For example, if the user wants to multiply each element in the matrix by 2, or if the user … Software Development c++ | |
Hi guys, What i need is a way to [B]check the available USB ports in windows[/B] using python. The purpose: I'm trying to run on startUp a script that wait to plug in my Token, and after that the script will log me in automatically into the system that I'm … Software Development pc-peripheral python windows-api windows-xp | |
In C# if you want the thread to pause you would use: [CODE]System.Threading.Thread.Sleep(300);[/CODE] However, I cannot seem to find a C++ equivalent to this? How would I do this, or is it just not possible? Any help is appreciated. | |
i run a ATM project and here is my problem i got a winforms login with 2 textboxes (username & nip) i got a textfile defining different username and their nip: Korben Dallas,D001 Jerry Cann,C001 Eric Clapton,C002 so here is my code [code] private void button2_Click(object sender, EventArgs e) { … Software Development | |
In order to learn some basics about sockets I'm trying to program a simple IRC client. In order to receive server messages I have a thread that is receiving from the socket. When sending commands to the server a new thread is created, with the same socket. This doesn't seem … Software Development client-server python | |
Hello people :) I need some help. How can I get Webbrowser1 to navigate to each page and wait for the one page to completely load, then move to the next page...? Thank you for answers in advance! ;) Example. [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) … Software Development vb.net web-browser | |
Does a thread gives up monitor lock when Thread.sleep() is called? Software Development java | |
Hi Guys need your help on this :( Basically I am developing a web crawler so once the html source is converted to plaintext in a textbox, i intent to save it in dB. But the dB seems to be having trouble excepting some characters into the table and throwing … Software Development html-css open-source sql vb.net | |
Hello, am a newbie in c#.. i have a question, how do you use read data from file and use it? my data file is something like this: Name amount1 amount2 [CODE]johen 1234 231411[/CODE] i have this code so far: [CODE]using System; using System.Data; using System.IO; class Class1 { static … | |
Please tell me what r interfaces ..... I tried to understand them myself but could not !!!??? Please help ! Software Development | |
I'm trying to populate our database using some curl command like curl --user username:password [url]https://somewebsite.com[/url] curl - d "name=New User Name&address=New User Address" [url]https://somewebsite.com/api/add/new[/url] The instructions that they gave to me uses curl but I want to do it in Java so I decided to use HttpClient here's my code … |
The End.