43,549 Solved Topics
Remove Filter ![]() | |
I need to split a float in 2, but the split function doesnt work with floats... What is an alternative for this? If I have 2.4 I want to get 2 and 4 In math you've got a function fpart and ipart, but I don't know this is possible in … Software Development python | |
okay I tried to make a reverse of finding the num value of a letter bu it returns in an error :f [quote]Traceback (most recent call last): File "/home/darragh/Bureaublad/t.py", line 15, in <module> numtolet('A') File "/home/darragh/Bureaublad/t.py", line 6, in numtolet letters['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] TypeError: list indices must be integers, not tuple[/quote] [code=python]def … Software Development python | |
I want to use a while loop to count up numbers. The output would be something like this: Start: 1 End: 10 Count by: 3 1 4 7 10 Here's my code right now: [CODE] start = int(raw_input("Start at: ")) end = int(raw_input("End at: ")) count = int(raw_input("Count by: ")) … Software Development python | |
Hello. I am currently working on a school project. I need to implement 4x4 matrix multiplication with multi-threads (pthread) doing each multiplication. By studying the assignment description and other codes found online, I was able to get a general idea of what I need to do. However, I am having … Software Development c++ matrix-multiplication | |
Hi this is the code for life, universe and everything problem, where the program stops only when the user inputs the number "42" I tried to understand the problem, but could not make it that how the program stops at exactly 42. Any help would be extremely appreciated. [CODE]#include <iostream> … Software Development c++ | |
Hi, i am new in c++. I am doing an assignment where I need a menu for user to select the operation. My menu coding is as below. [CODE] int main() { myCarSystem b; char ch; string temp1, temp2; double temp3, temp4; while(1) { cout<<endl<<endl; cout<<" My Car System Operations … Software Development c++ | |
I've used IComparer before but I seem to be getting an odd issue where I'm not getting the second argument to my Comparer function. [CODE] internal class FreePtrCompare : IComparer<File> { int IComparer<File>.Compare(File x, File y) { int a = x.fsPos; //Free space pointer of file 1 int b = … Software Development | |
Hi.. How do I skip the first line of a text file. I am not using getline() so I think I cannot use ignore() function. Is there any other way to ignore first line ? [CODE] ................. FILE *in; char line[1000]; char *token; in = fopen(argv[1],"rt+"); if( in == NULL) … Software Development c++ | |
In VB.Net 2008 express: I am looking for a way to setup a screen that contains a picture and some information. Hold in place for 10 seconds, change the picture and information and re-display the screen. The information comes from a SQL Server database. I there a way to setup … | |
In the mid-'90s I wrote in Quick Basic some lab simulations for science classes I was teaching. I want to rewrite them in VB and thought that I could just paste old QB code into VB... not so, of course. I want to know how to read data from within … Software Development data-science visual-basic | |
Greetings all, Peace. I have a problem. I need to download visual c++ 2005 express edition (long story why this one). I cannot find out where to get the correct download. I found this [URL="http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E&displaylang=en"]here[/URL] this is for the Microsoft® Visual Studio® 2005 Express Editions Service Pack 1. However, when … Software Development c++ visual-studio | |
I more than half way through the book "Python programming for the absolute beginner" 2nd Ed. and things are really starting to get hairy. The book has me to write some code just before or after explaining each part. But I have to really concentrate on the paragraph I'M reading … | |
OK, I made two Windows Forms Applications (Look images below) Step 1: [url]http://img245.imageshack.us/img245/8227/78636770.jpg[/url] Step 2: [url]http://img408.imageshack.us/img408/808/48168956.jpg[/url] Well, as you see at "step 1" there is some text (blured) and the Next button in bottom left corner. I would like to know how to make that when I click Next button … Software Development c++ | |
Is there a built-in function to give the value of a letter? what I mean is a=1 b=2 c=3 d=4 e=5 f=6 ... something like letval(a) would give me 1 Software Development python | |
So the Goal is: given a Nested list that contains 3 elements in each element in the nest, i.e. L1=[[1,2,3],[4,5,6],[7,8,9],[10,11,12]] how can I take a flat list, i.e. L2=[1,2,3,4,11] where if the elements within the nested list, i.e. L1[0], L1[1], etc. intersect with any single element in L2, the element … Software Development python | |
Hi friends I am working in vb.net ,there is i have a form in which i have a datagridview,& a column of checkbox in tat datagridview,when this datagridview becomes load, that checkes theb employee is present or absent if present so the check box of that perticular row must be … Software Development vb.net | |
Hi, i am trying to add Label captions and Combobox text values to a memo when the button is clicked, and keep recieving the error 'Incompatible Types TString and TCaption' when i try to add values from labels and comboboxes Im using the code like this: [code]Memo1.Lines.AddStrings(Memo2.Lines); Memo1.Lines.AddStrings(Memo3.Lines); Memo1.Lines.AddStrings(Edit1.Text); Memo1.Lines.AddStrings(Label1.Caption);[/code] … Software Development pascal | |
I'm writing a program that will download pfd files and collate them. However the urls I get are a bit weird. They look like this: [code]http://links.ealert.nature.com/ctt?kn=105&m=34136651&r=MjA1NzczMzM4NgS2&b=0&j=NTkwOTY5NjQS1&mt=1&rt=0 [/code] I'm using URLConnection and BufferedInputStream, but no data is read from the stream (read() returns -1 at the first try). If they are … | |
Hi, i am trying to get my application to check, which radiobutton is selected, and then perform instructions based on the selection. but i cant seem to use a IF and ELSE procedure to do this, can somebody help me out as to what procedure i should use. Software Development pascal | |
Hey there folks. I'm in the middle of learning C# using the book 'C# and Game programming: A Beginner's Guide' by Salvatore A Buono and I've come to a bit of a problem. The example code for nested if and else-if statements does not work as intended. I could move … Software Development c c# c++ posting-games visual-studio | |
when I run my project then a msg was shown: "object doesn't support this property or method" but when I press ok then the project run. no problem occurred. Now what I need to do? Software Development visual-basic | |
Having some problems creating an encoder for class. I have the decoder, but I can't seem to make my encoder work properly. I have attached the decoder to the post as a file. Encryption example: "Hello" would be "xxxxx!H#xxxxxxx#e¤xxx¤l&xxxxxxxxx&l$xxxxxxxxxxx$o", where x is randomly generated letters, and ! is the first … Software Development c++ encryption | |
I keep getting the error above. I am trying to calculate percentage, sales tax on items to make profit on items sold. #include <iostream> #include <string> using namespace std; int main() { //Declare variables double price; double percentage; double taxRate; double salesTax; double sellingPrice; double finalPrice; char ch; string str; … Software Development c++ | |
#include<stdio.h> #include<string.h> main() { char STR1[100]; int i; clrscr(); printf("Please input a STRING.\n"); gets (STR1); printf("\n%s is displayed in reverse form as:\n",STR1); for(i=strlen(STR1)-1; i>=0 ; i--) { printf("%c",STR1[i]); } getch(); } Software Development c | |
[B][/B]Hi, How do I pass my variable or textbox data from form to Active Reports class where I prepare my sql string so that I can use my variable in "Where" clause..like[inlinecode] select * from personnel where name=' " + textboxName.Text + " ' "; [/inlinecode] Thanks, snky Software Development visual-basic | |
Out of curiosity, how would you reverse a string's case in Python? Make uppercase characters lowercase and lowercase characters uppercase. Here's the function for the naive implementation. [CODE] #!/usr/bin/env python def flip_case(input_string): temp_list = list(input_string) for index, character in enumerate(temp_list): if character.islower(): temp_list[index] = character.upper() else: temp_list[index] = character.lower() output_string … Software Development python | |
I've written a C++ program that compiles successfully but is give me some logic error. It's giving me some negative numbers can someone please run the code and see what ive done wrong. Built with Visual Studio 2008 [CODE] #include"stdafx.h" #include<string> #include<iostream> using namespace std; class vowels { public: vowels();void … Software Development c++ visual-studio | |
[CODE]class MyFloat { private: enum {MAX_DIGITS = 20}; char Number[MAX_DIGITS + 1]; char NumberOfDigits; public: void Write(); friend void AssignValue(MyFloat& X); }; void MyFloat::Write( ) { int i; if(!NumberOfDigits == 0) { cout << "0."; for(i=0; i<NumberOfDigits + 1; i++) cout << int (Number[i]); } else cout << "0.?"; }[/CODE] … Software Development c++ | |
Hello guys You rookie here. been trying to run a code but I am getting this weird error that I have not seen before. I have attached a copy of the error and the part of the code it refers to. Thanks for your help GCard 1>------ Build started: Project: … Software Development c++ visual-studio | |
This program is intended to determine if a fractions is valid (non-zero, non-negative denominator) and to convert an improper fraction into a whole/mixed number. While running the program I get the message "Floating point exception" after it reads the inputs just inside the for loop. Any insight into what is … | |
I want to to do the following but can't figure out how to do it in Java. I retrieve information, including the primary key, from a database. Using this information, I load a comboBox. The user selects an item from the comboBox. Using that selection, I build an SQL join … Software Development java | |
I need help writing a program that prompts the user for five grades and then provides the user with an average for all grades entered. [code=vb.net]Module Module1 Sub Main() 'Declare Array called AverageGrades with 5 Elements Dim Grades(5) As String 'Write array elements to screen using For loop Dim index … Software Development vb.net | |
how can i extact the photo from this website>>[url]http://www.it.usyd.edu.au/about/people/staff/tomc.shtml[/url] ? | |
I have this code i java I have class [CODE] class Author { String name,surname; public Author(String name,String surname) { this.name=name; this.surname=surname; } public String getAName() { return name; } public String getASurname() { return surname; } } [/CODE] And This code is OK; I have a button in jFrame … Software Development java | |
[CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); long j,x; long k=1; long y=0; cin>>x; for(;k!=x+1;) { for(;k%5==0;) y++; k++; } cout<<y; getch(); } [/CODE] in above code i am trying to find the total no of zeroes at the and of factorial of no..........in doing this i am finding out total … Software Development c++ | |
hey i tried to make a program to find an item in an integer array using binary search technique n by iteration with the help of functions...but i am getting errors....so plz help me out.. Software Development c programming-construct | |
Hello there!! i am glad for the help i have recieved before which helped solve my problems. my challenge now is that the following code fails to save to my Access 2007 database. it doesnt give me any errors but it does nothing. i want details i enter into the … Software Development microsoft-access open-source visual-basic | |
How do i do to Make a Select Beep sound and when is selected and i press button1 it will make the sound i choose. Software Development vb.net | |
Hello everyone, I'm trying to make a kind of log in system for an application. It's pretty simple. There are 6 picture boxes which display images. Of these 6 picture boxes one of the images is a recognizable to the user. When the user clicks on the 'correct' image the … Software Development | |
I wish to write a program that works in the background, i.e. without showing any windows. Someone prescribed i try this: <code> #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { while(1) { Sleep(1000); } return 0; } <code> but its not working. it still shows … Software Development c | |
[code] public int peek () { if (empty() == true) { throw new EmptyStackException(); } return StackContents[top]; } [/code] So I have this piece of code in a class that implements a stack. The program works perfectly. However, when I use Junit to test it, I have this: [code] @Test … Software Development java | |
Hi i need some help with a project i'm working on. Little explanation on it first then ill tell you where i am what i need help with and post code and maybe a screenshot. Well its a usb launcher its supposed to launch your usb drive and also has … Software Development vb.net visual-basic visual-studio | |
hi, I'm trying to do my decimal to the nearest hundreths, i've tried using number format and printf but i couldn't do it. Anybody can help me with this: here is my program float grossPay = (calcGross(nHrsWrkd, hrlyRate)); float netPay = (calcTaxes (calcGross (nHrsWrkd, hrlyRate))); System.out.print("\nTaxes Withheld - $" + … Software Development java | |
You see, I am writing a program that uses strings for input to determine things, and I don't want it to be case sensitive. So, I know you can go through a string and go char by char to store each char, [inlinecode]tolower()[/inlinecode]'d into another string while in a for … Software Development c++ | |
Hi all i hope this little code help some people. This code is to make your program can't open 2 times so when you open your app and try to open it again a msgbox will pop up and wont let you open it again. [CODE]Dim CurrentProcesses() As Process Protected … Software Development vb.net | |
I use Visual basic 8.0, Cyrstal Reports v10 what is included in Visual basic 8.0 and MYSQL 5.0. I have installed :mysql-connector-odbc-5.1.5-win32.msi I have database Articles with two fields: article nr article discription To connect to my MYSQL database within My form i use this: Dim Myconn As New MySqlConnection … Software Development database-design vb.net visual-basic | |
hi..i just want to make a messagebox that has an image in but i couldn't find the way. it tried to make a bitmap of the image and put it on the messagebox like MessageBox.Show(image); but it was wrong...any ideas??? Software Development image | |
I have a question: [CODE]#include <stdio.h> char * chstrswithf(char * a) { while(*a!='\0') { if(*a=='s') *a='f'; a++; } return a; } int main(void) { char string[]="this is a string"; chstrswithf(string); printf("%s \n",string); return 0; }[/CODE] the code above is ok for running. but when I replace the [COLOR="Red"]char string[]="this is … Software Development c | |
Hi all. I have an assignment for class (obviously I am new to this), that requires us to read from a file and then print out the first 22 characters from each line within that file. I have tried using getline and get, but can't seem to get it to … Software Development c++ |
The End.