64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for sackymatt

Hi all I have a situation, i have a form that has a datagridview, on form load, it selects the data from sql db, now what i want is when i right click on one row, i should be able to delete that row and it should also get deleted …

Member Avatar for Pgmer
0
2K
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 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 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 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 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 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 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 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 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 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 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 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 harinath_2007

Could anybody direct me to J2ME API link.. I couldn't found the download link.

Member Avatar for harinath_2007
0
135
Member Avatar for aishapot

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click strsql = "delete from student_info where Student_No = " & ctrl & "" Dim sqlcmd As New SqlClient.SqlCommand sqlcmd.CommandText = strsql sqlcmd.Connection = sqlconn sqlcmd.ExecuteNonQuery() MsgBox("Student Deleted") Me.fillclasslist() When I try to delete a student in the list …

Member Avatar for aishapot
0
211
Member Avatar for thorin

I am new to JSP and I am not very familiar with what its advantages and disadvantages are. We all know that Java is a big and complicated language, but it's not as web oriented as PHP. I have also heard that it's more expensive to find a server for …

Member Avatar for peter_budo
0
156
Member Avatar for Buppy

Hi, So, let's say i have a string "--_some_String_123". What is the correct regular expression pattern to remove those "-" and "_" from the beginning of the string? They only need to be removed from the beginning, so after removal the string looks like this - "some_String_123". There can be …

Member Avatar for cwarn23
0
117
Member Avatar for dennysimon

hello all how is the code to move the cursor from textfield1 to textfield2 right after key "enter" pressed ? thank you denny

Member Avatar for JamesCherrill
0
121
Member Avatar for v3ga

I am doing a program to do dfs traversal given the adjacency matrix. My code follows: [CODE] #include <iostream> #define SIZE 10 using namespace std; bool M[SIZE][SIZE]; int flag[SIZE]; int dfsNum[SIZE], num; int n; void dfs( int u, int p ) { flag[u] = 1; dfsNum[u] = num++; for( int …

Member Avatar for v3ga
0
2K
Member Avatar for Erlendftw

Hello there Daniweb community, i am creating a 2d game in Java, however i have a problem. I googled up KeyListeners for JFrame, as they didnt work as usual, and i found out that when using KeyListeners with JFrame you have to set focus, right? Well. I have Googled abit …

Member Avatar for Erlendftw
0
151
Member Avatar for mementomori

Two applications, two different problems. Both of these applications worked perfectly in the test environment with SSL authentication turned off. Now that we've moved to a live environment, the applications can no longer connect to the client company's ActiveMQ messaging queue. using dlls from Spring.Net version 1.3.1. Connection string uses …

Member Avatar for mementomori
0
2K
Member Avatar for ravinder yadav

i want to write a program which display alert message whenever 15 mins are over.But i am not finding solution of my problem using waitforexit() or delay() functions. [CODE] #include<time.h> #include<stdio.h> #include<dos.h> #include<conio.h> void main(void) { time_t timer; struct tm *tblock; time_t t; //timeout=18000; /* gets time of day */ …

Member Avatar for ravinder yadav
0
344
Member Avatar for sofia85

Im a beginner at Python and I have written a program consisting of three functions and now Im stuck when I need to 'call' on them at the bottom of the program. In the 1st and 2nd functions I get some information and saving it to a file, but the …

Member Avatar for Gribouillis
0
128
Member Avatar for bigredaltoid

Your program should calculate and output (to the screen) the following information about the file of text: 1. The total number of lines in the file, including blank lines. 2. The number of blank lines in the file. 3. The number of periods in the file. 4. The number of …

Member Avatar for TrustyTony
0
2K
Member Avatar for montjoile

hi! I need to populate a flex combobox with the result query of a oracle db, using coldfusion. I have this code, but it is not functioning: my flex webpage: [CODE] <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:Label x="230" y="36" text="Selecionar Consolas"/> <mx:Script> <![CDATA[ import mx.events.*; import mx.collections.*; import mx.rpc.events.ResultEvent; …

Member Avatar for montjoile
0
237
Member Avatar for joehms22

I've got an algorithm that at most does 1 operation for the first time a loop is run, 2 for the second, 3 for the third up to n for the nth. Essentially the sum of all numbers 1 to n is the worst case running time. or [TEX]\frac{n*(n+1)}{2}[/TEX] I …

Member Avatar for joehms22
0
454
Member Avatar for govnah

Hi friends, i am trying to create a media gallery which will display images from a folder. I have sorted the images into a separate folders according to years i.e (2011,2010,2009). which i will be using as navigation. so far i've been able to list the folders in the directory …

Member Avatar for govnah
0
177
Member Avatar for Depsi

Hii all, I have an assignment in my java course and i just did the required 1 , and the else is very confusing for me , I'll be very appreciate if any one could help me for 2nd required and then ill try again in the rest . <URL …

Member Avatar for Depsi
0
137
Member Avatar for 1337RAM1337

[CODE]def windchill(V,T): wc = 35.74 + .6215*T-35.75*(V**.16)+.4275*(V**.16) we = round(wc,2) return we def main(): print(" Temperature \n") print("Speed \n") print("---- -20 70 10 0 10 20 30 40 50 60 ") for V in range(0,55,5): print(V) for T in range(-20,70,10): wc = windchill(V,T) print(V, "{0:1.1f}".format(wc), end="") main()[/CODE] Its python 3, …

Member Avatar for 1337RAM1337
0
593
Member Avatar for kwajo

i need some help with this code please :) when i run this code the output after each time the nested loop runs should look like this: {'gender': 'Female', 'age': 9, 'fur': 'Brown', 'name': 'Savannah'} {'gender': 'Male', 'age': 9, 'fur': 'White', 'name': 'Thumper'} {'gender': 'Male', 'age': 8, 'fur': 'Brown', 'name': …

Member Avatar for kwajo
0
487
Member Avatar for 3FatCats

The assignment requires program to read from a file into an array, use two boolean functions to validate certain data (set to "true" when there are no errors) then output any errors to a separate file. Everything works fine except for validating the rate. All the numbers are read into …

Member Avatar for 3FatCats
0
244
Member Avatar for andarivaadu1

[CODE]<?php $author_id = $_GET['author']; $subject = $_GET['subject']; $pubtype = $_GET['type']; $year = $_GET['year']; $college = $_GET['college']; $department = $_GET['department']; $keyword = $_GET['keyword']; $keyword = mysql_real_escape_string($keyword); $subject = mysql_real_escape_string($subject); $year = mysql_real_escape_string($year); //If any of the fields were left blank, we will assign % to the variable to use as wildcards …

Member Avatar for joehms22
-1
160
Member Avatar for yurigagarin

Hi all, I have this code here and I like to save all the messages into 1 text file name contimer.txt. I've tried to do [CODE] FILE *output fopen(output,"comtimer.txt", "ww"); [/CODE] right before the function Timer 1 and change every "printf" function into fprint_s(f, "Message", variables) but it does not …

Member Avatar for yurigagarin
0
225
Member Avatar for srinidelite

Hello EveryBody, Today i planned why not myself to do project in php... The idea behind in this is ... to avoid people just like that answering questions in objective type.. like if a person who ans a question who suppose to ans further Q..Who discovered php? a.ramus b.denis c.srini …

Member Avatar for Stefano Mtangoo
0
241
Member Avatar for Revlis

Hi all, So my task was to build basically photo-based department org-charts for a SharePoint 2007 environment. Not sure why I was asked to do this as the last time I web designed was when Netscape 4.0 and IE4 were still duking it out, but whatever. I inserted my images …

Member Avatar for Revlis
0
2K
Member Avatar for caut_baia

Hi.I get the following error "g++: error: CreateProcess no such file or directory" whenever i try to compile a program.I have installed the MinGw 7.2 version at work on a windows machine and the problem does not occur , however after installing windows SP3 on my home computer i get …

0
219
Member Avatar for Tsuchino

Hi everyone, I'm a fairly new Java student and I need some help regarding subclass. This is what I'm trying to do: Basically, I created a Superclass called Person, and from it I created a subclass called CollegeMember. Now, I need to divide the CollegeMember subclass to "Lecturer", "Student" and …

Member Avatar for Tsuchino
0
103
Member Avatar for AngieS

With the code below I have the plant information printing out first and then all of the availability printing out last. Is there any way I can get both printing together, but not have duplicate pictures and information for the numerous sizes that sometimes list per plant. Ex. Buxus Green …

Member Avatar for diafol
0
208
Member Avatar for garu525

I'm having an error "a value of type "double" cannot be used to initialize an entity of type "double *" Any tips? Thanks! [CODE]#include <iostream> #include <string> using namespace std; struct sample { string name; double *num; unsigned elements; }; int main () { sample x = {"Dude", [COLOR="Red"]{1, 2, …

Member Avatar for garu525
0
5K
Member Avatar for NoMoreRobots

I'm currently trying to learn OpenGL with the use of GLFW and the Addison Wesley book 'OpenGL Programming guide 7th edition'. Here is one of the first sample programs they present, it is meant to draw a white box. In this example I mixed it with a simple glfw window …

Member Avatar for NoMoreRobots
0
865
Member Avatar for sasho648

My question is why fstream can't read 0x1a. For example make a test file and inside it write in HEX editor 30 1A. [CODE]#include <iostream> #include <fstream> typedef unsigned long DWORD; using namespace std; fstream myfile; template <class T> T grad(T value, int step) { T val(value); if(!step) return 0; …

Member Avatar for sasho648
0
366
Member Avatar for bbman

Hi all, here's a kinda bullet-pointy explanation of what i have - I have a simple JFrame - I create a JPanel called 'ContentPane' [CODE]contentPane = new JPanel(); contentPane.setBackground(SystemColor.window); contentPane.setBorder(new LineBorder(SystemColor.inactiveCaption)); contentPane.setLayout(null); setContentPane(contentPane);[/CODE] - the JFrame has a [CODE]JMenuBar -> JMenuBar -> JMenuItem[/CODE] - The JMenuItem has a MouseListener and …

Member Avatar for JamesCherrill
0
167
Member Avatar for bilal_fazlani

i know crystal reports can access data stored database.. what I want is actually to create a report on the basis of a listview values..no database at all. how do I pass these listview items and subitems to crystal reports... please help guys..

Member Avatar for bilal_fazlani
0
126
Member Avatar for bigredaltoid

Hi..me again. I am trying to incorporate this function which counts the periods into the code..however, I can not get the code to output both the line count, blank line count, and period count at the same time. This is my 3rd or 4th try at adding this into the …

Member Avatar for woooee
0
145
Member Avatar for geekman89

Hello everybody. I am in need of an answer. How can I use the text from a string and use it as a variable's name? For example: I have an array: int xyz[] = new int[5]; And say I want to check if it's name is the same as a …

Member Avatar for geekman89
0
501
Member Avatar for scamquist

I have an intranet using php 5.3.8 on Server 2003 using IIS 6.0 and SQL 2005. I run a command to call a batch file that starts and stops sql server and then calls a stored procedure to delete records from a table Items and then refreshes the records from …

Member Avatar for scamquist
0
216
Member Avatar for efronefron

the problem is if you increase buff size and also change the buff size in a3_fgets_2 function call to more than 15, the program will run in an infinite loop, Can anybody tell me why? Thanks [CODE]#include<unistd.h> #include<string.h> char * a3_fgets ( char * str, int num, int fd ); …

Member Avatar for efronefron
0
267

The End.