All Questions
13 questions
1
vote
2
answers
83
views
Querying and rendering an HTML table of ISP performance statistics
I have multiples measurements and I want to render it into tables like this
Measurements
Operator
browsings
FTP DL
FTP UL
Location
Event
Date
Operator
avg
min
max
avg
min
max
avg
min
max
Verizon
...
3
votes
2
answers
326
views
Build a pizza and choose your toppings
I've created a scenario below, in which a user can build a pizza and choose their toppings, then order their pizza:
...
1
vote
2
answers
2k
views
Finding mongodb records in batches using mongoid [closed]
I want to get records in batches. But mongoid doc says to avoid using skip due as it can be expensive. I wrote this method to iterate through a large number records efficiently.
...
3
votes
1
answer
89
views
Rails UserHelper method
I need help cleaning up this monstrosity. Basically this is a user helper method that generates an array of cumulative user sign ups per week (start of week == Wednesday) starting 2016-06-15.
So ...
1
vote
2
answers
1k
views
Rails create create default database records
In my application I have an accounts model:
class Account < ActiveRecord::Base
belongs_to :user
has_many :invoices
end
The ...
6
votes
1
answer
134
views
Seeding a database
I'm seeding my database with a relatively complex data model.
Constraints: Every meal has exactly one main dish (marked as is_main in intermediate table).
Here is ...
5
votes
2
answers
92
views
Selecting users with biopsies in a given country for charting
I have this monstrosity
...
4
votes
1
answer
48
views
Usertool For Website Admins -- Follow up
A while ago, I posted about creating a user tool for forum admins that allows them to add, edit, and delete users from their desktops. This still is not complete, posting for review on tool so far
I'...
2
votes
1
answer
101
views
Importing Excel file to a database just once
How should I rewrite an if-return-else condition in the middle of this function?
...
4
votes
2
answers
65
views
Multiple DB record creation after a successful operation
I am working on a payment process. Upon a successful payment process, I have to create multiple records. For that, I have made this class:
...
5
votes
1
answer
428
views
Rails models for Users, Offers, Comments, Documents, and Reviews
I want to simplify my Rails models, current looks like this:
...
4
votes
0
answers
117
views
Heterogenous tree in the application domain: How do I represent them?
The Domain
I have three types of items in my domain: ItemA, ItemB, ItemC. (I can't use their real names.) ItemA has one attribute: thing_id. ItemB has 6 attributes: thing_id, name, description, ...
3
votes
2
answers
118
views
Getting student demographics report with ActiveRecord
I have two active records StudentDemographics and StudentWeeklyReport both having has_many ...