199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Mattpd

I am trying to take a user's input and assign it to a certain part of a structure. This code is in my book so I assume it's correct: [code] scanf("%d", &part_number); inventory[num_parts].number = part_number; [/code] I need to do the same thing but with a string instead of a …

Member Avatar for Mattpd
0
138
Member Avatar for hno

HI I have a while loop and it's a foreach in it.The while loop showes a query result but if there was a foreach in the while loop ,it's run just one time but if it isn't in it ,the while run untill fetching all the result but I want …

Member Avatar for hno
0
80
Member Avatar for ko ko

My EOT font doesn't work in PHP. It only work in HTML. Can anyone help me? Thanks.

Member Avatar for ko ko
0
210
Member Avatar for red999

Whenever I am getting a line from a file by using the string getline() function, I seem to be getting an extra character. I am curious to know what exactly that character is. It recently caused me a bit of trouble trying to debug. Let's say the file is like …

Member Avatar for Ancient Dragon
0
145
Member Avatar for Mathura

Dear colleagues I am currently working on designing a scheduler using Borland C. I am struck with the concept of interrupts. I am trying clock tick interrupt for task switching. In all materials they say you will continue to your regular job until the interrupt occurs. I don't think it …

Member Avatar for Mathura
0
129
Member Avatar for loveisblind

Hello. I have text fields with data that is not being inserted into my table 'Election'. The Election table has these fields: ID (primary key and auto-increment), title, open_datetime, close_datetime, department, adminID, active (default is 'N') I checked to make sure all the field names are the same. Everything works …

Member Avatar for loveisblind
0
122
Member Avatar for tomtetlaw

When I try to run my program( which is a test entity system for anyone who's wondering ), I get a Stack Overflow error, and I cannot find the source of this error. Here is my code: baseentity.h: [code=c++]#ifndef BASEENTITY_H #define BASEENTITY_H #include <vector> #define DECLARE_CLASS( className ) public: virtual …

Member Avatar for tomtetlaw
0
240
Member Avatar for NitaB

Hi again! I've been working on this program and I am thankful for all the help and tips I've gotten from this forum. However, at the moment I can't seem to get this selection sort to work on my array. I've tried it 3 different ways(will post code below) and …

Member Avatar for NitaB
0
135
Member Avatar for shishtawitch

i have the following code [CODE]<?php $id = $_SESSION["user_session"]; $get = mysql_query("SELECT * FROM table WHERE id='$id'"); $total_found = mysql_num_rows($get); if($total_found==0){ my code goes here }else{ while($g = mysql_fetch_array($get)){ $id_2 = $g["id"]; $query = mysql_query("SELECT * FROM table WHERE id != '$id' AND id!='$id_2'"); while($z = mysql_fetch_array($query)){ mycode goes here …

Member Avatar for Atli
0
96
Member Avatar for SoulMazer

So, I have a script that needs to "clean up" when it is exited: it needs to clear a special logging file and other small things that affect the next startup of the script. The script has a GUI written in Tkinter, if that is relevant at all. Is there …

Member Avatar for SoulMazer
0
103
Member Avatar for duka96

I'm having problem with opening php pages in browser. I'm using apache web server and the problem is that instead of a page browser shows php code that i wrote in text editor (for example it shows <?php phpinfo(); ?> instead list with informations about php). Everything worked fine before …

Member Avatar for kireol
0
198
Member Avatar for sexyzebra19

I'm testing this program for: x^2 + 0.17714x -2.5147583 with k = 1.4997 I've been looking at this for hours and have worked through it on paper, but can't figure out why line 59 is calculating C[1] as 0.17714. C[1] should be 1.6768. Can anyone please help me figure this …

Member Avatar for mrnutty
0
112
Member Avatar for willygstyle

Hello all, I have been trying for a few days now and done quite a bit of reasearch on the internet and this website to find out how I can authenicate to a website. It could very well be that this particualar web server is picky I'm not to sure. …

Member Avatar for willygstyle
0
184
Member Avatar for Eternity[LK]

Hello :) This is my first post on daniweb forum and I hope this site will help me improve. I'm a first year college student in computer science, and I've only recently started C++. This means that code posted by me might seem very lousy and /or unprofessional. I have …

Member Avatar for Eternity[LK]
0
97
Member Avatar for aBenjamin

this is a small example that, i hope reflects the larger project that i am working on. i am making a board game that uses a combination of mouse listener and jbutton action listener for the player to move. when it is time for the computer to take its turn, …

Member Avatar for Ezzaral
0
2K
Member Avatar for papanyquiL

Hi everyone. I've got this code that I've been following along with a sample. However, whenever I debug it, I get the error 'XML Exception was unhandled: Root element is missing.' Here's the code I have so far. [code=c#] namespace SpiveyPropertyRental { public partial class Tenants : Form { public …

Member Avatar for sknake
0
144
Member Avatar for r00ty

Hi , i have 2 txt files full of names , read line by line and compare. If name from first file exist in second , i don't write it to result file. My code work excelent with small files , but when i try big files (100 MB) , …

Member Avatar for r00ty
0
162
Member Avatar for mstrop

Hi, I am "googling" for the whole morning, but I am not able to find an HttpUtility.UrlPathEncode in C# Compact Framework - simply, I need to encode/decode URL and post data for my windows mobile application making a web request. Please, do you know, how to do it? M.

Member Avatar for mstrop
0
108
Member Avatar for Trekforever

Hi, I'm trying to write a function that takes in a c-string, and remove all 'T' and 't' from the string. So here's what I have so far, but every time I try to compile it, it gives an empty character constant error. [CODE] void removeT(char* msg) { char* ptr; …

Member Avatar for JasonHippy
0
1K
Member Avatar for Snippset

Hi, I need to make a program, which I think should be simple if you know what you are doing. You have an array of integers A(m, n) and B(m). Delete an element from A array, which index is in the B(m) array. Print original and modified arrays. I don't …

Member Avatar for Snippset
0
99
Member Avatar for Vitriolics

Hey, I have a program that it supposed to read two columns of data and then perform a calculation on them. The problem is reading the data in from the file. I have a function to count the lines, this works correctly. It returns it's value into a variable called …

Member Avatar for Dave Sinkula
0
124
Member Avatar for MRWIGGLES

Hi, I'm having trouble just printing particular strings out of a sentence. <h1>hi my name is</h1> if i just want the program to print out <h1> </h1> and ignoring the text in between, how would i do that? i have tried converting everything to ascii and printing within the range, …

Member Avatar for MRWIGGLES
0
95
Member Avatar for pdk123

In the following c code, the num_elements is gobal. But if i make it as local and return , it gives strange value just before return it becomes '0' ...can anybody explain why ? [code] int num_elements =0; //generates a psuedo-random integer between min and max int randint(int min, int …

Member Avatar for pdk123
0
202
Member Avatar for grafas7

Hi i'm new here ,and i'm still rookie at working with C++ Builder 6 I have a task ,which i don't understand. My task is like that :.. Number array E (m,n) and i need to replace all the line and column even(oddly) numbers to 0(zero). Please im praying you …

Member Avatar for grafas7
0
137
Member Avatar for Xav123

Hey. I have been trying to do a drafts board, but i am having major problems with adding the pieces. Heres my Board. Any Suggestions?? [code] import java.awt.*; import javax.swing.*; public class Board { protected JPanel[][] squares; protected JFrame boardFrame; protected Container container; public void paint (Graphics g) { } …

Member Avatar for .11
0
101
Member Avatar for vsagarmb

i am not able to figure out why python throws an error when i call this function. In the code snippet below when i call set_greyLevel() python throws an error. If i comment the function call it works fine. Please help. Thanks in advance. [code=python] def set_greyLevel(self, grayScale): if grayScale …

Member Avatar for willygstyle
0
166
Member Avatar for mrnutty

I use netbeans but was wondering if anyone knew how to add a Java compiler to visual studio 2008?

Member Avatar for mrnutty
0
150
Member Avatar for roshini.johri

hey i am a beginner as far as python is concerned..i am having diff in understanding this code..i am supp to do it in python..if anyone can tell me wht it does it wud be really helpful [code] for qid,query in "as2.qrys": for word in query: docs = set(index[word]) for …

Member Avatar for Ene Uran
0
134
Member Avatar for AndrewYY

I've got a large array of coordinates (a struct containing x and y, among other things) and for each pair of coordinates, I'm trying to find another pair that's closest to it from that array. [code] int i, j, d = 0, cd = 0, closest; for(i=0;i<size;i++){ closest = 0; …

Member Avatar for mrnutty
0
114
Member Avatar for ENCHTERP

Hello: If I have a 2d Vector and I want to convert it to a 2d Array what would be the best way to accomplish that. I know that I can go through a for loop to do it element by element but I would prefer to use the copy …

Member Avatar for mrnutty
0
129
Member Avatar for Phil++

If you were asked to describe the techniques to C++ would you talk about like, Inheritence, Re-use etc or something else? I don't understand :( Help please!

Member Avatar for mrnutty
0
91
Member Avatar for scriptkiddy

Hi, how is the system function done? Atm I am doing it like this: invoke ShellExecute, NULL, addr szopen, addr cmdexe, addr szparams, NULL, SW_SHOW But it requires the program to know the persons homedrive. Is there a system(); function that can be used in assembly? If so, what library …

Member Avatar for functionalCode
0
259
Member Avatar for functionalCode

Hey everyone I am trying to read a hexadecimal registry value from a registry key, I am opening the key and then calling RegQueryEx, but I can't seem to get it right. Can someone post an example. Thanks.

Member Avatar for functionalCode
0
102
Member Avatar for daryll1

Hi, for one of my projects at uni i have to create a PHP based text game, i am basing mine on the colossal cave game. i am trying to use the explode function to split my string up into variables to check against my database but am getting the …

Member Avatar for daryll1
0
832
Member Avatar for lashatt2

Is there a command that change's server's file's inside buffer? Change file's inside text? I hope you understand me

Member Avatar for Nick Evan
0
83
Member Avatar for mikesr

Hello! I am new one here. Firstly I would like to say that I'm really poor in english, so be patient with me.. In the school we had a new task. So let me explain: we have a 2d array with numbers.. like this: 0 1 2 4 5 6 …

Member Avatar for mikesr
0
287
Member Avatar for Kennych

Example of what im trying to do: [U]Definition: test.txt[/U] Apples //line1 Coke //line2 Money/line3 [CODE] #include <fstream> using namespace std; fstream teststream; teststream.open("test.txt"); string line1; string line2; string line3; [/CODE] //I want it so line1 = apples //I wan tit so line2 = coke //I want it so line3 = …

Member Avatar for Ancient Dragon
0
278
Member Avatar for Pd123

Hey. Im having problems adding my Jmenubar to my board. It compiles fine just wont display. Any advice really appreciated. Thanks, Pd [CODE] import java.awt.*; import javax.swing.*; import javax.swing.KeyStroke; import java.awt.event.KeyEvent; import java.awt.event.ActionEvent; import java.awt.Font; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextField; import …

Member Avatar for .11
0
597
Member Avatar for kevinn

So here is the problem. This won't compile. It always gives an error like : d.cpp:24: error: ‘string’ was not declared in this scope d.cpp:24: error: expected ‘,’ or ‘;’ before ‘{’ token Compilatie failed. [CODE=C]#include <iostream> #include <string> #include <stdlib.h> #include <time.h> int d(int amount, int dots){ // d(X,Y) …

Member Avatar for kevinn
0
175
Member Avatar for D_switch

im using borland [CODE]/*Write a function that will scan/read each line of a given text file and determine whether a line is valid or invalid. A line is said to be valid if and only if it satisfies the ff: a. the line is composed only of characters a and …

Member Avatar for gerard4143
0
116
Member Avatar for Darth Vader

I have searched for a way before what the most effective way and in this case important the fastest way is to seek backwards in a file to read the very last line in a file. Like in this case I want to search from the end and backwards to …

Member Avatar for Darth Vader
0
3K
Member Avatar for Damon88

I am writing a application where i need to know which games are installed on a system. I have 3 ways by which i think i can detect the games 1: Scan specific parts of registry and look for key names that match with a List of Publishers. The list …

Member Avatar for Damon88
0
673
Member Avatar for PoisonedHeart

Hi to all and good day... I'm still studying about vb 6's data report designer and the data environment...but what i need to know is how can i make or [B]generate[/B] a report at [U]run time[/U]... for example, generate report for the employee names. (names of the employees will populate …

0
85
Member Avatar for gangster88

how could i call the above function so that when i input something like 21 for the mark the ouput is "the grade is A", and when the user inputs something more than 25 and less than 0 hes asked to input it again..? [code] def mark2Grade(mark): if mark >=20: …

Member Avatar for gangster88
0
119
Member Avatar for pinsickle

I wanted to get some opinions on a good visual c++ book to buy. I am intermediate level when it comes to programming. I have already been through a class on C and almost done with my class on C++. So I want a book that is heavy on the …

Member Avatar for zortec
0
89
Member Avatar for Jennifer84

I am trying to get a value from a specific cell in a dataGridView. I know how to choose a Row / Column but not at the same time. I have tried to get the value from row 3 in column 2 like below. But I cant find a Column …

Member Avatar for milind morey
0
110
Member Avatar for mstrop

Hi, using old pure C, I was able to define a custom windows message. Once done, it was possible to broadcast the message across my application. Any object, with defined listener was able to receive and process the message. OK, right now, I need to do the same in C#. …

Member Avatar for mstrop
0
232
Member Avatar for Lakshith

In my database I have a field date and eventname.I want to retieive eventnames after the current date.How can I do it?

Member Avatar for sknake
0
245
Member Avatar for christian73

If I build an application using BS 2008 in C# that uses an SQL database, Do I have to include SQL Express as part of the deployment package? In other words, does the user need SQL Express on his/her machine in order to use my application if my app does …

Member Avatar for sknake
0
158
Member Avatar for sleign

ok I've been looking all over the net and I cannot find anything about this issue anywhere, other than the same problem is mentioned once in a great while, but never shown how to rectify this. I'm at a point where I can't do anything else and I could use …

Member Avatar for sleign
0
97

The End.