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
| #!/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 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
| #!/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 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
| 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 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 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 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 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 |
OlderNewer