Showing posts with label Language. Show all posts
Showing posts with label Language. Show all posts

Wednesday, March 28, 2012

Refreshing some basics of PERL || Some common Interview Questions on PERL?

Since you are expected to know Perl and you have used PERL in your projects, it's a very obvious thing that Interviewer ask you the reason for choosing PERL for doing something in your project. Why not other scripting language?

The very simple answer to this question is that Perl is a very power Interpreter and FREE as well :)
Apart from this PERL is portable, easy and Flexible enough of learn & apply.

Subroutine is reusable set of code in Perl which can be accessed from different parts of the script.

CPAN in Perl - CPAN, the Comprehensive Perl Archive Network, is an archive of over 100,000 modules of software written in Perl, as well as documentation for it.

Defining Object of a Class -

use Class;

my $Object= Class->new();

Reading Command-Line arguments in PERL -

@ARGV is the array which contains all arguments we get from Command-line.

#!/usr/bin/perl
$numArgs = $#ARGV + 1;
print "thanks, you gave me $numArgs command-line arguments. ";
foreach $argnum (0 .. $#ARGV) {
print "$ARGV[$argnum] ";
}

Running a BAT file in Perl -

system("start C:\\Temp\\mybatchfile.bat");

Concatenation in Perl -

$filename = "/tmp/" . $file_name . ".tmp";

$filename = "/tmp/${file_name}.tmp";


Lot of basics around Perl are very well covered at  http://www.perl.com/pub/2000/10/begperl1.html

Saturday, July 10, 2010

eXtensible Markup Language (XML)

XML is a language used for data description. It does it independently of applications, protocols, operating systems and pogramming languages used. Its similar to HTML, where we use different tag structures for data definition.

Inside XML Tags we define what data elements are there. In XML, there are no standard tags as we have in case of HTML. In XML, developer can define her own tags.
With common data providing methods, XML has become common format for elecrtonic data tranfer and Web Services which supports Business to Business Transactions.


Here is an example of an XML:

Thursday, April 22, 2010

What is OpenCL???

OpenCL (Open Computing Language) is a framework for writing programs that execute across heterogeneous platforms consisting of CPUs, GPUs, and other processors. OpenCL includes a language for writing kernels (functions that execute on OpenCL devices), plus APIs that are used to define and then control the platforms. OpenCL provides parallel computing using task-based and data-based parallelism. Its architecture shares a range of computational interfaces with two competitors, NVidia's Compute Unified Device Architecture and Microsoft's DirectCompute.

OpenCL gives any application access to the Graphical Processing Unit for non-graphical computing. The GPU had previously been available for graphical applications only. The GPU memory would be available to the operating system and or applications essentially as faster system memory than the main system memory Thus, OpenCL extends the power of the Graphical Processing Unit beyond graphics (General-purpose computing on graphics processing units). OpenCL is analogous to the open industry standards OpenGL and OpenAL, for 3D graphics and computer audio, respectively.

OpenCL was initially developed by Apple Inc., which holds trademark rights, and refined into an initial proposal in collaboration with technical teams at AMD, IBM, Intel, and Nvidia. Apple submitted this initial proposal to the Khronos Group. On June 16, 2008 the Khronos Compute Working Group was formed with representatives from CPU, GPU, embedded-processor, and software companies. This group worked for five months to finish the technical details of the specification for OpenCL 1.0