What is "NodeId" in chrome extension -> "chrome.debugger" - google-chrome

I don't know "NodeId" Means...
NodeId is source code line??
I had suffered for some time with it.. :'(
please see this url-DOM command heightlightNode link:
https://developer.chrome.com/devtools/docs/protocol/1.1/dom#command-highlightNode

No, it does not correspond to the source code.
It's some integer associated with a particular node.
You'll need to query what node it is; see other commands that take NodeId as a parameter, i.e. DOM.resolveNode, DOM.getAttributes etc.
Conversely, you can find a node to get its node ID. For instance, you can get the document node by executing DOM.getDocument and then, using that node, query with a selector by DOM.querySelector.
Or, if you have a JS object corresponding to the node, you can query its ID with DOM.requestNode (use Runtime.evaluate first to get the RemoteObjectId)
Basically, it's an opaque identifier that you pass to other commands.

Related

How to interpret tcl command in openOCD manual

I'm completely new to tcl and am trying to understand how to script the command "adapter usb location" in openOCD.
From the openOCD manual, the command has this description:
I want to point it to the port with the red arrow below:
Thanks.
It's not 100% clear, but I would expect (from that snippet of documentation) a bus location to be a dotted “path” something like:
1-6
where the values are:
1 — Bus ID
6 — Port ID
Which would result in a call to the command being done like this:
adapter usb location 1-6
When there's a more complex structure involved (internally because of chained hubs) such as with the item above the one you pointed at, I'd instead expect:
1-5.3
Notice that there are is a sequence of port IDs (5.3) in there to represent the structure. The resulting call would then be:
adapter usb location 1-5.3
Now for the caveats!
I can't tell what the actual format of those IDs is. They might just be numbers, or they might have some textual prefix (e.g., bus1-port6). Those text prefixes, if present, might contain a space (or other metacharacter) which will be deeply annoying to use if true. You should be able to run adapter usb location without any other arguments to see what the current location is; be aware though that it might return the empty string (or give an error) if there is no current location. I welcome feedback on this, as that information appears to be not present in any online documentation I can find (and I don't have things installed so I can't just check).
I also have no idea what (if anything) to do with the device and interface IDs.

How to check whether a file is serial or partitioned using abinitio functions only

I need to resolve a parameter value depending upon whether I have a serial or multifile. Below is the scenario...
I have created a generic graph where I have a reformat component just after the input file component... At run time! I need to check input file if it is serial or multi... And accordingly I have to populate the layout of reformat...!
Hence.. To achieve this I am looking for some specific abinitio function...!
Thanks
I think there is a function - m_fs_check.
You can use this function in the graph parameters and use the resolved value as a condition to determine the layout.
m_fs_check will check if the directory is a serial or multi directory. However a user can still create a serial file on a multi directory. One option is fire a m_ls -lt command. Result displays a flag 'M' which denotes that a file is multi file. For serial files this flag remains blank.
Use m_expand($INPUT_FILE_PATH) in PDL at PSET level to identify directory depth. if depth is greater than one then its multifile else serial.then use output flag into your reformat.

IBM Websphere scripting ID 'containment paths' explained (I.e. AdminConfig.getid(...) )

I have been digging through IBM knowledge center and have returned frustrated at the lack of definition to some of their scripting interfaces.
IBM keeps talking about a containment path used in their id definitions and I am only assuming that it corresponds to an xml element within file in the websphere config folder hierachy, but that's only from observation. I haven't found this declared in any documentation as yet.
Also, to find an ID, there is a syntax that needs to be used that will retrieve it, yet I cannot find a reference to the possible values of 'types' used in the AdminConfig.getid(...) function call.
So to summarize I have a couple questions:
What is the correct definition of the id "heirachy" both for fetching an id and for the id itself?
e.g. to get an Id of the server I would say something like: AdminConfig.getid('/Cell:MYCOMPUTERNode01Cell/Node:MYCOMPUTERNode01/Server:server1'), which would give me an id something like: server1(cells/MYCOMPUTERNode01Cell/nodes/MYCOMPUTERNode01/servers/server1|server.xml#server_1873491723429)
What are the possible /type values in retrieving the id from the websphere server?
e.g. in the above example, /Cell, /Node and /Server are examples of type values used in queries.
UPDATE: I have discovered this document that outlines the locations of various configuration files in the configuration directory.
UPDATE: I am starting to think that the configuration files represent complex objects with attributes and nested attributes. not every object with an 'id' is query-able through the AdminConfig.getid(<containment_path>). Object attributes (and this is not attributes in the strict xml sense as 'attributes' could be nested nodes with a simple structure within the parent node) may be queried using AdminConfig.showAttribute(<element_id>, <attribute_name>). This function will either return the string value of the inline attribute of the element itself or a string list representation of the ids of the nested attribute node(s).
UPDATE: I have discovered the AdminConfig.types() function that will display a list of all manipulatible object types in the configuration files and the AdminConfig.parent() function that displays what nodes are considered parents of the specified node.
Note: The AdminConfig.parent() function does not reveal the parents in order of their hierachy, rather it seems to just present a list of parents. e.g. AdminConfig.parent('JDBCProvider') gives us this exact list: 'Cell\nDeployment\nNode\nServer\nServerCluster' and even though Server comes before ServerCluster , running AdminConfig.parent('Server') reveals it's parents as: 'Node\nServerCluster'. Although some elements can have no parents - e.g. Cell - Some elements produce an error when running the parent function - e.g. Deployment.
Due to the apparent lack of a reciprocal AdminConfig.children() function, It appears as though obtaining a full hierachical tree of parents/children lies in calling this function on each of the elements returned from the AdminConfig.parent(<>) call and combining the results. That being said, a trial and error approach is mostly fruitful due to the sometimes obvious ordering.

Can not query nodes but can see all the nodes and properties in the data browser

I have imported a few nodes with properties via the Cypher CSV import (command below) and the nodes seem to have loaded correctly as I can view them in the REST-API (the data browser). When I execute a MATCH (n) RETURN n query, all of the nodes are displayed in the Results pane, and when I click on one of the nodes the properties are displayed in the left pane of the browser (I would attach a screen shot showing what I am trying to refer to here which would make this issue A LOT more clear and easy to understand, but apparently us neophytes are prohibited from providing such useful information).
However, when I try to query any of the nodes directly, I get no rows returned. By "query the nodes directly" I am referring to querying with a WHERE condition where I ask for a specific property:
MATCH (n)
WHERE n:Type="Idea"
RETURN n
Type is one of the properties of the node. No rows are returned from the query. I can click on the node in the Stream pane to open the properties dialog, and I can see the Type property is clearly "Idea."
Am I missing something? The nodes and properties seemed to have loaded into the DB correctly, but I can't seem to query anything. Is "ID" a restricted term? Do I even need an "ID" property (i thought I read somewhere you shouldn't trust the auto-generated IDs as they aren't guaranteed to be unique over time)?
Import statement used to load the nodes is below:
$ auto-index name, ID
$ import-cypher -i ProjectNodesCSV.csv -o ProjectOut.csv CREATE (n:Project {ID:{ID},Name: {Name}, Type: {Type}, ProjectGroupName: {ProjectGroupName}, ProjectCategoryName: {ProjectCategoryName}, UnifierID: {UnifierID}, StartDate: {StartDate}, EndDate: {EndDate}, CapitalCosts: {CapitalCosts}, OandMCosts: {OandMCosts}}) RETURN ID(n) as ID, n.Name as Name

How to set the value of a variable in a udf requiring a path-call

I'm trying to use a user-defined function in XSLT that repeatedly calls the value of a certain string. That string is based on the outcome of an XPath expression that doesn't change within the span of a single function call. I thought it would be a good idea to assign it to a variable rather than look it up over and over again.
Unfortunately, at least in Saxon's implementation, you cannot use an XPath expression requiring a node inside a function, even one based on an absolute path, without first using a throw-away line to let the function know you are discussing the root document rather than some other one.
So, for example, the following code throws an error:
<xsl:function name="udf:LeafMatch">
<xsl:param name="sID"></xsl:param>
<xsl:variable name="myLeaf" select="/potato/stem[#sessionID=$sID][scc]/scc/#leafnumber"/>
Normally, the solution is just to first call any global variable to give context. For example, the following works inside of an udf ($root is a variable identified with the root node):
<xsl:for-each select="$root">
<xsl:value-of select="/potato/stem[#sessionID=$sID][scc]/scc/#leafnumber"/>
</xsl:for-each>
But this doesn't work when trying to use Xpath to fix the value of a variable because I'm not allowed to put the expression within a for-each.
I also tried using
<xsl:choose><xsl:when select"$root"><xsl:value-of select="/potato/stem[#sessionID=$sID][scc]/scc/#leafnumber"/></xsl:when></xsl:choose>
to give it context, going on what I saw here:http://www.stylusstudio.com/xsllist/200504/post00240.html
That didn't work either.
FWIW, passing the variable into the function is problematic because the Xpath expression used to define "myleaf" depends on the context node, and I don't know how to get Xpath to call one path based on values in the current context node.
For example, in the code calling this function I have something like:
<xsl:for-each select="/potato/stem[eye]">
<leaf = "{udf:LeafMatch(#sessionID)}"/>
</xsl:for-each>
I'm working in the context of a /potato/stem[eye] node and using the udf to look for a /potato/stem[scc] node that has the same value of #sessionID. I don't know how to reference the value of #sessionID from the current context node in the predicate of an XPath searching for other nodes in a completely different part of the XML tree, so I was using a udf to do that. It was working fine until I decided to try to use a variable for the string rather than having the processor look it up each time.
I was trying to avoid going one level deeper (having my function itself call a named template or putting a named template inside my original for-each and having that named template call a function).
So my questions are:
A. For a user-defined function, how do I set a variable that depends on an XPath expression?
B. Is there a snazzy way in Xpath to use values drawn from the current content node in the predicates of the Xpath expression you are trying to test?
So my questions are:
A. For a user-defined function, how do I set a variable that depends
on an XPath expression?
B. Is there a snazzy way in Xpath to use values drawn from the current
content node in the predicates of the Xpath expression you are trying
to test?
Both questions are quite unclear.
A: I assume you actually mean:
"Inside an xsl:function how do I define a variable that depend on
the context node?"
The answer: You can't. By definition there is no context node within an xsl:function. This is defined by the W3C XSLT 2.0 specification in the following way:
"Within the body of a stylesheet function, the focus is initially
undefined; this means that any attempt to reference the context item,
context position, or context size is a non-recoverable dynamic error.
[XPDY0002]"
You can, however, pass as a parameter the intended context node (or just the document node that must be used as current). Or, alternatively, you may refer to a globally defined variable.
B: This question is completely not understandable:
What is "snazzy"?
What is "current content node"? Please, provide an example of a specific task to be accomplished in the wanted "snazzy" way.