Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

BiMa13

User
  • Registriert

  • Letzter Besuch

  1. Hallo zusammen, bin fertig geworden und es funktioniert. Vielen Dank für Eure Hilfe! MINS = 60 SEC = 60 def clock(modus, hour_a, min_a, sec_a, hour, min, sec) check_pre(( hour_a.nat? and min_a.nat? and sec_a.nat? and hour.nat? and min.nat? and sec.nat? and modus.nat? and (modus == 24 or modus == 12) and (hour_a >= 0) and (min_a >= 0) and (sec_a >= 0) and (hour >= 0) and (min >= 0) and (sec >= 0) and (hour_a < modus) and (min_a < 60) and (sec_a < 60) and (hour < modus) and (min < 60) and (sec < 60))) #Zeit in Sekunden umwandeln time_in_sec_a = time_to_sec(hour_a, min_a, sec_a) time_in_sec = time_to_sec(hour, min, sec) #Zeiten mit einander Addieren time_in_sec_sum = time_in_sec_a + time_in_sec #Array berechnen [new_time_hour(time_all(modus, time_in_sec_sum)), new_time_min(time_all(modus, time_in_sec_sum)), new_time_sec(time_all(modus, time_in_sec_sum))] end #Methode zum Zeit in Sekunden wandeln def time_to_sec(hour, min, sec) (((hour * MINS ) + min ) * SEC) + sec end #Maximale sekunden anzahl def time_all(modus, sec_all) sec_all % (modus * MINS * SEC) end #Neue Anzahl von Stunden def new_time_hour(sec_all) sec_all / (MINS * SEC) end #Neue Anzahl von Minuten def new_time_min(sec_all) (sec_all % (MINS * SEC)) / SEC end #Neue Anzahl von Sekunden def new_time_sec(sec_all) (sec_all % (MINS * SEC)) % SEC end
  2. Suche nur Hilfe. Wenn du nicht helfen willst, musst du auch nicht antworten.
  3. Wie gesagt, komme ja an dieser Stelle einfach nicht weiter. Vielleicht könntest du mir einen Lösungsvorschlag anbieten:old
  4. def_class(:Clock24,[:hour24,:min,:sec]) { def invariant? () self.hour24.hour24? and self.min.min? and self.sec.sec? end } def_class(:ClockSec,[:day_sec]) { def invariant?() self.day_sec.day_sec? end } Bin jetzt soweit, scheint aber nicht ganz richtig zu sein...:upps
  5. Wir programmieren in Ruby und mir fehlt irgendwie der Anfang. Bräuchte eine Starthilfe. Danke
  6. Hallo, habe eine Aufgabe in der Uni bekommen und komme nicht weiter. Vielleicht kann mir einer helfen. Danke! Uhrenarithmetik Schreiben Sie eine Funktion mit der man eine übliche Digitaluhranzeige (Stunden, Minuten, Sekunde) um einen Zeitbetrag (Stunden, Minuten, Sekunden) vorstellen kann. Die Uhranzeige soll 24 Stunden haben. Das Resultat soll ein Array der Größe 3 sein ([hour,min,sec] z.B. [12,30,10]).

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.