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
// you can also use imports, for example: | |
// import java.util.*; | |
// you can write to stdout for debugging purposes, e.g. | |
// System.out.println("this is a debug message"); | |
class Solution { | |
public int solution(int[] A) { | |
// write your code in Java SE 8 | |
int size = A.length; |
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
{"sig":"310026e54272625e0bfdf382ec3619fe4f90be7d698629cd695bc91c7398efc2f1451fbcca5cbba300274f5b126021557f2e33186a2f4a60956968bd26f804b70","msghash":"8fff1ad7a2e821ce538e854aa89ebed636300b12b7fd4d79b743af4d839d4544"} |
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
<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/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.pfl.samples</groupId> | |
<artifactId>jee7-websocket-configurator</artifactId> | |
<packaging>war</packaging> | |
<version>0.0.1-SNAPSHOT</version> | |
<name>jee7-websocket-configurer Maven Webapp</name> | |
<url>http://maven.apache.org</url> | |
<dependencies> |
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 java.util.ArrayList; | |
import java.util.Collection; | |
public class CollectionToArray { | |
public static void main(String[] args) { | |
Collection<String> collection = new ArrayList<String>(); | |
collection.add("jack"); | |
collection.add("john"); | |
collection.add("jason"); |
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 com.baidu.nightingale.common.aop; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
/** | |
* 使用Spring AOP切面进行能分析. 将此注解声明在方法上,可将方法执行时间统计在LOG中 | |
* |
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
/** | |
* Add URLs and/or URL patterns for the given path. | |
* @param urls the Set of URLs for the current bean | |
* @param path the currently introspected path | |
*/ | |
protected void addUrlsForPath(Set<String> urls, String path) { | |
urls.add(path); | |
if (this.useDefaultSuffixPattern && path.indexOf('.') == -1 && !path.endsWith("/")) { | |
urls.add(path + ".*"); |