Skip to content

Instantly share code, notes, and snippets.

View ajess33's full-sized avatar

Austin Jess ajess33

View GitHub Profile
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(void)
{
// prompt user for name
printf("What is your name? ");
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(void)
{
// prompt user for name
printf("What is your name? ");
@ajess33
ajess33 / caesar.c
Last active October 26, 2017 19:26
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
int main(int argc, string argv[]) {
if (argc != 2) {
printf("Error, try again");
@ajess33
ajess33 / weather.js
Created March 19, 2018 23:06
[object HTMLDivElement] firefox error
function getPosition() {
if (navigator.geolocation) {
// store location
navigator.geolocation.getCurrentPosition(fetchData);
console.log('Location Available');
} else {
// no location
console.log('No Location Available');
}
}
@ajess33
ajess33 / index.html
Created March 19, 2018 23:12
html Local-Weather-Viewer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Local Weather Viewer</title>
<link rel="stylesheet" href="assets/style.css">
</head>
@ajess33
ajess33 / wiki.js
Created March 21, 2018 20:49
Wikipedia Viewer json
var searchbar = document.querySelector('#searchbar');
var searchButton = document.querySelector('#search');
var results = document.querySelector('.results');
var userInput = searchbar.value;
function fetchData() {
fetch(
'https://en.wikipedia.org/w/api.php?action=query&format=json&generator=search&gsrlimit=10&prop=extracts&pilimit=max&exintro&explaintext&exsentences=2&exlimit=max&gsrsearch=' +
userInput
"workbench.colorTheme": "Night Owl",
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"editor.wordWrap": "on",
"editor.fontSize": 14,
"editor.lineHeight": 23,
"workbench.editor.tabSizing": "shrink",
"files.trimTrailingWhitespace": true,
"editor.fontWeight": "100",
// React State
const [fileView, setFileView] = useState('SELECTED');
// this is our onChange handler
const toggleAll = e => {
setFileView(e.target.value);
};
// JSX
<header className="files-toggle">