43,549 Solved Topics
Remove Filter ![]() | |
Im trying to call the two functions from the numbers class but it returns an error even tho i believe i have coded it correctly. i have played with the code but cant seem to get it working. [CODE] class main(): num1 = input("please enter a number") num2 = input("please … Software Development python | |
Hey so my project is an Average Calculator to calculate the average of a set of numbers. Anyways, I must make it in a GUI and I have chosen Win32. My problem now resides while trying to do the following: - When there is a paint request, to paint anything. … | |
I'm a lot confused with multi-dimensional arrays and pointers. I tried searching, found and read some articles. But there are still some doubts. We can not use a double pointer(int **) for a two dimensional array, right? Instead we need to have an array of pointers with the length equal … Software Development c++ | |
Hey guys I am writing my first program ever in java starting tonight and all has actually gone smooth which has been a surprise but I have run into a problem with an if else area. Basically, what I am suppose to be doing in this section is the user … Software Development java | |
well im trying to create a notepad in the win32 Api with C++ and at the moment im trying to set up the Open and Save As dialogs but the open Dialog works and the Save As doesn't, yet when i comment out the Open Dialog the Save Dialog works … | |
Hi Everyone I have been hard at work on this Java program involving bicycle gears, one of the problems is the while loop, should a user enter a negative number in the inputs then i want the user to re enter it until a positive number comes up however the … Software Development java | |
Hello, I need some help getting started with saving all the items in a listview with a savefiledailog. The items in the list look like this IP , port. The IP and port are in different columns. The IP is in the first column and the IP is in the … Software Development listview | |
Hey there Why cant i increase my Forms Height more than 1102? Thanks Software Development | |
hy everyone, I have a problem, I am making a little program for a game; When I start my game the timer has to start counting and after 3 minutes the game has to stop. I need to know a way to program a very simple counter/timer in order to … Software Development java | |
Hye everyone, I am trying to make a 2d-char array, fill it with random letters(chars) and print it. If I do it like this I get a ArrayIndexOutOfBoundsException: 0. I am a newbee. I import my prefs(width, height) from static getters in the class preferences. Can anyone help me please? … Software Development java matrix-multiplication | |
Hello! I need help to construct a regular expression in Python that will help me get the file name of a include directive in C++. I think that regular expressions are a good way to solve this problem, but I'm open to new ideas. Consider these following includes: [CODE] #include … Software Development c++ file-system python | |
Hello, I have a to make a class called fibonacci. This is what is given to us : fibonacci(0)=1 fibonacci(1)=1 fibonacci(n)= fibonacci(n-1)+fibonacci(n–2) Below is an example of running the fibonacci class as an input of 6. The output is: fibo(0)=1 fibo(1)=1 fibo(2)=2 fibo(3)=3 fibo(4)=5 fibo(5)=8 fibo(6)=13 [B]My code is:[/B] [CODE] … Software Development java | |
Hey; In my application I want to count number of seconds while the application is waiting for the user input. I think I should use another thread but I never worked with multithreading. Is there an easier way ? Software Development multithreading | |
I have the following code in my xsl file... [code]<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€"> <!ENTITY amp "&"> ]> <xsl:stylesheet … | |
hello im new to linux programming and i am experiencing a bit of diffuclty with pthreads...basically the pthread_create() function in my code below i tend to pass an integer variable as the argument for my runner() function but i get a warning and an error..i have tried several ways of … Software Development c | |
Hi All, I have checkedlistbox on my windows form which is binded to datasource, I do check the items in checkedlistbox based on some criteria, When user uncheck some items I want to save the records, but in Checked Items collection still I’m getting items as checked, which are unchecked. … Software Development vb.net | |
Hello, I'm new to vb.net. I have successfully run a simple sql query in vb.net and basically wanted to know how I can export the results from the query to a .txt file? All I really know is that I should be using StreamWriter. Does anyone have suggestions for sending, … | |
[CODE]import os import fnmatch for l in os.listdir("C:\Bilder"): if fnmatch.fnmatch(l, 'IMG*'): l.replace(l, "HH") print l[/CODE] I am trying soemthing like this, but it is not working. Can anybody help me? Cheers Software Development python | |
Hello, I am wondering how you read input from a text box in microsoft visual studio Forms. I'm trying to make a program that reads text box data and tells you the readout, but I don't know what to type to return the data typed in a text box. Please … Software Development c++ visual-studio | |
I have some questions about the logical not operator in C++ and Visual C++. I have posted another question relating to the logical not operator. I just can't seem to wrap my head around the uses of this operator. From what I have read so far the logical not operator … Software Development c++ | |
Hi everyone! I'm triyng to develop a program whith this functions: 1 - Read data from text file 2 - Put the data from file to a variable(ignoring comments in the file) 3 - Tokenize the data e transform the variable into another variable(like float) 4 - Make the calcs … Software Development c++ | |
Hey; I want to store string, ConsoleColor pairs like [CODE]dataStructure.Add(new KeyValuePair<string, ConsoleColor>("Red", ConsoleColor.Red))[/CODE] I tried List but it did not seem to work; [CODE] List<KeyValuePair<string, ConsoleColor>> colorList; colorList.Add(new KeyValuePair<string, ConsoleColor>("Red", ConsoleColor.Red)); colorList.Add(new KeyValuePair<string, ConsoleColor>("Yellow", ConsoleColor.Yellow)); colorList.Add(new KeyValuePair<string, ConsoleColor>("Green", ConsoleColor.Green)); colorList.Add(new KeyValuePair<string, ConsoleColor>("Blue", ConsoleColor.Blue)); colorList.Add(new KeyValuePair<string, ConsoleColor>("White", ConsoleColor.White));[/CODE] with the error … Software Development | |
Hello, So I am using microsoft visual C++ 2010 and I was wondering is there a way to avoid using .NET implementations? If so, what would I need to do and what are the drawbacks. Thanks | |
I want to display my table columns and data in datagridview at run time when user select table name I know that i have to set bindingsourse property . But i dont know how to do programming for that can you tell me. Software Development | |
Hello. I'm not really sure on how to explain the problem, but here goes. I'm creating a Traffic Simulator of a cross junction. I currently have car objects moving, with working traffic lights. I created a variable array for the car class which creates several car objects. Then the lane … Software Development java | |
Good morning all, i have a text file contains following data..... sec TID ATTRIBUTE 69013 1-3039-1 REGISTER 69013 1-3039-1 100 69013 1-3039-1 401 69013 1-3039-2 REGISTER 69013 1-3039-2 100 69013 2-3039-1 REGISTER 69013 3-3039-1 REGISTER 69013 4-3039-1 REGISTER 69013 1-3039-2 200 69013 2-3039-1 100 69013 2-3039-1 401 .................. .................. 69023 … Software Development file-system perl | |
Hi, Can private static data members of a class be accessed through non-static methods of that class? I'm asking this (dumb) question because on a C++ book I've read that a class's static data members can only be accessed through a static function, but when I tried doing it with … Software Development c++ | |
i have a codelike this: [CODE] do { int i; }while(i!=0); [/CODE] Shows error "Cannot find symbol i" Software Development java | |
A text box show current date(like 24-03-2009). I write in other textbox 3. I want when I write 3 then the textbox (24-03-2009) automatically increase month like 24-06-2009. how it possible? Software Development visual-basic | |
ok... i know a lot of you are probably tired of me asking questions but i am trying to learn and i am asking about stuff i dont know, not just to get you to do the whole program for me. this question is if there is a list of … | |
can someone help me, each time i send my friend a program he says tht the windows goes away once he enters something. please help. Software Development c++ | |
How are iterators used in C# ? suppose I have say: [code] List<int> someList = new List<int>(); /* assume some items are added here */ /* and now I wonder if C++ style iterators are available? */ for( var i = /* iterator begin of list */ ; i != … Software Development | |
I have read about how multicore processing works of the Intel. The manual that I read had left out a part that would of been useful how to actually use multiple cores. It just explained how all the different parts of the CPUs interact with each other, so could someone … Software Development assembly motherboards-cpu-ram | |
Hey daniweb forums, Okay so my question is, what is the difference between VC++ (visual C++) and C++ with any other IDE (or none at all). I know for a fact that VC++ is an IDE but according to some people that I have met. They say, stay away from … | |
I am not looking for an explicit answer to this question, and I have googled/searched this site for hours trying to find an example to work off of. What I can't figure out is how to write a nested "for loop" that will allow the user to input one number … Software Development c++ | |
Hell can you help me on this,how can i insert a new node in the binary tree and to keep track the current node example: input number: 50 Succesfully inserted! input number:40 this will print "inserted at the left of 50" input numbr: 80 this will print "inserted at the … Software Development java | |
Hey, I have a question. I was writing a custom Array type class. In my template declaration I use the type name as DataType. I was making an attempt at creating an insert method, which takes a DataType argument and the index to insert at. I originally had this code: … Software Development c++ | |
im having this problem when i try to add [CODE] m + 1 = k;[/CODE] it says this- *lvalue required as left operand of assignment* in my compiler, please help. dont mind the unfinished code. [CODE]#include <iostream> using namespace std; int main() { double b, m, k; string x; b … | |
Please let me know if I should make something more clear 1. Each item in list contains a tuple with its name -> ((value, work), 'name') 2. the function "sort" below sorts the list of subjects by "value" in descending order 3. I get: TypeError: 'int' object is unsubscriptable (occurs … Software Development python | |
so I have and for loop to find the highest number in and array how would i go about outputting the element number? [CODE]//compares the values in the yearAverage array to find the highest temperature for(int i=0; i<lineCount; i++) { if(yearAverage[i]>=highTemp) { highTemp = yearAverage[i]; } }[/CODE] Software Development c++ | |
Below is a simplified version of the function. [code]int x; void myAdd(const double& p) { if (x > 100) { x = 1; myAdd(p); } ++x; ... }[/code] The advantage of this recursion is that I don't have to write a second function ie myAdd2. Are there any pitfalls of … Software Development c++ | |
I have a function that should read in data from a file and add them to and array then i pass that array to another that totals the data then i want to find the average of that array and pass the max value to a variable 'max' with the … Software Development c++ | |
I have created a function which add a row in tablelayoutpanel and textbox in column of the row. After adding few rows, i want to read the value of particular textbox in particular row. How can it be done. Remember one thing that name of all textbox is same in … Software Development | |
This seems to work well until I try to create the 11th button. Any suggestions? [CODE] procedure TForm1.FormClick(Sender: TObject); var nb: TButton; begin Inc(n); nb := TButton.Create(Self); nb.OnClick := ButtonClick; SetLength(ca, n); ca[n] := nb; ca[n].Left := 8; ca[n].Top := (((n - 1) * nb.Height) + 8); ca[n].ParentWindow := Form1.Handle; … | |
I need a RegularExpression that can convert a string from a fraction or decimal like "1/2" or "0.5" to a decimal "0.5". It needs to handle both cases. Input can be either fractional or decimal, output must be decimal... Software Development vb.net | |
[CODE]typedef struct electro { char name[20]; int access_number; char address[50]; float balance_due; }; electro account[10]; electro account[0].balance_due=$ 120.52; electro account[0].address[50]={Cane Gardens};[/CODE] Can someone tell em how to correct this piece of code. I'm using Codeblocks and it says it " expected an initializer before '.' " in the two last … Software Development c | |
I have a form on my vb 6.0, i need to change the appearance. In the sense that, i can change its transparency or opacity of the way how the form looks. Is there any way possible i can do that ? Software Development vb.net visual-basic | |
Please help! I don't understand why I am getting this error: function does not take 0 arguments. The program is suppose to calculate how much fuel is left in the tank after you drive a certain amount of miles. Can someone please help explain why I am getting this error? … Software Development c++ | |
I want 1.py to call 2.py. 1.py takes an Ip address as a command line argument. I am trying a '[B]subprocess.call()[/B]' in 1.py to call 2.py. I have defined addr= sys.argv[1] before the [B]main()[/B] of 1.py. I want the same address to be accessed in 2.py. In short, 1.py should … Software Development python | |
I want to load values from a lstview column to a combobox in another form. The problem is that, my combobox style is 2 - Dropdown List and the values in it are from my database field. That's where the error occurs. Saying [ICODE]Text property is read only.[/ICODE] I could … Software Development listview visual-basic |
The End.