Posts

angularjs - Give public privilege to login.html page with spring security -

Image
i integrated angularjs template ( sb admin angular ) spring boot front-end application (the output of 'grunt built' command ). trying set login.html page privileges public. code used (not working) @configuration @order(securityproperties.access_override_order) public class websecurityconfig extends websecurityconfigureradapter { @override protected void configure(httpsecurity http) throws exception { http .httpbasic().and().authorizerequests() .antmatchers("/","/index.html","/views/pages/login.html") .permitall().anyrequest().authenticated(); } } whenever go http://localhost:8080/#/login browser's window shows telling me spring boot demands username , pass. need know mistake did. this project structure again, if ever wanted explore template , see how ui-router used in template : http://startangular.com/product/sb-admin-angular-theme/ npm install grunt build cre...

java - Return an array of strings containing all sub-sequences for s (except the empty string) ordered lexicographically? -

i need code (or snippet of code following problem or hint on how solve): a sub sequence of string s obtained deleting 1 or more characters s. set of sub sequences string s = abc a, ab, ac, abc, b, bc, c, , empty string (which sub sequence of strings). find possible sub sequences s , print them in lexicographic order. this have come out it's not working: treeset<string> ls = new treeset<>(); for(int i=0;i<s.length();i++) { for(int j=i;j<s.length();j++) { stringbuffer sb = new stringbuffer(); for(int k=i;k<j+1;k++) { sb.append(s.charat(k)); } ls.add(sb.tostring()); } } return ls.toarray(new string[ls.size()]); result: testcase : abc output: ab abc b bc c expected output: ab abc ac b bc c your code looks substrings , consecutive sequences of characters original string. however, "ac" taken non -conse...

MvvmLight template for C# WPF project -

i have created new wpf application project in microsoft visual studio express 2015 windows desktop , added nuget package 'mvvmlight' solution. created 1 folder called 'viewmodel' according http://www.dotnetcurry.com/wpf/1037/mvvm-light-wpf-model-view-viewmodel should have created 4 folders ('design','model','skins','viewmodel'). 1 i've installed wrong/incomplete in way? i'm after decent mvvm model wpf application. from link, following steps stated: step 1: open visual studio , create wpf application , name ‘wpf_mvvmlight_crud’. project, add mvvm light libraries using nuget package discussed in installation section. the project add necessary libraries , ‘viewmodel’ folder... step 2: in project, add new folder name ‘model’ . in folder, add new ado.net entity data model... step 3: add new folder called ‘services’ , in folder , add class file following... and on. means folder adds viewmode...

asp.net - Use database objects created in SQL Server Management Studio in Visual Studio instead -

i building website using asp.net development. i performed database tasks (tables, user-defined functions, stored procedures) using sql server management studio. now, continue use database stuff have created website in visual studio. how do that? to give example, have created stored procedure (that works tables , scalar valued function) in ssms requires user input start , end date. in visual studio, have created webpage asks user start , end date. "transfer" above mentioned stored procedure (together tables , scalar valued functions) visual studio can use user input query stored procedure. i using following: visual studio 2010, ssms 2008 as per explanation understand want create webpage intract sql server database, below 1 example in portal connect sql server visual studio stored procedure. database created in sql server management studios cannot found visual studio 2010 http://www.aspsnippets.com/articles/select-sql-server-stored-procedures-using-a...

mysql - mysqli_insert_id is not working on php OOP method -

i testing function of getting last auto_increment_id using mysqli_insert_id . feel quite confuse when find out if use 2 different methods, results different. method 1 <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "mydb"; // create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // check connection if (!$conn) { die("connection failed: " . mysqli_connect_error()); } $sql = "insert item(uid,item_id,item_name,item_price,item_quantity) values('1','0','hhh','23','23');"; if (mysqli_query($conn, $sql)) { $last_id = mysqli_insert_id($conn); echo "new record created successfully. last inserted id is: " . $last_id; } else { echo "error: " . $sql . "<br>" . mysqli_error($conn); } mysqli_close($conn); ?> this procedural way working can last id. ...

objective c - How to troubleshoot iOS background app fetch not working? -

Image
i trying ios background app fetch work in app. while testing in xcode works, when running on device doesn't! my test device running ios 9.3.5 (my deployment target 7.1) i have enabled "background fetch" under "background modes" under "capabilities" on target in xcode in application:didfinishlaunchingwithoptions have tried various intervals setminimumbackgroundfetchinterval, including uiapplicationbackgroundfetchintervalminimum - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { // tell system want background fetch //[application setminimumbackgroundfetchinterval:3600]; // 60 minutes [application setminimumbackgroundfetchinterval:uiapplicationbackgroundfetchintervalminimum]; //[application setminimumbackgroundfetchinterval:1800]; // 30 minutes return yes; } i have implemented application:performfetchwithcompletionhandler void (^fetchcompletionhandler)(ui...

android - KSOAP stop running at transport.call() method -

i having situation ksoap2 stopping @ transport.call() method. i not able find solution after searching hope. i know transport.call() has stopped because log shows to: log.i(tag, "start4"); thank help. here's more current code: @override protected void oncreate(bundle savedinstancestate) { log.i(tag, "begining"); super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); tele = (textview) findviewbyid(r.id.tele); request res = new request(); log.i(tag, "start"); //try{ log.i(tag, "before soapobject"); soapobject request = new soapobject(namespace, method_name); log.i(tag, "start1"); soapserializationenvelope soapenvelope = new soapserializationenvelope(soapenvelope.ver11); log.i(tag, "start2"); soapenvelope.dotnet = false; log.i(tag, "start3"); soapenvelope.setoutputsoapobject(request); httptran...