karthikeya Boyini

karthikeya Boyini

1,421 Articles Published

Articles by karthikeya Boyini

Page 141 of 143

Instruction type STAX rp in 8085 Microprocessor

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 13K+ Views

In 8085 Instruction set, STAX is a mnemonic that stands for SToreAccumulator contents in memory pointed by eXtended register denoted as “rp”.Hererp stands for register pair. This instruction uses register indirect addressing for specifying the destination. So using this instruction, the current content of Accumulator will be written to the memory location as pointed by 16-bit address as stored in the register pair. It occupies only 1-Byte in memory. Mnemonics, Operand Opcode(in HEX) Bytes STAX B 02 1 STAX D 12 1 STAX B is an example instruction of this type. It ...

Read More

Instruction type SHLD a16 in 8085 Microprocessor

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 11K+ Views

In 8085 Instruction set, SHLD is a mnemonic, which stands for Store HLpair using Direct addressing in memory location whose 16-bit address is denoted as a16. As HL pair has to be stored, so it has to be stored in two consecutive locations starting at the address a16. We know that H and L are 8-bit registers. So their contents will be stored in two consecutive memory locations as each memory location can hold 8-bits of data. This instruction uses absolute addressing mode for specifying the destination. It occupies 3-Bytes in the memory. Mnemonics, Operand Opcode(in HEX) Bytes ...

Read More

Print m multiplies of n without using any loop in Python.

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 305 Views

Given a number n, print m multiplies of n without using any loop. Here we use recursive function. Examples Input: n = 15 Output: 15 10 5 0 5 10 15 Algorithm Step 1: Given n. Step 2: If we are moving back toward the n and we have reached there, then we are done. Step 3: If we are moving toward 0 or negative. Step 4: If m is greater, then 5, recursive function with true flag else recursive function is false. Step 5: If m is not greater than 5 then flag is false. ...

Read More

Covariance and Contravariance in C#

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 361 Views

To deal with classes effectively, use the concept of covariance and contra variance. Let us consider the following as our class. One is a base class for class Two, whereas Two is a base class for Three. class One { } class Two: One { } class Three : Two { } A base class can hold a derived class, but the opposite is not possible. With Covariance, you can pass a derived type where a base type is expected. Co-variance can be used on array, interface, delegates, etc in C#. Contra variance is for parameters. ...

Read More

How to compile unsafe code in C#?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 3K+ Views

For compiling unsafe code, you have to specify the /unsafe command-line switch with command-line compiler. For example, to compile a program named one.cs containing unsafe code, from command line, give the command − csc /unsafe one.cs Under Visual Studio IDE, enable use of unsafe code in the project properties. The following are the steps − Open Project properties by double clicking the properties node in the Solution Explorer. Click on the “Build” tab. Select the option "Allow unsafe code".

Read More

How can we speed up Python "in" operator?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 630 Views

The python operator performs very badly in a list, O(n), because it traverses the whole list. You can use something like a set or a dict(hashed data structures that have very fast lookups) to get the same result in ~O(1) time!But this also depends on the type of data structure you're looking at. This is because while lookups in sets/dicts are fast, insertion may take more time than list. So this speedup really depends on the type.

Read More

Using client side XSLT transformations in HTML5

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 280 Views

Client-side XSLTProcessor API is part of the HTML5 scripting specification, as stated below:When an XSLT transformation program is triggered by a processing instruction and the browser implements a direct-to-DOM transformation, script elements created by the XSLT processor need to be marked "parser-inserted" and run in document oThe XSLTProcessor.transformToDocument() method adds elements to a Document that does not have a browsing context, and, accordingly, any script elements they create need to have their "already started" flag set in the prepare a script algorithm and never get executed (scripting is disabled). Such script elements still need to be marked "parser-inserted", though, such ...

Read More

What are the best practices for using if statements in Python?

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 701 Views

Here are some of the steps that you can follow to optimize a nested if...elif...else.1. Ensure that the path that'll be taken most is near the top. This ensures that not multiple conditions are needed to be checked on the most executed path.2. Similarly, sort the paths by most use and put the conditions accordingly.3. Use short-circuiting to your advantage. If you have a statement like:if heavyOperation() and lightOperation():Then consider changing it toif lightOperation() and heavyOperation():This will ensure that heavyOperation is not even executed if lightOperation is false. Same can be done with or conditions as well.4. Try flattening the ...

Read More

How to check the validity of your CSS

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 121 Views

Validation is the process of checking something against a rule. When you are a beginner, it is very common that you will commit many mistakes in writing your CSS rules. How will you make sure whatever you have written is 100% accurate and up to the W3 quality standards?If you use CSS, your code needs to be correct. The improper code may cause unexpected results in how your page looks or functions.But if you want to validate your CSS style sheet embedded in an (X)HTML document, you should first check that the (X)HTML you use is valid.Tool to check the ...

Read More

Using activity in SAP for number range intervals and number range objects

karthikeya Boyini
karthikeya Boyini
Updated on 30-Jul-2019 162 Views

As the name indicates, activity 02 is for intervals while activity 17 is for objects. There can be a different number range interval for a given SAP number range interval.

Read More
Showing 1401–1410 of 1,421 articles
Advertisements