Call User Method/Function in PHP

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

149 Views

The call_user_method() function call a user method on an specific object. Note − The function is deprecated now. Syntax call_user_method(method, obj, params) Parameters method − Method name obj − Object that method is being called on. params − Array of parameters Alternative Since the call_user_method() deprecated in PHP 4.1.0, and removed in PHP 7.0, therefore use the following as an alternative solution − call_user_func(array($obj, $method), $params);

Display Current Connection Info in MySQL

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

3K+ Views

MySQL provides many functions that give the current connection information. For instance, to know about the current user, use the user() function. Syntax mysql> SELECT CURRENT_USER(); Here is the output that displays the name of the current user. +----------------+ | CURRENT_USER() | +----------------+ | root@% | +----------------+ 1 row in set (0.00 sec) In the above, % tells us about localhost. To check the current connection id, use the following method − mysql> SELECT CONNECTION_ID(); The following is the output that shows the current connection id. ... Read More

Instruction Type LDAX RP in 8085 Microprocessor

Samual Sam
Updated on 30-Jul-2019 22:30:23

16K+ Views

In 8085 Instruction set, LDAX is a mnemonic that stands for LoaD Accumulator from memory pointed by eXtended register pair denoted as “rp” in the instruction. This instruction uses register indirect addressing for specifying the data. It occupies only 1-Byte in the memory. This rp can be either BC register pair represented by B or DE register pair represented by D.Note that LDAX H is not provided in 8085 instruction set. This is because, LDAX H is the same as MOV A, M in its function. Mnemonics, Operand Opcode(in HEX) Bytes LDAX B 0A 1 ... Read More

Comparison Between C# and .NET Framework

Arjun Thakur
Updated on 30-Jul-2019 22:30:23

585 Views

C# is a programming language and .NET framework is a software framework developed by Microsoft. .NET has Common Language Runtime (CLR), which is a virtual component of .NET framework. And framework is a large class of library. .NET not only has C#, but through it, you can work with VB, F#, etc. Programs written for .NET Framework execute in Common Language Runtime. .NET Framework supports development in C#. C# is a part of .NET and has the following features − Boolean Conditions Automatic Garbage Collection Standard Library Assembly Versioning Properties and Events Delegates and Events Management

Extract K Bits from a Given Position in Python

Chandu yadav
Updated on 30-Jul-2019 22:30:23

2K+ Views

This function is use to extract k bits from pos position and returns the extracted value. Here we use python slicing technique. Example Input:: number=170 K=5 Pos=2 Output=21 Algorithm Extractionbit(no, k, pos) /*user input number is stored in variable no, extracted bit is stored in variable k and the position of bit is pos. */ Step 1 : first convert the number into its binary form using bin(). Step 2 : remove the first two character. Step 3 : then extracting k bits from starting ... Read More

Get a List of MySQL Views

George John
Updated on 30-Jul-2019 22:30:23

3K+ Views

To get a list of MySQL views, we can use the SELECT command with LIKE operator. Let us see the syntax first. mysql> SELECT TABLE_SCHEMA, TABLE_NAME -> FROM information_schema.tables -> WHERE TABLE_TYPE LIKE 'VIEW'; The following is the output that displays the total number of views. +--------------+-----------------------------------------------+ | TABLE_SCHEMA | TABLE_NAME | +--------------+-----------------------------------------------+ | sys ... Read More

Instruction Type STAX RP in 8085 Microprocessor

karthikeya Boyini
Updated on 30-Jul-2019 22:30:23

12K+ 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 LHLD A16 in 8085 Microprocessor

Samual Sam
Updated on 30-Jul-2019 22:30:23

18K+ Views

In 8085 Instruction set LHLD is a mnemonic that stands for Load HL pair using Direct addressing from memory location whose 16-bit address is denoted as a16. So the previous content of HL register pair will get updated with the new 16-bits value. As HL pair has to be updated, so data comes from two consecutive memory locations starting at the address a16 and also from next address location. This instruction uses absolute addressing mode for specifying the data in the instruction. It occupies 3-Bytes in the memory. Mnemonics, Operand Opcode(in HEX) Bytes LHLD Address 2A ... Read More

Check if a Sentence is a Pangram in Python

Samual Sam
Updated on 30-Jul-2019 22:30:23

389 Views

Given a sentence. Our task is to check whether this sentence is pan grams or not. The logic of Pan grams checking is that words or sentences containing every letter of the alphabet at least once. To solve this problem we use set () method and list comprehension technique. Example Input: string = 'abc def ghi jkl mno pqr stu vwx yz' Output: Yes // contains all the characters from ‘a’ to ‘z’ Input: str='python program' Output: No // Does not contains all the characters from ‘a’ to 'z' Algorithm Step 1: create a string. Step 2: ... Read More

Instruction Type SHLD A16 in 8085 Microprocessor

karthikeya Boyini
Updated on 30-Jul-2019 22:30:23

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

Advertisements