Posts

Showing posts with the label project

Get Current Location coordinates , City name

Image
Sometime we need to get  GPS  coordinates in android. so today i am going to write step by step simple tutorial How can we get location coordinates using GPS in android mobile. also through coordinate we can calculate current location more details like City Name. Note:  I have tested this app on My Android Mobile and its working fine. But when you test this app, enable your gps settings in mobile, you need to change current location like 10-20 meter so you will get the coordinates, so need to move with the installed app mobile device. What this app does? Check gps is enable or disable. Get gps coordinates. Get the current city name. okay! so let's try this small app   ------------------------------------------- App Name:  GetCurrentLocation Package Name:  com.rdc Android SDK:  Android SDK 2.3.3 / API 10 Default Activity Name:  GetCurrentLocation ------------------------------------------- GetCurrent...

Python Simple Snake Game Project

Image
Hello all,               one of my friend need Python  project so i googled it and find a good one so you can copy it and Enjoy it.. You need 2 things... 1. IDE 2.  import pygame () import pygame, random, sys from pygame.locals import * #AllTRICKS CO LTD def collide(x1, x2, y1, y2, w1, w2, h1, h2): if x1 + w1 > x2 and x1 < x2 + w2 and y1 + h1 > y2 and y1 < y2 + h2: return True     else: return False def die(screen, score): f = pygame.font.SysFont('Arial', 30); t = f.render('Your score was: ' + str(score), True, (0, 0, 0)); screen.blit(t, (10, 270)); pygame.display.update(); pygame.time.wait(2000); sys.exit(0) xs = [290, 290, 290, 290, 290]; ys = [290, 270, 250, 230, 210]; dirs = 0; score = 0; applepos = (random.randint(0, 590), random.randint(0, 590)); pygame.init(); s = pygame.display.set_mode((600, 600)); pygame.display.set_caption('Snake'); appleimage = pygame.Surface((10, 10)); appleimage.fill((0, 255...