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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi" /> | |
<title>jQuery Socket Chat</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script> | |
<script type="text/javascript" src="jquery.socket-1.0a1.js"></script> | |
<script type="text/javascript"> | |
$(function() { |
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.github.flowersinthesand.samples; | |
import javax.servlet.annotation.WebServlet; | |
import org.atmosphere.cpr.AtmosphereServlet; | |
@SuppressWarnings("serial") | |
@WebServlet(urlPatterns = "/test-with-atmosphere", loadOnStartup = 0) | |
public class MyServlet extends AtmosphereServlet { | |
} |
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
2013-05-07 23:35:39.382:INFO:oejs.Server:jetty-8.1.8.v20121106 | |
2013-05-07 23:35:39.477:INFO:oejw.WebInfConfiguration:Extract jar:file:/C:/Users/DongHwan/git/portal-java/samples/chat-atmosphere/target/portal-chat-atmosphere.war!/ to C:\Users\DongHwan\git\portal-java\samples\chat-atmosphere\target\portal-chat-atmosphere | |
2013-05-07 23:35:39.922:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one. | |
Null identity service, trying login service: null | |
Finding identity service: null | |
2013-05-07 23:35:41.177:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,[file:/C:/Users/DongHwan/git/portal-java/samples/chat-atmosphere/target/portal-chat-atmosphere/, jar:file:/C:/Users/DongHwan/git/portal-java/samples/chat-atmosphere/target/portal-chat-atmosphere/WEB-INF/lib/portal-atmosphere-0.7-20130228.125522-9.jar!/META-INF/resources/, jar:file:/C:/Users/DongHwan/git/portal-java/samples/chat-atmosphere/target/portal-chat-atmosphere/WEB-INF/lib/portal-core-0.7-20 |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<profiles version="11"> | |
<profile kind="CodeFormatterProfile" name="portal.js" version="11"> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.indent_empty_lines" value="true"/> | |
<setting id="org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if" value="16"/> |
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
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". | |
SLF4J: Defaulting to no-operation (NOP) logger implementation | |
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building Chat for Atmosphere 0.7-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] >>> jetty-maven-plugin:9.0.4.v20130625:run-war (default-cli) @ portal-chat-atmosphere >>> |
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
diff --git a/play/pom.xml b/play/pom.xml | |
index 1153e08..27c4100 100644 | |
--- a/play/pom.xml | |
+++ b/play/pom.xml | |
@@ -16,7 +16,7 @@ | |
<artifactId>portal-core</artifactId> | |
</dependency> | |
<dependency> | |
- <groupId>play</groupId> | |
+ <groupId>com.typesafe.play</groupId> |
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
$('#table-http-status-codes-1 tbody tr').each(function(i, elem) { | |
var code = elem.children[0].innerHTML; | |
var reason = elem.children[1].innerHTML; | |
if (!!+code && reason !== 'Unassigned') { | |
console.log('/**'); | |
console.log(' * {@code '+code+' '+reason+'}'); | |
console.log(' */'); | |
console.log('public static final Status '+reason.toUpperCase().replace(/[\s\-]/ig, '_')+' = new Status('+code+', "'+reason+'");'); | |
console.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
/* | |
* Copyright 2012-2013 Donghwan Kim | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 os.path | |
current_dir = os.path.dirname(os.path.abspath(__file__)) | |
import cherrypy | |
import simplejson | |
import time | |
def RPC_handler(*args, **kwargs): | |
cherrypy.response.headers['Content-Type'] = 'text/javascript' |
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
public abstract class Handler<T> implements Action<Map<String, Object>> { | |
private final Class<T> desiredType; | |
@SuppressWarnings("unchecked") | |
public Handler() { | |
// Each casting is not safe. Improve if you want to use in production | |
// See org.springframework.core.GenericTypeResolver.resolveTypeArgument | |
ParameterizedType pt = (ParameterizedType) this.getClass().getGenericSuperclass(); | |
desiredType = (Class<T>) pt.getActualTypeArguments()[0]; |
OlderNewer