Posts

javascript - jQuery class selector and click() -

i'm trying alert happen when clicked. can working in jsfiddle, not in production code: jsfiddle example works (jquery 1.5 loaded) html (in case jsfiddle inaccessible): <!doctype html><html><head><title>test</title></head> <body> <h1>25 feb 2011</h1><h3>abc</h3><ul> <li class="todoitem">test&mdash;5 minutes</li> </ul> </body></html> javascript: $(".todoitem").click(function() { alert('item selected'); }); non-working production example: <!doctype html><html><head><title>test</title> <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.1.min.js" type="text/javascript"></script> <script type="text/javascript"> $(".todoitem").click(function() { alert('item selected'); }); </script> </hea...

wpf - Find the applied ScaleTransform on a Control or UIElement? -

i have control sitting somewhere in window. @ root of window grid named maingrid. have scaletransform applied on maingrid's layouttransform use zoom in on contents of window when window's size grows. however, 1 of controls uses bitmapcache on canvases optimize drawing performance. bitmapcache not take consideration scaletransform s might applied control, if i'm zoomed in, control appears blurry. bitmapcache have renderatscale property can use increase scale of cached image. however, problem have don't know of elegant way find out scale value needs be. now, have property on control window can pass scale value control. however, if didn't need rely on external source passing in scale value. is there way control can summary of scaletransforms applied it? you can recursively go through of control's parents , sum scaletransform . i don't think can other way.

php - Going down on a site with "Firefox can't establish a connection to the server" -

i've site goes down message below. unable connect firefox can't establish connection server at the site temporarily unavailable or busy. try again in few moments. if unable load pages, check computer's network connection. if computer or network protected firewall or proxy, make sure firefox permitted access web. what possible reasons that's causing message shown? the hosting saying script taking memory. case? to start troubleshooting replace index.php (being sure keep copy of original) basic <?php phpinfo(); ?> , see if works consistently. if (assuming in index.php) can start working through original index.php adding bare-bones framework start , add more code until breaks. troubleshooting easy if start 1 end or other , work towards "trouble". in case, start minimal code, keep adding until goes wrong.

Encode Time Issue in Delphi 2010 -

when use encodetime function encodetime(whour, wminute, wsecond, wmilliseconds) not assigning millisec value result. we using below encode date , time result := encodedate(wyear, wmonth, wday) + encodetime(whour, wminute, wsecond, wmilliseconds); the string want parse datetime has value apr 10 2008 7:21:31:460pm after encoding output 10/04/2008 07:21:31 . the result contains hh:mm:ss value , not millisec value. please let know if there anyway format values , store in variable along millisec. * ** * ** * ** * ** * ** * *** function trying * ** * ** * ** * *** function datetimeparser(thestring :string):tdatetime; var wyear,wmonth,wday,whour, wminute, wsecond,wmilliseconds : word ; date,month,med :string; time : tdatetime; testtime,testtime1 : tsystemtime; var mydatetime : tdatetime; begin month := copy(thestring,1,3) ; if month ='jan' wmonth := 01 else if month ='feb' wmonth := 02 else if month ='mar' wmonth := 03 else i...

indexing - Sphinx Storage Engine for MySQL reindex on record insert -

do have run indexer each time add new records unto tables? there no other way around this? whenever add new record have indexer test1 --rotate on searchd service. i using ha_sphinx.dll on windows version 1.11 r2616. mysql version 5.5.9 checkout article five ways configure sphinx search engine

Google app engine JDO data store design using inheritance -

i using subtable inheritance strategy design data store using jdo application hosted in google app engine. there 3 types of users can logs app. these classes designed purpose 1) user(abstract) 2)usertype1 extends user 3) usertype2 extends user 4) usertype3 extends user. problem every time want find user based on userid have check each entity kind separatly. become more problem when user types increases. please how design model classes in scenario. thanks you're looking jdo2's superclass-table inheritance technique. works similar python app engine polymodel class. unfortunately, app engine doesn't support superclass-table right now. instead, consider consolidating of different class's fields single user class type enum.

How to emit unencoded html in the dropdown list in ASP.NET MVC -

i want populate dropdown list trademark , copyright characters looks html encoded instead encoded form. thanks help. when populating selectlist, use httputility.htmldecode on text. here's example: <% var entities = new string[] { "&copy;", "&lt;&quot;&gt;", "&#169;" }; var selectlistitems = entities.select(e => new selectlistitem { text = httputility.htmldecode(e), value = "1" }); %> <%= html.dropdownlist("exampledropdownlist", selectlistitems) %>