Posts

Accessing flash attributes in Spring Web flow -

i use, redirectattributes.addflashattribute("msg","level complete") to access message on redirected jsp. how can use redirect attribute when redirecting webflow ? when flash attribute used send data 1 controller webflow have bind redirected flash attribute (from controller) response jsp page of webflow. purpose can maintain backend formaction class bind value scope of webflow. in flow xml can can call custom method on entry of view state. custom method of formaction class public void setupreferencedata(requestcontext context) throws exception { httpservletrequest request = (httpservletrequest) context.getexternalcontext().getnativerequest(); map<string, ?> inputflashmap = requestcontextutils.getinputflashmap(request); if (inputflashmap != null) { string flash = (string) inputflashmap.get("flash"); context.getrequestscope().put("flash1", flash); } } this ...

AngularJS directive file upload with progress bar from AngularJS O'Reilly book -

i'm starting angularjs , following book o'reilly, angularjs. in there example of using file upload file upload blueimp. i can upload files, want show progress bar , can not access element contains during "progress" event. in declaration of directive have "element" access container element , once there, show div progress bar, progress event have no access "element" (one passed 2 arguments, e & data) during file upload can not show bar. have looked @ many examples used differently i'm doing so, not serve me. is possible pass "element" function runs on progress event? ecm_directives.directive('fileupload', function(){ return { restrict: 'a', scope: { done: '&', progress: '&', }, link: function(scope, element, attrs) { var optionsobj = { datatype: 'json' }; if (scope.done) { optionsobj.done = function(e, data) { scope.$ap...

c++ - How call method from Qt GUI in background worker thread using QThread -

i'm trying add gui in qt code recieving data vrpn server. , need continuously send data server application , call action(method) in interface when receive information. but have problem endless cycle while (running) . found solution use qthread recieving data server, can't figure out how use method qt class in worker when recieve data server. i tried make worker way, i'm not sure, how call method class when recieve data server (or if it's @ possible/or exist better way): #include "worker.h" #include <iostream> #include "vrpn_analog.h" void vrpn_callback vrpn_analog_callback(void* user_data, vrpn_analogcb analog) { (int = 0; < analog.num_channel; i++) { if (analog.channel[i] > 0) { there want call method nextimage(), have in qt class mainwindow } } } // --- constructor --- worker::worker() { } // --- deconstructor --- worker::~worker() { } // --- process -...

php - Pause the Flow-player once a JavaScript function is called. -

Image
i using flowplayer display videos in project. using following code: <a href="<?php echo base_url()?>secure/<?php echo $videos->videolink?>" class="fplayer" id="flowplayer"> </a> <script> $(document).ready(function() { $('div[id^="overlay_form"]').css({ left: ($(window).width() - $('div[id^="overlay_form"]').width()) / 2, top: ($(window).width() - $('div[id^="overlay_form"]').width()) / 7, position:'fixed' }); }); </script> <script> $f("flowplayer", "<?php echo base_url()?>js/flowplayer-3.2.18.swf", { clip: { autoplay : "true", autobuffering : "true", onstart: function() { //msgs.innerhtml += "common clip event listener called\n"; return true; }, onpause: function() { ...

c++ - How to use CGAL::triangulate_polyhedron -

i trying use undocumented function cgal::triangulate_polyhedron. receiving lots of error it. here simple code: #include <cgal/exact_predicates_exact_constructions_kernel_with_sqrt.h> #include <cgal/point_generators_3.h> #include <cgal/algorithm.h> #include <cgal/polyhedron_3.h> #include <cgal/convex_hull_3.h> #include <cgal/triangulate_polyhedron.h> #include <vector> typedef cgal::exact_predicates_exact_constructions_kernel_with_sqrt k; typedef cgal::polyhedron_3<k> polyhedron_3; typedef k::segment_3 segment_3; // define point creator typedef k::point_3 point_3; typedef cgal::creator_uniform_3<double, point_3> pointcreator; int main() { cgal::random_points_in_sphere_3<point_3, pointcreator> gen(100.0); // generate 250 points randomly on sphere of radius 100.0 // , copy them vector std::vector<point_3> points; cgal::cpp11::copy_n(gen, 250, std::back_inserter(points)); // define polyhedr...

html - how to stay image constant on hover -

here code using on page html <a href="#" class="bac" data-role="none" style="color:#fff;"> <strong>an&uacute;nciese gratis</strong> </a> css .bac{ background:url("http://wstation.inmomundo.com/static02/costarica/sprites_botones1.png"); background-repeat:no-repeat; display: block; font:15px/18px arial; height: 22px; padding: 6px 18px 4px 4px; text-decoration: none; margin-right:-4px; } .bac:hover{ background-attachment:scroll; background-position:0px -35px; background-image:url("http://wstation.inmomundo.com/static02/costarica/sprites_botones1.png"); background-repeat:no-repeat; height:22px; padding:6px 18px 4px 4px; } here demo http://jsfiddle.net/lc4ky/1/ (open in google chrome browser) when open in google chrome, on hover image going off second showing hover effect.the image going off first time on each refresh. want should stable.is there solution this? i not sur...

javascript/jQuery How do I reuse objects in an array for a particle system -

i'm in process of building entity system canvas game. started simple particle emitter/updater altering accommodate multi-particle/entity generator. whilst ok javascript/jquery running limits of experience concerns arrays , gratefully accept on following: when need new particle/entity current system calls function push object array contains variables entity updates. then update function runs loop on array, checking on type variable update particle (position/colour/etc...). [array.splice] particle, based on condition. when needed further particles/entities push new particles. what achieve here is: in makeparticle function, check on particle array "dead" particles , if available resuse them, or push new particle if not have created particlealive var flag purpose. var particles = []; var playing = false; function mousepressed(event) { playing = !playing; } if(playing) { makeparticle(1, 200, 200, 10, "blueflame"); makeparticle(1, 300, 200, 10, "r...