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("js.lang"); // 没有包管理时,也可简单写成 js = {lang:{}}; | |
js = {lang:{}}; | |
js.lang.String = function(){ | |
this.REGX_HTML_ENCODE = /"|&|'|<|>|[\x00-\x20]|[\x7F-\xFF]|[\u0100-\u2700]/g; | |
this.REGX_HTML_DECODE = /&\w+;|&#(\d+);/g; | |
this.REGX_TRIM = /(^\s*)|(\s*$)/g; | |
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 pckName | |
import org.springframework.beans.BeansException; | |
import org.springframework.beans.factory.NoSuchBeanDefinitionException; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
// | |
// 使用 SpringContextUtil.getBean(SchedulerFactoryBean.class); | |
// <bean class="pckName.SpringContextUtil" scope="singleton"></bean> |
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 pkgName; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Set; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
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 xxx; | |
import org.xxx.utils.Encodes; | |
public class EncodeDemo { | |
public static void main(String[] args) throws Exception { | |
System.out.println(Encodes.encodeHex("你好,世界+あい/うえお@xxx.com".getBytes())); | |
System.out.println(Encodes.encodeBase62("你好,世界+あい/うえお@xxx.com".getBytes())); |
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 org.yct.demo.guava; | |
import com.google.common.base.MoreObjects; | |
import com.google.common.base.Objects; | |
import static com.google.common.base.Preconditions.*; | |
import com.google.common.collect.ComparisonChain; | |
import com.google.common.collect.Ordering; | |
public class Employee implements Comparable<Employee> { | |
private String name; |
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 org.demoweb.jpa.entity; | |
import java.io.Serializable; | |
import javax.persistence.*; | |
import java.util.Date; | |
/** | |
* The persistent class for the CC_CARE_TASK database table. | |
* |
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 org.demoweb.ws; | |
import java.io.IOException; | |
import org.atmosphere.cache.UUIDBroadcasterCache; | |
import org.atmosphere.client.TrackMessageSizeInterceptor; | |
import org.atmosphere.config.service.AtmosphereHandlerService; | |
import org.atmosphere.cpr.AtmosphereResource; | |
import org.atmosphere.cpr.AtmosphereResponse; | |
import org.atmosphere.handler.OnMessage; |
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
CREATE TABLE `comments` ( | |
`id` bigint(20) NOT NULL AUTO_INCREMENT, | |
`text` text NOT NULL, | |
PRIMARY KEY (`id`) | |
) ; | |
CREATE TABLE `comments_tree` ( | |
`parent_id` bigint(20) NOT NULL, | |
`child_id` bigint(20) NOT NULL, | |
`level` int(11) DEFAULT NULL, |
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 org.greycode.sd.base.log; | |
import java.util.Map; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import org.apache.logging.log4j.core.appender.AppenderLoggingException; | |
import org.apache.logging.log4j.nosql.appender.DefaultNoSqlObject; | |
import org.apache.logging.log4j.nosql.appender.NoSqlConnection; | |
import org.apache.logging.log4j.nosql.appender.NoSqlObject; |