assembly 2,767
c++ 47,917
java 29,786
pascal 1,795
perl 1,611
program 799
programming 670
python 14,199
shell-scripting 1,803
vb.net 19,215
visual-basic-6 9,828
xml 1,318

Haven't programmed in a long time. Last project was a GCODE pathway generator I wrote several years back. My compiler is obviously several years out of date. Uses time(), itoa(), rand(). Current standard compliant compilers should have <chrono>, <thread>, <random>, and to_string() in suppliment to those more deprecated functions. This is a very simple, high speed method of generatinga alot of randomized junk data onto your drive. Make sure you have about 300MB of RAM available for the overhead. An older non-SSD might croak. Useful for making old files unrecoverable by overwriting the old space on a drive. Doesn't go …

Member Avatar
Member Avatar
+2 forum 1

I am making a ping pong game using JavaFX, but before I am going to make that, I like to test the KeyEvents. I made a simple ping pong game about 2 years ago, but I like to improve my game. And was pretty bad controlls back when I made the ping pong game, because of the not smooth controls. so here is the problem: whenever I holdpress A and switch quickly to holdpress D or D to A, same with (W to S and S to W). it just takes a little break and then move, is there something …

Member Avatar
Member Avatar
+0 forum 4

Python-wxPython Tutorial This tutorial will take 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, it's …

Member Avatar
Member Avatar
+5 forum 11

So I am making a responsive audio waveform, if you don't know what that is, it is something like this: (btw this is my goal to make those audio waveforms). https://i.ytimg.com/vi/J7uN-SQtOYI/maxresdefault.jpg https://www.youtube.com/watch?v=OVMuwa-HRCQ https://www.youtube.com/watch?v=SCD2tB1qILc I don't know how to describe it, so just look at the videos and image. but my question is, how do I get the values from the "AudioSpectrumListener", it has a lambda expression. And I need the value of the magnitude. So I can print out the values. Later I will use the values to make rectangles and that rectangles will change height shape because of the …

Member Avatar
Member Avatar
+0 forum 17

Hi guys, I wonder if this is something I could do on this forum. I've never worked with REST, so I thought that it could be a good exercise to try to develop a very small and simple Java application and try to make use of REST as well. I found a brief which seems simple enough, I'll share it with you (I'm happy to change this of course if you think it's useful as for me it's just practice). As a Rest Client I want to submit new orders for bricks So I can start customers’ orders Given A …

Member Avatar
Member Avatar
+0 forum 48

I'm reading data from SQLite database table. If the SQLiteDataReader encounters a negative double an InvalidCastException is thrown. Here is my code. public void DBToArray() { string stm = "SELECT * FROM mtable"; SQLiteCommand cmd = new SQLiteCommand(stm, sqlcon); SQLiteDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { Console.WriteLine( rdr.GetInt32(0) + " " + rdr.GetString(1) + " " + rdr.GetString(2) + " " + rdr.GetString(3) + " " + rdr.GetInt32(4) + " " + rdr.GetDouble(5) + " " + /* -5.0 no good */ rdr.GetString(6) + " " + rdr.GetString(7) ); } } Just wondering if anyone has encountered and solved this …

Member Avatar
Member Avatar
+0 forum 2

I am making a program, and I don't know why my program becomes unresponsive, when I click the button ): I have a feeling its because of this: "connection = server.accept();" I don't know how to fix it. I am trying to recreate this: https://stackoverflow.com/questions/18505123/how-to-use-client-chat-on-different-pc but in javafx. package yeetYeet; import java.io.EOFException; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.ServerSocket; import java.net.Socket; import javafx.animation.AnimationTimer; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.paint.Color; import javafx.stage.Stage; public class Server extends Application{ private ObjectOutputStream output; private ObjectInputStream input; private ServerSocket server; private Socket connection; //set up and …

Member Avatar
Member Avatar
+0 forum 16

I am supposed to sort an array in ascending order..I have tried but then i cant get the results i want.I also tried to look it up in this forum but i still can't get it...Here is part of the code:[ICODE]void sort() { int size=10; int j,temp,i; for(i=0;i<(size-1);i++) { for(j=i+1;j<size;j++) { if(queue[i]>queue[j]) { temp=queue[i]; queue[i]=queue[j]; queue[j]=temp; } } } cout<<"Status: sorting done."<<endl; }[/ICODE] The result i getting is zero for everything...Please help me..

Member Avatar
Member Avatar
-1 forum 10

When we build an application, which layer should we start with? From top (UI) to bottom(Data Layer) or bottom to top?

Member Avatar
Member Avatar
+1 forum 6

I have been wrestling with this for two days now and getting nowhere. Something is broken, either the GridSizer control or me. I'm hoping it's me and someone can show me the problem. I've stripped my app of non-essentials. What I am building is a Sudoku app which consists of several nested controls, as can be seen in the atached image. The outer frame contains the puzzle which contains a 3x3 grid of panes. Each pane contains a 3x3 grid of tiles and each tile contains a 3x3 grid of digits. So far so good. Except for the layout. I …

Member Avatar
Member Avatar
+0 forum 1

I'm using a fairly standard MSI mobo with Intel Core i5-6400 processor and 64 GB RAM. So: Which programming language (besides assembly) is the most effective to use in this configuration when I want to do calculations/modelling trying to find the least number of combinations to fullfill some predefined conditions. More specific I have i.e. 5 sets of combinations each containing three different states: A, B and C. This gives me a total number of 243 combinations. Theoretically it is possible to reduce this number of combinations to 23 so that no matter what combination of the original 243 you …

Member Avatar
Member Avatar
+1 forum 14

Hi guys, as part of an exercise I was involved with, I had to use the factory pattern to create a series of different objects, however I'd like to keep a list or map for what it matters of these objects and I'm getting a bit into troubles here. So basically, I have a CSV file containing some data which I'd like to use to construct my objects: the data in the spreadsheet is arranged in the following cols: name, surname, date_of_birth, type and I'm essentially reading from the spreadsheet and using the factory pattern I'm building a series of …

Member Avatar
Member Avatar
+0 forum 4

Above program takes input of coefficient and power separately of 2 different polynomials add them up to a new polynomial.It is successfully compiled and executed in DEV CPP as C file.It Turbo C compiler add void before main function to avoid warning messages.

Member Avatar
Member Avatar
-1 forum 8

hi everyone. been a while since i have been on here, alot has changed. I am in the middle of amending/adding features to an installer using python. I have the dropbox API (for business) set up and working, upload and downloading without issue. The potential issue i see is during the progress of either up/down the CLI sits, does nothing. So my question is (as i am still finding my way with all that is Python), how can i add a progress bar? For download and can use the API call to get the metadata file_size if that helps? PS, …

Member Avatar
Member Avatar
+0 forum 2

This simple isprime(number) function checks if the given integer number is a prime number and returns True or False. The function makes sure that the number is a positive integer, and that 1 is not considered a prime number. To find out if an integer n is odd one can use `n & 1`, to check for even one can then use `not n & 1` or the more traditional `n % 2 == 0` which is about 30% slower.

Member Avatar
Member Avatar
+2 forum 36

Hi! I want to learn programming. I'm 14 years old and very fond of computing. The only problem I face is *Which programming language should I learn?* or should I learn *Programming* i.e I learn the basics of programming so that I will be capable of learning any programming language. Also, when you recommend me one of the choice I stated above then please give me resources for learning e.g book names or some websites which will start me learning from scratch. Furthermore, I want to state that I want to create cool games, softwares or even Operating Systems from …

Member Avatar
Member Avatar
+0 forum 8

Hi all, I have 2 form and a main.py in the project: ffrend.py and fmain.py main.py: from PyQt4 import QtCore, QtGui from fmain import * if __name__ == "__main__": import sys app = QtGui.QApplication(sys.argv) MainWindow = QtGui.QMainWindow() ui = Ui_MainWindow() ui.setupUi(MainWindow) MainWindow.show() app.exec_() fmain.py (there is a button to execute the following function) def friendNetWork(self): form = QtGui.QWidget() ui = Ui_ffriend() ui.setupUi(form) form.show() app.exec_() When I run main.py, the fmain form is shown. When I click the button on fmain form, the friendNetWork will be executed and create another widget. But...I received the error in console :(...And the python is …

Member Avatar
Member Avatar
+0 forum 6

Hello friends I would love to have your help with a blocking for hours. In summary, I have to read an XML file and retrieve information with the VB.Net language. I would like to recover the "name", the "checkvalue" and the "compositekey" That's the structure of my xml file: <supercollection **name**="BF000000.hks"> <collections> <collection maxdukptkeyindex="17" maxmskeyindex="13" merchantid="" applicationcertificate="Only Collection Certificate" applicationname="Only Collection Application" name="Only Collection"> <mskeys> <key index="1" **checkvalue**="E8F71A" variantindex="0" verifycheckvalue="yes" keylength="32" **compositekey**="BA03BDBDF091092C26B9D22A2922F504" usage="1" encryptionmode="TECB" name="Key"> <type>Master</type> </key> </mskeys> <dukptkeys></dukptkeys> </collection> </collections> </supercollection>

Member Avatar
Member Avatar
+0 forum 5

I like Agile, I really do but a few times it has me walk out on the process as a few think that everyone must "buy in." That's just part of the problems I've run into and kind of glad I'm no longer on such teams. In fact if a company does go "all in" on Agile I may want to short their stock. I think it works until they try to forget what the real goals are. The real goal is to get the product out the door. Some folk love to get wrapped up in the process. The …

Member Avatar
+1 forum 0

Hi guys, I was trying to sort an arrayList using a comparator but I didn't have much luck, or at least it seems like there is something slightly wrong with it. I have these objects in the arrayList employeeCollection.add(new Employee("Dan", 112)); employeeCollection.add(new Employee("Tim", 2)); employeeCollection.add(new Employee("Rick", 11)); employeeCollection.add(new Employee("Jack", 19)); employeeCollection.add(new Employee("Sid", 1)); and before sorting I have this Name: Dan: ID number: 112: Name: Tim: ID number: 2: Name: Rick: ID number: 11: Name: Jack: ID number: 19: Name: Sid: ID number: 1: and after sorting I have this: Name: Dan: ID number: 112: Name: Jack: ID number: 19: …

Member Avatar
Member Avatar
+0 forum 4

Hi, I have a .csv file in an AWS machine i wanted to convert that .csv file to .dat file? Can you please help me? Thansk, Swetha. G

Member Avatar
Member Avatar
+0 forum 2

The printer seems to be a much ignored computer peripheral when it comes to programming. This little code snippet explores one way to send text to the default printer. It actually draws the text into an imaginary box on the paper. You can specify the upper left and lower right corners of this box.

Member Avatar
Member Avatar
+2 forum 1

As I continue my conversion from vbScript to Python I am finding the gotchas. For example... A lot of my utility scripts take a file name or a file pattern as a parameter. My script, bitrate.vbs, for example allows me to invoke it as bitrate file bitrate pattern Technically file and pattern are identical since specifying a file is really just specifying a pattern that matches up to one file. To get file listings in vbScript I would just spawn a dos `dir` command and grab the output from stdout. In Python, however, they provide what I thought was a …

Member Avatar
+2 forum 0

I'm having a problem with my python installation. The packages that came with the installation work just fine but when I try to use other installed packages I run into problems. For example, I installed a package `pymsgbox` using pip from an admin shell. When I run a sample script from the command line as in `sample`, I get ModuleNotFoundError: No module named 'pymsgbox' but when I run it by `python sample.py` it works fine. Likewise if I load it into IDLE and run it from there. Suggestions?

Member Avatar
Member Avatar
+0 forum 8

I am doing a college project and need to display client status in form of coloured * by using an enum with flags...Now i know how the enum works but the problem is I need to show more than one * within the same field (lable or anything else) but each * with a different colour according to the creteria... Now i cant use label.forecolour cause that sets the whole lables' colour... Can anyone give me some advise?

Member Avatar
Member Avatar
+0 forum 11

When working with TCP client sockets I often find myself frustrated with the lack of event-driven support. I usually end up writing a whole bunch of code to determine disconnects, reconnecting, etc and I figuired it's time to just write my own class for this stuff. I figuired I'd share it with all of you. The implementation is quite simple, I'll provide an example below. I have XML commented all the public properties and methods, the rest is up to you to figuire out if you want to make any changes! public partial class Form1 : Form { EventDrivenTCPClient client; …

Member Avatar
Member Avatar
+5 forum 17

Halli Hallo i hope im at the right Place. I want to get started with API-Gateway(s). Currently im running 5 Microservices written in Java (Spring-Boot) deployed via Docker. Each Microservices is protected via Keycloak. I want to use a API-Gateway so that i can combine every MS into 1 Link: * demo.com/api/ms1 * demo.com/api/ms2 * ... And more important i want to have the Authorization at one Place and not in everysingle Microservice. I found a couple of Solutions but im not sure which to use or if i maybe should write my own one? I was intrested in checking …

Member Avatar
Member Avatar
+1 forum 2

Because Microsoft will be removing vbScript in the next version of Windows, I have been busy converting my utility vbScripts into Python. Part of this is a library of functions that I keep in `D:\include`. I'd like to maintain this system in Python, but the import process is rather clumsy. I have to import sys sys.path.insert(0,r'D:\include') Only after that can I import a file. The documentation is somewhat obtuse but I gather my best option is to add the file `D:\include__init__.py`. As long as that folder is known to Python I could then do from include import myfile1 to include …

Member Avatar
Member Avatar
+0 forum 5

I want to develop a piece of software that other developers can use in their projects. It has to be active at runtime however, and perform some standard functionality every time the application runs. It is essentially software that provides extra functionality to the application developer and its users... I'm not sure how I might do this, and my google-fu has not been strong enough to find a definite answer.

Member Avatar
Member Avatar
+1 forum 2

Have two CSV files containing client records and need to compare the two and then output to a third file those rows where there are differences to the values within the record (row) as well as output those records (rows) on the second file that are not on first file . Example: File 1: KeyField,Name,City, Zip,Location 123,Fred,Chicago,60558,A2 234,Mary,Orlando,12376,4L6 345,George,Pittsburgh,40567, 22 456,Peter,Topeka,00341,234 567,Doc,Birmingham,76543,H86 File 2: KeyField,Name,City,Zip,Location 123,Fred,Chicago,60558,A2 234,Mary,Orlando,12376,4L6 345,George,Boston, 40567,22 456,Peter,Topeka,00341,234 567,Doc,Birmingham,7654,H86 678,Isabel,Guadalajara,87654,M111 The results should create a file containing : 345,George,Boston,40567,22 678,Isabel,Guadalajara,87654,M111 The following code gets me in the neighborhood as a visual check: import os import difflib f=open('original.csv','r') #open …

Member Avatar
Member Avatar
+0 forum 10

The End.