Posts

rest - Message body on a 404 message -

i talking co-worker reason wrote framework ground because wasn't able automatically unmarshall message body on 404 http packet. he says he's following rest principles. guess message body on 404 http packet violate principles, i'm not sure of it. if has opinion regarding this, please answer :) if use web browser go http://www.google.com/unknown 404 status code , entity body. it quite common entity bodies returned 404s. if @ description of 400 errors in httpbis spec see the server should include representation containing an explanation of error situation, , whether temporary or permanent condition.

How to write a Graph Algorithm -

trying come-up pseudocode (in latex) algorithm takes 2 graphs input - compares each node in graph - (i fill in comparing function), returns 0 if node 1 graph equal node in other graph, else returns 1. node in graph graph. checking recursive. what's mean , comparing graphs ? graphs of g1 , g2 same if of vertices have same weight[value] , |g1| = |g2| . (in simple graphs)

Integrating Events into Wordpress -

i'm in process of developing website not-for-profit organization, , thought wordpress great tool use base cms site. building site wordpress has not been problem, have been having difficult time finding plugin use them organize , advertise upcoming events. currently, use google calendar, trying move integrates more cleanly site. essentially, need wordpress events/calendar plugin these features: + add reoccurring events start , end time + each event should have own page (reoccurring events should shown single page) + display events in mini-calendar , full calendar/list view it nice have these features: * ability categorize/tag events * ability add picture go event i'm indifferent on these features: - being able rsvp - paying events - import/export calendars there many events/calendar plugins out there wordpress, can't seem decide 1 worth me spending time use website. suggestions? you can create category called "events" , desig...

Objects from memory as input for Hadoop/MapReduce? -

i working on parallelization algorithm, following: read several text documents total of 10k words. create objects every word in text corpus. create pair between word-objects (yes, o(n)). , return frequent pairs. i parallelize 3. step creating pairs between first 1000 word-objects rest on fist machine, second 1000 word-objects on next machine, etc. my question how pass objects created in 2. step mapper? far aware would require input files and hence need serialize objects (though haven't worked with before). there direct way pass objects mapper? thanks in advance help evgeni update thank reading question before. serialization seems best way solve (see java.io.serializable). furthermore, have found tutorial useful read data serialized objects hadoop: http://www.cs.brown.edu/~pavlo/hadoop/ ). how parallelize steps? use #1 text documents input mapper. create object every word in mapper. in mapper key-value pair word-object pair (or object-word depending on ...

python - How to draw matplotlib graph in eclipse? -

i can draw matplotlib graph in command line(shell) environment, find not draw same graph inside eclipse ide. such plot([1,2,3]) not show in eclipse, writed show() in end still not show matplotlib use gtkagg backend, use pydev plugin of eclipse develop python. import matplotlib.pyplot mp mp.ion() mp.plot(x,y) mp.show()

eclipse - How to Count the number of rows in Sparql Query -

i working in eclipse , using 2 java files: admin.java , semanticsearch.java. through the admin.java logging in , checking if username , password existing in rdf file. function of login in admin.java calls semanticsearch.java runs sparql query. query giving me answer in console of eclipse , onto file. job give answer admin.java either returning value or counting rows , sending value admin.java. if number of rows 1 means username , password match , can allow user login. but not able so. have tried using count(), count() cnt, tried int res=results.next. nothing seems help. i pasting code below: admin.java semanticsearch semsearch = new semanticsearch(request.getsession()); semsearch.loaddata(realpath + rdfdatasourcefile1); semsearch.searchforuser(response.getoutputstream(),null, username, password); in semanticsearch.java public void searchforuser(outputstream out, string xslfile1, string username, string password) { string prolog = "prefix kb:<"+vuser.get...

asp.net mvc - Using MVC Routes as Shortcodes -

we have been trying implement shortcodes on asp.net mvc web app allow users uniquely invoke given article/page using assigned short code. for e.g.: www.mysite.com/power map actual url: www.mysite.com/power/home/. i have created various routes throughout site map these shortcodes various actions , controllers within application. shortcode/route point of view, working great. i, however, noticed couple of interesting things. have hyperlinks use url.action method generate url pointing pages. many of these pages have short codes associated them. e.g.: have link says: <a href="<%= url.action("index", "home", new { area = "power" })%>"> go power page</a> this page has mentioned short-code assigned it. when use url.action, ideally expect create link /power/home/index or /power/home, since have route constraint mapped it, generates link /power. is there way can use actual link url when generating links? want short-codes ...