Our Software Development forum encompasses topics related to native application programming design and development.
133,593 Archived Topics
Remove FilterThis simple code shows how to write text with a given font, font size and color using the module pygame ...
Here some old fashioned line input routine, better idea nowadays would be to use GUI input box with real editing. Anyway, it is quite simple with Python to do this basic routine for terminal based program.
A simple way to resize an image programmatically, using the PythonMagick module. This module is a python port of the [the magick++ library](http://www.imagemagick.org/Magick++/).
##Why Use Arrays?## Let's begin by considering why arrays might be needed. What is the problem that this feature solves? How does it make your life as a programmer easier? When studying new features, it's important to recognize what that feature does for you and where the incentive is in …
I will be showing how to pass data between two forms in C#. I will be using two forms, two classes which we will define, a delegate, an event, and an event handler. It is a bit long because I wanted to make it easy to follow. If you want …
This python script prints all the columns of an sqlite database which path is given as argument.
Following up on a discussion on [this thread](http://www.daniweb.com/software-development/cpp/threads/470519/looping-using-recursion/), I did some tests on the performance of recursion vs. iteration, and some interesting things happened, so I thought I would share the results. I'm gonna structure this a bit like a lab-report, because that's really the best way to put it. …
In my job I tend to write a lot of Windows services. Due to this I've pared it down to bare essentials so that the code is as simple as possible, but still fully functional for the needs of each service. What this generally means is I *don't* use the …
The code sample shows how to get an image from the internet and show it in a Tkinter label widget.
The code shows you how to create a persistent to file dictionary of data using the python module shelve.
Hi everyone, I consider myself as a java beginner because I haven't been involved in a lot of projects. I'm opening this thread to raise awareness that we don't have java projects thread primarily for beginners and it could help advanced java programmers in terms of practising their java knowledge. …
In today's environment where just about anyone can snoop around your e-mail, it is prudent to securely encrypt your more private writings. This little Python program will make it easier to do so.
Just a code sample that allows you to play your midi or mp3 music files with Python and module pygame.
This module is for validating textboxes.... After using this module in your project you can simply validate all of your text boxes like [CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AssignValidation(Me.TextBox1, ValidationType.Only_Digits) AssignValidation(Me.TextBox2, ValidationType.Only_Characters) AssignValidation(Me.TextBox3, ValidationType.No_Blank) AssignValidation(Me.TextBox4, ValidationType.Only_Email) End Sub [/CODE]
Hello This is a demo showing Java interacting with Daniweb's new API ( http://www.daniweb.com/api/documentation ) You introduce a member's name and it should show you the total number of posts he has made. Demo is a proof of concept: No bug checking, error checking, etc is in this code. In …
RestSharp library needed
This Python snippet shows how to control a VPython visual 3D sphere with Tkinter GUI toolkit button clicks.
A simple code example to calculate the monthly payment on a mortgage loan. Takes a look at Python's newer print and format functions.
Jython is a version of Python that can use the extensive Java library. Jython uses Python syntax and avoids the rather ugly syntax (at least for Pythonions) of Java. Here we apply it to bring up an image from a file.
Let's say you have a whole bunch of nicely named lists and want to save them all and their names in a pickle file. One solution can be to store these lists and their names in a Bag container class and pickle the bag instance object. Now you can use …
Simple code to see if array of primitives has duplicates. The aim is to only check if there are any duplicates, but not to check what element is repeated, or its position etc. PS: Do you know some handy snippet? Don't way, post it!
[URL="http://stackoverflow.com/questions/194812/list-of-freely-available-programming-books/"]List of free programming books[/URL]. Enjoy and happy new year!
Sometimes, you just want to run a system command from python and capture its output. Currently, the standard way to do this is to call the subprocess.Popen with convenient arguments and use the communicate method. After writing such code a few times, I wrote this little Command class to ease …
How about doing some effort instead of immediately voicing your desperation to Daniweb for 1001st tictactoe problem? Here is some ideas for those young spirits (I did not say newbies ;) ) 1. What is this search box here over in right hand corner? 2. What a heck is this …
Probably the simplest way to get into multimedia with Python is the webbrowser module. This works with both Windows and Unix systems, and selects the default browser you have installed. But that is not all: if you give it the name of a multimedia file it will select the default …
This is an example of using a binary index file to speed up random access of lines in a file. The file is indexed one time, where the position of the start of each line is stored in an index file. Subsequent requests for a get the position from the …
[ATTACH=RIGHT]17350[/ATTACH]Since the release of the second edition of Parallel Studio this month, I've spent a good amount of time with it, trying out the new features. First, what's Parallel Studio? It's an add-in for Microsoft Visual Studio that gives you a large set of features for writing parallel code that …
where can i find out a detailed information about [B]How to write a header file[/B] ?
Hi all, I have started a wiki that I hope to make the "unofficial Daniweb wiki". Its mission is to present short, compilable answers to many commonly asked questions here on the forum. [url]http://programmingexamples.net[/url] I have seeded it with a handful of basic operations. Please feel free to edit, add …
Hey All This code is for matching a string with a wildcard in it to another string. If you want to have a Astrix in the first string be counted as a character and not as a wildcard put a \ in front of it. I have tested it for …
A little late for April 1, but here is the secret code ... [code]searchEngineNames = [] for c in range(ord('A'), ord('Z')+1): name = chr(c)+'ing' searchEngineNames.append(name) # pick #1 print(searchEngineNames[1]) [/code]
I am very new to C++ and have written only basic algorithms. In school we use turbo c++ compiler but now i have to attend a workshop for which I need to be able to use a gnu compiler and I do not know how to change my programs for …
This program uses the Python win32 extension module to get information on disk or flash drives for Windows machines. Specify the drive with its letter. If no drive letter is specified, the current drive is applied.
The function adds two large numeric string together, like "12345667" + "12345678" = ? It does not have complete error checking, I'll leave that up to you. It should work but I am prone to bugs, so do advise if bugs are found. Included are also helper function that helps …
First Google expressed an interest in the [URL="http://www.itwire.com/content/view/20370/53/"]web browser client[/URL] market, and then the [URL="http://www.itwire.com/content/view/26281/53/"]operating system market[/URL] and now it has launched its own open source systems programming language. [URL="http://golang.org/"]Google Go[/URL] is being touted as 'expressive, concurrent, garbage-collected' and promises to produce fast code, fast. According to Google a typical …
Hi i have created this thread for general information of Google.....!! Can anyone tell me how does Google works, I want to know the algorithm that works behind that, i mean how the Google search is working. Can anyone give me the idea regarding this............... Every answer is appreciated.........
This is a catalogue of some experiments on just two aspects of undefined behaviour. This was inspired by yet another long bout of explanation in a recent thread, so I thought it was time to dust off a bunch of compilers, and compare. This is the test code. [code] #include …
You have a problem with your code. You need help. You are in a hurry. What can you do? Post for help at Daniweb as fast as you write, correct?. Wrong. The first thing you should do is to read the rules on posting and specially how to properly make …
I am in the process of rediscovering python after a dire cardiac episode. Used to be very active under my favored nickname vegaseat, not 'seat' but 'eat'! Got tired of the arbitrary jolts from MS and Windows 11 and switched totally to LinuxMint. Actually, my commercial grade 'HP 17 laptop' …
Hi everyone, Back in April 2011 on the DaniWeb forums I posted a Python 3 adaptation of Peter Norvig’s legendary *Lispy* interpreter. My fascination with Lisp originally sparked all the way back in 1981 from a Finnish magazine called *Prosessori*, which ran articles on symbolic computing right during the Zilog …
I just learned the 'head scratching way' that module names come up from nesting code. The code can be nested from within Python in combination with a "NoNo" like calling a helpful code snippet the name of an official module like 'textwrap.py'. More or less by accident this snippet ended …
I’m not a professional programmer — just a long-time hobbyist. Over the past 40 years I’ve built around 50 desktop applications for myself and friends, and even accidentally sold one commercially. I’ve seen a lot of comments about programmers using AI. [One such DaniWeb Conversation Here](https://www.daniweb.com/programming/threads/540507/41-of-all-code-on-github-right-now-is-ai-generated)I get the hesitation; if …
I've been studying TDD for a few years and read quite a few books but none that good to be honest. Can anyone recomend any good ones. I'm not interested in BDD but am keen on anything that tackles the many problems of mocking intrinsic MVC objects.
I am developing a software module to simulate Mercury’s orbital motion using a constant position–momentum parameter derived from the NKTg Law. Instead of using traditional force-based gravity equations, the model defines: p = m * v C = x * p Where x is orbital distance, v is orbital velocity, …
One of my sons has a coworker doing the Multi-Agent coding now. At first it was just Claude but they've moved onto Multi-Agent Coding. Here's a take on the RENT!  While my software work was mostly embedded we stuck with GCC and cross platform toolchains. For Windows it was …
This project is a cross-platform Kafka GUI client. A star would be appreciated to support the open-source effort by the author. Thank you! # Features of Kafka-King * View the list of cluster nodes, dynamically configure broker and topic settings. * Support for consumer clients to consume messages from specified …
https://thehill.com/policy/technology/4162573-ai-art-cant-earn-copyright-judge-rules/ give us a preview that those that use AI, ML, GPT and such may be on uncertain ground if they want to copyright the code. You may not be aware that most of the online AI/ML/GPT systems keep copies of what you generate. So if you are creating code …
From https://www.reddit.com/r/ProgrammerHumor/comments/wupbvb/python_runtime/  As time passed it looked to me that Python evolved past a C framework.
Im trying to populate Listbox with Columns but I didn't get success. Below is my code. I populated Listbox with text file: on users.txt: 1|Jhon|street 3|12/03/1985 2|Peter|strt2|29/09/2009 3|Scoby|street 1|11/02/2001 Here is my code to populate , as you can see there's delimiter "|". Public Sub Pathway(way As Variant) 'SET DATABASE …
The End.