onecompiler.com
Open in
urlscan Pro
2606:4700:3032::6815:2b34
Public Scan
URL:
https://onecompiler.com/groovy/427a3ed6t
Submission: On August 10 via manual from US — Scanned from US
Submission: On August 10 via manual from US — Scanned from US
Form analysis
0 forms found in the DOMText Content
Editor Challenges Orgs MoreLogin -------------------------------------------------------------------------------- Main.groovy 427A3ED6T New groovy Run New groovy Run Main.groovy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 String s1='''anypoint.platform.client_id=<REPLACE_WITH_PLATFORM_CLIENT_ID> anypoint.platform.client_secret=<REPLACE_WITH_PLATFORM_CLIENT_SECRET> vault.key=<REPLACE_WITH_VAULT_KEY> anypoint.platform.config.analytics.agent.enabled=false mule.env=dev com.mulesoft.dw.dump_files=true Splunk.token=<REPLACE_WITH_SPLUNK_TOKEN> Splunk.host=<REPLACE_WITH_SPLUNK_HOST> Splunk.index=its-crmip-mulesoft-app Splunk.batch_size_count=1 Splunk.verifyHostname=false Splunk.source=td-crmip-arsim-batch-app-dev Splunk.sourcetype=crmip:mulesoft:app:log Splunk.truststore.file=<REPLACE_WITH_SPLUNK_JKS_FILENAME> Splunk.truststore.key=<REPLACE_WITH_SPLUNK_JKS_KEY> json.logger.application.name=td-crmip-arsim-batch-app-dev json.logger.application.version=1.0.0-SNAPSHOT json.logger.disabled.fields=rmId,dateOfBirth,lastName,firstName,bookOfRecord,partyType,number,partyIdentifier,SSNNumberHidden__c,FirstName,LastName,RM_ID__c,RecordTypeId,Mobile__c,Email__c,MiddleName json.logger.masked.fields=rmId,dateOfBirth,lastName,firstName,bookOfRecord,partyType,number,partyIdentifier,SSNNumberHidden__c,FirstName,LastName,RM_ID__c,RecordTypeId,Mobile__c,Email__c,MiddleName org.mule.service.http.impl.service.HttpMessageLogger=DEBUG retail.sf.key=3MVG9c1ghSpUbLl.nu1.bTfERQnmqN7jjTCzPICswWek2sP4QQYOaVQNy6Bo_Csucqal2Ks7UY_psY1JOzqRC retail.sf.keystore=jks/sit/www.pbinm.sit01.hoj.tdbank.ca.jks retail.sf.keystore.alias=www.pbinm.sit01.hoj.tdbank.ca retail.sf.keystore.password=pbinm2023SIT retail.sf.username=mulesoft.integrationuser@td.com.baudev retail.sf.token.authorizationurl=htps://test.salesforce.com/services/oauth2/authorize retail.sf.token.accesstokenurl=htps://test.salesforce.com/services/oauth2/token retail.sf.audienceurl=htps://test.salesforce.com retail.tls.ks.type=JKS retail.tls.ks.path=jks/sit/www.pbinm.sit01.hoj.tdbank.ca.jks retail.tls.ks.alias=www.pbinm.sit01.hoj.tdbank.ca retail.tls.ks.keypassword=pbinm2023SIT retail.tls.ks.password=pbinm2023SIT pkafka.boostrap.urls=bk04.r1.c4.pkfka.dev.td.com:9096,bk03.r1.c4.pkfka.dev.td.com:9096,bk02.r1.c4.pkfka.dev.td.com:9096,bk01.r1.c4.pkfka.dev.td.com:9096 pkafka.group.id=amcb_crmcm_aprty_mule_group pkafka.topic.pattern=amcb_crmcm_aprty_event kafka.configuration.sessiontimeout=60 kafka.configuration.reconnection.frequency=5000 kafka.tls.path=jks/dev/tarsim392crmipc.client.arsim.mule.pkfka.dev.td.com.p12 kafka.tls.type=PKCS12 kafka.keystore.type=JKS kafka.keystore.path=jks/dev/tarsim392crmipc.client.arsim.mule.pkfka.dev.td.com.jks cert.trust.store.password=arsim2022DEV cert.keystore.key.password=arsim2022DEV cert.keystore.password=arsim2022DEV cert.keystore.alias=tarsim392crmipc.client.arsim.mule.pkfka.dev.td.com ''' public String get(String pathKey) throws Exception { def m = [p1:[a1:'ttt']] pathKey?.tokenize('/').each { m = m?.get(it) } return m } public static List vaultPropsGetDuplicateKeysList(String p1, String p2) { List keys1=p1?.readLines().collect { it - ~/=.*$/ } List keys2=p2?.readLines().collect { it - ~/=.*$/ } println keys1 println keys2 return keys1.intersect(keys2) } println null.collect{it} println vaultPropsGetDuplicateKeysList(s1, get('p1/www') ) הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX STDIN STDIN Output: [] [anypoint.platform.client_id, anypoint.platform.client_secret, vault.key, anypoint.platform.config.analytics.agent.enabled, mule.env, com.mulesoft.dw.dump_files, Splunk.token, Splunk.host, Splunk.index, Splunk.batch_size_count, Splunk.verifyHostname, Splunk.source, Splunk.sourcetype, Splunk.truststore.file, Splunk.truststore.key, json.logger.application.name, json.logger.application.version, json.logger.disabled.fields, json.logger.masked.fields, org.mule.service.http.impl.service.HttpMessageLogger, retail.sf.key, retail.sf.keystore, retail.sf.keystore.alias, retail.sf.keystore.password, retail.sf.username, retail.sf.token.authorizationurl, retail.sf.token.accesstokenurl, retail.sf.audienceurl, retail.tls.ks.type, retail.tls.ks.path, retail.tls.ks.alias, retail.tls.ks.keypassword, retail.tls.ks.password, pkafka.boostrap.urls, pkafka.group.id, pkafka.topic.pattern, kafka.configuration.sessiontimeout, kafka.configuration.reconnection.frequency, kafka.tls.path, kafka.tls.type, kafka.keystore.type, kafka.keystore.path, cert.trust.store.password, cert.keystore.key.password, cert.keystore.password, cert.keystore.alias] [] [] created 4 months ago Connect with your tribe one slice of life per day. Available on iOS and Android. Sponsored GROOVY ONLINE COMPILER Write, Run & Share Groovy code online using OneCompiler's Groovy online compiler for free. It's one of the robust, feature-rich online compilers for Groovy language, running the latest Groovy version 2.6. Getting started with the OneCompiler's Groovy editor is easy and fast. The editor shows sample boilerplate code when you choose language as Groovy and start coding. READ INPUTS FROM STDIN OneCompiler's Groovy online editor supports stdin and users can give inputs to programs using the STDIN textbox under the I/O tab. Following is a sample Groovy program which takes name as input and prints hello message with your name. def name = System.in.newReader().readLine() println "Hello " + name ABOUT GROOVY Groovy is an object-oriented programming language based on java. Apache Groovy is a dynamic and agile language which is similar to Python, Ruby, Smalltalk etc. KEY FEATURES * It's not a replacement for java but it's an enhancer to Java with extra features like DSL support, dynamic typing, closures etc. * Accepts Java code as it extends JDK * Greater flexibility * Concise and much simpler compared to Java * Can be used as both programming language and scripting language. SYNTAX HELP DATA TYPES Data typeDescriptionRangeStringTo represent text literalsNAcharTo represent single character literalNAintTo represent whole numbers-2,147,483,648 to 2,147,483,647shortTo represent short numbers-32,768 to 32,767longTo represent long numbers-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807doubleTo represent 64 bit floating point numbers4.94065645841246544e-324d to 1.79769313486231570e+308dfloatTo represent 32 bit floating point numbers1.40129846432481707e-45 to 3.40282346638528860e+38byteTo represent byte value-128 to 127booleanTo represent boolean values either true or falseTrue or False VARIABLES You can define variables in two ways SYNTAX: data-type variable-name; [or] def variable-name; LOOPS 0.upto(n) {println "$it"} or n.times{println "$it"} where n is the number of loops and 0 specifies the starting index DECISION-MAKING 1. IF / NESTED-IF / IF-ELSE: When ever you want to perform a set of operations based on a condition or set of conditions, then If / Nested-If / If-Else is used. if(conditional-expression) { // code } else { // code } 2. SWITCH: Switch is an alternative to If-Else-If ladder and to select one among many blocks of code. switch(conditional-expression) { case value1: // code break; // optional case value2: // code break; // optional ... default: //code to be executed when all the above cases are not matched; } LIST List allows you to store ordered collection of data values. EXAMPLE: def mylist = [1,2,3,4,5]; List MethodsDescriptionsize()To find size of elementssort()To sort the elementsadd()To append new value at the endcontains()Returns true if this List contains requested value.get()Returns the element of the list at the definite positionpop()To remove the last item from the ListisEmpty()Returns true if List contains no elementsminus()This allows you to exclude few specified elements from the elements of the originalplus()This allows you to add few specified elements to the elements of the originalremove()To remove the element present at the specific positionreverse()To reverse the elements of the original List and creates new list ONECOMPILER.COM About Contact Users Status Pricing GitHub LinkedIn Facebook Instagram Twitter LANGUAGES Java Python C C++ NodeJS JavaScript Groovy JShell Haskell Tcl Lua Ada CommonLisp D Elixir Erlang F# Fortran Assembly Scala PHP Python2 C# Perl Ruby Go R Racket OCaml Visual Basic (VB.NET) Basic HTML Materialize Bootstrap JQuery Foundation Bulma Uikit Semantic UI Skeleton Milligram PaperCSS BackboneJS React (Beta) Angular (Beta) Vue (Beta) Vue3 (Beta) Bash Clojure TypeScript Cobol Kotlin Pascal Prolog Rust Swift Objective-C Octave Text BrainFK CoffeeScript EJS MySQL Oracle Database PostgreSQL MongoDB SQLite Redis MariaDB Cassandra Oracle PL/SQL Microsoft SQL Server MORE Orgs API Pricing Cheatsheets Tutorials Tools Stats © Copyright 2024 One Compiler Pvt. Ltd. | Privacy Policy | Terms & Conditions