Skip to content

Instantly share code, notes, and snippets.

View KamMif's full-sized avatar
Focusing

Kam KamMif

Focusing
View GitHub Profile
var matrixExample = [
[1, 2, 3, 4],
[4, 5, 6, 5],
[7, 8, 9, 7],
[7, 8, 9, 7]
]
function sumMatrix(matrix) {
var arr = []
var arr2 = []
read = IO.read(ARGV.first)
puts 'hello' if a == nil
read.chomp
one_str = read.split("\n")
name = "Time"
one_str.each {|x| a = x.split("|")
if a[1].include?(name)
d = a[7].to_i
e = a[7].to_f - d
puts a[1]