Search Results

Search found 16 results on 1 pages for 'timpone'.

Page 1/1 | 1 

  • is it possible to use shopify for just their shopping cart component or should I just roll my own

    - by timpone
    I'm working on an e-commerce site and am a rails developer; due to the nature of the items, I am managing them in their own database so I'm really looking for something that is only for the shopping cart aspect (there are things like heavy nesting and integration with other pieces of the app that would be very difficult to reproduce). It seems like there are two ways that I can go. (1) One way is rolling my own shopping cart and using something like Stripe (which I have been evaluating and am working fine with it). This literally could be as easy as creating an orders table and a line items table and a lot of front-end. (2) Or I could try to integrate into a third-party shopping cart like Shopify. I am not really sure if I can just use the shopify shopping cart or whether there is any advantage to this. If I already have most of my app done, would shopify (or another shopping cart app) provide any significant benefit (it clearly could)? Or would the integration be too much of a headache? Like for example, when a user 'adds to order' on my site, can I post to shopify and associate it with that user? thx

    Read the article

  • debugging connection to mysql from python script using MySQLdb

    - by timpone
    I am a python newbie and have a python 2.5 script that is using MySQLdb to connect on OS X 10.5.8. I haven't been able to succesfully connect to the database of interest with this. However, I am able to connect using php's mysqli and also via the mysql cli interface. I get the error: File "build/bdist.macosx-10.5-i386/egg/MySQLdb/connections.py", line 188, in __init__ _mysql_exceptions.OperationalError: (1045, "Access denied for user 'arc_development'@'localhost' (using password: YES)") On my linux box which has the same mysql perms, the script works fine logging in. On my OS X laptop, I am able to create a database named test_python which bypasses mysql authentication scheme. This makes me think that issues like 32bit / 64bit incompatabilities aren't occuring. If I turn on the query log, I get access denied: 100610 20:56:55 4 Connect Access denied for user 'arc_development'@'localhost' (using password: YES) I'm a little bit at a loss to what to do next. Is there any way I can specify in the general log or binary log to get the actual password set on the connection string? How about writing out from connections.py file the value (although not sure how I'd do that)? thanks

    Read the article

  • SSL certificates and whether a wildcard common name will support domain.com

    - by timpone
    Sorry, if this is very vendor specific but I purchased an inexpensive SSL Cert from GoDaddy. Right now everything on production is hosted off of www.domain.com. When specifying the common name would a wildcard (ie *.domain.com) cover the case of a lack of a third-level domain such as domain.com? Just to be sure, I made it for www.domain.com rather than a wildcard. If it matters, I will be using with nginx and a mod_passenger. If I want to cover everything including domain.com and staging.domain.com, www.domain.com etc, would a wildcard be the proper cert? Does the inexpensive godaddy cert (12.99 / year) cover wildcard certs (it didn't seem to for me)? Again, sorry for asking vendor specific questions and thx in advance. thx

    Read the article

  • options for physical architecture of rails site regarding caching server or cdn

    - by timpone
    I have a rails app that is set on a single server currently. On production, I force_ssl for everything. I am interested in using a caching server for images (I'm fine with css and js being served from origin for time being). Would nginx or varnish (which I have no experience with) be a better solution (for October 2012)? I'd imagine that it would be easy to switch these around while still on this single server architecture. Or would something like cloudfront (which I also have no experience with) make sense for hosting image files? I know this is a vague question but appreciate any current feedback. thx in advance

    Read the article

  • zend_form ViewScript decorator / passing arguments

    - by timpone
    I have a form that is extend from Zend_Form. I am placing the form into a ViewScript decorator like this: $this->setDecorators(array(array('ViewScript', array('viewScript' => 'game/forms/game-management.phtml')))); I'd like to pass in a variable to this ViewScript but am not sure how this could be done. Since the partial renders out as a Zend_View (allowing $this-app_store_icon for rendering), it seems like there should be a way to pass variables to be rendered. I tried the following but to no avail. $this->setDecorators(array(array('ViewScript', array('viewScript' => 'game/forms/game-management.phtml'),array('app_store_picon'=>$current_app_store_picon)))); Any help on how to get this done would be appreciated. thanks

    Read the article

  • Question about MySQLdb, OS X 10.5, and authentication

    - by timpone
    I'm a noob at Python and have been having problems with MySQLdb and OS X Leopard 10.5. I have a php app that is doing db access just fine with pdo but also want to access with Python. When I use the same credentials with MySQLdb as php, I get the following error: File "build/bdist.macosx-10.5-i386/egg/MySQLdb/connections.py", line 188, in __init__ _mysql_exceptions.OperationalError: (1045, "Access denied for user 'arc_db'@'localhost' (using password: YES)") The authentication piece works fine on my ubuntu server (installed via apt-get) implying that it is something specific to my OS X MySQLdb install. Looking at some postings, I thought it would be my local build of MySQLdb which seems to be problematic with OS X. But I am able to import fine: Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb >>> Also, wanting to create a positive, I am able to access and return results from a database tilted test_something (which presumably bypasses the MySQL's authtentication - not sure exactly how though). Trying to figure out a little more what is going on, I turn on logging for mysql and get the following (added my own comments): 100609 19:09:45 3 Connect Access denied for user 'arc_db'@'localhost' (using password: YES) //not worked 100609 19:10:02 4 Connect arc_db@localhost on arc_development //did work I'm not really sure what the 3 or 4 means but presumably a sucess or failue. So, I guess what would be the next step? Am I doing some obvious stupid python mistake (very likely)? Is there a better way for me to prove that this should / can be working? Is there any way to determine what MySQLdb is sending exactly in its authentication message to MySQL? thanks

    Read the article

  • using the window object for accessing global user defined objects and using text within html for cre

    - by timpone
    I don't do very much jquery / javascript but wanted to ask for some advice on the following piece. I have tried to cut out as much as possible. Most of this was semi-inherited code with catching a bunch of events just hardcoded in. I'd like to generalized them more by putting the object name in the html and accessing via jquery on processing (by_date, by_popularity). I retriev as string and access the object via window[current_obj]. Is this a good way to do this or am I missing something? Are there preferable ways to introduce specificity. thanks for any advice. <script> var by_date={}; by_date.current_page=1; by_date.per_page=4; var by_popularity={}; by_popularity.current_page=1; by_popularity.per_page=4; $(function(){ $('.previous.active').live('click',function(){ window[current_obj].current_page--; process(window[current_obj]); }); }); function process(game_obj){ //will process and output new items here } </script> <div class="otherContainer"> <a class='previous active'>Prev</a><div style="display:none;">by_date</div> | <a class='next'>Next</a><div style="display:none;">by_date</div> </div> <div class="topPrevNextContainer"> <a class='previous active'>Prev</a><div style="display:none;">by_popularity</div> | <a class='next'>Next</a><div style="display:none;">by_popularity</div> </div>

    Read the article

  • php heredoc syntax question

    - by timpone
    Trying to output the following 5 but not sure how to do it. Any ideas? <?php $other='What are you like?'; $content['my_name']=4; $str=<<<JT here is some info. $other Do you like the number {$content['my_name']+1} ? JT; echo $str . '<br />';

    Read the article

  • backbone.js removing template from DOM upon success

    - by timpone
    I'm writing a simple message board app to learn backbone. It's going ok (a lot of the use of this isn't making sense) but am a little stuck in terms of how I would remove a form / html from the dom. I have included most of the code but you can see about 4 lines up from the bottom, the part that isn't working. How would I remove this from the DOM? thx in advance var MbForm=Backbone.View.extend({ events: { 'click button.add-new-post': 'savePost' }, el: $('#detail'), template:_.template($('#post-add-edit-tmpl').html()), render: function(){ var compiled_template = this.template(); this.$el.html(compiled_template); return this; }, savePost: function(e){ //var self=this; //console.log("I want you to say Hello!"); data={ header: $('#post_header').val(), detail: $('#post_detail').val(), forum_id: $('#forum_id').val(), post_id: $('#post_id').val(), parent_id: $('#parent_id').val() }; this.model.save(data, { success: function(){ alert('this saved'); //$(this.el).html('this is what i want'); this.$el.remove();// <- this is the part that isn't working /* none of these worked - error Uncaught TypeError: Cannot call method 'unbind' of undefined this.$el.unbind(); this.$el.empty(); this.el.unbind(); this.el.empty(); */ //this.unbind(); //self.append('this is appended'); } });

    Read the article

  • modrewrite RewriteRule problem

    - by timpone
    I am using Apache 2.2 and mod_rewrite. I would like to take the following urls and map them to another url. The pattern is simple and like this: http://domain/test/ex1.html - http://domain/app/index.php/content/?name=ex1 I tried the following in an .htaccess file: RewriteEngine On RewriteBase /app/ RewriteRule (.*)\.html index.php/content/?name=$1 and RewriteEngine On RewriteRule (.*)\.html /app/index.php/content/?name=$1 I wasn't sure if the backreference was correct so set to $0 and $2 but never seemed to help. I also tried setting the RewriteLogLevel to 9. There is a step where it is almost there: rewrite 'ex1.html' - 'index.php/content/?name=ex1' The last line of the rewrite log is as follows: [perdir /var/www/domain/htdocs/test/] internal redirect with /app/index.php/content/ [INTERNAL REDIRECT] How can I get this to rewrite to /app/index.php/content/?name=ex1 ? thanks

    Read the article

  • ordering an acts_as_tree relationship

    - by timpone
    I have a Category class that is defined like this: class Catergoy < ActiveRecord::Base acts_as_tree :parent_id I'd like the ordering to be by the position value which is a float such that: category-1 category-2, parent_id=1, position=0.5 category-3, parent_id=2, category-4, parent_id=1, position=1 How would I specify this? I tried acts_as_tree :parent_id :order => :position acts_as_tree :parent_id, :order => :position but these are not working. Any ideas how to specify this relationship? Or if I'm missing something else? thx in advance

    Read the article

  • is there something analogous to Connect.registerUsers in the Graph API

    - by timpone
    I am trying to figure this out. Basically, I'd like to reconcile my local emails with a users list of friends. I can see after OAuth token is established that I can get a list of users friends via http://graph.facebook.com/me/friends Would the solution be to keep track of a list of users friends over time and then reconcile with our local ids (in other words, i can know my id) and then use the friends API call to see if your friends are the same in local db?

    Read the article

  • How to round down a DateTime value

    - by timpone
    I have a Location that can have Events. I want to have an upcoming_events method but want it to round down such that if someone looks at 10pm at night, it will show todays events. I have this: def upcoming_events d=Time.new d.strftime("%m-%d-%Y") l=Event.where('location_id=? and start_datetime>?',self.id, d) end I gets converted down correctly but in d.strftime but the query is: SELECT `events`.* FROM `events` WHERE (location_id=301 and start_datetime>'2012-06-20 02:49:23') Any idea how to just get it to do '2012-06-20'?

    Read the article

  • Easiest way to split up a large controller file

    - by timpone
    I have a rails controller file that is too large (~900 lines - api_controller). I'd like to just split it up like something like this: api_controller.rb api_controller_item_admin.rb api_controller_web.rb I don't want to split into multiple controllers. What would be the preferred way to do this? Could I just require the new parts at the end? like: require './api_controller_item_admin' require './api_controller_web'

    Read the article

  • how rspec creates database between specs

    - by timpone
    This is a bit of a naive / simple question. I'm having a hard time finding this info online. Basically, does rspec run rake db:test:prepare between every rspec group? Or is it between every example or model? Or does the schema get loaded once and then truncated between each. I need to add a rake task directly after this call to create a view since they are not supported in schema.rb. Either a link or explanation would be greatly appreciated so that I know where to insert my rake task to create a view. Or whether there is a callback like rake db:test:after_prepare thx

    Read the article

1