Posts

osx - Uninstall python 3.2 on mac os x 10.6.7 -

according documentation python.org, python 3.2 install on mac os requires upgrade tcl/tk 8.5.9 (for use of idle). in haste, have done both. friend told me python 3 not recommended yet because built-ins , few modules have been released 3. stable 1 far 2.7 (especially if 1 wants make extensive use of variety of modules). machine has both 2.6.1 , 3.2 (because os services make use of 2.6.1 comes default os). 1. how remove 3.2 avoid compatibility issues? tcl/tk 8.5.9 installed , not default. there no verbose mode during installation, don't know whether replaced default one. if did how bad can os? , hence 2. if above bad, how downgrade old version of tcl/tk? in short, how bring machine original state? if knows paths directories , files can manually. thanks since python installs using package manager, can use suspicious package @ install script , installed. be aware demonstration purposes only. environment osx 10.6.8 , uninstalling python-3.2.2-macosx10.6.dmg. ...

java - Weird mysql beahviours with timezones? How to control them? -

i wrote webapp using spring+hibernate. developed on windows , moved linux virtual server (aruba, italian provider). noticed annoying thing: when dates saved on windows time same of "wall clock", if read 13:45 have same hour in mysql row. doesn't happen on linux anyway. in fact linux machine on cest (my timezone), got typing "date" in shell. dates saved in db offset relative gmt. again, app displays in gmt (including gmt time zone if choose format dates display time zone) , mysql saves in format. how control this? i post solution myself, because think it's worth having in site. first of all: mysql doesn't store timezone information. running on gmt+4 , write couple of records contain date fields. move system in gmt-2 read records (perhaps importing data mysqldump). if system , vm have gmt-2 timezone dates read taken if written in gmt-2 , not adjusted. solution: take control of vm timezone using -duser.timezone="gmt" command li...

static - How to add text over the top of a google map so that the text does not move when panning -

i working on html5 application designed run google map takes entire screen on mobile phone. sake of simple debugging, , perhaps later legitimate informational purposes, position text in bottom right hand corner of map, reports information, such current lat/lng of user. have looked through v3 api, , best of knowledge there's nothing in there this. there kind of workaround permit done? pretty easy really. add div control. define empty div anywhere in html. add control, , maps sucks map display. write dom functions wish. <div id="debug"></div> -- code goes here -- var x = document.getelementbyid("debug"); mapname.controls[google.maps.controlposition.right_bottom].push(x); -- code goes here -- $("#debug").html("debugging info") hope enough idea across. in example put in right_bottom. other options here . skip

xslt - How to group at more than one level? -

i have xml file: <document> <line id="0"> <field id="2">x111</field> <field id="3">1</field> <field id="4">222222222222</field> </line> <line id="1"> <field id="2">x111</field> <field id="3">1</field> <field id="4">111111111111</field> </line> <line id="2"> <field id="2">x222</field> <field id="3">1</field> <field id="4">111111111111</field> </line> <line id="3"> <field id="2">x222</field> <field id="3">1></field> <field id="4">111111111111</field> </line> <line id="4"> ...

VBA, Outlook, Seeing 'People's Calendars -

i tring programmatically (with vba) access calendars others share me. listed in outlook under 'people's calendars.' have searched web , suggestions have done little more confuse me. how can listing of calendars shared me, , 1 calendar in specific, among 'people's calendars'? check out returned values following code. searches person name, same way when typing recipient new email, , grabs persons shared calendar , enumerates shared appointments. dim _namespace outlook.namespace dim _recipient outlook.recipient dim calendarfolder outlook.folder set _namespace = application.getnamespace("mapi") set _recipient = _namespace.createrecipient(name) _recipient.resolve if _recipient.resolved set calendarfolder = _namespace.getshareddefaultfolder(_recipient, olfoldercalendar) 'this display calendar on screen: 'calendarfolder.display dim oitems outlook.items set oitems = calendarfolder.items 'oitems set of appoi...

hibernate - Removing proxy part of grails domain object? -

i want @ actual instance of domain object. is, need serialize object, , i'm trying use domain object on 2 sides of httpinvoker chain. there way fully-loaded domain object doesn't have grails wiring, can serialize it? we grailshibernateutil.unwrapifproxy(obj) . won't rid of grails injected methods , such - of hibernate/gorm proxy, should sufficient. edit : sorry asking, did declare domain class implements serializable ? it might add/inject class, in grails non-bug 6379 . this piece of code (got here ) worked me in grails console on small domain class: . import org.codehaus.groovy.grails.orm.hibernate.cfg.grailshibernateutil import com.somegroup.domain.* def loc = somedomainclass.get(1) loc = grailshibernateutil.unwrapifproxy(loc) bytearrayoutputstream bos = new bytearrayoutputstream() objectoutput out = new objectoutputstream(bos) out.writeobject(loc) byte[] yourbytes = bos.tobytearray()

c# - How to force window to redraw? -

i have full-screen window, using code: windowstyle = system.windows.windowstyle.none; windowstate = system.windows.windowstate.maximized; topmost = true; it works ok under win7, under winxp window elements don't redrawn when window goes fullscreen. there way force window make full redraw , layout update? upd redrawn ok, if switch app atl-tab , mine you force window repaint using windows api. example class implementation: public static class windowsapi { private const int wmpaint = 0x000f; [dllimport("user32.dll")] public static extern int64 sendmessage(intptr hwnd, uint msg, intptr wparam, intptr lparam); public static void forcepaint(this form form) { sendmessage(form.handle, wmpaint, intptr.zero, intptr.zero); } } usage: form testform = new form(); testform.forcepaint();