This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const handlePastedImage = (pasteEvent, stateUpdater) => { | |
// No support for clipboard API in MS Edge | |
// https://stackoverflow.com/questions/32113086/microsoft-edge-browser-how-to-read-clipboard-data | |
if (pasteEvent) { | |
pasteEvent.preventDefault(); | |
pasteEvent.stopPropagation(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
public class Utils { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows.Forms; | |
namespace Company.Project.DesktopApp.Dialogs { | |
public partial class UserLoginForm : Form { | |
private const string COMPANYDOMAIN = "company.com"; | |
private MainForm mf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Returns an object with values to use for width and height that are constrained within the given dimensions. | |
* This works with a "landscape" type of container (width > height). | |
* Provides a maximum-sized image for the given container and preserves the aspect ratio. | |
* | |
* @param {number} originalImgWidth starting width of image to constrain | |
* @param {number} originalImgHeight starting height of image to constrain | |
* @param {number} constraintWidth width of container to fit image within | |
* @param {number} constraintHeight height of container to fit image within | |
* @return {object} object containing width and height values of constrained image |