Posts

clojure - How to start immutant message queue? -

from immutant documentation @ http://immutant.org/documentation/current/apidoc/guide-installation.html : with dependencies in place, invoke immutant services app’s main entry point, identified :main key in project.clj . immutant's web service can invoked like: (ns my-app.handler ... (:require [immutant.web :as web]) ... ) (def app ... ) (defn -main [& args] (web/run app)) what's equivalent of (web/run app) immutant.messaging ? here answer start queue (ns my-project.name (:require [immutant.messaging :as msg])) (defn call-fn [args] (let [fun (ns-resolve "namespace fun defined" (symbol (first args))) params (rest args)] (if (seq params) (apply fun ) (fun)))) (msg/start "queue") (msg/respond "queue" (fn [args] (call-fn args))) to call queue say @(msg/request "queue" ["fun-name" params])

java - Input - Action Handling in LibGdx -

i'm making libgdx game exercise. pretty simple, "escape" kind of game. screens background, items , go left/right arrows. as libgdx makes easy, wandering if there easy method of handling actions. bunch of "if else" statements in onclick() method. fine, tens or houndreds of items messy , laggy when clicked. public void onclick(int scrx, int scry){ px = (scrx/vieww)*world_w; py = (scry/viewh)*world_h; if (px > 10 && px < 20 && py > 10 && py < 20) { if (stage.getinfo().getleft() == true) { gdx.app.log("click", "left"); stage = new stagegame(stage.getinfo().getleftstage()); } } else if(px > 80 && px < 90 && py > 10 && py < 20) { if (stage.getinfo().getright() == true) { gdx.app.log("click", "right"); stage = new stagegame(stage.getinfo().getrightstage()); ...

Animation for help overlay in Android Application -

Image
is possible create animations implement help layout android applications in figure : desired effect : hand image should move , point icon.then effect ripple created. how implement animations ? yes can using showcase view library github link, works pretty , customizable showcaseview

WebDriver: Why latest versions of Eclipse and Selenium Server is not compatible with latest version of Firefox -

i tried execute script in webdriver following latest versions of eclipse, selenium server , firefox, firefox gets executed , script not execute further: eclipse luna service release 2 (4.4.2) selenium jar selenium-server-standalone-2.45.0 firefox 36.0.4 , firefox 38 beta version however, when used firefox 32.0, scripts runs completely. what technical reason behind non-compatibility of latest firefox version latest eclipse , selenium jar? please see here in changelog. seems mozilla has rewritten of there apis not available selenium relied on this. changelog v2.45.0 important changes in release: native events in firefox relied on api mozilla no longer provides. such, fall synthesized events on recent firefox versions. i have been looking latest firefox version supported. other people have found same problem , rolling using v35.0.1 see here

view - iOS equivalent to Android registerActivityLifecycleCallbacks -

Image
i developed android app used application.registeractivitylifecyclecallbacks ( http://developer.android.com/reference/android/app/application.html ) know when each activity started , stopped , record analytics purposes. developing ios version , cannot find equivalent method monitor uiviewcontrollers or uiview displayed app. anybody has idea ? beginner on ios may not taking right approach, feel free suggest other ideas. edit after first answer felt should more precise. developing sdk other developers include in apps want impact of sdk on code small possible. i first thought doing baseactivity / baseuiviewcontroller developers have extend in activity / uiviewcontroller felt heavy , since both language don't allow multiple inheritance impact code. why registeractivitylifecyclecallbacks method great in android because have give me application or activity object. is there solution ios or have create basecontroller ? thank in advance. i've not run specifi...

model view controller - Is MVP a design pattern or an architectural pattern ? What about MvC and MvvM? -

after doing research on android patterns kept finding different answers. people start talking design pattern, architectural or architectural presentation patterns. i'm reaching conclusion architectural presentation pattern mvc architectural pattern while mvp & mvvm design pattern on same rank design pattern observer. correct? design pattern general reusable solution commonly occurring problem within given context. reside in domain of modules , interconnections. connected code. on other hand architectural patterns similar software design patterns have broader scope . describing overall pattern followed entire system. for me mvc, mvp , mvvm architectural patterns other architectural patterns may hear off (the list not exhaustive) : event driven architecture cqrs rest microservices soa pipe & filter architecture you can find examples on wiki : http://en.wikipedia.org/wiki/list_of_software_architecture_styles_and_patterns

login - follow a page redirect using rvest in R -

i new r , rvest. trying use these information website (www.medicinescomplete.com) allows sign in using athens academic login system. in browser, when click on athens login button transfers athens login form. after submitting user credentials form redirects browser original site logged in. i used submit_form() function submit credentials athens form , returns 200 code. however, r not follow redirect browser , if use jump_to() command return original site not logged in. suspect redirected link returned sign in page might contain log in credentials need not know how find link , send using rvest has worked out how log in via athens using rvest or has idea how make follow automatic redirect?? the code have used far (login credentials changed): library(rvest) library(magrittr) url <- "https://www.medicinescomplete.com/about/" mcsession <- html_session(url) mcsession <- jump_to(mcsession, "/mc/athens.htm? uri=https%3a%2f%2fwww.medicinescomplete.com%2fabo...