This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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>() { |
This file contains hidden or 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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package readimage; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; |
NewerOlder