Posts

javascript - Show content on certain URL -

javascript - Show content on certain URL - i using online store solution allows me set simple online shop. cannot utilize code other html/css/javascript. i have set in simple image-slider in template. want slider shown on frontpage. shown on every-page. can utilize javascript functions says this: "if url "www.example.com" show image-slider else hide it." something maybe? <script> $(function() { if(document.url == "http://example.com/") { ... ... </script> thanks on beforehand :) i don't know exact circumstances of you're trying or why you'd need it, but if (location.href == "http://example.com") should it. location.href returns url of page, "document.url" in example. if you're looking parts of url, cool tip found here. var parser = document.createelement('a'); parser.href = "http://example.com:3000/pathname/?search=test#hash"; parser.hostname; ...

java - How to read Android crash log? -

java - How to read Android crash log? - i have published first android app on google play store few days ago. crash log available in developer console , trying find out caused crash. although un-obfuscated stack trace have difficulties understand crash log: java.lang.runtimeexception: unable start activity componentinfo{com.example.myapp/com.example.myapp.ui.addresseditor.addresseditoractivity}: java.lang.nullpointerexception @ android.app.activitythread.performlaunchactivity(activitythread.java:2184) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2233) @ android.app.activitythread.access$800(activitythread.java:135) @ android.app.activitythread$h.handlemessage(activitythread.java:1196) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:136) @ android.app.activitythread.main(activitythread.java:5001) @ java.lang.reflect.method.invokenative(native method) @ java.lang.reflect.method.invoke(method.java:515) @ com.andr...

git - Deploying a NodeJS App to Azure Websites fails on installing NPM packages from pagages.json from deploy.cmd? -

git - Deploying a NodeJS App to Azure Websites fails on installing NPM packages from pagages.json from deploy.cmd? - i'm trying force local git repository azure website using .deployment & deploy.cmd. the problem when script tries install npm packages fails after half installed. have tried lot of things can't work. i appriciate if of have thought of why not working? this code: package.json { "name": "api", "private": true, "version": "0.1.0", "description": "backend api", "keywords": [], "main": "app.js", "repository": "", "author": "frej (frej@example.com)", "license": "", "scripts": { "start": "node app.js", "debug": "node debug app.js" }, "devdependencies": { "grunt": "0.4.5", ...

R write function that calls plot() first time and points() on subsequent calls -

R write function that calls plot() first time and points() on subsequent calls - i wondering if possible encapsulate behavior in single function. have next code qq-plot of p-values adapted http://gettinggeneticsdone.blogspot.ca/2010/07/qq-plots-of-p-values-in-r-using-base.html i trying first time plot figure series labels , reddish line on y=x axis, , on subsequent calls add together additional points different info frames using color specified. however, none of behavior expected. if don't explicitly set par(new=true) sec phone call ggd.qqplot() overwrite first. if explicitly phone call 2 plots super-imposed on each other (not points axes, etc). right check should doing in if statement... if possible. ggd.qqplot = function(pvector, color="black", main=null, ...) { o = -log10(sort(pvector,decreasing=f)) e = -log10( 1:length(o)/length(o) ) if(par()$new) { points(e,o,cex=1, col=color) } else { par(new=true); plot(e,o,pc...

date - Python convert epoch time to day of the week -

date - Python convert epoch time to day of the week - how can in python? want day of week returned. >>> convert_epoch_time_to_day_of_the_week(epoch_time_in_miliseconds) >>> 'tuesday' ep = 1412673904406 datetime import datetime print datetime.fromtimestamp(ep/1000).strftime("%a") tuesday def ep_to_day(ep): homecoming datetime.fromtimestamp(ep/1000).strftime("%a") python date python-2.7 datetime time

javascript - Getting i is undefined in Console when use tag in custom view page using AdminTabStripEvent -

javascript - Getting i is undefined in Console when use <script> tag in custom view page using AdminTabStripEvent - i using nopcommerce 3.40 i have open custom tab , content plugin on client edit page using admintabstripcreated event . when utilize tag in custom tab content getting error "i undefined" jqueryvalidatemin.js in console my code in admintabstripcreated int customerid = convert.toint32(system.web.httpcontext.current.request.requestcontext.routedata.values["id"]); string url = "/controller/actionname?id=" + customerid; var sb = new stringbuilder(); sb.append("<style type=\"text/css\">"); sb.append(environment.newline); sb.append(".k-link {font-weight: bold;}"); sb.append(environment.newline); sb.append("</style>"); ...

java - How to display output in servlet when invoking a method dynamically -

java - How to display output in servlet when invoking a method dynamically - i trying dynamically load class , invoke 1 of methods servlet. in servlet have next code : printwriter out = response.getwriter(); seek { class<?> obj = class.forname(myclassname); method method = obj.getclass().getmethod(mymethodname); string returnvalue = (string) method.invoke(obj, null); out.println(returnvalue); } catch(exception e){} and in class have : public class studentclass { public string index() { homecoming "this studentclass"; } } the problem when run application not display anything. expecting this studentclass output , index method of class returning. could please tell me how solve problem? your invoke usage wrong: class<?> obj = class.forname(myclassname); // homecoming class, not instance method method = obj.getclass().getmethod(mymethodname); string returnvalue = (string) method...