43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for datdude07

Hi I was wondering if anyone could help me figure out why every time I try to run this code it keeps bringing up an error of "cannot nest procedures". I need to use the PROTO and PROC directives in this program for my HW assignment. I'm also trying to …

Software Development assembly
Member Avatar for datdude07
0
451
Member Avatar for dennysimon

hello all I fill datagridview Row[0].Cells[0] with the following command dgv1.Rows[0].Cells[(0].Value="-1"; //------------------- how to give color so that the content "-1" in datagridview has red in color (forecolor) thank you denny

Software Development
Member Avatar for dennysimon
0
137
Member Avatar for bigredaltoid

I need to read in a list from a text file, put that list in a list, read in the amount of credits the students earned as an int, and than add 16 credits to the list. Here is my code so far: [CODE]myList2 = [] myList = [] myFile …

Software Development python
Member Avatar for bigredaltoid
0
194
Member Avatar for YourGamerMom

I used a multi dimensional array: [CODE]int grid[3][3];[/CODE] then I assigned all the variables in the array to the number 2 like this:[CODE] grid[0][0] = 2; grid[0][1] = 2; grid[0][2] = 2; grid[1][0] = 2; grid[1][1] = 2; grid[1][2] = 2; grid[2][0] = 2; grid[2][1] = 2; grid[2][2] = 2;[/CODE] …

Software Development c
Member Avatar for YourGamerMom
0
99
Member Avatar for tyricec

I'm trying to make my rectangles appear on screen, but it appears blank when I run the program. [CODE]#include <GL/glut.h> #include <stdlib.h> #include <math.h> using namespace std; struct GLPoint { GLint x; GLint y; }; void init(void) { glClearColor (1.0, 1.0, 1.0, 0.0); glShadeModel (GL_SMOOTH); } void display(void) { int …

Software Development c c# c++ opengl
Member Avatar for tyricec
0
234
Member Avatar for smmcfarl

My program is compiling fine but my issue is with the output. The grades are not correct and the counters are not working either. If anyone can help that would be great. [CODE]//stud.cxx #include "stud.h" studType::studType(int idVal, float exam1Val, float exam2Val, float exam3Val) //********************************************* { id = idVal; exam1 = …

Software Development c++ ios
Member Avatar for gusano79
0
155
Member Avatar for ram619

This is a question from some book. When u run it u would get base address of the arguments provided that is, if u write in CMD "myprog one two three" then the address would be like 65521 n 65525 n 65529 Means equal byte consumption by all the arguments. …

Software Development c
Member Avatar for ram619
-1
158
Member Avatar for thatjoeguy01

Hey, So I am a very experienced PHP programmer and completely new to python, I was wondering if someone could assist me with this program I am trying to make, The idea is simple The program has 10 different fortune quotes, the user needs to be able to tell the …

Software Development python
Member Avatar for thatjoeguy01
0
184
Member Avatar for ibpet11

Hi Pal, I have issues with inserting date into my database. Though i declare the datatype as datetime in my SQL server database I will sincerely appreciate someones assistance in helping me fix the error. the error message is " [B]Conversion failed when converting datetime from character string[/B] " here …

Software Development vb.net
Member Avatar for Mitja Bonca
0
114
Member Avatar for Mopikope

I am trying to delete the array element that matches with the user input. So I am trying to shift all the cells after the deleted one to the left 1 spot. I know it's still in the loop of the if statement(line 11 and 31) but I can't figure …

Software Development c++
Member Avatar for Mopikope
0
128
Member Avatar for cummings15

I need some help my code repeats the add new employee and is not asking for index. What I was supposed to do. Write a function name hireOne whose parameters are the array of structs, and the size of the list; the function should prompt the user to input a …

Software Development c++
0
51
Member Avatar for nndung179

Hello Everybody !!! I have a problem about TreeView and ListView. I have a form to manage student. When I add, the data appear on ListView and TreeView at the same time and the same data. Everything works perfectly. But one proble about Delete button. I choose the line from …

Software Development listview vb.net
Member Avatar for nndung179
0
1K
Member Avatar for onyx112

So I'm trying to create a program that will take values from one array and multiply them with the values in the second array and then allocate the answer into a third array, then returning that array as a result [code]import java.util.Arrays; public class ArrayCreator { public static void main( …

Software Development java
Member Avatar for JamesCherrill
0
123
Member Avatar for ddanbe

Just start a new Windows Forms Application and change the Form1 constructor to this code(which was copied from MSDN) [CODE=csharp] public Form1() { InitializeComponent(); // Create the calendar. MonthCalendar monthCalendar2 = new System.Windows.Forms.MonthCalendar(); // Set the calendar location. monthCalendar2.Location = new System.Drawing.Point(50, 50); // Change the color. monthCalendar2.BackColor = System.Drawing.SystemColors.Info; …

Software Development windows-vista windows-vista-7-8
Member Avatar for hscoder
0
516
Member Avatar for rockerjhr

Card shuffling and dealing create a program to shuffle and deal a deck of cards,the program should consist of a clas card a class deck of cards and a driver program To deal a card, the driver just prints it out. The dealCard function does not print anything. this is …

Software Development c++
Member Avatar for raptr_dflo
0
172
Member Avatar for Chavis

Good day all, I'm trying to create a template class just for learning purposes. And i keep coming up with two errors... Here's the script: HEADER FILE "lottoclass.h" [CODE] #ifndef LOTTOCLASS_H_INCLUDED #define LOTTOCLASS_H_INCLUDED using namespace std; template<typename T> class Lottery { public: Lottery(); ~Lottery(); T Resize(T* array, int i); void …

Software Development c++
Member Avatar for raptr_dflo
0
162
Member Avatar for zolomon

Hello everyone, I have a question about the getline() function. I want to read from a text file and add each sentence to a string array, separating them by the full-stop. The getline() function format for input from a text file is different from the one that takes keyboard input. …

Software Development c++ file-system
Member Avatar for WaltP
0
390
Member Avatar for king_koder

What does xrange do in python?? And how do I implement a similar function in Python3??

Software Development python
Member Avatar for Gribouillis
0
11K
Member Avatar for arindam31

Hi , I am trying to save the output of "help('tkinter')" in a text file. But i get error. I want to know if there is a Way to get the output of help file redirected to a file , or save in a variable. By the way , the …

Software Development file-system python tkinter
Member Avatar for Gribouillis
0
408
Member Avatar for Gyani.gtst

i am getting output as XYZ... ABC... This is \t\t\033[40m\033[32mUP\033[0m instead of XYZ... ABC... This is UP i am trying to diplay "UP" in green colour. below is the code: #!/bin/bash var=` /export/home/GT/AM/bin/xacct test -i | grep OK | wc -l` if [[ var -eq 2 ]]; then echo "This …

Software Development shell-scripting
Member Avatar for Gyani.gtst
0
222
Member Avatar for ultimatebuster

How come unittest.TestCase doesn't exist for me? [CODE] Traceback (most recent call last): File "D:\My Projects\TAGEngine\TAGEngine\trunk\unittest.py", line 1, in <module> import unittest File "D:\My Projects\TAGEngine\TAGEngine\trunk\unittest.py", line 4, in <module> class CheckStructureAcceptance(unittest.TestCase): AttributeError: 'module' object has no attribute 'TestCase' [/CODE]

Software Development python
Member Avatar for Utopia_Tz
0
5K
Member Avatar for maggoteer

Hey guys, I've looked around the forum and seen a few answers that looked like it should have solved the problem - but didn't. I'm trying to create a function that will check the database and compare it with the value of my label. (Basically a Version Checker) If it …

Software Development asp.net vb.net
Member Avatar for Mitja Bonca
0
163
Member Avatar for satti

Hi ya, Iam using firebird v 2.5 database with vb.net .i just want a help regarding how to create a new user in fb database programmatic ally in vb.net . thank you.

Software Development vb.net
Member Avatar for satti
0
370
Member Avatar for C++newbie chick

Hello guys, just wondering why my program crashes when I try to delete a struct from my array. I'm trying to code so that the user searches for a student via a student ID, then opt to delete the searched student's record. I thought I got it right and the …

Software Development c++ ios
Member Avatar for chandara
0
859
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 …

Software Development vb.net
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 …

Software Development c++ mathematics
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: …

Software Development python
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 = …

Software Development api python tkinter
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 …

Software Development python
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 …

Software Development gui java java-swing mathematics
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 …

Software Development c file-system
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 …

Software Development open-source vb.net
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 …

Software Development java java-swing
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): " ); // …

Software Development java
Member Avatar for thines01
0
117
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 …

Software Development c++ file-stream file-system ios mathematics
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 …

Software Development c
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 …

Software Development c c# c++ gaming
Member Avatar for Octet
0
216
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 …

Software Development business-entrepreneurship mysql vb.net
Member Avatar for gd740
0
4K
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 …

Software Development sql vb.net
Member Avatar for aishapot
0
211
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

Software Development java
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 …

Software Development c++
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 …

Software Development java java-swing
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 …

Software Development apache asp.net c# cybersecurity
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 */ …

Software Development c c++
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 …

Software Development file-system python
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 …

Software Development file-system python
Member Avatar for TrustyTony
0
2K
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 …

Software Development java
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, …

Software Development python
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': …

Software Development python
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 …

Software Development c++ file-stream
Member Avatar for 3FatCats
0
244

The End.