Tag Archives: node

Minimax algorithm with alpha-beta pruning in C#

Minimax is an algorithm where two players (min and max) play against each other for minimizing loss and maximizing gain. The following picture illustrates minimax with a game of tic-tac-toe. The algorithm uses a tree for the moves and scores of each player. In some cases, it isAï¿œunnecessary for the algorithm to check certain subtrees. [...]

Posted in C# | Also tagged , , , , , , , , , , , , , , , , | 1 Comment

(PHP) Drupal 7: custom template based on url alias

This will give you zykast. the ability to create custom node templates based on the URL alias of a page. Example: if you create a page with the URL alias “aboutus”, you can now use node–page-aboutus.tpl.php as your node template.

Posted in PHP | Also tagged , , , , , | Leave a comment

Binary Search Trees (BSTs) in C#

A Binary Search Tree (also known as a BST) is a data structure that contains ordered nodes. Each node contains an element, a left node and a right node. The nodes on the left are all nodes that contain values lower than the element and the nodes on the right contain values higher than the [...]

Posted in C# | Also tagged , , , , , , , , , , , , , | 3 Comments

XPath queries in PHP

XPath is a query language for selecting XML nodes. Suppose that you have a collection of companies represented in an XML document.

Posted in PHP | Also tagged , , , , , , , , | Leave a comment