132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for rashmideesh

hi.. i'm writing a program where a file contains a set of phonenumbers. when a customer buys a number that particular number has to be deleted from the file. i'm able to delete that number but when the next customer comes that number is still available. even though the number …

Software Development c
Member Avatar for Adak
0
171
Member Avatar for soccer13

Hey, What I need to do is read a file- it will have a name and several numbers after, with -1 as a sentinel number to signal the end of line, ex: Rogers 15 22 6 12 -1 Myers 23 10 4 22 34 -1 ... .... ..... What I …

Software Development file-system java
Member Avatar for soccer13
0
120
Member Avatar for j855

In python it will give a decimal like 52.2 and I was wondering if there was a way to make it round all decimals up to the next number like 53.

Software Development python
Member Avatar for Shlaa
0
91
Member Avatar for aznlitomik3

MY ASSIGNMENT: Write a program that works with fractions. Your program should be able to add, subtract, multiply, and divide two fractions. Specifically, your program must request two fractions from the user, getting the numerator and denominator separately for each fraction, and the operation to perform (add, subtract, multiply, or …

Software Development c c# c++
Member Avatar for aznlitomik3
0
13K
Member Avatar for ja0

I want to know how to see if my list contains a string name...having this [code] private class item { public string itemname { get; set; } public int val { get; set; } [/code] I tried, [code] var ilst = new List<itemname>(); ilst.Add( new itemname { ilst = "AA" …

Software Development
Member Avatar for Momerath
0
72
Member Avatar for myk45

Hello, i have a small doubt regarding the FILE structure. i looked it up in the header file (i have VC++ 2008). In this implementation, it was declared as: [CODE]struct _iobuf { char *_ptr; int _cnt; char *_base; int _flag; int _file; int _charbuf; int _bufsiz; char *_tmpfname; }; typedef …

Software Development c file-system
Member Avatar for myk45
0
212
Member Avatar for Lance5057

Whenever I run this code the while(b<63) only seems to run once then does nothing. The (a<63) loop runs fine but doesn't go again because the first loop just stops. Any idea what's going on? [CODE]#include <iostream> #include <time.h> using namespace std; int main() { int a,b,c,sand; int land[64][64]; srand((unsigned)time(NULL)); …

Software Development c++ programming-construct
Member Avatar for Lance5057
0
111
Member Avatar for sss33

If I have a list and I already have split the line in the file. I also have figured out the code to average the numbers in the list now I have want to figure out a way to somehow take the average from the list of numbers and give …

Software Development python
Member Avatar for sss33
0
95
Member Avatar for travigne

This is the question : you are burning some music CDs for a party. You've arranged a list of songs in the order in which you want to play them. However, you would like to maximize your use of space on the CD, which holds 80 minutes of music. So, …

Software Development c++
Member Avatar for travigne
0
2K
Member Avatar for TheSecOrg

I'm making a text editor just because I feel like it, I know there are already good text editors out there and this one isn't going to be better but I still want to make one because, again, I feel like it. I'm using JFrame to make my GUI and …

Software Development gui java
Member Avatar for TheSecOrg
0
399
Member Avatar for Avner .H.

Hello fellows... Is there something like static function variables in python? I know there are static attributes of a class, but what if i want to use a static variable inside a function? somthing like this (stupid) code in c++ for example: [code]int static_num() { static int x = 0; …

Software Development python
Member Avatar for zaghaghi
0
9K
Member Avatar for sciprog1

Hello Members, The following Client.java and Server.java works fine: Client.java [CODE]import java.net.*; import java.io.*; public class client { public static void main (String args[]) throws IOException { Socket sock = new Socket(InetAddress.getLocalHost (), 2000); BufferedWriter dataout; String Message = "How are you?"; BufferedReader datain; System.out.println ("Sending "+ Message + " …

Software Development client-server java
Member Avatar for sciprog1
0
83
Member Avatar for achava

Have I got a problem. I am quite new to xslt, and I have the following situation. I am presented with an xml file. I only want to extract the text in four of the tags present in the document. My first approach was to create a template for each …

Software Development xml
Member Avatar for iceandrews
0
153
Member Avatar for ahaykal

I have this homework in which I have been working on it: but I dont know what im doing wrong :( Could anyone help me: [code]#include <iostream> #include <cstring> using namespace std; class Account { private: char number[8]; char type; char owner[31]; double balance; double interestRate; public: Account() { number[0] …

Software Development c c# c++
Member Avatar for ahaykal
0
246
Member Avatar for Jesi523

I need help and I am not sure if this is even the right forum. I am new to n-tier programming. So I have developed a DAL using datasets, a BLL that is probably not very robust because I really do not know 100% what I am doing, and I …

Software Development asp.net
Member Avatar for Jesi523
0
233
Member Avatar for Jesi523

I need help. I have a gridview that updates certain fields. Once those fields are updated a button is clicked and an email needs to be sent to different areas depending on certain conditions but only if there is an email address for that row. There could be only 2 …

Software Development
Member Avatar for Jesi523
0
120
Member Avatar for Jesi523

I have a SQL query where I need to pull email addresses if there is one associated with that row in my table. Depending on how many email addresses are returned could be 1 all the way up to 5 I need to send an email to each of those …

Software Development c c# c++
Member Avatar for Jesi523
0
6K
Member Avatar for sciprog1

Hello Members, I have a JTextArea object containing a paragraph. Is it possible to bold certain words in it? A pesudocode or example code would be of great help. Thank you!! sciprog1

Software Development java
Member Avatar for sciprog1
0
42
Member Avatar for titan_550

Is it possible to be unable to put two "physical addresses" with a distance of less than 256k in a segment? My assembly professor asked me this. Is this the right answer:"it depends on how you set the align type(BYTE,WORD,PARA,PAGE), if you set it to BYTE the answer is NO …

Software Development assembly
Member Avatar for titan_550
0
124
Member Avatar for vbx_wx

[code] class Security { public: virtual ~Security() {} }; class Stock: public Security {}; class Bond: public Security {}; class Investment: public Security { public: void special() { cout << "Special Investment function" << endl; } }; class Metal: public Investment {}; int main() { Security* s = new Metal; …

Software Development c++
Member Avatar for vijayan121
0
106
Member Avatar for ayesha91

Hello, I am having a problem with an assignment that I have to submit tomorrow which is to let a user construct an object. in the assignment it is asked from me to create a DVDshop class where the user can create a DVD object. Also, in this class I …

Software Development c++
Member Avatar for ayesha91
0
123
Member Avatar for angel6969

Write a program that will read in a sentence of up to 100 characters and output the sentence with spacing corrected and with letters corrected for capitalization. In other words, int the output sentence all strings of two or more blanks should be compressed to a single blank. The sentence …

Software Development c++
Member Avatar for cbsinc
0
2K
Member Avatar for kuchick32

I'm trying to use a getline function in my program. I have the correct cout function but when I try and enter my input the program keeps wanting me to enter a couple of times and then that's what comes out. I'm very confused on what I'm doing wrong in …

Software Development c++
Member Avatar for kuchick32
0
112
Member Avatar for SoftwareGuy

Hello. Is there a way to modify a UIElement's contents? I have something like this: [CODE] System.IO.FileStream rdr = System.IO.File.OpenRead(xamlFilePath); System.Windows.UIElement uie = (System.Windows.UIElement)System.Windows.Markup.XamlReader.Load(rdr); [/CODE] And when I run the debugger and add uie to the "Watch" window, it gives me the following: [CODE] [-]uie [-]System.Windows.Controls.Textbox {System.Windows.Controls.Textbox:Title} <some stuff...> Text …

Software Development
Member Avatar for SoftwareGuy
0
270
Member Avatar for NewOrder

[CODE]import java.awt.Color; import java.awt.DisplayMode; import java.awt.Font; import javax.swing.JFrame; class GameStation extends JFrame{ public static void main(String [] args){ DisplayMode dm=new DisplayMode(800, 600, 16, DisplayMode.REFRESH_RATE_UNKNOWN); GameStation game=new GameStation(); game.run(dm); } public void run(DisplayMode dm) { setBackground(Color.PINK); setForeground(Color.WHITE); setFont(new Font("Arial", Font.PLAIN, 24)); Ex7 s=new Ex7(); try{ s.setFullScreen(dm, this); try{ Thread.sleep(5000); }catch(Exception ez){} …

Software Development java java-swing
Member Avatar for NewOrder
0
341
Member Avatar for Learning_Curve

[B]Question:[/B] Is it possible to [B]restrict the number of times an element can have a certain value[/B] through XSD? [B]Scenario:[/B] I have an element <ITEM> which has three child elements: <ITEM_BOOLEAN> <NAME_ELEMENT> <ITEM_MEMO_ELEMENT> <ITEM_BOOLEAN> [B]is restricted[/B] to only allow the values of "Y" or "N" is XSD I would like …

Software Development xml
Member Avatar for Learning_Curve
0
204
Member Avatar for Anthony Cameron

How do you write a perl script to determine the number of measurements, average, variance, standard deviation? This is the script that I have so far and it is not working. my @data = (6, 9, 7, 23, 30, 18); my @data2 = (10, 5, 8, 11); my @data3 = …

Software Development perl
Member Avatar for Anthony Cameron
0
3K
Member Avatar for bpress91

I have written a program that allows for two people to play tictactoe, however it will not work. I am not sure what the problem is. Can some please help? Thank you in advance

Software Development c++
Member Avatar for technologic
0
43
Member Avatar for dakaboguy

I am using VS2010 and SQL Server 2005. I have a query to search between dates. Depending on which date I select on the datetimepicker I get no results or limited results, but mostly not all the dates between the two dates I specify. For example, if i select 10/9/2010 …

Software Development seo sql vb.net
Member Avatar for dakaboguy
0
216
Member Avatar for Arturo32

It is possible to compare background images of a pictureBox? This piece of code works?: [CODE] pictureBox8.BackgroundImage == pictureBox9.BackgroundImage [/CODE] I ask bcause apparently, if used as this: [CODE]if(pictureBox8.BackgroundImage == pictureBox9.BackgroundImage)[/CODE] the result of that IF sentence is always false

Software Development html-css image
Member Avatar for Arturo32
0
109
Member Avatar for LianaN

Hey! I need to add a child node (its name is stored in Object child1) to the specific parent node (Object hierarchy). To do that, I try to find the parent node and then add the child node to it. However, e.printStackTrace() provides the error message (see below). What am …

Software Development java java-swing
Member Avatar for LianaN
0
1K
Member Avatar for tiramisu10

I've tried everything I know ( and that's really little ) and read everything I found, but I still don't know what's wrong here... Short version... If I must write more details, please tell me I have small program with only one class. All it has to do is to …

Software Development
Member Avatar for tiramisu10
0
112
Member Avatar for Sara Tech

I want to retrive data from table into combobox ..when the user click combobox items it's corresponding data will be show. [B]In details :[/B] I have PERSON table , my program allow to the user search by : Person Name When the user enters the name into TextBox the combobox …

Software Development dataset vb.net
Member Avatar for Sara Tech
0
189
Member Avatar for krosty4782

Hi guys. Im having a problem with this. I have an object that i create in other thread. Now what i want to do, is that when i close my app in the event it must call a method from the object created in the thread maded earlier. How can …

Software Development
Member Avatar for krosty4782
0
195
Member Avatar for R2605

Hello, I'm a new python user and I'm trying to create a python program that will run on a targate and communicate with the terminal. The main idea is to run several commend and short programs and analyze the results. for example running those 2 commands: cd /home/user/folder ls | …

Software Development python shell-scripting
Member Avatar for R2605
0
118
Member Avatar for BryantFury

hello, so im designing a simple prgram which calculates the cost of a ticket you buy. there are only 3 ticket options, namely a b and c. here is my code. [CODE] #include <iostream> using namespace std; const int PRICE = 3; int find(int [PRICE]); int main() { int nums[PRICE] …

Software Development c++
Member Avatar for Tom83B
0
107
Member Avatar for da_navigata24

Hi, I'm fighting a battle with a linked list and I am currently losing. I am using the toolkit, pointers, nodes and a class. My code is still buggy because after building it, it just runs for a while then stops. Please help. Here is what I have, an implementation …

Software Development c linked-list
Member Avatar for Eagles36
0
271
Member Avatar for mommabear

[B]Specifications (minimum):[/B] The CDROM class contains the following, private, data members: string Name; // The Name of the CDROM string CDType; // The Type of CDROM float Cost; // The Cost of the CDROM [I]The ONLY recognized (i.e., legal) CDROM types are, “Game”, “Word”, “Compiler”, “Spreadsheet”, “Dbase”, and “Presentation” (AND, …

Software Development c++ legal oop
Member Avatar for mitrmkar
0
152
Member Avatar for format_c

Im trying to create an object array that accepts values generated by a 2 random functions so that i can sort the objects in the array based on one value of an identifier (finishtime) in each object. eg. twenty Activitys with datamembers [starttime, finishtime, id] my code for the main.cpp …

Software Development c++
Member Avatar for thelamb
0
190
Member Avatar for nonshatter

Hi all, I'm relatively new to Perl and particularly new to regular expressions. This is really simple script I've just mocked up. All it does is to take the input string and check if it's in the correct format or not. Here are some examples of correct format (will always …

Software Development perl regex
Member Avatar for k_manimuthu
0
197
Member Avatar for kchadek

So the problem is to get two words from the user and then see if they cross and if they do type them out like the example: word1= lottery word2= boat Crosses would be: b lottery a t b o a lottery b o a lottery I am pretty lost, …

Software Development java
Member Avatar for Taywin
0
213
Member Avatar for George Jump

Hello - I have been searching to no avail for a clear and concise definition of VB6 Classes and Class Modules with perhaps some simple examples. Does anyone know where I might find this??? Thanks! George

Software Development visual-basic
Member Avatar for AndreRet
0
152
Member Avatar for vegaseat

The map() function applies a function to every member of a list. Here a list of numbers 32 to 255 is changed to a list of the corresponding ASCII characters. Then map() is used in a more complex application to combine the two lists to form a dictionary containing number:character …

Software Development python
Member Avatar for Gribouillis
0
439
Member Avatar for LianaN

Hi! So, my question is how could I compare two objects. The code is shown below. The problem is that the first "if" statement is always true, even if it should be false. For instance, let's say childHierarchy[i] and hierarchy[0] are equal to 'Contract'. In this case "if (childHierarchy[i].toString() != …

Software Development java
Member Avatar for Taywin
0
106
Member Avatar for jliao20

I have no idea how to start the interpreter for this java project. I need some hint on the LET statement in order to write other code such as ADD, MINUS, GOTO...etc Thanks [CODE]public abstract class Statement { // execute() takes a ProgramState and executes this statement, by making // …

Software Development java
Member Avatar for Taywin
0
258
Member Avatar for knan

I have a list of lists [CODE]x=[['a', 'b', 'c', 'd'], ['e', 'f'], ['g', 'h']][/CODE] I need the following output. [CODE]a-b a-c a-d b-c b-d c-d e-f g-h[/CODE] How can i do this? Can a regular expression be used here??

Software Development display python
Member Avatar for Gribouillis
0
152
Member Avatar for digan

Hi, ive only started programming recently and as my second assignment i have to write a program that can convert uppercase letters to lowercase letters and visa-versa. i also have to make it stop when a full-stop is entered and count the number of times the program changed letter case. …

Software Development c++
Member Avatar for digan
0
112
Member Avatar for TechSupportGeek

Hello world of DaniWeb, it's been months since I last visited this forum but here I am asking for your help again :) I've been developing a text editing application and my problem is that the RichTextBox control will "lose" all special formatting (like font, color etc.) when enabling WordWrap. …

Software Development vb.net visual-basic
Member Avatar for TechSupportGeek
0
205
Member Avatar for bejfake

Hi, I've got such class template: [CODE=c]template <class Type> class Stack{ private: struct Element{ Type value; Element *prev; } *end; public: Stack(){ end = NULL; } void push(Type value){ struct Element *element = new Element; element->value = value; element->prev = end; end = element; } Type pop(){ if(end != NULL){ …

Software Development c++
Member Avatar for alwaysLearning0
0
3K
Member Avatar for swathys

hi, i'm getting error of [COLOR="Red"]data source object is invalid[/COLOR] when i try to load a transaction report from sql database. [COLOR="Red"]Error 4 Overload resolution failed because no accessible 'Fill' can be called with these arguments: 'Public Function Fill(startRecord As Integer, maxRecords As Integer, ParamArray dataTables() As System.Data.DataTable) As Integer': …

Software Development dataset vb.net
Member Avatar for swathys
0
909

The End.