199,114 Archived Topics
Remove Filter ![]() | |
Can someone please look at my code and see if I'm writing it efficiently using parameters and return values. Thank you for your support [code] PAY_RATE = 12.75 #This program ask the user for: hours worked, then calculates gross pay. def get_hours(): hours = input("How many hours did you work?: … | |
I have a problem in the book (not for homework) that says. List Reverse Modify the linked list class you created in the previous programming challenges by adding a member function named reverse that rearranges the nodes in the list so that their order is reversed. Demonstrate the function in … | |
Hey just wondering if you can do something like that with variables for example [CODE] class test(object): a = 55 def dispmenu(self): print self.a instance = test() [/CODE] How would i be able to call "instance.dispmenu()" without having to type that. Some things i have tried [CODE] action1 = instance.dispmenu() … | |
hi i need to create menu with icons from xml file, icons from url xml look like this [CODE]- <Item name="cat" ico="http://....../cat.bmp"> </Item> - <Item name="dog" ico="http://....../dog.bmp"> </Item> - <Item name="cow" ico="http://....../cow.bmp"> </Item>[/CODE] my c# code is [CODE] XmlDocument doc = new XmlDocument(); doc.Load("katalogs.xml"); foreach (XmlNode node in doc.DocumentElement.ChildNodes) { … | |
:-/ Hello, I am trying to allow only text in a textbox, not numbers or symbols, and when i user does enter something other than that it diplays a message box that says only letters please. I know how to do a messagebox I just can't seem to get on … | |
![]() | hi again ive got more questions for ides i have been using UliPad but it keeps on closing and uninstalling itself im looking for something that can: run code in ide debug syntax lightweight all round simple to use preferably i would like it to have a module lib what … ![]() |
hey, given one side and an angle how do you calculate the other sides and angles in a right angle triangle in c++. I'm basically looking for an algorithm. Thanks drjay | |
Hi! I wrote this program to generate a keyboard determined random numbers. [code] #include <stdio.h> #include <stdlib.h> #include <time.h> int amount, aleatory_numbers; int array[70]; int counter=0; int generator () { printf ("Introduce the amount of numbers that you wish: "); scanf ("%d", &amount); srand ( time(NULL) ); do { aleatory_numbers … | |
I'm trying to use new but I can't seem to get it right... in this example I ask how many strings the user would want to input, then ask for each one, then echo them back. [code=c++] #include<iostream> using namespace std; int main(int argc, char** argv){ int num, i; char** … | |
Hello there, This is my first post. I want to make a currency converter program in Java and for that i want live/real-time exchange rates. So can you please tell me how can this be done. I have full time net connection, so thats not a problem :) | |
I have an array of array wich all have the same length. Which syntax is to be preferred : multidimensional : string[,] names = new string[5,4]; or jagged : string[][]names = new string[5][4]; Or is it, in this case just a matter of style? I searched this site and I … | |
My program needs to use exponents, however, double does not allot enough space for my numbers, is there another way to use the pow(x,y) function or is there another function for exponents that I'm overlooking? [CODE=cplusplus] #include <iostream> #include <cmath> using namespace std; int main(void) { int thresh = 10000; … | |
i created a new user with all the privileges in mysql and it didn't work. no user works except "root with no password" which is why i created several user and tried it...still didn't work....if anyone know what is wrong....please lemme know.... thank you.... | |
Hi guys - FNG here, and I got a little problem I'm hoping someone can help me understand. Uh, OK, it's actually a big problem. I have built, along with a friend who handles the PHP end for me, a website that draws on a database to "translate" itself into … | |
I'm trying to write a class that will read and organize the command line arguments of a program. Like, it will read -a as a 'switch', and --abcd as a 'switch' and you can define different switches as having parameters, so -a bc de fg will have bc and de … | |
Hi, I've been trying to get my head around x86 assembly lately, and I've been working on this one problem. I'm trying to write a program that reads characters from a text file, then display them on the console. It's a simple exercise in file operations, but I'm having a … | |
Hi everyone, Below is code snippet to load excel file in datagrid. When my excel file is load is show unnecessary column with blank data. I did not want to show these columns. Can any help me how I will remove this column. I don't know how much blank column … | |
how do I pause the program so it doesn't just disappear instantly? | |
I have a php code which generates random number if visitor comes to my wordpress blog from yahoo.com and if the random number is less than 10 then display a welcome message else display normal blog. Or if visitor come to my blog without any referrer or from other sources … | |
I made a database project. when I run it another pc and press the Add New button (in my project) it show this msg. Run time error - 91 Object variable or with block variable not set. I connect the backend database by data sources(ODBC)> system DSN. I write code … | |
Hello friends, I've a user login system......user's name & password are saved in the database.......suppose i've an user "admin". At the time of login if he enters "admin" he can login also if enters "ADMIN" or "AdMiN" he can login too.....how can I stop this thing........PLZZZZZZZ show me the way...... … | |
okay guys, plz help, this is so wierd. I am not an expert in C, in fact, not an expert in anything. I defined a struct as the following: [code=c] typedef struct Fact { char predicate[MAX_TOKEN_SIZE]; struct Fact* valuePtr; struct Fact* next; }Fact; [/code] and i have some code like … | |
please can u tell me how to create a software that can be used to send a email? | |
i want to resize and Drag&drop control on the run of my c# application | |
I'm trying to compile an example nasm program I downloaded for windows. But I can't get it to compile. [CODE]C:\nasm-2.06rc1\nasmw -f win32 example.asm C:\lcc\bin\lcclnk -s -subsystem windows example.obj[/CODE] When I compile it with that, the first part of it goes fine, it's when I use lcclnk to link it I … | |
hi i'm trying to edit gridview rows. the grid columns are template cplumns. i added the commandfield buttons for update. i wrote a rowupdating event: [CODE=asp]MonthTable.Rows[e.RowIndex]["FirstEnter"] = ((TextBox)(MonthGridView.Rows[e.RowIndex].Cells[6].Controls[0])).Text;[/CODE] on runtime i get this error: Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'. what have i done wrong ? | |
I now have teo classes the first one contains this [CODE]import java.awt.*; import javax.swing.*; class fm1 extends JPanel { public fm1() { this.setLayout(new GridLayout(3,0)); Dimension D1 = new Dimension (300, 300); JLabel fruit1 = new JLabel(); fruit1.setPreferredSize(D1); fruit1.setOpaque(true); this.add(fruit1); JLabel fruit2 = new JLabel(); fruit2.setPreferredSize(D1); fruit2.setOpaque(true); this.add(fruit2); JLabel fruit3 = … | |
This is my code its to calculate book club points earned. i cant see where the error is if any one can help me i would be very gratefull. thank you def main(): books = getBooks points = getPoints printPoints def getBooks(): books = input("enter the books purchased") return books … | |
Hi.. my query is.. i have combobox in that i have to load the particular column from db.. for that i used ... ...... da.fill(ds,"user") dt=ds.tables("user") for i= o to dt.rows.count -1 combobox1.items.add(dt.rows.count(i).item(0)) next my doubt is... i have lots of columns in my table(db)... if i load combobox one … | |
how can i declare this correctly: because i always get an error like, too long declaration. Type of food Name Address Average cost Thai ABC Makati 250 American DEF Pasay 350 Asian GHI Manila 150 Thai JKL Muntinlupa 300 Thai MNO Paranaque 350 American PQR Manila 200 Asian STU Makati … | |
Why we use main() function in c and c++? please reaply as soon as possible. | |
Hi I am Gaytri i would like to know:- why we use main() function in C. And what is advantages of main() function. | |
Hi, How to connect to remote server with storedProcesdure sp_addlinkedserver where the server has an instance SQL2005. suppose the servername as 'SrvName\SQL2005'. Also please provide the procedure how to delete a remote server from sysservers table. Thanks, Ukbasak | |
Can somebody tell me the file read and write syntax. I found the following code on the net. but didnt get that. fs2.Read(fs2Content, 0, (int)fs2.Length); fs1.Write(fs2Content, 0, (int)fs2.Length); what exactly first, second and third arguement will do in above statements. pls give me some details regarding this. Thanks | |
Hi All, I want to create a custom treeview control in which some nodes will have image and some will not. What should do for this, Need some Help. | |
Are there any equivalent classes in python for the for the following java classes import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.protocol.Protocol; Thanks | |
I'm trying to read a single letter from the beinging of a string that is generated from user input. Though it sounds childishly easy, I think I may seriously have a heart attack from trying to solve this problem. Example code follows: [code=CPP] #include <iostream> #include <string> #include <sstream> #include … | |
hi guys..! i need some help on how can i print out the output of my program.. the problem is, it will only print out the first char of a characters and i don't know how to use the pointer using an multidimensional array. ex. input: jhonny output: j here's … | |
This may be a stupid question but.. I am trying to do something like this.... [code] if not something and not somethineElse and not someOtherThing and not thisThing: print "asdf" [/code] and i get an invalid syntax error. so how do you do that properly? google wasn't much help. | |
Hello everyone I am new to the forum I have a question. I created a method foo(ifstream &myfile) and works only if executed ones. In a loop or consequtively calls make the cerr call [code]int foo( ifstream &infile){ if (!infile) { cerr << "Unable to open file "; return -2; … | |
Hello I wanna ask is it possible to to us vb for building a program's GUI and c++ for its coding? | |
Dear All, How to Check registry Key existences in XP using Visualbasics 6.0, For example i want to check HKEY_LOCAL_MACHINE\SOFTWARE\Test1\Test2\Hardware\MachineID\100000 if this Key exist means i will run one bat file else i will run another batch. my aim is to Check Key Availablity. regards User | |
[CODE] class OrdArray { private double[] a; // ref to array a private int nElems; // number of data items //---------------------------------------------------------- public OrdArray(int max) // constructor { a = new double[max]; // create array nElems = 0; } //---------------------------------------------------------- public int size() { return nElems; } //---------------------------------------------------------- public int find(double … | |
Hey guys i was wondering if any of you could help here. I've looked around the forums and found a few topics on word_count, the problem is that they use codes that my class hasn't gone into yet so i cant use either. My problem is that we are supposed … | |
Hi, I want to do like 1> drop down menu for language selection 2> If select language convert whole page text to that language selected language. So how to add or use translator( converter ) how to use google translator?? How to do that?? | |
time is of the essance, and i've been searching all day for a way to make a roll over button drop down menu. i'm using a table (for now), as my hunt for decent roll over button codes kept coming up with software marketing sites, or complicated script. i came … | |
Hi All, I am working on a project and have come across a slight problem. I have a file i am reading in that consists of the following: John Smith 333222333 01/01/80 M z11119 cs111 2008 fall a cs222 2009 spring f The first line is the Students information, the … | |
[B]Hi! I'm a complete newbie and I need some help. I have this piece of code which is opening link in new window: [CODE]<script type="text/javascript">//<![CDATA[ document.write('<a href="javascript:void window.open('<?php echo $product_flypage ?>');">'); document.write( '<?php echo ps_product::image_tag( $product_thumb_image, 'class="browseProductImage" target="_self" border="0" title="'.$product_name.'" alt="'.$product_name .'"' ) ?></a>' ); //]]> </script>[/CODE] How to change … | |
im facing problem in retaining values after submitting or reloading the php forms...plz help | |
hey guys i am new to java...well data structures, i have this assignment, where we have to basically accomplish radix sort. The first method is building a master linked lists. i have not even started can anyone help with me with that package sorting; import java.io.*; import structures.linear.Node; /** * … |
The End.