Posts

javascript - Trying to redirect to the same page but with querystring value -

i want redirect same page, add querystring values. if there querystring value, want strip out , add new one. my code isn't working currently, not sure why: var url = window.location.href; if(url.indexof("?") > 0) { url = url.substring(0, url.indexof("?")); } else { url += "?joined=true"; } window.location.replace(url); the problem you're not adding new query string when strip off old one, in else clause when there's no old query string. take addition out of else , time. var url = window.location.href; if(url.indexof("?") > 0) { url = url.substring(0, url.indexof("?")); } url += "?joined=true"; window.location.replace(url);

How to programmatically tell `Spring Boot` to load configuration files from `custom location` when doing JUNIT Test -

how programmatically tell spring boot load configuration yaml files custom location when doing junit test. in program, use properties of springapplicationbuilder specify custom yaml file . @configuration @springbootapplication @componentscan public class samplewebapplication { public static void main(string[] args) { configurableapplicationcontext applicationcontext = new springapplicationbuilder(samplewebapplication.class) .properties("spring.config.name:application,conf", "spring.config.location=classpath:/viaenvironment.yaml") .build().run(args); configurableenvironment environment = applicationcontext.getenvironment(); system.out.println(environment.getproperty("app.name")); } } when doing junit test, how should configure it? i'm using spring boot 1.5.1 . please use option set spring.config.location through @testpropertysource: @testpropertysource(properties = { "sprin...

Azure AD Graph API and Microdoft Graph API -

i observing latency audit events in azure ad (via reporting api of azure ad graph api) running 90-180 mins range. know if behavior observing consistent other users/customers. , in case, indeed technical problem @ microsoft end, know if temporary issue , relevant team working on it. there reason ask question. observe direction microsoft instead go microsoft graph api ( strong recommendation, see note on page  https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-graph-api ). so, in light of this, strong recommendation, know if latency issue on azure ad graph api (reporting api), fixed in near future there less focus on azure ad graph api now? regarding microsoft graph api itself, have few questions. 1) know if supports audit events on ad? if yes, can please guide on how work on prototype? 2) if answer above question yes, know if there going latency issue here well? if yes, know range of latency talking here?

php - Accessing wordpress multisite without www. sets the site url multiple times in browser bar -

when access domain: www.example.com without www. site automatically loop site url multiple times in browser bar. in browser bar before hitting enter: example.com after hitting enter: www.example.com/www.example.com/www.example.com/www.example.com/www.example.com/www.example.com/www.example.com/www.example.com/www.example.com/www.example.com/ this works fine: www.example.com i've set wordpress multisite network 3 domains. i have code in wp-config.php file define('wp_allow_multisite', true); define('multisite', true); define('subdomain_install', true); define('domain_current_site', 'www.example.com'); define('path_current_site', '/'); define('site_id_current_site', 1); define('blog_id_current_site', 1); define('noblogredirect', 'www.example.com/'); /* had set because redirected login page every time */ define('admin_cookie_path', '/'); define(...

php - Chat box Scroll to Down always to last line -

i new jo jquery php , sql programmer. have created custom chat system in newely created website. now, working good. wish keep scroll last message always. have tried many codes stackoverflow. no 1 working. found 1 code works perfect. want make bit change in it. if can me here code is window.setinterval(function() { var elem = document.getelementbyid('chat'); elem.scrolltop = elem.scrollheight; }, 1000); this working perfect me. puts user bottom scroll , keep automatically scrolling down time interval of 1 second. but issue facing when want read old messages scroll top manually. not allowing me so. keeps self bottom. please 1 can make changes in if manually scroll up, auto scroll stop. hope soon

android - FirebaseDatabaseException: Cant convert object of type java lang long to type -

found in stack trace, problem? can this. trying retrieve object firebase using recyclerview. my logcat com.google.firebase.database.databaseexception: can't convert object of type java.lang.long type ysy.spreadsheet.databaseview @ com.google.android.gms.internal.zzbqi.zze(unknown source) @ com.google.android.gms.internal.zzbqi.zzb(unknown source) @ com.google.android.gms.internal.zzbqi.zza(unknown source) @ com.google.firebase.database.datasnapshot.getvalue(unknown source) @ com.firebase.ui.database.firebaserecycleradapter.parsesnapshot(firebaserecycleradapter.java:151) my structure public class databaseview { private integer bodytemp; private integ...

php - Sylius/Payum/Stripe config error "boolean sandbox option must be set" -

i have set stripe gateway, when try submit payment user, error, "the boolean sandbox option must set." not error paypal, stripe. here relevant config.yml entries: payum: gateways: paypal_express_checkout: factory: "paypal_express_checkout" payum.http_client: "@sylius.payum.http_client" username: "%paypal.express_checkout.username%" password: "%paypal.express_checkout.password%" signature: "%paypal.express_checkout.signature%" sandbox: true stripe: factory: stripe_checkout publishable_key: pk_test_1uyhcw3tydyjdxylvagprmkh secret_key: sk_test_81j9puwh2ftnrogotik0hjlb sandbox: true sylius_payment: driver: doctrine/orm gateways: stripe: stripe what doing wrong? (also, not real keys) there typo in paypal section of parameters.yml file. guess breaking conf...