Posts

unix - Javascript refresh function problem -

i have problem following javascript code. want run background check (check.php) process on unix server. execution time of php , response takes 1.2-1.5 seconds (did test in mozilla) i've come script below refresh , check what's going on process , change background of div accordingly. right now, after few refreshes hangs, because think goes loop , doesn't wait first function finish , piles up. ideas doing wrong? more simpler way it? <script language="javascript" type="text/javascript"> function getval(param) { var strurl = param; var req = new xmlhttprequest(); req.open("get", strurl, false); //third parameter set false here req.send(null); return req.responsetext; } function changedivimage() { var pid = getval("check.php") var imgpath = new string(); imgpath = document.getelementbyid("status_body").style.backgroundimage; ...

.net - NHibernate Mapping a one-to-many relationship with the many coming from multiple sources -

background i have been working on tool supposed work in conjuction legacy application, , have hit small brick wall. have spent last day or searching clues this, have had no luck. i trying map relationship between table , multiple other tables follows: the parent table represents "dictionary." dictionary list of database fields can used in ad-hoc records queries in (horrible) legacy application. each record holds table , column item can found, unique identfying "friendly" name, key use in global value lookup table, , flag determines how lookup values pulled, , text column defines sql run obtain lookup data if flag value set appropriately. table name [dictionary] (see below table structure.) the flag can have 1 of 4 values: freeform standard system dynamic if flag set freeform, end user can enter value want. if other value, value must picked list follows: standard : legacy application pulls values "union all" query of 2 tables dif...

php - How to build a url of a GRAVATAR image from a given email -

there simple way php , simple script or url manipulation build url gravatar image corresponding email? ex. http://gravatar.com/avatars/avatar.php?email=myemail@myserver.com , return jpeg or png image. if there no simple way example, easiest way know resolve url of gravatar corresponding email?. thanks you can find sample script php code on implementation site: http://en.gravatar.com/site/implement/php

logging - Why does Heroku log using the server time rather than the Rails time zone? -

update: ok, didn't formulate q answered. still struggle heroku being on -07:00 utc , @ +02:00 utc. q: how log written in correct time.zone ? 9 hours difference, heroku (us west) - norway, distracting work with. in production.log (using heroku logs ): processing productioncontroller#create xml (for 81.26.51.35 @ 2010-04-28 23:00:12 ) [post] how write 2010-04-29 08:00:12 +02:00 gmt ? note i'm running @ heroku , cannot set server time myself, 1 @ amazon ec2 servers. below previous question, i'll leave holds interesting information time , zones. why time.now yield server local time when have set time zone in environment.rb config.time_zone = 'copenhagen' i've put in view <p> time.zone <%= time.zone %> </p> <p> time.now <%= time.now %> </p> <p> time.now.utc <%= time.now.utc %> </p> <p> time.zone.now <%= time.zone.now %> </p> <p> time.zone.today <%= time.zon...

session - Yahoo account remains open after using openID to login.why? -

i have added openid login yahoo! , google in site. ok , works fine. when users select example yahoo! login site, logged in in yahoo mail account too. i think not secure because maybe don't notice issue , leave computer while email account availble. what think , solution own sites? notice same story stackoverflow.com. it's typically session cookie, if close browser they'll okay, concern. i'd curious hear yahoo! team has themselves; if nobody y! finds question i'd ask on @ yahoo openid developer forum .

c++ - Advice when using COM Object/CComPtr and the STL -

i doing com related things directshow such as: typedef ccomptr<ibasefilter> autoibasefilterptr; map<cstring, autoibasefilterptr> _filtermap; to store list of directshow related com objects , friendly name. after finding this article (see:problem 2) on how changes in vc10 compiler might effect ok code, wondering if there more things watch out when mixing stl , ccomptr or prehaps mixing stl , com in general. any tips appreciated, thanks the slight thing can think of hasn't been mentioned cadapt required ccombstr ccomptr , because overloads operator& too. in fact, overloading operator& makes cadapt necessary, many stl containers require taking address of x returns pointer said x.

google app engine - best framework on gae(python) ,like jquery on javascript ? has it? -

i want find framework make work simple on gae , has ? thanks i found one, not http://code.google.com/p/appengine-framework/ there large number of frameworks can use on app engine - both custom designed it, , general purpose , work fine on app engine. if you've used python framework in past, small amount of searching tell if work on app engine or without modifications. common frameworks work on app engine include django, web2py , pylons. there's comprehensive list or open source tools here .