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
<html> | |
<body bgcolor="#F0F8FF"> | |
<h1 align="center">HTML form exercise</h1> | |
<p> | |
<font color="red">Please note: </font> | |
This Example demonstrates how HTML forms can be used. Submit button should | |
submit the button and reset button should reset the form(revert the changes | |
in form fields). The form layout should be the same as below.<br> | |
<form action="MAILTO:chiragmongia05@gmail.com" method="post;"> | |
<b>Contact form</b><br> |
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
Part-1 | |
desc tastes; | |
+---------+-------------+------+-----+---------+-------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+---------+-------------+------+-----+---------+-------+ | |
| name | varchar(40) | YES | | NULL | | | |
| filling | varchar(40) | YES | | NULL | | | |
+---------+-------------+------+-----+---------+-------+ |
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
create database vtapp; | |
create user 'vtapp_user'@'localhost' identified by 'pass'; | |
grant all on vtapp.* to 'vtapp_user'@'localhost'; |
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
$ mysqldump -uroot -p exercise1 > newbackup.sql; | |
Enter password: | |
mysql>create database restored; | |
mysql> show databases; | |
+--------------------+ | |
| Database | | |
+--------------------+ | |
| information_schema | | |
| exercise1 | |
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
desc testing_table ; | |
+------------+-------------+------+-----+---------+-------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+------------+-------------+------+-----+---------+-------+ | |
| username | varchar(30) | YES | | NULL | | | |
| roll_no | int(5) | YES | | NULL | | | |
| first_name | varchar(30) | YES | | NULL | | | |
| last_name | varchar(30) | YES | | NULL | | | |
+------------+-------------+------+-----+---------+-------+ |
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
desc user_type; | |
+----------+-------------+------+-----+---------+-------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+----------+-------------+------+-----+---------+-------+ | |
| usertype | varchar(20) | YES | | NULL | | | |
| user | varchar(20) | YES | | NULL | | | |
+----------+-------------+------+-----+---------+-------+ | |
desc user_category; | |
+----------+-------------+------+-----+---------+-------+ |
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
arr= "Ruby is scripting language".split(//) | |
h1 = Hash.new(0) | |
arr.each { |word| h1[word] += 1} | |
h1.each {|word, h1| puts word+"-"+h1.to_s} |
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
def fibonacci(number) | |
first = 0 | |
second = 1 | |
while first <= number | |
yield first | |
temp = first | |
first = second | |
second = first + temp | |
end | |
end |
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
p 'Enter text' | |
a = gets | |
puts a.gsub(/[aeiou]|[AEIOU]/, '*') |
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
def palindrome | |
print "Enter the string\n" | |
line = gets.chomp | |
if line.reverse == line | |
p "String is a palindrome!" | |
else | |
p "String is not a palindrome!" | |
end | |
end |
OlderNewer