Posts

excel vba - Reading all folders in VBA -

i put following code in excel. script found on net.. sub testlistfolders() application.screenupdating = false workbooks.add ' create new workbook folder list ' add headers range("a1") .formula = "folder contents:" .font.bold = true .font.size = 12 end range("a3").formula = "folder path:" range("b3").formula = "folder name:" range("c3").formula = "size:" range("d3").formula = "subfolders:" range("e3").formula = "files:" range("f3").formula = "short name:" range("g3").formula = "short path:" range("a3:g3").font.bold = true listfolders "c:\foldername\", true application.screenupdating = true end sub sub listfolders(sourcefoldername st

javascript - Open a class div on click -

so making website, , want when click on navigation link (hyperlink) show div. this have: http://pastebin.com/lp2awfpy i'd have classes. thanks guys! if you're happy use jquery , make life easier, can achieve result expected that: html <ul> <li><a class="mylink" href="#">services</a></li> </ul> <div class="alert-message notice"> here! <a class="mylink" href="#">hide</a> </div> css .alert-message { display:none; position: relative; border: 1px solid #ddd; background-color: #f9f9f9; -webkit-box-shadow: 0px 1px 1px 0px rgba(180, 180, 180, 0.1); -moz-box-shadow: 0px 1px 1px 0px rgba(180, 180, 180, 0.1); box-shadow: 0px 1px 1px 0px rgba(180, 180, 180, 0.1); font-weight: bold; padding: 10px 40px; margin-bottom: 20px; } .alert-message.error { background-color: #ffe9e9; border-color: #e99f9f;

android - Why do I get a error date value? -

i use following code display details of photo, find value of myinfo.date 22:15 15-01-1970. error made? thanks! public static void getphotodetailsbyid(context mycontext,string id,detailsinfo myinfo ) { cursor cur = mycontext.getcontentresolver().query( mediastore.images.media.external_content_uri, null, mediastore.images.media._id+"=?", new string[]{id}, "" ); if (cur.movetofirst()){ myinfo.title= cur.getstring(cur.getcolumnindex(mediastore.images.media.title)); myinfo.path = cur.getstring(cur.getcolumnindex(mediastore.images.media.data)); myinfo.size=cur.getstring(cur.getcolumnindex(mediastore.images.media.size)); myinfo.date=cur.getstring(cur.getcolumnindex(mediastore.images.media.date_modified)); myinfo.date=getdate(mycontext,myinfo.date); /* myinfo.resolutio

How to print all the values for a key in HashMap in java -

map<string, string> map = new hashmap<string, string>(); map.put("1", "xyz"); map.put("1", "abc"); map.put("1", "cde"); map.put("2", "err");` ` for above map want values associated key 1. expected output. key:: 1 values are:: xyz, abc, cde order of values doesn't important. in map key should unique . if associate new value existing key, overwrite value of existing entry. you might need check interface map#put(k, v) method. if map contained mapping key, old value replaced specified value. so in case map have "cde" value key "1" .

android - Wrong reference to Activity in listener after screen rotation -

i have problem google maps api. after rotate screen have wrong/old reference activity. i"am using "mmapfragment.setretaininstance(true);". "pact" activity. logging gives me hascode of activity not same(look example). private void setupmapifneeded() { if (map != null) { log.d(h.tag, "setupmapifneeded" ); log.d(h.tag, pact.tostring() + " set new onclicklistener"); map.setoninfowindowclicklistener(new oninfowindowclicklistener(){ @override public void oninfowindowclick(marker marker) { log.d(h.tag, pact.tostring() + " click"); } }); } } loggin example before rotation: mainapp@422fa1c0 mainapp created mainapp@422fa1c0 set new onclicklistener mainapp@422fa1c0 click after rotation: mainapp@42b291f0 mainapp created mainapp@42b291f0 set new onclicklistener mainapp@ 422fa1c0

java - Load properties files in session + Struts -

can in struts 1 load , set properties file in session, need not load properties file in action @ every request @ method level. please me this. properties props = ... // load properties file request.getsession().setattribute("mypropertiesfile", props); but not practice use session store such things, why don't use cache?

How to store file in Android which I want edit later? -

i have .vcf file , want put in android can read code. problem cannot put assets folder, because want overwrite/edit file later. how should this? first since might want load via code, may need include .vcf file in /assets folder loading. then can copy .vcf file device's internal or external storage doing overwrite/edit operation on fly. for more information internal , external storage, please refer android developers: storage options