smali

среда, 21 февраля 2018 г.

datadog/squid

https://hub.docker.com/r/datadog/squid/

Introduction

Dockerfile to create a Docker container image for Squid proxy server.
Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
$This container is based off Sameer Naik's existing squid container. Big thanks to him for his many great docker containers.

Contributing

If you find this image useful here's how you can help:
  • Send a pull request with your awesome features and bug fixes
  • Help users resolve their issues.

5 Hidden Secrets in Java

 
Do you want to be a Java master? Uncover the ancient secrets of Java. We'll focus on extending annotations, initialization, comments, and enum interfaces.

As programming languages grow, it is inevitable that hidden features begin to appear and constructs that were never intended by the founders begin to creep into common usage. Some of these features rear their head as idioms and become accepted parlance in the language, while others become anti-patterns and are relegated to the dark corners of the language community. In this article, we will take a look at five Java secrets that are often overlooked by the large population of Java developers (some for good reason). With each description, we will look at the use cases and rationale that brought each feature into the existence and look at some examples when it may be appropriate to use these features.
The reader should note that not all these features are not truly hidden in the language, but are often unused in daily programming. While some may be very useful at appropriate times, others are almost always a poor idea and are shown in this article to peek the interest of the reader (and possibly give him or her a good laugh). The reader should use his or her judgment when deciding when to use the features described in this article: Just because it can be done does not mean it should.

1. Annotation Implementation

Since Java Development Kit (JDK) 5, annotations have an integral part of many Java applications and frameworks. In a vast majority of cases, annotations are applied to language constructs, such as classes, fields, methods, etc., but there is another case in which annotations can be applied: As implementable interfaces. For example, suppose we have the following annotation definition:
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Test {
    String name();
}

Normally, we would apply this annotation to a method, as in the following:
public class MyTestFixure {
    @Test
    public void givenFooWhenBarThenBaz() {
        // ...
    }
}