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
| <?php /** @noinspection PhpIllegalPsrClassPathInspection */ | |
| namespace SannyTech; | |
| class Session | |
| { | |
| private mixed $user_id; | |
| private mixed $admin_id; | |
| public string $message; | |
| private bool $signedIn = false; |
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
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| //Step 1 | |
| int a = 0; | |
| int number = 1; |
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
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int number; | |
| cout << "Enter Number:"; | |
| cin >> number; | |
| for(int a = 2; a <= number; a++) { |
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
| #include <iostream> | |
| using namespace std; | |
| // Linear Search | |
| int linearSearch(int arr[], int n, int target) { | |
| for (int i = 0; i < n; i++) { | |
| if (arr[i] == target) { | |
| return i; // Return the index if found | |
| } | |
| } |
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
| #include <iostream> | |
| class Array { | |
| private: | |
| int *arr; | |
| int size; | |
| int capacity; | |
| public: | |
| Array(int capacity) { |
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
| #include <iostream> | |
| using namespace std; | |
| // Function to find the maximum value in an array | |
| int maximum(const int array[], int size) { | |
| int maxVal = array[0]; // Assume the first element is the maximum | |
| for (int i = 1; i < size; ++i) { | |
| if (array[i] > maxVal) { | |
| maxVal = array[i]; // Update maxVal if a larger element is found |
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
| #include <iostream> | |
| using namespace std; | |
| int main() { | |
| int arr {200}; | |
| //declaring arrays to keep elements | |
| int elements[arr]; | |
| int ltelems[arr]; |
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>Form Validation Example</title> | |
| <script> | |
| function validateForm() { | |
| var name = document.forms["myForm"]["name"].value; | |
| var email = document.forms["myForm"]["email"].value; | |
| var password = document.forms["myForm"]["password"].value; | |
| var confirmPassword = document.forms["myForm"]["confirmPassword"].value; |
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 lang="en"> | |
| <head> | |
| <title>@Grace</title> | |
| </head> | |
| <body> | |
| <form> | |
| <fieldset> | |
| <legend>Your Details</legend> |
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 lang="en"> | |
| <head> | |
| <title>HTML Tables and Forms</title> | |
| <style> | |
| table { | |
| border: 1px solid black; | |
| } | |
| tr,td,th { | |
| border: 1px solid black; |
NewerOlder