Ad
Code
Diff
  • #!/bin/env bash
    echo "$(dirname $1), $(basename ${1%.*}), ${1##*.}"
    • #!/bin/bash
    • [ $# -eq 1 ] && echo "$(dirname $1), $(basename ${1%.*}), ${1##*.}"
    • #!/bin/env bash
    • echo "$(dirname $1), $(basename ${1%.*}), ${1##*.}"
Strings
Mathematics
Logic
Code
Diff
  • local solution = {}
    
    function solution.initperson(name, iq)
      return {name=name,iq=iq}
    end
            
    local you = solution.initperson("you",0)
    
    print(you.name.." have "..1/you.iq.." IQ!")
    
    return solution
    • local solution = {}
    • function solution.initperson(name, iq)
    • local Person = {}
    • Person.name = name
    • Person.iq = iq
    • return Person
    • return {name=name,iq=iq}
    • end
    • local you = solution.initperson("you",0)
    • print(you.name.." has "..1/you.iq.." IQ!")
    • print(you.name.." have "..1/you.iq.." IQ!")
    • return solution
    • -- hahaha rekt python nerd, lua = INFINITE IQ
    • return solution