properly express the node range from 3 to 10 - xpath

In w3c web ,we have some expression such as
/bookstore/book[1]
/bookstore/book[last()]
/bookstore/book[last()-1]
/bookstore/book[position()<3]
If there are 20 son nodes of bookstore,that is book ,i want to get the nodes from 3 to 10,how can i express it?

It is as simple as it is:
/bookstore/book[position()>=3 and position()<=10]

Related

Cytoscape don't load the node and edge attribute from my dot file

I am using cytoscape to display a graph i made with graphviz. I installed the add-on dot-app from the cytoscape app store to be able to load my graph.
My graph is loading perfectly, all the edges are connected to the nodes wanted. But the attributes of my nodes and edges aren't showing up.
Here is a simplified example (less attributes, nodes and edges) that is not working :
graph map {
node1 [color="#888888"]
node2 [color="#888888"]
node1 -- node2 [color="#1f78b4"]
}
It generates the following graph :
I managed to find code example of dot file loaded in cytoscape, the following one load the attributes well :
graph toy_example {
graph [bb="-85.648,-58.068,63.891,73.497",outputorder=edgesfirst, overlap=false];
node [fillcolor="#888888",label="\N",style=filled];
1 [height=0.5,pos="-58.648,-8.4777",width=0.75];
2 [height=0.5,pos="36.891,3.383",width=0.75];
2 -- 1 [pos="10.278,0.079128 -2.8626,-1.5522 -18.68,-3.5159 -31.846,-5.1504"];
3 [height=0.5,pos="12.665,-40.068",width=0.75];
3 -- 1 [pos="-9.8989,-30.072 -18.223,-26.385 -27.653,-22.208 -35.986,-18.516"];
3 -- 2 [pos="22.24,-22.895 23.933,-19.858 25.695,-16.698 27.386,-13.665"];
4 [height=0.5,pos="8.8474,55.497",width=0.75];
4 -- 2 [pos="18.03,38.433 21.097,32.734 24.516,26.38 27.592,20.664"];
4 -- 3 [pos="9.5835,37.071 10.264,20.041 11.269,-5.1139 11.944,-22.022"];
}
Generating the following graph :
Do you know why my attributes can't load ?
I tried destroying and creating the view on my graph but it don't do anything. The node table of both graphs only have "shared name" and "name".
If you look at the example that worked, the node color is defined as "fillcolor", not "color". This is because Cytoscape nodes can have two different colors, fillcolor and bordercolor, so the app authors chose to differentiate that by the attribute name. You would have to play around to see what they called the edge color. In Cytoscape it's called "Stroke Color (Unselected)", so you might try "edgecolor" or "strokecolor".
-- scooter

SSRS: Trouble understanding Grouping in Report

I have a relatively simple report that is 'working'.
It has a main Group based on an Expression - with one sort in the Group - and then another 'Group' named 'Details' under that in the Row Groups pane.
The Main Group is repeating itself for no reason that I can figure.
I expect that if there is a Group called 'A' - then all the Detail rows in that Group will display till the next Group - right?
Like this:
A
Bob 1 Texas
Jane 2 California
Devin 4 New York
B
Jack 3 Texas
Mary 6 Maine
Peter 5 Michigan
C
. . .
Instead, the report is doing something like this:
A
Bob 1 Texas
Jane 2 California
A
Devin 4 New York
B
Jack 3 Texas
B
Mary 6 Maine
Peter 5 Michigan
C
. . .
If I delete the Details Group I lose some data & the report goes from 5 pages [57 detail recs] to about two pages.
If I delete the Main Group as well - I go down to just one record in the entire report.
I need to keep all the data that is on the report - but have it Group correctly by the Main Group [without repeats of the Group Header] and then within each group - sort by a couple of different fields.
Any idea how I should go about Troubleshooting the issue?
Thanks!!
It looks like there might be something that is Grouping your detail. Make sure that there isn't any grouping on it.
If you can't figure it out, try creating a new one using your old one as a template. I've wasted hours trying to figure out what an issue is but creating a new matrix just takes a few minutes.
I had copied all the cells from the old matrix to a new one I had created and it worked as the first one should have.
I've had this happen a few times and have since given up on trying to figure out why something doesn't work.
I found the problem.
The 'IIF . . . ' Expression for the Group By and the Expression in the Group Header had different field names in the 'False' argument of the two expressions. So the report was GROUPING by one field - but DISPLAYING another field as the Group Header.
I have never done something like that and I can't imagine why I ever WOULD . . . and perhaps that is why I only stumbled on the anomaly because I was copying the two expressions into Notepad to recreate the Matrix and then noticed the difference.
The two field names in the 'False' arguments of the IIF expressions are quite similar - and that was an added reason that it was almost 'camouflaged'.
This is resolved.
Thanks #Hannover Fist! Appreciate that. To copy all the cells, can you just 'lasso' them with the mouse and then Ctrl + C . . . & then create a new Matrix and Ctrl + V? I was on the verge of just re-creating the Matrix.

Random Forest using Mahout

I want to use Random Forest using Mahout for my work. I have started from this tutorial. But I don't know how can I do with my own data?
Please, anyone, help me or suggest me how can I do that
See this tutorial. It is very helpful in my case.
you just change data description and input output path according own your data set.
data description for example.
data given below
ID name age weight target
1 john 18 70 Y
....
description will be
-d L C 2 N L
and also you can modify source code BuildForest.java or TestForest.java in mahout examples.

Programmatically adding appointments to Oracle Calendar 10

I'm trying to integrate a Web scheduling appliance with my organization's calendar system, Oracle Calendar 10. Getting meetings out is just a matter of parsing the UNICPOUTR output, and I thought I had a handle on getting meetings in with UNICPINR, but I'm getting a couple of odd errors.
Basically I grab the room description from UNICPOUTR, append the data for the new meeting, write out to /usr/tmp, and try to import the resulting file. I created a test resource to try things out, but something's gone odd. Here's the resource description from UNICPOUTR:
{
F Unison Export File
V A.02.53
E FALSE
X
R a Test Resource
R b
R c 10
R d
R e
R f
R g
I
P 4 480 1080 1 30 190 2 1 60 0 0 10
N 0
}
But trying to use this as a basis for an import file results in the rather odd error:
"R=Test Resource/N=Test Resou/CA=10/LOC=10/PHONE=10/EXT=10/FAX=10/PSW=g"
does not exist
Trying to get a handle on the resource with the -ls flag on UNICPINR, as
unicpinr -ls /usr/tmp/meeting.test
just spits out
unicpinr: file pattern not found - First
after a message on how to use the utility.
Is anybody out there familiar enough with the system that they can tell me what's going wrong here, or better yet suggest an alternate way to get new meetings in?
Okay, so after spending a day chewing on it, I've come up with this solution. There were a couple problems at work here (notwithstanding the -ls which I haven't investigated).
First: while UNICPOUTR will produce blank lines for acceptable nulls in the resource description, UNICPINR will for some reason assume that a blank line means to use the value from the previous line of input.
Second: UNICPINR doesn't seem to be able to search on anything other than the resource name.
Solution: take the resource description block and filter out the lines that start with X (room administrator), I (room password), and "R b" through "R g" (various resource identifiers). UNICPINR can run a search with "R a" just fine.
The resulting import, however, leaves all the meetings thinking they were created (M) and owned (W) by the room itself, but the original creator/owner are in the comments section prefaced by "Event creator: " and "Event owner: ", so I can work with that.
This may be a problem that only I will ever face, but it's responsible to leave the solution, however kludgy, in case someone else is out there groping about blindly. So here it is.

Is there a name for this type of page navigation?

Just out of curiosity, is there a name for the kind of navigation I've been working on?
It looks like this:
<<first <previous 1 2 3 4 5 [...] 20 next> last>>
i.e. navigation where you've got x pages, but you don't want to show x links, you want to limit the amount of space taken up, so you show y links at a time, and indicate the existence of the other pages with an elision.
At some point in the middle, it would look like this:
<<first <previous [...] 8 9 10 11 12 [...] 20 next> last>>
with elisions on both sides.
Answering to just clear up this question. I hereby declare that it has no official name.
I also hereby make up the name 'elided pagination' for it.
It's called web pagination, search result pagination.
thresholded navigation pager?
Not sure what the ordinary version of this pagination scheme is called (if anything).
However, I came up with an advanced version of it capable of handling very large numbers of pages (where ellipses (...) skip successively larger blocks of pages as you get further away from either the current page or the endpoints).
I called my scheme "Logarithmic pagination" or "Logarithmic page navigation".
You can find it (with implementation) on stackoverflow here.

Resources