132,726 Archived Topics
Remove Filter ![]() | |
I am trying to sort a file by a quick sort comparison. The problem lies in parsing the string and comparing fields. I use the following to break up a line: records = [line.split(spl) for line in file(filename)] and the following to sort: records.sort( lambda a,b: cmp(a[fieldNo],b[fieldNo]) ) This works … Software Development python | |
I'm testing to get my python script to still run if the smtp server it uses went down. I have a local mail server im testing this with. The issue is when testing it, i get a large spew of text. It checks all its libraries and such, untill its … | |
Hi guys I need help getting an event from a button in one class, so that i can act upon it in my other class. Because the class that invokes the class that has the buttons in it is the outer class, it has no access to the buttons on … Software Development java java-swing | |
Okay so I'm making a basic spellchecker. I'm using a relatively small dictionary with about 1000 of the most common english words, all on separate lines in a text file. I'm on windows so I can't use the Linux dictionary. Anyways, It's not working. And I'm not quite sure why. … Software Development java | |
Hi Guys , i am trying to connect date time picker to database.So what i am trying to do is when user select a date in the datretime picker ,it should display all the words added on that particular day.Can anyone help me with this.Thanks Software Development | |
Hi Guys, I am getting index out of range error.My code looks like this [code] private void submit_Click(object sender, EventArgs e) { if (form.dataGridView2.SelectedRows.Count == -1) return; // column header clicked - do nothing // get the row just clicked DataRowView drv = form.dataGridView2.SelectedRows[0].DataBoundItem as DataRowView; if (drv != null) … Software Development dataset | |
I am beginning to write a tkinter program that will generate a DnD 3.5 Character Sheet. I haven't gotten very far. I'm using Python 3, and for some reason the sticky option of the .grid() method isn't working. When I run the code below, I get an error that says: … | |
Hi, i want to renaming tag in xml file with using xslt. Can anybody help me. [CODE=XML]<?xml version="1.0"?> <section> <p>1</p> <p>2</p> <p>3</p> <p>4</p> </section>[/CODE] OUTPUT:- [CODE=XML] <?xml version="1.0"?> <section> <paraone>1</paraone> <paratwo>2</paratwo> <parathree>3</parathree> <parafour>4</parafour> </section>[/CODE] Software Development xml | |
Hi, Assume, I have a following table whose schema is, create table testing (test1 integer not null, test2 integer not null, test3 integer not null, test4 integer not null); And assume the following details are inserted: insert into testing values (1,1,0,0); insert into testing values (1,1,1,0); insert into testing values … | |
Hello, pls can somebody have a look at my script and tell me why I can't get a value from d1? (print d1). Thank you for help. here is a script: [CODE]def subtract(): d1=file1(filename) dd2=file2(filename) res = dict() print d1 ## for key in d1: ## if key not in … Software Development python | |
I suggest it's just a simlpe tiny thing that has to be done to solve this but I simply can't figure it out! I hope anyone can help me. Here's what I koppied from a learnbook for python. >>> secret = 1337 >>> guess = 0 >>> l = 0 … Software Development python | |
I have a JDesktopPane that opens and with a login it will add an InternalFrame with the InternalFrame 'innerclass'. The problem is that when I want to add another InnerFrame to the desktop I can't call the inner class to add an Internal frame because it wants me to login … Software Development java | |
Say I have a file structure that looks like this [CODE]root folder/ main.py -folder a -script.py -folder b -img.png[/CODE] How could I load the img.png file from script.py? Should I just have a function in main.py that gets the path of the root folder, and then tac the 'folder a' … Software Development file-system python | |
I need to create a program for reading two numbers,printing them,confirming them and then summing them up. Here is my attempt [CODE]#include <stdio.h> #include <conio.h> void main() { clrscr(); int a,b,s; char c,d; s=a+b; printf("Enter any two numbers "); scanf("%d %d" , &a, &b); printf("The numbers you have entered are … Software Development c | |
Hi, I am still experimenting with STL trying to weigh up the pros and cons. I wish to define nested/embedded classes i.e. [CODE]typedef std::vector vector <class B> bVecArray; typedef std::vector vector<std::string> sVecArray; class A{ bVecArray bObjArray; std::srting curLine // current line in dataFile ... }; class B{ sVecArray header; };[/CODE] … Software Development c++ | |
Hi, I work with Scriptura Designer (eclipse based) for document generation. I have to generate now a European transfer form. So I have to add a space between the characters. ex: <chead:LastName>Van Messem</chead:LastName> <chead:FirstName>Erwin</chead:FirstName> So I want in return between each character a blanco space. (Like this: V a n … Software Development xml | |
hello dear, i have little problem with my code can somebody help me: thats the problem: Write the assembler instructions that will Convert Celsius Degree to Fahrenheit degree. Note that if the degree is 0 grades Celsius, print out information: “The highway is freezing”. Note that the Celsius degrees need … Software Development assembly | |
![]() | Hi, I trying to get the LAST modified text file in a folder, but unsure how to do it. I am using the following code:- [url]http://www.adrianxw.dk/SoftwareSite/FindFirstFile/findfirstfile3.html[/url] [code]#include <windows.h> #include <iostream> using namespace std; int main() { SYSTEMTIME SysTime; HANDLE hFind; WIN32_FIND_DATA FindData; cout << "A very basic FindFirst/Next demo.\n" << … Software Development c++ |
what comand is used for printing a text ?? OpenGL programing .. with GL in front .. IF ( something is set ) bla bla bla bla bla bla print text ( what is the comand ) else same here ?? GL_printtext .. or something ?? | |
Hi there I am trying to design a flexi sheet calculator for work so that the users can use this program to calculate their working hours. They enter their times manually over the week. This is a calculator for them to use at the end of each week to calculate … Software Development visual-basic | |
I have an MDIParent form with a button in it. I have it so that when i click the button it gets disabled. What i need help on is that, I need to know how to re-enable the button after i exit out of the form that opens when i … | |
Im trying to finish this calculator program, its for a writing rpg on a forum, for a post you get line count creativity rating and difficulty rating using these 3 things you use a special formula to find out the final power level, this code compiles ok, but when it … Software Development c++ first-post | |
I have an assignment that has me reading in a file and creating a token for each string and special characters in it (which isn't the part I need help with). I currently have part of the program working 98% but am getting an error when I execute the program. … Software Development c++ open-source | |
Hi, I have to make a program containing 52 Buttons having icons on them and have to attach action listener so that each button could function independently. Have used array in this program and have also been able to attach action listener with the array of buttons. Action Listener works … Software Development java java-swing | |
HI guys how can i insert todays date in my query,my query is as follows: [code] myString = @"INSERT INTO wordTbl(word,text,date) Values('" + (string)row["word"] + "','"+richTextBox1.Text+"','"+DateTime.Now.ToString()+"')"; [/code] Software Development | |
how can i redirect from one form to another in visual studio.Or even better would be if i can just change few panels in the form when i click change or save button for eg. Thanks Software Development visual-studio | |
Hello Members, I have a java file (myapplet.java), the myapplet.class file and the myapplet.html file. I would like to run this applet on my webpage. I use IE 7.0 The myapplet.html and myapplet.class files are both in the public_html folder of my UNIX account,which happens to be on the school … | |
hello every one. am trying to create Image from byte array in my page. First i create the image by System.Drawing.Image then am trying to convert [CODE=c#]System.Drawing.Image[/CODE] to [CODE=c#]System.Web.UI.WebControls.Image[/CODE]. but the compiler says "Cannot convert type 'System.Drawing.Image' to 'System.Web.UI.WebControls.Image'". So any one please help me.Thxs. Software Development image | |
Hello, I had a question regarding nested structures. Lets say you *have* to use the following structures: (disregard the numbers thrown in, I just tossed random numbers in). [CODE] typedef struct info{ char name[20]; char address[50]; char serial[15]; } PERSONAL; typedef struct person{ PERSONAL individual[50]; int number; } PERSON; [/code] … Software Development c data-structure | |
Hello, I can't seem to get my program to build correctly. It seems I've finally gotten close because now it will build with no errors but with 2 warnings. I'm not sure what else to change in my code to fix it. Could anyone please help? Here's my code: [CODE]// … | |
I need the user to input a book title then price, once that is done when the user searches for the book it displays the title and price that the user has made. Right now its showing weird numbers when displaying the price for book. [CODE]#include<iostream> #include <iomanip> using namespace … | |
Trying to create 20 files using ofstream. I could name each individual file on creation, file01.txt, file02.txt ect but wondered if it was possible to use a string variable in place of say the file name (file01.txt) and then use a loop to create the other files. Does the name … | |
Hi, I have the picture box in which i draw the rectangle (using graphics paint) and inside that rectangle I typed some name using label box and stored the work, have done When I opened the saved Image the position of text I typed in the label box not in … Software Development file-stream objective-c | |
I have a Visual Basic 6.0 application, it contains a form with onload event, and a Timer. When I run the application as a scheduled task (Run as: Administrator, Run: At system startup) it executes the onload event, but it will not start the Timer. If I run the application … Software Development visual-basic | |
Hello ..i am trying to get the factorial of large integers but i get 0 every time i try,,can anyone tell me why ,,,Thanks in advance . [CODE]#include<stdio.h> #include<conio.h> int factorial(int n); //main main() { int x,fact; printf("Enter a positive interger \n"); scanf("%d",&x); fact=factorial(x); if (fact==-1) printf("the number is not … Software Development c | |
Hi! Im using a webbrowser control, and i want to read the html source immediately, as it arrives in more parts, dont want to wait until the whole document downloaded. I look for an element with specified id, and when its present in the arrived part of html, invoke click() … Software Development html-css | |
Hi, When I have a class that has an object variabel where other types is in. When I send a web-request to the server and gets the variable, it works fine when the data is set to known-types. The problem is when I want to use the data in the … Software Development web-server xml | |
I have one alias file which is acting as a wraper to XML. <Alias name='Type'> <Xpath>@subType</Xpath> </Alias> generally this return MEConsumed or MEResource. I want the behaviour that if @subType=MEConsumed then it should return CON and when @subType=MEResource then it should return "REF". Help me with this .. i am … Software Development xml | |
hi friends, i have one string field in which i am converting time value and value of that string is "-1:00:00" but i want that in my report it checks that if that field contains negative value than converts it in positive please help me out. Software Development vb.net | |
hi there, i have a datagridview view in a C# .NET form and when in the run time when i want to select the the combo box i have to click on it for 3 times, y is this. how ca i make it to drop down the items in … Software Development vb.net | |
hi all, I kinder got bored with software development for a bit and was not until I noticed CS106A(Java based) and the CS106B (C++) which has really re-light my developer bug as such.. was wondering what other courses can people recommend to keep that bug keep on going ? Software Development c++ | |
Hi I get data from a serial port in ascii characters. only numeric characters are allowed and I check for illegal characters with regular expressions. This part works fine and if an illegal character presents itself the regular expression method catches it and display them in variable m. then I … Software Development ![]() | |
The Xml: Micfosoft(TM)'s modified Books.xml: The price attribute of the last book item was modified by me, now it appears two times, once as attribute of book and second time as a separate item inside the book item. [code=xml]<?xml version='1.0'?> <!-- This file represents a fragment of a book store … | |
Hi, I'm trying to iterate through an stl list object list(customer being my struct that holds the name, age and gender variables[customerList being my list]), but I'm getting an error. [code] void store::listCustomers() { vector<customer>::iterator it; for(it = customerList.begin(); it != customerList.end(); it++) { cout << it->name << endl; cout … Software Development c++ | |
Hello, I'm in need of color highlighting individual words with in a tooltip. I'm thinking that the standard tooltip in c# can't do that since it looks like it just takes a unicode string. (Is that correct or is there some gucci way of getting around that?) I did some … Software Development c# | |
Now I HAve Written The following Programs [CODE] # include <iostream> # include <string> # define MAXSIZE = 300 using namespace std; bool findTitlePrice(string allTitles[300], double allPrices [300],int totalRec,string title,double price); string allTitles[300] = { "Book 1", "Book 2"}; double allPrices[300] = { 78.5, 66. }; int main () { … Software Development c++ | |
Labels would not show up in the output window. The red highlighted code is where said labels get added to the window. I can't tell what's wrong with the code and I've looked at it over and over. [CODE]import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JButton; import java.awt.BorderLayout; import java.awt.GridLayout; … Software Development java java-swing | |
Hello, I am having some trouble figuring out an assignment I was given in class. I am not looking for any code, but need a better explanation that what the teacher has given. Basically the program will calculate the number of days between any two days from 1/1/1900 through 12/31/2099, … | |
So I have a boolean representation and inside that representation contains shapes. All the points of the shape must be true in the boolean array. For some reason its not putting the points on the array. Here is my code, please help me! [CODE] for (int d = 0; d … Software Development java | |
could somebody tell wats wrong with this #define FOR(x,n)for(typeof(x);x<n;x++) Software Development c++ |
The End.