Skip to content

Instantly share code, notes, and snippets.

View DennisdeBest's full-sized avatar

Dennis de Best DennisdeBest

View GitHub Profile
def print_rangoli(size):
lineWidth = 3 + (4*(size-1)) - 2
chars = []
for i in range(0, size):
chars.append(chr(96+size-i))
counter = 0
s = ""
sarr = []
for val in chars:
if counter == 0 :
@DennisdeBest
DennisdeBest / get next element XMLReader
Created January 27, 2017 09:00
Iterate over elements using the XMLReader class
$xmlReader = new XMLReader();
$xmlReader->open(dirname(__FILE__) . self::XML_FILE_PATH);
while ($element = $this->getNextElementFromXML($xmlReader, "Rubrique")) {
}
/**
* return an array of the next element specified
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Text.RegularExpressions;
namespace Generator
{