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
# User-specific stuff | |
.idea/ | |
*.iml | |
*.ipr | |
*.iws | |
# IntelliJ | |
out/ |
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 BoilerPlate(){ | |
JFrame frame = new JFrame(); | |
JPanel panel = new JPanel(); | |
frame.add(panel, BorderLayout.CENTER); | |
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
frame.setTitle("title"); | |
try { | |
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | |
} catch (ClassNotFoundException | UnsupportedLookAndFeelException | IllegalAccessException | InstantiationException e) { | |
e.printStackTrace(); |
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 lombok.Getter; | |
import lombok.Setter; | |
import spark.ModelAndView; | |
import spark.template.velocity.VelocityTemplateEngine; | |
import java.util.HashMap; | |
@Getter | |
@Setter | |
public class VelocityTemplateBuilder { |
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 class Unicode{ | |
public static boolean containsUnicode(String s){ | |
//you're welcome i did it for you :D | |
Pattern p = Pattern.compile("[^a-z0-9~!@#$%^&*()_+-={}\\[\\]|:\";'<>?,./\\\\ ]", Pattern.CASE_INSENSITIVE); | |
Matcher m = p.matcher(s); | |
return m.find(); | |
} | |
} |
NewerOlder