132,722 Archived Topics
Remove Filter ![]() | |
Another application of Python module base64, this time to embed midi music data in your program. You also need the module pygame to execute this Python code. Enjoy the music! Software Development python | |
Just a relatively simple calculator using the Tkinter GUI. It has a few nice features such as correcting division by an integer (for older Python versions), error trapping, to and from memory buttons, and an editable display. The editable display allows you to backspace mistakes, and also to enter things … | |
This snippet defines a function restart_program() which restarts your python program from within your python program. Software Development python | |
The bubble sort is slow and I thought it would be interesting to visualize the progress as it sorts an array of integers. Software Development c | |
Oh No, not another LockBits demo. Well hopefully this demo may also give you a little in site into actually playing with, and calculating some simple effects as well as understanding the advantages of LockBits as apposed to GetPixel and SetPixel. # A Useful Note. # It is important to … Software Development data-structure | |
File I/O With C++ Fstream **Intro** File handling is as simple as writing in a book, much easier to modify and find. It's so simple people get confused with it :-). Welcome to the world of file handling. We will use the c++ fstream classes to do our file handling. … Software Development app-store c++ cybersecurity data-structure display encryption file-stream ios open-source | |
Run two calls to a function simultaneously with this threading @background decorator. Software Development html-css multithreading python | |
This snippet defines a function `printat()` which adds line and file information to the normal `print()` function output. The intended use is a quick and dirty debugging information for everyday's use. A more complete solution is to use a logging/debugging/tracing framework. Software Development python | |
![]() | Here's a simple tutorial on dictionaries in Python: Dictionaries: Dictionaries are similar to other compound types except that they can use any immutable type as an index. One way to create a dictionary is to start with the empty dictionary and add items. The empty dictionary is denoted {}: [CODE]end2sp … Software Development python |
# Tutorial On Operators# *Operators are the signs to the tell the compiler to perform specific task*. The Operators fall into following categories :- Arithmatic Operator Relational Operator Logical Operator Bitwise Operator Miscellaneous Operator(i added Assignment Operators in this categeory) **Arithmatic operators:-** There are following arithmetic operators:- + Add [6+2=8] … Software Development c++ file-system | |
Thought it would be very complicated to include speech in your programs. As it seems, in it most simplest form it can be done in two lines. Don't forget to include the System.Speech reference in your References. Enjoy! Software Development asp.net | |
There is free tools to do the same, but I was curious to see what it takes to make one myself. For info see: [url]http://en.wikipedia.org/wiki/LC-3[/url] Software Development python | |
I was asked this in an interview today: Q: `malloc(0); /* What does it do? */` It's a great question because it covers a subtlety in the standard and a condition that not many people will consider. Unfortunately, I wasn't 100% confident that I remembered what the standard said about … | |
This code example shows how to create a dictionary with row,column indexed (r,c) key tuples from a typical list of lists 2D matrix. Also an example is shown of the ease of processing the resulting dictionary. Software Development mathematics matrix-multiplication python | |
The annoying use case is this: for (vector<int>::size_type i = 0; i < v.size(); i++) { cout << v[i] << ' '; if (i == v.size() - 1) { cout << endl; } } C++11 offers the `auto` keyword for initializer type deduction so that we can avoid verbose and … Software Development c++ | |
A small test program exploring the PySide/PyQT Label widget. With HTML code you can do some nice formatting of the label's text. Software Development python | |
Comparing a number of different approaches to finding the closest pair of numeric elements in a list. The timing is done with the mpmath module, but you can also use Python module timeit. Software Development python | |
If you have a smaller image, you can include it in your program as a base64 encoded string. This way you don't have to worry about an image file to go with your code. In your program you can then decode it back to the familiar bytes of an image … | |
Python experiment to get an image from a web page and save it to an image file. Updated code to work with both Python versions ... | |
[ATTACH=RIGHT]16645[/ATTACH]Oracle announced Thursday evening (August 12) that they would be filing a lawsuit against Google, claiming that their Android phone software infringes upon patents and copyrights of their Java software, which they acquired when they purchased Sun Microsystems in January for $7.4 billion. "In developing Android, Google knowingly, directly and … | |
From a thread on another forum, I wondered how difficult it would be to create a Tic-Tac-Toe game that could not be beaten. Since it is easiest if the computer goes first and chooses the center square, this code implements that portion. The logic is fairly simple; occupy the center … | |
Ever wanted to know how to implement running lights? well here is your chance to find out. Open a new Forms application enlarge the Form a bit and drop a Panel and a Timer on it. Add the class ChasingLights to the solution, see code. Implement a form Load, panel … Software Development | |
This snippet shows how to use Mutex to prevent multiple copies of your software from running. For a WinForms application, this code goes into the Program.cs file. The magic starts in line 14 where we attempt to create a Mutex. A Mutex is a form of a lock, but it … Software Development | |
[ATTACH=left]17191[/ATTACH]Today at Intel's IDF 2010 was the official launch of the 2011 version of Intel Parallel Studio. Parallel Studio is a set of tools that enhance Visual Studio to support full parallel programming. This is more than just a simple plug-in for Visual Studio. It's an entire set of tools … Software Development c++ visual-studio | |
With the recent release of Visual Studio 2010, Microsoft has updated.NET and the C# language, both now at version 4. One of the new features of C# is the ability to handle dynamic types. But what exactly does that mean? Essentially, if you're very careful, you can use C# in … Software Development c# visual-studio | |
This shows how to get the size of all the files in a folder, and all its sub-folders on MS-Windows operating system. It uses recursion to transverse all the directories, and return a 64-bit integer. It was compiled with VC++ 2008 Express and Code::Blocks Version 8.02 with MinGW compiler. Software Development c++ operating-system | |
PLEASE GIVE ME ANY [B]C++ PROJECT FOR CLASS 11[/B], WHICH [B]SHOULD INCLUDE[/B] IOSTREAM, CONIO, STDIO, STRING, PROCESS, STDLIB. GRAFICS ARE [B]NOT ALLOWED [/B]IN THE PROJECT. IT'S URGENT PLEASE SEND ME AT [email]email removed[/email] OR POST HERE. PLESAE GIVE ME !! I WILL BE WAITING... Software Development c++ | |
There seems to be a serious number of posts regarding the use of VB with an Access Database... Due To The High Volume of questions about access, I'm posting this link. Please, Go through the tutorial, and if you have questions regarding access with VB still (after reading through the … Software Development first-post visual-basic | |
I wrote a Python script that included the python-swiftclient module to connect to the OpenStack Object Storage and upload some files to the OpenStack Object Storage container It works great if I upload a file that ends with the extension .gz however, I’m getting an error regarding the ‘TarFile’ object … Software Development file-system python session storage | |
Hello everyone, Can someone provide me any solution? Software Development image | |
Yes I finally decided to continue on with my programming efforts. I would like to be able to refer to myself as a master programmer, but I may not have that much time, after all I am almost 80 years old. Right now I'm delving into C++ and finding it … | |
To be honest with you, all the codes that i made were self taught, i had to advance myself to learn more stuff in C++ which my first challenge is to make a simple but clean made text based adventure game, but im at the wall atm. (don't judge me, … Software Development c++ | |
**Requires:** 1. Python version 3.8 or newer 2. wxPython version 4.0 or newer 3. exif module 4. Windows with NTFS file system To ensure you have the required packages please run the following 1. python -m pip install --upgrade pip 2. pip install exif 3. pip install wxPython I have … Software Development audio daniweb-bug file-stream file-system gui image open-source os-x pdf python user-interface | |
A long standing complaint with the standard progress bar control is that there is no easy way to display text. In spite of numerous requests, Microsoft has not included this capability. The following code includes a class, `CustomProgress` which inherits the standard `ProgressBar` and adds such a feature. It is … Software Development vb.net | |
This code shows how to obtain and display a GIF image from an internet website using the Tkinter GUI toolkit that comes with the Python installation. | |
![]() | I was so amazed at how easy it was to embed google maps into a vb app I decided to post a quick example to help anyone get started. This is a simple example. Google's api has all kinds of things to help customize your map. You can find out … Software Development google-api seo vb.net |
This is a snippet I use to clear a form. Right now it clears: TextBox, RichTextBox, ComboBox, CheckBox and RadioButton. More can be added if needed... :) Software Development | |
The module pyglet leans on OpenGL for graphics and is used in the scientific community together with Python. This short code snippet shows you how to use it to display an animated GIF file. The download is free, so give it a try. You don't have to download OpenGL to … | |
This is the updated version of the Tiny Tkinter Calculator. It has more power, since you can type in functions contained in the Python math module then press the equals key. You can then move the result into memory for other calculations. The code is written in OOP class style … | |
I will be showing how to pass data between two forms in VB .NET. I will be using two forms, two classes which we will define, a delegate, an event, and an event handler. It is my first tutorial and is a bit long because I wanted to make it … Software Development asp.net microsoft-access vb.net | |
This shows the application of a Memoize decorator to speed up recursive functions in Python. Software Development python | |
The Tkinter GUI toolkit's canvas object is very nice for all sorts of drawings and plotting. However, when it comes to saving the image Tkinter limits you to postscript printer files. One solution is to draw the same image in parallel on PIL's image-draw object in memory. This is made … | |
Two third party Python modules imageio and visvis make it easy to load and view images. The modules come with the pyzo scientific package or can be downloaded separately. Module imageio can read many image file formats as shown in http://imageio.readthedocs.org/en/latest/formats.html You could also replace your image file name directly … | |
I uploaded a module named [symboldict](https://pypi.python.org/pypi/symboldict) to the python package index (pypi). This snippet shows how to use it to create a dictionary of symbols from various modules. This dictionary can be used as a common language shared by several modules. It can be used to load python libraries in … Software Development python | |
This simple code shows how to write text with a given font, font size and color using the module pygame ... Software Development python | |
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 … Software Development c# microsoft-access |
The End.