Posts

IdentityServer3 with EF support and Asp.NEt Identity -

i planning use identityserver3 identityserver3.entityframework clients,scopes , operationaldata. , want configure user store using identityserver3.aspnetidentity what recommendation here? okay have single database clients, scopes, operational data , asp.net identity? there issue ef migration if have asp.net identity tables in same database? or should create seprate database 1 identityserver3.entityframework , asp.net identity? i want configure users per client, not sure supported identityserver3 i not know if there issue combining database did 2 databases working. in case not using migrations , using modified ef datastore users info. not recall exact details did have mess of configuration working. right see scopes , clients working me, roles created own authorize attribute solve "what kind of token has roles" thing never understood way. experience has been 1 of trail , error seems there no 1 simple path in making oauth / oidc work. not fault of identit...

how can i access the elements of array which is located in a value of associative array in php -

i have array holds data returned sql query $user = $stmt->fetch(pdo::fetch_assoc); $user["username"] = "username1"; $user["password"] = "password1"; i have associative array $user array saved value of key: return array("invalid credentials:"=>"false", "credentials"=>$user); my question how can access values($user) of "credentials" key have tried $user["credentials"] => "username"; not work you can access value of multidimentional array stacking keys in brackets; so if function returned array you've created $arr $arr = somefunction(); // whatever function you're calling named $username = $arr['credentials']['username']; hope helps.

ios - Hit json url link to check any new data after a certain time in objective c -

i need hit json url every 1 week check new data.i tried way. first take lunching time in milisecond , save in plist, - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { long currenttime = (long)(nstimeinterval)([[nsdate date] timeintervalsince1970]); nsdictionary * dict =[nsmutabledictionary new]; paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); documentsdirectory = [paths objectatindex:0]; path = [documentsdirectory stringbyappendingpathcomponent:@"time.plist"]; [dict setvalue:[nsnumber numberwithlong:currenttime] forkey:@"count"]; [dict writetofile:path atomically:yes]; } then check in background .if 7 days gone,i fire timer hit json url. - (void)applicationdidenterbackground:(uiapplication *)application { paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); documentsdirectory = [paths objec...

java - Retrieve query execution plan text from a MSSQL server using JDBC -

i have following java method returning statement itself. how can retrieve mssql query execution plan text using jdbc? public string explainstatementmssql(string sqlstatement) { connection connection = null; statement statement = null; resultset rs = null; stringbuilder output = new stringbuilder(); try { connection = utilities.getconnection(); connection.setautocommit(false); statement = connection.createstatement(); statement.execute("set showplan_text on"); statement.executequery(sqlstatement); rs = statement.getresultset(); while (rs.next()) { output.append(rs.getstring(1)).append("\n"); } statement.execute("set showplan_text off"); connection.commit(); } catch (exception e) { e.printstacktrace(); } { utilities.close(rs, statement, connection); } return output.tostring(); } environment: java -version java version ...

jquery - How do i stop duplicate entrys on a modal dialog -

what best way avoid user entering same record twice. have following in plugin jquery(document).ready(function(){ jquery("#submit").click(function(){ var points = jquery("#points]").val(); jquery.ajax({ type: 'post', url: myajax.ajaxurl, data: {"action": "updateredeempoints", "points":points}, success: function(data){ alert(data); } }); }); my function posting want stop inserting db twice should produce friendly looking message box javascript default or possible use bootstrap notifications this. wp_localize_script( 'gogreen', 'myajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php'))); function updateredeempoints(){ $userid = get_current_user_id(); $mykey = 'player_id'; $single = true; $playerid = get_user_meta( $userid, $mykey, $single ); $points=$_post['points'];...

c# - Using AppDomainSetup.ShadowCopyDirectories in IIS -

i've got ton of dlls used website. of them never change, change 1 of them. every time site down 5 minutes while iis restarts. i'd reduce this. i've read shadow copying being slow when have lot of dll files i'd disable in cases, want use on modified dll can change without having stop iis. the documentation on shadow copying seems presume setting before appdomain created, iis handles creation of appdomain don't know how use appdomainsetup.shadowcopydirectories property tell not shadow copying in main /bin folder , shadow copy things in /bin/changesfrequently folder. can set in web.config somehow? there way run c# code in iis before shadowcopy process starts?

html - Uneven table cells when changing display none -

i having trouble html tables when hide , show rows using javascript (display:block). need hide rows through javascript when re-show rows, find table grid layout lost , hidden row collapsed left side of grid. my sandbox code follows: <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> table { } .rowa { background-color: #70cdb3; } .rowb { background-color: #fff1dc; } .rowc { background-color: #edc7ff; } .cell { border: solid 3pt white; width:25%; } { cursor: pointer; } </style> <script type='text/javascript'> function hide(elemid) { var elem=document.getelementbyid(elemid); elem.style.display='none'; } function show(elemid) { ...