132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for katharnakh

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
Member Avatar for snippsat
0
17K
Member Avatar for checker

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
Member Avatar for fallopiano
0
125
Member Avatar for jko2326

[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
Member Avatar for Ezzaral
0
101
Member Avatar for hmmmm

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
Member Avatar for SadOldMisterHam
0
165
Member Avatar for DawnOfIkaros

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++
Member Avatar for programmersbook
0
245
Member Avatar for omar isaid

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
Member Avatar for omar isaid
0
549
Member Avatar for Web_Sailor

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
Member Avatar for Ezzaral
0
904
Member Avatar for isxrc

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
Member Avatar for Aia
0
116
Member Avatar for NargalaX

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
Member Avatar for DdoubleD
0
147
Member Avatar for rakanhaddad

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
Member Avatar for DdoubleD
0
277
Member Avatar for johnroach1985

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
Member Avatar for woooee
0
291
Member Avatar for sjgriffiths

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) …

Software Development mysql python
Member Avatar for woooee
0
179
Member Avatar for urania

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
Member Avatar for DdoubleD
0
282
Member Avatar for solitaryy

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++
Member Avatar for solitaryy
0
278
Member Avatar for guccitan88

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++
Member Avatar for guccitan88
0
167
Member Avatar for RichardCrickets

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
Member Avatar for RichardCrickets
0
103
Member Avatar for Compton11

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
Member Avatar for sireeshakiran
0
720
Member Avatar for seaders

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
Member Avatar for seaders
0
935
Member Avatar for HITMANOF44th

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++
Member Avatar for HITMANOF44th
0
114
Member Avatar for vnproduktionz

[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
Member Avatar for vegaseat
0
94
Member Avatar for yasser87

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
Member Avatar for Nick Evan
0
158
Member Avatar for gehring

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++
Member Avatar for gehring
0
331
Member Avatar for BrownBearForU

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) …

Software Development algorithm c++
Member Avatar for BrownBearForU
0
167
Member Avatar for Drahmina

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
Member Avatar for Ravenheart
0
263
Member Avatar for Alicito

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
Member Avatar for Alicito
0
172
Member Avatar for gehring

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++
Member Avatar for Narue
0
819
Member Avatar for botaxsmaniz

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
Member Avatar for Ravenheart
0
94
Member Avatar for asadc

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
Member Avatar for javaAddict
0
749
Member Avatar for shine_jose

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
Member Avatar for chandru7
0
136
Member Avatar for myheart

can anyone help me doing my simple assignment,please. I feel fed up and got confused so far

Software Development c
Member Avatar for Seten
0
112
Member Avatar for TheDLSyrnyk

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 …

Software Development algorithm java
Member Avatar for javaAddict
0
134
Member Avatar for Thraxus

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 …

Software Development c++ puzzle
Member Avatar for Nick Evan
0
165
Member Avatar for dima shawahneh

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
Member Avatar for Geekitygeek
0
174
Member Avatar for Shotty

can someone please tell me what im doing wrong this code works: [CODE] String r = ""; for(int i =1; i <= rows; i++) { for(int j = 1; j <=columns; j++) { r = r + " _"; r = r + "\n"; } return r; }[/CODE] This code …

Software Development java
Member Avatar for javaAddict
0
79
Member Avatar for NicholasE

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
Member Avatar for Gribouillis
0
123
Member Avatar for rciprogrammer

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++
Member Avatar for yavorski
0
269
Member Avatar for Mac Mac Gregor

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
Member Avatar for Mac Mac Gregor
0
290
Member Avatar for lenfranc

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
Member Avatar for lenfranc
0
157
Member Avatar for Aiban

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
Member Avatar for Stefano Mtangoo
0
302
Member Avatar for scott6480

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++
Member Avatar for mrnutty
0
151
Member Avatar for P00dle

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 …

Software Development gui java
Member Avatar for jbennet
0
379
Member Avatar for murid

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
Member Avatar for GeekByChoiCe
0
108
Member Avatar for leroi green

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
Member Avatar for leroi green
0
120
Member Avatar for gasou

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
Member Avatar for gasou
0
637
Member Avatar for bhas_purk

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++
Member Avatar for bhas_purk
0
146
Member Avatar for asadc

[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
Member Avatar for asadc
0
123
Member Avatar for NitaB

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. …

Software Development c++ pdf
Member Avatar for NitaB
0
589
Member Avatar for toneranger

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
Member Avatar for VernonDozier
0
166
Member Avatar for Web_Sailor

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++
Member Avatar for Web_Sailor
0
69
Member Avatar for Viralguardian

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++
Member Avatar for Viralguardian
0
206

The End.