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 Classe { | |
} |
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 tasks.metric.cc; | |
import japa.parser.JavaParser; | |
import japa.parser.ast.CompilationUnit; | |
import java.io.InputStream; | |
import model.SourceCode; | |
import tasks.metric.ClassInfoVisitor; | |
import tasks.metric.Metric; |
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
\documentstyle[11pt]{book} | |
\newenvironment{tubainapart} | |
{ | |
\hrule | |
\Huge\bf \begin{center} | |
} | |
{ | |
\end{center} | |
\hrule |
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.io.File; | |
import java.util.ArrayList; | |
import java.util.List; | |
import br.com.caelum.vraptor.InterceptionException; | |
import br.com.caelum.vraptor.core.InterceptorStack; | |
import br.com.caelum.vraptor.interceptor.Interceptor; | |
import br.com.caelum.vraptor.ioc.Component; | |
import br.com.caelum.vraptor.resource.ResourceMethod; |
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 S3FileProvider { | |
private final AmazonS3Client amazonS3Client; | |
public S3FileProvider(AmazonS3Client amazonS3Client) { | |
this.amazonS3Client = amazonS3Client; | |
} | |
public URL store(File file, String dir, String key) { | |
PutObjectRequest putObjectRequest = new PutObjectRequest(dir, key, file) |
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
18:16:30 WARN [AbstractLifeCycle ] FAILED vraptor: com.google.inject.CreationException: Guice creation errors: | |
1) A binding to br.com.caelum.vraptor.ioc.ComponentFactory<org.hibernate.SessionFactory> was already configured at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.registerFactory(GuiceComponentRegistry.java:161). | |
at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.registerFactory(GuiceComponentRegistry.java:161) | |
1 error | |
com.google.inject.CreationException: Guice creation errors: | |
1) A binding to br.com.caelum.vraptor.ioc.ComponentFactory<org.hibernate.SessionFactory> was already configured at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.registerFactory(GuiceComponentRegistry.java:161). | |
at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.registerFactory(GuiceComponentRegistry.java:161) |
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
javax.servlet.ServletException: br.com.caelum.vraptor.VRaptorException: The selected route is invalid for redirection: br.com.caelum.brutal.controllers.MeuController.post | |
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:944) | |
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:879) | |
at org.apache.jsp._404_jsp._jspService(_404_jsp.java:295) | |
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) | |
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403) | |
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473) | |
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) |
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
16:43:35 WARN [WebAppContext ] Failed startup of context o.e.j.w.WebAppContext{/,file:/home/csokol/caelum/workspace/brutal/src/main/webapp/} | |
com.google.inject.CreationException: Guice creation errors: | |
1) A binding to br.com.caelum.vraptor.interceptor.Interceptor was already configured at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.deepRegister(GuiceComponentRegistry.java:117). | |
at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.deepRegister(GuiceComponentRegistry.java:117) | |
2) A binding to br.com.caelum.brutal.migration.SimpleMigration was already configured at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.deepRegister(GuiceComponentRegistry.java:117). | |
at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.deepRegister(GuiceComponentRegistry.java:117) | |
3) A binding to br.com.caelum.brutal.migration.Migration was already configured at br.com.caelum.vraptor.ioc.guice.GuiceComponentRegistry.deepRegister(GuiceComponentRegistry.java:117). |
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
require 'net/smtp' | |
require 'httparty' | |
server_up = true | |
begin | |
response = HTTParty.get("http://metricminer.org.br/") | |
rescue | |
server_up = false | |
end | |
server_up = false if not response.nil? and response.code != 200 |
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 String getPhoto(Integer width, Integer height) { | |
String size = width + "x" + height; | |
if (photoUri == null) { | |
String digest = Digester.md5(email); | |
String robohash = "http://robohash.org/size_"+size+"/set_set1/bgset_any/"+digest+".png"; | |
String gravatar = "http://www.gravatar.com/avatar/" + digest + ".png?r=PG&size=" + size; | |
try { | |
return gravatar + "&d=" + java.net.URLEncoder.encode(robohash, "UTF-8"); | |
} catch (UnsupportedEncodingException e) { | |
return gravatar; |
OlderNewer