Posts

java - spring security oauth2 (2.0.8) getting Invalid access token used InMemory tokenstore -

trying implement spring security oauth2 in application. i able access token , refresh token using : http://localhost:8080/xapp/oauth/token?username=user1&password=password&grant_type=password&client_id=xapp&client_secret=xapp { "access_token": "798c7e71-983b-4137-a0cb-ceae4e9b4190" "token_type": "bearer" "refresh_token": "0752b8ff-5086-4457-918d-54376c7a2bec" "expires_in": 299 "scope": "read trust write" } when i'm trying access protected resource using below url http://localhost:8080/xapp/data/product/api/index/?access_token=798c7e71-983b-4137-a0cb-ceae4e9b4190 i getting: { "error": "invalid_token" "error_description": "invalid access token: db48214c-04d7-4d6b-aa34-6d16c9c2a438" } applicationcontext-security.xml : <?xml version="1.0" encoding="utf-8"?> ...

java - android multiple upload image error -

Image
i got error when tried upload of images. use "for" loop process, still got error in looping. if don't use for, still can upload image 1 image uploaded. how can solve this? uploadactivity.java intent intent = getintent(); filepath = intent.getstringextra("filepath"); arraylist<string> flpath = new arraylist<string>(); sharedpreferences prefs = getsharedpreferences("savedfilepathsjsonarray", context.mode_private); string myjsonarraystring = prefs.getstring("savedfilepathsjsonarray", ""); if (!myjsonarraystring.isempty()) { jsonarray jsonarray = null; try { jsonarray = new jsonarray(myjsonarraystring); } catch (jsonexception e) { // todo auto-generated catch block e.printstacktrace(); } (int = 0; < jsonarray.length(); i++) { try { flpath.add(jsonarray.get(i).tostrin...

How to disable 'Download Complete' notification using selenium Webdriver -

i using selenium automate functionality on webpage. downloading files using selenium. download completes, can see pop notification on web page download complete. enter image description here kindly suggest using selenium, can remove pop notification? i setting following firefox profile: firefoxprofile firefoxprofile = new firefoxprofile(); firefoxprofile.setpreference("browser.download.folderlist", 2); firefoxprofile.setpreference("browser.download.manager.showwhenstarting", false); firefoxprofile.setpreference("browser.download.manager.usewindow", false); firefoxprofile.setpreference("browser.download.manager.showalertoncomplete", false); firefoxprofile.setpreference("browser.download.manager.closewhendone", true); firefoxprofile.setpreference("browser.download.dir", downlodelocation); firefoxprofile.setpreference("browser.helperapps.neverask.openfile", "application...

pointers - wrong address value being passed to function in C -

this similar incorrect pointer value passed c function there doesn't appear answer. i have struct, called bigint , has fields char sign , size_t len , uint32_t *val . bigint s initialized bigint_init() function allocates memory uint32_t array, sets default values, etc. i have function, void bigint_subtract(bigint a, bigint b, bigint *diff) stores a-b in diff . have tested function previously, follows: bigint test = bigint_inithex("4567890987654345678987654adbfcaedcfaaebfc625213"); bigint test2 = bigint_inithex("acbefabedfc13271723976aebdfcabefc12837618237"); bigint diff = bigint_init(); bigint_subtract(test,test2,&diff); printf("0x%s - 0x%s == 0x%s\n\n",bigint_tohex(test), bigint_tohex(test2),bigint_tohex(diff)); among numerous other tests edge cases, varying lengths, etc. tests check out. now, in function, void bigint_egcd(bigint a, bigint b, bigint c, bigint *x, bigint *y); it's extended euclidean algorithm. in main loop ...

angularjs html5 mode pretty url not working -

i doing angularjs application generated web storm. tried use html5 model pretty url (without # on url).it not working.the url # working fine. here workouts app.js var app = angular.module('myapp', [ 'ngroute', 'ngcookies', 'myapp.login', 'myapp.services', 'myapp.authenticationservice', 'headroom', 'angular-loading-bar', 'angularsoundmanager', 'updatemeta' ]). config(['$routeprovider','$locationprovider', function ($routeprovider,$locationprovider) { $routeprovider.when('/login', {templateurl: 'user/login.html', controller: 'loginctrl'}); $routeprovider.when('/view2', {templateurl: 'partials/partial2.html', controller: 'myctrl2'}); $routeprovider.otherwise({redirectto: '/login'}); // configure html5 links working on node-webkit if(window.history &...

Java String internal representation -

i understand internal representation of java string utf-16. java string representation? also, know in utf-16 string, each 'character' encoded 1 or 2 16-bit code units. however, when debug following java code string hello = "hello"; the variable hello array of 5 bytes 0x48, 0x101, 0x108, 0x108, 0x111 ascii "hello". how can be? i took gcore dump of mini java process code: class hi { public static void main(string args[]) { string hello = "hello"; try { thread.sleep(60_000); } catch (interruptedexception e) { e.printstacktrace(); } } } and did gcore memory dump on ubuntu. (usign jps pid , passed gcore) if found this: 48 65 6c 6c 6f in dump using hexeditor, somewhere in memory ascii. but 48 00 65 00 6c 00 6c part of utf-16 representation of string

c# - Treeview IsExpanded not fires up -

i trying add treeview ability catch isexpanded event. when item expand raise property or command on view model. here code: <treeview name="scenariostreeview" itemssource="{binding path=cat, mode=twoway}" focusable="true" > <treeview.inputbindings> <keybinding key="delete" command="{binding deletecommand}" commandparameter="{binding selectedvalue ,elementname=scenariostreeview}" /> </treeview.inputbindings> <treeview.itemcontainerstyle> <style targettype="{x:type treeviewitem}"> <setter property="isexpanded" value="{binding isextended, mode=twoway}" /> <setter property="isselected" value="{binding isselected, mode=twoway}"/> </style> </treeview.itemcontainerstyle> <treeview.resources> <hierarchicaldatatemplate datatype="...