199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Otter992

the question asked me make a program that would find opens an read a txt file and calculate or display the following. - the number of numbers - sum of all the numbers in the file (running total) -average of numbers in file the .txt file just has 100,200,300,400,500,600,700 each …

Member Avatar for gevorg1808
0
226
Member Avatar for Joshua Kidd

Hello, Lets say I have a users Database. When the user registers, it assigns a random id to the user using the mt_rand(); function. What if there is a slight chance that there would be already the id of that user in the db. How can I prevent this from …

Member Avatar for Joshua Kidd
0
85
Member Avatar for n3xtgen

I am trying to get the maximum value in an array but when I try to display it I get every value from that array. [CODE] for (var ii = 0; ii < items.length; ii++) { var myArray = [items[ii].odoEnd]; var highestEnd = (Math.max.apply(Math,myArray)); $("#trips").append("<li>" + items[ii].TripDate + " : …

Member Avatar for Airshow
0
153
Member Avatar for Idestruction

I am doing this assignment for my C++ class, and we have to instantiate 4 objects of the Student class, set the data members and then sort them according to the GPA variable. Ive whittled down the errors to just one, and I am stumped. Here is the error: error …

Member Avatar for Idestruction
0
351
Member Avatar for itzcarol

Hello Guys! I need help for an assignment. Somehow my code will not correspond to what I'm looking for. I'm having a hard time to find what the problem is. If you guys can please help me, I'll be more than appreciate !!!!! [I]1) Create a program that will read …

Member Avatar for Labdabeta
0
4K
Member Avatar for Flames91

Hi all, I'm fairly new to python and I'm stuck with a problem. What I'm trying to do is write a recursive function that takes a list of integers and returns true if the list contains a single pair of integers whose sum is negative, and false otherwise. For example: …

Member Avatar for arson09
0
778
Member Avatar for sys73r

[CODE]from tkinter import * def handler(event): print("Clicked at", event.x, event.y) class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() for r in range(6): self.master.rowconfigure(r, weight=100) #Creating custom buttons self.master.columnconfigure(0, weight=100) Button(master, text="Red",command=self.colorit).grid(row=6,column=0,sticky=E+W) self.master.columnconfigure(1, weight=100) Button(master, text="Blue").grid(row=6,column=1,sticky=E+W) self.master.columnconfigure(2, weight=100) Button(master, text="Green").grid(row=6,column=2,sticky=E+W) self.master.columnconfigure(3, weight=100) Button(master, text="Black").grid(row=6,column=3,sticky=E+W) self.master.columnconfigure(4, weight=100) Button(master, text="Open", command=self.hanlderf).grid(row=6,column=4,sticky=E+W) Frame1 = …

Member Avatar for sys73r
0
2K
Member Avatar for mjohnson

hello I'm trying to create program to check for the user password"only numbers" if it's correct then go to the next step. if not just type Invalid password the password should be store in another file which is "password.txt" this is my code but I couldn't make the program check …

Member Avatar for mjohnson
0
1K
Member Avatar for chijkl

I have problem with the convert button please help Thanks in advance [CODE] <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <script type="text/javascript"> var th = ['',]; var dg = ['zero', 'ichi', 'ni', 'san', 'yon', 'go', 'roku', 'nana', 'hachi', 'kyuu']; var tn = ['juu', 'juuichi', 'juuni', 'juusan', 'juushi', 'juugo', 'juuruko', 'juushichi', 'juuhachi', 'juuku']; …

Member Avatar for chijkl
0
141
Member Avatar for je5ter461

below is my current code for a math game i'm having problems creating the answer checking part of it, any assistance is appreciated. [code] import javax.swing.*; import java.util.Random; import java.awt.Button; import java.awt.Color; import java.awt.Dimension; import java.awt.Event; import java.awt.event.*; import javax.swing.*; public class MathPanel extends JPanel { // Declares Labels and …

Member Avatar for je5ter461
0
210
Member Avatar for br0wnm4n

I am creating a rock, paper, scissors game (RPS) for my C++ class. I got most of the code working but I can't figure out how to implement the Log and the printLog functions an. I've been working on this assignment for the past 6 hrs and this is the …

Member Avatar for WaltP
0
911
Member Avatar for M09

Hello I can't understand OOP in python I am looking to good tutorial , i am looking to good tutorial , about OOP in python from zero Thank you

Member Avatar for M09
0
551
Member Avatar for jtbens01

I've searched google and tried several different things but I can't figure out how to read strings into a two dimensional character array and also read doubles into separate arrays all from the same text file. Please provide any help you can and let me know how you might accomplish …

Member Avatar for jtbens01
0
210
Member Avatar for flywheeljack

Hi, I am trying to get the value from a field in my Access DB.Once the value is retrieved I need to be able to compare it to a condition I set. I still haven't figured out the right code to make this happen....i don't know if I should convert …

Member Avatar for dew97
0
145
Member Avatar for jackmaverick1

For some reason the file that I input into my GUI isn't being found by Java even though windows explorer finds it just fine. If you'd like to see a specific part of the code, just ask! Thanks in advance, Jack

Member Avatar for jackmaverick1
0
9K
Member Avatar for dew97

Private Sub ComboBox6_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox6.SelectedIndexChanged con = New SqlConnection("Data Source=DEW-D63D9D2D032\SQLEXPRESS;Initial Catalog=system1;Integrated Security=True") con.Open() sql = "Select Faculty_Id From Faculty where Faculty_Name='" + ComboBox6.SelectedItem.ToString() + "'" cmd = New SqlCommand(sql, con) rdr = cmd.ExecuteReader() While (rdr.Read()) fid = rdr.GetInt32(0) End While con.Close() MsgBox(fid) con1 …

Member Avatar for dew97
0
150
Member Avatar for DaniwebOS

Originally I had the program all in main but I wanted to separate this by having the comparison method (diamond of asterisks) in its own method. For some odd reason I'm getting weird errors that won't allow the program to run. Errors below: 1) Systan error on token "," delete …

Member Avatar for DaniwebOS
0
297
Member Avatar for craign924

hello forum, i work with oscommerce and i have to upgrade from 2.2 to 2.3. since all my tables --products, categories etc. are in 2.2 i thought i would just install 2.3 and then import the 2.2 db and viola!! but it did not, and does not work like that. …

Member Avatar for Stefano Mtangoo
0
91
Member Avatar for dakerao

hello i have my code here and i want to add two numbers together constantly #include <iostream> using namespace std; int main() { int a = 10; int b = 10; cout << a+b; return 0; } how to make A+B add constantly?

Member Avatar for Chilton
0
213
Member Avatar for mehnihma

My question is ; how to take a value from a loop and continue the loop and take the new value again, print it and add it to the old one? thanks [CODE] while (numCourses <= 3) // loop 1 times { System.out.print( "Enter grade (one character): " ); // …

Member Avatar for thines01
0
117
Member Avatar for Pragati.rch

trigger i am wrting on mysql table i have a tool in which i am calcultaing marks 140 atomic questions and now i want add 4 questions marks and assign to one major questions. how should i approach it. begin ("$value.governance and accountability") = ("$value.existence of a governing board") + …

Member Avatar for smantscheff
0
318
Member Avatar for revjim44

I'm new to Java (2 weeks) and was given a class assignment to create a program that takes a 5 digit number and checks to see if it is a palindrome (same forwards as backwards.) The requirement stated to use the methods main(), retrieveInput(), check(), and display(). My code works …

Member Avatar for hfx642
0
218
Member Avatar for Draucia

I just started getting into php recently and I wanted to create a simple login with(out any SQL (haven't learned it yet :$). So Here is my code for login page: [code=php] <form action="index.php" method="post"> Username<input type="text" name="user" /> <br /> Password<input type="password" name="pass" /> <br /> <input type="submit" /> …

Member Avatar for Stefano Mtangoo
0
115
Member Avatar for slygoth

I am trying to open a text file in C++. I dont want the file to be open in the console i want to open the file using one of the text editors like gedit. Can someone show me how to open it using gedit and not in the console. …

Member Avatar for Stefano Mtangoo
0
275
Member Avatar for Kadence

How would one listen for keyboard input, without causing the program to pause waiting for the input? For instance say you have something like [CODE]float num = 0; bool runloop = true; for(int i=0; i<1000000 && runloop; i++{ n += some_time_consuming_transformation(i); // How to listen for input at this point? …

Member Avatar for mtbfreak
0
2K
Member Avatar for lamees

Hi all, I'm new to python. I am developing a text to speech application using python. So, I'm using a package named "pyTTS" version 3, compatible with python 2.5. Using an existing example, I wrote the following orders: [CODE] import pyTTS tts = pyTTS.Create() [/CODE] [B]Before this, I've installed the …

Member Avatar for vegaseat
0
461
Member Avatar for davy_yg

Hey, out of the following codes: product_edit.php [CODE] <h2><center>Product Preview</center></h2> <p></p> <?php $data = array(); if(!empty($_GET['id'])) { $result = mysql_query("SELECT * FROM produk AS p, kategori AS k WHERE id_produk='".mysql_real_escape_string($_GET['id'])."'AND p.id_kategori = k.id_kategori") or die(mysql_error()); $data = mysql_fetch_array($result); } else { $data['nama_produk'] = ''; $data['nama_kategori'] = ''; $data['harga'] = ''; …

Member Avatar for kevindougans
0
125
Member Avatar for Zssffssz

Well its simple: I'making a group of programs that use one file for settings, however not all settings are used for all programs so instead of making another variable is there any way to just throw, let's say the first line to null read the second line feed the third …

Member Avatar for Labdabeta
0
146
Member Avatar for LagunaGTO

I am trying to write a program that collects gas receipt information. I only want it to ask one time for how many receipts there are and then I want it go ask the loop of questions. How do I do this? I'm guessing I can't declare multiple variables in …

Member Avatar for vegaseat
0
1K
Member Avatar for bangla

Hi, below code gives me error in line 8. 1. i had paymentform.php where i entered data. 2. below is paymentinsert.php where i am getting error in line 8. Fatal error: Function name must be a string in /home/content/59/8390659/html/COUPONDISCOUNTS/php/MySQL/paymentinsert.php on line 8 [CODE]<? $username="aaa"; $password="bbb"; $database="aaa"; $amount=$_POST['amount']; $description=$_POST['description']; $sender=$_POST['sender']; $mysql_connect("host",$aaa,$bbb); …

Member Avatar for bangla
0
168
Member Avatar for maynardjk13

Greetings! I've been working on this program for the past couple of hours now, and I cant seem to get it right. I'm supposed to write a program that reads in integers from a text file, and then find the sum of the integers. The problem I'm having is with …

Member Avatar for maynardjk13
0
234
Member Avatar for jakeray

I have been searching for an answer to this for the last two days. I am trying to add a list of manufacturers to an existing form in php. This worked out ok and I got it to work somewhat. Here is the problem when the user makes the selection …

Member Avatar for joehms22
0
267
Member Avatar for ZeroEddy

Hey I have recently started to learn canvas in html5. As of now I can draw all the basic shapes rectangles arcs etc. I am also able to get the mouse coordinates and show them in a text box in the main body of the html. I am just wondering …

Member Avatar for ZeroEddy
0
269
Member Avatar for terence193

The problem ''Ask the user to enter a year and store it in an int. Then assign to a _Bool variable the value true if the year is a leap year. The leap year is any year whose number is a multiple of four. Take into account that years whose …

Member Avatar for Narue
0
140
Member Avatar for infantheartlyje

Hi folks, I had created a class for student. This is the class. [code] class student { int rollno,marks; char name[20]; public: void show(); void get(); int filecreate(const string &,fstream &); int fileopen(const string &,fstream &); static int add(const student &,fstream &); static int read(const student &,fstream &,int); static int …

Member Avatar for WaltP
0
224
Member Avatar for Violet_82

HI there, I was again watching a jquery/ajax tutorial and in the video [url]http://blog.themeforest.net/tutorials/jquery-for-absolute-beginners-day-10/[/url] they show how to use a [ICODE]return:false;[/ICODE]to determine whether a scrip will execute (javascript on) or will go to a separate page if the javascript is off. Basically I have 2 pages test.htm and new_file.htm. The …

Member Avatar for Violet_82
0
229
Member Avatar for Octet

Hello DaniWeb Users, I am new to the forum however from what I have seen it is exceptionally good! I have searched the forums already and found various questions relating to a similar problem as mine however I am unable to work out how I can amend this for my …

Member Avatar for Octet
0
216
Member Avatar for jdm

I'm working on a program that prompts the user for the numerator and denominator for two fractions. Then it will display the two fractions, then display the product of the two multiplied together, then the reduce form of that, and then finally it will prompt the user if they want …

Member Avatar for thines01
0
205
Member Avatar for caswimmer2011

Hey, I am having trouble compiling in netbeans. When I go to compile, I usually go to Run>Clean and Build Main Project (or shift F11). When it compilies, it says Copying 1 file to /Users/me/NetBeansProjects/JavaApplication11/build Nothing to copy. And when I go to run the .jar file, it doesn't open …

Member Avatar for caswimmer2011
0
370
Member Avatar for SamarthWiz

Hi I keep on getting data altered when I receive it example: [CODE] SAM:~ SamarthAgarwal$ telnet 192.168.1.39 8888 Trying 192.168.1.39... Connected to 192.168.1.39. Escape character is '^]'. --Welcome To HACKNET-- Username: Admin Password: pass --INCORRECT IDENTIFICATION--Connection closed by foreign host. SAM:~ SamarthAgarwal$ [/CODE] the data on the server side: [CODE] …

Member Avatar for nezachem
0
1K
Member Avatar for olybobo

dear all I have the following sample code which i am trying to use to connect to sql*plus in visual studio 2010 but i keep getting the error message connection string is not well-formed. see my code below [CODE] protected void Button1_Click(object sender, EventArgs e) { string oradb = "User …

Member Avatar for olybobo
0
718
Member Avatar for Paradox 99

Hi, A bit of searching reveals that a few people have asked this question before, but I can never see the solution revealed. I have a gridview and I've added a column with a template field so that I can put a checkbox control in it. Finding it is no …

Member Avatar for catherine sea
0
208
Member Avatar for Ehtesham Siddiq

Hi, I have my application in VS2008 and coded Vb.net. My query is i want to save record from an excel sheet to my Database Table. But i dont want to insert the Excel sheet as a whole rather i want to insert the record in my database table Row …

Member Avatar for adam_k
0
288
Member Avatar for don420

i want to dynamically add the values in the column of a datagridview the row of which is also being created dynamically... [CODE]Form1.TextBox10.Text = total con.Open() cmd = New SqlClient.SqlCommand("select product,Quantity,MRP,Sale_Rate,Disc_Amt,Amt from sale_table ", con) adapter.SelectCommand = cmd adapter.Fill(ds) Dim r As Integer = ds.Tables(0).Rows.Count Dim counter As New Integer …

Member Avatar for adam_k
0
6K
Member Avatar for Gribouillis

This snippet defines a decorator to automate attributes setting in class instances at creation time. It can be seen as a gadget feature but it can also be handy especially for fast class prototyping.

Member Avatar for Gribouillis
0
268
Member Avatar for spunkywacko

I've created an image with PIL, and I'm trying to get it show on a Tkinter GUI, but I get a blank window. Any ideas? [CODE]import Tkinter import Image, ImageTk, ImageDraw #create an image image = Image.new('RGBA', (100, 100)) i = 0 draw = ImageDraw.Draw(image) ## draw some lines for …

Member Avatar for vegaseat
0
3K
Member Avatar for 0007sj

hello i am new in asp.net and working on my first project and facing problem on modalpopupextender. My thread- [U] When ever i set the properties of modalpopupextender it goes invisible from my design page. when i debug the project and click on link button it shows nothing .[/U] I …

Member Avatar for jbisono
0
185
Member Avatar for abc_123abc

hh.. how can i get the value accumulated from the date i select from datetimepicker1 to datetimepicker2 in vb.net and mysql? the value here refers to the daily sales and i need to find the total sales between the range dates that i choose.. please help me..as im beginner and …

Member Avatar for gd740
0
4K
Member Avatar for challarao

Hi.... I wrote a program for Quick Sort algorithm.... It is compiled fine....but it is giving a run time error i.e., Segmentation Fault.... I tried hard but couldn't find out what is that thing causing segmentation error in this program.... Please help.... I'm getting segmentation fault very frequently (i'm using …

Member Avatar for challarao
0
461
Member Avatar for Majestics

I am working on packet analyzing software, so i just need a kick to start by reading the packets of wireless, but i dont have any idea regarding to it... Any who handled such kinds of projects before please help me a bit....

Member Avatar for joehms22
0
112

The End.