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
| import java.security.Provider; | |
| import java.security.Security; | |
| public class SecurityListings { | |
| public static void main(String[] args) { | |
| for (Provider provider : Security.getProviders()) { | |
| System.out.println("Provider: " + provider.getName()); | |
| for (Provider.Service service : provider.getServices()) { | |
| System.out.println(" Algorithm: " + service.getAlgorithm()); | |
| } |
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
| <sequence xmlns="http://ws.apache.org/ns/synapse" name="main"> | |
| <in> | |
| <filter xmlns:ns="http://org.apache.synapse/xsd" source="get-property('To')" regex=".*/StockQuote.*"> | |
| <then> | |
| <send> | |
| <endpoint> | |
| <address uri="http://localhost:9000/services/SimpleStockQuoteService"></address> | |
| </endpoint> | |
| </send> | |
| </then> |
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
| <script> | |
| var text = '{"invideoPromotion":{"items":[{"id":{"type":"video","videoId":"11","websiteUrl":""},"timing":{"type":"ms","offsetMs":"2222"},"customMessage":"aa","promotedByContentOwner":"vanji"}]}}' | |
| var obj = JSON.parse(text); | |
| document.writeln(JSON.stringify(obj)); | |
| for (var i = 0; i < obj.invideoPromotion.items.length; i++) { | |
| if (obj.invideoPromotion.items[i].id.type == 'video') { | |
| if (obj.invideoPromotion.items[i].id.websiteUrl == '') { | |
| delete obj.invideoPromotion.items[i].id.websiteUrl; | |
| } |
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
| <api xmlns="http://ws.apache.org/ns/synapse" name="strip" context="/strip"> | |
| <resource methods="POST GET"> | |
| <inSequence> | |
| <header name="Authorization" scope="transport" value="Bearer XXXXXXXXXXXXXXXXXXXXX"></header> | |
| <property name="uri.var.chargeId" expression="json-eval($.chargeId)" scope="default" type="STRING"></property> | |
| <payloadFactory media-type="json"> | |
| <format></format> | |
| <args></args> | |
| </payloadFactory> | |
| <property name="ContentType" value="application/x-www-form-urlencoded" scope="axis2"></property> |
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
| <api xmlns="http://ws.apache.org/ns/synapse" name="TestApi" context="/TestContext"> | |
| <resource methods="POST GET"> | |
| <inSequence> | |
| <log level="custom"> | |
| <property name="Message Flow" value="Roovershof Plant Search API - IN"></property> | |
| <property name="HTTP_METHOD IS###########" expression="$axis2:HTTP_METHOD"></property> | |
| <property name="ip address" expression="get-property('axis2','REMOTE_ADDR')"></property> | |
| <property name="Authorization" expression="get-property('transport','Authorization')"></property> | |
| </log> | |
| <property name="TIME_IN" expression="get-property('SYSTEM_TIME')" scope="default" type="LONG"></property> |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <proxy xmlns="http://ws.apache.org/ns/synapse" | |
| name="RecursiveValueFetch" | |
| transports="https,http" | |
| statistics="disable" | |
| trace="disable" | |
| startOnLoad="true"> | |
| <target> | |
| <inSequence> | |
| <property name="Key" value="Location" scope="default" type="STRING"/> |
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
| import java.lang.Math; | |
| public class NxNPattern | |
| { | |
| public static void main(String[] args) | |
| { | |
| for (int i = 0, j = 0; i < 49; i++) { | |
| if (i % 7 == 0) { | |
| if (j > 0) System.out.println(); | |
| j++; |
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
| Verifying that +vanjikumaran is my blockchain ID. https://onename.com/vanjikumaran |
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
| <sequence name="_auth_failure_handler_" xmlns="http://ws.apache.org/ns/synapse"> | |
| <switch source="$trp:Accept"> | |
| <case regex="application/json"> | |
| <property name="error_message_type" value="application/json"/> | |
| </case> | |
| <default> | |
| <property name="error_message_type" value="application/xml"/> | |
| </default> | |
| </switch> | |
| <sequence key="_build_"/> |
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
| # Copyright 2017 Vanji | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |