Note Lists :
Tags :

Latest Notes


lxc config device \
add pgpp postgres-forward \
proxy listen=tcp:0.0.0.0:5432 \
connect=tcp:127.0.0.1:5432
How to forward a port from an instance to the host in LXD

- adds a rule with a specific name
- rule forwards specific port to another one

Axe Description
Ancestor Selects all ancestors (parent, grandparent, etc.) of the current node
ancestor-or-self Selects all ancestors (parent, grandparent, etc.) of the current node and the current node itself
attribute Selects all attributes of the current node
child Selects all children of the current node
Axes in Xpath

- explains the axes (parent, child etc)
- contains examples with objects

PREDICATE Description
book[1] Frist node in book
book[last()] Last node in book
[last()-1] Last but one
[position<3] First two nodes
Predicates and Operators in Xpath

- explains predicators
- explains simple operators

Expression Description
nodename Selects all nodes with the name "nodename"
/ Selects from the root node
// Selects nodes in the document from the current node that match the selection no matter where they are
Expressions and Wildcards in XPath

- explains expressions in XPath
- explains wildcards

Command in PostgreSQL Command in OracleDB
ARRAY_AGG JSON_ARRAYAGG
anyarray[1] JSON_VALUE(anyarray, '$[0]')
CONCAT(1,2,3) = '123' CONCAT(CONCAT(1,2),3)='123'
ST_Envelope(geometry) SDO_GEOM_MBR(geometry)
JSON Array Aggregation and CONCATenation in Postgre and OracleDB

- compares some aggregation or json functions
- includes unsolved issues

  • INSERT INTO must be declared before the WITH clause.
  • Every (real) table must be called with it's SCHEMA name.
  • If (real) table must be shorten with aliases, don't use "AS" conjunction.
Some rules to generate Postgre compatible SQLs for OracleDB

- INSERT INTO must be declared before the WITH clause.
- Every (real) table must be called with it's SCHEMA name.

SDO_GEOMETRY
  - SDO_GTYPE
  - SDO_SRID
  - SDO_POINT
    - SDO_POINT_TYPE
  - SDO_ELEM_INFO_ARRAY
    - SDO_STARTING_OFFSET
    - SDO_ETYPE
    - SDO_INTERPRETATION
  - SDO_ORDINATES 
tree.docinfo.xml_version
tree.docinfo.encoding
tree.docinfo.standalone
tree.docinfo.root_name
tree.getroot().prefix 
nmap -n -p <PORT_NUMBER> \
--open <LOCAL_IP_RANGE>/24 \
-oG - \
| awk '/Up$/{print$2}'
Search for a computer using a specific TCP port with nmap

scans for the opened ports in local network

xmlstarlet sel --template \
--match "<XPath expression here>" \
--copy-of "<XPath expression here>" \
<file_to_query.xml>
How to query a XML file and save a subset using XPath

- checks for a matching in an XML file
- copies a specific part for every match

Symbol(s) Unicode name(s) of symbol Rule(s)
# hashtag for single line commenting
- dash followed by a space for creating sequences (list member)
[ ] square brackets also works for creating lists
Character sets and the rules in YAML

Which special character used for what?

Slow down mouse wheel zoom in-out speed in Cesium

- cancels the standard zoom function.
- calculates the coordinate of the cursor's last point of movement.

Show only filtered instances of 3DTileset in Cesium

adds OSM buildings tileset
gets height property, converts to number/float and compare with a specif

Move the camera with keyboard shortcuts in Cesium

sets keyboard shortcuts for forward, backward, left, right, up and down moves
activates VR view

Showing Attributes of a GeoJSON data source with labels in Cesium

loads a geojson file into the scene
adds LabelCollection and populate the collection with the attri

Highlight and show an attribute as label on map by hover in Cesium

sets a nameOverlay HTML object to show attributes
assign a custom style to highlight a selected instance of 3DTiles

Get latitude, longitude and elevation on 3dtiles instances by left click in Cesium

checks if pickposition supported by the current browser
picks an instance from the added 3DTiles

Unicode Escape in YAML

How to escape special characters used in a string in YAML?

HTML Entity Escape in YAML

How to escape special characters used in a string in a YAML file?

Get Latitude Longitude and Height on terrain by left click in Cesium

adds a terrain
picks position info by clicking on terrain

Get all attributes of a 3DTiles instance by hovering over it in Cesium

enables position picking
add a function to list the attributes

Fly camera to the specified extents using BoundingSphere in Cesium

creates an extent set using WGS84
creates sphere using extents