199,110 Archived Topics
Remove Filter ![]() | |
![]() | ## Background ## Hi All, I 've been playing around with colour (color!) formats and needed to create a class for converting different formats, so I thought I'd share it. It seems to work quite well and accepts a number of different convenient formats. The class allows the conversion between … ![]() |
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! | |
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] | |
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. | |
I googled and googled to try and find a comprehensive wiki/tut on how to share htdocs across a dual platform. My base install is Windows 7 64bit, and recently (6wks ago) set up a dual boot. One thing pained me for a while of not being able to use the … | |
Here is my first attempt at creating a simple slideshow. Contributions to making this more efficient are welcomed! #jsFiddle --> [Demo](http://jsfiddle.net/wGnEm/1/) | |
Hello Everyone, Please accept my simple and humble contribution. This script will validate if the user or visitor is a suspected spammer, by utilizing the stopforumspam API. Example implementation ## example usage. These items can be from database or from form input. The choice of implementation is all up to … ![]() | |
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 … | |
A small test program exploring the PySide/PyQT Label widget. With HTML code you can do some nice formatting of the label's text. | |
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. | |
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 ... | |
Below is a documented code example showing how to use the [MySQLi](http://php.net/manual/en/book.mysqli.php) (MySQL improved) classes/objects to connect and query your database (and check for errors). If there are any questions, or you want to see different features, let me know. | |
[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 … | |
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 … | |
[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 … | |
Hi guys, When you try to create a folder named CON in your windows, you might have have known that you are unable to create because its reserved key word which prevents it from being created. Similarly there are few other reserved names like this... PRN AUX NUL LPT1 COM1 … | |
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 … | |
**This forum is meant for discussing programming languages in addition to exchanging code and algorithms.** However, it has become a problem where too many students are posting homework problems expecting a quick solution without ever trying for themselves. Though we are all here to help, please don't expect quick solutions … | |
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. | |
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... | |
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 … | |
Here is the function that I use here at DaniWeb to manage flood control. It keeps track of how often a specific user or IP address is making a request, and increments a counter. If there have been no requests after 5 minutes, the counter resets to 0. It returns … | |
Open-source LLMs are gaining significant traction due to their ability to match the performance of advanced proprietary LLMs. These models are free to use and allow users to modify their source code or fine-tune them on their own systems, making them highly versatile for various applications. Alibaba's [Qwen](https://www.alibabacloud.com/en/solutions/generative-ai/qwen?_p_lc=1) and Meta's … | |
I’m looking for practical advice and best practices that can help improve a site's speed, considering factors like image optimization, code minification, and server response times. How do you balance performance improvements with maintaining a rich user experience? What tools or techniques have you found most useful in diagnosing and … | |
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 … | |
Are you interested in finding out what a YouTube channel mostly discusses? Do you want to analyze YouTube videos of a specific channel? If yes, we are in the same boat. YouTube video titles are a great way to determine the channel's primary focus. Plotting a word cloud or a … | |
Hello everyone, Can someone provide me any solution? | |
I was searching for Paris Olympics ticket prices for tennis games recently. The official website directs you to a [PDF document](https://tickets.paris2024.org/obj/media/FR-Paris2024/ticket-prices.pdf) containing ticket prices and venues for all the games. However, I found the PDF document to be very hard to navigate. To make things easier, I developed a chatbot … | |
In my recent journey of developing various AI solutions powered by Language Models (LLMs), a significant question has emerged: Should we harness the capabilities of Retrieval Augmented Generation (RAG), or should we opt for the path of custom fine-tuning? This decision can profoundly impact the performance and adaptability of our … | |
Sometimes you need to delete duplicate rows in a database :) In the future, set UNIQUE keys when you need them :) In the example below, we have a table appropriately named `TABLE_NAME` and there are multiple rows that have the same value for the `duplicate_field` field. In this example, … | |
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 … | |
I discovered, after upgrading to Python 3.10, that wxPython no longer worked. Fortunately, a kind soul at wxpython.org suggested I try installing a snapshot build of wxpython via the command pip install -U --pre -f https://wxpython.org/Phoenix/snapshot-builds/ wxPython So far my existing wxPython scripts run just fine. If you are wondering … Programming python | |
Suppose you have a php script where a user is prompted to enter a number. You then do something with that number ... you increment it, perform some other math calculation on it, search the database for records with the ID # the user passed in as a query string, … | |
## Introduction ## When working with Hilt, you might have wondered how to inject ViewModels into your application. In this tutorial, we will learn how to inject ViewModels into your app Fragments. ## Goals ## At the end of the tutorial, you would have learned: 1. How to inject ViewModels … | |
## Introduction ## Among all of the animation API’s on Android, MotionLayout is one of the best classes to use to create complex animations. It can animate property and motion of multiple views at the same time. Other benefits include declarative style XML and the intuitive **Motion Editor** built right … | |
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, … | |
**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 … | |
Hello Daniweb Community, I have been talking on a couple [Facebook](http://www.facebook.com) groups such as sale pages where you post your own stuff for people to buy. Most groups like this have rules about bumping like once per day, every 12 hours etc... So it got to the point where it … | |
I want to order a website for my online shop, but I have a question: who is better to hire, a freelancer or a company? I can't make the site I want alone because I don't have much experience in creating sites. I think hiring companies is expensive. I don't … | |
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 … | |
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 … |
Shows how to create a basic slide show with the Python Tkinter GUI toolkit. | |
What has Schrodinger got to do with the complex and paradoxical concept of quantum computing? The answer is that both Erwin and his hypothetical cat relate directly to this subatomic world. In fact, Schrodinger is often referred to as the father of quantum mechanics. ## Erwin who? ## [Erwin Schrodinger](https://en.wikipedia.org/wiki/Erwin_Schr%C3%B6dinger) … | |
Last night, a friend mentioned to me that one day he was trying to fetch a random 5 rows from a MySQL database. He researched online, and was eventually presented with a working solution in which he would generate five random numbers. Then, he would query the database for items … | |
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... :) |
The End.