i using rabbitmq messaging service send messages. want dequeue messages sent on scheduled basis , stop dequeuing messages after 2 minutes, can dequeue them on next scheduled time. thanks, r. venkatesan looks time-to-live extensions want. setting per-queue ttl 2 minutes dead-letter messages published more 2 minutes ago.
i cant find anywhere working regex expression find , replace text between div tags so there html want select between <div class="info"> , </div> tag , replace other texts <div class="extrauserinfo"> <p>hello world! sample text</p> <javascript>.......blah blah blah etc etc </div> and replace with my custom text codes <tags> asdasd asdasdasdasdasd</tags> so <div class="extrauserinfo"> custom text codes <tags> asdasd asdasdasdasdasd</tags> </div> here refiddle code there , can see want replace whole bunch of codes between , tag http://refiddle.com/1h6j hope mean :) if there's no nesting, plain match non-greedy (lazy) (?s)<div class="extrauserinfo">.*?</div> .*? matches amount of character (as few possible) meet </div> used s modifier making dot match newlines too. edit : here javas...
can me, how can calculate , show fps in animation? want show simple rect (for example). if have code: private final fps = 30; private final size = 10; private int x = 10; private int y = 0; private string myfps; private void start(){ while(true){ moverect(); paint(); } } private void paint(){ g2.drawrect(x, y, size, size); g2.drawstring(myfps, 10, 10); } private void moverect(){ x++; } here copypaste of old simple java graphics+bufferstrategy gameloop test app. animation loop draws few moving rectangles , fps counter. java -cp ./lib/test.jar gameloop2 "fullscreen=false" "fps=60" "vsync=true" //http://www.javagaming.org/index.php/topic,19971.0.html //http://fivedots.coe.psu.ac.th/~ad/jg/ch1/ch1.pdf import java.util.*; import java.awt.color; import java.awt.frame; import java.awt.graphics; import java.awt.graphicsconfiguration; import java.awt.graphicsdevice; import java.awt.graphicsenvironmen...
Comments
Post a Comment