Shows how to create a basic slide show with the Python Tkinter GUI toolkit.

Member Avatar
Member Avatar
+4 forum 19

I am writing a game in which I need to know whether or not a user preforms an action in one second or less. I can not use time() because it measures time in seconds. If the user starts the action half-way through a second it would mess with accuracy. I am experimenting with clock(). I have got clock to work with some programs to make a delay, but not in this way to measure time: [CODE] #include <iostream> #include <ctime> using namespace std; int main() { clock_t start = clock(); cout << "press enter..."; cin.ignore(); clock_t finish = clock(); …

Member Avatar
Member Avatar
+0 forum 12

Hi all, Ive been looking to convert one of my programs to include a GUI, and am having issues with the timing aspects of it. Ive included a mock scenario of what my problem is below: Ive defined my GUI as an object via a class, and am using the buttons to call other methods in the class. These methods used to use the time.sleep() function to wait a certain time before completing a task, and am now using the root.after method instead. However, once the button is pressed and the method with the delay is caused, (delay 10s), the …

Member Avatar
Member Avatar
+0 forum 5

i created a mailing option,when retriving messages it's taking lot of time and showing error of time delay.......can someone help??

Member Avatar
Member Avatar
+0 forum 1

DEAR RESPECTED MEMBERS, I WANT A HELP IN SOLVING IT. ( HAVE ONLY A DAY ) A designed a real-time application which has an end-to-end delay requirement of 150 ms. How will this delay translate to Network/DL layer devices? Assume there are n hops between the peers?

Member Avatar
Member Avatar
+0 forum 2

I am currently in need of help on a piece of homework, I'm using python 3.3 and i need to set a delay on a times table program that i created heres the code: def get_int(prompt="Enter an integer: "): """this function will loop until an integer is entered""" while True: try: # return breaks out of the endless while loop return int(input(prompt)) except ValueError: print("Try again, value entered was not an integer.") x = get_int ("Enter a number: ") for i in range(1,13): print (x*i) Is it possible to add a delay without changing the code dramatically or would i …

Member Avatar
Member Avatar
+0 forum 3

I've got 5 images that I want to display one after the other with a time delay, e.g. image one displayed 0.5 seconds image two displayed 0.5 seconds image three displayed At the moment the HTML looks like this: [CODE]<div id="header"> <img id="headerImage0" src=""> <img id="headerImage1" src=""> <img id="headerImage2" src=""> <img id="headerImage3" src=""> <img id="headerImage4" src=""> </div>[/CODE] The CSS looks like this: [CODE]div#header img { visibility: hidden } div#header img.headerImageShow { visibility: visible }[/CODE] The JavaScript looks like this: [CODE] function showImages(i) { var image = document.getElementById("headerImage"+i); image.className = "headerImageShow"; } for(i=0;i<=4;i++) { var t=setTimeout("showImages(i)",1000); } [/CODE] It seems that …

Member Avatar
Member Avatar
+0 forum 5

Hey, I have a problem with my microphone in windows 7 on my laptop (Dell Inspiron 1525). When I'm using "Listen to this device" feature the microphone recorded sound has a small delay. I mention that i have already installed the latest driver for my soundcard and that on Windows XP the microphone works great. Thanks

Member Avatar
Member Avatar
-1 forum 5

Hi, Does anyone know how to create a delay in C#? I dont like to use Thread.Sleep because it makes the GUI unresponsive. Do you know of any good alternatives?

Member Avatar
Member Avatar
+0 forum 2

Hello my fellow Danniwebbers, I have yet another question for you to ponder. I have two custom action listers. One that handles Mouse.Click and one that handles Mouse.MouseDown. My question to you is, can I delay the mouse down event so that it does not intefere with the code of the Mouse.Click event? I have tried adding a timer and waiting x amount then setting a bool value to true, but the code executes to fast and it skips the other code. Any tips? Thanks, Begginnerdev

Member Avatar
Member Avatar
+0 forum 6

[B]Product[/B]: [B][COLOR="Red"]Matlab, Simulink[/COLOR][/B] [B]Problem Statement[/B]: Complex feedback loops implying usage of Unit Delay Block. At certain simulation frame calculation of required values for test generation is becoming complex. Is there a way to override the Unit Delay block output without changing the model (as I am not allowed to do so) rather by using set_param. I am using cvdata/sim/cvhtml combination for my simulation. I tried extracting all the assocaited aparameter sfor Unit Delay using [CODE]get_param(gcb,'ObjectParameters');[/CODE] but was not able to find a suitable parameter to use owing to lack of help information on each parameters. Kindly help me out if …

Member Avatar
+0 forum 0

Hi, I was wanting to write a (ba)sh script to allow me to wait for the detection of a new USB device, and when that device is detected, execute some commands. The scripts are intending to be working on the principle that whenever I plug in a usb device a message containing the words "new" and "USB" is appended to /var/log/messages. I want this program to be running in the background of my computer at all times, so I want one that will take as little cpu power as it can when there is nothing for it to do. I …

Member Avatar
Member Avatar
+0 forum 2

Hey folks, I've noticed for a while now that I have not been getting my daily updates via email for forums that I subscribe to. The only exception is Geek's Lounge. I've subscribed to a number of forums and chose to receive a daily email but for some reason nada, nothing, only geek's lounge daily, that's it. I've alerted Dani about this but she cannot reproduce the problem if it's only affecting me. Is there anyone else out there having the same issue? By the way, it has nothing to do with the delayed email alert that many of you …

Member Avatar
Member Avatar
+0 forum 6

First of all, sorry for my bad english, that doesn't make any sence at all. So, please correct me. I made a programm to use SendKeys, but I want a delay between the word. I was able to split the string in words, but I wasn't be able to send it with a delay. My program pasts the text of the clipboard (using RadioTextbox) and from the textbox (using the radiobutton RadioClipboard and textbox TextBox1). Button1 starts the whole thing. I have a timer, which counts down to zero. This snippet splits the string: [CODE] string[] text = TextBox1.Text.Split(' '); …

Member Avatar
Member Avatar
+0 forum 6

Afternoon, I'm running a xp system w/ USB keyboard and mouse. Mouse has decided to have a mind of its own. Essentially when i want to click on something it does not respond. It is almost like, when I try and click on a window, it immediately goes to the background. Scrolling has also become an issue. I've tried several mice (all usb) same issue. I can move my mouse around and use my keyboard w/ no problems. Eventually if I wait long enough the mouse will enable for a bit (all while in XP). I can use my mouse …

Member Avatar
+0 forum 0

So I'm writing a bit of code for use in an IRC bot. I tried to use scheduler to get around the barbaric-ness of calling time.sleep() every time I want the bot to delay for a few seconds. In scheduler you can choose the delay function "for example time.sleep()"-- but I haven't found any mention of other delay functions anywhere on the net. Being an IRC bot it's important that it can receive pings and distribute pongs when necessary. time.sleep(), however, pauses the entire .py, rendering the ping/pong lines irrelevant and ultimately leading to a ping timeout. [CODE]import time import …

Member Avatar
Member Avatar
+0 forum 2

A few days ago I was reporting that people were [URL="http://www.daniweb.com/news/story291008.html"]unable to buy an iPhone 4[/URL] even if they were an existing customer. It gets more complicated. The story now is that O2 and other UK carriers are accepting orders only from people who are existing customers. (Except me, as you'll gather from the previous story). It now emerges that a number of people in America have had emails saying their iPhone orders will not be fulfilled. They have been asked to go to a retail store instead. No orders being taken yet from some outlets, even for existing customers. …

Member Avatar
+0 forum 0

The End.