Know thy all....

Sunday, 28 March 2010

Installing Android SDK with Emulator in Windows

How to install the Android Emulator with SDK in Windows 7 Operating System

Tools Needed

Step 1:

Install JDK and Eclipse

Step 2:

  • Unzip or untar the Android SDK and extract it into a folder namely C:/android-sdk-windows
  • Set the path for the tools/ under the android SDK, ie. C:/android-sdk-windows/tools
  • Right click My Computer-> properties –> Advanced System Settings –> Environmental Variables and edit the PATH Variable

Step 3:

  • Once you have ADT plugin with you, we need to add the ADT to Eclipse. Open Eclipse-> Help –> Install New Software
  • There will be a link called Add Site, you can either download using the site https://dl-ssl.google.com/android/eclipse/ (if any errors, then use http instead of https). If you have downloaded archive with you, click Add Site and click the archive, select your downloaded file and proceed and restart eclipse

Step 4:

  • Now you can see eclipse to start a new project with android also shown. But selecting a new project needs a target.
  • Open Eclipse –> Window –> preferences –> Select Android and the set the path of android SDK C:/android-sdk-windows
  • Open eclipse –> Window –> Android SDK and AVD Manager (A new window will pop up, indicating you to select some packages)

android

then select any one SDK platform (I selected Android Platform SDK 1.5), it will take some time to be downloaded.

Step 5:

  • Once the package are downloaded you can see C:/android-sdk-windows/platforms/ under this folder the SDK platform is created, indicates the successful installation of Android on the machine.
  • Inside the platform/ folder there are some sample applications like gaming, hello world. etc.

Step 6:

  • Open eclipse and create a new project-> Android Project
  • Create project from existing workspace and select the application you want to test.
  • Once the project is created and opened. Run it by pressing CTL+F11 or Click Run Menu
  • An Emulator showing the android phone will be opened.

Create Android Virtual Device

  • Creating a Android Virtual Device (AVD) is mandatory to display the actual emulator. It specifies the VGA capabilities of the system and size of the memory, etc.
  • Open eclipse –> Window –> Android SDK and AVD Manager (A new window will pop up, indicating you to select some packages)
  • AVD select and create the AVD by specifying the Target id. (open command prompt, go to c:/android-sdk-windows/tools and execute the following android.bat list target). This command will specify a target id.

To add an SDCARD

  • SDCARD support FAT32 partition, so we need to create a image file (.iso or .img) file to create space for the sdcard.
  • go to the command prompt (c:/android-sdk-windows/tools and execute mksdcard.exe sizeK/M <file>)
  • Eg. mksdcard 1024M tsp.iso (means a sdcard of 1GB is preferred)

Opening the emulator through the command prompt

  • emulator.exe –avd <name of AVD>  (Emulator will be opened for the concerned AVD)
  • emulator.exe –avd <name of AVD> –sdcard tsp.iso  (Emulator will be opened for the AVD as well as the 1GB SDCARD)

In Linux,

Only difference is the path setting done at /home/<username>/.bash_profile or .bashrc file and then set the path

export PATH=$PATH: /home/pradeep/android-sdk/

and

Source: http://developer.android.com

Thursday, 25 March 2010

Writing a Simple Character Device driver in Linux

A Character device driver needs a major number and a minor number. The devices are registered in the Kernel and it lies either in the /dev/ or in the /proc folder.

The following example uses a char device driver with major number 222 and a minor number 0. The name of the device driver namely “new_device

It uses the following things

  • Open or register a device

  • close or unregister the device

  • Reading from the device (Kernel to the userspace)

  • Writing to the device (userlevel to the kernel space)


There are three files, Copy the following or download all the three files here

/* new_dev.c*/

#include<linux/module.h>
#include<linux/init.h>
#include "new_dev.h"

MODULE_AUTHOR("PRADEEPKUMAR");
MODULE_DESCRIPTION("A simple char device");

static int r_init(void);
static void r_cleanup(void);

module_init(r_init);
module_exit(r_cleanup);

static int r_init(void)
{
printk("<1>hi\n");
if(register_chrdev(222,"new_device",&my_fops)){
printk("<1>failed to register");
}
return 0;
}
static void r_cleanup(void)
{
printk("<1>bye\n");
unregister_chrdev(222,"new_device");
return ;
}

/*new_dev.h */

/*
* my device header file
*/
#ifndef _NEW_DEVICE_H
#define _NEW_DEVICE_H

#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <asm/current.h>
#include <asm/segment.h>
#include <asm/uaccess.h>

char my_data[80]="hi from kernel"; /* our device */

int my_open(struct inode *inode,struct file *filep);
int my_release(struct inode *inode,struct file *filep);
ssize_t my_read(struct file *filep,char *buff,size_t count,loff_t *offp );
ssize_t my_write(struct file *filep,const char *buff,size_t count,loff_t *offp );
struct file_operations my_fops={
open: my_open,
read: my_read,
write: my_write,
release:my_release,
};

int my_open(struct inode *inode,struct file *filep)
{
/*MOD_INC_USE_COUNT;*/ /* increments usage count of module */
return 0;
}

int my_release(struct inode *inode,struct file *filep)
{
/*MOD_DEC_USE_COUNT;*/ /* decrements usage count of module */
return 0;
}
ssize_t my_read(struct file *filep,char *buff,size_t count,loff_t *offp )
{
/* function to copy kernel space buffer to user space*/
if ( copy_to_user(buff,my_data,strlen(my_data)) != 0 )
printk( "Kernel -> userspace copy failed!\n" );
return strlen(my_data);

}
ssize_t my_write(struct file *filep,const char *buff,size_t count,loff_t *offp )
{
/* function to copy user space buffer to kernel space*/
if ( copy_from_user(my_data,buff,count) != 0 )
printk( "Userspace -> kernel copy failed!\n" );
return 0;
}
#endif

Makefile

obj-m += new_dev.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

How to compile

Put all the three files in the same folder and execute the following commands

  • make (to compile the module)

  • insmod new_dev.ko (To insert the module)


Once the module is inserted, do the following

mknod /dev/new_device c 222 0 (Command to make an entry in the /dev/, once the device is created, go and see the /dev/ folder for the entry new_device)

cat /dev/new_device (The message will be printed which is from the kernel, that is read operation)

echo “This is a write information to the kernel” > /dev/new_device (This command is to perform the write operation)

After checking the read and write operation, just remove the module

rmmod new_dev.ko

(Source: http://linuxgazette.net/125/mishra.html)

Monday, 22 March 2010

Workshop on Elearning tools and Techniques

The workshop on Elearning Tools and Techniques at VIT University, Vellore concluded well and nearly 40 participants have participated.

Some highlights of the workshop

  • The workshop started as per schedule exactly.
  • There was only a 20 minute presentation for the entire day, rest of the times were hands on session
  • The workshop completed as per schedule exactly.
  • The participants feedback collected online (avoided paper).

The agenda for the workshop is

Moodle (Modular Object Oriented dynamic Learning Environment)

  • Moodle for Administrator
  • Moodle for Teacher
  • Quiz Conduction and online examination
  • SCORM Based support in Moodle

Drupal (A Content Management System)

  • Role creation as a teacher and student
  • Student Assignment and Project Management System
  • Students Feedback Collection System

Wordpress (Blogging platform)

  • Explained how lecture notes can be delivered to the learners through blogging system
  • Course notes updation at regular intervals.
  • Invites students also as authors

eXe (Authoring Tool)

  • How to create content in eXe
  • Export it as html or SCORM

Some of the snapshots of the workshop

IMG_4607

A Banner infront of the campus

IMG_4621

Prof. Anthoniraj with Moodle Hands on.

IMG_4627

IMG_4624

Prof. Pradeepkumar (thats me) on Drupal Hands on

IMG_4642 

Prof. Balasubramanian on eXe demonstration

Special thanks to Prof. Mythili, Ms. Varuna Mittal, Ms. Nandhini and Ms. Supriya for the support towards the registration process.

For further details, contact us at http://pradeepkumar.org/contact-me-2

Saturday, 20 March 2010

Students Assignment and Project Management using Drupal

Modules Needed

  1. Go to create content and click Webform
  2. A page is opened with the following menus
    1. Menu Link title – “Assignment 1 - B. Tech (CSE)”
    2. Webform Settings - “Assignment 1 – B. Tech (CSE)” and write a short description like date of submission, what file type is permitted, what will be the grade, etc.
    3. Input format – Don’t do anything
    4. Webform access control – If only students are given access to submit their assignments, then enable students alone.
    5. Webform mail Settings: a mail will be delivered each time an assignment is submitted. If the teacher needs that, it can be enabled by typing an email address, else leave it blank
    6. Comment Settings: make it to Read/Write, so that the student can comment on the assignment submission , but the comment section can be disabled also
    7. Authoring information: give the name of the faculty
    8. Captcha: Enable a challenge to avoid automatic submission.
  3. Save the configuration, now there is a screen to add the components, the following elements are needed to submit the assignments
    1. Register Number of the student: Can be populated as dropdown

i. If assignment is given to more than one student, then multiple selection is to be enabled

    1. Assignment Title :

i. Max length of the title can be specified

    1. Upload the assignment

i. File type should be specified like pdf, doc, rtf, docx

ii. File size should be specified: 1000kilobytes

  1. Submit the form and the form is ready for viewing
  2. Once the form is submitted by all the students, all the files from that particular folder is copied and can be sent for evaluation.

assign

Student Project Management System

Same like Assignment Submission, but there is more number of form components needed as given below

  1. The project can be done by a single student to a maximum of 4 students per batch.
    1. So, 4 drop down boxes are needed, the first drop down box being mandatory
    2. Any one student of that batch can login and submit the form
    3. All student particulars like students email ids, phone numbers, etc
  2. Title of the project
  3. Guide information like guide name, email and phone number
  4. Project Venue like Industry, In house or Semester Abroad Programme
    1. A separate textarea for External Guide particulars
  5. Project abstract
    1. Can be uploaded as a separate file or using a text area they can type.
  6. Once the form is submitted by all the students, then the entire form is downloaded as an excel sheet and a project number may be allocated to each project like 2009001, 2009002, etc.
  7. During each project review like 0th review, 1st review, 2nd review and final viva, the relevant presentation and documents will be uploaded by the students. And even the information like how the project will be executed may also be collected.

So this project management is a very good application that can be done using the webform module given to the students/learners.

Not only that the feedback can also be collected from the student by giving a common userid and password to provide their feedback.

Friday, 19 March 2010

Top 10 Moodle Myths

  1. Once Moodle is stable, it will be put under licence. If it were any good, they’d already be charging for it
  2. Moodle needs a full time, php developer on your staff- or at least a lot of technical support to run it in house
  3. Moodle won’t be compatible with our other systems/software
  4. Moodle just doesn’t have the commercial experience we’re looking for
  5. You can’t just use Moodle out of the box – the basic Moodle install just isn’t that sophisticated
  6. There’s no documentation, training or technical support available – you’re on your own
  7. The Total Cost of Ownership is actually higher for Moodle than it would be with a wholly commercial platform
  8. Moodle is just no good for an institution as large as mine
  9. Moodle is just not designed to cope with my specific group of learners or customers
  10. We have all our stuff on *******, it’s just not worth the hassle of switching to Moodle
    Source: http://docs.moodle.org/en/Top_10_Moodle_Myths

Wednesday, 17 March 2010

Installing Wordpress on your Server

Download the source from the http://wordpress.org and extract or unzip it to the folder c:/wamp/www

1. Open the browser and type http://localhost/phpmyadmin and create a database for wordpress. I have created as wordpress.

2. Once the database is created, open a new window and type http://localhost/wordpress

3. First page may show error as give below

clip_image002

4. Click the “create configuration file”.

5. Provide the Databasse information to wordpress, in my case the Database name is wordpress and the username for my database is root and no password and hostname is localhost. (Always give a password to the database) See our video lecture to set a password for the Database)

clip_image004

6. Run the install and once the installation is over, it will ask for the blog title and the email

7. The username and a random password will be provided by the software. Make a note of it and do change the password immediately.

8. The following is the dashboard of the wordpress software which can be accessed using the link http://localhost/wordpress

clip_image006

Monday, 15 March 2010

Modules in Drupal

Modules

clip_image002

Operation: administer -> Site builidng -> Modules

In the above diagram, the list of modules which comes along with drupal package is available. Some of the modules are enabled and some are disabled. It is upto the user that the modules can be enabled/disabled.

To Enable, the checkbox to the ticked.

How to add a new module

  • To add any new module, go to the website http://drupal.org/project/Modules
  • For example, a module called as webform is being downloaded to create forms in the webpage, to download go to this link http://drupal.org/project/modules?text=webform
  • A file with an extension of .tar.gz will be downloaded. Which can be extracted through a standard software called as winrar for windows. Linux has the default extract of such files.
  • Copy the folder webform/ which is extracted from the above step and put it into C:/wamp/www/drupal/modules
  • After the folder is copied, refresh the module enable/disable link

clip_image004

  • Enable the module by tick the checkbox

Installing Drupal

Assumptions

To get Drupal up and running, you will need all of the following:

A domain

A web host

FTP access to your web host

OR

A local testing environment

For building sites, either a web host or a local testing environment will meet your needs. A site built on a web-accessible domain can be shared via the internet, whereas sites built on local test machines will need to be moved to a web host before they can be used for your course.

PHP version

Drupal 6 will run on PHP 4.3.5; however, many contributed modules require PHP 5.2. For this reason, PHP 5.2 is recommended. The Drupal 7 release will require PHP 5.2.

MySQL version

Drupal 6 will run on MySQL 4.1 or higher; 5 is recommended. The Drupal 7 release will require MySQL 5.0.

Installing Drupal—The Quick Version

The following steps will get you up and running with your Drupal site. This quickstart version gives an overview of the steps required for most setups. A more detailed version follows immediately after this section.

Once you are familiar with the setup process, installing a Drupal site takes between 5 and 10 minutes.

1. Download the core Drupal codebase from http://drupal.org/project/drupal.

2. Extract the codebase on your local machine.

3. In your extracted codebase, navigate to the sites/default directory. This directory contains one file: default.settings.php. Make a copy of this file, and name the copy settings.php.

4. Using phpMyAdmin, create a database on your server. Write down the name of the database.

5. Using phpMyAdmin, create a user on the database using the following SQL statement: GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password';

6. You will have created the databasename in Step 4; write down the username and password values, as you will need them to complete the install.

7. Upload the Drupal codebase to your web folder.

8. Navigate to the URL of your site. Follow the instructions of the Install Wizard. You will need your databasename (created in Step 4), as well as the username and password for your database user (created in Step 5).

Drupal Terminology

Drupal, like most software applications, has a specific lexicon. Mastering Drupal jargon is useful for many reasons, not the least of which is that using Drupal-specific terminology can help you search for information more effectively. The glossary in this chapter will give you an overview of commonly used Drupal terms, and what they mean.

This list of terminology will cover our common tasks and features. For a glossary that delves into some of the technical aspects of Drupal, the Glossary page in the Drupal handbook is a useful resource: http://drupal.org/node/937.

Node: A node is a piece of content that has been created on your site. For example, if you create a page, you have created a node.

Content Type or Node Type: On your Drupal site, you will have different types of nodes, or content. The default install comes with two content types, Page and Story. As we progress through this book, we will create a variety of other node types, such as bookmarks, student blogs, audio nodes, and so on. While all types of nodes are content, different node types can have different functions on your site.

Post: A post is a piece of content of any content type. For example, if a user creates a page node, they have created a post.

Core: Core refers to the base install of Drupal. The core install consists of the essential modules and some basic themes for Drupal. Although any person who has an account on drupal.org can suggest a change to the core codebase, most changes to core are thoroughly reviewed by developers within the community, and only a small number of people have the rights to actually make changes to core. As a result, the core codebase is stable and secure. The core codebase can be downloaded from http://drupal.org/project/drupal.

Contributed Modules: These have been written and shared by members of the Drupal community. Unlike core, which represents the work of several hundred contributors, most contributed modules have been written by individuals, or small teams working together. Contributed modules extend the functionality of Drupal, and this book describes how to use various contributed modules effectively. However, you should be cautious when installing a new contributed module. Contributed modules have not been reviewed as thoroughly as core. An overview of all contributed modules is available at http://drupal.org/project/Modules.

Theme: Themes control the look and feel of your site. The core install comes with several base themes, and you can download a range of contributed themes from http://drupal.org/project/themes.

Menu: Menus provide lists of links, and can be used to create an organizational and navigational structure for your site. All menus can be seen and edited at admin/build/menu; additionally, all menus create blocks.

Block: A block displays content within a specific place on the page. All menus create blocks, but you can also embed HTML or PHP code within a block. Blocks can be administered at admin/build/block.

Region: Every theme defines specific regions; blocks can be placed into these different regions using the administrative menu at admin/build/block.

Taxonomy: Taxonomy can be used to organize content within a Drupal site. Drupal permits site administrators to create different taxonomy categories to organize posts. For example, when posting an assignment, an instructor might want to create two taxonomies: one for the type of assignment, and another for the subject of the assignment.

Term: Terms, or tags, are specific items within a taxonomy. For example: a Physics instructor creates two taxonomies to organize assignments. The first is 'Type of Assignment' and the second is 'Subject'. If the instructor assigns his or her students to read an explanation of the Theory of Relativity, this assignment could be tagged with Reading (for Type of Assignment) and Relativity (for Subject).

User: This is the technical term for people using your site.

Role: All site users belong to one or more roles. Site administrators can assign different rights to different roles.

Anonymous user: Any person who visits your site and is not a member of your site is considered an anonymous user. The Anonymous user role allows you to specify how people who are not site members can interact with content and members of your site.

Authenticated user: All site members are authenticated users, and belong to the default authenticated user role. This default role can be used to assign a base level of rights to all site members. Then, other roles can be used to assign more advanced privileges to users.

UID1: This stands for User ID 1, or the first user on a Drupal site. UID1, by design, has full rights over your entire site. As a matter of best practice and security, UID1 should only be used as a back-up administrator account. Often, problems with your configuration will not be visible when logged in as UID1 because UID1 has more rights than other users.

Tuesday, 9 March 2010

Installing WAMP (Windows, Apache, MySQL, PHP)

  1. Download WAMP from the following link. http://www.wampserver.com/en/ 
  2. It is an .exe file, simply double click it and give the path as C:/wamp or whatever directory you want,give it.
  3. Once installation is successful, an icon will be appearing at the bottom right task bar like this icon
  4. Click the icon, a menu will be opened, click “put online” (this is to enable access to apache to other machines), if your ip address is 192.167.3.4, then any other machine which is connected in your network will give this ip address to use wampserver
  5. Once you click the icon as specfied in Step 3, you will get the following menu wamo
  6. localhost –> to display the homepage of the wampserver
  7. phpMyAdmin –> it is to manage the MySQL through a GUI, you can create databases, tables within databases, update, insert, etc
  8. www directory is the place where you can put all your web application files. if your entire application is residing in a folder called as “pradeep”, then copy the pradeep/ to the www/ and the path to the pradeep/ is http://localhost/pradeep
  9. Apache – to configure apache (like change of port address, server path change, etc)
  10. PHP –> to configure PHP
  11. MySQL –> to configure and work with MySQL in command mode.
  12. http://localhost/ will display the following page
  13. wamp1
  14. http://localhost/moodle will display the following page
  15. MOODLE

Ozone Pollution

getimage

E learning tools

There are various tools available for providing the lecture notes as content, video lectures, audio lectures, etc. Some of the tools are open source and some are paid tools. Its up to an individual to select the tool either as open source or paid source.

This post list some of the tools that are needed for Elearning:

Moodle 

Name: Modular Object Oriented Distributed Learning Environment

Software's used: PHP, MySQL4.1

For deplolying moodle in any environment, need for a web server is mandatory. Better Apache server can be used.

There are packages like WAMP (windows, Apache, MySQL and PHP) – This is for windows

and LAMP (Linux, Apache, MySQL, PHP) for Linux Operating System.

Moodle can be configured for the following apps

Scalable upto 50000 students of a University

Online Quiz Examination (Objective as well Descriptive)

Students Attendance Management System

Course Management

Drupal

Drupal is the very efficient tool for Content Management System (CMS). Drupal is a general purpose Content Management System which can be configured as elearning package with the help of various modules provided by the drupal software

Versions: Drupal 5, Drupal 6 and Drupal 7 (alpha) – Drupal 6 is used widely.

Software’s used: PHP, MySQL

Again here also WAMP or LAMP may be used to install Drupal.

Drupal can be configured for the following apps

Lecture notes posting on a regular basis

Student Assignment Submission

Student Project Management

Wordpress

Wordpress is the famous blogging platform for providing lecture notes on a regular basis and posted under various titles (tags).

Wordpress is given as a software package of not more than 2.5 MB, which will be installed on a web server particularly apache (WAMP or LAMP)

Software’s used: PHP, MySQL

The lecture notes can be posted on a regular basis (daily or weekly) and even the administrator of a domain can invite other authors to register and post.

The learners can able to read the notes(posts) and if any doubts, they can able to post queries in the commenting section which is also provided as part of the wordpress software.

Wordpress can be configured for the following

Lecture notes posting

Solving doubts through Commenting Section

Easily post the Audio/Video lectures

and not only the above the list goes on and on.

(NB: All the softwares above are free and open source. you can cusotmize as per your use and redistribute it)

Saturday, 6 March 2010

Inserting FLV Files (Flash Videos) in Wordpress

For people who host their blog using CMS such as Wordpress, you'll need a plugin and a Flash Media Player, so that people can play videos within the blog post.A Plugin called wordtube is available as a plugin in wordpress
and it is the open source JW FLV Media player.

Step 1: Download the wordtube.zip from the link http://wordpress.org/extend/plugins/wordtube, uncompress the fi les on your computer, and you will receive a folder named ‘wordtube’. Do not rename it. Upload the wordtube folder into the plugins folder (/wp-content/plugins/) of your blog using an FTP program.

Step 2: Download mediaplayer.zip from http://www.longtailvideo.com/players/ jw-fl v-player/, uncompress it, rename the file player.swf to mediaplayer.swf and upload it into to the wordtube folder of your blog.

Step 3: Login to enter the admin area, activate the wordtube plugin from the list, and then go to Settings | Wordtube to configure the plugin. Go to Media | WordTube, and you’ll land on a page that says ‘Manage Media files’.
From here, upload a fl ash video.

Step 4: Now create a post or open an existing one if you want to use the video therein. Before previewing the post and video, enter a tag [ media id= ‘id’] in the content box and at the desired location inside the post. In this tag, replace ‘id’ with the number of the video reflecting in the Media Center. Also, add the playlist tag as listed therein. Finally, hit the ‘preview post’ button to see how the video plays, when published.

Source: December 2009, Chip Magazine

Pradeepkumar.org Copyright © 2011 | Template created by O Pregador | Powered by Blogger