<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>REST API App</display-name>
<listener>
<listener-class>com.example.core.JerseyGuiceServletContextListener</listener-class>
</listener>
<filter>
<filter-name>guiceFilter</filter-name>
<filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>guiceFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>jerseyFilter</filter-name>
<filter-class>org.glassfish.jersey.servlet.ServletContainer</filter-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>com.example.core.JerseyConfiguration</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>jerseyFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
package com.example.core;
import com.google.inject.Scopes;
import com.google.inject.servlet.ServletModule;
import com.example.ws.HeyResource;
import org.glassfish.jersey.servlet.ServletContainer;
import java.util.Map;
import java.util.TreeMap;
class JerseyServletModuleConfig extends ServletModule {
@Override
protected void configureServlets() {
bind(HeyResource.class).in(Scopes.SINGLETON);
}
}
<Context docBase="/server/file_storage/images" path="/images" />
File file = new File("/server/file_storage/images", id + ".jpg");
SELECT
id, (
3959 * acos (
cos ( radians(78.3232) )
* cos( radians( lat ) )
* cos( radians( lng ) - radians(65.3234) )
+ sin ( radians(78.3232) )
* sin( radians( lat ) )
)
) AS distance
FROM markers
HAVING distance < 30
ORDER BY distance
LIMIT 0 , 20;
<property name="destclass" value="classes" description="Куда сохранить классы"/>
<target name="compile">
<javac srcdir="./src" destdir="${destclass}" classpath="./junit-4.10.jar"/>
</target>
<target name="jtest" depends="compile">
<junit printsummary="on" showoutput="on">
<test name="com.mntu.java.lab1.test.TestArtist"/>
<classpath>
<pathelement location="junit-4.10.jar"/>
<pathelement location="${destclass}"/>
</classpath>
</junit>
</target>
<span id="icon-1"></span>
<span id="icon-2"></span>
#icon-1 {
opacity: 1.0;
}
#icon-2 {
opacity: 0.0;
}
#icon-1::before {
content: url("../image/search-dark.svg");
}
#icon-2::before {
content: url("../image/search-light.svg");
}
$('#icon-1').animate({'opacity':'0.0'},400);
$('#icon-2').animate({'opacity':'1.0'},400);