import com.aliyun.openservices.log.response.GetLogsResponse; import com.aliyun.openservices.log.Client; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; public class SlsQuickStart { /** * In this example, the AccessKey ID and AccessKey secret are obt...
import java.nio.ByteBuffer; import java.nio.channels.ClosedChannelException; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import java.util.Iterator; import java.util.Set; public class Server...
Next we write JUnit test cases for the TestController. Define the SpringBootHelloWorldTests.java as follows. Spring Boot provides a @SpringBootTest annotation which can be used as an alternative to the standard spring-test @ContextConfiguration annotation when you need Spring Boot features. The ann...
use AwsClientBuilder#setEndpointConfiguration(AwsClientBuilder.EndpointConfiguration) for example: builder.setEndpointConfiguration(new EndpointConfiguration(endpoint, signingRegion)); Overrides the default endpoint for this client ("https://email.us-east-1.amazonaws.com"). Callers can use this m...
For example, if daylight saving time ends at 2:00 am in the wall clock time, it can be specified by 7200000 milliseconds in the #WALL_TIME mode. In this case, the wall clock time for an end-rule means the same thing as the daylight time. The following are examples of parameters for...
importjava.io.File; importjava.io.IOException; importjava.util.EnumMap; importjava.util.Map; /** * @author Crunchify.com * Simple QR Code Generator Example - Create QR codes for free. */ publicclassCrunchifyQRCodeGenerator{ publicstaticvoidmain(String[]args){ ...
The main points to notice about the preceding example are: As usual, import the metadata annotations used in the file: import javax.interceptor.AroundInvoke;import javax.interceptor.InvocationContext;import javax.ejb.PostActivate;import javax.ejb.PrePassivate; The interceptor class is plain Java class...
StdSchedulerFactory; import java.util.Date; /** * SimpleTrigger:在某个时刻开始,然后按照某个时间间隔重复执行; * SimpleTrigger包括属性:开始时间,结束时间,重复次数,重复间隔。 */ public class SimpleTriggerExample { public void run() throws SchedulerException { // 通过SchedulerFactory获取一个调度器实例...
Javadocs are available atjavadoc.io/doc/net.whitbeck/rdb-parser/. Example usage Let's begin by creating a new Redis RDB dump file. Start a server in the background, connect a client to it, and flush all existing data. $ redis-server & $ redis-cli 127.0.0.1:6379> flushall ...
To run these examples using the GlassFish Server, package each one in an application client JAR file. The application client JAR file requires a manifest file, located in thesrc/confdirectory for each example, along with the.classfile.