graphs – How does node expansion work in a grap for AI search?

I want to try and write an example that solves the problem of travelling from one location to another described in the book AI: A modern approach. The problem involves getting from a particular city in Romania called Arad to Bucharest and the problem can be expressed as a graph like in the following image:

enter image description here

If when constructing the graph a Node holds a reference to its parent, the action that was applied to get there and the current state at that node plus the path cost, how would node expansion work?

enter image description here

I am not sure how I can expand Arad to give the three nodes attached because Arad does not hold a reference to its children, instead the children hold a reference to Arad.

** Edit I am now thinking (whilst I am still unsure how a node is expanded) that child nodes are not built until a node is expanded. Is this correct?

I could maintain a mapping between a node and its children as a hashtable or something like this but I don’t think this would scale to a larger problem where there the journey were much larger.

Equally I could search all nodes at expansion time and then find which have Arad as their parent if I kept some sort of information about each node such as its number in the graphtree, or the easiest would be for each node to hold a reference to all its child nodes but this does not match the description of a node and its properties specified in the book.

Can somebody explain how node expansion should work in a graph as I am guessing at how I might do it which might not be right.

networking – Azure Service Bus TimedOut exception when running within K8S instance but not in docker on node host

I’m getting a “ServiceBusCommunicationException” reason “Connection timed out ErrorCode: TimedOut” with an Inner Exception of “SocketException” reason “Connection timed out” when running a .net core 3.1 application in a docker container running in K8S.

K8S is running on Ubuntu 20.04 LTS

When I run the container directly on the host of the node itself (i.e. not in K8S) the connection is fine and it processes messages ok but in K8S I get the above error. There is no firewall running on the host. The containers are based on the image. There is nothing else added to this or any other tweaks made.

This suggests a K8S issue, possibly networking, with the AQMP port itself.

K8S reports no network policies in place.

As part of the same container I have a chron job that runs that makes an http GET to the google URL. This continually reports OK (200).

Therefore (at least for HTTP) the pods are communicating with the internet fine.

If I change the authentication credentials to something “bad” I get an unauthorised error … so it does appear to be routing ok for authorisation but not when actually connecting to do some work.

I’m not sure where to go with this. Any advice?

Hide comment box from node for Anonymous users

I am trying to hide the comment box for anonymous users. Anonymous users should only be able to view the comments. How can I hide the comment form?

enter image description here

7 – Access denied trying to edit node that I own D7

In an administrator account using the administrator panel i can create and edit content from content type Country. But when they are created from a script, and even if i own them, i can’t edit if their origin is said script. I get the message “You are not authorized to access this page.”

Already checked permissions (Admin can edit own content and any content) and rebuild them.

How owner is set in code:

global $user;
$new_country->uid = $user->uid;

kubernetes – Schedule pod on a node and access pv on another node

I’m running a k3s cluster on RPi4, with heterogenous config (a node has a high capacity but slow hdd, another has a ssd drive, a third only has a sd card).

I have persistent volumes & claims of kind “local-path”, attached to nodes & pods depending on my needs.

I’m facing a situation where I need to schedule a pod on the node with no disk to process data stored in the node with the ssd disk (re-encode some video files to mp4 using ffmpeg, and as this is an expensive process I’d like to do this on an idle node and not slow the node running the ssd).

Is it possible to transparently mount a PV from a different node ? Do I need to use some nfs ? Is there a more evoluted type of volume that can be used in bare-metal RPi4 to do what I want ?

Looking at the docs didn’t help much (there is tons of different persistent volume type, with not many use-case described).


i18n l10n – Get node translation from JSON:API

I have over a dozen languages on my site and we use Json:Api since it’s a decoupled drupal.
Problem is that I can’t figure out how to get the translated node values from the Json:Api response.

The Json:api url is as follows:{bundle}/{uuid}?include=field_image,field_taxanomy

And it returns all the data with the relationships for the two extra fields included, but how do I request the data for a translation??? (almost each node has been translated into each of the available languages)

postgresql crash in master node with streaming replication

We have a master/slave postgresql cluster with streaming replication and pgpool.

Versions in both postgresql servers are.

postgres: 9.4
OS: Debian GNU/Linux 8 (jessie)

PGPOOL server:
version pgpool: pgpool-II version 3.3.3
os: Red Hat Enterprise Linux Server release 6.1


We suffer a crash down of the postgresql service at master node with subsequent failover done by pgpool

Could not find the reason of this behavior in master node. We want to know if someone coult tell us, based on the recorded log messages, what could have caused this crash.
Following, some relevant lines from the postgresql and linux log.


2020-12-20 21:06:04 UYT (25922): (4-1) user=,db=,app=,client= LOG: server process (PID 19303) was terminated by signal 11: Segmentation fault
2020-12-20 21:06:04 UYT (25922): (5-1) user=,db=,app=,client= DETAIL: Failed process was running: COPY public.act_hi_varinst (id_, proc_def_key_, proc_def_id_, proc_inst_id_, execution_id_, act_inst_id_, case_def_key_, case_def_id_, case_inst_id_, case_execution_id_, task_id_, name_, var_type_, rev_, bytearray_id_, double_, long_, text_, text2_, tenant_id_, state_, create_time_, root_proc_inst_id_, removal_time_) TO stdout;
2020-12-20 21:06:04 UYT (25922): (6-1) user=,db=,app=,client= LOG: terminating any other active server processes
2020-12-20 21:06:04 UYT (1910): (3-1) user=dbusr,db=dbdatabase ,app=(unknown),client= WARNING: terminating connection because of crash of another server process
2020-12-20 21:06:04 UYT (1910): (4-1) user=dbusr,db=dbdatabase ,app=(unknown),client= DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
2020-12-20 21:06:04 UYT (1910): (5-1) user=dbusr,db=dbdatabase ,app=(unknown),client= HINT: In a moment you should be able to reconnect to the database and repeat your command.
2020-12-20 21:06:04 UYT (27108): (3-1) user=dbusr,db=dbdatabase ,app=(unknown),client= WARNING: terminating connection because of crash of another server process
2020-12-20 21:06:04 UYT (27108): (4-1) user=dbusr,db=dbdatabase ,app=(unknown),client= DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.

Error found at /var/log/messages

Dec 20 21:06:04 server-name kernel: (20278231.774013) postgres(19303): segfault at 7f7740354704 ip 00007f772c8ac700 sp 00007ffdac7ff4e0 error 4 in postgres(7f772c813000+5a1000)

Thank you all.

node.js – Erro ao atualizar Node Js

Após baixar o instalador do Node Js (Versão 14.00 ou superior), inicio a instalação, porém, estou tento uma mensagem de erro: “this application is only supported on windows 8.1, windows Server 2012 R2, or higher”. tentei utilizar o comando “npm install -g n”, infelizmente também não foi possível atualizar, utilizo windows 7 ultimate, não estou conseguindo contornar a situação… sem atualizar o sistema operacional, consigo contornar o erro ?

How to loop throug a database table, to safe every column as a single node?

I have a module, which load company data from external db, to save this as content.

function example_create_nodes() {
// Get Data from external DATABASE
  $result = db_query('SELECT * FROM wirdfit.wirdfit_data');

 foreach ($result as $row) {
  $node->language = LANGUAGE_NONE;
  $node->type = "page";
  $node->title = $row->post_title;
  node_object_prepare($node);  //Set some default values

 // Try to set your custom field
  $node->field_id($node->language)(0)('value') = $row->id;
  $node->field_post_content($node->language)(0)('value') = $row->post_content;
  $node->field_post_author($node->language)(0)('value') = $row->post_author;

  $node->date = 'complaint_post_date';
  $node->created = strtotime('complaint_post_date');

  $path = 'content/mytest-' . date('YmdHis');
  $node->path = array('alias' => $path);


Thats works but saved only one node from the the last row of my table.
How can i loop throug the table and save every row as a single content page.

Thanks for help

distributed systems – Pastry, how is data stored at each node?

I’m currently reading about the Pastry overlay network and I was wondering how the data was stored at each node? But I can’t seem to find anyone writing how the actual data ( not the nodes ) are found.

My current understanding:

Data say image.jpg is hashed to get some kind of key K hash(image.jpg) = a2

Each Node in the overlay network has some unique GUID and the nodes with the most similar GUID are closer to each other physically (since it’s structured).

If we say that We have a1(GUID for a node), b3, c2. The algorithm then assigns a2 (the key to the data) to the Node that has the closest GUID, which would be a1.

When one node, say c2, wants to find the data at key (a2) it does the usual algorithm looking at the prefixes to find the node with a GUID closest to the key a2, which would be a1.

But what happens next? Is there another hash table mapping each data key to the data value in each node beside the routing table?