199,114 Archived Topics
Remove Filter ![]() | |
ok.. so im trying to make a function to find a par of cards with the same suit value for a game of 5 card poker. Here is what i have so far: my main: [CODE] int main (void) { /* initialize suit array */ const char *suit[4] = {"Hearts", … | |
Hey if I have a value that was p=3 in a for loop, and after a few loops it gets changed to p=6 is there anyway to say "go back to previous value"? | |
I am creating a Delphi program that needs to extract data from our database and create an Excel report. I would prefer to use the Delphi components TExcelApplication, TExcelWorkbook and TExcelWorksheet, but I haven't been able to get them to work. Most of the examples I have found are fairly … | |
I am trying to write a code which will combine these values and format it in the following format to be used as control/validation ID. I have written a line of code that will merge these values together into a long string but I can't get the zeros to fill … | |
I´m trying to develop an avl tree in C++, but I have problems with my rotation algorithm. I have try ALL the algorithms I could find on the web, but none of they works and I can´t see where is the problem. Here is my structure: [CODE] typedef struct node{ … | |
Hi All; I have a MySql database set up called users. The only things required to register to my website are a username and password. When this is completed, the database populates with the users info as requested. How does MySql make this new users permissions to have it where … | |
So I have a "base" class called "SortData". When I try to allow my other header file "InsertionSort.h" inherit this base class, I keep getting a class type redefinition error. What am I doing wrong? Here's the base class header: [CODE] // SortData.h #include <iostream> using namespace std; class SortData … | |
Create a program that is a Point of Sales (POS) system for a restaurant. Your POS system should allow unlimited orders from any number of guest. Each guest should be able to order a drink, an appetizer, an entree, and a dessert. The program should present a total. In addition, … | |
main.c [CODE]#include "stack.h" #include "stack_interface.h" #include "lex.h" #include <stdio.h> #include <stdlib.h> #define PUSH(s,c) if(push_char(s,c) == ERROR){ printf("Fatal error in pushing symbol on stack.\n") ; exit(1) ; } #define POP(s,c) if(pop_char(s,c) == ERROR){ printf("Fatal error in poping symbol off stack.\n") ; exit(1) ; } #define TOP(s,c) if(top_char(s,c) == ERROR){ printf("Fatal error … | |
I have a directory with a bunch of stuff in it. when you say rm -r "the directory" you have to say yes,yes,yes,......20 times. Is there a script for just having the answer to all "are you sure you want to delete ...?" be yes? any scripting help, im new. | |
Hi all, I am having trouble with a prepared statement in my Java Servlet's data manager where it inserts a member into the database. I believe the syntax is correct, but I always seem to get the error: [CODE]SQLException: You have an error in your SQL syntax; check the manual … | |
Hi, I have this code that adjusts the position of the subjects and the pages in my site. This is working where the value of the radio button = 1 (which is = showing, in the database - And 0 = Not showing) And I am talking about pages for … | |
hi, i'm using crystal report and my question is how to create a crystal report which displays fields from 2 tables. i tried this code but nothing displays in the report [CODE] SqlCeConnection con = new SqlCeConnection(); con.ConnectionString = @" Data source= |DataDirectory|\Database1.sdf"; con.Open(); Database1DataSet ds = new Database1DataSet(); SqlCeParameter … | |
ok so im making a windows forms application in microsoft visual C# 2010. this is how i got it to change form: [CODE]page_2 page2 = new page_2(); page2.Visible = true; this.Visible = false; page2.SetDesktopLocation(50, 50);[/CODE] the form its on is page_1 and its going to page_2. this works fine, the … | |
Hi, I have added a SaveFileDialog to my project, to enable users to choose where they would like to save a txt file. I am using the Filter property to enable saving the file as a txt document, but when I run the project and the SaveFileDialog appears, the 'save … | |
I'm not sure if this is the place for this post but I didn't really know what it fell under so I apologize in advance if this belongs in another forum. I'm looking at creating a new online app for myself and others to store certain types of data. I'd … | |
hello, I'm almost done it, but I'm lost in the huge forest of c++... so, here's my code: [CODE]#include <iostream> #include <fstream> #include <time.h> #include <stdio.h> using namespace std; int gettime() { time_t rawtime; struct tm * timeinfo; time ( &rawtime ); timeinfo = localtime ( &rawtime ); } int … | |
Hello! I have what I think is semi-easy. I just can't figure it out. [CODE] <html> <body> <div id="container"> //scan in barcode here <div id="repairID"> <table> <tr> <td> Scan ID: </td> <td> <form method="post" name="editRepairForm" action="https://example.com/IDEdit.do" target="frame1"> <input name="scanId" id="scanId" value="" /> <input name="fromLaunchScreen" id="fromLaunchScreen" type="hidden"/> <input type="submit" id="SubmitForEdit" style="display:none;"/> … | |
hi guys! im noob in php. Could you please help me in uploading then reading text file in php? Heres the example format in text file: 201005040939040105-646A Then this must be posted to a table(<table></table>). Example: | 20100504 | 0939 | 040105-646 | A | separated by 5 columns. First … | |
I have a nested class declared as: [CODE]class A { class B { // members }; // members }; [/CODE] Is there a good way to avoid typing A::B every time I need to access B's members? I'd just like to do this in one .cpp file. I tried "using … | |
Hey guys, I have simple menu item that opens a form upon click. The problem is menu item opens a new instance of the same form every time I click on it. I want it so when the form assigned to the menu item is open then the code will … | |
[B]In main.cpp[/B] [CODE]#include <iostream> #include "init.h" using namespace std; Initialization Init; int main() { Init.test(); return 0; } [/CODE] [B]In init.cpp[/B] [CODE]#include <iostream> using namespace std; class Initialization { public: void test() { for(int i=0; i<10; i++) { cout<<i; } } };[/CODE] [B]In init.h[/B] [CODE]#ifndef INIT_H_ #define INIT_H_ class Initialization … | |
anyone here who've already encountered this error?? Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\new\orderprocess.php on line 25 | |
I'm having another crack at python - and I am enjoying the clean simple syntax - but one thing I couldn't work out was how to read a line from a file until a '\t' character. How could I do this? It is a phone-book program and the data is … | |
Hello I'm currently having a few problems with trying to read some data into an array and then workout the averages of all the data. I can read in all the data into an array line by line, the problem is I need to work out the averages of the … | |
I have my code on how to encrypt my app but i want my app to have be fixed encrypted app. For security purposes. Below is my code. [CODE]try { Configuration config = ConfigurationManager.OpenExeConfiguration(exeConfigName); ConnectionStringsSection section = config.GetSection("connectionStrings") as ConnectionStringsSection; section.SectionInformation.ProtectSection("DataProtectionCOnfigurationProvider"); config.Save(); Console.WriteLine("Protected = {0}", section.SectionInformation.IsProtected); } catch (Exception ex) … | |
Hi, I've confusion with static member variable in c++ class. Please have a look on following code. class test { public: static int i; float j; }; int test::i = 0; int main() { test *t = new test; test::i = 100; cout << "test::i = " << test::i << … | |
Hi Everyone, I'm looking for a nice menu, I have something like this in mind. [url]http://www.andrewsellick.com/examples/tabslideV2/[/url] I just need 2 menu's. One on the left and the other on the right. When I move my mouse over it it should drop down with a short description. Any help or pointers … | |
Hi Guys. I tried creating an insert into tree datastructure which is causing core dump. Please identify the issue... Here is the code [code] #include<iostream> #include<string> #include<stdlib.h> using namespace std; //Global Data struct Tree { Tree* right; Tree* left; int element; }; typedef struct Tree* TreeData; //Function Declaration void insert(TreeData … | |
I have read through loads of comments about how and why object expected can be reported, but I think my problem is that my javascript and calls are rubbish. I want to build a simple function that, if I de-select the first check box, all other checkboxes are de=seleceted, or … | |
I noticed that the main.cpp in a Qt application has to contain the following line: QApplication app(argc, argv). I know that argc is the number of command-line arguments, and argv is that array list of command-line arguments. But, the question in my mind is: what are those arguments I'm passing … | |
Hello, What I am making is a block of code where it "balances" the load for support tickets on a website. I know that my setup may (most likely will) not be the best. I'm looking for working, not a lecture on how to do everything and have it all … | |
While running all codes in visual c++ it gives me the same error -"Error 1 fatal error C1083: Cannot open include file: 'test.h': No such file or directory c:\users\ila\documents\visual studio 2008\projects\game\game\testgame.cpp 1 " I have created the header file test.h. | |
[CODE]#include<iostream.h> int tripeCallByValue(int count1) void main(){ int count=2; cout<<"count is "<<count<<endl; cout<<"count1 is "<<count1; } int tripeCallByValue(int count1){ count1=count*3; return count1; }[/CODE] when i compile with compiler,i got a syntax error.but i didnt where i have did worng. | |
hi guys i've stored images in sql server. how do i retrieve the images and displaying them on the same page that sends the request. i kinda figured how to retrieve the images using the [CODE]file.outpustream [/CODE]. just need to know o i display the image using an image tag. | |
Hello. This is my program: [CODE]<html> <head> <script type="text/javascript"> function check() { if (document.getElementById("age").value!=1) { alert("error") } } </script> </head> <body> <form> Age: <input type="text" id="age" size="30"><br /> Name: <input type="text" id="name" size="30"><br /> <input type="button" value="Check" onclick=check()> </form> </body> </html>[/CODE] and my question is how to make it display … | |
Form 1 contains label1 and buttonOk (form1 NOT closed) on buttonOk click the opens Form 2 Form 2 contiant a numericupdown and button1 on button1 click value of numericupdown should be displayed in label1 i tried to do this using the constructor and did not work.. help pls | |
Hello, I'm having difficulty getting my PHP code to read my HTML check-box code. Basically, when I submit my test form I get the following error message, Warning: Cannot modify header information - headers already sent by (output started at /home3/seguemin/public_html/feedback.php:83) in /home3/seguemin/public_html/feedback.php on line 110. I am very new … | |
I am in d form1 code and i would like to initialize d current.. form1 frm = .... help pls how can i do so? | |
Hello All, I am confused about difference betn ASP.NET and Dreamweaver, so could u please explain difference between them. Santosh | |
I know this is not how to do things in here but i need some help with code. I need to make a RPN calc in ada that instantiate a couple packages and they are below. Please help i need help creating rpn.adb and not sure how to implement some … | |
Hi, I've posted two scripts that I would like to improve. The first one (SparePartsDemo.py) is a little utility that takes a .csv (.txt) data file exported from another application, builds a SQLite database,performs a request to select and sort records and write the results to a sqlite database file, … | |
I'm looking for any thoughts on how I am currently doing error handling in my VB.NET programs. Basically I put code in a try/catch, then call an error handling sub passing the exception and a string. The error handling sub gives an error message and writes to a text file: … | |
Dear experts in Python, I have written a binary search method that receives a list of float and one new float item. It needs to look for the proper index for that item to be placed and return that index. To make it simple, I give an example: imagine a … | |
I would like to create a message box which has a textbox to enter a string in it how is this possible? | |
this works perfectly wit FF but not with IE <body onLoad="Calling();"> do you have any ideas why please? Thank you | |
In my application i have database connection but i dont know how to attach my database with application Front End : C#.Net Back End : SQL server 2005 I need to create a setup to run my application on another machine .... | |
Hi Hope thet someone can help me with folowing I have a mini event calender but i want to show te even into a popup but i can't fiux it i have here the code [CODE]echo "><a href='".$_SERVER['PHP_SELF']."?month=".$monthstring."&day=".$daystring."&year=".$year."&v=true' onclick='Popup.showModal('modal');return false;'>".$i."</a></td>"; } echo "</tr>"; ?> </table> <div id="modal" style="border:3px solid black; … |
The End.