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; |
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
protected synchronized Class<?> loadClass(String name, boolean resolve) | |
throws ClassNotFoundException | |
{ | |
// First, check if the class has already been loaded | |
Class c = findLoadedClass(name); | |
if (c == null) { | |
try { | |
if (parent != null) { | |
c = parent.loadClass(name, false); | |
} else { |
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
#!/opt/local/bin/gprolog --consult-file | |
segment([H1,H2],[H1,H2]):-!. | |
segment([H1,H2],[H1,H2|_]):-!. | |
segment([H1,H2],[_,H4|T2]) :- segment([H1,H2],[H4|T2]). | |
adjacent([H1,H2],L1,L2) :- segment([H1,H2],L1),!;segment([H2,H1],L2),!. | |
valid_set([],_,_). | |
valid_set([H|T],Y,AL):- member(H,Y), \+(member(H,AL)), valid_set(T,Y,[H|AL]). |
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
#!/opt/local/bin/gprolog --consult-file | |
valid_queen(Col) :- | |
member(Col,[1,2,3,4,5,6,7,8]). | |
valid_board([]). | |
valid_board([H|T]):- valid_queen(H),valid_board(T). | |
diags1(_,[],[]). | |
diags1(Row,[Col|QT],[D|DT]) :- |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
namespace TimerDeferredEval | |
{ | |
class JobScheduler : IDisposable | |
{ | |
private static readonly TimeSpan DueTime = new TimeSpan(0, 0, 0, 5); |
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
#!/opt/local/bin/gprolog --consult-file | |
rev([X],[X]). | |
rev([H|T],RL) :- rev(T,RT), append(RT,[H],RL). |
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
#!/opt/local/bin/gprolog --consult-file | |
book('Seven langauges in seven days','Bruce tate'). | |
book('Beyond Java','Bruce tate'). | |
book('Bitter Java','Bruce tate'). | |
book('Spring Developer Note Book','Bruce tate'). | |
book('C programming language','Ritchie','Kernighan'). | |
book('Practice Of Programming','Kernighan','Pike'). | |
book('Unix Programming Environment','Pike','Kernighan'). |
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
#!/usr/bin/env io | |
OperatorTable addAssignOperator(":", "genAttribute") | |
Builder := Object clone | |
Builder genAttribute := method(k,v, | |
k = k asMutable removePrefix("\"") removeSuffix("\"") | |
write(" "..(k)..("=\"")..(v).."\"") ) | |
Builder curlyBrackets := method( |
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
list( list(2,3) list(3,4,5) list(6)) flatten sum |
NewerOlder