Skip to content

Instantly share code, notes, and snippets.

View testzugang's full-sized avatar

Meinhard Gredig testzugang

View GitHub Profile
@testzugang
testzugang / opposite_uniq
Last active December 16, 2015 02:59
If in need for the opposite of "uniq" get only the duplicated entries in an array.
duplicate_keys = []
all_keys.uniq.each do |k|
count = all_keys.count(k)
duplicate_keys << k if count > 1
end
require 'net/dav'
class WebDavWorker
attr_reader :uri, :username, :password, :errors
attr_accessor :connection
def self.connect_to_uri uri, username, password
worker = WebDavWorker.new(uri, username, password)
//@version=5
indicator('Vertical Lines', overlay=true, scale=scale.none)
sess1 = input.float(10.0, '1', minval=0.0, maxval=23.60)
sess2 = input.float(12.0, '2', minval=0.0, maxval=23.60)
sess3 = input.float(14.0, '3', minval=0.0, maxval=23.60)
offset = input.int(60, "Future offset", 0, 120, 1)
//@version=5
indicator("Session Times", overlay=true)
///Sessions
morning = input.session("0830-1030", "Morgen Impuls")
midday = input.session("1030-1530", "Mittagspause")
afternoon = input.session("1530-1730", "Nachmittag Impuls")
evening = input.session("1730-2030", "Abend Pause")
closing = input.session("2030-2200", "Abend Impuls")