Thursday, June 18, 2015

රට වටෙන්ම ඇවිත්
රට වටේම ගිහින්
රටටම  පේන්න වැඩක් කරපු  අපි
රටක් වටිනා මිතුදමත් අරන් යමු  


(එරංගා කොඩිකාර )

Thursday, April 9, 2015

Let’s    learn    CSS .
1.CSS  stands for Cascading Style Sheets.
2.CSS define how HTML element are to be displayed.
3.CSS Syntax


4.example



5.Try this code . copy this code ,save as .html  and run

<!DOCTYPE html>
<html>
<head>
<style>
p {
    color: red;
    text-align: center;
}
</style>
</head>
<body>

<p>Hello World!</p>
<p>This paragraph is styled with CSS.</p>

</body>
</html>

6.result 







7.CSS Comment

CSS Comment starts with  /* and end with */.

8.CSS selectors.

  • Element selector  
    • the element selector select all the element based on element name.
    •  

















  • Id selector 
    • the id selector uses the id attribute of an HTML element to select a specific element.An id should be unique with a page, so the id selector is used if you want to select a single,unique element.
    • try this:-














  • Class Selector
    • The class selector elements with a specific class attribute.To select elements with a specific class,write a period character,followed by the name of class.
    • try this:-
  • Grouping selector
    • You can group the seletors,to minimize the code.

9.Three Ways to Insert CSS.

  • External style sheet.
    • example:-
    • CSS style sheet must be save with a  .css extension.
    • each page must include a reference to the external style sheet file inside the <link> element.The <link> element goes inside the head section.

  • Internal style sheet.
    • An internal style sheet may be used if one single page has a unique style.Internal styles are defined within the <style>` element,inside the head selection of an HTML page .

Thursday, November 27, 2014

i) Creating a file of 100M containing all zeros named as dsk.img
>dd if=/dev/zero of=dsk.img bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 3.61239 s, 29.0 MB/s
dd = Copy a file, converting and formatting according to the operands
if = input file
of = output file
bs = size of bites
count = blocksof bites
ii) Associate a loopback device with the file
>sudo losetup /dev/loop0 dsk.img
losetup - set up and control loop devices
Checking if the previous command executes without errors.
>echo $?
0
Confirming association.
>sudo losetup /dev/loop0
/dev/loop0: [0801]:29055 (/home/toko/dsk.img)
The loopback device is a special, virtual network interface that your computer uses to
communicate with itself.
iii) Create a VFAT file system on the new device using the mkfs command
>sudo mkfs.vfat /dev/loop0
mkfs.vfat 3.0.13 (30 Jun 2012)
Loop device does not match a floppy size, using default hd params
mkfs.vfat = create an VFAT filesystem under linux
VFAT = Virtual File Allocation Tableiv) Mount the new file system on /mnt/f1
Creating a directory as f1 inside /mnt
>sudo mkdir /mnt/f1
mkdir = make directory
Mount - mount a file system
>sudo mount -t vfat /dev/loop0 /mnt/f1
mount -t file_system_type device dir
v) Create & Write on file abc.txt
>sudo nano /mnt/t1/abc.txt
HELLO SCS2106
vi) Unmount
>sudo umount /mnt/f1
vii) Look for the string "SCS2106" in dsk.img
>grep -RIl "SCS2106" dsk.img
o If you cant’t read & write to mounted disk
 >sudo mount grep | loop0
o Force to unmount
 >sudo umount -f /mnt/f1
o Unmount after process ends.
 >sudo umount /mnt/f1 –l
o Remove loop device
 >losetup -d /dev/loop0
o Killing programs using mounted disk
 >sudo fuser -km /mnt/f1

Sunday, November 23, 2014

CODEIGNITER REPORT
1.First I downloaded  CodeIgniter and put that folder to www folder
   2.Then went  to phpMyAdmin  at localhost  and made a database named as book
  
3.Created a table and insert data to book database.

4. Then went to www folder -> CodeIgniter ->application->config->autoload  and change the code (set $autoload['libraries'] = array() as $autoload['libraries'] = array('database')).

5. Then went to www folder -> CodeIgniter ->application->config->database and change the code (set user name password and database).

6.Wrote php codes for get data from database.

7.Saved that codes on www folder -> CodeIgniter ->application->controller folder , www folder -> CodeIgniter ->application->model folder and www folder -> CodeIgniter ->application->view folder

controller.php


model.php

view.php




8. Then loaded the browser and typed http://localhost/CodeIgniter_2.1.3/CodeIgniter_2.1.3/index.php/controller1  .I got data from database.

9.This is the out put