Search Results

Search found 508 results on 21 pages for 'jordan scales'.

Page 3/21 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Tracking contributions from contributors not using git

    - by alex.jordan
    I have a central git repo located on a server. I have many contributors that are not tech savvy, do not have server access, and do not know anything about git. But they are able to contribute via the project's web side. Each of them logs on via a web browser and contributes to the project. I have set things up so that when they log on, each user's contributions are made into a cloned repo on the server that is specifically for that user. Periodically, I log on to the server, visit each of their repos, and do a git diff to make sure they haven't done anything bad. If all is well, I commit their changes and push them to the central repo. Of course I need to manually look at their changes so that I can add an appropriate commit message. But I would also like to track who made the changes. I am making the commit, and I (and the web server) are the only users that are actually writing anything to the server. I could track this in the commit messages. While this strikes me as wrong, if this is my only option, is there a way to make userx's cloned repo always include "userx: " before each commit message that I add, so that I do not have to remind myself which user's repo I am in? Or even better, is there an easy way for me to make the commit, but in such a way as I credit the user whose cloned repo I am in?

    Read the article

  • New Video: How Innovation Happens Today

    - by Kerrie Jordan
    How do you make innovation happen at your organization? If whiteboards, spreadsheets, point solutions or complicated systems are involved, you'll want to watch this new video!  See how Oracle Innovation Management can make it easier to know which ideas to pursue.  Remove guesswork and turn innovation into a structured, consistent and effective business process.  Become an innovation hero!  Watch in HD for supreme viewing experience, and learn how you can build your innovation discipline into a scaleable, repeatable, and strategic business process.

    Read the article

  • Music player with a few specific requirements

    - by Jordan Uggla
    I am looking for a music player with a few specific requirements: Must have a search function that whittles down results as you type, searching the entire library. Must start playing a song when double clicked, and not continue to another song when that song finishes. Must be approachable and immediately usable by people completely unfamiliar with the program. I think this is mostly covered by the first two requirements being met. I've tried many players but unfortunately every one has failed to meet at least one of the requirements. Rhythmbox meets 1 and 3, but continues to the next search result after the song which was double clicked ends. Banshee is basically the same as Rhythmbox. While it has an option to "Stop when finished" this cannot (as far as I can tell) be made the default when double clicking a song. Audacious (as far as I can tell) fails at 1. Muine meets requirements 1 and 2, but unfortunately I couldn't make the search dialog always shown like it is with Rhythmbox / Banshee which, despite its very simple interface, made Muine incomprehensible to people trying to use it for the first time. Amarok I could not configure to meet requirement 1, but I think it's likely I was just missing something, and with its configurability I'm confident that I can set it up to meet requirements 2 and 3.

    Read the article

  • Ubuntu 12.04 Frequent Kernel Panics

    - by Jordan Johns
    Dealing with what seems to be quantum behavior here. I'm having frequent Kernel panics and the problem is very hard to locate. To cut to the chase of what is going on I am essentially getting this screen: This occurs always after login (login screen is fine, can go into my TTY's and everything). But once I log in I have anywhere from 0 (instant) to 10 seconds before everything grinds to a halt and freezes. The only way I found out that it was a kernel panic was going into a TTY while it happens. At first, I figured something must be wrong with memory. Ran memtest86, full standard test. No errors. OK. CPU problem? Windows works fine, ran prime95 and a bunch of other torture tests for many hours. Drive problem? Nope. fsck reports no problems and the smart status is ok. Overclocking problem? Nope. Windows is working fine, and I also reset the bios to prove the point it was not the cause. At a loss here, even trying to reinstall the thing it gives me the same problem even attempting to install ubuntu (like right after you try to select "install ubuntu" or "try ubuntu first before installing"). Anyone have any thoughts? Its very bizarre, its as if my system hates linux and is trying to tell me not to use it (that would be a terrible reality). Thanks!

    Read the article

  • Ubuntu won't boot and it is stuck on the loading screen

    - by Jordan March
    I had just installed it as dual boot 2 days ago, and everything was fine. I was installing some programs (i think it was Play On Linux) and I don't think the install was 100% done when the battery died. Since then it won't boot into Ubuntu; it just stays at the loading screen. I did make separate partitions for boot root home and swap. Can anyone help me get it back and running again? Even if I have to reinstall it. I just don't want to go back through getting all those apps. I'm running Ubuntu 12.10 64bit on a Acer Aspire 5750 core i3 cpu 4gb ram

    Read the article

  • After changing web host, I get a 'file does not exist' error

    - by Jordan
    I run a WordPress blog, and have recently changed web hosts. When changing web hosts, I copied all files and exported/imported the database etc as explained by lots of tutorials found easily on Google. The blog home page works fine. What goes wrong: When I click on any link from the home page, the browser gets stuck in a redirect loop. Looking at the error log, I see: File does not exist: /usr/local/apache/htdocs/index.php The directory /usr doesn't even exist for my website - so perhaps this is looking for a file that was present using my old Web Host and is no longer present with my new web host? What is going on, and how might I resolve it?

    Read the article

  • No Option To Duel Boot Ubuntu 12.04 USB

    - by Jordan
    I have used universal usb installer on my HP probook 2000 on my Kingston data traveler (8GB). When I boot I select to boot from USB and then click on Install Ubuntu 12.04 LTS, I get to the partition part, but there is no option to keep existing Windows and dual boot. I only have Erase entire disk and something else. How can I get this dual boot to come up? Screen Shot Here I also cannot use a CD/DVD

    Read the article

  • Software center crashing in 12.04

    - by Jordan
    i'm having issues with the Software Center. I'm trying to install Google Chrome, but can't because the software center crashes as soon as it opens. I've looked around at similar topics and found plenty but none of the suggested solutions have worked, so I wonder if this is different. When I type 'software-center' into the terminal, I get the error that other's have had: softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file I know this might seem like a duplicate, but none of the solution worked. Sorry, kind of new to Ubuntu. I use Ubuntu 12.04 lts

    Read the article

  • How to make ip Address static (eth0)

    - by Jordan Angelucci
    I'm having a really hard time configuring ubuntu 13.04 to have a static ip address. I have tried multiple solutions but everytime I reboot (can't do the network reset command because ubuntu freezes) I end up with no connection. Here is what I get when i type ifconfig into the terminal: eth0 Link encap:Ethernet HWaddr 10:bf:48:bc:07:cb inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::12bf:48ff:febc:7cb/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1763067 errors:0 dropped:0 overruns:0 frame:0 TX packets:1024326 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2284491220 (2.2 GB) TX bytes:136809317 (136.8 MB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:1840 errors:0 dropped:0 overruns:0 frame:0 TX packets:1840 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:185688 (185.6 KB) TX bytes:185688 (185.6 KB) I have also tried this: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.0.160 netmask 255.255.255.0 broadcast 192.168.0.255 gateway 192.168.0.1 dns-nameservers 24.222.0.94 dns-nameservers 24.222.0.95 If anyone could help me it would be very much appreciated.

    Read the article

  • Finding the displacment of a robot [closed]

    - by Jordan Brown
    I'm building a quadruped (4 legs 3 DOF) for my major work in electronics at high school. I need to know the displacement of the robot and I can't use an encoding wheel. I've done my research and I found a system where I use an accelerometer, gyroscope and a magnetometer to determine the displacement but I'm not sure how to code it. I'm using Arduino and will use compatible sensors. I would like to be able to implement something similar to this video which demonstrates the principles evaluated in this paper. I don't need to map the data on a screen, just be able to read its displacement from its last recorded position. EG. (Read Position) --- (Do "stuff") --- (Read Position) --- (Calculate displacement caused by "stuff")

    Read the article

  • What are some good ways for an intermediate programmer to build skills?

    - by Jordan
    Preface: I work mostly in Python, and Web Dev languages (HTML, CSS, Javascript and Jquery, PHP) I'm proficient at coding but I want to get better. In larger more advanced projects my programming skills break down. The more code there is the more trouble I have fitting all the pieces together. I understand syntax well, and I can catch and correct errors fairly easier. But the more advanced it gets the more I struggle. I believe I have a good understand of the basic and nuts and bolts of programming and I understand what's going on, but when it comes to larger projects, especially ones with heavy math involved my confidence flags and I start making mistakes. It's not that I can't do it, I'm just not used to doing it. Does anyone have any advice for someone who knows programming, but wants to get better? The only tutorials I can really find are beginner basic type stuff. Basically what I'm saying is I want to be confident when I'm tackling advanced projects, but I can't because I have little experience dealing with difficult situations.

    Read the article

  • What set of tools make up "the rails way" of testing javascript in the browser?

    - by Jordan Feldstein
    What's the concensus for doing in-browser (either headless or remote-controlled) testing of javascript? Unit testing my JS is nice, but can't protect against irresponsible changes to the DOM. Unit testing of the JS and functional testing of the views to make sure they both provide and utilize the same, correct DOM, might work, but then the link between JS and DOM is being covered in two places which seems brittle or cumbersome. Is there an acknowledged "Rails Way" to implement full-stack tests, where I can run my javascript against the DOM rendered by the rest of the app, and check the results? (Something like what PHPUnit and Selenium give us, but inside the rails framework?)

    Read the article

  • creating a simulation game, what be needed? [closed]

    - by Jordan
    I am a beginner in game development. As a part of learning and fun, want to create a game in java-script and html5. I am planning a game that we were used to play in childhood, that is "new business"- a monopoly game, in that we used to buy ,rent,sell places and bank we get some money to play and etc. are features. Its just simple ludo like game. So can anyone suggest me from where to start? what will be the designing? Is it possible to create it only in a html5 and java-script.

    Read the article

  • Make audible Ding! sound, or growl notification, when `rake test` finishes!

    - by Jordan Feldstein
    I lose a ton of productivity by getting distracted while waiting for my tests to run. Usually, I'll start to look at something while they're loading --- and 15-20 minutes later I realize my tests are long done, and I've spent 10 minutes reading online. Make a small change... rerun tests ... another 10-15 minutes wasted! How can I make my computer make some kind of alert (Sound or growl notification) when my tests finish, so I can snap back to what I was doing??

    Read the article

  • How to install ubuntu 12.04

    - by William A. Jordan
    I've had ubuntu on my pc for about 5 years,after the new 12.04 version and a day and a half trying to get it to just boot up. I will take it off my pc and rely on windows. I have 5 pc's which I built and am not an amateur, After installing it numerous times and even to run it from your webpage (to no avail). Granted I do have nvidia drivers on it, but after I went to their webpage and downloaded and installed the linux driver it,it still would not boot, by the way I took 2 different pc's apart and used what I thought were compatible (I shouldn't have to do this) parts. I have it on a seperate hd which I will remove and format. Have a nice day and so long (2 much trouble).

    Read the article

  • Are there any Phone Interview equivalents to FizzBuzz?

    - by Jordan
    I think FizzBuzz is a fine question to ask in an in-person interview with a whiteboard or pen and paper handy to determine whether or not a particular candidate is of bare-minimum competence. However, it does not work as well on phone interviews because any typing you hear could just as easily be the candidate's Googling for the answer (not to mention the fact that reading code over the phone is less than savory). Are there any phone-interview questions that are equivalent to FizzBuzz in the sense that an incompetent programmer will not be able to answer it correctly and a programmer of at least minimal competence will? Given a choice, in my particular case I am curious about .NET-centric solutions, but since I was not able to find a duplicate to this question based on a cursory search, I would not mind at all if this question became the canonical source for platform-agnostic phone fizzbuzz questions.

    Read the article

  • Issue with Banshee

    - by Jordan March
    I went to install Banshee using Ubuntu tweak's App button. I clicked the stable ppa, and installed. When it was done, i tried to launch it, it shows up for a split second then closes. So I though it might be having issues with Rhythmbox's associations or something. So I uninstalled Rhythmbox. But same issue. So I try to uninstall Banshee, and it won't, it fails. I thought, well maybe if I tried installing it from the terminal, adding the ppa first (sudo add-apt-repository ppa:banshee-team/ppa) updating apt-get, then sudo apt-get install banshee. But it fails. So now I can't run it, uninstall it, re install it.. or anything. I'm new to linux so I don't know how to go about rebuilding the files. But if anyone has seen this issue before, or has any idea on how to fix this, I would really appreciate the help. Thanks guys

    Read the article

  • Questions on first install

    - by Jordan March
    I've just installed Ubuntu 12.10 64bit on dual boot with windows 7. I've been looking for a lot of the things people say to download, like myunity but when I search in the software center, nothing comes up, just stuff like magazines. Do I need to add some ppas for it to see them? What are some that I should add on a new install? And can anyone help me get myunity on here so I can start customising my desktop? Thanks

    Read the article

  • links for 2010-05-11

    - by Bob Rhubart
    Fat Bloke: Oracle VM VirtualBox 3.1.8 released! "Supporting new platforms such as Ubuntu 10.04 (Lucid Lynx) and delivering a host of bugfixes, VirtualBox 3.1.8 is available now from the usual places, " says the Fat Bloke. (tags: oracle otn virtualization linux) Anthony Shorten: What is the Oracle Utilities Application Framework? "The Oracle Utilities Application Framework is a reusable, scalable and flexible java based framework which allows other products to be built, configured and implemented in a standard way," according to Anthony Shorten (tags: oracle otn framework java standards) Audio podcast: Oracle WebLogic Suite Virtualization Option (Application Grid) "Steve Harris, Senior Vice President of application server and Java Platform, Enterprise Edition development, talks about running Oracle WebLogic Server on Oracle JRockit Virtual Edition. Listen here to learn how you can run faster and more efficiently without a guest operating system on Oracle VM." (tags: oracle otn grid wweblogic podcast virtualization) MySQL Community Blog: MySQL track with free event at Kaleidoscope 2010 "The even greater news," writes Giuseppe Maxia, "is that, in addition to the general schedule, there are SUNDOWN SESSIONS!" (tags: java sun oracle mysql) @SOAtoday: Will Cloudsourcing Change the Face of Consulting? "Will we all be working remotely to deliver our client projects going forward? Maybe someday, but not anytime soon." -- Oracle ACE Director Jordan Braunstein (tags: oracle otn oracleace cloudcomputing entarch) @SOAtoday: Are we Paid to Say No? "Software architects take their governance initiatives seriously, and I can say with a high level of confidence that most of these denials are highly justified. But, have we architects lost our entrepreneurial spirit, with governance as our defense? Are we over-scrutinizing new ideas and slowing down pilots of innovation because they don’t align with our governance policies and enterprise frameworks?" -- Oracle ACE Director Jordan Braunstein (tags: architect entarch oracle otn soa)

    Read the article

  • How can I embed a youtube video using variable widths/heights for a dynamic width web page?

    - by Dan Gayle
    I want to set a youtube video to 100% width so that it scales appropriately in a dynamic width column on a web page I am designing. The problem is that the height doesn't behave like the height of an image. Instead of scaling proportionately, it either collapses (if set to "auto" or left blank) or it scales seemingly random if set to a percentage. How can I get it to remain proportionate while still dynamic?

    Read the article

  • Help getting frame rate (fps) up in Python + Pygame

    - by Jordan Magnuson
    I am working on a little card-swapping world-travel game that I sort of envision as a cross between Bejeweled and the 10 Days geography board games. So far the coding has been going okay, but the frame rate is pretty bad... currently I'm getting low 20's on my Core 2 Duo. This is a problem since I'm creating the game for Intel's March developer competition, which is squarely aimed at netbooks packing underpowered Atom processors. Here's a screen from the game: ![www.necessarygames.com/my_games/betraveled/betraveled-fps.png][1] I am very new to Python and Pygame (this is the first thing I've used them for), and am sadly lacking in formal CS training... which is to say that I think there are probably A LOT of bad practices going on in my code, and A LOT that could be optimized. If some of you older Python hands wouldn't mind taking a look at my code and seeing if you can't find any obvious areas for optimization, I would be extremely grateful. You can download the full source code here: http://www.necessarygames.com/my_games/betraveled/betraveled_src0328.zip Compiled exe here: www.necessarygames.com/my_games/betraveled/betraveled_src0328.zip One thing I am concerned about is my event manager, which I feel may have some performance wholes in it, and another thing is my rendering... I'm pretty much just blitting everything to the screen all the time (see the render routines in my game_components.py below); I recently found out that you should only update the areas of the screen that have changed, but I'm still foggy on how that accomplished exactly... could this be a huge performance issue? Any thoughts are much appreciated! As usual, I'm happy to "tip" you for your time and energy via PayPal. Jordan Here are some bits of the source: Main.py #Remote imports import pygame from pygame.locals import * #Local imports import config import rooms from event_manager import * from events import * class RoomController(object): """Controls which room is currently active (eg Title Screen)""" def __init__(self, screen, ev_manager): self.room = None self.screen = screen self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.room = self.set_room(config.room) def set_room(self, room_const): #Unregister old room from ev_manager if self.room: self.room.ev_manager.unregister_listener(self.room) self.room = None #Set new room based on const if room_const == config.TITLE_SCREEN: return rooms.TitleScreen(self.screen, self.ev_manager) elif room_const == config.GAME_MODE_ROOM: return rooms.GameModeRoom(self.screen, self.ev_manager) elif room_const == config.GAME_ROOM: return rooms.GameRoom(self.screen, self.ev_manager) elif room_const == config.HIGH_SCORES_ROOM: return rooms.HighScoresRoom(self.screen, self.ev_manager) def notify(self, event): if isinstance(event, ChangeRoomRequest): if event.game_mode: config.game_mode = event.game_mode self.room = self.set_room(event.new_room) def render(self, surface): self.room.render(surface) #Run game def main(): pygame.init() screen = pygame.display.set_mode(config.screen_size) ev_manager = EventManager() spinner = CPUSpinnerController(ev_manager) room_controller = RoomController(screen, ev_manager) pygame_event_controller = PyGameEventController(ev_manager) spinner.run() # this runs the main function if this script is called to run. # If it is imported as a module, we don't run the main function. if __name__ == "__main__": main() event_manager.py #Remote imports import pygame from pygame.locals import * #Local imports import config from events import * def debug( msg ): print "Debug Message: " + str(msg) class EventManager: #This object is responsible for coordinating most communication #between the Model, View, and Controller. def __init__(self): from weakref import WeakKeyDictionary self.listeners = WeakKeyDictionary() self.eventQueue= [] self.gui_app = None #---------------------------------------------------------------------- def register_listener(self, listener): self.listeners[listener] = 1 #---------------------------------------------------------------------- def unregister_listener(self, listener): if listener in self.listeners: del self.listeners[listener] #---------------------------------------------------------------------- def post(self, event): if isinstance(event, MouseButtonLeftEvent): debug(event.name) #NOTE: copying the list like this before iterating over it, EVERY tick, is highly inefficient, #but currently has to be done because of how new listeners are added to the queue while it is running #(eg when popping cards from a deck). Should be changed. See: http://dr0id.homepage.bluewin.ch/pygame_tutorial08.html #and search for "Watch the iteration" for listener in list(self.listeners): #NOTE: If the weakref has died, it will be #automatically removed, so we don't have #to worry about it. listener.notify(event) #------------------------------------------------------------------------------ class PyGameEventController: """...""" def __init__(self, ev_manager): self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.input_freeze = False #---------------------------------------------------------------------- def notify(self, incoming_event): if isinstance(incoming_event, UserInputFreeze): self.input_freeze = True elif isinstance(incoming_event, UserInputUnFreeze): self.input_freeze = False elif isinstance(incoming_event, TickEvent): #Share some time with other processes, so we don't hog the cpu pygame.time.wait(5) #Handle Pygame Events for event in pygame.event.get(): #If this event manager has an associated PGU GUI app, notify it of the event if self.ev_manager.gui_app: self.ev_manager.gui_app.event(event) #Standard event handling for everything else ev = None if event.type == QUIT: ev = QuitEvent() elif event.type == pygame.MOUSEBUTTONDOWN and not self.input_freeze: if event.button == 1: #Button 1 pos = pygame.mouse.get_pos() ev = MouseButtonLeftEvent(pos) elif event.type == pygame.MOUSEMOTION: pos = pygame.mouse.get_pos() ev = MouseMoveEvent(pos) #Post event to event manager if ev: self.ev_manager.post(ev) #------------------------------------------------------------------------------ class CPUSpinnerController: def __init__(self, ev_manager): self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.clock = pygame.time.Clock() self.cumu_time = 0 self.keep_going = True #---------------------------------------------------------------------- def run(self): if not self.keep_going: raise Exception('dead spinner') while self.keep_going: time_passed = self.clock.tick() fps = self.clock.get_fps() self.cumu_time += time_passed self.ev_manager.post(TickEvent(time_passed, fps)) if self.cumu_time >= 1000: self.cumu_time = 0 self.ev_manager.post(SecondEvent()) pygame.quit() #---------------------------------------------------------------------- def notify(self, event): if isinstance(event, QuitEvent): #this will stop the while loop from running self.keep_going = False rooms.py #Remote imports import pygame #Local imports import config import continents from game_components import * from my_gui import * from pgu import high class Room(object): def __init__(self, screen, ev_manager): self.screen = screen self.ev_manager = ev_manager self.ev_manager.register_listener(self) def notify(self, event): if isinstance(event, TickEvent): pygame.display.set_caption('FPS: ' + str(int(event.fps))) self.render(self.screen) pygame.display.update() def get_highs_table(self): fname = 'high_scores.txt' highs_table = None config.all_highs = high.Highs(fname) if config.game_mode == config.TIME_CHALLENGE: if config.difficulty == config.EASY: highs_table = config.all_highs['time_challenge_easy'] if config.difficulty == config.MED_DIF: highs_table = config.all_highs['time_challenge_med'] if config.difficulty == config.HARD: highs_table = config.all_highs['time_challenge_hard'] if config.difficulty == config.SUPER: highs_table = config.all_highs['time_challenge_super'] elif config.game_mode == config.PLAN_AHEAD: pass return highs_table class TitleScreen(Room): def __init__(self, screen, ev_manager): Room.__init__(self, screen, ev_manager) self.background = pygame.image.load('assets/images/interface/background.jpg').convert() #Initialize #--------------------------------------- self.gui_form = gui.Form() self.gui_app = gui.App(config.gui_theme) self.ev_manager.gui_app = self.gui_app c = gui.Container(align=0,valign=0) #Quit Button #--------------------------------------- b = StartGameButton(ev_manager=self.ev_manager) c.add(b, 0, 0) self.gui_app.init(c) def render(self, surface): surface.blit(self.background, (0, 0)) #GUI self.gui_app.paint(surface) class GameModeRoom(Room): def __init__(self, screen, ev_manager): Room.__init__(self, screen, ev_manager) self.background = pygame.image.load('assets/images/interface/background.jpg').convert() self.create_gui() #Create pgu gui elements def create_gui(self): #Setup #--------------------------------------- self.gui_form = gui.Form() self.gui_app = gui.App(config.gui_theme) self.ev_manager.gui_app = self.gui_app c = gui.Container(align=0,valign=-1) #Mode Relaxed Button #--------------------------------------- b = GameModeRelaxedButton(ev_manager=self.ev_manager) self.b = b print b.rect c.add(b, 0, 200) #Mode Time Challenge Button #--------------------------------------- b = TimeChallengeButton(ev_manager=self.ev_manager) self.b = b print b.rect c.add(b, 0, 250) #Mode Think Ahead Button #--------------------------------------- # b = PlanAheadButton(ev_manager=self.ev_manager) # self.b = b # print b.rect # c.add(b, 0, 300) #Initialize #--------------------------------------- self.gui_app.init(c) def render(self, surface): surface.blit(self.background, (0, 0)) #GUI self.gui_app.paint(surface) class GameRoom(Room): def __init__(self, screen, ev_manager): Room.__init__(self, screen, ev_manager) #Game mode #--------------------------------------- self.new_board_timer = None self.game_mode = config.game_mode config.current_highs = self.get_highs_table() self.highs_dialog = None self.game_over = False #Images #--------------------------------------- self.background = pygame.image.load('assets/images/interface/game screen2-1.jpg').convert() self.logo = pygame.image.load('assets/images/interface/logo_small.png').convert_alpha() self.game_over_text = pygame.image.load('assets/images/interface/text_game_over.png').convert_alpha() self.trip_complete_text = pygame.image.load('assets/images/interface/text_trip_complete.png').convert_alpha() self.zoom_game_over = None self.zoom_trip_complete = None self.fade_out = None #Text #--------------------------------------- self.font = pygame.font.Font(config.font_sans, config.interface_font_size) #Create game components #--------------------------------------- self.continent = self.set_continent(config.continent) self.board = Board(config.board_size, self.ev_manager) self.deck = Deck(self.ev_manager, self.continent) self.map = Map(self.continent) self.longest_trip = 0 #Set pos of game components #--------------------------------------- board_pos = (SCREEN_MARGIN[0], 109) self.board.set_pos(board_pos) map_pos = (config.screen_size[0] - self.map.size[0] - SCREEN_MARGIN[0], 57); self.map.set_pos(map_pos) #Trackers #--------------------------------------- self.game_clock = Chrono(self.ev_manager) self.swap_counter = 0 self.level = 0 #Create gui #--------------------------------------- self.create_gui() #Create initial board #--------------------------------------- self.new_board = self.deck.deal_new_board(self.board) self.ev_manager.post(NewBoardComplete(self.new_board)) def set_continent(self, continent_const): #Set continent based on const if continent_const == config.EUROPE: return continents.Europe() if continent_const == config.AFRICA: return continents.Africa() else: raise Exception('Continent constant not recognized') #Create pgu gui elements def create_gui(self): #Setup #--------------------------------------- self.gui_form = gui.Form() self.gui_app = gui.App(config.gui_theme) self.ev_manager.gui_app = self.gui_app c = gui.Container(align=-1,valign=-1) #Timer Progress bar #--------------------------------------- self.timer_bar = None self.time_increase = None self.minutes_left = None self.seconds_left = None self.timer_text = None if self.game_mode == config.TIME_CHALLENGE: self.time_increase = config.time_challenge_start_time self.timer_bar = gui.ProgressBar(config.time_challenge_start_time,0,config.max_time_bank,width=306) c.add(self.timer_bar, 172, 57) #Connections Progress bar #--------------------------------------- self.connections_bar = None self.connections_bar = gui.ProgressBar(0,0,config.longest_trip_needed,width=306) c.add(self.connections_bar, 172, 83) #Quit Button #--------------------------------------- b = QuitButton(ev_manager=self.ev_manager) c.add(b, 950, 20) #Generate Board Button #--------------------------------------- b = GenerateBoardButton(ev_manager=self.ev_manager, room=self) c.add(b, 500, 20) #Board Size? #--------------------------------------- bs = SetBoardSizeContainer(config.BOARD_LARGE, ev_manager=self.ev_manager, board=self.board) c.add(bs, 640, 20) #Fill Board? #--------------------------------------- t = FillBoardCheckbox(config.fill_board, ev_manager=self.ev_manager) c.add(t, 740, 20) #Darkness? #--------------------------------------- t = UseDarknessCheckbox(config.use_darkness, ev_manager=self.ev_manager) c.add(t, 840, 20) #Initialize #--------------------------------------- self.gui_app.init(c) def advance_level(self): self.level += 1 print 'Advancing to next level' print 'New level: ' + str(self.level) if self.timer_bar: print 'Time increase: ' + str(self.time_increase) self.timer_bar.value += self.time_increase self.time_increase = max(config.min_advance_time, int(self.time_increase * 0.9)) self.board = self.new_board self.new_board = None self.zoom_trip_complete = None self.game_clock.unpause() def notify(self, event): #Tick event if isinstance(event, TickEvent): pygame.display.set_caption('FPS: ' + str(int(event.fps))) self.render(self.screen) pygame.display.update() #Wait to deal new board when advancing levels if self.zoom_trip_complete and self.zoom_trip_complete.finished: self.zoom_trip_complete = None self.ev_manager.post(UnfreezeCards()) self.new_board = self.deck.deal_new_board(self.board) self.ev_manager.post(NewBoardComplete(self.new_board)) #New high score? if self.zoom_game_over and self.zoom_game_over.finished and not self.highs_dialog: if config.current_highs.check(self.level) != None: self.zoom_game_over.visible = False data = 'time:' + str(self.game_clock.time) + ',swaps:' + str(self.swap_counter) self.highs_dialog = HighScoreDialog(score=self.level, data=data, ev_manager=self.ev_manager) self.highs_dialog.open() elif not self.fade_out: self.fade_out = FadeOut(self.ev_manager, config.TITLE_SCREEN) #Second event elif isinstance(event, SecondEvent): if self.timer_bar: if not self.game_clock.paused: self.timer_bar.value -= 1 if self.timer_bar.value <= 0 and not self.game_over: self.ev_manager.post(GameOver()) self.minutes_left = self.timer_bar.value / 60 self.seconds_left = self.timer_bar.value % 60 if self.seconds_left < 10: leading_zero = '0' else: leading_zero = '' self.timer_text = ''.join(['Time Left: ', str(self.minutes_left), ':', leading_zero, str(self.seconds_left)]) #Game over elif isinstance(event, GameOver): self.game_over = True self.zoom_game_over = ZoomImage(self.ev_manager, self.game_over_text) #Trip complete event elif isinstance(event, TripComplete): print 'You did it!' self.game_clock.pause() self.zoom_trip_complete = ZoomImage(self.ev_manager, self.trip_complete_text) self.new_board_timer = Timer(self.ev_manager, 2) self.ev_manager.post(FreezeCards()) print 'Room posted newboardcomplete' #Board Refresh Complete elif isinstance(event, BoardRefreshComplete): if event.board == self.board: print 'Longest trip needed: ' + str(config.longest_trip_needed) print 'Your longest trip: ' + str(self.board.longest_trip) if self.board.longest_trip >= config.longest_trip_needed: self.ev_manager.post(TripComplete()) elif event.board == self.new_board: self.advance_level() self.connections_bar.value = self.board.longest_trip self.connection_text = ' '.join(['Connections:', str(self.board.longest_trip), '/', str(config.longest_trip_needed)]) #CardSwapComplete elif isinstance(event, CardSwapComplete): self.swap_counter += 1 elif isinstance(event, ConfigChangeBoardSize): config.board_size = event.new_size elif isinstance(event, ConfigChangeCardSize): config.card_size = event.new_size elif isinstance(event, ConfigChangeFillBoard): config.fill_board = event.new_value elif isinstance(event, ConfigChangeDarkness): config.use_darkness = event.new_value def render(self, surface): #Background surface.blit(self.background, (0, 0)) #Map self.map.render(surface) #Board self.board.render(surface) #Logo surface.blit(self.logo, (10,10)) #Text connection_text = self.font.render(self.connection_text, True, BLACK) surface.blit(connection_text, (25, 84)) if self.timer_text: timer_text = self.font.render(self.timer_text, True, BLACK) surface.blit(timer_text, (25, 64)) #GUI self.gui_app.paint(surface) if self.zoom_trip_complete: self.zoom_trip_complete.render(surface) if self.zoom_game_over: self.zoom_game_over.render(surface) if self.fade_out: self.fade_out.render(surface) class HighScoresRoom(Room): def __init__(self, screen, ev_manager): Room.__init__(self, screen, ev_manager) self.background = pygame.image.load('assets/images/interface/background.jpg').convert() #Initialize #--------------------------------------- self.gui_app = gui.App(config.gui_theme) self.ev_manager.gui_app = self.gui_app c = gui.Container(align=0,valign=0) #High Scores Table #--------------------------------------- hst = HighScoresTable() c.add(hst, 0, 0) self.gui_app.init(c) def render(self, surface): surface.blit(self.background, (0, 0)) #GUI self.gui_app.paint(surface) game_components.py #Remote imports import pygame from pygame.locals import * import random import operator from copy import copy from math import sqrt, floor #Local imports import config from events import * from matrix import Matrix from textrect import render_textrect, TextRectException from hyphen import hyphenator from textwrap2 import TextWrapper ############################## #CONSTANTS ############################## SCREEN_MARGIN = (10, 10) #Colors BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) YELLOW = (255, 200, 0) #Directions LEFT = -1 RIGHT = 1 UP = 2 DOWN = -2 #Cards CARD_MARGIN = (10, 10) CARD_PADDING = (2, 2) #Card types BLANK = 0 COUNTRY = 1 TRANSPORT = 2 #Transport types PLANE = 0 TRAIN = 1 CAR = 2 SHIP = 3 class Timer(object): def __init__(self, ev_manager, time_left): self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.time_left = time_left self.paused = False def __repr__(self): return str(self.time_left) def pause(self): self.paused = True def unpause(self): self.paused = False def notify(self, event): #Pause Event if isinstance(event, Pause): self.pause() #Unpause Event elif isinstance(event, Unpause): self.unpause() #Second Event elif isinstance(event, SecondEvent): if not self.paused: self.time_left -= 1 class Chrono(object): def __init__(self, ev_manager, start_time=0): self.ev_manager = ev_manager self.ev_manager.register_listener(self) self.time = start_time self.paused = False def __repr__(self): return str(self.time_left) def pause(self): self.paused = True def unpause(self): self.paused = False def notify(self, event): #Pause Event if isinstance(event, Pause): self.pause() #Unpause Event elif isinstance(event, Unpause): self.unpause() #Second Event elif isinstance(event, SecondEvent): if not self.paused: self.time += 1 class Map(object): def __init__(self, continent): self.map_image = pygame.image.load(continent.map).convert_alpha() self.map_text = pygame.image.load(continent.map_text).convert_alpha() self.pos = (0, 0) self.set_color() self.map_image = pygame.transform.smoothscale(self.map_image, config.map_size) self.size = self.map_image.get_size() def set_pos(self, pos): self.pos = pos def set_color(self): image_pixel_array = pygame.PixelArray(self.map_image) image_pixel_array.replace(config.GRAY1, config.COLOR1) image_pixel_array.replace(config.GRAY2, config.COLOR2) image_pixel_array.replace(config.GRAY3, config.COLOR3) image_pixel_array.replace(config.GRAY4, config.COLOR4) image_pixel_array.replace(config.GRAY5, config.COLOR5)

    Read the article

  • What are the steps to setup git-http-backend w/ Apache on Windows?

    - by Jordan
    I would like setup a Git server using the "Smart-HTTP" approach. However, I'm having difficulties getting it to work in Windows, and I'm new to Apache. My httpd.conf, in part: SetEnv GIT_PROJECT_ROOT "d:/repositories" SetEnv GIT_HTTP_EXPORT_ALL ScriptAlias /git/ "C:/Program Files/Git/libexec/git-core/git-http-backend.exe" <VirtualHost 172.16.0.5:80> <LocationMatch "^/git/.*/git-receive-pack$"> AuthType Basic AuthName "Git Access" Require group committers </LocationMatch> </VirtualHost> Could someone provide the steps to setup a Git server using git-http-backend on Windows?

    Read the article

  • How to upgrade ClamAV on Ubuntu Hardy Heron 8.04 LTS?

    - by Jordan Lev
    I'm running a server on Ubuntu Hardy Heron 8.04 LTS, and when I installed ClamAV via aptitude, it installed version 0.94. That version has now been EOL'ed, but when I run "aptitude upgrade", it doesn't update ClamAV to the more recent version (0.96). I then followed these instructions on Installing ClamAV from the PPA, but when I did that, I get a message saying "The following packages have been kept back: ... clamav clamav-base clamav-daemon clamav-freshclam ..." Does anyone know how to get Ubuntu 8.04 to do this update via aptitude or apt-get (I'm hoping to avoid having to compile from source, etc.)?

    Read the article

  • Zabbix Proxy not collecting data

    - by Jordan Eunson
    I have a working Zabbix 1.8.2 server collecting data for our office and our colo facility. However the link between the colo and office is flaky. What I'm trying to do is setup a proxy on the colo side to have a 1 hour cache and relay the data to our primary server at the office. Our zabbix server is compiled from source and uses a mysql database I've followed the instructions found in the zabbix documentation to compile the proxy using a sqlite3 database. I add the proxy to zabbix under Administration-DM-Proxies. The zabbix server "sees" the proxy because the "last seen" field is always under 60s. However when I assign a colo host to the proxy I stop receiving data from it. The colo host's zabbix_agentd.log file says this: 29343:20100622:124847 Timeout while answering request 29343:20100622:124847 Getting list of active checks failed. Will retry after 60 seconds The zabbix_proxy.log says this. 2041:20100622:123131.760 Deleted 0 records from history [0.000994 seconds] 2028:20100622:124131.671 Error while receiving answer from server [ZBX_TCP_READ() failed I also am unable to receive any SNMP data which is more important to me than the zabbix agent data. Has anyone had this problem before? Zabbix Server OS: CentOS5.4 Zabbix Server Build: 1.8.2 from source Zabbix Proxy OS: CentOS5.4 Zabbix Proxy Build: 1.8.2 from source P.S. The SQLite database on the zabbix proxy never gets any data written to it, it is identical to when I created it from the blank schema in zabbix-1.8.2/create/schema. (Yes I've checked the permissions)

    Read the article

  • Writing an SVN hook that updates copy of committed code

    - by Jordan Reiter
    I have a SVN repository with a lot of sub-projects stored in it. Right now in my post-commit I just loop through all possible folders on the machine and run svn update on each: REPOS="$1" REV="$2" DIRS=("/path/to/local/copy/firstproject" "/path/to/local/copy/anotherproject" ... "/path/to/local/copy/spam") LOGNAME=`/usr/bin/whoami` for DIR in ${DIRS[@]} do cd $DIR sudo /usr/bin/svn update --accept=postpone 2>&1 | logger logger "$LOGNAME Updated $DIR to revision $REV (from $REPOS) " done The problem is that this is slow and redundant when I'm just committing the subfolder of one of the projects. I'm wondering if there's a better way of identifying which of the DIRS I should use and only update that one. Is there some way to do this? As far as I can tell there's no way to determine which part of a repo was committed and thus which directory needs to be updated. Is the only alternative to create a separate repository for each project? (Probably should have done that from the start, if so...)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >