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
@Grapes( | |
@Grab(group='com.google.guava', module='guava', version='32.1.3-jre') | |
) | |
import static com.google.common.collect.Lists.newArrayList | |
def numbers = [1, 2, 3, 4, 5] as int[] | |
def result = newArrayList (numbers) | |
println "numbers.class: ${numbers.class.name}, result.class: ${result.class.name}, result: $result" |
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 Main { | |
public static void main(String[] args) { | |
Integer[] numbers = {1, 2, 3, 4, 5}; | |
java.util.List<Integer> exampleList = java.util.Arrays.asList (numbers); | |
System.out.println ("exampleList.class.name: " + exampleList.getClass ().getName ()); |
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
import java.util.stream.Collectors; | |
import java.util.List; | |
import java.util.Arrays; | |
public class Main { | |
public static void main(String[] args) { | |
int[] numbers = {1, 2, 3, 4, 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
public class Main { | |
public static void main(String[] args) { | |
Integer[] numbers = {1, 2, 3, 4, 5}; | |
java.util.List<Integer> exampleList = java.util.Arrays.asList (numbers); | |
System.out.println ("exampleList.class.name: " + exampleList.getClass ().getName ()); |
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
/* | |
* This code below was generated by ChatGPT: "Provide a readable streams example using node.js". | |
* | |
* See also: | |
* | |
* [1] https://tio.run/##bZLLTsMwEEX3@YrZ2ZFK@gFR2JTuESwRi2kyaQyOXRy7Fary7cEvWqi6sj2Pc2eu/IFHnFojDvZB6Y6WpdVqsnCGF8IOd5JghgYMfTlhiLPJGsKRlXVRrNfwRL1QBHYg6NCiv6CFk5ASdgSplLoiEWNBA29MK2IrYPak4zEYiu9eOxNPcST2nvgbT7AE6PXzMAmakb/R1xj0cEWny9z8XECs4CWEK4AHhuR1XDQGvwFVBwc3DSAsCGV1zGed0BZKq16bLbYD58LSWELzmJngq8VUhf6UqmN4DgZlzefARlDO23JE6bxfGiaxVyijFHl93d@qXrGhMWLnVTFn4zd@fzf@cb43eoyvW6f@e1RpxVlo8E7zdnDq87JLsFRLqqTe50yd5O4Q/MgBcLeXbdM@158SKMvyAw | |
*/ | |
const { Readable } = require('stream'); |
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
groovyJars <- list ( | |
"C:/development/projects/rGroovy/groovy.jars/groovy-2.4.5-indy.jar", | |
"C:/development/projects/rGroovy/groovy.jars/ivy-2.4.0.jar" | |
) | |
options(GROOVY_JARS=groovyJars) | |
library(rGroovy) | |
rGroovy::Initialize() |
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
@GrabResolver(name='Maven Central', root='http://repo1.maven.org/') | |
@Grab(group='redis.clients', module='jedis', version='3.5.2') | |
import redis.clients.jedis.Jedis | |
import redis.clients.jedis.JedisPubSub | |
class DefaultPubSubImpl extends JedisPubSub { | |
@Override | |
public void onMessage(String channel, String message) { | |
println "channel: $channel, message: $message" |
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
@Grab('com.coherentlogic.rproject.integration.jdataframe:jdataframe-core:1.0.0-RELEASE') | |
@Grab('org.slf4j:slf4j-nop:1.8.0-beta4') | |
import com.coherentlogic.rproject.integration.dataframe.adapters.RemoteAdapter | |
import com.coherentlogic.rproject.integration.dataframe.domain.JDataFrame | |
import com.coherentlogic.rproject.integration.dataframe.builders.JDataFrameBuilder | |
def result = (String) new JDataFrameBuilder<String, Object[]>( | |
new JDataFrame<String, Object[]>(), | |
new RemoteAdapter<String, Object[]>() | |
) |
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
private JDataFrameBuilder<String, String[]> readCopyBookAsJDataFrameBuilder( | |
AbstractLineReader reader, | |
LayoutDetail layout, | |
String font, | |
IUpdateFieldName updateFldName | |
) throws IOException { | |
JDataFrameBuilder<String, String[]> result = | |
new JDataFrameBuilder<String, String[]>( | |
new JDataFrame<String, String[]>(), |
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
@GrabResolver(name='JBoss Release Repository', root='https://repository.jboss.org/nexus/content/repositories/releases/') | |
@GrabResolver(name='JBoss.org Maven repository', root='https://repository.jboss.org/nexus/content/groups/public') | |
@GrabExclude(group = 'org.jboss.spec.javax.ws.rs', module='jboss-jaxrs-api_2.1_spec') | |
@GrabExclude(group = 'org.jboss.spec.javax.xml.bind', module='jboss-jaxb-api_2.3_spec') | |
@GrabExclude(group = 'org.jboss.spec.javax.servlet', module='jboss-servlet-api_3.1_spec') | |
@GrabExclude(group = 'javax.validation', module='validation-api') | |
@GrabExclude(group = 'org.jboss.spec.javax.annotation', module='jboss-annotations-api_1.2_spec') | |
@GrabExclude(group = 'net.jcip', module='jcip-annotations') | |
@GrabExclude(group = 'javax.activation', module='activation') |