Skip to content

Instantly share code, notes, and snippets.

//Start modal popover js
function popOver(name,abbreviation,link_id,content) {
this.name = name;
this.abbreviation = abbreviation;
this.link_id = link_id;
this.content = content;
}
popOver.prototype.initiate = function(){
require 'rubygems'
require 'ffi-rzmq'
require 'pry'
class Client
def initialize()
@connections = {queue_req: {type: ZMQ::REQ, location: "tcp://localhost:5555"}, queue_rep: {type: ZMQ::REP, location: "tcp://*:5555"}}
end
attr_accessor :connections
require "minitest/autorun"
class English
def integer_conversion(number)
end
end
describe English do
before do
@english = English.new
#!/usr/bin/env -S scala-cli shebang
import java.io.{ File, FileInputStream, FileWriter, BufferedWriter }
import scala.io.BufferedSource
/**
* MEME File Example
*
* ...
* MOTIF Hsapiens-jaspar2022-MAX::MYC-MA0059.1
public class MyClass {
public static void main(String args[]) {
int numerator1 = 3;
int denominator1 = 5;
int numerator2 = 2;
int denominator2 = 15;
numerator1 = numerator1 * denominator2;
numerator2 = numerator2 * denominator1;
class MultiDimensionalArray {
public static void main(String[] args){
int[][] arrayOfArrays = new int[10][];
for (int i = 0; i < 10; i++){
arrayOfArrays[i] = new int[i + 1];
for(int j = 0; j < i + 1; j++){
arrayOfArrays[i][j] = j;
}
}
import java.util.Scanner;
import java.util.ArrayList;
public class Metrics {
public static void main(String[] args) {
ArrayList<Integer> hieghtInInches = new ArrayList<Integer>();
ArrayList<Integer> weightInPounds = new ArrayList<Integer>();
String request = "Please add height(in inches) and weight(in pounds) for each " +
"person seperated by a colon. When you are done enter the letter Q.";
System.out.println(request);
public class MergeArrays {
public static void main(String[] args) {
int[][] arrays = {{1,2,3},{14,15,16,17}};
int mergedArrayLen = arrays[0].length + arrays[1].length;
int[] mergedArray = new int[mergedArrayLen];
int mergedArrayIndex = 0;
for(int i = 0; i < arrays.length; i++){
for(int j = 0; j < arrays[i].length; j++) {
mergedArray[mergedArrayIndex] = arrays[i][j];
mergedArrayIndex++;
import java.util.Arrays;
import java.util.Scanner;
import java.util.Random;
public class HangMan {
final String[] words = {
"abandon",
"cabaret",
"eagerly",
"habitat",
"iceberg",
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
public class SplitWord {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println(
"This program will split those characters into array items delimited by the comma.\n" +