Featured Editorial

'call it like
List1.Clear
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 12)
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 2)
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 4)
List1.AddItem RDMature(Val(Text1.Text), Val(Text2.Text), Val(Text3.Text), 1)

Continue Reading

Recommended Topics

Member Avatar

Hi this is my question , and I have some error in my code ,and I cant correct them ,and I am asking if you could help me ? this is the question : Create a class called BloodDonor that maintains information about blood donors in a blood bank having the following data members: 1. IdNumber, // long int 2. name, //Name of donor 3. bloodGroup//String 4. home_Phone//String 5. mobile_Phone//String 6. address // struct Address that holds int house number, int road number, int block number, string city, and string country It will also have the following member functions: 1. …

Member Avatar
0
934
Member Avatar

My experience with C# is very very limited and a simple python program like the one I'm trying to convert is beyond my experience in C#. If anyone knows of any converters or is willing to help me out I would greatly appreciate it! class ByteReader(object): """ Reads bytes from a file. """ def __init__(self, filename): self._buffer = list(bytearray(open(filename, 'rb').read())) self.pos = 0 self._eof = EOFError('unexpected end of file') def read_byte(self): """Read one byte.""" try: byte = self._buffer[self.pos] self.pos += 1 return byte except IndexError: raise self._eof def peek_byte(self): """Return the next byte in the file. This can be used …

Member Avatar
0
17,699
Member Avatar

Hi there, I've come across an issue while trying to get all the records from a SQL database in java. A bit of necessary introduction here. I'm not using any framework just JDBC and the getAllBooks method is part of a REST call. The failing method is essentially doing this: -getting the number of all records in the db; -getting all the ids and use them to get the records, store them in an array and return that array; Unfortunately the call generates the following error in the while loop: SEVERE: Servlet.service() for servlet [Jersey Web Application] in context with …

Member Avatar
1
318
Member Avatar

So im actually creating a fastfood menu in which save how many times a button been clicked as a variable. So I can multiply it to its value. For example if i click btnChicken a variable will count how many btnChicken been clicked then it will multplied on the amount i set for the value of each chicken.

Member Avatar
2
334
Member Avatar

public bool Kayit_Ekle() { sorgu = string.Format("Insert Into [{0}] ([SERVİS FORM NO],[ÇAĞRI NO]) Values ({1},{2})", sheet, formno,cagrino); cmd = new OleDbCommand(sorgu, Baglan()); cmd.Parameters.AddWithValue("@{2}",cagrino); int etkilenen = cmd.ExecuteNonQuery(); if (etkilenen == 0) { return false; } else { return true; } } Hello there, I am writing recording program with c #. but I'm saving to excel. My question would be: I note excel data but does not start from the first row for example, it starts to record the thousandth continue to lower the bottom line . my goal is to go down to the bottom line at a time …

Member Avatar
1
245
Member Avatar

Here is what i get when compiling py to exe using cx_Freeze... I used Admin cmd too... but it keep give me this error.. how can I make it right...please help me with this. C:\Windows\system32>"C:\\Program Files (x86)\\Python38-32\\python.exe" "E:\\New folder\\Python Player\\Setup.py" build running build running build_exe pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html error: [Errno 13] Permission denied: 'E:\\New folder\\Python Player'

0
21
Member Avatar

After minimize the window disappear from taskbar and i can't set that again as it's looping...Is there any other way to minimize or fix that. watch inline code examples. from tkinter import * from PIL import Image, ImageTk import time from ctypes import windll GWL_EXSTYLE = -20 WS_EX_APPWINDOW = 0x00040000 WS_EX_TOOLWINDOW = 0x00000080 `Inline Code Example Here` def set_appwindow(root): hwnd = windll.user32.GetParent(root.winfo_id()) style = windll.user32.GetWindowLongA(hwnd, GWL_EXSTYLE) style = style & ~WS_EX_TOOLWINDOW style = style | WS_EX_APPWINDOW res = windll.user32.SetWindowLongA(hwnd, GWL_EXSTYLE, style) # re-assert the new window style root.wm_withdraw() root.after(10, lambda: root.wm_deiconify()) print('done') class modtk(Tk): toptitlebar = None maincanvaswindow = None …

0
62
Member Avatar

Hey guys, I want to make a simple program which calculates speed, distance and time. This is the code I used: [CODE] a=input("1)Find speed\n2)Find distance\n3)Find time\n4)Quit\n") while a!=4: if a==1: d=input("\nEnter distance: ") t=input("Enter time: ") print ("Speed: "+str(d/t)+"\n") elif a==2: s=input("\nEnter speed: ") t=input("Enter time: ") print ("Distance :"+str(s*t)+"\n") elif a==3: s=input("\nEnter Speed: ") d=input("Enter distance: ") print ("Time :"+str(d/s)+"\n") a=input("1)Find speed\n2)Find distance\n3)Find time\n4)Quit\n")[/CODE] But, my question is, can't it be done like this: [CODE] s=input("Speed: ") d=input("Distance: ") t=input("Time: ") #Considering 1- is the symbol for 'find' s=d/t if(s==1-): print (s) elif(d==1-): print (d) elif(t==1-): print (t)[/CODE] Won't …

Member Avatar
0
5,847
Member Avatar

Dear the gurus; I am a developing a small program for voting of about 5 candidates. The program should compute and return the candidates and their total tallied votes. If a voter enters a number outside 1-5 it should count it as faulty vote. I have the following program but returns an error. Kindly help #include<iostream> #include<conio> using namespace std; const int vs=5; int votesA=0, votesB=0, votesC=0, spoiltvotes=0;//TOTALS ALREADY INITIALISED-GLOBAL char vote; void main() { // loop over the voting stations int i; for (i=1;i<=vs ;i++ ) // loop over voters cout<<"\n Enter your vote:\t"; cin>>vote; while( vote<=5) { switch(vote) …

Member Avatar
0
8,168
Member Avatar

Visual Tkinter is Python 2.6 GUI builder. Visual Python programming language for advanced Visual Python IDE that offers the possibility. As of December 2008 starting and writing fasting Editor. This software is using Scintilla editing component. <URL SNIPPED>

Member Avatar
-4
1,081
Member Avatar

I'm reading a book about C++. I'm on arrays now. It seems that a two-dimensional array is taken in this way: void Function( int arr[][numberof2nddimension] ) { } Why is that so? Help please. Thanks

Member Avatar
1
137
Member Avatar

I am a developer who recently started working on my own, and I've come across some projects that I can't handle by myself (mostly in React). What resources would you guys recommend for finding / putting together a team of remote developers to join me on these projects?

Member Avatar
4
56
Member Avatar

Hello all! I have an excel file that looks like this: Time of Day Lap Lap Tm Speed 14 - Stoicescu Dan - Regularitate Coupe 9:40:50.835 1 2:47.462 88.763 9:43:37.584 2 2:46.749 89.142 9:46:33.319 3 2:55.735 84.584 9:49:58.901 4 3:25.582 72.304 9:53:13.988 5 3:15.087 76.194 9:55:50.639 6 2:36.651 94.889 9:58:49.884 7 2:59.245 82.928 10:02:33.328 8 3:43.444 66.524 20 - Dima Viorel - Regularitate Coupe 9:40:56.287 1 2:46.284 89.392 9:43:39.673 2 2:43.386 90.977 9:46:18.075 3 2:38.402 93.84 9:48:57.580 4 2:39.505 93.191 9:51:38.104 5 2:40.524 92.599 9:54:18.371 6 2:40.267 92.748 9:57:01.825 7 2:43.454 90.939 9:59:51.986 8 2:50.161 87.355 10:02:33.040 9 2:41.054 92.295 …

Member Avatar
0
104
Member Avatar

Hi all, I've been having a problem adding a record to an Access database using datasets and da.update etc. I'm trying to create a simple program that displays the records of a database table in a series of text boxes. I've managed to get my next and previous buttons working correctly and my update button works correctly too. The problem occurs when I try to add a new record. I keep getting a "Syntax error in INSERT INTO statement" whenever I click my add button. My database table has JobID(number), ElectricianID(number), CustomerID(number), Price(number), Date(date), Time(time), Paid(yes/no) Eventually I will have …

Member Avatar
0
950
Member Avatar

Python-wxPython Tutorial This tutorial will take you through the basics of wxPython. ##Introduction: Let's face it. I am a dinosaur. I got my computer science degree in the mid 70s. And it won't be long before **I** am in **my** mid 70s. So why am I trying to learn Python? Mostly because learning new things keeps my brain active. And besides, nobody on Daniweb seems to be asking questions about vb.Net anymore. So I thought I'd give it a try. After a few weeks of puttering I managed to learn enough Python to rewrite all of my vbscripts (stop laughing, …

Member Avatar
9
8,182
Member Avatar

I'm writing a utility that will likely be called by a script that uses `argparse`, but should be useable by any script. The engine object constructor needs a dozen or so parameters to tune its behavior. The question is: What is the best way to allow the caller to send the necessary parameters without requiring extra work setting params that have defaults. First thought: Since some users will have an `argparse.Namespace` instance already, I might make use of that. But other users would need to create a Namespace (or just a subclass of `object`) which seems like a problem. Second …

Member Avatar
0
137
Member Avatar

I have been browsing the web for days now trying to find a solution to my problem and have yet to come up with anything so far so I figured I would ask some professionals. Basically I need to read a text file which contains records along the lines of: ClientNum LName FName 123456 XX YY etc.. etc.. and then let the user input either a range of ClientNum's or one specific ClientNum and display all data for that one record. So far I have been using getline and have successfully displayed all records with a while loop but I …

Member Avatar
0
4,946
Member Avatar

So I am trying to wrap my head around link lists and the theory is there but the magic isn't (at least in my program)... my problem runs with the void traverseRecord() function. For some reason it automatically shows all the nodes. Maybe I haven't totally grasped the concept of traversing, because I am thinking it will only show one at a time and I know my code isn't exactly right. Ideas anyone? [CODE]// studentGPAquery.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <string> #include <list> using namespace std; struct student { string …

Member Avatar
0
3,620
Member Avatar

Write a complete C++ program for WorldParking Sdn Bhd. to perform the following: a. Write a return-value function named calcCharges() to calculate and return the parking charges for the customers. The company charges a RM1.00 minimum fee to park for up to one hour. An additional RM0.50 will be charged for each hour exceeding the first one hour. The maximum charge for any given 24-hour period is RM10.00. Assume that no car parks for longer than 24 hours at a time. b. Write a void function named calcTotal() to calculate the total charges for all the customers. c. Write the …

Member Avatar
1
130
Member Avatar

I programmatically edit my datagridview cell values. I use the vertical scrollbar to find the row I want to edit, select the row then click an edit button that takes me to another form where changes to the record are made. I then click a button which saves the changes and returns me to the datagridview form. No problems here. When I return to the grid, the records are displayed with the first record at the top of the grid. That is, the vertical scroll bar has repositioned itself to the very top. Is it possible for the datagridview to …

Member Avatar
0
3,224
Member Avatar

First - so I don't get in any trouble - I've posted a similar question on other forums but have not gotten any responses so branching out in my quest for help as well as changing the question a little. Previously I was trying to find out why calling LoadUserProfile(...) was not creating the User Profile if it did not already exist (for example when creating an account programmatically) - MSDN had the following article on HOW TO but it doesn't seem to work (copy/paste the code and switched it to C# - account is created, no failures or exceptions, …

Member Avatar
0
3,410
Member Avatar

Following The New Boston on youtube, he is using is in an if statement and doesnt show any error, on mine I get a syntax warning and it asks if I meant ==, but still displays the output the way it should be.

Member Avatar
1
195
Member Avatar

Hi have 2`springboot` applications running on ports `8085` and `8084`. When I try to use `RestTemplate` to try to connect from one service to another, I get a `BadGateway 502` exception. Below is the stacktrace head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx/1.17.9</center> </body> </html> ]] with root cause org.springframework.web.client.HttpServerErrorException$BadGateway: 502 Bad Gateway: [<html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx/1.17.9</center> </body> </html> ] at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:108) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:186) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:125) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:612) ~[spring-web-5.2.7.RELEASE.jar:5.2.7.RELEASE] Any reason why I might be getting this. Below is the …

Member Avatar
0
32
Member Avatar

Hello everyone, I am working on a project, which corrects user input (reads input stream from keyboard with keyboard module hook) based on some rules. I am trying to find the fastest way to delete and write the corrected word, after a user enters a wrong one. Currently I am using pynput, but I noticed that it faces problem when the user types very fast. To give you a better idea of what I am looking for, I quote the above pseudocode. user enters a word some_checks_are_made if (ok): do nothing else: press_the_backspace_button_until_delete_of_wrong_entered_word write_the_new_word To make it even more clear, …

Member Avatar
0
324
Member Avatar

Hello, Can someone assist me how to create here buttons - Button7 - First - Button5 - Next - Button6 - Previous - Button8 - Last To search in database and display the results. Here is my project until now: - Also if there are mistakes or suggestions to make it better i'm open for ideas to learn too :) <pre> Public Class Form2 Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load Using con As New OleDbConnection(ServerStatus) Using cmd As New OleDbCommand("SELECT * FROM Table", con) cmd.CommandType = CommandType.Text Using sda As New OleDbDataAdapter(cmd) Using dt As New …

Member Avatar
0
145
Member Avatar

What are all num referring to ? class Sample { int num; void method() { num = 1; int num = num = 2; num = 3; } }

Member Avatar
0
1,109
Member Avatar

I am using CPU Sim to change wombat1 to wombat2 by adding stack. I have done adding a Stack RAM and a Stack pointer SPR. I have implemented a push instruction as such: acc->mdr mdr->Stack[SPR] End The implementation is able to push the acc value to Stack but not able to point to the next location to store the next value. For incrementing am I suppose to use Inc2-pc? And the pop instruction is popping out the address of the value instead of the value. The implementation of pop is: ir(4-15)->mar Stack[SPR]->mdr mdr->acc End Can anyone point out what I …

Member Avatar
0
1,076
Member Avatar

I have a Chromecast that I use to stream video from my laptop to our TV. It works great, however, until VLC (Videolan) releases their promised upgrade with Chromecase support, I am limited to streaming files in the mp4 format. Fortunately, ffmpeg allows me to convert other formats to mp4. Unfortunately, figuring out what parameters to use can be daunting. So far I have determined the commands to use to convert avi, flv and mkv. The last two are a simple repackaging of the contents (takes but a few seconds). The first, avi, requires a complete recoding. The following commands …

Member Avatar
1
1,577
Member Avatar

import java.util.Scanner; class bank{ public void termDeposit(){ int principle; double rate,years; Scanner sc=new Scanner(System.in); System.out.print("Enter Principle Amount : "); principle = sc.nextInt(); System.out.print("Enter rate od interest : "); rate = sc.nextDouble(); System.out.print("Enter time period in years : "); years = sc.nextDouble(); double maturityAmount = (principle*(Math.pow(1+(rate/100),years))); System.out.println("Maturity Amount after " +years+ " years is : "+maturityAmount); } public void reccuringDeposit(){ int monthlyInstallmentPayment,months; double rate; Scanner sc=new Scanner(System.in); System.out.print("Enter Monthly payment : "); monthlyInstallmentPayment=sc.nextInt(); System.out.print("Enter Number of months : "); months=sc.nextInt(); System.out.print("Enter rate of interest : "); rate=sc.nextDouble(); double maturityAmount = ((monthlyInstallmentPayment*months)+(monthlyInstallmentPayment*(months*((months+1)/100)))*(rate/100)*(1/12)); System.out.println("Maturity Amount after " +months+ " months is : " …

Member Avatar
1
157
Member Avatar

This is Python 3.4.2 The documentation says that s2 = s1.strip('a') will strip out all the 'a' in s1. When I run it, only the leftmost character - and only if it is 'a' - is stripped. The default s2 = s1.strip() takes out all whitespace. PS: I understand that the chars in () are a list. This is from an IDLE shell: >>> s2 = 'qazxswedc'.rstrip('x') >>> s2 'qazxswedc' (Also with .lstrip('x') and .strip('x') ) Have I found the very last bug in Python?

Member Avatar
0
6,723

The End.