199,112 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for ihatehumans

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, …

Member Avatar for siddhant3s
0
205
Member Avatar for tonief

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 = …

Member Avatar for mail2saion
0
91
Member Avatar for Curtain51

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 …

Member Avatar for Curtain51
0
189
Member Avatar for Designer_101

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 …

Member Avatar for BzzBee
0
109
Member Avatar for death_oclock

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 …

Member Avatar for death_oclock
0
194
Member Avatar for HBMSGuy

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 { …

Member Avatar for HBMSGuy
0
4K
Member Avatar for Nawsheen

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 …

Member Avatar for Teme64
0
115
Member Avatar for ShadowScripter

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 …

Member Avatar for ShadowScripter
0
710
Member Avatar for BestJewSinceJC

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 …

Member Avatar for Ezzaral
0
1K
Member Avatar for bemo55

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 …

Member Avatar for bemo55
0
129
Member Avatar for max.yevs

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 …

Member Avatar for max.yevs
0
109
Member Avatar for Ethan James

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 …

Member Avatar for Airshow
0
115
Member Avatar for jworld2

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 …

Member Avatar for jen140
0
85
Member Avatar for orwa

I need an example on downloading an internet file in a windows service application before logon using c++.

Member Avatar for MosaicFuneral
0
184
Member Avatar for yazooney

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 …

Member Avatar for jen140
0
907
Member Avatar for massivefermion

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?

Member Avatar for MosaicFuneral
0
114
Member Avatar for seamonkie

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 …

Member Avatar for jlm699
0
779
Member Avatar for kelechi96

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.

Member Avatar for jen140
0
14K
Member Avatar for diya0076

// 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 …

Member Avatar for jen140
0
151
Member Avatar for justinmyoung

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 …

Member Avatar for Josh Connerty
0
236
Member Avatar for genieuk

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 …

Member Avatar for genieuk
0
265
Member Avatar for jen140

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 …

Member Avatar for jen140
0
146
Member Avatar for djzmo

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 …

Member Avatar for jen140
0
408
Member Avatar for Dabeam

I want to use a for loop to display * ** *** in javasript does anybody know how?

Member Avatar for Airshow
0
93
Member Avatar for pjpro

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 …

Member Avatar for Antenka
0
1K
Member Avatar for henryxxll

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"] …

Member Avatar for woooee
0
135
Member Avatar for jaepi

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! …

Member Avatar for Kjah_C++
0
148
Member Avatar for rugs267

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 …

Member Avatar for rugs267
0
520
Member Avatar for max.yevs

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, …

Member Avatar for max.yevs
0
304
Member Avatar for lyvenice

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?

0
81
Member Avatar for shiva666

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 …

Member Avatar for shiva666
0
64
Member Avatar for gagan22

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 …

Member Avatar for mail2saion
0
148
Member Avatar for tivrfoa

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. …

Member Avatar for vidaj
0
184
Member Avatar for smsamrc

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.

Member Avatar for smsamrc
0
758
Member Avatar for Usura

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 …

Member Avatar for tux4life
0
81
Member Avatar for GarethSmith

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 …

Member Avatar for Aia
0
204
Member Avatar for stevnlon

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 …

Member Avatar for stevnlon
0
2K
Member Avatar for PhiberOptik

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 …

Member Avatar for naugiedoggie
0
132
Member Avatar for kootech

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; …

Member Avatar for kootech
0
156
Member Avatar for iaaan

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 …

Member Avatar for MHC
0
492
Member Avatar for jollyton12

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 …

Member Avatar for jollyton12
0
454
Member Avatar for Mubo

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 …

Member Avatar for Mubo
0
85
Member Avatar for kiwihaha

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;}; …

Member Avatar for tux4life
0
174
Member Avatar for idea786

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 …

Member Avatar for Ramy Mahrous
0
91
Member Avatar for jameswoodhouse

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 …

Member Avatar for vidaj
0
205
Member Avatar for skiing

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 …

Member Avatar for Antenka
0
106
Member Avatar for SmokyMo

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.

Member Avatar for tux4life
0
90
Member Avatar for bkeenom

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 …

Member Avatar for bkeenom
0
81
Member Avatar for superyo

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 …

Member Avatar for martin5211
0
261
Member Avatar for chris5126

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 …

0
107

The End.