This file contains hidden or 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
public class Pet { | |
// petType can be dog, cat or any other animal, hence String | |
// petName is String | |
String petName, petType; | |
/* | |
* Note: You can also use enum in case of petType attribute which makes more sense, | |
* since dog and cat are already predefined values and we just need to choose one among them. |
This file contains hidden or 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 React, { useEffect, useState } from 'react'; | |
import { StateContext } from '../App'; | |
import Radio from '@mui/material/Radio'; | |
import RadioGroup from '@mui/material/RadioGroup'; | |
import FormControlLabel from '@mui/material/FormControlLabel'; | |
import FormControl from '@mui/material/FormControl'; | |
import FormLabel from '@mui/material/FormLabel'; | |
import TextField from '@mui/material/TextField'; | |
import DynamicForm from './MenuComponents/DynamicForm'; | |
import { useForm } from 'react-hook-form'; |
This file contains hidden or 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 React, { useState, useEffect } from 'react'; | |
import { Button, Form } from 'react-bootstrap'; | |
import { StateContext } from '../App'; | |
import './GroupListing.css'; | |
import BasicSelect from './MenuComponents/SelectMenu'; | |
import './GroupForm.css'; | |
import Radio from '@mui/material/Radio'; | |
import RadioGroup from '@mui/material/RadioGroup'; | |
import FormControlLabel from '@mui/material/FormControlLabel'; | |
import FormControl from '@mui/material/FormControl'; |
This file contains hidden or 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
from time import sleep | |
import sys | |
import re | |
# adds colors to text | |
class bcolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKCYAN = '\033[96m' | |
OKGREEN = '\033[92m' |
This file contains hidden or 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
from time import sleep | |
import sys | |
class bcolors: | |
HEADER = '\033[95m' | |
OKBLUE = '\033[94m' | |
OKCYAN = '\033[96m' | |
OKGREEN = '\033[92m' | |
WARNING = '\033[93m' |
This file contains hidden or 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
# A gameplay loop that includes: Output that displays the room the player is currently in Decision branching that | |
# tells the game how to handle the different commands. The commands can be to either move between rooms (such as go | |
# North, South, East, or West) or exit. If the player enters a valid “move” command, the game should use the | |
# dictionary to move them into the new room. If the player enters “exit,” the game should set their room to a room | |
# called “exit.” If the player enters an invalid command, the game should output an error message to the player ( | |
# input validation). | |
import re | |
rooms = { | |
'Great Hall': {'South': 'Bedroom'}, |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>PubNub JavaScript SDK QuickStart</title> | |
</head> | |
<body> | |
<div> | |
<strong>Earth:</strong> <input id="update-text" type="input" placeholder="enter update for Earth here"/> | |
<input id="publish-button" type="submit" value="Submit Update to The Guide"/> |
This file contains hidden or 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
// Main Server | |
package main | |
import ( | |
"bytes" | |
"crypto/sha256" | |
"fmt" | |
) |
This file contains hidden or 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
// Main Server | |
package main | |
import ( | |
"bytes" | |
"crypto/sha256" | |
"fmt" | |
) |
This file contains hidden or 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
package main | |
import ( | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
func main() { |