Search Results

Search found 88 results on 4 pages for 'ming xie'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Column locking in innodb?

    - by ming yeow
    I know this sounds weird, but apparently one of my columns is locked. select * from table where type_id = 1 and updated_at < '2010-03-14' limit 1; select * from table where type_id = 3 and updated_at < '2010-03-14' limit 10; the first one would not finish running even in a few hours, while the second one completes smoothly. the only difference is the type_id between the 2 queries. a bit of background, the first statement screwed up before which i had to kill manually. Thanks in advance for your help - i have an urgent data job to finish, and this problem is driving me crazy

    Read the article

  • Deleting huge chunks of data from mysql innodb

    - by ming yeow
    I need to delete a huge chunk of my data in my production database, which runs about 100GB in size. If possible, i would like to minimize my downtime. My selection criteria for deleting is likely to be DELETE * FROM POSTING WHERE USER.ID=5 AND UPDATED_AT<100 What is the best way to delete it? Build an index? Write a sequential script that deletes via paginating through the rows 1000 at a time?

    Read the article

  • Getting session authenticity token via ajax (rails, jquery)

    - by ming yeow
    Hi folks, I wish to authenticate a user without having the page reloaded, and having the user submit a given form. However, the problem that I immediately run into here is that the authenticity token typically gets set when the page is reloaded. I need the authenticity token for the form submission, but i do not have it yet because the page is yet to reload. I figure this cannot be that rare - anyone has any idea on how to resolve this? 1 idea could be getting rails to pass back the authenticity token after authentication, but i do not know how to access it from the controller 1) not logined user sees form 2) not logined user types in message and submit 3) facebox asking for authentication 4) after authentication, submit form automatically without refreshing 5) //but authenticity token is needed for form submission, which is not there yet

    Read the article

  • Appending HTML to end of body using javascript

    - by ming yeow
    here is the deal. i have several templates for faceboxes (lightbox) i need at different points of the application. these are stored in different partials and files. i will initialize different javascript functions in accordance to which ones i need. The question is, what is the best way to append the external HTML page into my body using javascript?

    Read the article

  • Rails Routing Broken In Production - Caching of routes.rb suspected

    - by ming yeow
    Hi folks, i have an urgent problem. Essentially, my routing works on my localhost. But when i deployed this to production, the routes does not seem to work correctly. For example, given a new route "/invites" - sometimes i will get a 404, and sometimes it will work correctly. I suspect there is some caching going on somewhere, but i am not sure. Logs: when a page is not found (when the routes are supposed to be accurate) Processing UsersController#network (for 67.180.78.126 at 2010-06-01 09:59:31) [GET] Parameters: {"id"="new"} ActionController::RoutingError (No route matches "/comm/role_playing_games" with {}): app/controllers/application_controller.rb:383:in prev_page_label' app/controllers/application_controller.rb:238:in log_timed_info' app/controllers/users_controller.rb:155:in network' app/controllers/users_controller.rb:151:in network' app/controllers/application_controller.rb:44:in turn_on_query_caching' app/controllers/application_controller.rb:43:in turn_on_query_caching' app/controllers/application_controller.rb:42:in turn_on_query_caching' app/controllers/application_controller.rb:41:in turn_on_query_caching' app/controllers/application_controller.rb:40:in turn_on_query_caching' app/controllers/application_controller.rb:39:in turn_on_query_caching' haml (3.0.6) lib/sass/plugin/rack.rb:41:in `call' Rendering /mnt/app/releases/20100524233313/public/404.html (404 Not Found)

    Read the article

  • SSHing into EC2 instance fails - -v details below!

    - by ming yeow
    Hi folks! I created a new ec2 instance, but i am unable to ssh in with the key i normally use with my other instances. The -v details are below. Thanks! debug1: Host 'dbl01' is known and matches the RSA host key. debug1: Found key in /Users/mingyeow/.ssh/known_hosts:26 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: /Users/mingyeow/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: Trying private key: /Users/mingyeow/.ssh/identity debug1: Trying private key: /Users/mingyeow/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey).

    Read the article

  • Why does the OAuth Unauthorized Error (401) happen?

    - by ming yeow
    Sometimes an Twitter OAuth is successfully executed, but an unauthorized error is thrown. I get about 50 of these on a daily basis. It is worrying, because I have no idea how that might be reproduced. What are the different cases where this error happens, and how can this be fixed or prevented?

    Read the article

  • jQuery plugin for Facebook "Like" Button

    - by ming yeow
    On lots of sites now, you can see a Facebook "Like" Button. - When depressed, it changes background color. - When mouse-overed, it allows you to write some additional text I love this interface - lightweight action, but allow for expression of more data if the user wants to. Anyone has written a similar plugin?

    Read the article

  • Sparse (Pseudo) Infinite Grid Data Structure for Web Game

    - by Ming
    I'm considering trying to make a game that takes place on an essentially infinite grid. The grid is very sparse. Certain small regions of relatively high density. Relatively few isolated nonempty cells. The amount of the grid in use is too large to implement naively but probably smallish by "big data" standards (I'm not trying to map the Internet or anything like that) This needs to be easy to persist. Here are the operations I may want to perform (reasonably efficiently) on this grid: Ask for some small rectangular region of cells and all their contents (a player's current neighborhood) Set individual cells or blit small regions (the player is making a move) Ask for the rough shape or outline/silhouette of some larger rectangular regions (a world map or region preview) Find some regions with approximately a given density (player spawning location) Approximate shortest path through gaps of at most some small constant empty spaces per hop (it's OK to be a bad approximation often, but not OK to keep heading the wrong direction searching) Approximate convex hull for a region Here's the catch: I want to do this in a web app. That is, I would prefer to use existing data storage (perhaps in the form of a relational database) and relatively little external dependency (preferably avoiding the need for a persistent process). Guys, what advice can you give me on actually implementing this? How would you do this if the web-app restrictions weren't in place? How would you modify that if they were? Thanks a lot, everyone!

    Read the article

  • Mongrel not using latest deployed code, despite multiple restarts

    - by ming yeow
    What could be the potential reasons why mongrel does not use the latest code in the ~/current branch? The code changes are in the MODELs. The code changes in the CONTROLLERS TAKE EFFECT. I tried the following: god restart app deploying several times manually stopping mongrel cluster, deleting the pid files, and starting them again Anyone has similar experiences? Where could the server be potentially caching the model files?

    Read the article

  • Email notifications of exceptions happening in a Python app?

    - by ming yeow
    Hi folks, I want to set up email notifications when there is an error happening in my application. In ruby, there is a very elegant solution called ExceptionNotifier, which wraps around the exception handler and uses the built-in mailer to send an email. What is the best way of doing this in Python? I know that this is a very common issue, so would love for any tips that you folks can share! PS: Code samples, pointers to modules would be AWESOME! Thanks!

    Read the article

  • Dummies guide to locking in innodb

    - by ming yeow
    The typical documentation on locking in innodb is way too confusing. I think it will be of great value to have a "dummies guide to innodb locking" I will start, and I will gather all responses as a wiki: The column needs to be indexed before row level locking applies. EXAMPLE: delete row where column1=10; will lock up the table unless column1 is indexed

    Read the article

  • Retrieving all objects in code upfront for performance reasons

    - by ming yeow
    How do you folks retrieve all objects in code upfront? I figure you can increase performance if you bundle all the model calls together? This makes for a bigger deal, especially if your DB cannot keep everything in memory def hitDBSeperately { get X users ...code get Y users... code get Z users... code } Versus: def hitDBInSingleCall { get X+Y+Z users code for X code for Y... }

    Read the article

  • Urgent Problem: Production site is breaking because of cached routes

    - by ming yeow
    Hi folks, i have an urgent problem. Essentially, my routing works on my localhost. But when i deployed this to production, the routes does not seem to work correctly. For example, given a new route "/invites" - sometimes i will get a 404, and sometimes it will work correctly. I suspect there is some caching going on somewhere, but i am not sure. Can someone help? UPDATE: when a page is not found (when it is supposed to be ok ) Processing UsersController#network (for 67.180.78.126 at 2010-06-01 09:59:31) [GET] Parameters: {"id"="new"} ActionController::RoutingError (No route matches "/comm/role_playing_games" with {}): app/controllers/application_controller.rb:383:in prev_page_label' app/controllers/application_controller.rb:238:in log_timed_info' app/controllers/users_controller.rb:155:in network' app/controllers/users_controller.rb:151:in network' app/controllers/application_controller.rb:44:in turn_on_query_caching' app/controllers/application_controller.rb:43:in turn_on_query_caching' app/controllers/application_controller.rb:42:in turn_on_query_caching' app/controllers/application_controller.rb:41:in turn_on_query_caching' app/controllers/application_controller.rb:40:in turn_on_query_caching' app/controllers/application_controller.rb:39:in turn_on_query_caching' haml (3.0.6) lib/sass/plugin/rack.rb:41:in `call' Rendering /mnt/app/releases/20100524233313/public/404.html (404 Not Found)

    Read the article

  • Facebook-like invitation page for my categorization service

    - by ming yeow
    Hi folks, i am working on a categorization service. I want the experience to behave similarly to Facebook's invite/tagging function Does anyone have any experience implementing this? This includes: autocompleting based on list below if auto-complete does not turn up anything, give chance to do something else with that data Would be super happy to hear any experiences, plugins that might be useful in helping me build this out

    Read the article

  • Defining a different primary key in Mongomapper

    - by ming yeow
    I am defining a primary key in MongoMapper. class B key :_id, string key :externalId, string end The problem is that everything i add a new record in B, it appears that I need to explicity specify the _id, when it is already defined in the external id B.new(:_id=>"123", :external_id=>"123 ) That does not quite make sense. There should be a way to specify externalId as the primary key, no?

    Read the article

< Previous Page | 1 2 3 4  | Next Page >