sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
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 diff(a1, a2) { | |
| var a = {}, diff = []; | |
| for(var i = 0; i < a1.length; i++) { | |
| a[a1[ i ]] = a1[ i ]; | |
| } | |
| for(var j=0; j < a2.length; j++) { | |
| if(a[a2[ j ]]) { | |
| delete a[a2[ j ]]; | |
| } else { |
========================= How to Contributing on github!
We welcome contributed improvements and bug fixes via the usual workflow:
- Fork this repository
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature)
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
| # Double Colon (::) is namespace resolution. It can also call Class Level Constants. So when you do this: | |
| MyModule::MyClass::MySubClass | |
| MyModule::MyClass::MySubClass::CONSTANT | |
| # it is calling the name space of: | |
| module MyModule | |
| class MyClass | |
| class MySubClass | |
| CONSTANT = 'test' |
##Problem:
I spent hours trying to run up a Ruby web server using Sinatra on Cloud 9. The cloud9 IDE instructions on the Output screen say:
Your code is running at http://<project-name>.<username>.c9.io'.
Important: use 'ruby app.rb -p $PORT -b $IP' to run your server apps!
In fact, these are the instructions for a Rails application, and the -b switch is invalid for Sinatra applications, which I discovered when using the Terminal window!!!
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>jQuery Example 1</title> | |
| <style> | |
| .red { | |
| color: red; | |
| } | |
| </style> |
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
| // WHY JavaScript allows you to place functions anywhere in your file | |
| // Link to my blog: https://ddeveloperrblog.wordpress.com/2016/01/13/why-javascript-allows-you-to-place-functions-anywhere-in-your-file/ | |
| var radius = 9; | |
| var myCircleArea = circleArea(radius); | |
| console.log(myCircleArea); | |
| function circleArea(r) { | |
| var a = Math.PI * r * r; | |
| return 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
| // This part of code is responsible for desktop notification :) | |
| function notifyMe(title, options) { | |
| // Check if the browser supports notifications | |
| if (!("Notification" in window)) { | |
| console.log("This browser does not support desktop notification"); | |
| } | |
| // Check whether notification permissions have alredy been granted | |
| else if (Notification.permission === "granted") { |