132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for tarheelfan_08

Hey guys, I have been trying to do some stuff outside of my class to learn a bit more and I have come across something called a vector. And I read online that its similar to an array! But I am not sure how to do this. I have been …

Software Development algorithm c++
Member Avatar for mitrmkar
0
383
Member Avatar for pyprog

[CODE]list1 = [[],[],[]] list2 = [[1,2,3],[4,5,6],[7,8,9]] i = 0 j = 0 k = 0 while i < len(list1): list1[i].append(list2[j][k]) i += 1 k += 1[/CODE] I want my output for list1 to be [[1,4,7],[2,5,8],[3,6,9]]. The problem is I don't know how to advance through the lists in list2. Can …

Software Development python
Member Avatar for arunbg
0
163
Member Avatar for toastghost

Hi. I'm fairly new to VB. I've made a handful of small programs and followed a few tutorials, but this is really the most complex program I've made so far. (Just a heads up that I may be missing something fairly obvious :$) I'm working on a VB program which …

Software Development vb.net
Member Avatar for toastghost
0
130
Member Avatar for juuuh333

Hello, I have Visual C++ 2008 in a Windows 7. I wanna get the value from a textbox to an int, after that I wanna make some operations with the int like + or - or * or / and I want to write it to an another textbox. And …

Software Development c++
Member Avatar for juuuh333
0
3K
Member Avatar for jmoran19

I'm trying to write a program that builds a full binary tree from an array containing an even number of sequential numbers. I know the memory allocation part, I'm just having trouble with how to pass the integers to act as array positions. This is what I've come up with …

Software Development c++
Member Avatar for rydhima
0
147
Member Avatar for RandyWhite

I am experiencing a rare problem. I wrote a program in C that creates several windows and I use them to load and display images. After using the program for a while loading and displaying images then all of a sudden all the windows on the desktop disappear including the …

Software Development c
Member Avatar for mitrmkar
0
121
Member Avatar for OsheRono

Hello everyone, Now this is my first time posting a question, if I do end up making it too general please let me know. OK, now, I am in the process of programming a small program capable of accessing a sql database. That is no problem. Now, I have decided …

Software Development
Member Avatar for Geekitygeek
0
200
Member Avatar for TheWhite

When I want to load images, locally, I use use: [CODE=Java]ImageIcon qmarkIcon = new ImageIcon("images/mark.gif");[/CODE] When I run the program through eclipse, everything works fine--all the images load like normal, but when I package the executable .jar and run it in a folder without images/*.gif's, none of the images load..... …

Software Development java
Member Avatar for gsteele
0
9K
Member Avatar for juuuh333

Hello, I wanna create a string witch gets the value of a textbox. How can I make it ? THX for your replays :D

Software Development c c# c++
Member Avatar for juuuh333
0
612
Member Avatar for ckjie

Hello all. I am doing a chat server project v socket programming. I am doing it with visuakl studio 2008, C sharp and i build it with a console application project. Below are my codes and the errors i meet. can any1 help me on how to solve these errors? …

Member Avatar for Geekitygeek
0
245
Member Avatar for martlevin

Hi I am having problems with getting an LED to flash on a 16F887. I believe it is down to the oscillator. can you point me in the right direction? [CODE] __CONFIG _CONFIG1, _LVP_OFF & _FCMEN_ON & _IESO_OFF & _BOR_OFF & _CPD_OFF & _CP_OFF & _MCLRE_OFF & _PWRTE_OFF & _WDT_OFF …

Software Development assembly flash
Member Avatar for Bishoppy
0
123
Member Avatar for greedydeepak
0
37
Member Avatar for wApPy

help me for this program... i need an output for reversing of a string.. what are the missing codes? correct me .. teach me... give me an example of program.. a reversing program for EMULATOR 8086,ASSEMBLY.....[code]include 'emu8086.inc' org 100h print 'input a string: ' mov dx,10 call get_string putc 0ah …

Software Development assembly
Member Avatar for eyfifteen
0
535
Member Avatar for Rohith Reddy

Hi, I have a problem regarding displaying the files. Actually, my code displays both pdf's and images. I am thinking to have a script to check whether the file is image or pdf before it gets displayed. Can anyone help in this regard. Thanks, Rohith

Software Development pdf
Member Avatar for Geekitygeek
0
101
Member Avatar for doha786

hi, here is my program that can read through a txt file line by line to find one word named "friends". if any line contains of this word then get the line and check my precised friend's name is mentioned there or not ? its working when my precised named …

Software Development java
Member Avatar for doha786
0
101
Member Avatar for khan001

i m new in c language. i write the following code. its not giving the correct input. when i enter the marks it always give ouput "F" .please correct the code [CODE]#include <stdio.h> void main() { int marks; float percentage; printf("enter marks:"); scanf("%d",&marks); percentage=(marks/1100)*100; if (percentage>80) printf(" A+ "); if(percentage …

Software Development c
Member Avatar for jephthah
0
141
Member Avatar for Dimansu

Hi, I have a textbox named fullnameTextbox. I want the user to only type letters in that textbox.I have a code for it but when there is a spacebar between 2 correctly typed words my error message pops up.How can i fix this? [CODE] Match matchMyRegex = Regex.Match(fullNameTextBox.Text, "^[a-zA-z]*$"); if …

Software Development regex
Member Avatar for Geekitygeek
0
109
Member Avatar for akssps011

I have created a graph(map) using graphics.h in C. Just to mentioned I have coordinate location of each and every point on the map. How can I zoom in to the particular area selected by the user ? Secondly, how can I zoom in around a particular point(selected by the …

Software Development c
Member Avatar for WaltP
0
89
Member Avatar for jozz3

Hello In my program I have a text file that I read from and write to. However, I would like to display the contents of the text file in an alligned and sorted manner. The contents currently read- name, score name, score Would I have to convert this information into …

Software Development python
Member Avatar for jozz3
0
2K
Member Avatar for saulocpp

Hi all. First post on the forum. I'm writing a generic funtion to open files along my program, but am worried if the pointers are being closed correctly. The function definition: [code=c] FILE* openfile(char *FileName, char *Mode) { FILE *TempFile; if((TempFile = fopen(FileName, Modo)) == NULL) { fprintf(stderr, "Couldn't open …

Software Development c file-system
Member Avatar for jephthah
0
192
Member Avatar for LevyDee

So I finally decided to take on some Windows Programming, and everything is going fine, except this: Edit: using this tutorial [url]http://bobobobo.wordpress.com/2008/01/31/how-to-create-a-basic-window-in-c/[/url] [code] #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { WNDCLASS myWindow; myWindow.cbClsExtra = 0; myWindow.cbWndExtra = 0; myWindow.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); myWindow.hCursor = LoadCursor(NULL, …

Software Development api c++ wordpress
Member Avatar for nithy.sweety
0
521
Member Avatar for GooeyG

Whenever i type in code, Visual Studio puts an dot or a tab(->) in between code.I tried uninstalling and reinstalling Visual Studio, but that didn't do anything.I'm not quite sure what i did and i can't find a way to undo it. Thanks! P.s.-I tried to copy and paste the …

Software Development c++ microsoft visual-studio
Member Avatar for GooeyG
0
87
Member Avatar for casjackkwok2001

HI ALL. I'M LOOKING FOR A SOLUTION FOR MY CODE. I WANT TO FIND THE [B]HIGHEST CHARGE[/B] AFTER AN ARRAY HAS SHOWN UP(SPEAKER'S FEE). WHAT CAN I DO?? THANKS HERE'S MY CODE: [CODE]#include "stdafx.h" #include <iostream> #include <iomanip> using namespace std; struct Bureau { char name[50]; // Name char phoneNum[50]; …

Software Development c++
Member Avatar for WaltP
0
363
Member Avatar for prasadk14

Hi, I'm trying to receive broadcast messages using C# code in an ISDN network with BRI interface at my end. I see the packets sent to the broadcast ip address (239.255.255.255) on some ports using Comm View tool. But when I try to listen to this IP address, it says …

Software Development
Member Avatar for prasadk14
0
2K
Member Avatar for fyp

so far I could manage to create OpenFileDialog and select the txt file. after that ,How could I display the contect of selected txt file into TextBox? [CODE] ************************************************************* private: virtual System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { System::Windows::Forms::DialogResult OK = openFileDialog1->ShowDialog(); } private: System::Void openFileDialog1_FileOk(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e) { ???????????????????????????????? …

Software Development c++ display
Member Avatar for fyp
0
653
Member Avatar for brianlion1992

im new to python. just started today. learned a few things but not much. I have made 4 different menus each with a list of choices that executes certain functions. i want to make a 4 choice menu that can direct me to each one of the other 4 menus. …

Software Development python
Member Avatar for jcao219
0
130
Member Avatar for SCoder1

How would I loop a switch statement until one of the valid options are entered. would this work? example: [code] // lets just say all the necessary starting code is already here.... int choice, number; do { cout<<"please enter a number from 1-3\n"; cin>>number; switch(number) { case 1: break; blah …

Software Development c++
Member Avatar for WaltP
0
94
Member Avatar for f0rd

Hi everybody, I'm trying to develop an application for personal use, that will just make my life at work a lot easier and save me from doing a repetitive process by hand, when I know it could be done with [B][I]relative [/I][/B] ease in C++. Anyway, I want to be …

Software Development c++ file-system
Member Avatar for WaltP
0
283
Member Avatar for athlon32

Hello Daniweb! I'm coding a small application and I've hit a road block. I've been using C++ for almost two years now, but to be honest, I hardly use dynamic polymorphism (i prefer static), and so with great embarrassment, I come here to ask this: My code is basically structured …

Software Development c++
Member Avatar for jonsca
0
139
Member Avatar for tinkeydo

The following is an excerpt from a complete program that runs without any errors. It has 2 file dependencies which it uses to access and store information. The program, in its entirety, displays a menu with 4 options the user can choose from. [LIST=1] [*]View Characters [*]View Items [*]Add Character …

Software Development app-store c++ ios
Member Avatar for tinkeydo
0
183
Member Avatar for bluem1

Team - Working on a personal project to help with my sons spelling. I can't seem to find an easy solution to this so I hope someone can point me in the right direction. Textbox 1 will hold the correctly spelled word. Textbox 2 will be typed BUT I want …

Software Development vb.net
Member Avatar for bluem1
0
117
Member Avatar for jonjonjon

Yes I have this in an array... // Average Grade for(int i = 0; i<10; i++); { System.out.print("Average Grade" + scoreArray[i]/10); } I am wanting to divide by 10 (where the 10 is) I know that it want let me but how would you divide a list of numbers that …

Software Development java
Member Avatar for roul47
0
105
Member Avatar for sbdblyss

Hello, I am currently working on a project that requires me to write write a program that adds, subtracts, multiplies and evaluates polynomials. I am required to use linked lists of nodes. I am stuck on writing the code to input the polynomial. I understand how I will input each …

Software Development c++ linked-list
Member Avatar for Lerner
0
114
Member Avatar for Rmitboy

Write a function that reads an integer n and several lines of text (sentences between 150 – 200 characters). The text will be printed n characters per line, by adding extra spaces as evenly as possible. For example: Enter an integer (maximal number of chars per line): 10 Enter some …

Software Development c
Member Avatar for Adak
0
133
Member Avatar for methopoth

Howdy People :) I'm a newbie & its my first question here. I've started learning Unix Bourne Shell scripting recently and struggling already :p Can someone PLEASE help me with the following problem. Somehow my script is not working. * Display an initial prompt of the form: Welcome to machine …

Software Development machine-learning shell-scripting unix
Member Avatar for cfajohnson
0
134
Member Avatar for edowen14

Hello, I have made a database system, when the database opens a login form appears and the username and password need to be typed into the text boxes. if admin is the username then the main switchboard. but if you log in as driver then a report opens. the trouble …

Software Development visual-basic
Member Avatar for edowen14
0
256
Member Avatar for johndoe444

Hi, I wrote a ruby code that writes to a file: open('file.txt', 'w') {|file| file.write(arr.join("\n")) } when I try to get the number of line counts wc -l file.txt I get the count as 49 instead of 50. How to overcome this? My file might not have a new line …

Software Development ruby shell-scripting
Member Avatar for cfajohnson
0
107
Member Avatar for Hoss212

First some background, i am writing a stats program for my school, the way you enter stats is by a window that has a textbox that shows how many of that stat the player has, lets say pass thrown, and two buttons a plus and a minus to add or …

Software Development python
Member Avatar for Murtan
0
148
Member Avatar for PRINCE01

I need instance method(s) within the class am writing that convert from any base to base 10 & vice versa WIThOUT USING ANY LIBRARY ROUTINE. //this is what i have so far private int DecimalToBinary(int Decimal, int BaseNumber) { int Reminder; do { Reminder = Decimal % BaseNumber; } while …

Software Development mathematics
Member Avatar for PRINCE01
0
318
Member Avatar for Bobon

Hey guys, my second java problem in 24 hours :) I'm trying to call a method from another class. So basically what i'm trying to do is put the date from the main class through the method "tomorrow" so it adds 1 to the int day and returns the date …

Software Development java
Member Avatar for Bobon
0
110
Member Avatar for johmolan

I have a Form1 with a method called OrdreUpdate2 I try to run thad method from another form by using the command Form1.Ordreupdate2 in a buttonclick. But nothing happens..What am I missing here?

Software Development vb.net
Member Avatar for johmolan
0
98
Member Avatar for pateldeep454

My code: [CODE] package big; import java.math.BigInteger; public class Main { public static void main(String[] args) { System.out.println (factorial (5)); } public static int factorial (int n) { int f = 1; for (int i = 1; i <= n; i++) { f = f * i; } return f; …

Software Development java
Member Avatar for pateldeep454
0
145
Member Avatar for Tommy.Leedberg

I have a Value Error that is caught, in the exception block when I have no problem printing to the terminal, however, i cannot insert any text into the text widget. Heres the code snippet, any ideas? try: if len( errorCode ) == 0 and len( errorCodeHex ) >= 1: …

Software Development python
Member Avatar for Tommy.Leedberg
0
123
Member Avatar for yapkm01

I know that this book is for C++ Primer 3rd Edition (Stanley Lippmann) but can this be used for C++ Primer 4th Edition. There is no C++ Primer answer book for the 4th Edition. Still comtemplating if i should get it. :?:

Software Development c c# c++
Member Avatar for Spartan-S63
0
146
Member Avatar for dondajr

Well, here i am one more time. In previos post I asked here about read files. All of those problem were fixed, but now, i really have a problem that I don't know why is happing. In the first , i need to explain what my system will do: My …

Software Development c client-server file-stream
Member Avatar for dondajr
0
90
Member Avatar for Jeff_5_7

I am writing a program for class that inputs two of chars values no larger than 20. Then it adds these to Values together and prints the sum. Say this is my input Value one 123 Value two 456. This is how i input it into program for keyboard. 3 …

Software Development c++
Member Avatar for Luckychap
0
97
Member Avatar for Simes

[CODE=python]#Code should always be in a method or class #Always start variable names with lowercase, classes could be capital #input.upper() allows the user to use lower or upper case for each option import random def isint(x): try: int(x) return True except: return False print "Invalid guess. " def getGuessValidator(): while …

Software Development file-system python
Member Avatar for Simes
0
410
Member Avatar for ROTC89

ok so i am making a program that has a master slave process. the master sends out the 2-d array which is 1000 by 1000 to the slaves. then the slaves calculate the sums of the rows sends back to the master who sums it all up. then the time …

Software Development c
Member Avatar for jonsca
0
1K
Member Avatar for restrictment

Well, I had my program running perfectly, and I was quite pleased with the results. However, after I made the text file a bit big, the program just stopped working all together. (255 lines of text) so I 'suppose' it is a bandwidth problem..however 255 lines of text is like …

Software Development c++ ios
Member Avatar for david.k
0
176
Member Avatar for PDB1982

I'm trying to create an overload of the "+" within my program to add a private constant value to an already establish polynomial, but the last portion of my code comes out with the following error: [code] Error 1 error C2677: binary '+=' : no global operator found which takes …

Software Development c++ visual-basic
Member Avatar for david.k
0
178

The End.