Posts

redirect - Identify the postback from a ASP.NET Login control -

i have <asp:wizard> applicable logged-out user. if user logged in, he/she redirected page. on 1 of wizard steps, part of wizard, ask credentials via <asp:login> control , log in user. presents problem. according msdn : "when user uses login control log in web site, data in view state , post data lost. not perform actions in loggedin event rely on view state." because of this, wizard control forgets step it's on after login process. msdn recommends : "if embed login control in wizardstep object, explicitly set activestepindex property in page_load event handler if user authenticated. wizard control not automatically advance next wizardstep object in scenario." however, because view state lost, redirect logged-in users kicks in, sending user away page. what's best way determine, @ page load, of states user in? already logged in time ago; needs redirected. was logged in inside wizard; needs reach next wizard step. thanks ideas. ...

In HTML5, is the <form> element a sectioning element, like <section>? -

in html5, elements (like <section> , <article> ) create new sectioning context in document‘s outline, per outlining algorithm. this means can use <h1> top-level heading inside them without screwing document’s generated outline. does <form> element create sectioning context? no, because it’s not sectioning content . following elements sectioning content: <article> <aside> <nav> <section> however, <fieldset> element sectioning root . means creates new sectioning context (like sectioning content element), but headings , sections within don’t contribute outlines of ancestors. so can blindly use <h1> inside <fieldset> element without screwing document’s outline. sectioning roots are: <blockquote> <body> <details> <dialog> <fieldset> <figure> <td> see http://dev.w3.org/html5/spec/overview.html#headings-and-sections full description , ex...

tsql - sql server agent proxy account -

i trying use proxy account non sysadmin grant them exec permission on xp_cmdshell. did is: use [master] go create credential [proxyaccount] identity = n'domain\user', secret = n'password' go use [master] go create credential [proxyaccount] identity = n'domain\user', secret = n'password' go use [msdb] go exec msdb.dbo.sp_add_proxy @proxy_name=n'myproxy',@credential_name=n'proxyaccount', @enabled=1 go exec msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=n'myproxy', @subsystem_id=2 go exec msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=n'myproxy', @subsystem_id=3 go exec msdb.dbo.sp_grant_proxy_to_subsystem @proxy_name=n'myproxy', @subsystem_id=11 go but still when user tries do xp_cmdshell 'dir c:' it gives following error: msg 229, level 14, state 5, procedure xp_cmdshell, line 1 execute permission denied on object 'xp_cmdshell', database 'mssqlsystemresource...

statistics - Tukey five number summary in Python -

i have been unable find function in of standard packages, wrote 1 below. before throwing toward cheeseshop, however, know of published version? alternatively, please suggest improvements. thanks. def fivenum(v): """returns tukey's 5 number summary (minimum, lower-hinge, median, upper-hinge, maximum) input vector, list or array of numbers based on 1.5 times interquartile distance""" import numpy np scipy.stats import scoreatpercentile try: np.sum(v) except typeerror: print('error: must provide list or array of numbers') q1 = scoreatpercentile(v,25) q3 = scoreatpercentile(v,75) iqd = q3-q1 md = np.median(v) whisker = 1.5*iqd return np.min(v), md-whisker, md, md+whisker, np.max(v), pandas series , dataframe have describe method, similar r 's summary : in [3]: import numpy np in [4]: import pandas pd in [5]: s = pd.series(np.random.rand(100)) in [6]: s.describe(...

Simple C++ project issue with XCode -

i setting c++ project in xcode , seems not recognize classes. default, there main.cpp file in source folder. i added node.cpp , node.h file folder, , included node.h in main.cpp file. unfortunately, it's not recognizing it, says no such file or directory. why not linking? how did include node.h in main.cpp? #include <node.h> will not work, have use #include "node.h"

Shell application in Vim window -

i'm searching way start console application in vim window. open python & php interactive shell in it. handy. i want :10 sp !python try conque shell plugin . sounds you're looking for.

Determine the Internal Path Length of a Tree (C++) -

well i'm down last function of program , i'm done. i've hit stump can't seem fix on own. int tree::internalpathlength(node * r, int value) { if(r->left == null && r->right == null) { return 0; } return value + internalpathlength(r->left, value+1) + internalpathlength(r->right, value+1); } i feel i'm close solution, know i'm missing something. think it's if statement , i've tried different combinations end getting crashed program or 0 answer. any suggestions or appreciated ! thanks! may works: int tree::internalpathlength(node * r, int value) { if(r->left == null && r->right == null) { return 0; } return value + ( r->left? internalpathlength(r->left, value+1):0 ) + ( r->right? internalpathlength(r->right, value+1):0 ); } or add null check node int tree::internalpathlength(node * r, int value) { if (r == nul...