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
| 1261089661:ImageDAO.php:function=getImagesByUUID;userID=761;accountType=11; |
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
| {"time":1261089661,"file":"ImageDAO.php","function":"getImagesByUUID","userID":"761","accountType":"11"} |
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() { | |
| emit(this.uploadType, {count : 1}); | |
| } |
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(key, values) { | |
| var sum = 0; | |
| values.forEach(function(f) { | |
| sum += f.count; | |
| }); | |
| return {count: sum}; | |
| }; |
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
| require 'rubygems' | |
| require 'mongo' | |
| def db | |
| $db ||= Mongo::Connection.new("localhost", 27017).db("logs") | |
| end | |
| def logs | |
| $logs ||= db.collection("flex") | |
| end |
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
| require 'model' | |
| @s = Chart.upload_types | |
| @s.find().to_a.each do |f| | |
| puts "#{f['_id']} : #{f['value']['count']}" | |
| end |
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
| mark@stats:~/$ ruby test.rb | |
| document : 300.0 | |
| image : 17910.0 | |
| video : 1000.0 |
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
| require 'rubygems' | |
| require 'sinatra' | |
| require 'haml' | |
| require 'model' | |
| set :port, 80 | |
| get '/' do | |
| protected! |
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
| def pie(data_array) | |
| @labels = "" | |
| @data_str = "" | |
| @data = [] | |
| @sum = 0 | |
| data_array.find().to_a.each do |f| | |
| @labels += "#{f['_id']}|" | |
| @sum += f['value']['count'].to_i | |
| @data.push(f['value']['count'].to_i) | |
| end |
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
| %h1 | |
| Stats | |
| #upload | |
| Uploaded File Breakdown | |
| #pie= @upload_types |
OlderNewer