64,152 Solved Topics
Remove Filter ![]() | |
Hey! My problem is that I can't modify the "File name" label / text field programatically where you write the file name of your file in the JFileChooser. If I want to have "Write your file" written in the file name (by default) field how would I manage to do … | |
I need some help about how to connect MS Access database in NetBeans.I visited [url]www.netbeans.org[/url] but didnt got much help related to MS Access. What I did is I start from Net Beans Desktop Application ....But when i select the option of database in it ....It asks Database URL....I have … | |
Hey, I just started learning Python yesterday and I got to the end of a chapter on Branching and While Loops...which lead me to a "challenge"...basically it gives me the description of a program and I have to write it. This program flips a coin 100 times and then gives … | |
I was wondering do all programs have a unnamed thread by default? For example, if i have a very basic program, can i put Thread.sleep(int) anywhere in it and it will make the program sleep for a set amount of time? | |
Well, I don't know if this is what you would call an anonymous function, or "Lambda" function I guess, I haven't really gotten that far into languages that use them yet... but, I am writing a function that is rather long. And I want to just get through it, and … | |
Greeting all, Peace. I had this error [QUOTE] error C2059: syntax error : ')' [/QUOTE] in VS with c++ code, and searched the web and forums for a solution but could not find one. Finally I simply typed in the bracket ")" in the "find key" to search for all … | |
Hi folks, Just hoping someone can show me where I'm going wrong here. I've been given a tutorial question to count the number of times a particular character (char) appears in a string. The only catch is that you need to use a for loop, as the online checker won't … | |
[CODE]//Tic-Tac-Toe #include <iostream> #include <iomanip> using namespace std; const char COL = 3, ROW = 3; typedef int tttb[ROW][COL]; //tttb tic-tac-toe board bool winner(tttb, int,bool); //funtion name winner bool move(bool); int main() { bool isWinner; isWinner = false; cout<<"isWinner= "<<isWinner<<endl; isWinner = move(isWinner); cout<<"isWinner= "<<isWinner<<endl; if (isWinner = true) { … | |
i m making a hotel database management system and i have to add records, update and delete them.i m having problem in getting the input,how will i use double pointers?? and i have to get a certain number of records from the user. here is my code: [CODE] void addcustomer() … | |
Ok, apparently my destructor isn't done yet and I'm not sure how to handle this. I have an n-ary tree that contains nodes that are built of data and a vector of pointers. Each pointer was initialized with new, so I need to delete them obviously. One friend said I … | |
I am trying to figure out how to read a multi line txt file with a data like ranking, athlete name and Athletic sports name with two different year records like 2007 and 2008 like 1. JOHN CARTER in Sprint Race 19. JOHN CARTER in Sprint Race I am trying … | |
Hi, I'm trying to count files in a desired directory using MFC... I tried the following code: [code] int CountFiles(const std::string &refcstrRootDirectory, const std::string &refcstrExtension, bool bSubdirectories = true) { int iCount = 0; std::string strFilePath; // Filepath std::string strPattern; // Pattern //std::string strExtension; // Extension HANDLE hFile; // Handle … | |
can someone tell me whats wrong with this codes, because there's some error in printing.. [CODE]#include<stdio.h> #include<iostream.h> struct bday{ char month[2]; char date[2]; char year[4]; }; struct contacts{ char surname[10]; char phoneno[12]; }; void main(void) { struct contacts con[2]; struct bday bd[2]; int i; for(i=0;i<=2;i++) { cout<<"\nSurname : "; cin>>con[i].surname; … | |
Hello everybody My problem is that I'm quite new in oracle admin/dev so I need some help pointing me how to limit the number of days of data stored in a table. I have some datasources that come in files periodically. I'd like to limit the days stored for each … | |
Hello, I have this snippet of code to echo out the "mailer_id" with the largest value - [CODE]<?php $result = mysql_query('SELECT MAX(mailer_id) FROM mailer_directory')or exit(mysql_error()); echo 'the max mailer_id is ' . mysql_result($result, 0); ?>[/CODE] My question is how do I echo out the corresponding email value for that field … | |
I have a stored procedure which returns a parameter @quotenum when run in sql but I'm having trouble getting a return value in my C# form. I'm trying to get the message box to show the @quoteno parameter but im failing misserably. The connection is working an the parameter @estnum … | |
hey guys, I built an array of objects but I don`t know how to access it`s methods or fields.It keeps sending me errors How should I access them? | |
Hey I got some quetions [b]Question 1:[/b] I have a image that is in a picturebox which is called pictureBox1 I want to read monstersetbase.txt and add small ellipses to my image. The position of the ellipse comes from my monstersetbase.txt. The image is 256x256 and the coordinates is example … | |
Dear Friends, I am working on a project where i have a JSP page(ex1.jsp) and in that JSP page i have 2 frames((ex2.jsp on top) and (ex3.jsp in bottom))...When ex1.jsp is called..it has to load ex2.jsp frame and ex3.jsp by passing some paramenters to it.. Please see the code.. [code] … | |
I've tried everything, and I just can't get my program to compile in visual basic. Someone tell me what I'm doing wrong? see attached image, are the includes in the wrong spot or WAT!??!?! | |
Hello Experts, I am fairly new to MS SQL Server 2005. I am trying to create a table where a column has the restriction of allowing alphas only. I know how to achieve this in Oracle using String functions. But am not able to do so in MSSql. The replace() … | |
Hi, I want to display a java script confirmation box before browser session is timeout with message as "Your session is going to timeout in 2 mins. Do you want to extend session?", if user is clicked on "Ok" button within the session timeout period, session should be extend. If … | |
I created a dataset in the Dataset Designer by draging a database table into it, then I added a new select SQL query to the DataTable. Check the pics I think it helps explain it better. [URL="http://i43.tinypic.com/2qs7707.jpg""]http://i43.tinypic.com/2qs7707.jpg"[/URL] Now the problem comes when I try to use an ObjectDataSource, it sees … | |
I have a .htaccess file which forwards non www request to www [code] Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mysite.com [NC] RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301] [/code] However, I have a problem if i were to put into the url mysite.com/test.php it will not forward to the www site. Any help … | |
I have created and tested a stored procedure that works in sql. This stored procedure has one parameter that it requires to run "quoteno" . I already have the database attached to the form. Can anyone help me with the code for this. The name of my stored procedure is … | |
I'm dealing with a map of vectors, and I'm making sure I clean up all the memory used. So, what exactly is the best way to handle this? One person said to use clear() on each vector in the map and then use clear() on the map, but I don't … | |
i m having so many problems,i m trying to make an hotel database management program in win32 console and i m not allowed to use structures,only variables or pointer or Dynmaic arryas. i m using 2d dynamic array,i have to pass it to a function to store values in it,i … | |
I had forgotten about calloc for the longest time, but I was recently reminded of it. Now i'm curious, what would be the difference between [ICODE]malloc(numElems * elemSize);[/ICODE] and [ICODE]calloc(numElems, elemSize);[/ICODE]? If my knowledge of arrays is correct, there shouldn't be any difference in the memory allocated. | |
Well, today I had my C++ viva at my school..and I screwed it up!! The answers to this question which I was asked may be easy but I couldn't get it..Few questions of which I haven't got the answers yet-- 1. [CODE]class A { public: int a; int b; };[/CODE] … | |
Hi everyone! I really love this forum, it's by far the best coding forum I've been to. I have been attempting form validation and login security for about a month now, and I made the mistake of using all JavaScript for validation (though my site requires JavaScript...sooo I could always … | |
Quick question (hopefully). I have a vector of strings and need to remove duplicates. Normally, I'd just use sort, erase and unique. However, I don't want to sort the data. My idea was to copy the vector to a set, then back to a vector. But every attempt just screws … | |
i set my forms FormBorderStyle to None in vb.net i want to assign a border line in different colour which is not inside the form. how can i do it | |
Hey all! Pretty simple I hope :D I have a website that absolutely requires JavaScript to be enabled for it to work. How can I make it so that if a user with JavaScript disabled tries to view my site they are redirected to an error message? Thanks! | |
Add an interface, SizeComparable, that includes only the boolean isBiggerThan( Shape other) method. In your ShapeSet class, provide a method void sort(), that sorts the shapes of the shape set by class Shape implementing the SizeComparable interface. This is the problem I wrote codes but it gives run-time error.Could you … | |
Hi Guys, I'm having a problem with the below code. It's probably a simple mistake as I'm relatively new to PHP, and even newer to socket programming. The background is that I'm developing a socket server for a multiplayer game. Here is the relevant code: [CODE]class PlayerList { var $plist … | |
Heya, Just trying to get a little help on some excercises I need to do, Done 14/15 fine, but stuck on 15th and not sure quite whats wrong. Need to do a systemcall from C program to copy a file, using stat, open, read write and close. So far I've … | |
cant display the correct value of the structured values with function ... is it got to do wif some buffer stuff ??? [code] #include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; const int MAXCHARS = 15; const int NUMEMPS = 1; int i; struct EmpRec { long num; char … | |
If I use the uncommented 3 lines for getting an int out of a stringstream, the value in MPV is wrong. However, if I make a new stringstream, then it works fine. I thought setting .str("") was essentially resetting the stringstream? [code] line = ""; getline(fin, line); //get fourth line … | |
Hi everyone, Im making a game that requires a login. Ive got stuck on a problem; When a user tries to log in, it wont accept it, its in the database, the script checks the database, but it still says no Here is my login check: [code=php]<? session_start(); header("Cache-control: private"); … | |
When checking my code with PC-LINT it advised me to make some member-functions const What is the advantage of doing this ? | |
Hi, I am facing a problem with allocation of two dimensional char array. The problem statement requires me to get the number of rows and columns of the array from a file. I have saved the rows in "rows" and columns in "columns", both of type int. Here is how … | |
Hi ... i need to inserting around 20 values...which method is best in ajax post or get..i dont know abt ajax..plz send me ajax registration or small form (which having inserting records into db) ...i can learn by using this.... Thank u.. | |
I have a delete button which does this: [code] TTDataSet.PunchEventTable.Rows(dgvData.SelectedRows(0).Index).Delete() [/code] The problem is that if I delete row 0 (the 0th index in the DataGridView and in the underlying table, all is well. But now row 1 in the table corresponds to row 0 in the DataGridView, so if … | |
Hallo guys, it is me again. I need help how to create a simple backup file by just copying a file to another folder. Look at my code. [ICODE]Private Sub mnuBackup_Click() Dim SourceFile, DestinationFile As String On Error GoTo FileCopyFailed SourceFile = "D:\MyWorks\data\facility.mdb" DestinationFile = "D:\MyWorks\backup\facility.mdb" [COLOR="Red"]FileCopy SourceFile, DestinationFile[/COLOR] MsgBox … | |
Hi, Have adapted some code I found on the net to get a rss feed from a news site. I would like to email the output of this script using smtplib - after a couple of frustrating hours I have got that working as a separate element with my gmail … | |
Hi all, i made some java few time ago and i'm now studying C++ here is a simple program i've been working on to learn about it but the fact is for some days now i can't figure why it doesn't work... in fact i just want to create an … | |
[CODE=cplusplus] bool BODYTYPE::Seek(BODYTYPE * body) { string line; string key(body->style); size_t found = ' '; fstream file("..\\Data\\BODYTYPE.txt",ios::in); if (!file.is_open()) { cout << "Unable to open file \n"; return false; } file.clear(); file.seekg(0); for(;getline(file,line);) { if((found = line.find(key,0)) == 0 ) { file >> body->style >> body->doorCount; return true; } } … | |
Hi Guys, I'm new to PHP and need help with passing variables from my form to multiple pages. I have global registers turned to off. I am able to retrieve my form inputs on the second page.. however unable to retrieve the same on the other pages after. for example … | |
it is possible? if the user in the running time, click the close button or the X button that we can see in the top of the form and then if the user click the close or X button message box will appear "you cannot log out"? how can i … | |
hi my page contains a button with a javascript click event. when i click the button i want to check if the page is valid, and if the answer is yes, to perform the event function. if the page is not valid i want the error message to show in … |
The End.