Skip to content

Instantly share code, notes, and snippets.

View JosephRidge's full-sized avatar
💭
......🤙......

Joseph Ridge JosephRidge

💭
......🤙......
View GitHub Profile
@JosephRidge
JosephRidge / gist:97c4eedf585b24e08bafacf2cf0f4fab
Last active August 4, 2023 10:12
Component to quesry simple API using axios
<template>
<div>
<!-- buttons to make request -->
<!-- view to see the reponse -->
</div>
</template>
<script>
import axios from 'axios';
@JosephRidge
JosephRidge / frequencydisttable.R
Created June 23, 2023 09:58
lesson on frequency distribution tables in particular grouped
# CONTRUCTING GROUPED FREQUENCY DISTRIBUTION TABLES
#Data
heights <- c(67,67,64,64,74,61,68,71,69,61,65,64,62,63,59,70,66,66,63,59,64,67,70,65,66,66,56,65,67,69,64,67,68,67,67,65,74,64,62,68,65,65,65,66,67,68,74)
# 1. arrage in ascending order
a<-sort(heights)
length(a)
# 2. find unit of measurement ( smallest difference betwen any two distinct values)
@JosephRidge
JosephRidge / charts.R
Created June 22, 2023 17:40
Lesson on Frequency charts - R session plotting pie charts
library(ggplot2)
swirl
#create data frame
Category <- c("A", "B", "C", "D")
Amount <- c(25,40,27,8)
My_data <-data.frame(Category, Amount)
data <- data.frame("category" = c('A', 'B', 'C', 'D'),
"amount" = c(25, 40, 27, 8))
# Author Name: Joseph Ridge
# Objective : Starting our on R
#Write a program that displays all the odd numbers between 0 and 100. The program
#should also display the sum of the odd numbers.
# x <- (1:100)
#print(x)
#for (i in 1:100 ){
# modValue <- i%%3 # modulus value
#if(modValue== 0 ){
@JosephRidge
JosephRidge / Filter.vue
Created October 8, 2022 11:22
Filter through a list in VueJS
<template>
<div v-for="(member, index) in filteredList" :key="index" class="">
<div
class="border transition ease-in-out duration-500 hover:cursor-pointer hover:shadow hover:shadow-lg px-4 mx-8 my-2 py-4 rounded"
>
<div class="flex mt-2 mb-3">
<img
:src="member.imageUrl"
alt=""
srcset=""
@JosephRidge
JosephRidge / FinalArticle.class
Last active October 8, 2022 11:25
final Article class #toString Article
/*
* Data Model Class
*/
class Article {
private String mTitle;
private String mBody;
/*
* PArameterized constructor
*/
@JosephRidge
JosephRidge / toStringOverride.java
Created June 21, 2022 13:15
Ovveriding the toString method in the Article Class #toString article
@Override
public String toString() {
return mTitle;
}
@JosephRidge
JosephRidge / ArticleApplication.java
Created June 21, 2022 13:02
ArticleApplication mani class #toString Article
// Program entry point for JVM
class ArticleApplication {
public static void main(String args[]) // static method
{
/*
* We create an instance of the Article class
* print it out
*/
Article firstArticle =
new Article(
@JosephRidge
JosephRidge / Article.java
Created June 21, 2022 13:00
ArticleModelClass #ToStringArticle
/*
* Data Model Class
*/
class Article {
private String mTitle;
private String mBody;
/*
* Parameterized constructor
*/
@JosephRidge
JosephRidge / maps.vue
Last active September 21, 2021 22:34
This is a simple map implementation using leaflet and vuejs, goal : Add 2 sets of layers with a layer controller that displays markers depending on the clients selection. this here is but a component , to under stand you must have some fundamental knwoledge on vuejs , html ,css .
<template lang="">
<div>
<div id="mapid"></div>
</div>
</template>
<script>
import "leaflet/dist/leaflet.css";
import L from "leaflet";
export default {