This file contains 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
Print array 4 elements each time | |
[*(1..16)].each { |v| v%4==0? p(v) : print("#{v},")} |
This file contains 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
#1. Print Hello World | |
puts "Hello World." | |
#2. Index of "Ruby" | |
puts "Hello Ruby".index("Ruby") | |
#3. Name 10 times | |
puts "Srikanth#{$/}" * 10 | |
This file contains 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
DateFormat indiaDtFmt = new SimpleDateFormat("dd/MM/yyyy HH'h'mm"); | |
DateFormat gmtDtFmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
indiaDtFmt.setTimeZone(TimeZone.getTimeZone("Asia/Calcutta")); | |
gmtDtFmt.setTimeZone(TimeZone.getTimeZone("GMT")); | |
Date worldWarIIDate = indiaDtFmt.parse("02/02/1944 06h30"); | |
Date nonWorldWarIIDate = indiaDtFmt.parse("02/02/2006 06h30"); | |
System.err.println(gmtDtFmt.format(worldWarIIDate) +" GMT"); |
This file contains 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 SSLUnificationHandler extends ChannelInboundByteHandlerAdapter { | |
static final String NAME = "HttpSsLUnificationHandler"; | |
protected void addSSLHandler(ChannelPipeline pipeline) throws Exception { | |
//SSL Engine init.... | |
pipeline.addAfter(NAME, "sslHandler", new SslHandler(sslEngine)); | |
} | |
@Override |
This file contains 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 io.swagger.api; | |
import io.swagger.annotations.ApiParam; | |
import io.swagger.api.factories.SessionsApiServiceFactory; | |
import io.swagger.model.Session; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.PathParam; | |
import javax.ws.rs.Produces; |
NewerOlder