This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getMaxDepth(node) { | |
var max; | |
if (node.children) { | |
var c = node.children.length; | |
max = node.children[0].depth; | |
for (var i = 0; i < c; ++i) { | |
max = getMaxDepth(node.children[i]); | |
} | |
} else { | |
max = node.depth; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace common\components\pgsql; | |
use yii\base\Behavior; | |
use yii\db\ActiveRecord; | |
class ArrayBehavior extends Behavior | |
{ | |
public $attributes; |