132,726 Archived Topics
Remove Filter ![]() | |
im confused with [I]__call__() [/I] method defined within the class. [I]__init__() [/I] is used as constructor, and is called when we create an instance of the object. when does [I]__call__() [/I] method get called even though we not specify it explicitly... please help.......... Software Development python | |
This is what I intended to do [CODE] class person: "class to represent a person" def _init_(self): self.name = "" self.age = 0.0 self.sqr_age = 0 class ageName: def listAgeName(x,y): # x is name # y is age x = 0 y = 0 listAgeName = [('John', 18)] p = … Software Development python | |
[CODE] // imports import java.io.*; // Input stream import java.util.*; // Date //import java.text.*; // SimpleDateFormat class FinalPrep { //** arrays for saving static String firstNameArray[] = new String[0]; static String lastNameArray[] = new String[0]; static float gradeArray[] = {}; public static void main(String args[]){ readInFile(); System.out.println(" Sorted By last … Software Development file-stream file-system java | |
im am trying out this code but it keeps giving an error msg but i cant see where the error is...please help [code] query = New OleDbCommand("INSERT INTO studenttable(sname,scourse,syear,ssemestor,sgrade)values('" & TextBox1.Text & " ',' " & TextBox2.Text & " ',' " & TextBox3.Text & " ',' " & TextBox4.Text & … Software Development vb.net | |
Could someone help me with this? [CODE] ifstream readfromfile("stats.txt"); readfromfile >> lvl >> xp >> str >> spd >> acc >> hp >> endl >> inventory[0] >> endl >> inventory[1] >> endl >> inventory[2] >> endl >> inventory[3] >> endl >> inventory[4] >> endl >> inventory[5] >> endl >>inventory[6] >> … Software Development c++ | |
Any one has an idea how to develop Header of GPRS tunneling protocol using C language or even has interest in something like that I am a professional C/C++ programmers living in jordan Software Development c | |
Hi, I want to change the color of a selected jradiobutton in a button group to RED when clicked on it. I am not able to do it make it happen till now. The problem is actually that when I select any jradiobutton the selection spot should stay and get … Software Development java | |
Hi, I urgently need help with an assignment I must complete by tomorrow. I started Bash Scripting yesterday so am a complete newbie. I don't have time to teach myself Bash scripting so please don't redirect me to some tutorials. The assignment I have to do involves the following: the … Software Development shell-scripting | |
I'm trying to make custom panels, but I can't even set the styles without getting errors [CODE]MainForm.SetStyle(System.Windows.Forms.ControlStyles.DoubleBuffer, true); MainForm.SetStyle(System.Windows.Forms.ControlStyles.AllPaintingInWmPaint, false); MainForm.SetStyle(System.Windows.Forms.ControlStyles.ResizeRedraw, true); MainForm.SetStyle(System.Windows.Forms.ControlStyles.UserPaint, true); MainForm.SetStyle(System.Windows.Forms.ControlStyles.SupportsTransparentBackColor, true); [/CODE] Throws errors saying [CODE] An object reference is required for the non-static field, method, or property 'System.Windows.Forms.Control.SetStyle(System.Windows.Forms.ControlStyles, bool)' (CS0120) [/CODE] Software Development | |
hi how can i make contact me" like send mail " the customer send E-mail from my website and i will recive it from my mail please replay to my mail "i used ASP.net using C# [I]<< e-mail removed >>[/I] Software Development asp.net | |
Hi there! I new learner in Python. And just couldn't get threading. I wrote this script. [CODE] import sys import MySQLdb if len(sys.argv)!=3: """the program name, mac and ip makes three""" """stop program and send error""" sys.exit("Must provide mac and ip!") mac = sys.argv[1] ip = sys.argv[2] print 'Connected to … Software Development multithreading mysql python | |
hello I am inserting records into a MYSQL table via a loop Records are being inserted, but every now and then the program bombs out with the below message There is nothing wrong with the query line though (If i restart the job, this record will be inserted without issue) … | |
I have a small project in c# and ms-access I use query builder to manage my tables in ms-access. the problem is, select qeury works great, update query works great, delete doesn't work , and there is no error msg!!!!!!1 please help!! [CODE] OleDbDataAdapter adapter = new OleDbDataAdapter(); string queryString … Software Development microsoft-access | |
I have a vector filled with names such as John Doe Jane Doa etc. I need to write a function which deletes what is input via the user [CODE]void delete(vector<string>&name) { string FName, LName; cout<<"Enter first name and last name to be deleted"; cin>>FName>>LName; }[/CODE] ie input: John Doe and … Software Development c++ | |
I'm sure I'm missing something simple, but would like to ask if someone could set me on the right path. We have to write a program that requests the hours worked in a week, and a pay-rate, and then prints the gross earnings, taxes and the net pay. [CODE] #include … Software Development c++ | |
Hello daniweb, I am new to Java and to this forum! I am trying to put some objects into an array like this.. [code] MovingPlatform[] platforms; platforms = new MovingPlatform[1]; [/code] The problem is that I want to be able to access variables of objects within my array. I have … Software Development java | |
I'm working on a project implementing Dijkstra's Algorithm. The project involves reading from an input file and the format of the file is as follows: - The first line of the file tells the number of total vertices and the number of edges (n, m) respectively. - The rest of … Software Development algorithm c++ open-source | |
So I've already got one function that takes a list of va_args, ..., and then formats it, like such [code=c] string form_string(string format, ...) { va_list args; va_start(args, format); ostringstream output(""); for (unsigned int i = 0; i < format.length(); i++) { if (format[i] == '%' && format[i+1] != '%' … Software Development c | |
i am new to c++ so please dont throw any crazy words around :D im using dev C++ form bloodshed as my editor / compiler what i am trying to do is when a user hits one of the special buttons all keyboard input after that will be reformated depending … Software Development c++ | |
[code] Program to make snowflake! # Local graphics module. Must be in same folder as this # program (or both on Desktop) import ecs10graphics as gr # Math module that comes with Python import math def pointOnCircle(f, r): # f is fraction of the way around # r is radius … Software Development python | |
Hi guys and girls I am writing a program to solve a linear system equations using gaussian elimination method by taking the factors and storing them in a NxN+1 matrix, this matrix can take integer numbers as well as floating point numbers i need help in translating this program to … Software Development assembly | |
Hi, I am using VC++ 6.0. When i clear a vector using vector.clear() the capacity is not being reduced to zero. Hence the memory is not being deallocated. I have tried to reduce the reserved size by use of vector.clear() followed by vector.reserve(0). This however has no effect. I have … Software Development c++ | |
Hey you guys i have a major problem here basically im a begginer c++ program student and i am trying to get use to vectors and functions so i made this program like a mad lib game or a bear hunt as you say. The program basically have vectors (duh) … | |
I have a String stored in this format "10/10/2009 12:00:00". I would like to convert this into a DateTime object so I can add it into the Outlook calender. I have tried using the following code but it doesnt seem to work. DateTime startDate = DateTime.Parse(appointments[i]); (where appointments[i] is a … Software Development | |
in this program im tryin to keep the guests in a line and the numbers in another line ... but it always start from the middle of the list I dont know why take a look : [CODE]class Program { static void Main(string[] args) { string x = "Guest_TheDreamBoi Guest_XxEmoChickGirlxX … Software Development | |
Hi All, I am trying to create a 2D array of the [B]"CString" MFC class,[/B] however it needs to be declared dynamically for my application. I have read up on numerous forums but I just cant seem to find what I am looking for. From what I have read the … Software Development c++ | |
i have promblem when using bottom update, when i get data in textbox, this is my code string uSql; uSql = "UPDATE Material SET MaterialName='"+txNama.Text+"',MatGroupID='"+cbGroup.Text+"' WHERE MaterialID='"+txKode.Text+"'"; SqlConnection conn = new SqlConnection(connetionString); SqlCommand comand = new SqlCommand(uSql, conn); conn.Open(); comand.Parameters.Add(new SqlParameter("@MaterialName", SqlDbType.NVarChar, 50)); comand.Parameters["@MaterialName"].Value = txNama.Text; comand.Parameters.Add(new SqlParameter("@MatGroupID", SqlDbType.NVarChar, 20)); … Software Development | |
This is my program [CODE]/////////////////////////////////////////////////////////////////////////////////// // ICS 3U1 - Mrs. Shanks // Asad Choudhry // November 28, 2009 // Family Feud // // This program takes as input the question numbers, the questions, the answers, // and the points. the question number is saved to the questionNumArray, the // the … Software Development java | |
To add check box to grid who s auto generate column property is true. I wish to select all the rows who s check box is checked .which can be checked by the user after generating the grid so at generating time all item template check box default values want … Software Development | |
can anyone help me doing my simple assignment,please. I feel fed up and got confused so far Software Development c | |
I have an exam coming up on this unit found in the guide to programming with Java textbook. I was just wondering if someone can provide an algorithm to the following question. 13. a.) Write an algorithm to count the number of words in a sentence. b.) Write an algorithm … | |
Hello everyone, First, please excuse the sloppy-ish coding. I'm working on my ability to shorten my code as we speak. However, being new to this, the hardest way seems to be what I always end up doing. That said - on to my problem. I wrote this code for a … | |
hello every one i want to ask if we can implement global catch exception for the whole application so that any exception that occur , will be handled without closing the form specially after making setup for the application (then i can't determine where the exception came from) thanks.. Software Development | |
Dear All, I am opening a file called initialisation: [CODE]try: initFile = open("initialisation.dat", "r") except IOError: print ("Initialisation file cannot be openned for reading")[/CODE] I would like to read the contents of this file and then print them on several other files i.e. file1, file2, file3, file4, etc. i am … Software Development python | |
I am trying to create a dll project using VS2005 (C++.NET). It is going to be used to access a database to store records w/o having to know how to actually create records (i.e. just pass info, and the dll classes will create a row in db). I want to … Software Development c++ | |
Pleeeeeaaaase help. If you have the answer please email me on <<mail removed>> Thanks Hi I have a VB6 system that interacts with a SQL Server database and GET's records with the following code If I_Syscont.State = adStateOpen Then I_Syscont.Close End If szSQL = "select * from syscont" szSQL = … Software Development sql visual-basic | |
I am a newbie just getting started with Python. I have trouble understanding the statement "The __init__.py files are required to make Python treat the directories as containing packages; this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later … Software Development python | |
Hello I wondered if anyone had an idea on a piece of code that could tell me the available free disk space. There is a trick here, otherwise this easy question wouldn't be here. I need the free disk space to read off where the program is being run, and … Software Development python | |
I am writing a program that will compare stings of data (true false answers) against an answer key which is another string. for example, the data for the students answers looks like this. tfttftttf so question 1 is true question 2 is false etc. Here is the code I have … Software Development c++ | |
Hi all, I've been google'ing my backside off in search of a good example/tutorial for java gui's. Could anyone supply me with a link to a website that could supply a tutorial and/or some examples? Would be great, thanks. P.S. I use Eclipse, with no GUI editors, so I need … | |
I have a button, if I press the button, new picturebox will appear in my main form. How to add picturebox name in the listbox ? how to select picturebox name from a listbox for deleting the selected picturebox? thanks... Software Development vb.net | |
hey all, I'm using a form to throw info straight into a database. i know it isn't the best way but i'm new and all other implementations have confused me (i've been reading and watching tutorials for 2 weeks) but anyway i'm going to take the info straight from the … Software Development open-source vb.net | |
I need help on my project. This is what I have so far: [CODE]import javax.swing.JOptionPane; public class Convert{ public static void main(String[] args){ String choice = ""; do { choice = JOptionPane.showInputDialog(null, "Would you like to enter a temperature?"); } while(choice.equals("No") | choice.equals("no") | choice.equals("N") | choice.equals("n"));{ choice = JOptionPane.showInputDialog(null, … Software Development java java-swing | |
hi, how do I create an array of pointers to a struct using malloc? using malloc like this- [CODE=c] abc * a = (* abc)malloc(sizeof(abc)*10); [/CODE] I get an array of struct objects. I can access member elements using the "." operator. eg a[2].xxxx what I want is an array … Software Development c++ | |
[CODE]/////////////////////////////////////////////////////////////////////////////////// // ICS 3U1 - Mrs. Shanks // Asad Choudhry // November 28, 2009 // Family Feud // // This program takes as input the question numbers, the questions, the answers, // and the points. the question number is saved to the questionNumArray, the // the question is saved to … Software Development java | |
Hi all! You've probably all heard of some rendition of the game of life and now it's my turn to try and code it.:-/ Anyway, everything is fine up until my Life function(this is the function where I put all the "rules" of life). My output is now completely blank. … | |
Hi, The following code I've been working on (as hobbyist) compiles okay, buy at runtime it fails to output the dates that it is supposed to extract from a csv file. I've been staring at this forever and no progress. I am thinking that the problem occurs before the date … Software Development c++ data-structure open-source | |
Hi :icon_smile: I have written a C++ program which works very fine. The problem comes in terms of efficiency and speed. I am using a multimap which is required for my type of requirement. [CODE]multimap<string,string>[/CODE] Now the problem is that for files more than 100 MB it takes a lot … Software Development c++ | |
Hello! I have this homework problem, that I thought I had figured out, but once I fixed all the syntax errors and debugged it again it gave me some weird numbers...something I totally didn't expect. Can anyone give me a clue as to where I went wrong? I suspect that … Software Development c++ |
The End.