64,152 Solved Topics
Remove Filter ![]() | |
Does anyone have an idea about implementing two dimensional arrays in Python?? I want to write two programs: (1) a program for matrix multiplication (2) a program for displaying Pascal's triangle. Both these programs require two dimensional array..? Or is there any other way to solve this.. Thanks in anticipation.. … | |
Hi , Good Morning! Doubt : How to add a hyperlink in xml file. System: Need to plot points on a map.This points x,y coridinates a link is the information contained in the <node> tag.I use php to write this xml file by taking information from the database at each … | |
Hallo: I am new to this forum and am very glad to be here. I am currently working on a Python project which will be using Tkinter for a graphical (Windows)(XP) output. I have studied Python while completing my software engineering degree but have not used it for 2-years. I … | |
Unique random variables. I've tried modifying the code in varying ways, but nothing is working. The program won't add new numbers to replace the ones that were duplicates. [CODE]import random b=0 numbers=[] print "show 6 random unique integers from 1 to 50: " while b < 6: for k in … | |
im realy new on python(started today) and i want to know how to write this script in python [CODE]#!/bin/bash function press_enter { echo "" echo -n "Press Enter to continue" read clear } selection= until [ "$selection" = "0" ]; do echo "" echo "PROGRAM MENU" echo "1 - open … | |
I'm new to these forums,and really new to C++,but here is what i need to know.I made a simple calculator in C++ and i was wondering what i need to be able to keep useing it without opening the program everytime... [code]// simple calc // Chris Wilson #include <iostream.h> int … | |
[quote]Print a 9x9 diamond shaped pattern.......using loops[/quote] [code]#written by Chris O'Leary: #Filename: star.py star=1 space=5 def star_decrease(star,space): while star > 0: print " "*space + "*"*star space = space+1 star = star-2 def star_increase(star,space): while star < 9: print " "*space + "*"*star space = space-1 star = star+2 if … | |
Hello. I'm new to Java and, I'm trying to set up a frame with an Exit Button that uses an event handler. But, it isn't working - here is the code, am I missing something? It isn't even getting inside the if statement. Any help would be appreciated import javax.swing.*; … | |
[IMG]file:///C:/Documents%20and%20Settings/Curtis%20Bridges/My%20Documents/My%20Pictures/Dinosaurs/scan.gif[/IMG] | |
ola I need to copy a file from one directory on my server to another. The thing is, if the file already exists in the destination folder, I need to copy it with a different name (i'd just like to add a 2 or something to the end of the … | |
This program print the verse of "charlie was a pidgeon" 10 times, and finishes off with a cute little surprise. THE DEATH OF CHARLIE SHALL OCCUR! [code] #by Christopher O'Leary #The death of Charlie! def print_charlieVerse(): print "Charlie was a pidgeon, a pidgeon, a pidgeon." print "Charlie was a pidgeon, … | |
I have a text editor I've been working on, and I'm having some trouble with the undo/redo functions... It doesn't work, and I don't know what's wrong with it. I posted all of my code dealing with the undo function. I know it's a lot, but maybe you wont mind … | |
erm greetings.. i have a situation here regarding picturebox. there are 2 boxes, 1 is for template image, and one for image to be compared with. i planned to make the user able to draw a box in template image picbox, as a region where the image the other picbox … | |
1)Can you suggest me how to assign a pre-defined 2-dimensional array to a pointer.The intension here is to pass 2-D array to a funtion so that changes in the function will reflect the 2-D array . [code]void main(){ int array[40][40]; fun(array); } void fun(int **array){ ........}[/code] The above code is … | |
[code] #include <iostream> using std::cout; using std::endl; class aClass { public: aClass() { this->aString = new char [1];; this->aString[0] = '\0'; this->length = 0; } ~aClass() { cout << "Destructor" << endl; delete [] this->aString; } aClass(const char *); const aClass& aClass::operator=(aClass &); private: int length; char * aString; }; … | |
Based off the Self defence class skit: [CODE]# Filename: Madlibs.py noun = raw_input("Type a noun: ") verb = raw_input("Type a verb: ") adjective = raw_input("Type an adjective: ") sound_disgust = raw_input("Type a random sound of disgust, eg 'Uuurh': ") noun1 = noun verb1 = verb adjective1 = adjective moan = … | |
I'm currently trying to create a program in delphi to call up a webpage; the page is written in php and records some data about its contents for record-keeping in my system. I'd like to be able to write the program so that when it opens it does the following: … | |
I am new at this c++ programming thing and i got stocked in this program right here hope someone can help me out id appreciate that // Program Dinner prints out a dinner menu // 1 const SALAD = "Green Salad"; // 2 const MEAT = "Chicken Marsala"; // 3 … | |
The code won't even display the root, let alone the menus. Even when the conversion works, nothing else does, so what do I do? [code]from Tkinter import * root = Tk() def hello(): print "Hello!" def metres_to_centimetres(metre,cm): metre = input("Put in a distance in metres: ") cm = metre*100 print … | |
what does [I]transient[/I] method do? please help me out....... thank u. | |
I really don't think that text adventures, even simple ones are within my grasp. How would you do that anyway, write a seperate Data file for each room or something? They seem very complicated, even the one in the Programs for Beginners thread. Bear in mind, the tutorial missed a … | |
I've encountered the following problem: Our program has two parts - the algorithm which is written in python (with numeric), and the GUI written in java. We want them to be able to work together - that means that the java part could ask the python for a calculation and … | |
HEY i need to differente bettween the admin and employee admin can add delete and update but employee can only add but cannot delete how cani do this i want to use only one form for the table both shud use the same form but admin and employee options shud … | |
Hi,:p Im totally unfamiliar with python - and need a little help. Im trying to add one command to superkaramba theme - it must be done in python file I know how that command looks when given from command line (bash) command is: [B]dcop knotify default notify eventname appname 'You … | |
Can you do these in the IDLE converter, or is it not powerfull enough, as I don't want to download 2 more programs just to expand my Python knowledge. Can I make graphics in the IDLE interpreter, and if so, is there a tutorial to help? | |
It is very annoying, I have typed it as best I can, but option 2 doesn't work. Option 1 is to take the test in Test.py, option 9 is to quit, and option 2 is supposed to print all the questions and answers. This is the code: [CODE]true = 1 … | |
Does Delphi have any way to escape symbols embedded in strings? I'm trying to write a database project, and have just run into a rather nasty problem; the db I'm working with, PostgreSQL, refuses to recognize equality to date functions unless the value being tested is contained within a pair … | |
Need help. How do I fix this code? [CODE]max_points = [25,25,50,25,100] assignments = ["hw ch 1","hw ch 2","quiz ","hw ch 3","test"] students = {"#Max":max_points} def print_menu(): print "1. Add student" print "2. Remove student" print "3. Print grades" print "4. Record grade" print "5. Save Students" print "6. Load Students" … | |
I've created 2 tables in Access and have created a form for each table in VB5. Each autonumber field is the primary key of it's table. When the first form comes up the autonumber field has a value but when I go to the second form the field is left … | |
Hi , i had data in my server folder.can i have any way to check whether that data is image data or not in jsp?.I can do it by checking whether its extension is jpg ,gifor bmp like wise.but we can have somany formats of image data.so apart from that … | |
I'm self-teaching myself C with a complete reference book. Unfortunately that means that the author assumes that the reader is familiar with fundamental concepts and doesn't bother commenting the code. Here is an unnecessarily obfuscated code excerpt demonstrating "the use of return statements" along with my attempt to understand what … | |
I have a problem: How to insert raise in Text()? for example i have file: [code] #my_program.py a=ddd [/code] and other file: [code] #my_file.py: from Tkinter import* root=Tk() text=Text() text.pack() execfile('my_program.py') #text.insert(END,raise) mainloop() [/code] In file my_program is Error. How to insert raise of this error in Text? thanks | |
Please help can you help me debug my code i cant display the result and the computation for sum is error... help me please :sad: [code] #include <stdio.h> int i,counter; float sum; struct cgrade { char course[50]; float credit[50]; float grade[50]; }; struct cgrade GPA[50]; main(){ printf("Enter number of courses … | |
I've got a bunch of fields displayed in a form and I can change them on the screen and the changes are saved in the database. How can I make them so they cannot be changed? | |
i am a little bit confused about the actual usage of the find function of map i have say a vector<string> and i want to return the relative position (or iterator) of a key (of type string) in this vector. now, the find function accepts only one input which is … | |
Hi, I don't know if this is possible. I have a data structure that is displayed in various tabbed panels in various forms(JList/JCheckList etc.). Some of these panels are able to manipulate the data structure. Is there a way to attach some sort of ActionListener to data structure so whatever … | |
As far as I know when a check box is check the value should be 1 and when it is not checked it should be 0 correct? In my case if I don't check the box its null and if I do its -1 Here is my code [code]Private Sub … | |
Again, I don't know what I've done wrong. [code] #include <iostream> using std::cout; using std::endl; #include <cstring> using std::strcpy; using std::strcat; #include <cstdio> using std::sprintf; void destroyMultiCharArray(char * * anArray, int size) { for (int i = 0; i < size; i++) { delete [] anArray[ i ]; } delete … | |
I am attempting to track and record information in a specific php file used where I work. The file is not my own work originally; I inherited it from my predecessor in the position. I am somewhat familiar with PHP, but not an expert. Additionally, I am still a newcomer … | |
[code] #include <iostream> using std::cout; using std::endl; #include <cstring> using std::strcpy; using std::strcat; #include <cstdio> using std::sprintf; int main() { char * lb = "(?:[a-z90](?:-?[a-z90]+)+)"; int lbLen = strlen(lb); char * sbFrmat = "(?:%s(?:\\.%s){0,4})"; int sbFrmatLen = strlen(sbFrmat); int sbLen = (lbLen * 2) + sbFrmatLen; char sb[sbLen+1]; sprintf(sb, sbFrmat, … | |
In my program I want to add records to the database and then reference them by a unique identifier such as a user id. Even if the user name is the same as another, The would be different IDs so I could pull data on the correct one. So my … | |
I'm trying to use scansets to filter out out some textfiles. #include <stdio.h> int main( void) { int i; char str[ 80], str2[ 80]; scanf("%d %[abcdefg] %s", &i, str, str2); printf("%d %s %s", i, str, str2); getchar(); return 0; } When I input "123abcdtye" I expect the output to be … | |
Hey again, Im seriosly having difficulty displaying the current date and time in java/jsp. THis is the code im using to get the date and time: public static void main(String args[]) { Date date=new Date(); SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yy"); String strDate = sdf.format(date); System.out.println(""+strDate); } but nothing seems to … | |
I have a text box that will be populated by data, sometimes to long for the form and I wanted to add a vertical scroll bar to it, but I'm not sure how to link them together. I can place it on the form but it doesn't work the textbox. … | |
Greetings, I need help with the javascript below. So far, I am able to pass the date through a pop-up calender and this script receives the date in format of "28 Aug 2006 11:47 PM" as a string. I then split the string and take each field for further processing. … | |
Hi ppl, I have made a declaration: char* str; str = " Hi there"; what do i have to do to extract a substring from this? [I]Thanks,[/I] [I]Ishwar[/I] | |
Hey guys, I was wondering if anyone can help me in terms of using atoi to get my my results to add the 1's of my binary output and then join them together... eg. 110101 and 100101 is 4 and 3 = 43. I was thinking of integer dividing the … | |
I'm new to VB so my question is probably very simple. anyway here it is.. I want to make a side bar showing one form that is like a sidebar in a web page such as on the left side of the MDI form. Which holds the programs main functions … | |
I get a segfault when I run the following. Seems to fail at strcpy. [code] #include <cstring> using std::strcpy; int main() { char * word = "word"; strcpy(word, "what"); } [/code] If I change char * word to char word[], it's fine. I thought that both declarations effectively do the … | |
I'm new to VB...Really new. The main thing I am needing to accomplish is this program I am trying to make. It's just a counter. You click the button and it shows the number of clicks in the label. Well, There are 14 counters in the one program. But I … |
The End.