Posts

iphone - hiding tableview index dynamically -

in iphone sdk, there way dynamically decide whether or not show index @ side of table view, , sections well? example, show index "a...z" if table has on 50 entries, hide if it's less that. can decided dynamically? using uilocalizedindexedcollation display index. thanks! uitableview has property called sectionindexminimumdisplayrowcount - number of table rows @ display index list on right edge of table.

android - How to get gmail user's contacts? -

i need retrieve email addresses user has stored in gmail account. in app, user can decide invite friend of him. want application (if user tell me "ok") presents list of user's contacts email addresses stored in gmail, among can choose 1 or more... i know exists authentication , authorization google apis" . right way? and, how use them in android? the question , accepted answer @ get contact info android contact picker has example of how use android native contact-picker.

java - maven and unit testing - combining maven surefire plugin AND testNG eclipse plugin -

could please share way of unit testing in eclipse ? using surefire plugin, m2eclipse & maven, or testng eclipse plugin ? combine these alternatives ? i'm using testng + maven surefire-plugin , had been using testng eclipse plugin year ago see results in testng view. started using maven, when "maven test phase" using m2eclipse, there console output , surefire reports can check in browser , choose test suite, test, or test method can set via testng.xml. on other hand, if use surefire plugin , have specific settings regarding classpath etc., rely on, running tests via testng eclipse plugin doesn't have compatible code. using surefire plugin, classpath different - target/test-classes , target/classes - using testng plugin, using project classpath. how go talking about? is possible synchronize "maven test" using m2eclipse , surefire plugin testng eclipse plugin , view ? edited: i'm wondering, why maven project ("java build path")...

iphone - Error: Parameter name omitted -

i'm trying have auto reversing animation, , getting above error on "completion:^(bool)finished{" line. [uiview animatewithduration:0.5 delay:0 options:uiviewanimationoptionautoreverse animations:^{ [[[self diebuttons] objectatindex:i] settransform:cgaffinetransformmaketranslation(0, 200)]; } completion:^(bool)finished{ }]; note first attempted following code button jumped new location @ end of animation. [uiview beginanimations:nil context:nil]; [uiview setanimationduration:0.5]; [uiview setanimationrepeatautoreverses:yes]; [button settransform:cgaffinetransformmaketranslation(0, 200)]; [uiview commitanimations]; finished name of bool parameter, , objective-c blocks have c-style function signatures, has in parenthe...

mysql - ORDER BY uses all rows -

i want show 10 latest forum topics , ordering date asc. put index on date, however, still gets rows check (i use explain see that). what problem or can't see without seeing table? thank you. depending on type of index, ordering date need full scan. think can't mysql. nevertheless, 1 solution "cut" search using clause. eg where date > 10 days ago the ordering not done on full scan on left after clause. weird may seem, , depending on table, may able optimize query ... 2 queries. eg : select max(primary key) topics => $max select topic topics primary key >= $max - 10 these 2 request faster full scan if table has many lines , give same result if primary key auto-increment. i hope you jerome wagner

html - CSS 3 column fluid layout issues, 3rd column too wide -

i've been trying implement 3 column fluid layout following http://www.alistapart.com/articles/holygrail/ (left 300px fixed, center fluid, right 300px fixed) , reason 3rd column blowing out right side of layout. here's want vs i'm getting: http://i.stack.imgur.com/qfvvp.png am testing on linux chrome , ff - both latest stable versions. my css is: #home { min-width:900px; font-family: arial; font-size: 12px; color: #565656; } /* main page divisions */ #page-top { height: 120px; background-color: #ffffffff; } #page-middle { height: 250px; background-color: #6ac0eb; float:left; width:100%; padding-left: 300px; /* lc width */ padding-right: 300px; /* rc width */ } #page-middle .column { position: relative; float: left; } #page-bottom { clear:both; height: 300px; background-color:#ededed; overflow:scroll; } /* middle page divisions */ #page-middle-centre { width:60%; } #page-middle-lef...

groovy - Get all records by date ignoring the time in DateTime in grails -

i'm using grails joda date time plugin want fetch record day ignoring time precision in date. whats best way it? thanks help. class record { datetime datefield def getallrecordsforoneday(aday = new datetime()) { def localdate = new localdate(aday); record.findalldatefieldbetween(localdate.todatetimeatstartofday(), localdate.plusdays(1).todatetimeatstartofday()) //or criteria record.withcriteria { between 'datefield', localdate.todatetimeatstartofday(), localdate.plusdays(1).todatetimeatstartofday() } } }