Code: #!/usr/bin/env python # -*- encoding: utf-8 -*- import pygame, datetime from copy import copy from sys import exit target = datetime.date(datetime.MINYEAR, 11, 7) # obscured for privacy now = datetime.date.today() if target.month == now.month and target.day == now.day: size = (800, 600) pygame.init() screen = pygame.display.set_mode(size) fps = pygame.time.Clock() pos = (0,0) direction = [3,2] font = pygame.font.SysFont('Helvetica', 48) s = font.render('Herzlichen Glückwunsch, mq!'.decode('utf8'), True, [255]*3) while 1: fps.tick(40) for event in pygame.event.get(): if event.type == pygame.KEYDOWN and event.key in (pygame.K_f, pygame.K_ESCAPE) or event.type == pygame.QUIT: pygame.quit() exit(0) oldpos = copy(pos) pos = [pos[0]+direction[0], pos[1]+direction[1]] if pos[0] >= size[0]-s.get_width() or pos[0] <= 0: direction[0] = -direction[0] if pos[1] >= size[1]-s.get_height() or pos[1] <= 0: direction[1] = -direction[1] screen.fill([0]*3, (oldpos, s.get_size())) screen.blit(s, pos) pygame.display.update(([oldpos, s.get_size()], [pos, s.get_size()])) Alles erdenklich Gute, mq.
#!/usr/bin/env python # -*- encoding: utf-8 -*- import pygame, datetime from copy import copy from sys import exit target = datetime.date(datetime.MINYEAR, 11, 7) # obscured for privacy now = datetime.date.today() if target.month == now.month and target.day == now.day: size = (800, 600) pygame.init() screen = pygame.display.set_mode(size) fps = pygame.time.Clock() pos = (0,0) direction = [3,2] font = pygame.font.SysFont('Helvetica', 48) s = font.render('Herzlichen Glückwunsch, mq!'.decode('utf8'), True, [255]*3) while 1: fps.tick(40) for event in pygame.event.get(): if event.type == pygame.KEYDOWN and event.key in (pygame.K_f, pygame.K_ESCAPE) or event.type == pygame.QUIT: pygame.quit() exit(0) oldpos = copy(pos) pos = [pos[0]+direction[0], pos[1]+direction[1]] if pos[0] >= size[0]-s.get_width() or pos[0] <= 0: direction[0] = -direction[0] if pos[1] >= size[1]-s.get_height() or pos[1] <= 0: direction[1] = -direction[1] screen.fill([0]*3, (oldpos, s.get_size())) screen.blit(s, pos) pygame.display.update(([oldpos, s.get_size()], [pos, s.get_size()]))
Herzlichen Glückwunsch.
Code: #include <stdio.h> #include <tchar.h> int wmain(){ wchar_t output[] = { 48, 61, 70, 70, 79, 0, 42, 69, 72, 74, 68, 64, 61, 79, 21 } wprintf(output); return 0; }
#include <stdio.h> #include <tchar.h> int wmain(){ wchar_t output[] = { 48, 61, 70, 70, 79, 0, 42, 69, 72, 74, 68, 64, 61, 79, 21 } wprintf(output); return 0; }
Geändert von Drakes (07.11.2008 um 15:56 Uhr)
Oye, alles Gute zum Geburtstag ^
--When I get sad, I stop being sad and be awesome instead. True Story.
Von mir auch die besten Wünsche zum Geburtstag. =)
*sich reinschleich* Gratz :3 *sich wieder rausschleich*
Da man sich ja auch schon mal gesehen hat: Alles Gute
[[NSUser userForNickname: @"mq"] congratulateOn:@"birthday" withLanguage:@"Objective-C"]; Wußte ich doch, daß es ich noch auszahlen würde, für das iPhone zu entwickeln. Herzlichen, Junge.
Alles Gute.
Hey! Alles Gute.
Jau, Danke euch allen ^___^ 'ne @-Liste oder sowas spar ich mir jetzt mal, da würde eh nichts nicht-redundantes drinstehen ^^" Außer: @ orc: warum decodest du einen nicht-unicode-String? Das macht doch gar keinen Sinn :P
Foren-Regeln