This file contains hidden or 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
| ;----------------------------------------------------------------------------------------------------------------------* | |
| ;Behold, our middleware! Note that it's common to prefix our middleware name * | |
| ;with "wrap-", since it surrounds any routes an other middleware "inside" * | |
| ; * | |
| ; We can attach our middleware directly to the main application handler. All * | |
| ; requests/responses will be "filtered" through our logging handler. * | |
| ;----------------------------------------------------------------------------------------------------------------------* | |
| (defn allow-cross-origin | |
| "Middleware function to allow cross origin requests from browsers. |
This file contains hidden or 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
| # -------------------------------------------------------------------------- # | |
| # Welcome Message | |
| # -------------------------------------------------------------------------- # | |
| echo "Hi Yann! Welcome back!" | |
| # -------------------------------------------------------------------------- # | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: |
This file contains hidden or 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
| # anagram_palindrome | |
| # | |
| # Write a function which accepts an input word and returns true or false | |
| # if there exists an anagram of that input word that is a palindrome. | |
| # O(n) => linear | |
| # O(1) => constant | |
| # palindrome : is a string that read the same from front to back | |
| # and back to front : noon, eye, |
This file contains hidden or 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
| # Dictionary in python are also refered to as hash table in other languages like java | |
| # initialize a dictionary | |
| a_dict = {'FirstName': 'Yann', 'LastName': 'Mulonda', 'age': 177, 'year': 2018} | |
| print(a_dict) | |
| # retrive value from a key | |
| print("We are in the year: ", a_dict['year']) | |
| # add a new key and value |
This file contains hidden or 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
| # Arrays | |
| # given an array or a Python list of integers, write a function which takes | |
| # the given array and finds and returns the second largest number in this array. | |
| # given array | |
| numbers_list = [2, 5, 1, 9] | |
| # For this question, you might ask, "could this array be empty?" | |
| # The answer is yes, you should return none in that case. It just means that |
This file contains hidden or 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
| # Given a string, do some operations | |
| # a string in python can be traited a list that store characters | |
| # however, unlike a list, a string is ummutbale. meaning: it can't be changed | |
| # initialiaze a string | |
| a_string = "This is a strig" | |
| print(a_string) | |
| # given a string, letter = "ABCD" |
This file contains hidden or 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
| const { app, BrowserWindow } = require('electron') | |
| let win; | |
| function createWindow () { | |
| // Create the browser window. | |
| win = new BrowserWindow({ | |
| width: 600, | |
| height: 670, | |
| icon: `file://${__dirname}/dist/assets/logo.png` |
This file contains hidden or 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
| { | |
| "name": "my-angular-electron-app-demo", | |
| "version": "0.0.0", | |
| "main": "main.js", // <-- update here | |
| "scripts": { | |
| "ng": "ng", | |
| "start": "ng serve", | |
| "build": "ng build", | |
| "test": "ng test", | |
| "lint": "ng lint", |
This file contains hidden or 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
| #!bash | |
| # | |
| # git-flow-completion | |
| # =================== | |
| # | |
| # Bash completion support for [git-flow](http://github.com/nvie/gitflow) | |
| # | |
| # The contained completion routines provide support for completing: | |
| # | |
| # * git-flow init and version |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <breakfast_menu> | |
| <food> | |
| <name>Belgian Waffles</name> | |
| <price>$5.95</price> | |
| <description>Two of our famous Belgian Waffles with plenty of real maple syrup</description> | |
| <calories>650</calories> | |
| </food> |