A Pen by Captain Anonymous on CodePen.
| function reverse(str){ | |
| letters = ""; | |
| for (var i = str.length-1; i >= 0; i--){ | |
| letters += str[i]; | |
| } | |
| return letters; | |
| } | |
| reverse("nico") | |
| //FINDS THE LONGEST WORD IN A STRING | |
| function longestWord(str){ | |
| parts = str.split(" "); | |
| longest = 0; | |
| word = 0; | |
| for (var i=0; i < parts.length; i++){ | |
| if (longest < parts[i].length) { | |
| longest = parts[i].length; | |
| word = parts[i]; | |
| } |
###The TreasureHunter
This app is a multi player game where users can register for Treasure Hunts that will allow them to search around their city for "Treasures" based on Clues given to them from a Hunt Master.
App will be used by Hunters on mobile phones and by the Hunt Master on desktop.
A Treasure is searched for based on one Clue revealed at:
- the start of the game
- after each consecutive Treasure is found.
| SUGGESTION 1: | |
| -------------------------- | |
| Consider combining Location into Airport model ie: | |
| Insead of | |
| Location.lat | |
| Location.long | |
| Location.id |
| In show.html.erb views, there is inline css for bold and italic that can be refactored onto a css file. | |
| Tables in views files should be rethought, or a least organized better in the file. |
| # There are 4 basic steps to implementing your ActionMailer functionality in a Rails app: | |
| # Step 1. Create your ActionMailer object. Remember that it can have any name, but should finish with "Mailer": | |
| rails g mailer UserMailer | |
| class UserMailer < ActionMailer::Base | |
| default from: "fred@fred.com" | |
| def confirm_user(user) | |
| @user = user |
'You throw yourself off a cliff and you assemble an airplane on the way down.'
This is a quote from LinkedIn founded Reid Hoffman in an article called Fail to Succeed in the UK edition of Wired, which gives a series of examples of how failing, or the threat of failure, has produced some of the most successful entrepreneurial endeavors of this century.
The analogy of throwing yourself off a cliff really hits home for me. Even when the stakes aren’t exactly gigantic, no other activity can generate a greater yield of learning moments than risk taking, no matter what size they may be. It gives you an ability to adapt quickly, allows for a heightened awareness of danger, and perspective on what stagnation can do to your overall sense of well-being. It also gives you an opportunity to control your own destiny. Which is a huge factor in achieving goals. I think it’s important to live a life that involves a lot of time spent outsi