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 { clsx, ClassValue } from "clsx"; | |
import { twMerge } from "tailwind-merge"; | |
export const cn = (...inputs: ClassValue[]) => { | |
return twMerge(clsx(inputs)); | |
}; |
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
#!/bin/sh | |
# This hook enforces that commit messages start with a capitalized verb. | |
# ANSI color codes for formatting | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
commit_msg="$1" | |
error_msg="${RED}error: Commit message must start with a capitalized verb${NC}" |
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
{ | |
"medications": [ | |
"Abilify", | |
"Abilify Maintena", | |
"Abiraterone", | |
"Acetaminophen", | |
"Acetylcysteine", | |
"Actemra", | |
"Actos", | |
"Acyclovir", |
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
package javafxcsvtableview; | |
import java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
import javafx.application.Application; | |
import javafx.beans.property.SimpleStringProperty; |
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 isVideo = url => (/\.(mp4|3gp|ogg|wmv|webm|flv|avi*|wav|vob*)$/i).test(url) | |
export const isImage = url => (/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i).test(url) |
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
/* | |
* Copyright 2017 M.Ala Eddine. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
public static void removeErrorIcon(TextField textField) { | |
if (textField instanceof CustomTextField) { | |
CustomTextField customTextField = (CustomTextField) textField; | |
Platform.runLater(() -> { | |
((StackPane)customTextField.getRight().getParent()).getChildren().remove(customTextField.getRight()); | |
}); | |
} | |
} |
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
public void reloadContent() | |
{ | |
//Using Jsoup library https://jsoup.org/cookbook/introduction/parsing-a-document | |
//Get html file | |
InputStream inputStream = Odata.class.getClass().getResourceAsStream("/web/html/template.html"); | |
//Parse the content | |
org.jsoup.nodes.Document doc = Jsoup.parse(inputStream, "UTF-8", ""); | |
//Get Element for make some changes | |
org.jsoup.nodes.Element content = doc.getElementById("name"); | |
//Change the text of element |
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
{ | |
"countries": [ | |
{ | |
"code": "+7 840", | |
"name": "Abkhazia" | |
}, | |
{ | |
"code": "+93", | |
"name": "Afghanistan" | |
}, |
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
private void showJDialog() { | |
JFXDialogLayout dialogContent = new JFXDialogLayout(); | |
dialogContent.setHeading(new Text("Hello" == null ? "good" : "good" + "\n" + "Hello")); | |
dialogContent.setBody(new Text("Body")); | |
JFXButton close = new JFXButton("Close"); | |
dialogContent.setActions(close); | |
JFXDialog dialog = new JFXDialog((StackPane) loginstage.getScene().getRoot(), dialogContent, JFXDialog.DialogTransition.CENTER); | |
close.setOnAction(new EventHandler<ActionEvent>() { |
NewerOlder