Posts

php - css generator to put generated css layout into textarea -

i developing content manager system using php , wonder if there css generator can use plugin. generated code stored in mysql database. i have looked @ many of these here , cant seem see can provide users plugin. i want 1 creates layouts , can change background. if cant one, how create one. i hope cant plugin that, since page designing must known [positioning, font size, etc] first, create complete site css hold layout, a1.css , can same same attributes a2.css, a3.css...etc.. [this may terrible] or can change dynamically jquery generate dynamically , like .css( "padding-left", "+=15" ) or use different frameworks , make accessible, link hope gives idea!

backbone.js - How to show multiple views (CompositeView) in a region - Backbone Marionette -

i have compositeviews, , want render in region. compositeview count dynamic. my solution: container = backbone.view.extend() // not itemview, needs template items = document.createdocumentfragment(); _.each(data, function(m, k) { items.appendchild(new compositeview({collection: new collection(m)}).render().el); }) app.region.show(new container({el: items}))

Javascript: self-executable classes and public functions -

i have lot of following classes: (function() { if (!window.administration) { window.administration = {}; } window.administration.customers = (function() { // code , private methods return { // public methods }; })(); })(); i heard somewhere such declarations of public methods not because js engines create many instances of public methods called them code... true? in case how can refactor code in order solve such memory leaks leave self-executable feature? thank you you use construct instead if you're worried hiding methods: (function(ns) { // default constructor ns.blah = function(v) { this.v = v; setup.call(this); // invoke private method } // private method, invoked using .call(this) function setup() { this.w = this.v + 123; } function myhello() { return 'w = ' + this.w + ' , v = ' + this.v; } ns.blah.prototype = { ...

python - Get TimesNewswire API, HTTP Error 404: -

i getting data timesnewswire api , using tool http://prototype.nytimes.com/gst/apitool/index.html for example, search specific news item , type in url: http://topics.nytimes.com/top/news/international/countriesandterritories/china/index.html?8qa but still error " http error 404: " here python script: from urllib2 import urlopen json import loads import codecs import time def call_the_articles(): url = "http://api.nytimes.com/svc/news/v3/content.json?&url=http%3a%2f%2ftopics.nytimes.com%2ftop%2fnews%2finternational%2fcountriesandterritories%2fchina%2findex.html%3f8qa&api-key=####" data= loads(urlopen(url).read()) posts = list() item in data["results"]: if'title' in item: posts.append(item) return posts if __name__ == '__main__': story in call_the_articles(): print story['title'].encode('ascii', 'replace') while error shows t...

domaincontroller - Can I have users of my PHP/SQL/HTML/Javascript application login through my windows domain controller -

i have application have built users login retrieving username , password ms sql table user info, thinking once implement windows server domain controller, better let sever authentication part rather storing in database , comparing login info there , passing true or false if login successful. is possible or should stick php sql method? you can use php ldap that. ldap

How to show dynamic shipping price in Magento? -

i have integrated matrix rate module shipping method. got requirement for showing dynamic shipping prices changing on warehouse options. for example, have 2 warehouses , b. when user selects warehouse a, shipping prices should updated accordingly. , same case warehouse b. i confused how should this? please help. i struggling similar requirement. have set shipping rate based on user selection of postage method. here how proceeding if helps out: create custom shipping method lets user select warehouse/postage/whatever. shall show in onepagecheckout shipping methods step. can create new shipping method, google out. put if($_rate->getcode()=='yourmodule_code') condition in template/checkout/shipping_method/available.phtml , write code radio buttons user can see. eg. warehouse1 , warehouse2. based on user selection set shipping rate using collectrates() method[which have overridden] of module this public function collectrates(mage_shipping_model_...

.htaccess - htaccess rule to rename .php to .html is interfering with other rules -

i attempting change .php files .html extensions , rule using interfering other rules in .htaccess file. appears can either 1 set of rules work or other. check code: options +followsymlinks rewriteengine on ##locations pages rewriterule ^([^/\.]+)\.html?$ locations.php?locationslug=$1&submit=submit [l] ##listing pages rewriterule ^([^/\.]+)\/([^/\.]+)\.html?$ listings.php?locationslug=$1&categoryslug=$2 [l] ##vendor pages rewriterule ^([^/\.]+)\/([^/\.]+)\/([^/\.]+)\.html?$ vendors2.php?vendorslug=$3&locationslug=$1&categoryslug=$2 [l] rewriterule ^(.*)\.html$ $1.php [l] if put line rewriterule ^(.*)\.html$ $1.php [l] 3rd line of file, flat .php pages work .html however, following rules throw error (404 not found). if put line rewriterule ^(.*)\.html$ $1.php [l] last line, flat pages not work .html. as always, constructive input appreciated. in advance! t...