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.

tuxifan

User
  • Registriert

  • Letzter Besuch

  1. Hier ist meine Loesung: func auslastungAusrechnen(belegung: Array<Belegung>, startDatum: Date, endDatum: Date, station: Station) -> Int { // Rechne wie viel Auslastung 80% der Gesamtverfuegbarkeit entspricht let auslastung80Prozent = Int(station.anzahlBetten * 0.8) // Rechne Auslastung pro Tag var tage: [Date: Int] = [:] // Dictionary bzw. Map! Z.B. std::map<Date, int> in C++ for datum in startDatum...endDatum { tage[datum] = 0 for b in belegung { if b.stationId == station.stationId && b.datumVon <= datum && b.datumBis > datum { tage[datum]! += 1 } } } // Rechne Anzahl Tage an denen Auslastung mehr als 80% war var ergebnis = 0 for (_, belegungen) in tage { if belegungen > auslastung80Prozent { ergebnis += 1 } } return ergebnis } In dem Pseudocode den ich in der Prüfung geschrieben hab, hatte ich die map so deklariert: tage := new Map<Date, Int> Wichtig zu bedenken ist, dass Belegung::datumBis EXKLUSIV war: Belegungen sollten nicht für den Tag gezählt werden an dem sie enden. Das sehe ich bei @user2001 und bei @BeppeCSharpNauter falsch gelöst.

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.