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 static String renderPage(Class<? extends Page> pageClass, PageParameters pageParameters) | |
{ | |
WebApplication application = WebApplication.get(); | |
ServletContext context = application.getServletContext(); //fake a request/response cycle | |
MockHttpSession servletSession = new MockHttpSession(context); | |
servletSession.setTemporary(true); | |
MockHttpServletRequest servletRequest = new MockHttpServletRequest(application, servletSession, context); | |
MockHttpServletResponse servletResponse = new MockHttpServletResponse(servletRequest); //initialize request and response | |
servletRequest.initialize(); | |
servletResponse.initialize(); |
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.example; | |
import org.apache.wicket.util.time.Duration; | |
import org.eclipse.jetty.http.ssl.SslContextFactory; | |
import org.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.server.bio.SocketConnector; | |
import org.eclipse.jetty.server.ssl.SslSocketConnector; | |
import org.eclipse.jetty.util.resource.Resource; | |
import org.eclipse.jetty.webapp.WebAppContext; | |
import org.eclipse.jetty.plus.webapp.EnvConfiguration; |
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
java.lang.IllegalStateException: Context is already active | |
at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:227) | |
at org.jboss.seam.conversation.plugins.weld.WeldHttpSeamConversationContext.doActivate(WeldHttpSeamConversationContext.java:52) | |
at org.jboss.seam.conversation.api.AbstractSeamConversationContext.activate(AbstractSeamConversationContext.java:51) | |
at net.ftlines.wicket.cdi.CdiContainer.activateConversationalContext(CdiContainer.java:99) | |
at net.ftlines.wicket.cdi.ConversationPropagator.activateConversationIfNeeded(ConversationPropagator.java:137) | |
at net.ftlines.wicket.cdi.ConversationPropagator.onException(ConversationPropagator.java:124) | |
at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:118) | |
at org.apache.wicket.request.cycle.RequestCycleListenerCollection$4.notify(RequestCycleListenerCollection.java:116) | |
at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.ja |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one or more | |
* contributor license agreements. See the NOTICE file distributed with | |
* this work for additional information regarding copyright ownership. | |
* The ASF licenses this file to You 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 |
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 class NoVersionHomePageMapper extends AbstractComponentMapper | |
{ | |
/** | |
* If this is the home page URL, return a bigger compatibility score than | |
* {@link org.apache.wicket.request.mapper.HomePageMapper#getCompatibilityScore(Request)} | |
* | |
* @see org.apache.wicket.request.mapper.HomePageMapper#getCompatibilityScore(org.apache.wicket.request.Request) | |
*/ | |
public int getCompatibilityScore(Request request) | |
{ |
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
/** | |
* jQuery Spotlight | |
* | |
* Project Page: http://dev7studios.com/portfolio/jquery-spotlight/ | |
* Copyright (c) 2009 Gilbert Pellegrom, http://www.gilbertpellegrom.co.uk | |
* Licensed under the GPL license (http://www.gnu.org/licenses/gpl-3.0.html) | |
* Version 1.0 (12/06/2009) | |
* | |
* modified slightly by George Armhold to add a hide() hook for removing the spotlight programmatically. | |
*/ |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
def get_memory_usage | |
`ps -o rss= -p #{Process.pid}`.to_i | |
end | |
HTML_CONTENT = "This is some html<br/>This is some more html<br/>" * 10 |
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
#!/usr/bin/env ruby | |
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.0.0' # NB: works fine with 3.2.13 | |
gem 'mysql2' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# This connection will do for database-independent bug reports. |
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
end of file reached | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/rsolr-1.0.8/lib/rsolr/connection.rb:15:in `execute' | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/sunspot_rails-2.0.0/lib/sunspot/rails/solr_instrumentation.rb:14:in `block in execute_with_as_instrumentation' | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `block in instrument' | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in `instrument' | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:in `instrument' | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/sunspot_rails-2.0.0/lib/sunspot/rails/solr_instrumentation.rb:12:in `execute_with_as_instrumentation' | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/rsolr-1.0.8/lib/rsolr/client.rb:166:in `execute' | |
/Users/foo/.rvm/gems/ruby-1.9.3-p362/gems/rsolr-1.0.8/lib/rsolr/client.rb:161:in `send_and_receive' | |
(eval):2:in `post' |
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
# | |
# RVM profile | |
# | |
# /etc/profile.d/rvm.sh # sh extension required for loading. | |
# | |
if | |
[ -n "${BASH_VERSION:-}" -o -n "${ZSH_VERSION:-}" ] && | |
test "`ps -p $$ -o comm=`" != dash && | |
test "`ps -p $$ -o comm=`" != sh |
OlderNewer