43,549 Solved Topics
Remove Filter ![]() | |
Hi :) I am writing an admin application for a website I've written. It's a basic database update/insert/delete app. I started by using the website's server, but the time it took to connect to the server (since the main JTable is populated from the db, you have to wait for … | |
Hello! I have a problem with my code. I don't know how to make that the code will include a subroutine which returns a random number between the two entered numbers as a result. Do anyone know how to make it? The code is: [CODE]static void Main(string[] args) { Console.Write("Enter … Software Development | |
Hi all, I have a doubt regarding finding a loop in a linked list.I searched on internet and found 2 different ways of doing the same. But my doubt is that if a linked list has a loop, then wouldn't it be a circular linked list? If yes, then the … Software Development c linked-list | |
I am trying to replace all % with %%, because I want to write a string to a file using the fprintf_s function. Yet, I done this: [CODE]void replace(std::string& target, const std::string oldstr, const std::string newstr) { unsigned int x; while(x = target.find(oldstr), x != std::string::npos) { target.erase(x, oldstr.length()); target.insert(x, … Software Development c++ | |
Hi all, I'm currently make my final year project program at university, and have been puzzled by this problem for sometime now. The issues I am having is that when I try to update a value in a specific column of a specif row. The program has a paddy and … Software Development dataset open-source sql | |
Greetings to the community! I am trying to print a two-dimensional character array and it is printing out ASCII values instead of the actual characters. I think the solution is simple but I can't figure it out. The following is the code snippet and the function that I am using … Software Development java | |
Hello, I am quite stuck. I have my database running on a seperate machine from where I am writing my application. The connection between Visual Studio and the database seems to be fine as I can display data in various controls on the GUI. My problem arises when I try … Software Development c c# c++ database-design gui open-source sql visual-studio | |
Hello great people. I'm a beginner in programming and I'm having troubles with NetBeans. In those lines down NetBeans reports [B]expected ';'[/B]. I'm assuming that it has something to do with activating classes or jar files somewhere in NetBeans, but i can't find where nor which classes to activate. Please … Software Development java | |
I have an array with 100 elements. How can copy only 10 element to a new array? [CODE]string[] NewArray = (string[])MyArray.Clone();[/CODE] Thank you. Software Development | |
How can i extract Target Path of Existing Shortcuts on the desktop. Software Development vb.net | |
Hi I get the following errors when I changed something - I don't know what, but these occur now. Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError at sun.awt.Win32GraphicsConfig.getBounds(Native Method) at sun.awt.Win32GraphicsConfig.getBounds(Win32GraphicsConfig.java:240) at java.awt.Window.init(Window.java:368) at java.awt.Window.<init>(Window.java:407) at java.awt.Frame.<init>(Frame.java:402) at java.awt.Frame.<init>(Frame.java:367) at javax.swing.JFrame.<init>(JFrame.java:163) at ExitJoke.<init>(ExitJoke.java:22) at ExitJoke.<init>(ExitJoke.java:43) <-- Keeps repeating itself over and over … Software Development java java-swing | |
I created a console program in jcreator (java) which asks the user to enter a number in string and converts that string value into char array and then converts each char array into an integer which I also stored each as an array and then adds all the value from … Software Development java ![]() | |
Hi. I am a python newbie seeking some help in working with a file containing rows and columns. I have a file, that ideally contains an equal number of rows and columns. The first row is a tab separated header row and the first column is a label row. The … Software Development python | |
Hello expert, I had a problem in C# datagridview. I want display last month data or ?days only when form load. I know use SQL query. But the problem is at datetime and string. my idea is today date - 30 days. [CODE]private void OT_Load(object sender, EventArgs e) { ConnectionStringSettings … | |
I feel bad for asking all the questions about the STL list, and thanks to those who have been helping me learn. I have a question now about inserting again, except this time I want to insert an extra data point into a tempList. I have commented out the code … Software Development c++ ios linked-list peer-to-peer | |
I have a Tree class that holds pointers to Player objects. Here is the code: [code=c++] #pragma once #include "Player.h" class Tree { private: public: Player* root; Tree(void); ~Tree(void); void DisplayInOrder(Player* localRoot) { if (localRoot != 0) { DisplayInOrder(localRoot->leftChild); localRoot->Display(); DisplayInOrder(localRoot->rightChild); } } Player* Find(const Player* key) { Player * … Software Development c++ data-structure | |
Hi all, I am tryiing to figure out how to tokenize a string consisting of words in alphabetical order, all crammed together with no delimiters. I can't for the life of me see how this could be done without analyzing the string beforehand and hard coding a delimiter in. Example … Software Development c++ | |
Hello there. I have a working method here, called rotateRight() that takes an array and shifts all the elements to the right, except the last one that is placed at the start I have debugged the method, and the method works fine. However the changes are not being reflected in … Software Development java ![]() | |
Hello Guys, I'm trying to learn how to use the GridBagLayout manager... but when I write it like the following: [B]JPanel panel = new JPanel(new GridBagLayout());[/B], Java tells me the following: [U]cannot find symbol symbol: constructor JPanel(gridbaglayout.GridBagLayout) location: class.javax.swing.JPanel.[/U] When this didn't work, I tried type casting [B]JPanel panel = … Software Development java java-swing oracle | |
Hi, I'm trying to run a program I have coded that has the following setup: There is a tree containing "player" objects. Each "player" object has a linked list containing "weapon" objects. Each "weapon" object has a stack containing "round" objects. I need to set it up so that of … Software Development c++ linked-list | |
![]() | Hi there guys I can't seem to get the logic on how to put the total price of tickets bought in a movie reservation program. For example, a ticket price is sold for $2 and a customer reserved more than one seat, the price should add all the tickets bought … Software Development c++ ![]() |
Hello All , i urgently need to know how to store Arabic data in database , when i create a DB create database system; create table customer( name varchar(100)); i can't store the name in Arabic what can i do..? thanks alot Software Development java | |
My code [code]public class BattleSystem { public static void main (String[] args) { String choice; System.out.print("What would you like to do? "); Scanner input = new Scanner(System.in); choice = input.nextLine(); System.out.println(choice); if(choice == "1"){ createChar g = new createChar(); g.charCreateHandler(); g.charStatsHandler(); g.closeFile(); } else{ System.out.println("More choices coming soon!"); } } … Software Development java | |
I made a little python code that makes a ball bounce around the screen. Every time you left click it makes another ball. when you right click it clears the screen but you can't spawn more balls afterward... any help (python, tkinter) [CODE]from Tkinter import * import time import base_translate … | |
as always since i am not student i study for hobby from a book, i dont ask for code or tell me the answer only for advices to help me understand better things its the first steps of a moving knight in a chessboard,i had to make it move randomly … Software Development c++ | |
Hello DaniWeb! I'm trying to return an array of strings from a function but I'm not sure how to do so. I've done the prerequisite Googling and have found people on this discussion board recommending to return char** which, it is said, can then be converted back into 2d array … Software Development c | |
Hello, does anybody know a simple way to strip the leading zeros out of a string? I have tried [CODE]userName.replaceFirst("^0+(?!$)", "");[/CODE] but cant seem to make it work, any ideas? Thanks. correction, this work.. [CODE]userName = userName.replace("0", "");[/CODE] Software Development java | |
In my program when i close the save file chooser it opens another one ??? heres the code [CODE] import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.awt.*; import java.awt.event.*; import java.io.*; public class JB extends JPanel implements ActionListener{ protected JTextArea textArea; public JB() { setLayout(new BorderLayout()); JTextArea textArea = new JTextArea(); textArea.setFont(new … Software Development java java-swing | |
Hi, It is my code: [CODE]mylist = [['fiss','giss'], ['e','h'], ['d','u'], ['c','t'], ['b','o'], ['a','z']] for alist in mylist: g = ' '.join(alist) print g f = open("write.txt", "w") f.write(g) f.close()[/CODE] How will I write all the words in the txt file. it is only writing the last line of the file. … Software Development python | |
learning to use string and iterators, and i am having trouble when i try to replace a string in my vector with a new one my trouble is starting when trying to replace a string( towards end of code) i get error with line myIterator = vectorGameList.push_back("teris"); idk, how i … Software Development c++ | |
I am currently using eclipse but thinking of NetBeans because of gui. I don't want to download it yet because i dont want to have unused programs on my computer. so should i download it for gui? Software Development ide java java-netbeans | |
Hi, im fairly new to Java, learning as I go on. I have gotten to the stage that I need to read specific lines from a text file that has already been created. Lets say my text document has 30 lines, and I only want to read what is in … Software Development file-system java | |
Could somebody help me please?! I'm trying to include math.h in a simple program an it doesn't work. I got following errormessage:"fatal error C1083: Cannot open include file: 'math': No such file or directory". I've checked if math.h is in the include directorie of visualC++, and it is. Here is … Software Development c++ open-source | |
[CODE]double a,b; printf("%f",a^b);[/CODE] error occurs as shown in heading. any alternative method? Software Development c | |
i need to access the current text of a JTextField from another method but i get an error here is the code [CODE]public Calc(){ JTextField textBox1, textBox2; setLayout(new FlowLayout()); textBox1 = new JTextField(" Time "); textBox2 = new JTextField(" Exp "); JLabel lRate = new JLabel("Rate"); JButton calc = new … Software Development java | |
Hi guys (and gals) I'm pretty new to c++ and programming, but I am keen as hell I bought a boot to start learning by Bjarne Stroustrup - Programming - Principles and Practice using C++ I am up to Chapter 3 and doing the 'exercises', only I am stuck on … Software Development c++ | |
I have a problem where I need to display a seating assignment for an airplane. It will have 13 rows and 6 columns. If the seats are empty, it should display * and if the seat is taken it should show an X. There will eventually be 3 different types … Software Development c++ | |
Hello! How can I make this code (converting seconds to hours, minutes and seconds) that the program will have a [B]subroutine function[/B]? Subroutine needs to return a full-time. The code is: [CODE]class Program { static void Main(string[] args) { Console.Write("Enter the number of seconds: "); int seconds = int.Parse(Console.ReadLine()); TimeSpan … Software Development | |
Hello, I am trying to write a program that will reverse the numbers inputted by the user. It doesn't seem to be having the desired outcome and I don't know why. Here is the code I am using, [CODE] #include <iostream> #include <conio.h> #include <string> #include <sstream> using namespace std; … Software Development c++ | |
Hi Need help reading data from a file after a specific point. I need to read the data from this file into a richtextbox after the [HRData] header. This is the contents of the file I'm reading from. [CODE][Params] Version=106 Monitor=34 SMode=111111100 Date=20100926 StartTime=08:45:59.0 Length=00:33:36.6 Interval=1 Upper1=0 Lower1=0 Upper2=0 Lower2=0 … Software Development file-system | |
This is the function in question... What happens is the user opens notepad, if notepad is open then they are required to type a password.. If its invalid, notepad is closed.. if the password is valid, it continues.. else if the user hasn't entered a password within 10 seconds, timeout.. … Software Development c++ | |
I tried to make a simple program, draw a 4 sided polygon with 4 mouse clicks. This is the code: [CODE]import acm.graphics.*; import acm.program.*; import java.awt.event.*; public class Pravougaonik extends GraphicsProgram { public void run() { addMouseListeners(); } public void mouseClicked(MouseEvent e) { GPolygon cetvorougao = new GPolygon(); cetvorougao.addVertex(e.getX(),e.getY()); cetvorougao.addVertex(e.getX(),e.getY()); … Software Development java | |
How can I change the image on the picture box when the mouse is over the picture box I know how to end the application when the mouse is over the picture box but what is the code for changing the picture C++ (I need to use mouse enter class) … | |
Hello all, So I am having trouble figuring out a runtime error I am getting in my code. Essentially I read in data and push it into two lists (using the STL list). Then I use the .sort() function to sort the data by average. However I am having a … Software Development c++ ios linked-list open-source | |
Hi, Was wondering if anybody could give me his/her opinion about what i am doing. This program i am writing is basically a way to record orders. So i got a bunch of possible components required, which got their textfield(1 for product info, 1 for product price). Those are controlled … Software Development vb.net | |
Dear Sir/Madam, I have two types of procedure for one/same result. No. 1 procedure is very long without loop and no. 2 procedure is sort with many loops. So I want to check those procedure, which one is taking less time than another. Please guide me. Software Development visual-basic | |
i allocate memory for b_edge in function bark_edge and give value to only b_edge[1][1] and try to return b_edge from function. segmentation fault comes? can you please check why? [CODE]//function bark_edge+main program #include<stdio.h> #include<math.h> #include<stdlib.h> double **bark_edge(); main() { double **b_edge; b_edge=bark_edge(); printf("%f",b_edge[1][1]); } //FUNCTION-bark_edge double **bark_edge() { int i=0; … Software Development c | |
segmentation fault comes in the program? please help? is there any way i can check in which part of the program is the mistake? Thanks daniweb and members... [ICODE] //function bark_edge+main program #include<stdio.h> #include<math.h> #include<stdlib.h> double **bark_edge(int f_size,int samp_freq); double **transpose(double **x,int M,int N); main() { int f_size=1024; float samp_freq=44100,fcmax=samp_freq/2; … Software Development c | |
I need some help with checking a process or if a certain window name is open on my project. Right now what I have is: FSXCheck = Timer fsx.exe = Flight Simulator X [CODE]Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load FSXCheck.Enabled = True End Sub … Software Development vb.net |
The End.