Posts

android - Changing List View Selected Row Color -

hey guys struggling past 4 days problem , no full solution given done issue , want share code you. are looking this? linearlayout newrow = new linearlayout(getbasecontext()); newrow.setorientation(linearlayout.horizontal); if(i % 2 != 0) { newrow.setbackgroundcolor(res.getcolor(/* color here: e.g., r.color.rowcols*/)); } using in loop i incrementer, can change every other row add different color. used linearlayouts , added things them (then added linearlayouts scrollable parent linearlayout), similar approach should accomplishable listviews.

How to rotate an image using Touch in HTML -

is know how rotate image using touch in html, css or javascript. have attached image easy understanding. please me.would appreciate suggestions. http://i.stack.imgur.com/ye7wp.png css3: -ms-transform:rotate(30deg); /* ie 9 */ -moz-transform:rotate(30deg); /* firefox */ -webkit-transform:rotate(30deg); /* safari , chrome */ -o-transform:rotate(30deg); /* opera */ you can take w3school, , care because rotation not supported browser. http://www.w3schools.com/css3/css3_2dtransforms.asp edit: that image linked not being rotated, change image position: take tutorial, http://kyleschaeffer.com/best-practices/pure-css-image-hover/

python - Select an array from a multidimensional array -

in following array, want select sub-array array a when id known a=[['id123','ddf',1],['id456','ddf',1],['id789','ddf',1]] i know id i.e, id456, based on how can select values ['id456','ddf',1] a without using loop. >>> = [['id123','ddf',1],['id456','ddf',1],['id789','ddf',1]] >>> next(x x in if x[0] == 'id456') ['id456', 'ddf', 1] i however, recommend use of dictionary instead.

javascript - convert string to Date object and compare in js -

how can compare 2 dates format var currdate = new date().format("mm/dd/yyyy"); if (date.parse("05-jun-2012")>date.parse(currdate)) { alert("please enter future date!"); return false; } please validate date. function customparse(str) { var months = ['jan','feb','mar','apr','may','jun', 'jul','aug','sep','oct','nov','dec'], n = months.length, re = /(\d{2})-([a-z]{3})-(\d{4})/i, matches; while(n--) { months[months[n]]=n; } // map month names index :) matches = str.match(re); // extract date parts string return new date(matches[3], months[matches[2]], matches[1]); } customparse("18-aug-2010"); // "wed aug 18 2010 00:00:00" customparse("19-aug-2010") > customparse("18-aug-2010");

android - Phonegap Video plugin? -

when creating video plugin following link phonegap video plugin working & executing fine. here particular video saving our internal storage & playing. want need play video directly without saving internal or external storage. tried, getting error in simulator sorry,this video cannot played . don't know doing mistake. can please me this. waiting reply & in advance.... code: //in button onclick="show()" method passing particular url.... function show() { window.plugins.videoplayer.play("file:///android_asset/www/bigbuckbunny.mp4"); } okay videoplayer can play videos 3 different types: 1) sd card file:///sdcard/bigbuckbunny.mp4 which play directly sd card. sd card on android open privileges application able access file. 2) assets file:///android_asset/www/bigbuckbunny.mp4 the app can access assets own. in order videoplayer app, start via intent, access video copy temporary location on sd card. 3) http ...

java - Play! framework 2.0: How to display multiple image? -

i need display gallery of photos. here template: @(photos: list[photo]) @title = { <bold>gallery</bold> } @main(title,"photo"){ <ul class="thumbnails"> @for(photo <- photos) { <li class="span3"> <a href="#" class="thumbnail"> <img src="@photo.path" alt=""> </a> </li> } </ul> } and here controller method: public static result getphotos() { return ok(views.html.photo.gallery.render(photo.get())); } and here photo bean : @entity public class photo extends model { @id public long id; @required public string label; public string path; public photo(string path, string label) { this.path = path; this.label = label; } private static finder<long, photo> find = new finder<long, photo>( long.class, photo.class); public static list<phot...

C# - saving user selected outlook folder -

i have basic c# form user select folder outlook (using microsoft.office.interop.outlook.application.session.pickfolder() ) i want folder saved every time user opens form, last select folder restored. how can achieved? thanks when user picks folder via pickfolder() , store folder.entryid , folder.storeid of selected folder. can use session.getfolderfromid() retrieve selected folder. see this msdn example reference . outlook.folder folder = application.session.pickfolder() outlook.folder; outlook.folder folderfromid = application.session.getfolderfromid(folder.entryid, folder.storeid) outlook.folder;