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 ShapeModel(shapeStr) { | |
| this.shapeStr = shapeStr; | |
| } | |
| ShapeModel.prototype = { | |
| doClick: function() { | |
| alert("Clicked "+this.shapeStr); | |
| } | |
| }; | |
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 layout = { | |
| layoutMgrData : "layoutMgr", | |
| instances : [], | |
| _addInstance : function(instance) { | |
| var added = false; | |
| // Need to ensure the instances are sorted outer-to-inner for | |
| // any containment relationships. That way we layout the broadest | |
| // element and then allow the inners to adjust accordingly. | |
| var len = layout.instances.length; |
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
| set +x | |
| echo "Deploying to Tomcat at http://tomcat:8080/myapp" | |
| curl -s --upload-file target/MyApp-1.0.war "http://user:password@tomcat:8080/manager/text/deploy?path=/myapp&update=true&tag=${BUILD_TAG}" |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.exmaple</groupId> | |
| <artifactId>app</artifactId> | |
| <version>1.0</version> | |
| <properties> |
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
| @Component | |
| @ManagedResource | |
| public class GeneralMetricsResource { | |
| private int total; | |
| private ArrayList<AtomicInteger> specifics = new ArrayList<>(); | |
| public void inc(int specific) { | |
| total++; |
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
| body{ | |
| margin: 0 auto; | |
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
| color: #444444; | |
| line-height: 1; | |
| max-width: 960px; | |
| padding: 5px; | |
| } | |
| h1, h2, h3, h4 { | |
| color: #111111; |
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
| JsonFactory jsonFactory = new JsonFactory(); | |
| StringWriter prefValue = new StringWriter(); | |
| try { | |
| JsonGenerator jsonGen = jsonFactory.createJsonGenerator(prefValue); | |
| jsonGen.writeStartArray(); | |
| for (int i = 0; i < source.getSize(); ++i) { | |
| jsonGen.writeString(source.getElementAt(i).getAbsolutePath()); | |
| } | |
| jsonGen.writeEndArray(); | |
| jsonGen.close(); |
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
| $ dns-sd -B _rmi._tcp | |
| Browsing for _rmi._tcp | |
| Timestamp A/R Flags if Domain Service Type Instance Name | |
| 6:28:50.046 Add 2 12 local. _rmi._tcp. vidsync | |
| Geoff@Quattro ~ | |
| $ dns-sd -L vidsync _rmi._tcp | |
| Lookup vidsync._rmi._tcp.local | |
| 6:28:59.218 vidsync._rmi._tcp.local. can be reached at Quattro.local.:21099 (interface 12) |
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
| $ tasklist /fi "IMAGENAME eq javaw.exe" | |
| Image Name PID Session Name Session# Mem Usage | |
| ========================= ======== ================ =========== ============ | |
| javaw.exe 6600 Console 1 652,696 K | |
| javaw.exe 1312 Console 1 71,100 K |
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(org.slf4j.Logger,org.slf4j.LoggerFactory)} | |
| private static final Logger logger = LoggerFactory.getLogger(${enclosing_type}.class); |