132,726 Archived Topics
Remove Filter ![]() | |
I'm working on a problem where I am trying to validate the user input to verify only digits have been used. I'm trying to use the ASCII code to do so, but I'm stuck. I would greatly appreciate any help that can be provided. Thank you in advance!!! *Delilah* [CODE]#include … Software Development c++ | |
I downloaded OpenCV last Wednesday and tried to link it with DevC++ I followed the instructions found [URL="http://www.cypax.net/tutorials/opencv/index?language=en"]here[/URL] and I get the error cannot find -lhighgui ld returned 1 exit status I'm sure the code that I tried to compile is working because I previously compiled and ran that code … Software Development c++ | |
code not working [code=c++] #include<iostream> using namespace std; typedef struct node{ int data; struct node *next; struct node *previous; }mynode; mynode *head,*temp,*current,*tail; void add(int data); int main() { head=NULL; tail=NULL; add(1); cout<<"added 1"<<endl; add(2); add(3); add(4); } void add(int data) { temp=(mynode*)malloc(sizeof(mynode)); temp->next=NULL; temp->previous=NULL; if(head == NULL) { head=temp; tail … Software Development c++ | |
Hi All, I need to write a class to draw and add some components on frame like images,rectangles. I have a class which is already written by some other person, and now i need to add 14 adjacent rectangles on the existing frame. [CODE] import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; … Software Development gui java java-swing | |
Hello I just started programming and managed to make some programs, but what I don't get is when I get these errors: Compiler: Default compiler Executing gcc.exe... gcc.exe "D:\Documents and Settings\Riikard\Desktop\Untitled1.c" -o "D:\Documents and Settings\Riikard\Desktop\Untitled1.exe" -g3 -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib" -g3 D:\Documents and Settings\Riikard\Desktop\Untitled1.c:1:20: iostream: No such file or directory D:\Documents and … | |
[CODE]import java.awt.*; import java.awt.event.*; import java.applet.*; /*<applet code="actionapplet" width=500 height=600></applet>*/ public class actionapplet extends Applet implements ActionListener{ String msg,str; Button b1,b2,b3; public void init(){ b1=new Button("substract"); b2=new Button("add"); add(b1); add(b2); b1.addActionListener(this); b2.addActionListener(this); } public void actionPerformed(ActionEvent ae) { str=ae.getActionCommand(); if(str.equals("add")) msg="addition is to be performed"; if(str.equals("substract")) msg="subtraction is to be … Software Development java | |
I have met a proplem in correcting the following file and please submit to me by correcting the errores and if you can please help me in sorting and updating this file #include <iostream> #include<fstream> #include<string.h> using namespace std; struct gum { string nam,fnam,typ_item,nam_pack,coun_cons; int tin_no,reg_no,tot_item,tot_pack; float weigh; }; void … | |
Sending one image works, but when i repeat the cycle again it just doesn't work. my Client side code (excerpt): [code] for(int i=0;i<50;i++){//fromServer.contains("image") img = ImageIO.read(in); System.out.println("Got image."); label = new JLabel(new ImageIcon(img)); scrollPane.setViewportView(label); fromServer = reader.readLine(); }[/code]On the client side i have this output [code]Got image. Got image. Exception … Software Development client-server java java-swing | |
I'm searching a text document and replacing substrings with other substrings. So for instance: "ra,16([B]sp[/B])" with "ra,16([B]$sp[/B])" The issue I'm having is that say I have the following string: "sp,sp,24" How do I re-iteratively replace "sp" with "$sp" twice without getting: "$$sp,$sp,24" This is my code: [CODE] ... if ( … Software Development c++ | |
I've seen that a vector can be sorted using [code] vector<double> V; vector<int> Index; V.push_back(9); V.push_back(10); V.push_back(8); Index.push_back(0); Index.push_back(1); Index.push_back(2); sort(V.begin(), V.end()); [/code] If I want to sort Index according to how V was sorted, there is an optional third parameter to sort() that will do this. I don't understand … Software Development c++ | |
[COLOR=Blue]Hello.... I'm currently using Netbean 5.0 and I just want to add some GIF files to my program when it builds. I'm using the files as icons for some of the GUI buttons and labels. But when I select clean and build main project or build main project and execute … | |
Hello. So the most I can tell you is i'm having serious trouble with my code of writing to a txt file. It's not that my code isn't working, it's that c++ is outputting WEIRD crap that makes no logic sense, doing things out of order, and just seriously screwing … Software Development c++ | |
I want to make a Desktop Effect (for example: fallen leave, snow,... on Desktop) but I don't know how to do that (one of these problem is: how can I do "something" on Desktop, because every program that I had programed run in a window) Who can discuss this problem … Software Development c | |
I met a problem in sorting a file containing astudents fistnane, secondname and GPA.if I sort the file using first name or lastname their Gpa will be miss placed please help me. the file is: kalayu haile 3.5 fikadu adisu 3.99 eyob assefa 3.25 getaneh allesew 3.75 fraol gezahegn 3.00 … Software Development c++ | |
Hi, My code opens Excel 97-2003 version Excel file correctly, but gives error when the Excel file is in 2007 (*.xlsx) format. How to solve this? - Mahesh Software Development microsoft-office python | |
My question may be funny but i want a right direction so i am posting it. I know fundamentals of c and c++ and i want to go ahead in it. I heard about windows and system programing but i am confused that app like antivirus, process explorer, anti spyware … Software Development c++ | |
Hi everyone, I have the following code to save the text inside an editbox: [CODE]var Data: TStringList; begin Data := TStringList.Create; try Data.Append(Edit1.Text); Data.SaveToFile(Savedialog1.Filename +'.txt'); finally Data.Free; end; end;[/CODE] And this code to load it to that editbox where i saved it from: [CODE]var Data: TStringList; begin Data := TStringList.Create; … Software Development pascal | |
Is it possible to write a code that prints 'its own code' when executed? Just a thought. Software Development c++ | |
:S what iz event model??? what is its use n why i shud use dis n not others????? plzz xplain wid eg........ w8iting....:-/:?: Software Development java | |
Is there other way to write a Menu code, not using Switch, or creating other Method homework : create Menu in Java code i was wondering if it can be achieved not using switch and not creating other methods (public static void Main)(public static void sayHi()) Thank you. Software Development java | |
Hi I was wondering if there is any way to created a series of lists in a for-loop so that the first list created is named NAME0 or name_0 or indexed in some way. What I have right now is [CODE]for j in range(int(L)): popsizelocus_j=[][/CODE] however, this is not working … Software Development programming-construct python | |
Hi, I'm developing a window-based application where I've a Main Form A. I open another form B on a button click. When I close Form B, I want to reload the Form A. Please help as soon as possible. Thanks in anticipation. Software Development vb.net | |
[CODE] #include <stdio.h> #include <stdlib.h> struct amicable { int** amicablePair; int size; }; struct amicable *getAmicablePairs(int startnum, int endnum); int sumFactors(int number); int main(int argc, char** argv) { int startnum = 220; int endnum = 284; struct amicable* ami; int i; ami = getAmicablePairs(startnum, endnum); if(ami==NULL) { printf("Error: malloc could … Software Development c | |
Help! Im trying to overwrite a certain record in a text file (basically a log in log out file). Im using Random Access File. I tried to write the updated record using writeBytes but what happens is that it was APPENDED after the record i wish to overwrite. from 150.20.111.0&2010062216:06:31 … Software Development java | |
If you're doing programs for academic reasons, this is a good site to go for C++ information. Good for snippets. Used it a lot through classes. http://www.mvhs.net/~rkrane/clecs/ | |
Hi All, I am doing a project on a Video Library Management System for my final year Computer Science project and I've run into acouple of errors. Could anyone out there help me out...???? Please, I'm desperate...! Thanks. Software Development visual-basic | |
Please help me how to use clrscr(); and gotoxy(); functions in other C Compilers? Software Development c++ | |
whats the easiest way to change the progress bar value depending on where you click on the actual bar itself (window media player) in c#? i use WMP library:confused: Software Development | |
Hi I am a novice in Shell Scripting but wanna learn it as soon as possible as it is such a powerful language. I already have a script created(by a senior fellow) and I can run the .sh file simply by command ./xxxx.sh Now I have created my own script … Software Development shell-scripting | |
I'm making an application that converts units. I cant not for the life of me figure out why this isnt working. The answer returned is 0.0 when I convert from Fahrenheit to Kelvin or vice versa. The K to C conversions work though. Any insight would be amazing. This is … Software Development java | |
help on this enrollment system in cprogramming when I run the programming the output sometimes fall through example when i enter the student number name and address but when i press enter in the address it skips the scanf in the status and goes to the gender it alse does … Software Development c | |
I have a VB6 program running fine on the machine I wrote it. When I create and exe of the program that works also. If I export the program to another machine I get a 'Class not registered. Looking for object with CLSID {00000010-0000-0010-8000-00AA006D2EA4}' error. After a bit of research … Software Development microsoft-access visual-basic | |
I am having a problem with my final assignment. Now it began with an apology from my prof on the said assignment because for the pass 9 weeks we have done projects that has focused on a small part like change colors, stream, inheritance, etc. Now the final is to … Software Development file-stream gui java java-swing | |
Hey Guys : Here The problem is :to have a program to check the -(sys.argv) is long enough to have more than 3 elements if not then print "input more " -check (sys.argv) contain a specific elements for ex(P) ,& if P is found in the given elements then it … Software Development python | |
[code=php] class Item(object): def __init__(self, ID, name, price, stock ): self.ID = ID self.name = name self.price = price self.stock = stock def getID(self): return self.ID def getName(self): return self.name def getPrice(self): return self._price def setPrice(self,value): self.price = value def buyStock(self, howMany): self.stock += howMany def sellStock(self, howMany): if howMany … Software Development python | |
Hi there, The program in hand must retrieve a bunch of data from an SQL Database (currently stored in a DataTable), fiddle around with the data, and then upload the changed data to the same SQL database. Everything works fine at the mo apart from the final bit, uploading to … | |
Hi, I am trying to write elements from a list that I have created to an outfile using a for-loop with this code: [CODE]for j in range(int(Allele[i])): outfile.write(' allelelocus[j] * ')[/CODE] However when I do this I just get a whole bunch of allelelocus[j] in my out file. I was … Software Development programming-construct python | |
I have a Python script that creates a Tkinter window running in Ubuntu. In the script I have an if/else statement that changes the background color based on a variable. That all works. What I cannot figure out how to do is when it changes the background color, I also … | |
Hello, I am trying to send an object over a socket using C#. I originally used a memorystream and binaryformatter, but to do this I need to include a reference from program1 to program2. I don't want to have a reference, so I just want to be able to transform … | |
hi, am currently working on a assignment in which i hace to make a graphic using the g class blink on and off for certain intervals. i was wondering if someone would know how to make a graphic do so since i only know how to make a picture blink | |
I put the code on a pastebin thingy so this post would be easier to read. [url]http://paste.pocoo.org/show/229111/[/url] Anyways, basically, I have this 250MB text file that has a string of letters. 50 letters per line, and LOTS and LOTS of lines. I tried doing this before, but I got a … Software Development python | |
Alright guys I have a question. I am trying to write a custom data type. Let me explain a little further. I'll start out at the base. te_char (you don't really have to worry about this. >char c_char >rgb color te_word (weird part) >int type (based on an enumeration >vector … Software Development c++ | |
Can someone help me with this code.. I get an error when I try to execute it [code] from graphics import * def main(): colour = raw_input("Enter the colour: ") win = GraphWin("Patch", 200, 200) drawCircle(win, 50, 50, colour) def drawCircle(win, x, y, colour): for i in range(5): for j … Software Development python | |
I have this code and having matched the input, I want it split into two separate variables. The input is in the form of a range (e.g: 1-10) and is written in perl. Here is the code: [ if($pr=~m/^([0-9]+)\s*[-]\s*([0-9]+)$/){ print "Match"; } else { print "Not a match"; } ] … Software Development perl | |
Here is the code: [CODE]#include <cstdlib> #include <iostream> using namespace std; //Declare function int triangle(int num); int main() { int n; cout<<"Enter a number and press RETURN: "; cin>> n; cout<<"Function returned:"<<triangle(n)<<endl; return 0; } //define function int triangle(int n){ int i; int sum=0; for(i=1; i<=n; i++) sum=sum+i; return sum; … Software Development c++ | |
Hello, Ive started to programming a few days ago, I'm totally new never done it before. Ive read through the internet for some knowledge about programming. I used the program code blocks to program yesterday but I got some errors in it so I uninstalled it, it wasnt really errors … Software Development c++ | |
I wrote a console calculator application in Microsoft Visual C++ Express 2010 and built it as release. It runs fine on my computer but when I moved it to another it said it needed a certain .dll which was not previously, and said reinstalling the application may fix the problem, … Software Development c++ | |
Hi Guys , i have files which are of different sizes.How can i insert a text file which has more than 4000 characters in database .My table field is of type nvarchar so i cannot have more than 4000 characters ,is there a way around? Software Development | |
Hi. How can i push into the same vector types of string and integer too ? Software Development c++ | |
Does anyone know how to download the index page from the website using a python script? For a start, I don't understand the concept, google doesnt seem to throw up any relevant articles so am a little lost! Software Development python |
The End.