This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Ethernet.h> | |
byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 }; | |
IPAddress ip(192,168,0, 13); | |
IPAddress gateway(192,168,0, 1); | |
IPAddress subnet(255, 255, 255, 0); | |
EthernetClient webClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Ethernet.h> | |
byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 }; | |
IPAddress ip(192,168,0, 13); | |
EthernetClient client; | |
unsigned long lastConnectionTime = 0; | |
const unsigned long postingInterval = 60000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct node | |
{ | |
int data; | |
struct node *link; | |
}; | |
// inserts a node after the header node. | |
void insertAtEnd(struct node *head, int data) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
OlderNewer