I hereby claim:
- I am jasdeepsingh on github.
- I am jasdeep (https://keybase.io/jasdeep) on keybase.
- I have a public key whose fingerprint is 6550 3A83 EAC2 9730 5A82 095C CC82 3B63 DB9B 2E7F
To claim this, I am signing this object:
| // in router | |
| angular.module('app-name', [], function($routeProvider, $locationProvider, UserService) { | |
| $routeProvider. | |
| when('/user/:userName', { | |
| templateUrl: 'userShowPage', | |
| controller: UserController, | |
| resolve: { | |
| //resolve functions here... | |
| loadedUser: UserController.resolve.loadUser |
I hereby claim:
To claim this, I am signing this object:
| # Ruby problem exercise from: http://www.rubeque.com/problems/a-man-comma--a-plan-comma--a-canal--panama-excl- | |
| # We've covered the above problem at Brainstation Toronto: Backend Programming - First Cohort. (http://brainstation.it) | |
| # The following solution is O(N^2) | |
| # I've deliberately kept is as such (O(N^2)) so as to make sure | |
| # It's easier to explain to the students. | |
| def palindrome?(str) | |
| str == str.reverse |
| var string = "my string where i'll count the occurrences"; | |
| var arr = string.split(""); | |
| obj = {}; | |
| arr.forEach(function(elem) { obj[elem] = 0 }); | |
| arr.forEach(function(elem) { obj[elem]++ }); |
| previous_work_report.visits.active.select('schedule_visits.id, schedule_visits.uuid').select_all.each do |v| | |
| Schedule::SimpleVisit.verify_and_clone_with_schedule(self, v['id'].to_i, v['uuid'].to_i) | |
| end |
| describe Class do | |
| # let blocks are always single line blocks. | |
| let(:variable) { value } | |
| # context blocks always have a string description. | |
| context "when something" do | |
| before(:each) do | |
| # before blocks are always multilined |
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.11' | |
| gem 'puma' | |
| # .. other beautiful glowing gems you might have in your project. |
| $ cd ~/Downloads/redis-2.4.14 | |
| $ make test | |
| $ make |
| >> tri = Hash.new { |hash,n| hash[n] = (n*(n+1))/2 } | |
| {} | |
| >> tri[1] = 1 # Setup the base case | |
| 1 | |
| >> tri[4] | |
| 10 | |
| >> tri[433] | |
| 93961 |
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'net/http' | |
| require 'uri' | |
| require 'nokogiri' | |
| require 'mail' | |
| url = ###/tracktest.php | |
| refnum = # my application reference number. |