Search Results

Search found 1872 results on 75 pages for 'magic trackpad'.

Page 8/75 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Why has my zoom feature stopped working in OSX 10.6?

    - by Kev
    For the life of me I can't get the zoom feature to work on OSX 10.6 on my Max Mini. It's a fresh install, I have the wireless mighty mouse with the small grey scroll ball and the small wireless Apple metal keyboard. I've tried enabling "Zoom using scroll ball whilst holding ^Control" mouse System Preference. I also tried enabling Zoom in "Universal Access" in the System Preferences. This did work in OSX 10.5, but seems to have stopped since I installed 10.6.

    Read the article

  • What are these folders in the root of my drive?

    - by Max Schmeling
    The following folders keep showing up: C:\Default\ C:\NativeImages\ They both have a ton of folders in them witha bunch of html files in each folder. I'm assuming this has something to do with NGEN because of the NativeImages folder. How do I get rid of these folders and keep them from coming back? Or otherwise move them so they get put somewhere else? Thanks

    Read the article

  • Hard link not works under MacOS in GUI mode

    - by AntonAL
    Hi, i faced a little strange behavior, while using hard links. From terminal, i create a text file 1.txt and a hard link "to this file" nano 1.txt mkdir dir ln 1.txt ./dir/ I check the resulting hard link and see that its contents are the same as of the original file. less ./dir/1.txt I change the initial file ... nano 1.txt ... and see, that changes was reflected in hard-link less ./dir/1.txt I change content of hard-link (more correct, of course - file, being referenced with hard-link) ... nano ./dir/1.txt ... and see, that changes are reflected in initial file less 1.txt Until now, all going well... Now, I close terminal and start playing with created files (1.txt and ./dir/1.txt) from Finder. When i change on this two files with TextEdit, changes are not reflected in another file. Just like the hard link was teared off... What is going on here ?

    Read the article

  • Where can I find "magic numbers" for classic game play mechanics?

    - by MrDatabase
    I'd like to find some "magic numbers" for the classic helicopter game. For example the numbers that determine how fast the helicopter accelerates up and down. Also perhaps the "randomness" of the obstacles (uniformly distributed? Gaussian?). Where can I find these numbers? p.s. I don't care about the particular platform... Flash on the desktop browser is just as good as some implementation on a mobile device.

    Read the article

  • Python: Getting the attribute name that the created object will be given

    - by cool-RR
    Before I ask this, do note: I want this for debugging purposes. I know that this is going to be some bad black magic, but I want to use it just during debugging so I could identify my objects more easily. It's like this. I have some object from class A that creates a few B instances as attributes: class A(object): def __init__(self) self.vanilla_b = B() self.chocolate_b = B() class B(object): def __init__(self): # ... What I want is that in B.__init__, it will figure out the "vanilla_b" or whatever attribute name it was given, and then put that as the .name attribute to this specific B. Then in debugging when I see some B object floating around, I could know which one it is. Is there any way to do this?

    Read the article

  • How do I make a defaultdict safe for unexpecting clients?

    - by ~miki4242
    Several times (even several in a row) I've been bitten by the defaultdict bug. d = defaultdict(list) ... try: v = d["key"] except KeyError: print "Sorry, no dice!" For those who have been bitten too, the problem is evident: when d has no key 'key', the v = d["key"] magically creates an empty list and assigns it to both d["key"] and v instead of raising an exception. Which can be quite a pain to track down if d comes from some module whose details one doesn't remember very well. I'm looking for a way to take the sting out of this bug. For me, the best solution would be to somehow disable a defaultdict's magic before returning it to the client.

    Read the article

  • Take input through Buttons in java

    - by stash211
    I understand that the title might not be descriptive enough, but I'm making a magic square game in Java and basically, I'm trying to replicate user input as found in the sudoku game here: http://www.websudoku.com/. What I have is a n x n grid of Buttons (not JButton) as the board and what I want the user to be able to do is when the user clicks on one of the buttons, similar to the game above, it allows the user to type in his guess in the button itself instead of popping up a dialog box with an input field of some sort. I don't know where to start, I am a beginner in Java (not very beginner, but my knowledge with the various Java APIs is very limited), so I'm trying to find out if this would be possible and if it is, how would I go about doing it? Thanks for any help.

    Read the article

  • Any method to denote object assignment?

    - by Droogans
    I've been studying magic methods in Python, and have been wondering if there's a way to outline the specific action of: a = MyClass(*params).method() versus: MyClass(*params).method() In the sense that, perhaps, I may want to return a list that has been split on the '\n' character, versus dumping the raw list into the variable a that keeps the '\n' intact. Is there a way to ask Python if its next action is about to return a value to a variable, and change action, if that's the case? I was thinking: class MyClass(object): def __init__(*params): self.end = self.method(*params) def __asgn__(self): return self.method(*params).split('\n') def __str__(self): """this is the fallback if __asgn__ is not called""" return self.method(*params)

    Read the article

  • Why did my mouse/trackpad suddenly stop working on my MacBook under Windows XP?

    - by Jack B Nimble
    My mouse and track pad have suddenly stopped working on my MacBook, which is running Windows XP from BootCamp. Both the USB mouse and the trackpad work fine in OS X. The device manager says that the driver is missing or corrupt on both items (they have a yellow exclamation point). I tried uninstalling the mice, and reinstalling them. Since the USB mouse is a Logitech I tried replacing the driver with one downloaded from Logitech.com. Anyone know how I can repair the mouse driver that Windows XP is using?

    Read the article

  • Make Bluetooth on Android 2.1 discoverable indefinitely

    - by kanov-baekonfat
    Hello all. I'm working on a research project which involves Bluetooth and the Android OS. I need to make Bluetooth discoverable indefinitely in order for the project to continue. The Problem: Android limits discoverability to 300 seconds. I cannot ask the user every 300 seconds to turn discoverability back on as my application is designed to run in the background without disturbing the user. As far as I am aware, there is no way to increase the time though Android's GUI. Some sources have called this a safety feature, others have called this a bug. There may be a bit of truth in both... What I'm Trying / Have Tried: I'm trying to edit a stable release of cyanogenmod to turn the discoverability timer off (it's possible; there's a configuration file that needs to have a single number changed). This isn't working because I'm having verification problems with the resulting package. During the past week, I downloaded the cyanogenmod source code, changed a relevant class in the hope that it would make Bluetooth discoverable indefinitely, and tried to recompile. This did not work because (a) the repo is frequently changed, leading to an unstable code base which fails to compile (OR, it could be that I'm using it incorrectly; just because it looked like it was the code's fault in many instances doesn't mean I should blame it for all the problems I encountered!) and (b) the repo decides to periodically "ignore" me (but not always, as I have gotten the code base before!), replying to my synchronization/connection attempts with: fatal: The remote end hung up unexpectedly As you might imagine, the above two issues are problematic and very frustrating to deal with. More Info: I'm running Android 2.1 via cyanogenmod (v5 I believe). This means the phone is also rooted. I have a developer phone, which means that the bootloader is unlocked. My phone is an HTC Magic (32B). The Big Question: How can I make Bluetooth indefinitely discoverable on Android? Thanks for your time and input. I feel like I'm spinning my tires on this issue and I'd like to move past it.

    Read the article

  • Mysql Real Escape String PHP Function Adding "\" to My Field Entry

    - by Jascha
    Hello, I am submitting a form to my mySql database using PHP. I am sending the form data through the mysql_real_escape_string($content); function. When the entry shows up in my database (checking in myPhpAdmin) all of my double quotes and single quotes are escaped. I'm fairly certain this is a PHP configuration issue? so: $content = 'Hi, my name is Jascha and my "favorite" thing to do is sleep'; mysql_real_escape_string($content); $query = 'INSERT INTO DB...' comes up in my database as: Hi, my name is Jascha and my \"favorite" thing to do is sleep Who do I tell what to do? (I cannot access the php.ini). -J

    Read the article

  • Hard link not works under MacOS in GUI mode

    - by AntonAL
    Hi, i faced a little strange behavior, while using hard links. From terminal, i create a text file 1.txt and a hard link "to this file" nano 1.txt mkdir dir ln 1.txt ./dir/ I check the resulting hard link and see, that it's contents is the same, as of "original" file. less ./dir/1.txt I change the initial file ... nano 1.txt ... and see, that changes was reflected in hard-link less ./dir/1.txt I change content of hard-link (more correct, of course - file, being referenced with hard-link) ... nano ./dir/1.txt ... and see, that changes are reflected in initial file less 1.txt Until now, all going well... Now, I close terminal and start playing with created files (1.txt and ./dir/1.txt) from Finder. When i change on this two files with TextEdit, changes are not reflected in another file. Just like the hard link was teared off... Whats going on here ?

    Read the article

  • Excess errors on model from somewhere

    - by gmile
    I have a User model, and use an acts_as_authentic (from authlogic) on it. My User model have 3 validations on username and looks as following: User < ActiveRecord::Base acts_as_authentic validates_presence_of :username validates_length_of :username, :within => 4..40 validates_uniqueness_of :username end I'm writing a test to see my validations in action. Somehow, I get 2 errors instead of one when validating a uniqueness of a name. To see excess error, I do the following test: describe User do before(:each) do @user = Factory.build(:user) end it "should have a username longer then 3 symbols" do @user2 = Factory(:user) @user.username = @user2.username @user.save puts @user.errors.inspect end end I got 2 errors on username: @errors={"username"=>["has already been taken", "has already been taken"]}. Somehow the validation passes two times. I think authlogic causes that, but I don't have a clue on how to avoid that. Another case of problem is when I set username to nil. Somehow I get four validation errors instead of three: @errors={"username"=>["is too short (minimum is 3 characters)", "should use only letters, numbers, spaces, and .-_@ please.", "can't be blank", "is too short (minimum is 4 characters)"]} I think authlogic is one that causes this strange behaviour. But I can't even imagine on how to solve that. Any ideas?

    Read the article

  • using empty on inaccessible object with __isset and __get

    - by David
    <?php class Magic_Methods { protected $meta; public function __construct() { $this->meta = (object) array( 'test' => 1 ); } public function __isset($name) { echo "pass isset {$name} \n"; return isset($this->$name); } public function __get($name) { echo "pass get {$name} \n"; return $this->$name; } } $mm = new Magic_Methods(); $meta = empty($mm->meta->notExisting); var_dump($meta); echo "||\n"; $meta = empty($mm->meta); var_dump($meta); The snippet above does not work as expected for me. Why would the first empty() ommit the __isset? I get this: pass get meta bool(true) || pass isset meta pass get meta bool(false) I would expected identical results or another pass at the __isset, but not a direct call to __get. Or am I missing something here?

    Read the article

  • RSpec: in-depth differences between before(:all) and before(:each)

    - by gmile
    Ok, so I've ran into a very strange issue, directly connected with before blocks. I'm doing a integration testing via Watir and RSpec. For a simple test to check if user can perform a login I'm creating a 'user' record in the db by means of factory_girl. So I put the following code: before(:each) do @user = Factory(:user) end if "should perform a login" do # do stuff end In do stuff I call a browser and see how the user tries to login. Unfortunately, somehow he cannot do that — "Username isn't valid". After some investigation I discovered that if I put the code for creating user in before(:all) block, everything magically works. How's that? What's the difference between :all and :each in this context? Also, If I put the code for creating user actually in the test body, it still doesn't work (i.e. user somehow isn't added to the DB or something).

    Read the article

  • override __set in __construct() in php?

    - by user151841
    I have a class based on database values. I'm using __set to automatically sync database values with the class properties. Set checks an array of database fields that it is allowed to update in the database. The field 'id' isn't in the list, so __set will throw an exception if you try to do $objDbRow->id = 5;. However, there is one time when I do want to set the id property of the object, and that's on instantiation. So in __constuct, I have $this->id = $id (where $id is passed to __construct). However, __set seems to be intercepting the setting here, because an exception is being thrown on construction. What's the way to get around this? I suppose I also have a boolean flag, like $instantiated, that __set() would check before it does it's field whitelist checking. But that feels inelegant.

    Read the article

  • Is correct name enough to make it happen?

    - by Knowing me knowing you
    Guys, I've just dipped in to limits.h by MS. I tried to check what's the return type for max() fnc and to my surprise I see something like this: // TEMPLATE CLASS numeric_limits template<class _Ty> class numeric_limits : public _Num_base { // numeric limits for arbitrary type _Ty (say little or nothing) public: static _Ty (__CRTDECL min)() _THROW0() { // return minimum value return (_Ty(0)); } static _Ty (__CRTDECL max)() _THROW0() { // return maximum value return (_Ty(0));//EXACTLY THE SAME WHAT IN min<<------------------ } //... other stuff }; so how is it possiple that in both min and max return does exactly the same? So does it mean if I would write makeSanwich() return (_Ty(0)) it would make a sandwich for me? How is it possible that having this same code just fnc names different we are getting different results?

    Read the article

  • php: avoiding __get in certain circumstances?

    - by user151841
    I have a class where I'm using __set. Because I don't want it to set just anything, I have an array of approved variables that it checks before it will actually set a class property. However, on construct, I want the __construct method to set several class properties, some of which are not in the approved list. So when construct happens, and I do $this->var = $value, I of course get my exception that I'm not allowed to set that variable. Can I get around this somehow?

    Read the article

  • Appending empty query string param to the URL in Rails

    - by Termopetteri
    Is there a way to append something to the query string with no value set? I would like to see this kind of URL being generated: http://local/things?magic. What I'm looking for is when the user goes to http://local/other?magic then every URL in the generated page would contain magic in the end. Following code is almost a solution but it gives me http://local/things?magic=. There is an extra = that I don't want there. def default_url_options(options) if params.has_key?("magic") { :magic => "" } end end Setting { :magic => nil } will remove the magic entirely from the generated URLs.

    Read the article

  • Setting up magic routes for plugins in CakePHP 1.3?

    - by Matt Huggins
    I'm working on upgrading my project from CakePHP 1.2 to 1.3. In the process, it seems that the "magic" routing for plugins by which a controller name (e.g.: "ForumsController") matching the plugin name (e.g.: "forums") no longer automatically routes to the root of the plugin URL (e.g.: "www.example.com/forums" pointing to plugin "forums", controller "forums", action "index"). The error message given is as follows: Error: ForumsController could not be found. Error: Create the class ForumsController below in file: app/controllers/forums_controller.php <?php class ForumsController extends AppController { var $name = 'Forums'; } ?> In fact, even if I navigate to "www.example.com/forums/forums" or "www.example.com/forums/forums/index", I get the same exact error. Do I need to explicitly set up routes to every single plugin I use? This seems to destroy a lot of the magic I like about CakePHP. I've only found that doing the following works: Router::connect('/forums/:action/*', array('plugin' => 'forums', 'controller' => 'forums')); Router::connect('/forums', array('plugin' => 'forums', 'controller' => 'forums', 'action' => 'index')); Setting up 2 routes for every single plugin seems like overkill, does it not? Is there a better solution that will cover all my plugins, or at least reduce the number of routes I need to set up for each plugin?

    Read the article

  • Call a block method on an iterator: each.magic.collect { ... }

    - by blinry
    I have a class with a custom each-method: class CurseArray < Array def each_safe each.do |element| unless element =~ "fuck" yield element end end end end And want to call block methods on those "selected" elements. For example: curse_array.each_safe.magic.collect {|element| "#{element} is a nice sentence."} I know there is a way to do this, but I've forgotten. Please help! :-)

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >