| About Us | Contact Us | Privacy Policy | Join Us+ |

WorldTrueSight

Get the latest news and reviews about technology!

Showing posts with label Logic. Show all posts
Showing posts with label Logic. Show all posts

3 Feb 2019

File Organization In Database[COMPLETE CONCEPT]

Database SQL Server

FILE ORGANIZATION:

           Storage and access method of a file is called file organization.

TYPES OF FILE ORGANIZATION:

1.Sequential File Organization
2.Direct access File Organization

SEQUENTIAL FILE ORGANIZATION:

When we have to access data in sequence.
Example:
Tape-drive. In tape drive if we want to access the 2nd video we have to go through the 1st then we can access the second one . We can’t jump directly to  2nd .
ADVANTAGE OF SEQUENTIAL FILE ORGANIZATION:
Sequential saves memory. Because there is no meta data (header/footer) with a single record.

USES OF SEQUENTIAL FILE ORGANIZATION:
Sequential file organization is helpful when we have to access the whole batch . i.e Electricity bills.

DRAWBACKS OF SEQUENTIAL FILE ORGANIZATION:
1.Time loss
2.Searching is difficult in Sequential file Organization
3.If we try to insert a new data we have to reorganize the whole data.
4.If we are searching a data which is not present in the records. It will search the whole data then tell that the data is not present.

DIRECT FILE ORGANIZATION:

Example:


Hard Drive.

ADVANTAGES OF DIRECT FILE ORGANIZATION:

1.Time saving
2.Searching is easy in Direct file Organization

TYPES OF DIRECT FILE ORGANIZATION:

1.Indexed Sequential
2.Hashing


INDEXED SEQUENTIAL:
           
Indexed Sequential is same as Table of Content in books.
HASHING:
   Hashing is a function but not a specific function. We can made our hashing function.

TYPES OF HASHING FUNCTION:

1.Division method
2.Folding method

DIVISION FUNCTION:

x mod y return remainder. If remainder of two numbers are same then it is called hashing conflict.

SOLUTION OF HASHING CONFLICT:

Add 1 to the remainder.

FOLDING METHOD:

You can fold a number to find that in which track the given record should go.

FOR EXAMPLE:

Suppose a record with Student ID 8530 & you have to use folding method to tell that  which hard drive’s track will hold this record ?

  8      5        3       0

            8       5
      +    3      0
      --------------
           11     5   <------- This record will save in 5th 
     ---------------
track in hard drive!

THANK YOU... 🙂

22 Dec 2018

Assembly Language


DESCRIPTION: 

To Print a star Pattern in assembly we use Nested Loop such that ecx register controls the outer or parent loop and ebx register controls the nested or inner loop.

The provided code will ask for a user input. Such that it will ask the user to enter a number and the program will  print a star pattern according to user's entered number.

Complete Documentation => SOURCE CODE



******************************************************
If you find any query regarding the provided code then you are free to ask in the comment section.
THANK YOU ☺️

21 Dec 2018

IMPLEMENTATION OF VENN DIAGRAM :

The Venn Diagram: When Jon Venn first envisioned his new diagram’s future, he surely couldn’t have expected it to be popular more than a century after he created it. However, it has stood the test of time and has remained a popular diagram for showing correlations between different aspect of a subject or even different subjects entirely. Even in today’s modern world of 3D imaging and greatly advanced technology, the Venn Diagram has a firmly cemented place in many people’s daily life.

     The provided Code works on classes. And apply Polish notation Algorithms. (ie infix to postfix conversion + evaluation)

WORKING :

C# Visual Studio

This code will first convert the given Infix Expression to Postfix using STACK and then evaluate it to give the Shaded Region.

Kindly watch this VIDEO 👇 for better understanding , Hope this video helps you

This video credits belongs to respected owner
we don't own this video!
If you're the owner of this video and wan't us to remove just comment below thank you.



COMPLETE DOCUMENTATION => SOURCE CODE

You can also make the Diagram of your own choise. The only change you have to make is in the arrays behind the Calculate button.
C# Visual Studio
 ***************************************************
If you find any Query regarding the provided Code then you can ask in the comment section
Thank You 🙂


TIC TAC TOE in ASSEMBLY 8086 Processor

TIC TAC TOE :


Tic-Tac-Toe is a two-player game with two symbols denoting the two players: X and O. The playing board is a 3x3 square.
The rules are as follows:
  •  Each player takes a turn placing his character (X or O) into one of the nine squares.
  •  A player cannot place his symbol in a square that is already occupied by a symbol.
  •  The game ends when a player creates a winning combination of his symbols or when there are no empty squares remaining.
  •  Winning combination is defined as three horizontally adjacent, three vertically adjacent, or three diagonally adjacent symbols
  •   If neither player creates a winning combination when all nine squares are occupied, the game is a draw, often referred to as a "cat game."

IMPLEMENTATION :

Implementation of TIC TAC TOE in Assembly is a little bit harder than other Programming Languages.The provided code will work in Three Levels :
  • Easy  ( 3x3)
    TIC TAC TOE in ASSEMBLY 8086 Processor


  • Medium (4x4)
    TIC TAC TOE in ASSEMBLY 8086 Processor


  • Hard (5x5)
    TIC TAC TOE in ASSEMBLY 8086 Processor
Such that the number of Rows and Columns increases with the increase of Level.


COMPLETE DOCUMENTATION = > SOURCE CODE
*****************************************************
If you find any query regarding this code.then you are free to ask in the comment section

4 Sep 2018

Irvine Library + Visual Studio

ASSEMBLY LANGUAGE


Added on: 4 / 9 / 2018
Description:

To connect IRVINE with VISUAL STUDIO and get rid of the errors of LINK and others, I prefer you all to download Visual Studio 2010 32/64 bit + Irvine 2010 32 bit !

I've tried it all they possible way and figure it out that the best IDE to work on ASSEMBLY of visual studio is 2010 version! because upgraded version have some issues !
---------------------------------------------------------------------------------
THE DOWNLOAD SECTION
Below are the links provided for Visual Studio and Irvine.
Make sure you download them from here to get no errors !

VISUAL STUDIO 2010 DOWNLOAD LINK:  CLICK ME !
IRVINE LIBRARY WITH EXAMPLES LINK: CLICK ME !
---------------------------------------------------------------------------------
HOW TO CONNECT IT AND WORK

STEP BY STEP PROCEDURE:
1) Install the Irvine Library in C:\
2) Install the Visual Studio !
3) Open Visual Studio and Select a simple C or C++ File and enter your desire name.
4) Then select a C++ console application and name it with .asm execution !
5) Connect the Irvine libraries path as shown below in Video !
7) Enter the code, the structure code is given below.
8) Try printing your name by debugging it.
-----------------------------------------------------------

PATHS [POINT 5]


-----------------------------------------------------------

Structure Code


CODE :
INCLUDE Irvine32.inc
.data
mymessage BYTE"TRUESIGHT",0dh,0ah,0
.code
main proc
mov edx,OFFSET mymessage
call WriteString
exit
main endp
end main

-------------------------------------------------------

For any queries comment below !