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
| * 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 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
| // Your code here. | |
| function isEven(number){ | |
| while (number > 0 || number < 0) | |
| if (number > 0 && (isEven(number - 1) == 0)) | |
| return true; | |
| else if(number < 0 && (isEven(number + 1) == 0)) | |
| return true; | |
| else | |
| return false; | |
| } |
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 findSolution(target) { | |
| function find(current, history){ | |
| if (current == target) | |
| return history; | |
| else if (current > target) | |
| return null; | |
| else | |
| return find(current + 5, "(" + history + " + 5)") || | |
| find(current * 3, "(" + history + " * 3)"); | |
| } |
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 power(base, exponent){ | |
| if (exponent == 0) | |
| return 1; | |
| else | |
| return base * power(base, exponent-1); | |
| } | |
| console.log(power(5, 6)); |
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
| var landscape = function() { | |
| var result = ""; | |
| var flat = function(size){ | |
| for (i=0; i<size; i++) | |
| result += "_"; | |
| } | |
| var mountain = function(size){ | |
| result += "/" | |
| for (i=0; i<size; i++) | |
| result += "'"; |
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
| # Add CodeLite Public Key | |
| sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc | |
| # Add repository to /etc/apt/sources.list | |
| deb http://repos.codelite.org/wx3.1.0/ubuntu/ xenial universe | |
| # Update system | |
| sudo apt-get update | |
| # Install packages |
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
| Setp-1: Update & Upgrade Source List | |
| update apt source list | |
| sudo apt-get upgrade | |
| Step-2: Install python dependencies for Odoo | |
| sudo apt-get install python-dateutil python-docutils python-feedparser python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi poppler-utils python-pip python-pypdf python-passlib python-decorator gcc python-dev mc bzr python-setuptools python-markupsafe python-reportlab-accel python-zsi python-yaml python-argparse python-openssl python-egenix-mxdatetime python-usb python-serial lptools make python-pydot python-psutil python-paramiko poppler-utils python-pdftools antiword python-requests python-xlsxwriter python-suds python-psycogreen python-ofxparse python-gevent | |
| Step-3: Odoo Web dependencies | |
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
| 1. Open terminal via Ctrl+Alt+T & run command to install the Key: | |
| wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
| 2. Then add the apt repository via command: | |
| echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
| 3. Finally check updates and install sublime-text by running commands on terminal | |
| sudo apt update && sudo apt install -y sublime-text | |
| Uninstall Sublime Text: |