30 Topics

Member Avatar for
Member Avatar for vegaseat

PySide (public license PyQT) is my preferred Python GUI toolkit. Here we explore how to test some of the widgets available and create a digital clock.

Member Avatar for Gribouillis
3
2K
Member Avatar for Sudo Bash

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. …

Member Avatar for Yangang
0
4K
Member Avatar for J.C. SolvoTerra

I was just mucking around with a progress feature for some software, and thought I'd just put this wee demo up of a clocky type progress thing =0) Just Copy and paste the form code and watch it run. (p.s it's in degrees, note minutes and seconds) ![55f1addda67a729e91ae90c980c39deb](/attachments/small/4/55f1addda67a729e91ae90c980c39deb.png)

Member Avatar for J.C. SolvoTerra
0
237
Member Avatar for Papa_Don

Group, I'm trying to write some code that will read the clocktime. When it hits a predetermined time, I want it to run a routine. I know how to do this in VB.net. It would be done like this: Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick If …

Member Avatar for Santanu.Das
0
2K
Member Avatar for Slavi

So, I've been making a gui for a client to connect to a server using it. What I want is when I press Login to connect with the specfied Server address and port name on the gui. If I have hardcoded the Server and port it works but I don't …

Member Avatar for Slavi
0
192
Member Avatar for mrmodest34

I have written this code to variably test Prim's algorithm and I am timing it using clock(). For some reason it always returns 0 as its running time. I have other code that I have used this exact implementation in and they are returning the currect running times. The code …

Member Avatar for meta.quota
0
455
Member Avatar for drieran

Hi, I'm developing with a BeagleBoard Black (BBB) under Ubuntu using C. When the BBB is powered on I'm doing many time controlled tasks. My problem happens when NTP changes the clock and all my counters are not valid. Normally BBB starts with no date/time set, some seconds later (if …

Member Avatar for drieran
0
238
Member Avatar for robotakid

Hey there! I'm currently trying to get my first text-adventure-game in python started,and I wanted to import some features that are totally unnecessary. just for the lulz. So,I want to start a timer,that starts when the game starts,and ends,when the player is dead or won the game. I want it …

Member Avatar for Gribouillis
0
717
Member Avatar for scetian

Dear Friends, i need the code for Digital Clock using 8086 in assembly language.. please help me.. i know nothing about assembly.. Please help me somebody i have found a code but its not working properly. please let me know if you want to explain the code, i'll provide it.. …

0
232
Member Avatar for jontennyeah
Member Avatar for eirene08

**this is the code!** import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.geom.AffineTransform; import java.awt.geom.Point2D; import javax.swing.JFrame; import javax.swing.JPanel; public class Clock extends JPanel{ public void paint (Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); String s = "12 1 2 …

Member Avatar for Taywin
0
417
Member Avatar for marky101

How to get the correct and current date and time in vb.net even a user change the computer's system clock? Let's say the correct and current date and time is 7/20/2012 11:00 AM then I change the clock to 7/19/2012 11:00 AM. How to retrieve the original date(7/20/2012) in vb.net? …

Member Avatar for gusano79
0
157
Member Avatar for xGiraffe

I have trouble trying to create a clock java program that asks for user's input for hours and minutes. When it asks the user for their input, the clock program is suppose to set it to that time using the hour hand and the minute hand, but for some reason …

Member Avatar for JamesCherrill
0
428
Member Avatar for minxminx

This is a code which sorts arrays. I use clock_t to determine the processing time for my code. However, it always stacks with the time taken from before. It looks like it's just adding the results. [code] int main(int argc, char *argv[]) {unsigned long n;//size of array -- long for …

Member Avatar for Labdabeta
0
534
Member Avatar for George_91

I've this code. I need to do several experiments to obtain de average time it takes to do some methods. Instead of re-running and re-running the program, I want to put a segment of the code in a FOR bucle. The problem is that my program never ends,it stays looping …

Member Avatar for vishwanath.m
0
164
Member Avatar for mcclainra

I've been given a basic form of programming to do. And I simply cannot figure it out. I know this topic has been covered several times before. But each of them going around the one crucial step that I need to complete my programming. My instructor insists that the 24 …

Member Avatar for mcclainra
0
2K
Member Avatar for JoshuaBurleson

Just fooling around I came across an issue updating a digital-clock like label. This: [CODE]self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime()) self.clock=ttk.Label(self,text=self.now) self.clock.pack() while True: self.now=time.strftime('%a. %b %d %Y %H:%M:%S',time.localtime()) self.clock['text']=self.now[/CODE] simply freezes the program, I've managed to get it to update on certain events like the user hitting a button but …

Member Avatar for JoshuaBurleson
0
193
Member Avatar for Virangya

hi.. i used this code to display a clock. [CODE]<script type="text/javascript"> var int=self.setInterval("clock()",1000); function clock() { var d=new Date(); var t=d.toLocaleTimeString(); document.getElementById("apDiv1").innerHTML=t; } </script>[/CODE] in firefox it displays like this 7:25:00 PM and in Chrome 19:25:39 i want to show a similar clock as in firefox in Chrome. How can …

Member Avatar for Taywin
0
367
Member Avatar for Luckychap

I have seen many beautiful clocks using images and and canvas and flash. So I thought of developing one with pure HTML,CSS3 and javascript, no images at all. This clock can be completely design using CSS. A brief description of Javascript used:- 'AnalogClock' is the name of the class which …

Member Avatar for Luckychap
0
464
Member Avatar for electrox73

Hi, I am able to create a clock in a console c++ app...like this one show UTC hours:[CODE]#include "stdafx.h" #include <iostream> #include <windows.h> #include <stdio.h> void main() { SYSTEMTIME st, lt; GetSystemTime(&st); GetLocalTime(&lt); std::cout << st.wHour << std::endl; std::cin.get(); }[/CODE] But I am not able to create this with the …

Member Avatar for jonsca
0
287
Member Avatar for sketchiii

The code I wrote for a digital clock always falls behind the clock in my windows 7 taskbar after being run for like 2-3 mins. Why? Here's the code: [CODE]#include <stdio.h> #include <time.h> #include <windows.h> int main() { int h,m,s; time_t epoch_time; struct tm *tm_p; epoch_time = time( NULL ); …

Member Avatar for Adak
0
221
Member Avatar for ampo

Hi. Strange thing: When I change the clock of the PC (XP SP2), something link current time is 12:03:34 to 12:05:34, my application crash. nothing in application log, though every method has try-catch. nothing in event log... Can anyone help? Thanks.

Member Avatar for ampo
0
124
Member Avatar for vnorbi

Hello everyone! I'm making a tetris program, and now I'm stucked a bit. I have to use the simple getch() function, but in a special way. I need to use it for exact time, and when the time is up, I need to break the function, even if I haven't …

Member Avatar for WaltP
0
221
Member Avatar for jackmaverick1

I have been frustrated by the lack of a time unit in all the C/C++ std librarys (hope I've got the right wording!). What is a function that I could use. I don't care if I write it or if it is in a library. Thanx in advance!

Member Avatar for caut_baia
0
227
Member Avatar for dansnyderECE

I can't figure out how to get rid of this race condition I'm getting in my synthesizable verilog code. Basically, I'm generating an input value for a module, and at positive edge of my clock I capture that value at my module. The problem is that I want the value …

Member Avatar for teja_dt
0
97
Member Avatar for fable1380

I am new to VB coding so I'm trying some easy projects. I figured an alarm clock would be a good place to start. But I'm Having a hard time with the MP3 Part of it all. I want a pre-selected MP3 to start, when my timer2 is = to …

Member Avatar for huslayer
0
335
Member Avatar for Patagonikus

I need to put a digital (or analogic) clock in a pygtk window with a exit button. I was looking a example with Tkinter but I do not know how to integrate in a pygtk window [ICODE] from Tkinter import * import time root = Tk() time1 = '' clock …

Member Avatar for Patagonikus
0
522
Member Avatar for collinsislee

i missed lecture today and this is what they did in class. im not sure how to complete this. hope you all can help me out. [code] class Clock { // Declare fields of the class // 0 <= hours < 24, 0 <= minutes < 60, 0 <= seconds …

Member Avatar for BestJewSinceJC
0
250
Member Avatar for GrimJack

I was looking at some odd design stuff and ran across [URL="http://www.christiaanpostma.nl/index.htm?clock.htm"]this clock[/URL] - he used 120 clock works to create this clock.

Member Avatar for nav33n
1
285
Member Avatar for Mongz

Hi guys, im not well experienxed please help, i want to code a digital running time with the colon dots flickering to show that the time is running anyone can offer help will be very usefull.

Member Avatar for sknake
0
172

The End.