Posts

ios - How to set custom background color of UITableViewCell even there's no data inside -

Image
i want accomplish : see there's 1 data but, background color continue until end. i understand can inside tableview delegate of tableview:willdisplaycell:forrowatindexpath: . doesn't go empty cell, hence empty cell white. i used following code display cell alternative color if cell not initialized.i have done work on scrollviewdidscroll showing below:-- - (void)scrollviewdidscroll:(uiscrollview *)scrollview { uiview *view=[[uiview alloc] initwithframe:tblview.frame]; view.backgroundcolor=[uicolor greencolor]; uiview *cellview; int y=0; int i=0; (uiview *view in tblview.subviews) { if ([nsstringfromclass([view class]) isequaltostring:@"_uitableviewseparatorview"]) { cellview=[[uiview alloc] initwithframe:cgrectmake(0, y, 320, 44)]; if (i%2==0) { cellview.backgroundcolor=[uicolor redcolor]; }else{ cellview.backgroundcolor=[uicolor greencolor]; ...

How to release android update version of app for regular and pre-installed app -

recently released updated version of app, works good. first version pre-installed app, during update version released updated version problem on pre-installed app having traking id google analytics when released new version pre-installed version got override. there way release update version pre-installed app , need know how trackid. thanks in advance let's pre-release app has versioncode=1 . first version of deployed on google play app 1 . you've said, have 2 updates on , google play forced increment version number, let's 3. in conclusion, if user has pre installed app - version code 1. if updated market - have latest version number -3. or @ least two. the point can pretty sure @ moment of time, when published 2 updates, users, have version=1 users preisntalled app, while users version>1 users app market. considering this, can use app version number ga differentiate these users. does make sense?

c++ - Runtime error for double dimensional vector -

i have problem using double dimensional vectors. have declared double vector extern in header file , again (not extern) in main.cpp file before main() call. call upon function dynamically allocate memory double vector. given code gives no compilation error. @ runtime if access vector, gives vector subscript out of range exception. checked using debugger , found vector allocated memory in function, comes (out of function scope) vector size goes 0. have attached code color.h: #ifndef __color__ #define __color__ class color{ public : int r,g,b; color(void); color(int r, int g,int b); }; #endif color.cpp #include"color.h" #include <iostream> color::color(void){ r=g=b=0; } color::color(int r, int g,int b){ if(r<=1 && g<=1 && b<=1){ r=r;g=g;b=b; } else{ std::cout<<"error in rgb values"; } } header.h: #ifndef __header__ #define __header__ #include...

javascript - Mousenter and mouseout event to show border -

i have following html structure: <div> <p>name <img src="url" alt="image a"></p> <p>age <img src="url" alt="image b"> </p> <p><img src="url" alt="image c"></p> </div> when mousenter happens element in html, want show red border element mouse over. current code is: $("*").mouseenter( function(){ $(this).css("border","solid red"); }).mouseleave( function(){ $(this).css("border","none"); }); however when mouse enters image paragraph holds image comes border image a. want image have border. can suggest how can go doing this? working demo i think want hover on p , create borders on p $("div p").mouseenter( function () { ...

asp.net - getting checked checkbox out of grid -

i have checkboxes @ grid header row. i wanted find checkboxes clicked. my check boxes named : chk1 chk2 chk3 chk4 chk common , 1,2,3,4 gets increament per column. to checked box,i did following code: for integer = 0 gvsearch.columns.count - 1 if ctype(gvsearch.headerrow.findcontrol("chk"& i+1 ,checkbox).checked) 'some logic end if next but, ctype(gvsearch.headerrow.findcontrol("chk"& i+1 ,checkbox).checked) giving me error as: syntax error in cast operator;two arguments separated comma required. please me. your brackets placed incorrect ctype(gvsearch.headerrow.findcontrol("chk"& i+1),checkbox).checked

java - Extending classpath and Tomcat Plugin -

the project working @ moment standard web application , want start embedded tomcat (mvn tomcat7:run). within meta-inf/context.xml there entry <loader classname="org.apache.catalina.loader.virtualwebapploader" virtualclasspath="${home}/lib"/> to extend classpath of web application. when starting web application mvn tomcat7:run lot of classnotfoundexceptions, e.g. java.lang.classnotfoundexception: org.apache.catalina.deploy.servletdef are thrown. is there way embedded tomcat tomcat plugin work while extending classpath in context.xml? the answer problem set tomcat plugin use separate class loader maven. done setting useseparatetomcatclassloader parameter plugin true. can either done in tomcat plugin configuration: <plugin> <groupid>org.apache.tomcat.maven</groupid> <artifactid>tomcat7-maven-plugin</artifactid> <configuration> <contextreloadable>true</contextreloadable...

internet explorer - Force IE8 not to use compatibility mode, using MetaData in Theme not working -

as question title tells have problems forcing ie8 not use compatibility mode. i found 2 solutions on web 1 michael gollmick , wich adds code beforerenderresponse: if (context.getuseragent().isie()) { var response = facescontext.getexternalcontext().getresponse(); response.setheader("x-ua-compatible", "ie=8"); } this solution works fine compatibility mode button in browser disapears , page looks should. b ut don't want add code every xpage, tried solution per henrik lausten add metadata theme: <resources> <metadata> <httpequiv>x-ua-compatible</httpequiv> <content>ie=8</content> </metadata> </resources> but seems metadata in theme has no efect. when taking @ html source code found meta tag in header of sourcecode ie8 seems ignore it. <meta content="ie=8" http-equiv="x-ua-compatible"> so how can metadata theme working? or maby other solution automatica...