import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
This file contains hidden or 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 ThreadsExample implements Runnable { | |
| static int counter = 1; // a global counter | |
| static ReentrantLock counterLock = new ReentrantLock(true); // enable fairness policy | |
| static void incrementCounter(){ | |
| // Using ReenterantLock for avoid starvation problem | |
| counterLock.lock(); | |
| // Always good practice to enclose locks in a try-finally block |
This file contains hidden or 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 com.apploidxxx.entity.queue; | |
| import com.apploidxxx.entity.User; | |
| import org.junit.Test; | |
| import java.util.List; | |
| import static org.junit.Assert.*; | |
| /** |
This file contains hidden or 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 core.modules.parser.itmo.schedule; | |
| import org.jsoup.Jsoup; | |
| import org.jsoup.nodes.Document; | |
| import org.jsoup.nodes.Element; | |
| import org.jsoup.select.Elements; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| import java.util.HashMap; |
This file contains hidden or 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 core.modules.parser.itmo.schedule; | |
| import core.modules.Time; | |
| import org.jsoup.Jsoup; | |
| import org.jsoup.nodes.Document; | |
| import org.jsoup.nodes.Element; | |
| import org.jsoup.select.Elements; | |
| import java.io.IOException; | |
| import java.util.ArrayList; |
This file contains hidden or 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 core.modules.parser.itmo.schedule; | |
| import core.modules.Date; | |
| import org.jsoup.Jsoup; | |
| import org.jsoup.nodes.Document; | |
| import org.jsoup.nodes.Element; | |
| import org.jsoup.select.Elements; | |
| import java.io.IOException; | |
| import java.util.HashMap; |
This file contains hidden or 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 com.apploidxxx.heliosbackend.rest.network.api.vk; | |
| import lombok.Getter; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.stereotype.Component; | |
| import java.io.IOException; | |
| import java.util.Properties; |
This file contains hidden or 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 com.apploidxxx; | |
| import org.glassfish.grizzly.http.server.CLStaticHttpHandler; | |
| import org.glassfish.grizzly.http.server.HttpServer; | |
| import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; | |
| import org.glassfish.jersey.server.ResourceConfig; | |
| import javax.ws.rs.core.UriBuilder; | |
| import java.io.IOException; | |
| import java.net.URI; |
This file contains hidden or 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 com.apploidxxx.api.util; | |
| import org.apache.commons.codec.digest.Md5Crypt; | |
| import java.util.Base64; | |
| /** | |
| * @author Arthur Kupriyanov | |
| */ | |
| public class Password { |
This file contains hidden or 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 com.apploidxxx.heliosbackend.rest.util; | |
| import com.apploidxxx.heliosbackend.config.ExternalSourcesConfig; | |
| import org.springframework.http.ResponseEntity; | |
| import org.springframework.web.client.RestTemplate; | |
| import java.util.HashMap; | |
| import java.util.Map; | |
| /** |