Posts

messaging - Looking for message broker with a REST API -

we provide queues service (similar amazon sqs ) application requires inside company. before reinventing wheel we're looking product complies with: scales horizontally high availability on performance simple queue rest api (publish, deque, ack, nack) on advanced features backgrounds: use java/groovy , have experience in rabbitmq , activemq open product/language. i'd appreciate experience, product or broker adapter suggestion. first disclaimer - experience around sonicmq, activemq, , tibcorv. saw question opportunity spend time investigating rabbitmq has offer, have not used in anger date. here's information (propaganda?) came across rabbitmq... scales horizontally ( http://www.rabbitmq.com/distributed.html ) tries hard high availability ( http://www.rabbitmq.com/ha.html ) has experimental plugin called rabbitmq-json-rpc-channel allows send amqp json on http might meet rest api requirements https://github.com/rabbitmq/rabbitmq-jsonrpc-channe...

Need to show and hide a div by clicking the same button in jquery -

i'm new @ query , simple : ) right it's setup show popup div when click on details button, works fine. i'm trying figure out how can hide popup div if user clicks again on same details button. appreciated! <script type="text/javascript"> $(document).ready(function() { $(".details").click(function() { $(this).parents('h1').next('.popup').fadein(1000); }); }); </script> <h1>we together<span class="details">details</span></h1> <div class="popup"> <ul> <li>852</li><!--square foot goes here--> <li>2</li><!--bedrooms goes here--> <li>1</li><!--bathrooms goes here--> <li>$134,900</li><!--price goes here--> ...

python - Grouping django objects using QuerySet API by shared text tags using two models with ForeignKey relationship -

hi trying write django webapp sits on top of legacy database , cannot control model fields , achieve functionality using new models. i have many documents user given comma-separated-tags . want group "related" documents based on shared tags. # model express legacy table class document(models.model): id = models.bigintegerfield(primary_key= true) metadata_id = models.charfield(max_length=384) tags_as_csv = models.textfield() # created new model tag_text extracted tags_as_csv class tagdb(models.model): tagid = models.bigintegerfield(primary_key=true) referencing_document = models.foreignkey(document) tag_text = models.textfield(blank=true) so document contain: document : id = 1 , metadata_id = "a1ee3df3600c6f77a6e851781f7e70c6" , tags_as_csv = "raw-data , high temperature , important" the tagdb have entries such as id , referencing_document , tag_text 1 , 1 , "raw-data" 2 , 1 , "high temperature...

Start navigation or maps application on Windows Mobile -

is there way start maps or navigation application programmatically on windows mobile (6.5)? i looking similar android can pass location encoded uri view , system automatically start whatever application can handle uri. intent = new intent(intent.action_view, uri.parse("google.navigation:q=" + mlat + "," + mlon)); i.setflags(intent.flag_activity_new_task); startactivity(i); is there way similar in windows mobile? i have device both google maps , telenav gps installed, don't know how start either of them programmatically or how pass arguments. thanks information. as far google maps, should have start web browser right url. the trick find appropriate browser http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/maps/google-maps-for-mobile/ueobwm2cndy

java - How do I get the default views for a ListView Section Headers and items? -

i want replicate list of sidebar/action bar dropdown in gmail--namely, nice all-cap section headers , items faded number on right. know need create own spinneradapter, i've started. i'm stuck how these standard views , put desired text in right sub-views (with guess view.findviewbyid ). can point me in right direction? public view getdropdownview(int position, view convertview, viewgroup parent) { context context = parent.getcontext(); object item = getitem(position); layoutinflater inflater = (layoutinflater)context.getsystemservice (context.layout_inflater_service); if (item instanceof string) { string headertext = (string) item; // todo: inflate ics section header view, // populate headertext, , return } else { listitem listitem = (listitem) item; // todo: inflate ics text/number view, populate // listitem.gettext()/getnumber() , return } } here's visual reference ...

c++ - Convert radians to degrees like Google -

im trying convert radians degrees, im not getting same results google calculator , pi defined dosent output number. if type in google search: (1 * 180) / 3.14159265 57.2957796 , program outputting: 57.2958 , if type in google search pi get: 3.14159265 , mine dosent output rest, output: 3.14159 my code is: #include <iostream> #define show(x) cout << # x " = " << (x) << endl using namespace std; double pi_test = 3.14159265; float radian_to_degree(double enter) { double pi = 3.14159265; float degrees = (enter * 180) / pi; return degrees; } int main (int argc, char * const argv[]) { show( radian_to_degree(1) ); // 57.2958 not 57.2957795 google, why? show( pi_test ); // output 3.14159' not 3.14159265, why? return 0; } please me fix this, wrong? example? as stated here , may cout in c++ rounding number before displaying it. try this: #define show(x) cout << setprecision(some_number) << #...

MAMP localhost not working -

i have problem mamp, when try , visit url such http://localhost/discoversolar not work. however if visit http://streetcrime/discoversolar works. may have set alias or have no idea how or did this. can point me in direction of changing localhost works? i have looked in /etc/hosts , /applications/mamp/conf/apache/httpd.conf , /applications/mamp/conf/apache/extra/httpd-vhosts.conf failed find anything. in /applications/mamp/conf/apache/httpd.conf states servername localhost:80 thanks help! i going through issue. couldn't localhost populate , remembered editing hosts file in /etc/hosts .. i had commented following out: 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost add host file , should work :) hope helps! regards! update: mamp works via port 8888 .. try http://locahost:8888