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
| // Your code here. | |
| function countBs(string){ | |
| number_of_bs = 0; | |
| for (count = 0; count < string.length; count++){ | |
| if (string[count] == "B") | |
| number_of_bs += 1; | |
| } | |
| return number_of_bs; | |
| } |
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
| * Stop Server | |
| * Remove all odoo files | |
| * Remove postgresql from system | |
| STOP SERVER | |
| sudo service odoo stop | |
| or sudo service odoo-server stop (if odoo-server instead of odoo) | |
| REMOVE ALL ODOO FILES | |
| sudo rm -R /opt/odoo | |
| REMOVE CONFIG FILES |
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
| // Your code here. | |
| function reverseArray(array){ | |
| var arr_list = []; | |
| for (var i = array.length - 1; i >= 0; i--) { | |
| arr_list.push(array[i]); | |
| } | |
| return arr_list; | |
| } | |
| function reverseArrayInPlace(array) { |
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
| function arrayToList(array) { | |
| var list=null; | |
| for (var i=array.length - 1; i >= 0; i--) { | |
| list = {value:array[i], rest:list}; | |
| } | |
| return list; | |
| } | |
| function listToArray(list){ | |
| var array = []; |
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
| # Script that installs additional command-line interface (CLI) software for Ubuntu/Debian | |
| # Keep Ubuntu or Debian up to date | |
| sudo apt-get -y update | |
| sudo apt-get -y upgrade | |
| sudo apt-get -y dist-upgrade | |
| sudo apt-get -y autoremove | |
| # Development tools: | |
| sudo apt-get install -y build-essential cmake |
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
| # Script that installs additional graphical user interface (GUI) software for Ubuntu/Debian | |
| # Keep Ubuntu or Debian up to date | |
| sudo apt-get -y update | |
| sudo apt-get -y upgrade | |
| sudo apt-get -y dist-upgrade | |
| sudo apt-get -y autoremove | |
| # Development tools: | |
| sudo apt-get install -y gdebi |
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
| #################################### | |
| # SET UP NUMIX ON DEBIAN WITH XFCE # | |
| #################################### | |
| # | THIS SCRIPT IS TESTED CORRECTLY ON | | |
| # |------------------------------------| | |
| # | OS | Test | Last test | | |
| # |----------------|------|------------| | |
| # | Debian 9.1 | OK | 4 Sep 2017 | |
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
| function deepEqual(a, b) { | |
| if (a === b) return true; | |
| if (a == null || typeof a != "object" || | |
| b == null || typeof b != "object") | |
| return false; | |
| var propsInA = 0, propsInB = 0; | |
| for (var prop in a) |
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
| // ancestry = http://eloquentjavascript.net/code/ancestry.js | |
| function filter(array, test) { | |
| var passed = []; | |
| for (var i = 0; i < array.length; i++) { | |
| if (test(array[i])) | |
| passed.push(array[i]); | |
| } | |
| return passed; | |
| } |
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
| import os | |
| for folderName, subfolders, filenames in os.walk('C:\\delicious'): | |
| print('The current folder is ' + folderName) | |
| for subfolder in subfolders: | |
| print('SUBFOLDER OF ' + folderName + ': ' + subfolder) | |
| for filename in filenames: | |
| print('FILE INSIDE ' + folderName + ': '+ filename) |