Displaying 1 result from an estimated 1 matches for "bkmk".
Did you mean:
bkmg
2006 Jun 28
2
hash value won''t increment with =+ operator
...ple: user "tyler" has
the tag "concerts" on 15 out of his 30 bookmarks. This code:
hash = Hash.new("0"); @user.tags.each do |t|
@user.bookmarks.each do |b|
x = 0
if b.tags.include?(t) then
hash[b.id] =+ 1
puts "hash is #{hash} & #{t.name} is on bkmk #{b.name}"
end
end
end
...results in this output:
hash is 195=>1 (80s is on bkmk 80s Video Clips)
hash is 195=>1 (culture is on bkmk 80s Video Clips)
hash is 195=>1 (music is on bkmk 80s Video Clips)
hash is 195=>1,196=>1 (activism is on bkmk Unemployment: A National
Obli...