Skip to content

Instantly share code, notes, and snippets.

View Dysp's full-sized avatar

Bo Kelly Dysp

  • GSD88
  • Copenhagen, Denmark
View GitHub Profile
require 'rubyXL'
class Kincom
def initialize(file, name)
@filename = find_filename(file)
@subject = name
xlsx_sheets = load(file) #Returnerer object med sheets
create_data_hash(xlsx_sheets) #Returnerer object (hash) med hvert spark og dets rådata
end
..., -0.078, -0.077, -0.075, -0.074, -0.072, -0.071, -0.07, -0.069, -0.068, -0.067
, -0.066, -0.065, -0.065, -0.064, -0.063, -0.062, -0.061, -0.06, -0.058, -0.057,
-0.056, -0.054, -0.052, -0.051, -0.049, -0.047, -0.046, -0.044, -0.043, -0.041,
-0.04, -0.039, -0.038, -0.037, -0.036, -0.035, -0.034, -0.033, -0.032, -0.031,
-0.03, -0.029, -0.027, -0.026, -0.025, -0.024, -0.023, -0.021, -0.02, -0.019, -0
.018, -0.017, -0.016, -0.014, -0.013, -0.013, -0.012, -0.011, -0.01, -0.009, -0.
008, -0.008, -0.007, -0.006, -0.006, -0.005, -0.004, -0.004, -0.003, -0.003, -0.
003, "-2E-3", "-2E-3", "-2E-3", "-1E-3", "-1E-3", "-1E-3", 0, 0, 0, 0, 0, "1E-3"
, "1E-3", "1E-3", "1E-3", 0, 0, 0, 0, 0, "-1E-3", "-1E-3", "-1E-3", "-1E-3", "-1
E-3", "-1E-3", "-1E-3", "-1E-3", 0, 0, "1E-3", "2E-3", 0.003, 0.004, 0.005, 0.00
require 'rubyXL'
# This is a class. It does a lot of things on which I will elaborate later.
class Kincom
def initialize(file, name)
@filename = find_filename(file)
@subject = name
# Returns object with sheets
xlsx_sheets = load(file)
def extract_data
kincom_settings = [:ms_dif_nm, :ms_dif_nms, :ms_dif_nmpc, :subject, :mvc]
p kincom_settings.map { |sym| [self.sym] }.to_h
#output_kincom_to_excel(self, kincom_settings)
end
# Error: NoMethodError: undefined method `sym' for #<Kincom:0x00000004227d98>
#<Kincom:0x00000004f76080
@filename="BD214K Kincom template.xlsx",
@subject="BD214K",
@arm=0.26,
@stop_index=0.5,
@prestress_percentage=0.025,
@begin_percentage=0.025,
@time_values=[0, 30, 50, 100, 200],
@right={"r1"=>{:mvc=>2.43598, :mvc_n
ewton=>499.17622950819674, :mvc_nm=>129.78581967213117, :baseline=>0.03202000000
## I have to columns of data; one with time and the other with heart rate
{ time_1: heart_rate_1, time_2: heart_rate_2.. }
# or
{ time: [time_1, time_2, time_3], heart_rate: [hr1, hr2, hr3] }
# or
class IllnessesController < ApplicationController
before_action :set_illness, only: [:show, :edit, :update, :destroy]
# GET /illnesses
def index
@illnesses = Illness.all
end
# GET /illnesses/1
def show
class IllnessesController < ApplicationController
before_action :set_illness, only: [:show, :edit, :update, :destroy]
# GET /illnesses
def index
@illnesses = Illness.all
end
# GET /illness/1
def show
Showing D:/studmed/studmed/app/views/illnesses/_form.html.erb where line #49 raised:
undefined method `id' for #<Illness::ActiveRecord_Relation:0x0000000c9c1f60>
Did you mean? ids
- if current_account.owner.confirmed?
= render 'my_gear/items/manage_items_content'
- else
br
br
br
br
.bookingsShowGrid__bookingAlerts__alert
| You need to verify your email before you can list your gear.
br