Friday, June 28, 2013

SANGRAH - Knowledge Repository for FOSS in Education

          We are announcing the release of our portal Sangrah - Knowledge Repository for FOSS in Education http://nrcfoss.cdacmumbai.in/sangrah. The portal contains resources about different categories like Learning Management System, Content Management System, etc. It also contains user experiences for these categories, comparative analysis of various tools from these categories, specialised search, and collaboration facility for community supported content updates.



           The portal is maintained with least manual intervention as most of the tasks including, resource collection, categorization, user experience identification, comparative analysis, etc are largely automated.

           The portal is intended for academic institutions, entrepreneurs, among others to help them to adopt Free and Open Source Softwares (FOSS). The portal is still evolving, so kindly provide your feedback, improvement suggestions through the feedback section on portal.

  Kindly visit and register on the portal at - http://nrcfoss.cdacmumbai.in/sangrah

Regards
sangram Team.

Monday, June 17, 2013

PGDST Course Details of CDAC Kharghar

Hello,

C-DAC Mumbai is offering 1-year full-time Post Graduate Diploma in Software Technology (PG-DST) for the past several years with excellent placement records. The course provides a systematic blend of theory and hands-on, foundational and advanced concepts, and includes current trends and technologies.

Admission is now open for the next batch of PG-DST commencing on 27th August 2013, and its admission test (CST) will be held on 14th July 2013.

Course Synopsis

The 1-year full-time PG-DST course offers a carefully defined blend of theory and hands-on, foundational and advanced concepts, and includes current trends and technologies. The overall objective of the course is to build usable technical skills for practical application development over web and mobiles, using state-of-the-art technologies and frameworks. The course lays emphasis on the ability to move effectively from problem statements to working programs.

While learning programming languages, one often tends to focus on the intricacies of the language, rather than looking at it as a tool for problem solving. Keeping this in mind, the whole course is built around the notion of “from problems to programs”. All relevant software engineering practices are given emphasis from the beginning, including bug tracking, version control, project management, and so on. PG-DST has practical assignments or mini-projects in every module that provide exposure to a number of state-
of-the-art software tools and environments.

The course exposes the candidates to a variety of tools and frameworks, and expects proficiency in them. The list includes programming languages (C, C++ and Java), database systems (MySQL, Oracle, Hibernate, NoSQL), development frameworks (Spring, HTML-5, PHP, JavaScript), tools in software engineering (Redmine, Git), Operating systems (Gnu/Linux, Windows, Android), etc.

PG-DST Syllabus
  • Programming & Problem Solving - Procedural programming, Object oriented programming, Data structures, Algorithm design and analysis, File handling, Multi-threaded programming.
  • Operating System Concepts & Networking - Resource & CPU scheduling, Concurrency control, Memory management, Networking protocols, OSI layers & functions, Network security.
  • Database Technologies - SQL & query optimization, Database design, Relational databases, Object oriented databases, ORM technologies, Unstructured data.
  • Web Application Development - Client-server/Multi-tier architecture, JavaScript, HTML5, GUI design, Server side programming with PHP, Web development framework, Web services and SOA.
  • Software Engineering - Requirement gathering, Analysis & design, Software development life cycle including agile, Bug tracking, Version control, Software architecture including design patterns.
  • Advanced Topics - Machine Learning, Data mining, Mobile computing, Cloud computing, etc.
  • Soft Skills - Communication, Presentation, Time management, Team handling, etc.
  • Live Project - Complete development project covering the entire SDLC.
Salient Features
  • Excellent placement record.
  • Over 30 years of history in training software professionals.
  • Practical assignments or mini-projects in every module.
  • Complete development project covering the entire SDLC as course project including use of version control and bug-tracking.
  • Exposure to a number of state-of-the-art software tools and environments.
  • Systematic blend of foundational concepts and practical skills.
  • Use of technology enhanced education for improved learning and assessment.
  • Some universities consider PG-DST as equivalent to the first year of their MSc programme.
  • Hostel facility available on a first-come-first-served basis.

PG-DST Centre: C-DAC Kharghar
Course Commencement: 27th August 2013
Fees: Rs 79,000/-
Eligibility Criteria: Graduate in any subject
Admission Test: Competence in Software Technology (CST) Exam
General Aptitude (1 hour)
Logical reasoning, Quantitative reasoning, Visual-spatial reasoning, High school mathematics, Vocabulary, English comprehension & Verbal ability
Computer Concepts (1 hour)
Computer basics, Data representation, Binary arithmetic, Foundations, Computer architecture, Computer languages, Operating System basics, Basic programming using C
CST Exam Date: 14 July 2013
CST Exam Venues: Bengaluru, Mumbai, Noida & Patna
Last Date of Submitting CST Application Form: 3 July 2013
CST Application Fee: Rs 500/- (to be paid as DD or cash at C-DAC Kharghar)
Announcement of CST Results: 24 July 2013
For more information: entrance-mumbai@cdac.in

With best regards,

PG-DST Coordinator
C-DAC, Near Kharghar Rly Stn, Navi Mumbai (Tel 022-27565303)
C-DAC, Gulmohar Crossroad No. 9, Juhu, Mumbai (Tel 022-26703251)

Thursday, June 13, 2013

Changing Properties of Terminal / Console using termios

         Linux Devices are designed for interactive use, that means devices used both for input and for output. All the devices have a similar interface derived from the serial TeleType paper-display terminals and thus dubbed the tty interface. tty(TeleType) is a interface which is used to access serial terminals, consoles, xterms, network logins and many more.

        All tty manipulation can be done using termios structure and several functions which all are defined in <termios.h> header file. struct termios as follows.

struct termios
{
   tcflag_t c_iflag;         /* input mode flags */
   tcflag_t c_oflag;        /* output mode flags */
   tcflag_t c_cflag;         /* control mode flags */
   tcflag_t c_lflag;          /* local mode flags */
   cc_t c_line;                 /* line discipline */
   cc_t     c_cc[NCCS];   /* special characters */
}

c_iflag - determines how received characters are interpreted & processed
c_oflag - determines how your process writes to the tty are interpreted & processed
c_cflag - determines serial protocol characteristics of the devices
c_lflag - determines how characters are collected & processed before they are sent to output processing

The main two functions which are used to manipulate tty are
tcgetattr() - to get a device's current settings, modify those settings
tcsetattr() - to make the modify settings active

Now lets write a small program, where we can change the properties of our terminal / console pro-grammatically so that we can read a password without echoing it in console / terminal. To understand the code do not forget to read comments in the code.

// File Name: termios.c

 #include <stdio.h>
 #include <termios.h>
 #include <unistd.h>

 void main()
 {
    struct termios termios_temp, termios_orig;
    char pwdbuffer[1024];

    // getting and saving current termios settings
    tcgetattr(STDIN_FILENO, &termios_temp);
    termios_orig = termios_temp;

    // changing current termios settings, so that entered password can't be echoed
    termios_temp.c_lflag &= ~ECHO;
    termios_temp.c_lflag |=ECHONL;
    tcsetattr(STDIN_FILENO, TCSAFLUSH, &termios_temp);
    printf("NOTE: termios settings changed, so entered pwd can't be echoed :-)\n");

    // checking that the settings took effect or not
    tcgetattr(STDIN_FILENO, &termios_temp);
    if(termios_temp.c_lflag & ECHO)
    {
        fprintf(stderr, "failed to turn off echo");
        // setting original termios settings
        tcsetattr(STDIN_FILENO, TCSANOW, &termios_orig);
    }
  
    // getting pasword and printing the password
    printf("Enter Password:");
    fflush(stdout);
    fgets(pwdbuffer, 1024, stdin);
    printf("Your Entered Password is: %s", pwdbuffer);
  
    // setting original termios settings
    tcsetattr(STDIN_FILENO, TCSANOW, &termios_orig);
    printf("NOTE: termios settings changed to original:-)\n");
}

To Run: gcc termios.c
              ./a.out

Sunday, June 2, 2013

Adding / Injecting Audio Track to Video Without Audio

Suppose you have a video file and that video has no sound. You have a separate audio Mp3 file which is of same length (same play time) as video file and you want to inject / add that audio file to video file. How it can be done?

It can be done by using mencoder, is a encoder for popular MPlayer.

To Add / inject audio file into video file, please following the following instructions.

Step-1: Install mencoder using following command
             $sudo apt-get install mencoder.

Step-2: Move audio file and video without audio file into same folder
             $mv myAudio.mp3 /home/myhome/InjectAudo/
             $mv myVideo.avi /home/myhome/InjectAudo/

Step-3: Run following commands to add/ inject audio into video
             $cd /home/myhome/InjectAudo/
             $mencoder -ovc copy -audiofile myAudio.mp3 -oac copy myVideo.avi -o OutPutAVFile.avi

Step-4: Play OutPutAVFile.avi file.


Saturday, May 25, 2013

One Day Workshop on Parikshak - An Online Program Grading System

                             Computer Programming is an important aspect of any computer-science/information-technology course. This is among the most difficult to teach, since being a good programmer is a skill to be acquired coupled with knowledge of many different aspects such as abstraction, analysis, structured programming, debugging, etc. Usually computer programming is taught through a combination of theory classes on concepts and languages, and lab classes on specific languages. Assignments are given, which are manually graded by the instructor. Manual grading of programs is very tedious and time consuming. While evaluating student assignments the teacher has to act as a compiler/interpreter and inspect each line in program and judge whether the overall program would work correctly. While this grading approach works fine for a small number of simple assignments, it gets unwieldy as the complexity and number of the assignment increases. This, in turn, results in inadequate attention to the practical programming skills of students.
                   Parikshak is a web based system which offers a solution to this. A tool like Parikshak, which facilitates automated evaluation of software programs can significantly reduce the load of the faculty, give direct feedback to student, thereby leading to efficient handling of programming assignments/exams. Parikshak allows teachers to define programming assignments systematically, allows registered students to attempt solving them online, and automatically assesses the solution. The feedback is available to the students and the faculty, for follow up and record. Using Parikshak to manage your programming component, clearly offers many advantages.
                    During the workshop, we will demonstrate the system, discussing various ways in which tool can be used in the academic setting, and provide hands-on for faculty. Since we have limited number of seats, we request you to confirm participation from your colleges latest by June 12, 2013, by email or phone call. Teachers from the CS/IT departments are preferred, though others with some programming experience/interest are welcome.



Contact Information
Details of workshop
Phone: 022-27565303, Extn 301
Contact Person: Ms. Mercy Sobhan
Date & Timing: Sat, 15 June, 2013
10:00 AM – 5:00 PM
Venue: CDAC Kharghar
Registration Fees: Rs 600/-
Tea and Lunch will be provided to all participants

Registration fee has to be paid by Demand Draft / Cheque (local or at par) drawn in favour of CDAC payable at Mumbai. Please mention your name, organization and contact no. on the back side of the Demand Draft / Cheque.

Looking forward to your support and participation

Thanking you,


Monday, May 20, 2013

Plotting / Creating Graphs in C / C++

Graph (Chart): A graph is a diagram / picture which is showing a relation between two variable quantities.

In this post,  I am going to show you, how to create or plot a graph(chart) in C / C++ program using gnuplot tool. GNUPLOT is a command line tool to generate 2D and 3D graphs. 

Lets write a small program to create a graph as shown below using C / C++ program with gnuplot tool.

Note: Before running following program make sure you have installed gnuplot. (sudo apt-get install gnuplot)


// File Name: GraphPlotting.c
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#define NO_OF_POINTS 11
#define NO_OF_COMMANDS 4

void main()
{
    // X, Y Co-ordinate values
    double X_Values[NO_OF_POINTS] = {0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0};
    double Y_Values[NO_OF_POINTS] = {0.0 ,0.5, 0.0, 1.0, 0.0, 1.5, 0.0, 1.0, 0.0, 0.5, 0.0};
    register int i=0;
    // Creating & Opening Co-ordicates.txt file in Write mode
    FILE * CO_Ordinates_FILE = fopen("Co-ordicates.txt", "w");
    // Writing Co-Ordinates into Co-ordicates.txt file
    for (i=0; i  <  NO_OF_POINTS;  i++)
    fprintf(CO_Ordinates_FILE, "%lf %lf \n", X_Values[i], Y_Values[i]);
    // List of commannds to run on gnuplot
    char * CMDsFOR_GNUPLOT[] = {"set title \"RENI V/S SAM\"",
                                "set xlabel \"----RENI--->\"",
                                "set ylabel \"----SAM--->\"",
                                "plot \"Co-ordicates.txt\" using 1:2 with lines"
                               };
    // Opening gnuplot using pipe IPC
    FILE * GNUPLOT_Pipe = popen ("gnuplot -persist", "w");
    // Executing gnuplot commands one by one
    for (i=0; i  <  NO_OF_COMMANDS;  i++)
    fprintf(GNUPLOT_Pipe, "%s \n", CMDsFOR_GNUPLOT[i]);
}

To Run: gcc GraphPlotting.c
              ./a.out

Friday, May 10, 2013

Listing Input devices in C / C++

         Without  input devices we can't do anything with our computer / system. Here Input device may be Mouse, Keyboard, Touch screen, External touch pad, Pen tablet, Mic, camera etc.

         When we are programatically dealing with input devices, It is unavoidable to List / scan all input devices to get information about those devices. For this purpose we can use a X function called XListInputDevices.

Syntax:
XDeviceInfo * XListInputDevices(Display *display, int *ndevices)
where
Display *display Specifies the connection to the X server.
int *ndevices Specifies the address of a variable into which the server can return the number of input devices available to the X server.

XListInputDevices allows a client to determine which devices are available for X input and information about those devices. An array of XDeviceInfo structures is returned, with one element in the array for each device. The number of devices is returned in the ndevices argument. The X pointer device and X keyboard device are reported, as well as all available extension input devices. The use member of the XDeviceInfo structure specifies the current use of the device.

Lets write a small C program to list All Xinput devices using XListInputDevices.

//File Name: ListInputDevices.c
#include <stdio.h>
#include <X11/Xutil.h>
#include <X11/extensions/XTest.h>
#include <X11/extensions/XInput.h>

void main()
{
        int n, i=0;
        XDeviceInfo *devList, *curDev;
        // Connecting to XServer
        Display *dpy = XOpenDisplay(0);
        // Getting Input Device list
        devList = XListInputDevices(dpy, &n);
        // Checking for more then 0 devices
       if (!devList)
        printf("\n No Input devices to List");
        // Listing devices ID and NAME
        while(i < n)
        {
                curDev = devList + i;
                printf(" DEVICE ID: %d ",curDev->id);
                printf(" DEVICE NAME: %s \n",curDev->name);
                i++;             
    }
}
To Run: gcc ListInputDevices.c -lX11 -lXi
             ./a.out

Out Put: Your All Xinput Devices