Background blur with CSS

OCT. 2016 UPDATE Since the -moz-element() property doesn’t seem to be widely supported by other browsers except to FF, there’s an even easier technique to apply blurring without affecting the contents of the container. The use of pseudoelements is ideal in this case in combination with svg blur filter. Check the demo using pseudo-element (Demo … Read more

How to create a system tray popup message with python? (Windows)

With the help of the pywin32 library you can use the following example code I found here: from win32api import * from win32gui import * import win32con import sys, os import struct import time class WindowsBalloonTip: def __init__(self, title, msg): message_map = { win32con.WM_DESTROY: self.OnDestroy, } # Register the Window class. wc = WNDCLASS() hinst … Read more

Redirect to a new tab within javascript file

Use the method window.open(url, target) to open a new window (it depends on the browser or the user’s settings whether the URL is opened in a new window or tab): window.open(‘http://stackoverflow.com’, ‘_blank’); For more information about window.open(), read the documentation at w3schools. Please note: Randomly opening a new window (or tab) isn’t allowed in most … Read more

Show a PopupWindow centralized

popupWindow.showAtLocation(anyViewOnlyNeededForWindowToken, Gravity.CENTER, 0, 0); This will center your view. It took me 2 hours of pain to figure this out. I didn’t need any black magic maths to handle this. The view is only needed for the window token, it has no other impact on the location. Gravity tells the layout manager where to start … Read more

flutter – how to create forms in popup

Here you go! showDialog takes a WidgetBuilder as a parameter so you can return any widget. import ‘package:flutter/material.dart’; void main() { runApp(new MaterialApp(home: new MyApp())); } class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { final _formKey = GlobalKey<FormState>(); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( … Read more

Present UIAlertController on top of everything regardless of the view hierarchy

Update Dec 16, 2019: Just present the view controller/alert from the current top-most view controller. That will work 🙂 if #available(iOS 13.0, *) { if var topController = UIApplication.shared.keyWindow?.rootViewController { while let presentedViewController = topController.presentedViewController { topController = presentedViewController } topController.present(self, animated: true, completion: nil) } Update July 23, 2019: IMPORTANT Apparently the method below … Read more

How to handle authentication popup with Selenium WebDriver using Java

The Alert Method, authenticateUsing() lets you skip the Http Basic Authentication box. WebDriverWait wait = new WebDriverWait(driver, 10); Alert alert = wait.until(ExpectedConditions.alertIsPresent()); alert.authenticateUsing(new UserAndPassword(username, password)); As of Selenium 3.4 it is still in beta Right now implementation is only done for InternetExplorerDriver