199,112 Archived Topics
Remove Filter ![]() | |
As part of an assignment I am creating a class to handle rationals with numerators and denominators, overloading the operators for cin and cout, as well as +-*/. So these are the functions for those operators, now where exactly should I include these in my class? [code] Rational addition(Rational a, … | |
Hi I'm new at this I have created a database Person with (ID,Name,address) in MS SQL an d I have the following code [CODE]protected void Button1_Click(object sender, EventArgs e) { System.Data.SqlClient.SqlConnection conn =new System.Data.SqlClient.SqlConnection(); conn.ConnectionString ="integrated security=SSPI;data source=SQL Server Name;" +"persist security info=False;initial catalog=northwind"; try { conn.Open(); string sql = … | |
Been working on this project for the past two days and tried googling for solutions and about every 5th solution led me here, so I decided to join and see if I could get my question answered. Here's what I need to do, this is a semester long project for … | |
Hi This may not be a php matter but i'm wondering if it can be done? I have a table like the following: [CODE] <table> <tr> <td>1</td> <td>2</td> </tr> <tr> <td>7</td> <td>9</td> </tr> <tr> <td><<SUM OF THIS COLUMN (8)>></td> <td><<SUM OF THIS COLUMN(11)>></td> </tr> </table> [/CODE] I hope you understand … | |
I'm getting an error (unhandled exception writing address so and so) trying to modify a string. It gets weirder though. Let me show what i've got: --Main.c-- [CODE=C]#include "stdafx.h" #include "commands.h" int main(int argc, char* argv[]) { char word[256]; int id; strcpy(word, "move"); strToUpper(word); printf("%s", word); id = getCommandId(word); if(id … | |
Hi, I have a question regarding Methods. I have a method that takes a base class. I am getting an Error when I pass class that is derived of the base to it. For Example [code] Class TaskToRun { public virtual void run (); } Class SayHi : TaskToRun { … | |
Dim response As String response = MessageBox.Show("Are you sure you want to exit?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) If response = 6 Then End ElseIf response = 7 Then Me.Close() End If Above is the code to exit a form. When i exit my form a message box appears telling me if … | |
Bah, once again I am beat by the computer logic... Anyone have an answer as to why it gives me an error: "Expected a constant expression at msg" Here's the code, [CODE] const int INFOWND_SIZE = 4; int msg_length[] = "Message"; double calc_amount = (double)msg_length/(double)INFOWND_SIZE; int msg_amount = (int)ceil(calc_amount); char … | |
Question directed at JamesCherill specifically, (and anyone else who can answer it) I've never had [I]too[/I] much trouble with communicating between the model and the view, in an application that only has a model and a view. However, looking at the observer pattern (at the bottom) of this [URL="http://leepoint.net/notes-java/GUI/structure/ui-model-communication.html"]link[/URL], I … | |
Hello. I was wondering how to read strings from a file word by word and store the words into an array in c. I am having to write a program that tests words to see of they are palindromes from a little paragraph i wrote in a file. I've been … | |
this is kind of a quick question, but just a bit complex: say i want it to find n in range(5), i would do this: [code]for n in range(5): print n[/code] and it would return 0,1,2,3,4.... but what if instead of returning i want it to put it in a … | |
Hi Guys I need some help. I am trying to modify a website which is based on template engines and I am not sure how to do the following. I have added a drop down box to the header.tmp and the form action posts the user selection (user_loc) to another … | |
I am looking for a way to watch for specific messages sent by the system to my application. For example, I want to be able to watch for the WM_QUERYENDSESSION message and when it is received, to perform a specific action. I am working with the python win32 extensions, but … | |
I need an example on downloading an internet file in a windows service application before logon using c++. | |
hey, I want to read internet data through a C++ program. I am told that the way to do this is by using a proxy server and spitting out the data through the proxy to a file which then can be read. How exactly do you setup a proxy server … | |
Hi pals I have three qestions 1-Is it possible to overload {} operator? 2-What is the benefit of using function objects other than functions? 3-How can i access CPU serial number and such a things? | |
I am having problems with this code and im nooby what im trying to do Create a game where the computer picks a random word and the player has to guess that word. The computer tells the player how many letters are in the word. Then the player gets five … | |
The title says it all i want to make 1 file which can store information which my C++ program can read and use. How do I go about doing this. | |
// i m getting error when i update ID field of table.. all others field can be updated bt nt the field which i have used as where conditions of update command..! using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.OleDb; namespace WindowsApplication1 … | |
I have been trying to figure how to implement a "hit counter" for each of my websites in my css gallery, and display the total number of times a person has visited that link (or image). Could anyone lead me in the right direction, so I could get started on … | |
Hi, I'm new here, Does someone have a script that asks user to enter there day/month/year and if over xx minimum age they are taken to website, if under age they are told they are under age and redirected to a link i specify. Possibly with a function to choose … | |
Hi all , i just wanted to know ,why the **** this thing doenst work , i've tested the code 10 mins ago it worked ,and now ,it doesnt . static private bool ExistanceCheck(string Start, string SubKeyPath, string KeyName, string DefaultVal)//true , changed, false (unexistante , other value) { RegistryKey … | |
Hi there. I'm creating a simple anti-cheat program for my game that kills most game cheating programs. (ex: WPE, Cheat Engine, etc.) But I got stucked when trying to kill hidden processes. Say a program called "HideToolz". it can hide cheating programs from the process list, so that my anti-cheat … | |
I want to use a for loop to display * ** *** in javasript does anybody know how? | |
I have tried to make a chat application that only saves the recieved messages which can then be deleted. I'm having some major problems with it. Can anyone please point out or correct my coding. I have tried for ages to get this working but with no joy. Client Code … | |
I created a Python script to find two whole numbers that, when multiplied together, will equal the target number, or factors. My script works by dividing the target number by a regularly increasing integer, and checking to see if the quotient is a whole number (integer). Here's the script: [CODE="python"] … | |
Hello there. What is usually the reason of getting an undefined reference error? I have already included the [B]pthread.h[/B] header file yet I'm still getting the undefined reference error for the [B]pthread_create() [/B]function. *sigh*. I'm using makefile in compiling my code. Is there someone here who could enlighten me? Thanks! … | |
Hey everyone! I'm having trouble with the Open File Dialog in VB.NET. It works fine because I am only returning the file path of the file selected, but for some reason the dialog box reloads every time it is clicked for the first time. For instance, the dialog opens and … | |
i'm making a program, i need to know is there a command for "divisible"? as in [code]if m is divisible by n[/code] if not, is there a command like "if its a whole number"? as in [code]if m is a whole number[/code] of course i can work with either command, … | |
THis is what i did if (txtName.Text == "") { MessageBox.Show( "All Field must be Fill in!!!","Missing Information", MessageBoxButtons.OK, MessageBoxIcon.Error); } else what do i write on the if, to stop the button from executing the label action since information is missing? | |
hello to all i need help getting the output of this program to write into a file elif choice == "3": print "all users list :" print"\n" import active_directory for user in active_directory.search ("objectCategory='Person'", "objectClass='User'"): print user "" that lists all active directory personal .. in rows how can i … | |
Hi Everyone, I am using javascript code for removing some records. When i am click on delete selected button. I want this should demand one confirm button in which i want if we click OK in confirm box then the record should be removed from database and if i will … | |
hi!! to show the source code I thought it is supposed to do this (at least it worked using ipython with version 2 of python): >>> method?? I'm using version 3. How can I show the source of a method. eg: >>>def sayHi(): print('Hi') >>>sayHi?? then show the source code. … | |
if i want to print 2 to the power 3 normally what we do is 2^3. is there any other way that i can print it in the console in the way that we normally write it on a paper. does anyone know it pls tell me. | |
Hey, im trying to delete an element of an array of pointers of a class, how can i delete just a single element? my code is basically this... n =8; ClassName *newName; newName = new ClassName[n]; how would i delete for example, element 3, while being in that element... if … | |
Hi i'm new to coding and am having a problem with a program i'm making, i have got it down to 4 errors which are on a single line, but i have no idea was wrong and how to solve it. [code]#include "stdafx.h" #include <iostream> #include <stdlib.h> #include <string> #include … | |
HI, aLL [code]final int[] fromStop = {1, 2, 3, 3, 4, 5}; final int[] toStop = {3, 4, 5, 1, 2, 3};[/code] im trying to write a loop to create and start passenger threads with the respective from and to stops in the arrays above. e.g. Passenger 1 goes from … | |
Hi Folks, I am having difficult with a program. I have a program that downloads a file to the directory it is being run from and I need to move it to another one after its done downloading. I found code that should do it but it keeps failing, and … | |
Hey I'm just starting to learn how to program and right now I am making a C++ tool with a Command line interface in Xcode 3 and this is my code. [code=cplusplus] #include <iostream> using namespace std; int main() { //declare input output variable double base=0.0; double height=0.0; double area=0.0; … | |
Hey all. Im working on a project that manipulates Wav files such as being able to add an echo to it and so on. So far ive managed to read in the Wav, split it up into the header file and data and manipulate the data by adding an echo … | |
Hey guys, I am doing my game project but i get this error everytime i press high scores button...can any one explain what this error means? Thanks in advance :) j Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1 at HighScoreManager.readHighScores(HighScoreManager.java:22) at StatusView$1.actionPerformed(StatusView.java:71) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at … | |
Hi guys , i am a to programming and have to do little code as an excercise, but got little confuse about constructors and objects while compiling my programm. forexample i created an object of a class called AsciiImage; in the Main class public class AsciiReader{ public static void main(String … | |
My main code variable declaration (just declaration no login statement) [CODE]struct AXEMAN{ int lvl; int att; int hp;}; struct DEFENDER{ int lvl; int att; int hp;}; struct ARCHER{ int lvl; int att; int hp;}; struct SPEARMAN{ int lvl; int att; int hp;}; struct ROUGE{ int lvl; int att; int hp;}; … | |
Hi , I have a problem with my program. i want to insert a text box value into sql table ,the text box entering value is the price of an item. then my database table field datatype corresponding to that is 'Money' field. then i can't insert the value to … | |
Hi there what i'm trying to do is: return a car manufacturer from a MySQL database and have the text returned a hyperlink to the car manufacturer website. The below just returns the manufacturer without a hyperlink: [B]$row['manufacturer'][/B] Would i make a row in the database called 'carmakeurl', store the … | |
Here is what I am trying to do I am trying to compare to values that are set up as generic values and return whether one is greater than the other and it is telling me that (E, E) cannot be applied and I don't know why. I would appreciate … | |
i am new to c++ and wonder about how i create a file for example string flight; cin>>flight; flight=flight+".txt"; ofstream myfile; myfile.open(flight); instead of having a fixed name like myfile.open("file.txt") but it doesnt work , are there elegant solutions to this problem i have. all the help is appreciated. | |
I need to be able to get rid of spaces in a string. All strings are representations of functions: 3 * x ( 1 ) + 1 * x ( 3 ) + 6 * x ( 2 ) – 10 * X ( 0 ) and i have to … | |
i got this error: [code]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\db.php on line 13[/code] my php code is this: [code=php] <?php //Database Info $dbhost="localhost"; $dbuser="root"; $dbpass="something"; $dbname="somedb"; $table="users"; //Connect to Database $con=mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($dbname, $con); $user=$_POST['user']; $pass=$_POST['pass']; $query = "SELECT * FROM $table … | |
HI, I am creating a website but when i right click on my login.aspx and click set as start page it seems to be ignored. I rebuild the website and click view in browser and it just takes me to [url]http://localhost:62665/website/[/url] I am using master pages if that helps anyone … |
The End.