Posts

xml - Sorting with xslt 1.0 -

i have evaluation form filled in lot of users. created export in excel form. want achieve is: header of excel have questions , below every question answers grouped user filled in form. this, i'm getting questions evaluation form , order them position, i'm grouping users filled in form, looping through results of grouping have same lines every question. part of xml i'm generating: <questionnames> <item> <quesid>468</quesid> <quesname><![cdata[name]]></quesname> </item> <item> <quesid>554</quesid> <quesname><![cdata[palce]]></quesname> </item> </questionnames> <exportline> <items> <item> <quesid>468</quesid> <values> <userid>25151</userid> <value><![cdata[dommel]]></value> <userid>45372</useri...

ruby - How to attach message to rspec check? -

in rspec: can attach message check same way in xunit style test frameworks? how? assert_equal value1, value2, "something wrong" should , should_not take second argument ( message ) overrides matcher’s default message. 1.should be(2), 'one not two!' the default messages pretty useful though. update: for rspec 3: expect(1).to eq(2), "one not two!"

c# - storing and parsing boolean expressions in database -

this follow-up question previous question which design pattern suitable workflow requirement? . know best way store boolean expression in database , evaluate @ runtime without effort. have requirement set of jobs need executed screen every month-end , decision of whether job can executed depends on outcome of previous jobs. should able save expression in database e = (a or b) , (c or d) (could complex nested expression). means e can run if or b successful , c or d successful. how can represented in database , parsed , condition evaluated later? thinking of doing (not tested yet) if "job e = (a , b) or (c , d)". store tree structure in table jobid dependentjobid successjobid failurejobid e b c e c d 0 e d 1 0 e b 1 0 this means "if successful, check b else check c", "if c successful check d". process starts hi...

reporting services - SSRS line graph: x-axis time-scale with gaps in data -

Image
i have dataset counts number of produced pallets per hour, eg 11/11/2010 22:00 --> 22 11/11/2010 23:00 --> 12 11/12/2010 00:00 --> 18 11/12/2010 01:00 --> 19 11/12/2010 03:00 --> 20 as may notice, there gap between 01:00 , 03:00 since there no data hour. data gets visualised in ssrs 2005 using graph time-scale x-axis. when graph type 'column', there no problem @ since 02:00 gets visualised no (0) value , gap visible in graph. when graph type 'line' or 'area', 02:00 visualised on graph no 0 value: there connection line between value of 01:00 , 03:00. when looking line graph, 1 conclude there production @ 02:00 not true, line connects value of 01:00 value of 03:00. example of same data in area graph (original image: http://img577.imageshack.us/img577/9616/area.jpg ) and column graph (original image: http://img577.imageshack.us/img577/7590/column.jpg ) should explain problem. does know how resolve problem? thank you! ...

JSON for Jquery autocomplete -

i've json response php file. [{"name":"kiev"},{"name":"kiev metro"},{"name":"kiev-dnepro"},{"name":"kiev-dnepro"},{"name":"kiev-donetsk"},{"name":"kiev-donetsk"} how can use standard jquery autocomplete? autocomplete function request seems cant parse response json (simple array works fine). me please derin, yes that's it. works fine! want modify little. getting more data in response , i'd display near of main autocomplete input var infogisname = null; var infogistype = null; var infogislocationid = null; var infogisparentid = null; $('#gisname').autocomplete({ source: function(request, response) { $.getjson("autocomplete.php", { term: request.term }, function(result) { response($.map(result, function(item) { infogisname = item.name; ...

java - Is there a single XPath expression I can use to navigate XML in a CDATA section? -

i'm trying figure out how use xpath exceptionid , instrumentid values out of xml snippet in following xml document (yes having xml in cdata little odd, that's 3rd party service) <?xml version="1.0"?> <exception> <info> <![cdata[ <info> <exceptionid>1</exceptionid> <instrumentid>1</instrumentid> </info> ]]> </info> </exception> is possible values in 1 xpath statement? i'm using javax.xml.xpath.xpath inside java (jdk 1.5 xalan 2.7.1 , xerces 2.9.1), e.g. xpath xpath = xpathfactory.newinstance().newxpath(); long exceptionid = new long(((double)xpath.evaluate(this.exceptionidxpath, document, xpathconstants.number)).longvalue()); it's this.exceptionidxpath variable i'm not sure how set, know example that: /exception/info/text()/info/exceptionid won't work (text() returns data in...

Chrome extension message passing, when xhr call fails in jQuery -

i'm building extension in google chrome issues queries against websites. the queries issued "background page" on request "content script"; when background page receives request issue query, sends query out, parses response , sends response content script, using sendresponse(). it works fine when using xmlhttprequest(); problem if want issue queries using jquery .get() or .load(), when queries fail, fail silently , response never sent content script. if register event handler .ajaxerror() error catched, event handler apparently cannot call sendresponse() because following chrome error: "attempting use disconnected port object" searching error retrieves source code chrome text found, it's not helpful. in short, question is: possible use jquery.get() in background script of chrome extension, , still able send response content script when request fails? (and if yes, how) this hard address directly without code sample (how passi...