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
language: java | |
sudo: required | |
dist: trusty | |
before_install: | |
- sudo sh -c "echo 'deb http://download.mono-project.com/repo/debian wheezy main' > /etc/apt/sources.list.d/mono-xamarin.list" | |
- sudo sh -c "echo 'deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main' >> /etc/apt/sources.list.d/mono-xamarin.list" | |
- sudo apt-get -qq update | |
- sudo apt-get install --force-yes mono-devel |
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 bash | |
# Secure workaround for https://issues.sonatype.org/browse/MVNCENTRAL-1369 | |
# Navigate to the root of your Spring Boot project where a Maven wrapper is present and run this script | |
cd .mvn/wrapper | |
wget https://gist.githubusercontent.com/kbastani/d4b4c92969ec5a22681bb3daa4a80343/raw/f166086ef051369383b02dfb74317cd07b6f2c6e/settings.xml | |
cd ../../ | |
./mvnw clean install -s .mvn/wrapper/settings.xml |
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 class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>Números da Megasena</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="apple-touch-icon" href="icon.png"> | |
<!-- Place favicon.ico in the root directory --> |
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
@echo off | |
ipconfig /release | |
echo Reparando a conexão... | |
arp -d * | |
nbtstat -R | |
ipconfig /flushdns | |
nbtstat -RR | |
ipconfig /registerdns | |
netsh interface ip set address "local" dhcp | |
ipconfig /renew |
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 br.gov.sp.tce.audesp.controller.servlet; | |
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.util.Enumeration; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
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.*; | |
import java.util.*; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
int n = in.nextInt(); | |
int m = in.nextInt(); |
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.*; | |
import java.util.*; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
int testCases = in.nextInt(); | |
for (int i=0; i< testCases; i++) { | |
if (in.hasNextLong()) { |
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 EuclideanAlgorithm { | |
private final List<Long> numbers; | |
public EuclideanAlgorithm(final List<Long> numbers) { | |
this.numbers = Collections.unmodifiableList(numbers); | |
} | |
public long calculateGCD() { | |
Iterator<Long> it = numbers.iterator(); |
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
#!/bin/bash | |
function findClassesToImplementSerializable() { | |
for filename in $(find . -name "*.java"); | |
do | |
echo $filename | /bin/grep -v "test"; | |
if [ "${?}" -eq 0 ] | |
then | |
echo "$filename"; | |
changeline; | |
fi |
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
@Override | |
public final void onMessage(final Message message, final Channel channel) throws IOException { | |
try { | |
logger.all().logInfo(String.format("Received Message: %s",message)); | |
Assert.notNull(message, "Unknow message: " + message); | |
if (consumerEnabled()) { | |
T object = getObject(message); | |
this.beforeOnMessage(object); | |
R response = this.onMessage(object); | |
this.afterOnMessage(object); |
NewerOlder