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<stdio.h> | |
#include<conio.h> | |
#include<stdlib.h> | |
#include<math.h> | |
#include<string.h> | |
long int p, q, n, t, flag, e[100], d[100], temp[100], j, m[100], en[100], i; | |
char msg[100]; | |
int prime(long int); | |
void ce(); |
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 java.io.*; | |
import java.util.*; | |
public class ToDoList { | |
private static ArrayList<String> tasks = new ArrayList<String>(); | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
int choice; |
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 <Keypad.h> //https://www.programmingboss.com/2022/12/arduino-Based-Password-Protected-Door-Lock-Keypad.html | |
#include <ezBuzzer.h> | |
const int RELAY_PIN = A5; // the Arduino pin, which connects to the IN pin of relay | |
const int ROW_NUM = 4; // four rows | |
const int COLUMN_NUM = 4; // four columns | |
const int OUTPUT_PIN = 10; | |
const int BUZZER_PIN = 11; | |
char keys[ROW_NUM][COLUMN_NUM] = { | |
{'1','2','3', 'A'}, | |
{'4','5','6', 'B'}, |
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 "Adafruit_CCS811.h" | |
Adafruit_CCS811 ccs; | |
#include <SoftwareSerial.h> | |
#include <ArduinoJson.h> | |
//////////////////////////// | |
#define trig A4 | |
#define echo A5 | |
long duration, distance, sonar; | |
/////////////////////////////// |
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 java.util.ArrayList; | |
import java.util.List; | |
// Create the class | |
class Root | |
{ | |
private List<String> root; | |
private String city; | |
// Get the node | |
public String getNode() | |
{ |
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 java.util.ArrayList; | |
import java.util.List; | |
// Create the class | |
class Path | |
{ | |
private List<String> path; | |
private String Node; | |
//Create the arrayList | |
public Path() | |
{ |
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 java.util.Comparator; | |
// Class | |
class Node implements Comparator<Node> | |
{ | |
public String node; | |
public int CostTime; | |
public Node() | |
{ | |
} | |
// Set the node and their cost |
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 java.util.Comparator; | |
// Class | |
class City implements Comparator<City> | |
{ | |
public String city; | |
public int cost; | |
public City() | |
{ | |
} |
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 java.io.BufferedReader; | |
import java.io.FileNotFoundException; | |
import java.io.FileReader; | |
import java.io.PrintWriter; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.PriorityQueue; | |
import java.util.Set; |
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 <Key.h> | |
#include <Servo.h> | |
#include <Keypad.h> | |
Servo ServoMotor; | |
char* password = "159"; // change the password here, just pick any 3 numbers | |
int position = 0; | |
const byte ROWS = 4; | |
const byte COLS = 4; | |
char keys[ROWS][COLS] = { |
NewerOlder