Posts

html - Dropdown Menu goes underneath image -

today encountered weird experience in site livegreen when hover on menu services, dropdown goes underneath image section below that. tried every possible way positioning , z-index ing , kind, , googled lot, not bad html , css still, testing me. this theme purchased, cant post code. can check website itself. please me. remove z-index property on .main class. .main { z-index: 1; /* causing problems */ }

Java ArrayList StringBuilder appending -

i have 1 problem when appending list values string. getting 1 or more 1 value list. need append these string 1 string , use separator , each string. @ end comma getting added. how can remove @ end of string dynamically. here code: cntlist = parsexml(metadata.xml); if (cntlist.size() != 0) { // entrycountrymap.put(id, country); system.out.println("size ---->" + cntlist.size()); stringbuilder sb = new stringbuilder(); if (cntlist.size() >= 2) { (string s : cntlist) { sb.append(s); sb.append(","); } } system.out.println("stringbuilder ----->" + sb.tostring()); } and output this: stringbuilder ----->all countries,us - united states, please me resolving this. - raji with java 8 it's 1 liner string.join(",", cntlist); if need filter elements of list and/or mutate strings before joining single string, can still in concise manner without loops. cnt...

android - Couchbase Cannot Write Document to Database -

i newbie on android , trying store image database using couchbase mobile. when try run code logcat outputs error " cannot write database.the current winning revision not deleted, conflict" . don't know doing wrong. appreciated. here code. document document = database.getdocument("test1"); map<string, object> doccontent = new hashmap<>(); doccontent.put("message", "hello couchbase lite"); doccontent.put("creationdate", currenttimestring); doccontent.put("testing message 1","testing sync of message"); try { document.putproperties(doccontent); unsavedrevision newrev = document.createrevision(); url url = new url("res/mipmap-mdpi-v4/sym_def_app_icon.png"); newrev.setattachment("photo.png", "image/png", url); newrev.save(); log.d (tag, "document wr...

Determine where an existing Excel macro is used -

is there way determine in excel 2010 workbook macro used? inherited workbook coworker , there macros no comments can't determine used. i'd delete them if trial or debug related code left behind. make backup of original file, delete unwanted macros in new file, see if still works....

css - Text too large in Gmail app (Android) in Mailchimp newsletter -

i've ran inbox inspection , newsletter looks great on devices except gmail. gmail decides render email on desktop , in doing lot of text overlaps each on , large. i've read gmail ignores media queries unfortunate , i've read must inline css work. ruin every other view except gmail. is there solution or should hope people click "view email in browser" first off, never rely on people clicking view web version of email. , always inline styles. except media queries cannot inlined. yeah have inline gmail it's worth it. now, don't know figures email client market share make email work in gmail. but have pointed out, either appear big or small depending on device being used. there no middle ground away with, close want on screen size?

How to implement REST web-services? -

i trying learn java web-service using rest architecture. far have created class don't know how consume service. here's code: import javax.ws.rs.get; import javax.ws.rs.produces; import javax.ws.rs.path; @path("/sericecreation") public class sericecreation { @get @produces("text/plain") public string display(){ return "hello"; } } now, want call display method. can me understand how can achieved? in simplified point of view, rest services bound http calls, in example @get annotation tells method accessed making http get call. you can point browser url generated service , should see "hello" response. url http://<server>:<port>/<appcontext>/<rest-servlet-mapping>/sericecreation where: <server> server name. typically localhost <port> default server port number. if usin jboss 8080 <appcontext> typically name of applicaction (war file) <rest-...

java - Why the below program, without a sleep go to deadlock state but with sleep it executes all the three threads and terminates normally? -

public class threadtest { public static void main(string[] args) throws interruptedexception { exampletest obj = new exampletest(); thread t1 = new thread(new runn(obj)); thread t2 = new thread(new runn(obj)); thread t3 = new thread(new runn(obj)); t1.start(); t2.start(); t3.start(); //thread.sleep(1); obj.exit(); } } class exampletest { public synchronized void enter() { try { system.out.println("printed " +thread.currentthread().getname() +" inside wait"); this.wait(); system.out.println("printed " +thread.currentthread().getname() +" exit wait"); } catch (interruptedexception e) { e.printstacktrace(); } system.out.println("printed " +thread.currentthread().getname() +" @ time: "+system.currenttimemillis()); } public synchronized void exit() { this.notifyall(); } } class runn implements runnable { exampletest obj; public ...