If you are temporarily disconnected from the internet and you need to build your projects offline you can use the offline switch on the CLI:
mvn -o package
If you are temporarily disconnected from the internet and you need to build your projects offline you can use the offline switch on the CLI:
mvn -o package
| import org.eclipse.jetty.server.Connector; | |
| import org.eclipse.jetty.server.Server; | |
| import org.eclipse.jetty.server.nio.SelectChannelConnector; | |
| import org.junit.BeforeClass; | |
| import org.junit.Test; | |
| import org.junit.experimental.categories.Category; | |
| import org.junit.runner.RunWith; | |
| import static org.hamcrest.CoreMatchers.is; | |
| import static org.junit.Assert.assertThat; |
| leaderboard = ["ERC", "AMY", "BOB", "AAA", "STU"] | |
| [winner, others..., loser] = leaderboard | |
| console.log """ | |
| First place: #{winner}. | |
| Last place: #{loser}. | |
| """ |
| package org.test; | |
| import java.io.File; | |
| import java.net.MalformedURLException; | |
| import java.net.URL; | |
| import java.net.URLClassLoader; | |
| import java.util.Locale; | |
| import java.util.MissingResourceException; | |
| import java.util.ResourceBundle; |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class Main { | |
| public static void main(String... args) { | |
| // Two identical list of fruit | |
| final List<String> fruit = getFruit(); | |
| final List<String> fruit2 = getFruit(); |
| def reverse(a) | |
| half = a.size / 2 | |
| (0...half).each do |i| | |
| j = a.size - i - 1 | |
| a[i], a[j] = a[j], a[i] | |
| end | |
| a | |
| end | |
| reverse([1, 2]) |
| def binary_search(a, needle) | |
| start = 0 | |
| finish = a.size - 1 | |
| while start <= finish do | |
| middle = start + (finish - start) / 2 | |
| if a[middle] == needle | |
| return middle | |
| elsif a[middle] < needle |
| import org.junit.runner.RunWith | |
| import org.scalatest.junit.JUnitRunner | |
| import org.scalatest.FunSuite | |
| import scala.annotation.tailrec | |
| @RunWith(classOf[JUnitRunner]) | |
| class BinarySearchSuite extends FunSuite { | |
| trait TestBinarySearch { | |
| val v = Vector(1, 2, 4) |
| package com.ffbit.collections; | |
| import static org.hamcrest.CoreMatchers.hasItems; | |
| import static org.hamcrest.CoreMatchers.is; | |
| import static org.hamcrest.CoreMatchers.not; | |
| import static org.junit.Assert.assertThat; | |
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.Collections; |