A simple way to create a toggle button for the Tkinter Python GUI toolkit.

Member Avatar
Member Avatar
+1 forum 9

[Pulsating Spirograph (Processing)](https://www.ktbyte.com/projects/project/93961/pulsating-spirograph?ref=20181212daniweb2)

Member Avatar
Member Avatar
-1 forum 1

[[Depths (Made with Processing)](https://www.ktbyte.com/projects/project/94051/depths?ref=20181210daniweb)](null)

Member Avatar
+1 forum 0

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 became annoying to have to bump my posts every so oftern so I managed to construct this script that'll do it automatically with the help of a cronjob that can be set to bump at whatever time you like. So I have made a simple easy to use (ha may …

Member Avatar
Member Avatar
+3 forum 29

Pretty neat text-based RPG that I made. Currently my first game.

Member Avatar
Member Avatar
+0 forum 18

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 7

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.

Member Avatar
Member Avatar
+4 forum 7

Sometimes you have long processes and you even want display them up to the millisecond. Here is a way to do it.

Member Avatar
+0 forum 0

I am trying to implement a MIPS code that preforms unsigned integer divide but i couldn't figure out how. if D == 0, report an error and terminate. Q = 0 # Q is the quotient, initialized to zero R = 0 # R is the remainder, also initialized to zero n = the number of bits in the numerator N # That is, the number 3710 is 1001012 has 6 bits. # Shift through the bits of N to find the # position of its most significant 1 bit. # Write a separate function to determine ā€œnā€. for i …

Member Avatar
Member Avatar
+0 forum 1

Hi there I am new at this website thanks for every one that help me I have this output appear on the link below: [Click Here](https://ibb.co/fe8Cvf) I want to while I choosing a **Time** **value** this value must be send for these useres that **absence** row the checkbox is **checked** this is my code:

Member Avatar
Member Avatar
+0 forum 3

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 anything you need to know from here: [url]http://code.google.com/apis/maps/documentation/javascript/reference.html[/url] You will need to: Create a new windows forms app. Add a class named GoogleControl and paste the GoogleControl code into it. Add a new html doc to the project and name it GoogleMap.htm and set its Build action to CopyIfNewer Copy …

Member Avatar
Member Avatar
+4 forum 46

vb.Net - Regular Expression Tester Every now and then I find another use for a regular expression. For those not familiar with regular expressions, they can be as cryptic to read as strings of Greek letters. Simply put, regular expressions are just patterns. If you've ever used the DOS command shell `dir` command then you have likely used patterns, albeit simple ones. For example: dir d:\temp\pic*.jpg lists all files in the given folder that start with the letters `pic` and end with a `.jpg` extension. While the `dir` command allows only `?` and `*` wildcards, regular expressions allow you to …

Member Avatar
Member Avatar
+1 forum 3

This snippet converts a CIDR notated IP address to a range of IP addresses in decimal, dotted notation. Eg.: 192.168.1.255/31 => 192.168.1.254 - 192.168.1.255

Member Avatar
Member Avatar
+0 forum 2

vbScript - Create a Log File Using vbScript Classes Before I retired I was responsible for most of the corporate data plumbing at our control centre. All of the plumbing was written in vbScript. As any maintenance programmer knows, log files are a vital key in identifying and fixing problems. Because I am basically lazy I don't like to code the same process over and over so I created logging code that could be included in any script. The scripts were run automatically on periods ranging from once every five minutes to once a week, or even as little as …

Member Avatar
+0 forum 0

##vbScript - Run an External Program and Capture the Output Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. When you want to execute an external program for a particular result (such as resizing an image, as shown in a previous snippet) you can simply use the `Run` method of the `Wscript.Shell` object. However, if you want something a little more complex there is the `Exec` method of the same object. This method gives you access to the standard input, output, and error streams. As such, you can take advantage, for example, of the increased flexibility …

Member Avatar
Member Avatar
+1 forum 1

Over the last few days I have been converting old video files from avi to mp4. I've been doing this using the command line version of DivX. This is the process behing the DivXPro GUI and it is named `DivXEngine.exe`. Converting video files takes a big hit on the CPU and I would prefer to set the process to a lower priority to minimize the impace on my usual tasks. Under Windows 7 there was a utility program that could be used to permanently change a task priority. Unfortunately it no longer works in Windows 10 so I did the …

Member Avatar
+1 forum 0

##vbScript - An Application to Modify srt Subtitle Files Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. So far I've posted either functions/subs or code snippets to illustrate a technique. This time I am going to post a complete application. First, a few points. 1. I am somewhat hearing impaired - just one of the hazards of increasing age and heredity. 2. Because of 1 I find I am making increased use of videos with subtitles 3. I like to collect videos over the winter to watch at the cottage in the summer I use …

Member Avatar
+0 forum 0

##vbScript - A Multi-column Sort With Minimal Coding Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. A previous post dealt with sorting. The code easily handles sorting simple things like lists of words, lines of text - cases where you only had to compare two things. What about the case where you want the option to sort on an arbitrary column of data, or you want to sort on multiple columns such as by birthdate, then by last name. That becomes more difficult to code. Databases handle that with ease by allowing you to specify …

Member Avatar
+0 forum 0

##vbScript - Some Useful String Functions Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. vbScript provides a number of functions for manipulating strings. I find that a few more simple functions would have made things a lot simpler. For example, I find myself checking to see if a string starts with a given string. What I have to code is If len(str1) < len(str2) Then StartsWith = False Else If Left(str1,len(str2)) = str2 Then StartsWith = True Else StartsWIth = False End If It would be much clearer if I could do If StartsWith(str1,str2) Then …

Member Avatar
Member Avatar
+1 forum 1

##vbScript - Identify File by Perceived Type Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. There are times when you want to operate on all files of a given type. For example, you may want to enumerate all files in a folder or a drive that are recognized by Windows as video or audio. But how would you do that? There are so many video file types that it would be difficult to test for even the more common file extensions. Better to ask Windows to do the identification. The Windows Registry contains an key …

Member Avatar
+1 forum 0

##vbScript - Get Drive Letter by Volume Label Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. I have all my computers partitioned with two partitions. The drive letters are C (OS and applications) and D (user data). I use Macrium Reflect to take monthly full and daily differential images of C. To backup D Ii use a script front end for robocopy. Using a script to do the backup has one major problem. The drive letter of my dedicated backup external drive may change. I find that even if I have used Drive Manager to …

Member Avatar
+1 forum 0

##vbScript - Browse for Folder or File Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. Some scripts need input (other than from the command line) from the user. This can be read from the console (StdIn) or from a pop-up textbox (InputBox). This is fine for simple input but you certainly wouldn't want to have to type a folder or file name, especially when it might include a lengthy path. There are several ways to avoid typing a long folder or file name. If you create a shortcut to your script on the desktop you …

Member Avatar
+0 forum 0

##vbScript - Convert Integer to Binary String Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. vbScript has a number of functions for converting from one type to another. These functions are named C<type> as in CInt (convert to int), CDbl (convert to double), etc. There are also functions that will format numbers as string (FormatNumber, FormatPercent, FormatCurrentcy, Hex, etc.) One glaring omission is a function to format numbers (integers) as binary. Fortunately the process is straightforward. If we first convert the number to e hexadecimal string we can then convert each hex digit into its …

Member Avatar
+0 forum 0

##vbScript - Sorting With and Without Code Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. Sorting is something that must be done from time to time. I'm going to examine three ways. The first is the well known (at least by name) QuickSort method. Rather than repeating existing explanations of the actual algorithm I'll just refer you to the [Wikipedia QuickSort article](https://en.wikipedia.org/wiki/Quicksort) and present the code with comments below. The second method uses a binary tree. The concept is simple even if the implementation is a little difficult to grasp initially. We start with the …

Member Avatar
+1 forum 0

This is the first in (hopefully) a series of posts about vbScript. Please see my post [vbScript - The Basics](https://www.daniweb.com/programming/threads/516400/vbscript-the-basics) for more details on vbScript. My wife and I take a lot of pictures. Naturally, we end up sending pictures to friends through email. I find it is unnecessary, and often inconsiderate to send full size images via email. When most of our friends end up viewing these images on a hand-held device, it is pointless to send an image wider than 600 pixels. As such, I have to repeatedly 1. Copy the full size image to a temporary folder …

Member Avatar
+2 forum 0

I recently had to mass insert a really large text file of strings into MySQL. Here's how I did it.

Member Avatar
Member Avatar
+1 forum 1

The snippet shows how to create a menu on a windows form and test it. Original code via BCX, modified to compile with Dev C++ as a Windows Application. This approach does speed up writing of GUI programs.

Member Avatar
Member Avatar
+1 forum 2

Let's say you want to send a short private message to your friend, but don't want grandma to snoop around and find it. One way is to use the Python Image Library (PIL) and hide the message in a picture file's pixels. Just looking at the picture you will barely detect any difference between the before and after picture. All your friend needs is the decode_image portion of this simple code to get the message back.

Member Avatar
Member Avatar
+5 forum 11

This code generates an ascii maze of up to size 30x30. If you try to generate a larger maze then you will likely run out of stack space. There is no way to increase the size of the stack in vbscript. Each cell in the maze is represented by a string of five characters such as "11110". The first four chars represent whether a wall is present ("1") or absent ("0") in the four directions "UDLR". The fifth char represents whether a cell has been visited ("1") or not ("0"). Each cell maintains its awareness of the four walls bounding …

Member Avatar
Member Avatar
+0 forum 2

This short Python code gets the local time from the PC as a formatted string using time.strftime('%H:%M:%S'). The time string is displayed in a label using a larger font. A recursive function checks the time five times per second, and updates the time string, if it has changed. Five times per second may sound like overkill, but keeps the display from acting spasmodic.

Member Avatar
Member Avatar
+2 forum 12

The End.