Posts

Showing posts from November, 2014

8086 program code for drawing star image on screen

; image drawing; demo; * * * * * * * * * *org 0x100icon_width = 16screen_width = 320screen_height = 200jmp startthank_you db ' Thank you! ', 0star_x dw 144star_y dw 84star_colour db 2; * * * * * * * * * *start proc farmov ax, csmov ds, axmov es, axmov ah, 0mov al, 13hint 10hdraw_star:mov bx, star_xmov dx, star_ymov si, starcall puticoninc star_colourmov cx, 10mov dx, 0mov ah, 86hint 15hjmp draw_star; * * * * * * * * * *retstart endp; * * * * * * * * * *; * input: bx = x; * dx = y; * si = imageputicon procmov ax, 0A000hmov es, axmov ax, screen_widthmul dxadd bx, axjnc no_carryinc dxno_carry:mov cx, icon_widthnext_y:push cxmov cx, icon_widthnext_x:mov di, bxmov al, [si]cmp al, 0je transparentmov al, star_colourmov es:[di], altransparent:inc siadd bx, 1jnc no_car_xinc dxno_car_x:loop next_xpop cxadd bx, screen_width-icon_widthjnc no_car_yinc dxno_car_y:loop next_yretputicon endp; * * * * * * * * * *star:db 0,0,0,0,0,0,0,

XML data type in postgreSQL

       The XML data type can be used to store XML data. Its advantage over storing XML data in a text field is that it checks the input values for well-formedness, and there are support functions to perform type-safe operations on it. Use of this data type requires the installation to have been built with  configure –with-libxml .      The xml type can store well-formed “documents”, as defined by the XML standard, as well as “content” fragments, which are defined by the production  XMLDecl ? content in the XML standard. Roughly, this means that content fragments can have more than one top-level element or character node. The expression xmlvalue  IS DOCUMENT  can be used to evaluate whether a particular xml value is a full document or only a content fragment. Creating XML Values To produce a value of type xml from character data, use the function  xmlparse : XMLPARSE ( { DOCUMENT | CONTENT } value ) Examples: XMLPARSE (DOCUMENT ‘<?xml version=”1.0″?><book><title>Manu

Tools for Querying and Transformation on XML data/files

Increasing numbers of applications that use XML to exchange, mediate, and store data, tools for effective management of XML data are becoming increasingly important nowadays. Which leads to increase in demand for tools which provide easier querying and transformation for XML data. In particular, tools for querying and transformation of XML data are essential to extract information from large bodies of XML data, and to convert data between different representations (schemas) in XML. Just as the output of a relational query is a relation, the output of an XML query can be an XML document. As a result, querying and transformation can be combined into a single tool. Following mentioned are some tools/languages which provide facilities for transforming and querying XML data.   Xpath: XPath is a language for path expressions, and is actually a building block for the remaining two query languages. A path expression in XPath is a sequence of location steps separated by “/” (instead of the “.”

TCS code vita questions

I had participated in TCS codevita 2014 and cracked the first round successfully but I was unable to crack 2nd round ,so drop out from the the contest. Following is one of the question asked in TCS CodeVita 2014 , sharing with you. Problem Statement: An ISBN (International Standard Book Number) is a ten digit code that uniquely identifies a book. The first 9 digits are used to represent the book and the 10th digit is used to ensure that the ISBN is correct. To validate the ISBN number, calculate a sum that is 10 times the first digit plus 9 times the second digit plus 8 times the third digit … all the way until you add 1 times the last digit. If the sum is divisible by 11, then the 10 digit code is a valid ISBN number. For example 1111456291 is a valid ISBN, because 10*1 + 9*1 + 8*1 + 7*1 + 6*4 + 5*5 + 4*6 + 3*2 + 2*9 + 1*1 = 132 which is divisible by 11. Each of the first nine digits can take a value between 0 and 9. Sometimes it is necessary to make the last digit equal to ten. This

Basic things that every TCS CodeVita participant must know

Rules You know that c odevita is a team contest with team size 2. As a team you get 6 hrs to solve the problems. If both team members’ login at same time they will get 6 hrs each. Submissions CodeVita will consider team scores. You should choose a strategy that will maximize your chances of solving maximum problems. You know that you have a chance to make unlimited submissions in any of the 7 languages that the system supports. Supported languages are C, C++, C#, Java, Perl, Python and Ruby . You can attempt a single problem in any number of languages as you wish. So lets say you started solving a problem in C and a few submissions later you feel that this problem is better solved in Java, you can do that. Your target should be to get your submission in “Accepted” state.   Compilers and IDEs  : You know that you have to write code on your machine and submit the code file as a File Upload to the CodeVita web application. You know that CodeVita uses the following language versions  

Introduction to WEKA tool

    WEKA (Waikato Environment for Knowledge Analysis) is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from Java code. WEKA contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization. It is also well-suited for developing new machine learning schemes. The name WEKA is derived from a flightless bird with an inquisitive nature. WEKA is open source software issued under the GNU General Public License. WEKA tool can also be use for with Big Data analysis. Since WEKA is freely available for download and offers many powerful features (sometimes not found in commercial data mining software), it has become one of the most widely used data mining systems. Nowadays WEKA also became one of the favorite vehicles for data mining research and helped to advance it by making many powerful features available to all. In data and web mining following are the