def fitToWindow(self): """ Fits the image to the scroll area's size. """ sizeImage = self.lblImage.pixmap().size() height, width = sizeImage.height(), sizeImage.width() # If its smaller than self size, let it be normal size if height<self.size().height() and width<self.size().width(): self.normalSize() else: sizeImage.scale(self.size()*0.98, Qt.KeepAspectRatio) # Adjust the scale self.scale = float(sizeImage.height()) / height # Resize image to 95% self's size self.lblImage.resize(sizeImage) # Toggle windowFit (For resize events) self.windowFit = True
I went with this in the end as it is recommended by a i3 maintainer in [a Reddit post](https://www.reddit.com/r/i3wm/comments/3o2bdn/i3_how_to_quickly_switch_between_current_and/).
You have to install `i3ipc` in your global Python for this first (`pip3 install i3ipc`). Then add a startup script that runs:
```
/usr/bin/python3 ~/.config/i3/focus-last.py
```
And add this to `i3/config`:
```
bindsym $mod+Tab exec "/usr/bin/python3 ~/.config/i3/focus-last.py --switch"
```
When webpack bundles your javascript it wraps all of your individual files/modules in functions so they are no longer run in the global scope, therefore if you want to make a variable global you have to explicitly set it on the window object, i.e.
window.a = 1;
// (adsbygoogle = window.adsbygoogle || []).push({}); // ]]> Wie die Katzenmutter ihre Jungen erzieht Zunächst ist die Katzenmutter bestrebt, ihren Nachwuchs beisammen zu halten. Ihre wachsamen Augen sind stets auf ihre Jungen gerichtet, wenn diese das Wurflager für erste Ausflüge verlassen. Entfernen sich die Katzenbabys zu weit von der Basis , dann gibt es von der Katzenmutter meist einen kräftigen Schupser in die richtige Richtung. Sind die Kleinen ca. 4 Wochen alt, nehmen sie ihre erste feste Nahrung zu sich. Ab diesem Moment beginnt das eigentliche Katzen erziehen durch die Katzenmutter. So bringt die Mutter von der Jagd Beute mit und legt beispielsweise tote Mäuse in das Nest ihrer Jungen. Die Katzenbabys wissen meist erst nichts damit anzufangen und spielen nur mit der Beute. Die Katzenmutter zeigt ihren Jungen anschließend, wie man die Beute genüsslich verspeist. Die Jungen schauen der Mutter ganz genau zu und versuchen es auch selbst. Ungefähr 14 Tage später folgt di
C. Siefkes, F. Assis, S. Chhabra, and W. Yerazunis. PKDD '04: Proceedings of the 8th European Conference on Principles and Practice of Knowledge Discovery in Databases, page 410--421. New York, NY, USA, Springer-Verlag New York, Inc., (2004)
M. Mintz, S. Bills, R. Snow, and D. Jurafsky. Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP: Volume 2-Volume 2, page 1003--1011. Association for Computational Linguistics, (2009)