Search Results

Search found 9 results on 1 pages for 'mellort'.

Page 1/1 | 1 

  • How to get accurate window information (dimensions, etc.) in Linux (X)?

    - by mellort
    How can I get accurate window information in Linux? I know that I can use wmctrl to get a window's size, but the actual size of the window can vary due to window decorations. I need the following information and methods: * precise window dimensions * precise available screen space (excluding panels like gnome-panel) * the ability to set a window to be a certain size, including decorations What would be the best way to do this? Thanks in advance!

    Read the article

  • GAE Having Tasks generate pages for user

    - by mellort
    I have a web app that I would like to have the following functionality: user gives a url webapp gets json data from that url and others from same website (this can take anywhere from 1-10 seconds) webapp uses data to generate page for user With this approach, I believe that if the server is in the process of getting the data for one user, then the other user won't be able to load the page (server busy). I would like to avoid this if possible. It seems like the Google Tasks API would be useful for this, but I don't see how I can run the task, and then use the output of the task to generate the page (how would the main app know when the task was finished?) What is the best way to resolve this? Thanks in advance

    Read the article

  • Plotting Points in Java with Interaction

    - by mellort
    I have a large number of data points which are two dimensional coordinates with non-integer values (floats). I am looking for a Java library that can help me plot these points, allowing for custom point size, color, and labels. Further, I would like the user to be able to interact with the points with panning and zooming, and I want to be able to capture KeyEvents from the user. Processing looks great for what I want, but I don't want to do everything from scratch. Is there a better solution? Thanks in advance.

    Read the article

  • Proper structure for many test cases in Python with unittest

    - by mellort
    I am looking into the unittest package, and I'm not sure of the proper way to structure my test cases when writing a lot of them for the same method. Say I have a fact function which calculates the factorial of a number; would this testing file be OK? import unittest class functions_tester(unittest.TestCase): def test_fact_1(self): self.assertEqual(1, fact(1)) def test_fact_2(self): self.assertEqual(2, fact(2)) def test_fact_3(self): self.assertEqual(6, fact(3)) def test_fact_4(self): self.assertEqual(24, fact(4)) def test_fact_5(self): self.assertFalse(1==fact(5)) def test_fact_6(self): self.assertRaises(RuntimeError, fact, -1) #fact(-1) if __name__ == "__main__": unittest.main() It seems sloppy to have so many test methods for one method. I'd like to just have one testing method and put a ton of basic test cases (ie 4! ==24, 3!==6, 5!==120, and so on), but unittest doesn't let you do that. What is the best way to structure a testing file in this scenario? Thanks in advance for the help.

    Read the article

  • Mobile Google Calendar for Specific Calendars Only

    - by mellort
    The mobile view of Google Calendar is really great, but I would like to be able to have it for one calendar ONLY, rather than all of the calendars I use. This would be so that I could create a webapp where a user could visit a URL and see a mobile view of a certain calendar, without the user having to add it to his calendars. What is the best way to do this? Are there any tools which accomplish something similar?

    Read the article

  • Assigning IDs to instances of a class (Pythonic)

    - by mellort
    I want to have each instance of some class have a unique integer identifier based on the order that I create them, starting with (say) 0. In Java, I could do this with a static class variable. I know I can emulate the same sort of behavior with Python, but what would be the most 'Pythonic' way to do this? Thanks

    Read the article

  • Python Logging across multiple classes and files; how to configure so as to be easily disabled?

    - by mellort
    Currently, I have osmething like this in all of my classes: # Import logging to log information import logging # Set up the logger LOG_FILENAME = 'log.txt' logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG) This works well, and I get the output I want, but I would really like to have all this sort of information in one place, and be able to just do something like import myLogger and then start logging, and then hopefully be able to just go into that file and turn off logging when I need an extra performance boost. Thanks in advance

    Read the article

  • Plotting and Animating 2D points with 'headings'

    - by mellort
    I will have a set of data (x, y, heading), and I need to animate it in real-time. I am currently using matplotlib to animate (x, y) and it works fine, but I would really like to have some way to indicate heading, ie what direction the object is facing. What would be the best library for this? It seems like PyGame might be able to help me out, but would I have to roll out my own graphing library for it? Thanks

    Read the article

1