Warning: session_start(): open(/var/lib/php/sessions/sess_7tli3h9joo3j8i0nhqfm414lib, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
p-exp {
ObjectNode root = new(mL("English sentence patterns"));
//processNode_recursive(root, 10);
ct_process_firstOnly(root, 10, 'ct_objectNodeToListNode);
showFrame(jDynamicTree(root, ct_getChildren()));
}
svoid ct_process_firstOnly(Node n, int depthCounter, S... functions) {
if (n == null || depthCounter <= 0) ret;
if (nempty(n.children)) ret;
for (S f : functions) {
if (nempty(n.children)) ret;
pcallF(f, n);
}
ct_process_firstOnly(first(n.children), depthCounter-1, functions);
}
svoid ct_objectNodeToListNode(Node n) {
if (n instanceof ObjectNode) {
ObjectNode on = cast n;
O o = on.obj;
if (o instanceof Collection)
n.add(ListNode(asList((Collection) o)));
}
}
sclass ListNode > CTNode {
L list;
*() {}
*(L *list) {}
S toString2() { ret sfu(list); }
public bool equals(O o) { ret stdEq(this, o, 'list); }
public int hashCode() { ret stdHash(this, 'list); }
}