Super blog for Data mining Normalisation
Twitter BootStrap Samples
Bootstrap is a CSS Framework developed by Twitter. It is an Open Source So everybody can use it . We can build very Cool and awesome websites from this CSS styles. It contains buttons, Forms, Text Boxes and Tables as well.
The main advantage is we can build this using a simple text editor. Because we are just importing the Styles which are in Twitter Bootstrap.
First Of All we have to download Bootstrap from ,http://twitter.github.com/bootstrap/ the link. It Contain CSS ,IMG and JS Zipped file. Extract and copy the Files in a directory where you want to create your website.
Create an index HTML Page in your website directory where you copied the Bootstrap files.
Path definition :
We have to define the bootstrap files paths that we want to use in our web page. like bellow,
<html>
<head>
</head>
<link type="text/css" rel="stylesheet" href= "css/bootstrap.css" />
<body>
<script src="js/bootstrap.js"> </script>
</body>
</html>
Sample Form Creation :
First we will look are creating the Form for username and password. So for that we are using the class name as “well” which is in bootstrap css.
<html>
<head>
</head>
<link type="text/css" rel="stylesheet" href= "css/bootstrap.css" />
<body>
<input type="text" class="span3 search-query" placeholder="Search..."/>
<button class="btn">Search</button>
</form>
<form class="well span6">
<label>UserName</label>
<input type="text"class="span3" placeholder="Enter username ..."/></br>
<label>Password</label>
<input type="text"class="span3" placeholder="Enter password ..."/></br>
<button class="btn btn-primary">Submit</button>
<button class="btn">Clear</button>
</form>
<script src="js/bootstrap.js"> </script>
</body>
</html>
After this Form creation if you get wow feeling please hit a comment.
Creating Tables:
sample file
<html>
<head>
</head>
<link type="text/css" rel="stylesheet" href= "css/bootstrap.css" />
<body>
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Dhanu</td>
<td>20</td>
</tr>
<tr>
<td>2</td>
<td>Dhanu_2</td>
<td>20_2</td>
</tr>
</tbody>
</table>
<script src="js/bootstrap.js"> </script>
</body>
</html>
The main advantage is we can build this using a simple text editor. Because we are just importing the Styles which are in Twitter Bootstrap.
First Of All we have to download Bootstrap from ,http://twitter.github.com/bootstrap/ the link. It Contain CSS ,IMG and JS Zipped file. Extract and copy the Files in a directory where you want to create your website.
Create an index HTML Page in your website directory where you copied the Bootstrap files.
Path definition :
We have to define the bootstrap files paths that we want to use in our web page. like bellow,
<html>
<head>
</head>
<link type="text/css" rel="stylesheet" href= "css/bootstrap.css" />
<body>
<script src="js/bootstrap.js"> </script>
</body>
</html>
Sample Form Creation :
First we will look are creating the Form for username and password. So for that we are using the class name as “well” which is in bootstrap css.
<html>
<head>
</head>
<link type="text/css" rel="stylesheet" href= "css/bootstrap.css" />
<body>
<form class="well form-search">
<button class="btn">Search</button>
</form>
<form class="well span6">
<label>UserName</label>
<input type="text"class="span3" placeholder="Enter username ..."/></br>
<label>Password</label>
<input type="text"class="span3" placeholder="Enter password ..."/></br>
<button class="btn btn-primary">Submit</button>
<button class="btn">Clear</button>
</form>
<script src="js/bootstrap.js"> </script>
</body>
</html>
After this Form creation if you get wow feeling please hit a comment.
Creating Tables:
sample file
<html>
<head>
</head>
<link type="text/css" rel="stylesheet" href= "css/bootstrap.css" />
<body>
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Dhanu</td>
<td>20</td>
</tr>
<tr>
<td>2</td>
<td>Dhanu_2</td>
<td>20_2</td>
</tr>
</tbody>
</table>
<script src="js/bootstrap.js"> </script>
</body>
</html>
Graphite : Real Time Graphing Installation
Installed packages has been updated.
sudo apt-get update
Supported libraries has been installed using below command,Also this will installe the django as well
sudo apt-get install --assume-yes apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 python3.2 libpython3.2 python3.2-minimal libapache2-mod-wsgi libaprutil1-ldap memcached python-cairo-dev python-django python-ldap python-memcache python-pysqlite2 sqlite3 erlang-os-mon erlang-snmp rabbitmq-server bzr expect ssh libapache2-mod-python python-setuptools
The applications has been downloaded,
Carbon
Graphite
Whisper
To install whisper
cd ~/whisper
sudo python setup.py install
To install Carbon
cd ~/carbon
sudo python setup.py install
To configure Carbon
cd /opt/graphite/conf
sudo cp carbon.conf.example carbon.conf
sudo cp storage-schemas.conf.example storage-schemas.conf
To set duration of the Graphite
sudo gedit storage-schemas.conf
Edit the data with below test,
[stats]
priority = 110
pattern = .*
retentions = 10:2160,60:10080,600:262974
Graphite has been installed after check the dependencies ,
If you it give an error with dependencies then fix and
go forward .sudo python check-dependencies.py
sudo python setup.py install
Apache server has been configured for graphite,
cd ~/graphite/examples
sudo cp example-graphite-vhost.conf /etc/apache2/sites-available/default
sudo cp /opt/graphite/conf/graphite.wsgi.example /opt/graphite/conf/graphite.wsgi
sudo vim /etc/apache2/sites-available/default
sudo mkdir /etc/httpd
sudo mkdir /etc/httpd/wsgi
sudo /etc/init.d/apache2 reload
Initial database has been created for graphite,
cd /opt/graphite/webapp/graphite/
sudo python manage.py syncdb
Here give the user name and password for you database
sudo chown -R nobody:nobody /opt/graphite/storage/
sudo /etc/init.d/apache2 restart
cd /opt/graphite/webapp/graphite
sudo cp local_settings.py.example local_settings.py
Start the Carbon
cd /opt/graphite/
sudo ./bin/carbon-cache.py start
Send the data to the Graphite
cd ~/graphite/examples
sudo chmod +x example-client.py
sudo ./example-client.py
Go to web browser and launched localhost .
Done.
Subscribe to:
Posts (Atom)