View JacksonConfig.java
@Configuration
public class JacksonConfig {
@Bean
public ObjectMapper objectMapper() {
ObjectMapper mapper = new ObjectMapper();
mapper.setVisibility(PropertyAccessor.GETTER, Visibility.NONE);
mapper.setVisibility(PropertyAccessor.SETTER, Visibility.NONE);
mapper.setVisibility(PropertyAccessor.CREATOR, Visibility.NONE);
mapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
View .bashrc
#show java version on prompt
current_sdk_java_version() {
export PS1="\e[0;32m$(sdk current java version | grep version | sed -e 's/.*version \(.*\)/\1/')\e[m$ "
}
PROMPT_COMMAND="current_sdk_java_version"
View EscapeXmlELResolverListener.java
package br.com.caelum.fj91.seguranca;
import java.beans.FeatureDescriptor;
import java.util.Iterator;
import javax.el.ELContext;
import javax.el.ELResolver;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.jsp.JspContext;
View show-module-resolution.txt
root jdk.management.jfr jrt:/jdk.management.jfr
root jdk.jdi jrt:/jdk.jdi
root javafx.web jrt:/javafx.web
root jdk.xml.dom jrt:/jdk.xml.dom
root jdk.jfr jrt:/jdk.jfr
root jdk.packager.services jrt:/jdk.packager.services
root jdk.httpserver jrt:/jdk.httpserver
root javafx.base jrt:/javafx.base
root jdk.net jrt:/jdk.net
root javafx.controls jrt:/javafx.controls
View 2017-11-22.log
alexandre ~/keyword $ /usr/lib/jvm/java-8-oracle/bin/javac Keyword.java
Keyword.java:3: warning: '_' used as an identifier
int _ = 1;
^
(use of '_' as an identifier might not be supported in releases after Java SE 8)
Keyword.java:4: warning: '_' used as an identifier
System.out.println(_);
^
(use of '_' as an identifier might not be supported in releases after Java SE 8)
2 warnings
View MedicaoDeTempoFilter.java
package br.com.caelum.tarefas.filters;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
View github.gql
query {
repository(owner:"expressjs", name: "express") {
stargazers {
totalCount
}
pullRequests(states: OPEN) {
totalCount
}
issues(states:OPEN) {
totalCount
View static.java
class A {
static int x() {
return 1;
}
}
class B extends A {
static int x() {
return 2;
}
}
View estados-controller.js
angular.module('alurapic')
.controller('EstadosController', function($scope, $http) {
$http.get('/v1/estados')
.success(function(estados) {
$scope.estados = estados;
});
$scope.escolheuEstado = function() {
$scope.cidadeEscolhida = undefined;
console.log($scope.estadoEscolhido);
if($scope.estadoEscolhido) {
View imc_angular_mvc.html
<!DOCTYPE html>
<html ng-app="imcApp">
<head>
<script src="https://code.angularjs.org/1.3.5/angular.min.js"></script>
</head>
<body ng-controller="ImcController">
<label>Peso <input ng-model="peso"/> kg</label><br/>
<label>Altura <input ng-model="altura"/> m</label><br/>
<button ng-click="calculaImc()">Calcular IMC</button>
<div ng-show="exibeResultados">