132,726 Archived Topics
Remove Filter ![]() | |
Hi everybody. Mi first post: I'm trying to learn some python From CLI I run: python file.py [ICODE]import sys lines = 0 words = 0 chars = 0 for line in sys.stdin: lines = lines +1 words = words +1 chars = chars + 1 print lines, words, chars[/ICODE] I … Software Development python | |
Candy Machine Simulation Write a program to simulate a candy machine.Your machine offers candy for 75 cents, gum for 50 cents, and chips for $1.You should ask the user repeatedly which of the three items she wishes to purchase, or whether she wants to quit.If she chooses to purchase an … | |
hi i want to close an excel file. i have already this code [CODE]Windows("datamppm.xls").Activate ActiveWorkbook.Close savechanges:=True Application.Quit End [/CODE] but when ik click te button to close the excel file. excel gives an "error" that there are item on the clipboard. en then i have to chose yes or no … Software Development file-system visual-basic | |
I am trying to do a primary key so that each member can't hava the same ID and if th same ID is entered an error is give. Can someone please help me cause I can't do it at all.Thank you. [CODE] static void addMember(ArrayList<GymUser> UserListIn) { String tempUserrID; String … Software Development java | |
well im login in sql server through window authentication then wat code i should write in C# to write my connection string urgenttttttttttt Software Development sql | |
Please help me how you will make a program that using structure with a structure ?? example please struct data { char name; int age; } how will you make your structure be in within structure ??? and please kindly explain what this mean ppre->link=ploc->link ? ? ? ? Software Development c++ data-structure | |
Hai, i am tried to use the SQL Server with Java and Tomcat 5.0 Application Server. I am using the JDBC Driver for Java connecting with SQL Server. I m using SQL Server 2005. But the JDBC Connection doesn't create. I have used the following code for java database connectivity … | |
Hi, simple question but maybe with an advanced answer: [B]How do I get Dev-Pascal to read other files?[/B] [B][U]Example[/U][/B] I've tried to make a variable and make it as a text for example ([B]var[/B] test:text;) and then assign(text,'textfile.txt'); but then I want pascal to read it and open it in … Software Development pascal | |
how can i limit the textbox to input sysmbols and numbers such as 1,2,3,4,.......;'/,[]=-.... and as such pls help... Software Development visual-basic | |
I have to write a script called trying. The script takes a full path (like /users4/st/jdoe/prog.c) as an argument and displays the path and the file name. For /users4/st/jdoe/prog.c, the path is /users4/st/jdoe and the file name is prog.c. I know that I can use grep for it, but it's … Software Development shell-scripting unix | |
Can somebody let me know how in Word doc can a word be searched and then get Nth word in that line(found text line), using VB?? Software Development visual-basic | |
so i wrote this recursion program that uses memoization to calculate the fibonacci numbers. it's supposed to scan a user inputted number, call the method, check to see if the number is in the array, if not store it, ad increment the counter. so i should end up with the … Software Development java | |
Hello, I'm taking a project with vb.net and i need someone to help me with the source code for connecting to an access relational data base. Pls I don't want to use a wizare. Software Development vb.net | |
In this method I am trying to locate a user by its ID and then remove it. I am having errors in the second if statment (cannot find symbol-method getID() ). [CODE] static void removeMember(ArrayList<GymUser> UserListIn) { Scanner keyboard = new Scanner(System.in); keyboard.useDelimiter("\n"); System.out.print("Enter the ID no of the member … Software Development java | |
[code=cpp]/*I've actually located the segmentation fault location, I believe it is because I am trying to declare one array memory location equal to another when they are in seperate memory segments. However, if this is the case I have no idea on how to correct it. Here is my code … Software Development c++ | |
I'm in a CS class in college now, and it's in C++. I have done all the things we're covering this semester... but in Java. I'm trying to write a basic program that uses a 3d char array to store the last names of passengers in an airplane, but when … Software Development c++ | |
I'm making a program that is supposed to store the circles in a file, each circle should have an id and a radius. after i Add some circles to the file i need to open it again and search for a specific Id to display it. Here's what I've done … | |
I get binary data from a file which is to be displayed in hex byte wise(i.e. 2 digits). format$(hex(num),"00") places a leading zero for single digit numbers but it doesnot support for hex (A-F). How do i get leading zeroes for bytes of values A-F? Is there any simplae way … Software Development visual-basic | |
Please see the attchment for the assignment. Please help me !!!!!!!!!!!!!!!! Software Development c | |
hey guys, i have a project due tomorrow on recursion. the task was to write a recursive program that prints the value of fibonacci numbers and the number of calls made. i wrote the program and it returns the value at the end just fine, but i have been unable … Software Development java | |
in my project i need to load another software (it is just for viewing purpose) through a Vb form . i tried to use OLE containers, but when i run d program and double-click the icon in the OLE container, it doesn't do anything, not even sends an error msg … Software Development visual-basic | |
Is there a way to interpolate between RGB values? I have a set of values that I want to map (linearly or otherwise) to colors from a color_min RGB triple to a color_max RGB triple. Since RGB is not "incrementable", how would I do this? Thanks, David Software Development c++ | |
Please tell me how to store a user given input as one of the options in the combo box?? I have put up a combo box on my form with no collection,no options to choose from, in it.I want the user to enter some value in it and the next … | |
OK, so heres my code, check it out, let me know what you think, I'm trying to embed a serpenski triangle into it, and the program isn't crashing but it isn't displaying and I'm not sure why, if you can tell me it would be greatly appreciated. Also, I need … Software Development python | |
Hello does anyone know how to lock the system within a specified time? Like a screensaver.. Actually i want my system to automatically lock if it is unused for about 15 minutes..tnx in advanced Software Development visual-basic | |
[code=c++] bool list::remove (char * key) { char id[100]; cin.get(key, 100 ); cin.ignore(1, '\n'); //cin >> key; //remove data from the list if it exists node * prev = NULL; node * curr = headbyName; while (curr) { curr->item.getName(id); if(strcmp(key, id) == 0) { if(!prev) headbyName = curr->next; else prev->next … Software Development c++ | |
I want to create a program in [COLOR="Red"]VB.NET2005 [/COLOR]windows application which will show google map on the form along with its contols of zoom. OR Also an image on form having zoomin and zoomout buttons. Please Help!!!! :icon_cry: | |
I have to basically write a fuction that does the inmemoized recursion and count the number of times is called..which i did.. the second part is that i dont understand which is to create a global array of 100 and calculate the function using memoization... can some one help..this is … Software Development java | |
what im trying to do is read in a data from a file into 4 different arrays then also read in the same data using array of structs. the assignment is to show that we know how to use both methods of reading in and sorting the data. i have … Software Development c++ | |
Hey everyone.. I'm having a little problem with something I'm writing for a class.. I'm supposed to use while and a nested IF statement in the solution, but every time I run it I get the following back: [quote]Run-Time Check Failure #3 - The variable 'A' is being used without … Software Development c++ | |
I've made a program that can scan through a plain text document for the string "SA001:" and if it's not there, it ads it in at the top. But the problem comes with the saving to the document: It adds some things to the document that I don't know how … Software Development python | |
I'm getting 3 unresolved external symbol errors. I think it's probably syntax but I can't seem to find it. This is a class I was supposed to write based on the professors specifications. The header and implementation file are mine, while the driver file cannot be edited for this assignment. … | |
When I click on the exe file to open it up via a folder or my desktop etc... it will show a black cmd window for about half a second and then close, however if i find the directory of my exe through cmd and then run it that way, … Software Development c++ | |
Hi, I have written a program that copies one file to another while making format changes to some lines The relevant part of the code is the following" [code] while(fgets (cbuff, 80, f1)!= NULL) { if ( (isdigit(cbuff[5])) && (isdigit(cbuff[11])) && (isdigit(cbuff[17])) ) { strncpy (c1, cbuff+1, 5); c1[5] = … Software Development c file-system | |
I am trying to use a GoTo statement but it says "Error 1 Labels are not valid outside methods." My code is like this: [code] Public Sub Start_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Start.Click Start: Dim ...... End Sub Public Sub Retry_Click(ByVal sender As System.Object, ByVal e … Software Development vb.net | |
Lost again...Just trying to "tie" a header file to a .cpp file, but I keep getting a 'need ;' before '{' ..... in my .cpp file at LIST::LIST() { x = 0; } Here are both files that I am fooling with: [CODE=C++] #ifndef LISTS_H #define LISTS_H #include <iostream> using … Software Development c++ | |
Hey all. I am having some problems in my project work. I am trying to this 'transaction' class in which the user enters his personal details.Now all I want to do is that when I create a new account for the user, I must also know the date when the … Software Development java | |
i have to do a seven segemtn display for 2 numbers but at the moment it looks like this:- [url]http://i28.tinypic.com/a176ep.jpg[/url] but i want the 1 and 3 to be next to each other but i cannot seen to do this here is my pascal:- [CODE]Program sevensegmentdigit; Uses Wincrt; Var x,y,n1,n2 … Software Development pascal | |
hi,hello to anyone there can anyone help me to fix my problem about C#.Net conditional exercise.The problem is write a problem that asks the user for the hours worked for the week and hourly rate.The basic salary is computed as: Salary=hours worked*hourly rate bonus are given: No.of hours>45 Bonus of … Software Development | |
[CODE]corr[8]="pizzaboy"; error-- cannot convert char* to char corr[]="pizzaboy"; error-- char has zero values corr[0]="p" corr[1]="i" corr[2]="z" ----- syntax error corr[8]='pizzaboy' ------- char const can have 2 chars [/CODE] Is there any way to input:'( :'( :'( :'( :'( Software Development c++ | |
I took out a lot of code, hence all of the variables you can't see, but for some reason, this part is the only one thats screwing up. When you enter zero, its supposed to "cout" a phrase that you don't have money, but when I run it, it tells … | |
i have done some coding back in '99 in visual basic, and i remember there a command to excutse a message box to input data . is there a similar function in C++ to excute a message box for input in a windows os ? Software Development c++ visual-basic | |
[CODE] Struct threshold { long value; int exponent; }t1,t2; t1.value = 2; t1.exponent =3; t2.value = 3; t2.exponent =4; [/CODE] The first structure (t1) is 2 x 10^3 The second structure (t2) is 3 x 10^4 I want to get the result after division of the two structures. The Reault … Software Development c | |
input file: 1 0 0 2 1 0 0 2 1 I would like to produce this in a 3x3 array on screen. My code: [code] #include <fstream.h> #include <stdlib.h> int i, j; int matrix[3][3]; int main () { ifstream inFile; inFile.open("input.txt"); if (!inFile) { printf ("Unable to open input … Software Development c++ | |
I have no background with programing, but would like to start learning. Can you recomend a good book to start with. Software Development c++ | |
Hello guys, how are all you doinbg ? Well I just created this program to cound 24 hours. The program runs fine but my only problem is when I ran the programs i get the following [inlinecode]0:0:0 4469690:0:1 4469690:0:2 [/inlinecode] Where is the number 446969 coming from ? I am … | |
My project is to build a hotel menu and billing program. The problem is I have to use user defined functions to do it. 1st Function [code=c++]int password(char usr_name[8], char pwd[]); { int j=0,k=0,i=0,m=0; corr[8]=pizzaboy; for(i=0;usr_name[i]!='\0';i++) { if (usr_name[i]=corr[i]) n=1; } else n=0; po[5]=qwerty; for(j=0;pwd[j]!='/0';j++) { if (pwd[j]=po[j]) m=1; else … Software Development c++ | |
I need to print out a number that begins with 7, without the seven. For example, print 71011 as 1011 or 701 as 01. I've tried many techniques and just can't get it to work. Is there a printf format that will let me print out everything left of the … Software Development c | |
I need to write something like this, just plain and simple c. 1. Program starts and prints 5 news titles 2. You select one and it prints news body 3. after viewing you select close and select other one or exit program 4. after that it prints "sort by views" … Software Development c | |
Guyz I have again got a problem with functions. [ICODE]"" Write a function to input matrices"" [/ICODE] Or how can I input using fuctions ?? is it possble ?? so far I have developed a few lines. [CODE] //fuction to input a 2D-array. int multi_array(int r , int c)//r is … Software Development c++ |
The End.