Posts

Featured post

How to Decode TLV Quickly

In TLV, the format is Tag, Length, and Value. The TLV protocol needs this type of data. Here you will know how to decode TLV data. According to IBM , TLV data is three parts. The tag tells what type of data it is. The length field denotes the length of the value. The Value-field denotes the actual value. Structure of TLV. TLV comprises three field values.  Tag Length Value EMV formulated different tags. They have their meanings. Usually, the Tag and Length together takes 1 to 4 bytes. The Best example for TLV. In the below example, you can find the sample TAG, LENGTH, and VALUE fields. [Tag][Value Length][Value] (ex. " 9F4005F000F0A001 ") where Tag Name =  9F40 Value Length (in bytes) =  05  Value (Hex representation of bytes. Example, "F0" – 1-byte) =  F000F0A001 In the above message, tag 9F40 has some meaning designed by EMV company. Here  you can find a list of EMV Tags. How to read the TLV Tag: 1 or 2 bytes Length: Length of the Value. F0-00-F0-A0-01 ==> 5 By

13 Tricky Kubernetes Interview Questions

Image
This post tells you tricky interview questions on Kubernetes, which orchestrates the cloud-native containerized apps. The term containerized apps mean the applications deployed on the cloud in the form of containers that contain images. Tricky Interview Questions I have listed 13 tricky interview questions, which help you to recap before the interviews. Also, you can use this knowledge for your projects. 1. What is Kubernetes? It is an Os (operating system) on the cloud, which oversees the cloud-native containerized apps. It is an orchestrator that means, which takes care of cloud apps - updates, rollback, scale-up, scale down, maintenance, etc. 2. What are Cloud-native apps? These apps run the cloud, which means on any cloud - private or public. They also run in an on-premise datacenter. The right answer to say is the applications designed and written in such a way that scale up or scale down as demand rises or fallen. 3. What are Containerized apps? Containers, which have images of a

5 Python File Modes to Deal with Big data

Image
The purpose of Pyhton file modes is you can - open, read, or write data. In this post, you can read about these modes. There are occasions you need to deal with data, which is present in the files. These, you can use for different purposes. Python file open modes File Open Modes in Python filename = input('Enter a filename : ') f1 = open(filename, 'mode') Python File mode w  To open the file for writing, you need w mode. The beauty of this is If the file does not exist, it creates one. This mode's purpose is to write the file. If you try to read, you will get an error. Python File mode w+ To Open the file for Reading and Writing, you need w+ mode. For instance, you used w+, you have tried to read the file - after writing, it displays blank. The reason is after writing cursor position will point at the end of the file. Python File mode a It appends the records at the end of the existing file. The file must exist to use this mode. Python File mode r To open a file in

5 Python Interpreter Tricky Questions

Image
Python is an interpreter, and it does not need a compiler. The interpreter's responsibility is to execute the program. When it first encounters a python program of the .py module, it converts it to Bytecode, which is portable and it is a one-time job . Tricky Interview Question: How Interpreter different from Compiler. Byte code is in the form of '00001111000111'. So it is zeros and ones. Where it differs? When you compare it to other Languages. It is a little tricky.  You May Also Like: Bytecode Vs Machine Code Internal Mechanism Internally, the Python interpreter converts source-code to byte-code when you first execute it. So to run Python-program, you need an interpreter installed on your machine. Execution flow of Interpreter To execute a Python program you need the below two: Interpreter Libraries Interpreter The process of the interpreter is BlackBox to the programmer. The interpreter creates a .pyc module, which is input to PVM, and to use in next time processing. T

Five top SQL Query Performance Tuning Tips

Image
SQL query runs faster when you write it in a specific method. You can say it as tuning. There are five tuning tips: List of Performance Tuning Tips use index columns, use group by, avoid duplicate column in SELECT & Where, use Left Joins use a co-related subquery. Five top SQL Query Performance Tuning Tips SQL Performance Tuning Tip: 01 Use  indexes in the where clause of SQL . Let me elaborate more on that. Be sure the columns that you are using in the WHERE clause should be already part of the Index columns of that database Table. An example SQL Query: SELECT *  FROM emp_sal_nonppi WHERE dob <= 2017-08-01; SQL Performance Tuning Tip: 02 Use GROUP BY . Some people use a  DISTINCT clause to eliminate duplicates . You can achieve this by GROUP BY. An example SQL Query: SELECT E.empno, E.lastname FROM emp E,emp_projact EP WHERE E.empno = EP.empno GROUP BY E.empno, E.lastname; SQL Performance Tuning Tip: 03 Avoid using duplicates in the Query. Some people use the same col

Artificial Intelligence Project Know these Five Before Start

Image
Suppose you have got an opportunity to create a project on AI. Consider these five before the start. These five are Learning, Programming Language, Knowledge representation, Problem Solving, and Hardware. 1. Learning Process. What is learning? - adding knowledge to the storehouse, and to improve its performance. The success of an AI program depends on two things- the extent of wisdom i t has and how frequently it acquires it.  Learning agents consists of four main components.  They are the: The Learning element - is part of the agent responsible for improving its performance.  The Performance element - is the part that chooses the actions to take.  Critics , that tells the learning element of how the agent is doing.  The Problem generator - suggests actions that could lead to new information experiences. 2. Programming Language. LISP and Prolog are the primary languages used in AI programming. LISP (List Processing): LISP is an AI programming language developed by John McCarthy in

5 Key Python Native Data Types

Image
Python supports five native data types. The Data types are such that a Programmer can use to write the logic and get the output. Many beginners may not aware of native data types. So I am adding a short note on that here. Native means as is Python supported data types. *** Python Five Key Native Data Types Python Native Data Types In Python, you can find five types of native data types. Here is a quick list for you. Those are Number, String, List, Tuple, Set, and Dictionary. 1. Number For all the numeric values,  you can use this data type. 2. String It handles all Characters, Special-symbols, and Alphanumeric values. 3. List It is something like sequential data. A program can do Sort, Merge, etc. on this data. 4. Tuple Data is a little different from the List. 5. Set This kind of Data-type helps you to do set operations. Those are like Intersection, Difference, etc. 6. Dictionary Here, the Dictionary something like a group of List kinds of data. But, each value has a key associated wi

Python Assigning Multiple Values at Once

Image
A ssigning values to a variable is similar to other languages. In python, you can find different styles. Usually, a variable takes or stores values when the programmer assigns. Check my below example for understanding quickly. Here is Python For Loop Tricky Example . *** Python Assigning the Values At once. a = 1 b = 1 c = 1 d = 1 or, you can assign simultaneously as; a=b=c=d=1 Python Assigning Multiple Values at Once The other way you can assign as; a, b, c, d = 10, 1, 3.5, 'Srini' From the above, you can understand as below: The '10' assigns to a. The '1' assigns to b. The '3.5' assigns to  c. Then 'Srini' to d.  References Python Basics Variable Assignment