Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Aktardb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using namespace std;
// CLASS DECLARATION

class DB
{
{cnmsb cm

public:
void store();
Expand Down Expand Up @@ -152,4 +152,4 @@ int main()
cout << "Have a good day! Bye!" << endl;

exit(0);
};
};
32 changes: 32 additions & 0 deletions BackupDB.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

helpFunction()
{
echo ""
echo "Usage: $0 -u username -p password -d database"
echo -e "\t-u Username of Database"
echo -e "\t-p Password for that DB user"
echo -e "\t-d Database Name"
exit 1 # Exit script after printing help
}

while getopts "u:p:d:" opt
do
case "$opt" in
u ) user="$OPTARG" ;;
p ) pass="$OPTARG" ;;
d ) db="$OPTARG" ;;
? ) helpFunction ;; # Print helpFunction in case parameter is non-existent
esac
done

# Print helpFunction in case parameters are empty
if [ -z "$user" ] || [ -z "$pass" ] || [ -z "$db" ]
then
echo "Some or all of the parameters are empty";
helpFunction
fi

# Begin script in case all parameters are correct
echo "${user} ${pass} ${db}"
mysqldump -u ${user} -p${pass} ${db} > ~/${db}_`date +%Y-%m-%d`.sql
47 changes: 47 additions & 0 deletions Form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML FORM</title>
<style>
.center {
margin: auto;
width: 30%;
border: 3px solid green;
padding: 10px;
}
</style>
</head>

<body>
<!-- Create a form for accept lastname, contact number, gender, hubbies, country, button for reset and submit -->
<div class="center">
<form>
First Name : <input type="text" name="firstname" placeholder="Balgopal"> <br>
Last Name : <input type="text" name="lastname" placeholder="Patro"> <br>
Contact No : <input type="text" name="contactno" placeholder="9178922478"> <br>
Gender:<input type="radio" name="gender" value="male" required>Male
<input type="radio" name="gender" value="female">Female<br> <br>
Hubbies : <br> <input type="checkbox" id="programming" name="programming" value="Programming">
<label for="programming"> Programming</label><br>
<input type="checkbox" id="Sports" name="Sports" value="Sports">
<label for="Sports"> Sports</label><br>
<input type="checkbox" id="Reading" name="Reading" value="Reading">
<label for="Reading"> Reading</label><br><br>
Country : <select name="country" required>
<option value="">Select Country</option>
<option value="India">India</option>
<option value="USA">USA</option>
<option value="UK">UK</option>
<option value="Canada">Canada</option>
</select> <br> <br>
<input type="submit" name="submit" value="Submit">
<input type="reset" name="reset" value="Reset">
</form>
</div>
</body>

</html>
1 change: 1 addition & 0 deletions finaltask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ int gcd(int a, int b)

}


int main()
{
int N, i, max=1, res=0;
Expand Down
3 changes: 2 additions & 1 deletion test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class Solution
{
vector<int> ans;
bool flag = true;
// Test
int size = input.length();
for (size_t i = 0; i < size; i++)
{
Expand Down Expand Up @@ -55,4 +56,4 @@ int main()
for(int v:a){
cout<<v<<" ";
}
}
}