Posts

javascript - Framework7 <a href=""> not working -

i have simple <a> in page using framework7 follows: <li><a href="https://www.google.com/"><img src="images/icons/black/users.png" alt="" title="" /><span>go google/span></a></li> but when click on not redirecting google page. have checked console , shows follows: xmlhttprequest cannot load https://www.google.com/. no 'access-control-allow-origin' header present on requested resource. origin 'http://localhost:8080' therefore not allowed access. framework7.js:12307 xhr failed loading: "https://www.google.com/".$.ajax @ framework7.js:12307app.get @ framework7.js:1652app.router.load @ framework7.js:2648load @ framework7.js:636handleclicks @ framework7.js:7573handleliveevent @ framework7.js:11488 i new framework7 . have purchased template development. you want redirect external website, add external class a href , working properly <li><a href=...

Integrate single sign on using spring security oauth -

i working on application guarding few rest apis spring security oauth2.the authentication works fine.now want implement single sign on feature each account.that once user login using credential 1 device not possible login same use user other device.that @ time 1 login allowed user.if wants login in device should logout login device.how in spring security oauth.below codes. spring-security.xml : <?xml version="1.0" encoding="utf-8" ?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:oauth="http://www.springframework.org/schema/security/oauth2" xmlns:context="http://www.springframework.org/schema/context" xmlns:sec="http://www.springframework.org/schema/security" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemalocation="http://www.springframework.o...

sql - store 50000 records per month -

i'm working on hr system. need store information 50000 employees every month. (same employees repeated next month changes data job or compensation changes) best approach store such data. better save in single table or save data new table every month. i need show reports based on period of time jan may. in case if i'm using separate tables each month feasible run query on this. possible pass table name in variable. you can store in single table. conventional dbms can handle such amount of data. designed store , access millions of records @ time. no worries.

java - IntelliJ - Select source code location while debugging -

i'm trying step jdk source, versions of local jdk , remote jdk different, hence line numbers not match. have downloaded sources of remote jdk, can't find out how tell intellij use them. how can tell intellij use specific jdk sources debugging? you can set jdk based on this: https://www.jetbrains.com/help/idea/2016.2/configuring-global-project-and-module-sdks.html to configure project sdk open project structure dialog (e.g. ctrl+shift+alt+s). in left-hand pane, under project settings, click project. on page opens in right-hand part of dialog, select necessary sdk project sdk list. if desired sdk not present in list, click new , select necessary sdk type. in dialog opens, select sdk home directory , click ok. result, new sdk added intellij idea , selected project sdk. view or edit sdk name , contents, click edit. (the sdk page open.) click ok in project structure dialog. configure module sdk open project structure di...

progressdialog - Getting error in Progress Dialog in android? -

i have mainactivity adds fragment "a",in fragment"a" sending server request using volley.i had made class known dialogutil contain progress dialog implementation.problem when launch app shows error in progress dialog implementation in fragment "a".that java.lang.illegalargumentexception: view=com.android.internal.policy.impl.phonewindow$decorview{42759d68 v.e..... r......d 0,0-456,144} not attached window manager , becomes force close. dialogutil class code:- public class dialogutils { public static progressdialog showprogressdialog(context context, string message) { progressdialog m_dialog = new progressdialog(context); m_dialog.setmessage(message); m_dialog.setprogressstyle(progressdialog.style_spinner); m_dialog.setcancelable(false); m_dialog.show(); return m_dialog; } } progress dialog implementation in fragment "a" m_dialog = dialogutils.showprogressdialog(ge...

javascript - Hide part of the text returned from the server -

on webpage want hide part of text in object returned server.for example: <div> <h4>{{name.subname}}</h4> </div> the string returned {{name.subname}} contains name followed text within brackets, "sample name(xyz)". want able hide appearing within brackets i.e. (xyz) in case. suggestions on how can make work? upon returning server, add function object returns intended format, $.get('example', function(name){ name.cleansubname = function(){ this.subname.replace(/\([^)]+\)/, "") } }); and use in template like, <h4>{{name.cleansubname()}}</h4> regex borrowed @rohan kumar :) hope helps.

date - DAX compare two years YTD -

Image
i need compare data year data last year. customer wants switch between full year , year-to-date comparison. full year have, year-to-date want see how going compared data today last year e.g.: full data jan 2016 - 24. aug (today) compared jan 2015 - 24. aug 2015. how implement in dax? i'm using in power bi. supposing have measure called [sales], calculated fact table, , dates table, can write 2 new measures compare data year , previous: sales ytd = calculate ( [sales]; datesytd ( 'dates'[date] ) ) sales py ytd = calculate ( [sales]; dateadd ( datesytd ( 'dates'[date] ); -1; year ) ) putting in matrix visualization, give following: please remember have 'dates' relationship sales table correctly configured in order have time intelligence calculations done right. can find more info here .