199,124 Archived Topics
Remove Filter ![]() | |
Hello - I am working on one of my labs, but I am having difficulty with the results being inconsistent. The passing by reference is working. I tested random data and I don't understand why some works and others produces incorrect results. Data tested: 5, 9, 7 = perimeter of … | |
I'm pretty new to C#, but I've used winsock in VB a lot in the past, anyways, the problem is, I can't get .GetData to work. [CODE]private void axWinsock1_DataArrival(object sender, AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent e) { string R_DATA; axWinsock1.GetData(R_DATA); }[/CODE] Gives error: 'Cannot convert string to ref object' Or [CODE] private void axWinsock1_DataArrival(object … | |
Can someone tell me what is the different between default_age and self.default_age? Only one default_age variable is created for all instance of class Student and self.default_age means very instances of class Student gets a variable default_age? How do you specify a static class(singleton class) in python? [code=python] class Student: default_age … | |
Hello there, I met a problem which is to update inputs in a text file, but every time I update is only insert the data, not update. May anyone give me some advises? Thanks~ [code] string input; ifstream fin; ofstream fout; string title,author,category; float price; fin.open("library.txt"); cout << "******Update Book******"<<endl; … | |
>>i have defined a stack class using single linked list and a template. as follow: template <class T> class genStack{ public: void push(T a){.....} T pop(){........} .... .... private: SLList<T>: lst; } i know when i want the stack to store int, i should declare a stack like this: genStack<int> … | |
i have load two data files into a mysql table.now i want the compare the data from these two files (i.e want to compare a particular column of the table and want to get the difference between the values from these two files). i dont know how to do this.can … | |
Okay, I got abotu 5 problems solved today and I am on the hardest part! Basically my code ask the user to enter series of random numbers and then use sentinel to mark the end of numbers needed to be entered. Now I want to be able to tell my … | |
[code] #include <iostream.h> int main(void){ int base; char num; cout<< "Enter a base: "; cin >> base; while((base>=2)&&(base<=10)){ } cin>>num; while((num-'0') < (base)) && (c>='0'){ base>=base*2+(num-'0') cin.get>>num; } cout<<base; cin.putback>>num; return 0; } [/code] Clearly, this program doesn't work very well. I am in need of help. The teacher really … | |
Hiya! I've got a problem writing GUI's. Basically the design portion in code. What I've done is I've broken the GUI components into seperate classes, for example: [code] //custom menu bar public class MyMenuBar extends JMenuBar { ... } //custom generic menu. all //look-and-feel is set //here i.e. fonts etc … | |
Hello every body, I made an image gallery, but the photos displaying repeatedly in each row, I want the seven pictures displaying in each row of the table, then starts from the other row and same for others, the attachment pictures show the problems, what should I do? [CODE] <?php … | |
![]() | Yeah, just wonderin how many of you guys are using dotnet 3.0. If you are, what is it like etc? Can you use it with the express versions? |
I'm trying to create a Cash register that accepts euros. I don't even know where to begin. So far I have: public class Coin { public Coin() { name = " "; value = 0; } public Coin(String n, int v) { name = n; value = v; } public … | |
burnt my javascript to a cd, it won't work from my cd | |
Dear all gurus, Given 30 files, with same format (2 columns, column1 is string and column2 is int. contains thousands of lines) and uniform file name, eg: file1.txt, file2.txt,...,file30.txt, How can i read it in a loop, and then load them into my 2D array (eg: string words [filesize][maxline], and … | |
Dear all .Netters, How do I show icon printer in ReportViewer ASP.Net form for my Reporting Services Reports or how to print it to papers ? Regards, Kusno | |
Hi all. I'm a newbie to this forum so please forgive the odd question as first post... :-) I'm writing myself a [B]property[/B] class (just because I want to play with them). My property header looks something like this (all the usual clutter is removed): [code]#define property_readwrite( c, v, r, … | |
How can I enlarge the size of the letters that will appear in a pictures box? | |
I am having trouble figuring out how to get my non recursive quicksort program to finish sorting. Here is my code [code] #include<iostream> using namespace std; /** * Swaps two items * * @pre x and y are the items being swapped * @post Contents of actual locations that x … | |
hey all, still very new, i'm trying to create an array and then get an average of the numbers. this is for a class of mine and a friend says i'm close but the book doesnt really give any further help. can you tell me where i'm going wrong? mucho … | |
My assignment is: "Write a program that accepts the letter grades for a student, calculates the student's gpa, and prints it out, along with one of the following five messages: Eligible Ineligible, taking less than 4 classes Ineligible, gpa below 2.0 Ineligible, gpa above 2.0 but has F grade (note: … | |
Hi Everybody, I was wondering if someone could help me figure out what is wrong with this part of my program. My program is a fraction calculator, and I'm wondering if the code I have is ok and if it will display correctly. Thanks much!! Also should I add a … | |
Hi, I was just learning about buffer overflow attacks... I was curious as to how to generate a simple shellcode. For example, I've written two codes - One is the typical program that has a vulnerability inside and the other is the shellcode. main program: [code] void test(); int main() … | |
I'm having problem with storing values in multi dimensional arrays. I need to have 10 * 10 array with rows and columns. I have intitialized the array with blank spaces " ". But after this I need to store letters like 'A' 'C' 'S' on specific locations in that array. … | |
This is my first time working with outputting data to a file, so I've got some rough code that I need some pointers on. [code=cpp] else if (decision == "S" || decision == "s"){ cout << "File name? " <<"("<<filename<<")"<< endl; cin >> newfile; if (newfile == '/0'){ outdata.open("filename"); for … | |
Hey guys, Im a beginner in programming...so please bare with me. my project is to create a simple calculator program with a twist. the user needs to input 3 variables which is 1st number, 2nd number and the operator(+ - * /). but when the user wants a square root … | |
Hello everyone, I got really bored yesterday and made a php chat program during 2nd and 6th hour at school. Its very basic and I wanted to know what features should be added. This was made to talk to friends during school so I don't want to make it really … ![]() | |
![]() | I have been working on my web site almost a year.. i decided to turn it onto open-source, I meant registered users would be allowed to change page codes. without uploading the files to ftp. how can i do these?? ![]() |
Hi all, I have been trying to drop a stored proc for sometime using SMO. I can create with ease but can't seem to drop. Any ideas? I thought it might be permission but for testing used SA account. No luck... [CODE] private void btnCreate_Click_1(object sender, EventArgs e) { SqlConnection … | |
Hi, I am converting a given html document into a tree structure and displaying it using JTree and DefaultMutable classes. By using the html parser and the JTree functionality, I can display the html doc as tree structure, but now I would like to get the subtrees only of that … | |
Hello, I am trying to pull the relationships from an Access database. I would like to know which fields have what type of relation with other tables in the database. Does anyone know how to do this? Thanks, Ben | |
ok, i need a way to make an invoice. i have a products table with the number the name and the price of all my products and need to add only the products I want on the report, not all of them but more than 1 ...... | |
I getting the following errors.. please help .. below is error i get and below that is the file that the error is refferring to [code] E:\JAVA\Java Files\lab employee\FullTimeEmployee.java:22: cannot find symbol symbol : class DateComponent location: class FullTimeEmployee DateComponent dc = new DateComponent(date); ^ E:\JAVA\Java Files\lab employee\FullTimeEmployee.java:22: cannot find … | |
Im trying to compile this code, but I keep getting a compile error: [B]'(' or '[' Expected[/B] What am I doing wrong? Thanks in advance [CODE] public class Postfix { public static void main(String[] args) { Stack<Integer> stack = new Stack<Integer>(); ------> HERE while (!StdIn.isEmpty()) { String s = StdIn.readString(); … | |
I am trying to change the index.php file on OsCommerce <the text on the front page>.... Its giving me this error message... Error: I can not write to this file. Please set the right user permissions on: /home/mybohoba/public_html/osCommerce/catalog/includes/languages/english/index.php What am I doing wrong?? This is soo irritating.. ROFL Any help … | |
I have this code and when i try run it i got a menssage"PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\bla bla bla.......... on line 15 i will thankfull if anybody can help me ------------ [code=php]<?php session_start(); if ($userid && $password) { // si … | |
Hi! can u plz tell me what is the code for setting the focus to a checkbox in vb.net 2003 project. How is this possible? I have tried checkbox1.setfocus=true but itdoes not work. Secondly, I wish to fire the click event for a button when I press the enter key. … | |
ive posted this messge in 3 other forums, i hope i get a better response here. the following code has a button that removes the selected row from the grid. reset index, is what i am going to use so that the first column is always secquential, so all rows … | |
Hi all I am trying to compile some of the snippets on this site and only some of them work and I was thinknig wether its because I have a different version of .NET framwork installed would this affect it? I have V1.1 2.0 3.0 3.5 All installed on 1 … | |
I am trying to get a value from a stored procedure: [code=SQL]SET @RowCount = @@RowCount IF @RowCount = 1 BEGIN SET @Ret = 1 PRINT 'Insert a success' END IF isnull(@RowCount,0) = 0 BEGIN SET @Ret = 2 PRINT 'Insert a failure.. Terminating Proc...' RETURN END[/code] I should be getting … | |
Hi all, When RUN the Project that erros apears : [COLOR="red"]"Application.java": cannot find symbol; symbol : class FirstWorld, location: class Application at line 3, column 7[/COLOR] [COLOR="red"]"Application.java": cannot find symbol; symbol : class FirstWorld, location: class Application at line 3, column 30[/COLOR] Please help me .. Thanks..:) | |
I didn't want to fill up a thread with a bunch of code, but I couldn't find a way to attach a file to an e-mail using this site's "send a message" system. I would have inserted the .CPP file. This is a basic windows program to run tests on … | |
Hello Everybody. I am trying to write a program that asks the user to enter the amount of dice they want to use, and how many rolls they would like to make. Eventually I will need to store the output in strings, so I can print out how many times … | |
hello i'm new here but i have made a little python calculator and was wondering, if i wanted to give a copy to my friend how would i change it from a python file to a umm .zip(just an example) file where my friend can just unzip it and use … | |
I'm new to C++ graphics, and a friend tipped me off to OpenGL. I'm currently trying to work with the GL Utility Toolkit ([INLINECODE]#include gl\glut.h[/INLINECODE]), which I had to download from the web. Due to all the download sites being intended for people with older versions of Windows (I think), … | |
the last record is getting displayed twice.i hv rechecked everything and cudnt find the error. here is the add n display function. [code=c++] void add() { example abc; int n; ofstream file1("EXAMPLE.dat", ios::binary|ios::app); cout<<"Enter Number Of Records To Add "; cin>>n; cout<<endl; for ( int i = 0; i < … | |
Hello Im new to C programming, im trying to learn how to create a textfile with whatever name the user of the program wants. something like this, please ignore that this code wont work, its just so you might understand how i am thinking: [code] FILE *file; printf("name of the … | |
Help! I need to total up values which are monetary ie VAR1=123.20 ( £123.20p) VAR2=2000 ( £2000 ) can i do this using expr, i can total them up, but lose the .20p Any help would be much appreciated | |
I want to read MS-Excel file using EVC++ 4.0.The file contain strings.How this could be done?Thanks in Advance. Regards, priyank | |
Dear all .Netters, I get problem with these controls, DropDownList, CheckBoxList, RadioButtonList. Sometimes, i add item into those controls manually. Example : DropDownList1.Items.Add ("JAKARTA") DropDownList1.Items.Add ("LONDON") DropDownList1.Items.Add ("BOMBAY") DropDownList1.Items.Add ("BEIJING") If i use this property, DropDownList1.SelectedValue, it returns "JAKARTA", If we bind it using DataReader, we find these properties DataTextField … | |
Hi there I"m building a page that displays events for example: Event heading 05 June 2007 Event Description Another Event 19 June 2008 Event Description What I'd like to know is how do I sort the events by date in the format shown above. At the moment I have a … |
The End.