Skip to content

Instantly share code, notes, and snippets.

View connor-davis's full-sized avatar
💡
Learning

Connor Davis connor-davis

💡
Learning
View GitHub Profile
@connor-davis
connor-davis / App.jsx
Last active December 26, 2022 10:33
This gist displays how I am working with the strapi cms to dynamically render pages on the frontend.
import { Link, Route, Routes } from "@solidjs/router";
import HeaderImage from "./assets/header.jpg";
import LogoImage from "./assets/logo.jpg";
import axios from "axios";
import { createStore } from "solid-js/store";
import { onMount } from "solid-js";
const PageTextToHtml = ({ content }) => {
const parser = new DOMParser(); // Create a new DOMParser instance.
@connor-davis
connor-davis / Movie.java
Created August 2, 2022 03:40
For DebugNine2 For DebugNine2
public class Movie {
private String name;
private int year;
public Movie(String name, int year) {
this.name = name;
this.year = year;
}
public String getName() {
import java.util.Scanner;
public class DebugNine2 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
Movie[] movies = new Movie[8];
// Removed unnecessary code.
String message, entry;
/*
@connor-davis
connor-davis / InsertionSortAlgorithm.java
Created July 25, 2022 12:31
Java Insertion Sort Algorithm
/**
* This method will use the insertion sort algorithm to sort an int[] of
* numbers.
*
* @param numbers
*
* @return int[]
*/
public static int[] insertionSort(int[] numbers) {
int n = numbers.length;
@connor-davis
connor-davis / BubbleSortAlgorithm.java
Created July 25, 2022 12:30
Java Bubble Sort Algorithm
/**
* This method will use the bubble sort algorithm to sort an int[] of numbers.
*
* @param numbers
*
* @return int[]
*/
public static int[] bubbleSort(int[] numbers) {
for (int x = 0; x < numbers.length; x++) {
for (int i = 0; i < numbers.length - 1; i++) {
/*
* Connor Davis
* @author ST10068305
*/
package intro;
public class App {
public static String getGreeting() {
return "Hello World!";
}
@connor-davis
connor-davis / FahrenheitToCelsiusConverter.java
Created March 15, 2022 06:56
This program will convert fahrenheit to celsius
/*
* Connor Davis
* @author ST10068305
*/
package fahrenheittocelsius;
import javax.swing.JOptionPane;
public class App {
/**
/*
* Connor Davis
* @author ST10068305
*/
package room;
public class Room {
/**
* @param args The Command Line Arguments
*/
@connor-davis
connor-davis / InputOne.java
Created March 7, 2022 12:21
InputOne Code
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package inputone;
import java.io.IOException;
import java.util.Scanner;
public class InputOne {
public static void main(String[] args) {
const config = {
ipfs: {
preload: {
enabled: false
},
config: {
Addresses: {
Swarm: [
'/dns4/star.thedisco.zone/tcp/9090/wss/p2p-webrtc-star',
'/dns6/star.thedisco.zone/tcp/9090/wss/p2p-webrtc-star',