Send Mail from Your Gmail Account Using Python

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

17K+ Views

In this article, we will see how we can send email with attachments using Python. To send mail, we do not need any external library. There is a module called SMTPlib, which comes with Python. It uses SMTP (Simple Mail Transfer Protocol) to send the mail. It creates SMTP client session objects for mailing. SMTP needs valid source and destination email ids, and port numbers. The port number varies for different sites. As an example, for google the port is 587. At first we need to import the module to send mail. import smtplib Here we are also ... Read More

Instruction Type POP RP in 8085 Microprocessor

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

8K+ Views

In 8085 Instruction set, with the mnemonic POP, we can pop out 2-Bytes from the top of the stack through rp i.e. register pair e.g. BC, DE, HL or AF. Here AF is a register pair formed with Flag and Accumulator registers and also known as PSW (Processor Status Word). In PSW, Accumulator is the MS Byte, and Flags register is the LS Byte. Mnemonics, Operand Opcode(in HEX) Bytes POP B C1 1 POP D D1 1 POP H E1 1 POP PSW F1 1 In the above ... Read More

Instruction Type PUSH RP in 8085 Microprocessor

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

13K+ Views

In 8085 Instruction set, PUSH rp instruction stores contents of register pair rp by pushing it into two locations above the top of the stack. rp stands for one of the following register pairs. rp = BC, DE, HL, or PSW As rp can have any of the four values, there are four opcodes for this type of instruction. It occupies only 1-Byte in memory. Mnemonics, Operand Opcode(in HEX) Bytes PUSH B C5 1 PUSH D D5 1 PUSH H E5 1 PUSH PSW F5 1 ... Read More

Instruction Type LXI SP D16 in 8085 Microprocessor

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

3K+ Views

In 8085 Instruction set, LXI SP, d16 instruction is a special case of LXI rp, d16. Using this instruction, we can load 16-bit immediate data/address on the Stack Pointer (SP). It occupies 3-Bytes in the memory. Mnemonics, Operand Opcode(in HEX) Bytes LXI SP 31 3 Let us consider a sample instruction LXI SP, 4050H as an example of this category. The result of execution of this instruction has been shown in the following tracing table − Before After (SP) Any value 4050H Address Hex ... Read More

Differences Between BLOB and TEXT Data Types in MySQL

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

3K+ Views

BLOB stands for Binary Large Objects and as its name suggests, it can be used for storing binary data while TEXT is used for storing large number of strings. BLOB can be used to store binary data that means we can store pictures, videos, sounds and programs also. For example, the following image can be stored into BLOB because the image has binary data. BLOB values behave like byte string and BLOB does not have a character set. Therefore, comparison and sorting is fully dependent upon numeric values of bytes. TEXT values behave like non-binary string or character string. ... Read More

Instruction Type SPHL in 8085 Microprocessor

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

5K+ Views

In 8085 Instruction set, SPHL is an instruction with the help of which Stack Pointer will get initialized with the contents of register pair HL. It is an indirect way of initializing the stack pointer. But it is not a very common and regularly usable instruction as well. It occupies only 1-Byte in memory, compared to the other instruction LXI SP instruction, which is 3-Bytes long used for initializing SP on the other hand. Due to this advantage, SPHL can be useful when SP is required to get initialized to a specific value a number of times in a program. ... Read More

Instruction Type XTHL in 8085 Microprocessor

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

8K+ Views

In 8085 Instruction set, XTHL is a mnemonic that stands for “eXchange Top of stack with HL”. This instruction exchanges the contents of the top two locations of the stack with the contents of register pair HL. Here it is not an exchange between SP with HL.It occupies only 1-Byte in memory. Mnemonics, Operand Opcode(in HEX) Bytes XTHL E3 1 The result of execution of this instruction XTHL is shown below with a sample instruction and along with tracing table. Let us consider HL and SP are having contents BBAAH and 4050H. And ... Read More

Convert Timestamp to Datetime in MySQL

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

6K+ Views

We can convert the timestamp to date time with the help of FROM_UNIXTIME() function. Let us see an example. First, we will create a table with column of int type. Then we convert it to timestamp and again into date time. Creating a table with integer type. mysql> create table TimestamptoDateDemo -> ( -> YourTimeStamp int(11) -> ); Query OK, 0 rows affected (0.57 sec) Inserting records into the table. mysql> insert into TimestamptoDateDemo values(1389453221); Query OK, 1 row affected (0.23 sec) To display all the ... Read More

Instruction Type INX SP in 8085 Microprocessor

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

1K+ Views

In 8085 Instruction set, INX SP instruction is used to increment the SP contents by 1. INX SP instruction is a special case of INX rp instruction which increases the content of the register pair. This instruction occupies only 1-Byte in memory. Mnemonics, Operand Opcode(in HEX) Bytes INX SP 33 1 Let us consider that the initial content of SP is 4050H. So after increment of the content of SP by using INX SP instruction, SP would have the value 4051H. Here is the required tracing table as below − Before ... Read More

Maximum Length of a Table Name in MySQL

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

2K+ Views

The maximum length of a table name is 64 characters long according to MySQl version 8.0.12. Check your installed MySQL version. mysql> select version(); The following is the output. +-----------+ | version() | +-----------+ | 8.0.12 | +-----------+ 1 row in set (0.03 sec) We can check the maximum length of the table name at the time of creating it. If we give more than 64 characters, then it will not create a table and an error is thrown. Creating a table which has more than 64 characters of table name. mysql> ... Read More

Advertisements