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 CodeModelIfForExample { | |
| private static final String CLASS_NAME = "TestClass"; | |
| public static void main(String args[]) throws Exception{ | |
| JCodeModel codeModel = new JCodeModel(); | |
| JDefinedClass c = codeModel._class(CLASS_NAME); | |
| writeIfElse(codeModel, c); |
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
| @Controller | |
| public class ResourceRestController { | |
| @RequestMapping(value="/resource/item", method=RequestMethod.GET) | |
| @ResponseBody | |
| public String list() { | |
| return "list items hit"; | |
| } | |
| @RequestMapping(value="/resource/item", method=RequestMethod.POST) |
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
| In SecurityConfig.java (config) | |
| ====================== | |
| ... | |
| auth.jdbcAuthentication() | |
| .dataSource(...) | |
| .passwordEncoder(passEncoder()) <--- ADD | |
| .usersByUsernameQuery(...) | |
| .authoritiesByUsernameQuery(...); | |
| ... |
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/bash | |
| # Copyright (c) 2014-Present, Scott Cagno | |
| # All rights reserved. [BSD License] | |
| # ------------------------------------------ | |
| # THIS BASH SCRIPT UPLOADS A CORPUS FILE TO | |
| # THE CMU ONLINE LANGUAGE MODELING GENERATOR. | |
| # IT WILL RETURN AND STAGE THE GENERATED | |
| # LANGUAGE MODEL AND DICTIONARY FILES IN THE | |
| # SPECIFIED DIRECTORY (LANGDIR). |
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/bash | |
| # install and stage java8 using apt-get | |
| sudo add-apt-repository ppa:webupd8team/java | |
| sudo apt-get update | |
| sudo apt-get -y install oracle-java8-installer | |
| sudo apt-get autoremove | |
| sudo apt-get -y install oracle-java8-set-default |
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 Map<String, Object> introspect(Object obj) throws Exception { | |
| Map<String, Object> result = new HashMap<String, Object>(); | |
| BeanInfo info = Introspector.getBeanInfo(obj.getClass()); | |
| for (PropertyDescriptor pd : info.getPropertyDescriptors()) { | |
| Method reader = pd.getReadMethod(); | |
| if (reader != null) | |
| result.put(pd.getName(), reader.invoke(obj)); | |
| } | |
| return result; | |
| } |
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
| [program:NAME] | |
| command=java -Xms128m -Xmx1g -XX:+UseCompressedOops -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -jar /opt/NAME.jar | |
| autostart=true | |
| autorestart=true | |
| stderr_logfile=/var/log/NAME.err.log | |
| stdout_logfile=/var/log/NAME.out.log | |
| ... | |
| NOTES: |
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
| (<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)|((function)|\(|\)|\;|([a-z]\.[a-z])|\{|\}) |
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
| a, | |
| a:focus, | |
| a:hover { | |
| color: #fff | |
| } | |
| .btn-default, | |
| .btn-default:focus, | |
| .btn-default:hover { | |
| color: #333; |
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
| var table = { | |
| colNames: [], | |
| rowNames: [], | |
| cells: {}, | |
| addRow: function(rowName) { | |
| add = true; | |
| for(var i = 0; i < this.rowNames.length; i++) { | |
| if(rowName[i] === rowName) add = false; |