Posts

java - Issue with interface and parameter -

i have problem interface , parameters: public class functions { public static double getinfosum(treemap<string, iinterface> map){ ....some counting } } public class exampleclass { private treemap<string, exampleclassitem > xxxx; public static void somefunction(){ functions.getinfosum(xxxx); //here error } } public class exampleclassitem implements iinterface { ..... } is there other possibility except this: private treemap<string, exampleclassitem > xxxx; -----> private treemap<string, iinterface > xxxx; because need work exampleclassitem there specific functions can not in interface. you can change public static double getinfosum(treemap<string, iinterface> map){ ....some counting } to public static double getinfosum(treemap<string, ? extends iinterface> map){ ....some counting } this allow pass treemap<string, exampleclassitem> method.

javascript - Determine a reverse value based on a range -

i have html page css animation 'pushing' main container of page right 100px when left-hand nav menu hovered over. however, menu needs pushed in decrementally less pixel amounts window size increases. at browser window size of 790px wide (or less), container's left position 59px (retrieved using jquery's $.offset().left , , needs pushed full 100px make menu visible. however, browser window size increases between 790px , 1039px, menu needs pushed less , less - time window size 1039px/container's left position 184px, push needs 1px. so window size range working is: 1039 - 790 = 249px the position range of container adjusts in window sizes to: 183 (when window size 1039) - 59 (when window size 790) = 124px i want push menu this: min container position: left 59px = 100px push max container position: left 183px = 1px push and between 1px , 100px values between the min , max container position. how can assign push value of 100px when window ...

xcode - How can i get the "App Invitable " facebook friends list from ios app? -

in application , there 1 button enable after invite 10 or more friends on facebook. so how can total number of app invite counter ? if want find 'my' friends have installed app, be: https://graph.facebook.com/me/friends?fields=installed you can status of before send out invites , compare later how has changed. also, if don't use app request, use invite likes, can track better tools tapstream. they provide ios framework allows call getconversiondata contains information whether user clicked tapstream link app. can use link this: www.rounak.com/invite/invite_id , use invite_id determine whom user invited (and count this..) you can find information here: https://tapstream.com/developer/ios/onboarding-links/ their service free unless have lot of new users (link clicks)

mamp - apache server can't start anymore -

with latest version of mamppro (3.3) set php version host 5.3.29(standard) 5.4.42. when mamp asks restart servers message appears mamp can't stop apache. hard stop of apache possible , proceeded. apache error log: [sat jun 20 11:33:06 2015] [notice] digest: generating secret digest authentication ... [sat jun 20 11:33:06 2015] [notice] digest: done [sat jun 20 11:33:06 2015] [notice] fastcgi: process manager initialized (pid 52324) [sat jun 20 11:33:06 2015] [notice] apache/2.2.29 (unix) mod_wsgi/3.4 python/2.7.8 mod_fastcgi/2.4.6 dav/2 mod_ssl/2.2.29 openssl/0.9.8zd mod_perl/2.0.8 perl/v5.20.0 configured -- resuming normal operations [sat jun 20 11:44:30 2015] [notice] caught sigterm, shutting down from point on not possible start apache again. no further log entries. when changing php version 5.3.29 works fine again. same problem appears in mamp pro version before (3.2.1) any solution it? os x yosemite 10.10.3 mamp pro 3.3 i had same problem. found out pr...

java - Swing: saving and loading components -

i'm trying save , load state of jpanel has nested custom panels (instances of other classes) , various listeners. these components have been created matisse, have private sub-components. i've tried xmlencoder / xmldecoder , threw various exceptions on serialization try. with xstream , can save , load gui state; however, doesn't reload listeners, leaving me stuck read-only component, undesirable. so, opens little bunch of questions me: is there might doing wrong xstream serialization? is access modifier of sub-components relevant of 2 libraries? are there other options swing component serialization worth exploring? should stick serializing component logic?

oop - Python method that can be called on a list of objects -

when method called on object in python as: obj.func() then python passes obj first argument func() . want like: [obj1, obj2].func() and have processed as: [obj1.func(), obj.func()] is there way of defining kind of methods in python? the way you're asking subclass python build-in class list . this should help. ps: bad thing though.

android - how to convert whole content of scrollview to bitmap -

i trying convert scrollview bitmap , bitmap returns null. don't know how manage, please give me solution achieve this. want whole scrollview content bitmap in order create pdf afterwards. following code: @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_no_title); setcontentview(r.layout.activity_first__resume__screen); rlv = (relativelayout) findviewbyid(r.id.rltv_layout); rlt_layoutwhole = (relativelayout) findviewbyid(r.id.rlv_whole); srvw = (scrollview) findviewbyid(r.id.scrollview1); // view u = ((activity) mcontext).findviewbyid(r.id.scrollview1); random rnd = new random(); int prevtextviewid = 0; relativelayout.layoutparams params1 = new relativelayout.layoutparams( layoutparams.wrap_content, layoutparams.wrap_content); (int = 0; < 15; i++) { final textview ...