Skip to content

Instantly share code, notes, and snippets.

View EvanGertis's full-sized avatar
crush it.

Evan Gertis EvanGertis

crush it.
View GitHub Profile
<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>Document</title>
</head>
<body>
<div id = "demo-div"></div>
<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>Document</title>
</head>
<body>
</body>
</html>
int main()
{
int choice, data, x, k;
struct node *head;
head = (struct node *)malloc(sizeof(struct node));
head->info = 0;
head->link = NULL;
createList(head);
// loops through the list and shows the value at each node.
void displayList(struct node *head)
{
struct node *p;
p = head->link;
while (p != NULL)
{
printf("%d ", p->info);
void createList(struct node *head)
{
int n, data;
// prompts.
printf("Enter the number of nodes that you would like insert ");
scanf("%d", &n);
// guard.
if(n == 0){
struct node
{
int data;
struct node *link;
};
// inserts a node after the header node.
void insertAtEnd(struct node *head, int data)
{
let body = document.getElementsByTagName("body");
// global variables to set color
let color = "";
let color_one = "red";
let color_two = "black";
// square size parameters.
let square_width = "100px";
let square_height = "100px";
// generates a parent container to store grid squares.
function UI_box(UI_box_number){
UI_body = document.createElement("div");
body[0].append(UI_body);
UI_body.setAttribute("id", UI_box_number);
UI_body.style.display = "flex";
return UI_body;
}
@EvanGertis
EvanGertis / square.js
Created February 1, 2019 14:32
javascript square function
function square(UI_body, width, height, color){
let square = document.createElement('div');
square.style.width = width;
square.style.height = height;
square.style.margin = "2px 2px 2px 2px";
square.style.backgroundColor = color;
UI_body.append(square);
}
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Subject } from 'rxjs/Subject';
import { Observable } from 'rxjs/Observable';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { User } from './user.model';
import {CognitoUser, CognitoUserAttribute, CognitoUserPool} from 'amazon-cognito-identity-js';