Posts

java - Same Form based authentication for two applications Using Spring Security -

we have existing legacy web application(servlet+jsp+spring+hibernate) , going develop new features of application using new stack (angularjs+spring mvc). suggested approach register new servlet , develop new features in same codebase, authenticated users have access new functionality develop in system. there better way of doing 2 different web applications (without sso) ? can 2 web applications secured under same form based authentication settings ? i think architecture , security usability important before dive something. if both apps use same login, assume newer application more service oriented application. ex: restful authorization may issue. ex: legacy app used user set a, new 1 used both user set , b. otherwise can use shared database example mongodb store login info i.e token. when log in, return token , use other service via angular client. when log out remove token user session. may need concern token expiration. however have refactor legacy system in som...

c# - WPF DataGrid - Modifing Visuals out of scroll view at runtime -

i have multiple datagrids first column has checkbox , header has checkbox. we've seen, want able click header checkbox , have select of check boxes below. <datagrid x:name="dgreporttypes_new" margin="10,140,0,0" height="175" verticalalignment="top" horizontalalignment="left" width="216" autogeneratecolumns="false" selectionmode="single" canuseraddrows="false" mouseup="datagrid_mouseup" keydown="datagrid_keydown"> <datagrid.columns> <datagridcheckboxcolumn isreadonly="true" binding="{binding ischecked, updatesourcetrigger=propertychanged}" clipboardcontentbinding="{x:null}"> <datagridcheckboxcolumn.headertemplate > <datatemplate> <checkbox x:name="chkselectall" isthreestate="true" checked="datagridh...

c++ - boost::circular_buffer<unique_ptr<T>>::set_capacity() fails to build -

i'm trying use boost::circular_buffer in code this: class eventregistry { public: eventregistry() { pendingevents_.set_capacity(max_pending_events); } private: boost::circular_buffer<boost::movelib::unique_ptr<eventdata>> pendingevents_; } however, i'm getting build failure (excerpted): ... boost/build/binaries/include/boost/circular_buffer/details.hpp:470:12: note: in instantiation of function template specialization 'boost::cb_details::uninitialized_move_if_noexcept_impl<boost::cb_details::iterator<boost::circular_buffer<boost::movelib::unique_ptr<appd::agent::eventdata, boost::movelib::default_delete<appd::agent::eventdata> >, std::allocator<boost::movelib::unique_ptr<appd::agent::eventdata, boost::movelib::default_delete<appd::agent::eventdata> > > >, boost::cb_details::nonconst_traits<boost::container::allocator_traits<std::allocator<boost::movelib::unique_ptr<appd::ag...

Android app crashes if I declare more than 3 Drawables -

i'm making simple dice app in android studio right , have 6 drawables each side of die. here code looks like: final drawable die1 = contextcompat.getdrawable(this, r.drawable.die1); final drawable die2 = contextcompat.getdrawable(this, r.drawable.die2); final drawable die3 = contextcompat.getdrawable(this, r.drawable.die3); final drawable die4 = contextcompat.getdrawable(this, r.drawable.die4); final drawable die5 = contextcompat.getdrawable(this, r.drawable.die5); final drawable die6 = contextcompat.getdrawable(this, r.drawable.die6); the app runs fine when 3 of drawables commented out, doesn't run in emulator if more 3 uncommented. tried fixing building apk , running app on phone, doesn't run if 1 of drawables uncommented. if are, app runs, it's blank screen. thanks help as outofmemory error, can use small size png images overcome outofmemory error. if want use existing images, can shrink images using tinypng online tool.

store google form responses in existing sheet of a spreadsheet -

i'm new google forms , spreadsheets. i know can create form, , send responses new sheet of google spreadsheet. wondering if possible store form responses in existing sheet of spreadsheet. this page seems indicate not, seems unnecessary. the form embedded in wordpress website.

python - PIL: Convert Bytearray to Image -

i trying verify bytearray image.open , image.verify() without writing disk first , open im = image.open() . looked @ .readfrombuffer() , .readfromstring() method, there need size of image (which when converting bytestream image). my read-function looks this: def readimage(path): bytes = bytearray() count = os.stat(path).st_size / 2 open(path, "rb") f: print "file opened" bytes = array('h') bytes.fromfile(f, count) return bytes then basic test try convert bytearray image: bytes = readimage(path+extension) im = image.open(stringio(bytes)) im.save(savepath) if knows doing wrong or if there more elegant way convert bytes image that'd me. p.s.: thought need bytearray because manipulations on bytes (glitch them images). did work, wanted without writing disk , opening imagefile disk again check if broken or not. edit: gives me ioerror: cannot identify image file if manipulate bytearrays , have use io.bytesio . can read...

javascript - Creating a categorical bar chart from csv file in c3.js -

Image
i have code simple bar chart using c3.js: <!doctype html> <html lang="en"> <head> <title>c3</title> <meta charset="utf-8" /> <link href="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.css" rel="stylesheet" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/c3/0.4.10/c3.min.js"></script> </head> <body> <div id="chart"></div> <script> var chart = c3.generate({ data: { url: 'data/output.csv' type: 'bar' } }); </script> </body> </html> the file output.csv looks this: a,b,c,d 25,50,75,100 and graph ends looking this: which of data in 1 group. what i'd want producing followin...