Перейти до основного вмісту

Публікації

Add keyboard layout with sysconfig.Fedora 14, LXDE.

I have added UA-Ukrainian keyboard layout to /etc/sysconfig/keyboard file. Now it looks like: KEYTABLE="us" MODEL="pc105+inet" LAYOUT="us,ua" KBD_NUMLOCK="yes" OPTIONS="grp:caps_toggle,grp_led:scroll" I am using Gaps Lock key to switch layout and scroll lock led as an indicator. NOTE: you need to restart your X session in order changes to take effect.

Exaile Cyrillic encoding fix

Add just before return statement of /usr/lib/python2.7/site-packages/exaile/xl/trak/trak.py"def get_tag_display(...)" following lines: ------------------------------------------------------------------- try: s = retval.encode('latin1').decode('cp1251') retval = s; except: print "not an cp1251" -------------------------------------------------------------------

IOS UILabel vertical alignment

taken from stackowerflow.com CGSize maximumSize = CGSizeMake ( 300 , 9999 ); NSString * dateString = @ "The date today is January 1st, 1999" ; UIFont * dateFont = [ UIFont fontWithName :@ "Helvetica" size : 14 ]; CGSize dateStringSize = [ dateString sizeWithFont : dateFont constrainedToSize : maximumSize lineBreakMode : self . dateLabel . lineBreakMode ]; CGRect dateFrame = CGRectMake ( 10 , 10 , 300 , dateStringSize . height ); self . dateLabel . frame = dateFrame ;