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

WorldTrueSight

Get the latest news and reviews about technology!

Showing posts with label TS. Show all posts
Showing posts with label TS. 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

29 Oct 2018

TRIVZIA EARN ONLINE






Added On: 29 / 10 / 2018


NOTE:

I don't own this app or anything, I'm just spreading this app across Pakistan,If you have any trouble regarding this just tell me I will remove this content, there is no need to report us thank you!
All right goes to respective owner!
---------------
Before you really get into it and go through all the details the major thing you need to know is this app only work across all Pakistan or people abroad with Pakistani nationality means CNIC of Pakistan!
-------------------------------

Our New Tab Labeled As Mobile World, So I thought I Must Have To Come With Some Interesting Post!

How to win?

STEP 1: Download this app from link given below
LINK FOR ANDROID USERS: TRIVZIA.apk app!
LINK FOR IPHONE USERS:    TRIVZIA.ios app!

STEP 2: Open app and register yourself, along this they will ask you for a referral code you can type [ truesight ] their without brackets, whenever someone comes through your referral they get lives means if your answer for question is incorrect you will loose a life and will stay in game cause of that live, so it will be appreciated !


How to earn money online



STEP 3: Game time and amount will be displayed at your TRIVZIA app screen so wait for the time and just give them right answers!


This is the screenshot of app for my account, I've earned this in a day with wrong answer too, so according to this in a week you can get around 550 easily for a ten minute game!

How to earn money online

HAVING PROBLEM ANYWHERE ? COMMENT BELOW!

2 Oct 2018

BANK MANAGEMENT SYSTEM




Added on: 2 / 10 / 2018

Description:

This is a database connected and object oriented programming based project, I believe if you're downloading this file you know exactly how data base works and how queries work, well to make it run, you have to create one database and two tables with desire parameters in you're SQL Server and give them name as given in this project to compile and match it successfully.


All code is done by ME, you can have it for your personal uses!

Download link: CLICK ME !

22 Sep 2018

How to Print Emoji Using Python :

To print Emojis in Python, first you have to integrate your VS code with GitBash.
How to  Integrate VS code with GitBash ? 
Follow the link below ,


Then you need Unicodes of Emoji . You can find uni codes on ,
Emoji Python

Copy any of your favorite Emoji's Unicode & paste it in your VS Code File .Like ,
Print(U+1F600)
Then, Replace (+) with 3 zeroes and add BackSlash in the start of unicode.
Emoji Python

How to Display Emoji in GitBash ?

  • First change the directory by writting cd D : //  
(If you want to move it in D drive, you can also move it to F or E drive)

  • Then create a Python file by using touch Emoji.py
(.py Extension for Python file & touch is a command for creating file .)

  • Write code Emoji.py to code. Code by using the above instructions .

(Emoji is the file name. You can give any file name of your choise)
  • Write python Emoji.py  to display output
Emoji Python

 Print more Emojis ,
Emoji Python


*****************************************************************
Thanks


How to Integrate Git Bash with Visual Studio Code :


Step 1 :

First Download 
  • Python 3.7.0

How to integrate Git Bash with Visual Studio Code
  • Git Bash 
Visual Studio
  • VS Code 
    How to integrate Git Bash with Visual Studio Code

How to integrate ?

  • Open Visual Studio Code extension (Press Ctrl+Shift+X for Extension ) & write Python. Then Install the first Extension. Like this ,
Visual Studio


  • Then go to File -> Preference -> Settings (Or just Press Ctrl + ,) 
  • Then Copy Paste this 🖣 Path in USER SETTINGS
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe"
 Save it.
How to integrate Git Bash with Visual Studio Code

  • Then Open your VS file , Press Ctrl + ~ (Control+Tilde) . Your Bash Terminal will open. Like ,
How to integrate Git Bash with Visual Studio Code

It means you have successfully Integrate Git Bash with VS Code . Enjoy your Coding. ☺️

*********************************************************************************
If you have any Query in Integrating Git Bash with VS Code , feel free to ask in the comment section . Thanks @WorldTrueSight

Addition + Subtraction + Multiplication + Division In Assembly Language x86

equation code in assembly language processor x86

Welcome back,
Before we are start I want to tell you we are using Irvine Libraries and 86x processor to perform such operations as mentioned above !

Things which are discussed below in this content are listed below:

  • Addition in assembly language x86 => 8086
  • Subtraction in assembly language x86 => 8086
  • Multiplication in assembly language x86 => 8086
  • Division in assembly language x86 => 8086
I'm using Irvine Library on visual studio 2010 Professional to run assembler to execute my code!
If you want to setup this platform visit => VS 2010 Pro + Irvine Lib FULL !

FOR BETTER UNDERSTANDING:

"Processor has only register in use i.e. eax which is use to display so u may   hold data in other registers but make sure to place your final result in the eax register to make your program error free, this whole game of assembly is passing values to the free register and right register where eax is accumulator"

Addition in assembly language code:

Suppose value is: 8+2 => 10 
Addition in assembly language code

Subtraction in assembly language code:

Suppose value is: 8-2 => 10
Subtraction in assembly language code

Multiplication in assembly language code:

Suppose value is: 8*2 => 10
multiplication in assembly language code

Division in assembly language code:

Addition + Multiplication and Division Together, Focus "PASSING VALUES"

Suppose equation is: (3*4) + (6/2) + (5*2) = 25 

mov 3 to eax and mov 4 to ebx and use mul ebx to put 12 in eax
now mov eax to ecx as shown in code !
mov 6 to eax and mov 2 to ebx and div ebx to put answer in eax
now use add ecx,eax means answer of 3 * 4 + 6 / 2 is in ecx register
eax is free now put 5 in eax and 2 in ebx again !
again use mul ebx and add eax which is 5 * 2 = 10 into ecx to get your answer which is 25 !
division in assembly language code



16 Sep 2018

VISUAL STUDIO 2010 PRODUCT KEY FREE



Hello peeps!

Not really getting you people in deep, below is the product key file for any version of 2010.

HOW TO REGISTER YOUR PRODUCT BY VISUAL STUDIO PRODUCT KEY FREE ? 

  • First of all, download the visual studio product key free file from below link !
       DOWNLOAD LINK => CLICK ME !
  • Secondly, open your visual studio and in the top menu corner find " HELP


Visual Studio Product Key Free
  • Open it and after that, click on          " REGISTER PRODUCT "

Visual Studio Product Key Free

  • A pop-up box will be open enter the required key from the notepad file you just downloaded and click " REGISTER "

AFTER RE-OPENING SUCH REGISTER PRODUCT OPTION A POP-UP WILL OPEN LIKE THIS!
Visual Studio Product Key Free

You're good to go, Enjoy your product !

6 Sep 2018

ASSEMBLY CODE.ASM

Added On: 6  - September - 2018
Description:

New to assembly language ?
Here you go with the basics of it ! Watch tutorial carefully.
Having issues about connecting libraries ?


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

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

 ONE CLICK INSTALLATION PROCESS

MS SQL SERVER [ MANAGEMENT STUDIO ]


SOLUTION OF HOW TO RUN SQL MANAGEMENT TOOL / HOW TO FIX SQL MANAGEMENT TOOL / WHERE TO FIND SQL MANAGEMENT STUDIO, HOW TO CONFIGURE SQL MANAGEMENT STUDIO AND TOOLS !


Welcome All, This is the quick trick or tip to how you can download and install with one click process the management studio of SQL SERVER, 

Ignore the issues in other setup, just download this approx 1 GB file and do one click installation and enjoy your SQL MANAGEMENT STUDIO.

Download link: CLICK ME !

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 ! 

17 Aug 2018

STATE EQUATIONS , STATE TABLES & STATE DIAGRAM:

Step 1 :

How to make State Equations ? 

Consider the Sequential circuit given below ,
State Equation State Table State Diagram
 Make State Equation of Next State of Flip Flop with the help of basic gates as ,
                                         A(t+1) = A(t)x(t) + B (t) x (t)

Description :

As A is the output of first D Flip Flop , we make Next State equation of A(t+1) . t+1 represent the Next State . As A is connected with 2 AND Gates and an OR Gate . The inputs of first AND Gate are present state of A and x . The inputs of second AND Gate are present state of B and x . Therefore, these inputs are written in equation as A(t)x(t) and B(t)x(t)  . Then both outputs of AND Gates are connected with an OR Gate. Then , the final equation of first D flip flop is ,
                                     A (t+1) = A (t) x (t)  + B (t) x (t)
You can also write as ,
                                   A (t+1) = A . x  + B . x

{Multiplication due to AND GATE and addition symbol because of OR Gate }

Now do the same for B . Make State Equation of Next State of Flip Flop B as ,
                                    B(t+1) = A'(t)  x(t) 

Description :

Because the second D Flip Flop is connected with a single AND Gate . The  inputs of AND Gate are invert of A (A') and x . So the Next State Equation of second D flip flop is ,
                                    B ( t+1) = A'(t) x (t) 
You can also write as ,
                                    B(t+1) = A' . x
{ Multiplication because of AND Gate }

Output Equation :

If the Sequential circuit have Output (As this circuit has y output). Then you have to make output equations using the same method . y is connected with an OR Gate (B and A) or  B(t)+A(t) . Then connected with a NOT Gate x' . Then both outputs of OR Gate and AND Gate are connected with an AND Gate. So, the final output equation will become ,
                              y ( t+ 1) = [ A(t) + B(t) ] x'(t)

You can also write as ,
                             y( t+1 ) = (A + B) x'

What will you do if there is JK - Flip Flop instead of D - Flip Flop? Is there any change ?

The only change is you  will now put the next state of A and B in the general equation of JK- Flip Flop 
i-e :            JQ' + K'Q

For example :

Consider the sequential circuit given below ,
State Equation State Table State Diagram

Now, make State Equation of A using the above method.
The State Equation of A is J =B(t) and K = x' B(t)
Now put these values in  J A' + K'A { HERE OUTPUT IS A therefore Q = A }
                          A(t+1) = A' B(t) + (x'B(t))' A
                           A(t+1) =A'B (t) + (xB'(t))A
                            A(t+1)=A'B(t) + Ax+AB'(t)
or you can also write as,
                            A(t) = A' B  + Ax +AB'
Now, make State Equation of B using the above method.
 The State Equation of A is J=x'  and K= A' x' + A x 
Now put these values in  J B' + K'B { HERE OUTPUT IS B therefore Q = B }
                           B(t+1) = x' B' + (A' x' + A x)' B
                          B(t+1) = x' B' + A' B x + A B x'

Notice that this circuit has no output therefore no output equation . 

What will you do if there is T- Flip Flop instead of JK-Flip Flop? Is there any change ?

No , You will just put the Next State of A and B in the general equation of T-Flip Flop 
i-e      T Q' + T'Q

Step 2 :

How to make State Tables ?

 State Tables (sometimes called transition Table) can be made by two methods ,
Now consider the circuit with D-Flip Flop ,
State Equation State Table State Diagram

First Form of State Table :

First form of State Table includes Present State , Input , Next State and Output (if present in the circuit) . Now! There are three inputs A , B and x.Therefore there are 8 possible combinations. The Next State of   State table will fill by State Equation. For example for the Next State of A x must be equals to 1.So, where x=0 you can simply put the Next State of A = 0 in the State Table. The next condition for Next State of A is either A or B is equals to 1 then the Next State of is 1 . Otherwise Next State of A is 0. So you can see in the Table given below where x is 0 Next State of A is 0 . And when A and B both are 0 , Next State of A is again 0. Except these cases , the next state  of A is 1 .

Next State of B and Output in the State Table can be filled by the same method.  
State Equation State Table State Diagram


Second Form of State Table :

The second form of State Table has no input column but it will divide the inputs in x=0 and x=1 in the Next State & Output as given below. The second form of State Table has less number of rows than First Form of State Table and it is easier to fill. Second form of State Table has greater number of Columns if there are more than one inputs. 
In the Table given below there is only two inputs A and B. Therefore only 4 possible combinations .
Then fill the Next State and Output by the method described above. 

State Equation State Table State Diagram

Step 3 :

How to make State Diagram ?

State Diagram can be made by using two models ,

  • Mealy Model
  • Moore Model                             

 Mealy Model :

State Equation State Table State Diagram

Description :

State Diagram is made with the help of State Table. The Binary number inside the circle represent the Present State of Flip-Flop . The arrows represent the Next State of Flip-Flops. The binary number before the slash represent the input and the binary number after the slash represent the output state at the time of conversion of Flip-Flop from Present State to the Next State. 
(Mealy Model is suitable for this State Table)

Is there any change in the State Table and State Diagram of JK and T - Flip Flop ?

No , the State Table and State Diagram of JK and T- Flip Flop can be created by using the above method.

**************************************************************************************