Like Tree1Likes
  • 1 Post By tabstop

Running Algorithm on Rails Database

This is a discussion on Running Algorithm on Rails Database within the Tech Board forums, part of the Community Boards category; Hi, So I am currently running an iPhone program that basically draws a lot of statistics from a scientific test. ...

  1. #1
    Registered User
    Join Date
    Aug 2011
    Posts
    2

    Running Algorithm on Rails Database

    Hi,

    So I am currently running an iPhone program that basically draws a lot of statistics from a scientific test. I am storing the results in a Rails backend. I have one cell with the userID, and another cell with all the data in a string such in the format "Statistic1=5, Statistic2=6, etc." (all separate variables are separated by commas) I want to run an algorithm on this data, and output the result. How do I draw the data from the Rails backend into a form that I can play with in C? (aka getting the data, and then breaking up the cell data into a format that I can run an algorithm on it?) Cheers!

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    I'm not sure how you ended up in the Game Programming section, unless there's some significant context missing.

    In any rate: I'm assuming your Rails is storing some file somewhere (other than your iPhone). Do you know what format that file is in?

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    Moved (for now).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    It depends on what database rails is using as a backend.

    Is there a .yml file with the database adapter details somewhere in the rails app? If so, look what adapter its using and look for a C library for that backend

    Could be mysql (MySQL :: MySQL 5.0 Reference Manual :: 19.8 MySQL C API) or sqlite (An Introduction To The SQLite C/C++ Interface) or whatever...

  5. #5
    Registered User
    Join Date
    Aug 2011
    Posts
    2
    Yes, it's a mysql database (sorry for posting in the game section, it said something about algorithms). How would I go about implementing this library? Sorry, I'm a bit of a noob- if you could point me in the right direction, that would be amazing :-)

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Those red bits in Fordy's post are links, so maybe you should click them.
    stahta01 likes this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 12-09-2008, 10:09 AM
  2. server rails
    By ginoitalo in forum Tech Board
    Replies: 1
    Last Post: 11-01-2008, 12:37 PM
  3. Database to Database Transfer?
    By draggy in forum C++ Programming
    Replies: 4
    Last Post: 01-17-2007, 09:50 AM
  4. Database Search Algorithm
    By Krupux in forum C Programming
    Replies: 1
    Last Post: 08-28-2003, 09:57 PM
  5. Replies: 1
    Last Post: 10-09-2001, 10:20 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21