Examen PERL is aan de PC, ongeveer 5 uur de tijd en is 1 grote vraag.
Vergelijken strings is met de keywords "eq", "ne", "le", "lt", "ge", "gt"
vb:
| <link rel="import" href="../polymer/polymer.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; |
| # Your snippets | |
| # | |
| # Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
| # expand the prefix into a larger code block with templated values. | |
| # | |
| # You can create a new snippet in this file by typing "snip" and then hitting | |
| # tab. | |
| # | |
| # An example CoffeeScript snippet to expand log to console.log: | |
| # |
| # Laad CN=Administrator,CN=Users,DC=iii,DC=hogent,DC=be in en vraag volgende attributen op met GetEx: | |
| # 'cn', 'allowedAttributes', 'mail', 'canonicalName', 'objectClass' | |
| # Indien dit niet lukt, vang dit op en probeer met een andere methode | |
| use Win32::OLE; | |
| use Win32::OLE::Const 'Active DS Type Library'; | |
| use Win32::OLE::Variant; | |
| # Error codes, zie AD Service Interfaces Reference ADSI Error Codes / Generic ADSI Error Codes | |
| my %E_ADS = ( |
| # Toon het aantal leden (members) van alle groepen (gebruik een LDAP-query om alle groepen op te sporen) | |
| # Lees de naam in van 1 groep en geef een overzicht van de leden van deze groep | |
| # dsquery: dsquery.exe * -s satan.hogent.be -u "Xavier Geerinck" -p "Xavier Geerinck" | |
| # -filter "(&(objectcategory=group)(member=*))" -scope subtree | |
| # | |
| # De dsquery gaat bij object category zoeken achter groups en zorgen dat deze members heeft | |
| use Win32::OLE; | |
| use Win32::OLE::Const 'Active DS Type Library'; |
| /** | |
| * We start by setting element [0] on 0 | |
| * Check every time of the index of arr found by getting prefix[i] is the same, | |
| * if so do +1 else start over from 0 | |
| **/ | |
| function calculate_prefix(patternArr) { | |
| var prefix = []; | |
| // First index is 0 | |
| prefix[0] = 0; |
| /** | |
| * @author: Xavier Geerinck | |
| * @title: Longest Common Subsequence | |
| * @subtitle: This algorithm finds the longest common subsequence in 2 different strings | |
| * @method: | |
| * To find the longest common subsequence, we will create a matrix with at the top the first string and at the left the second string. | |
| * 1. Set length of the LCS = 0 | |
| * 2. From left to right, top to bottom, loop over the matrix | |
| * i. If the characters are equal at i, j --> do LCS + 1 | |
| * ii. If the characters are not equal at i,j --> take max(leftVal, topVal) |
| /** | |
| * @author: Xavier Geerinck | |
| * @title: Huffman encoding | |
| * @subtitle: This algorithm compresses a string it's binary representation | |
| * @method: | |
| * 1. Create a table for each character with their "frequence of occurence" | |
| * 2. Create leaf element of each character and put it in a priority queue (the priority is based on the "frequence of occurence" for that character) | |
| * 3. As long as the queue >= 2 elements | |
| * i. Remove 2 nodes | |
| * ii. Make a new node with the 2 children the 2 removed nodes. This new node has the sum of the priorities. (biggest child left, smallest right). |
| /** | |
| * @author: Xavier Geerinck | |
| * @title: Heuristics - Evolutionary Computation | |
| * @subtitle: | |
| * @method: | |
| * 1. Create a population | |
| * 2. Check the fitness of the individuals of the population | |
| * 3. As long as termination condition not met, continue | |
| * i. Recombine: take 2 parents and combine them | |
| * ii. Mutate: For the new child, change some properties based on a mutation parameter |
This utility finds taboo words in .tex files and gives a recommendation of how to replace them for a correct academic/thesis writestyle. All these recommendations can be found at: https://www.scribbr.com/academic-writing/taboo-words/
Usage: node taboolist_word_finder.js <WordListFile> <DirWithTexFiles>
// Make sure we got a filename on the command line.
if (process.argv.length < 3) {
console.log('Usage: node ' + process.argv[1] + ' <Wordlist> <DirWithFiles>');