FTP alloc Function in PHP

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

144 Views

The ftp_alloc() function allocates space for a file to be uploaded to the FTP server.Syntaxftp_alloc(connection,size_of_file,res);Parametersconnection − The FTP connection to usesize_of_file − The number of bytes to allocateres − A variable to store the server responseReturnThe ftp_alloc() function returns TRUE on success or FALSE on failureExampleThe following is an example −

Find Names Starting with A, B, or C Using MySQL Query

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

7K+ Views

You need to use LIKE with OR operator to find all the names that starts with a or b or c. The syntax is as follows:SELECT *FROM yourTableName WHERE yourColumnName like 'A%' or yourColumnName like 'B%' or yourColumnName like 'C%';The above query finds all names that starts only with the letter ‘a’ or ‘b’ or ‘c’. To understand the above syntax, let us create a table. The query to create a table is as follows:mysql> create table AllNamesStartWithAorBorC    -> (    -> Id int NOT NULL AUTO_INCREMENT,    -> EmployeeName varchar(20),    -> PRIMARY KEY(Id)    -> ); Query ... Read More

Interrupt Structure in Z-80

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

2K+ Views

As we know that the Intel 8085 has five interrupt pins (TRAP, RST7.5, RST6.5, RST6.5 and INTR), but the Zilog Z-80 has only two interrupt pin. The NMI and INT . But it has superior interrupt structure compared to 8085.The INT InterruptIt is an active low, level triggered input interrupt. This is maskable and using DI instruction this can be disabled. When the interrupt pin is disabled, the Z-80 will not be interrupted if the IO devices enables the INT pin. Even after the reset, it will be disabled. So if we want that the MPU will be interrupted by the pin, there must be ... Read More

MySQL SUM Query with IF Condition

Rishi Rathor
Updated on 30-Jul-2019 22:30:24

8K+ Views

The Sum() is an aggregate function in MySQL. You can use sum query with if condition. To understand the sum query with if condition, let us create a table.The query to create a table −mysql> create table SumWithIfCondition    −> (    −> ModeOfPayment varchar(100)    −> ,    −> Amount int    −> ); Query OK, 0 rows affected (1.60 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into SumWithIfCondition values('Offline', 10); Query OK, 1 row affected (0.21 sec) mysql> insert into SumWithIfCondition values('Online', 100); Query OK, 1 row affected ... Read More

Effective Human Resource Management for Company Growth

Leela
Updated on 30-Jul-2019 22:30:24

165 Views

Human resource management is the key to establish and develop a company. We can divide the HR into two main divisions, administrative and strategic.The first division Administrative will help in, recruitment and retention of staff and other administrative responsibilities to run the office. The other division strategic management is what makes the business to grow, the company to achieve targets by talent management and helping the management to take key decisions and implement them. They can assess the companies future staffing requirement and project the workforce required to complete the project.Human resource management helps its employees to understand the business ... Read More

Set Global Event Scheduler in MySQL

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

975 Views

There is a single way by which you can set a global event_scheduler=ON even if MySQL is restarted. You need to set global system variable ON and need to use this system variable even if MySQL restart.For this, I am using system variable @@event_scheduler using select statement. The query is as follows:mysql> select @@event_scheduler;The following is the output:+-------------------+ | @@event_scheduler | +-------------------+ | ON | +-------------------+ 1 row in set (0.00 sec)Now, restart MySQL. The query is as follows:mysql> restart; Query OK, 0 rows affected ... Read More

Addition of Multi-Byte Numbers in Z-80

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

279 Views

Now, in this section we will see how we can use the Zilog Z-80 Microprocessor to add Multi-byte numbers.In this example, we are using 4-byte numbers (56 2F 7A 89)16 and (21 FB A9 AF)16In the memory, at first, we are storing the byte counts, and then the numbers (from least significant bytes to Most significant bytes) in different segments. So after storing the data, the memory structure will be look like thisAddressValue5000H04H...5050H89H5051H7AH5052H2FH5053H56H...5070HAFH5071HA9H5072HFBH5073H21H...Now, we are writing a program at location 8000H to add these two 4-byte number and store the result at location 5090H onwards.ProgramAddressHex CodesLabelsMnemonicsComments800037SCFSet the carry flag80013FCCFComplement the ... Read More

Sum Elements of a Column in MySQL

Anvi Jain
Updated on 30-Jul-2019 22:30:24

517 Views

Use aggregate function sum() to sum the elements of a column in MySQL. The syntax is as follows −select sum(yourColumnName1) as anyVariableName1, sum(yourColumnName2) as anyVariableName2, sum(yourColumnName3) as anyVariableName3, ............N from yourTableName;To understand the above syntax, let us create a table. The following is the query to create a table −mysql> create table SumDemoOnColumns −> (    −> First int,   −> Second int, −> Third int −> ); Query OK, 0 rows affected (0.56 sec)Insert some data in the table using insert command. The query is as follows ... Read More

FTP cdup Function in PHP

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

159 Views

The ftp_cdup() function changes the current directory to the parent directory.Syntaxftp_cdup(con);Parameterscon − The FTP connectionReturnThe ftp_cdup() function returns TRUE on success or FALSE on failure.ExampleThe following is an example wherein we are updating the current directory to parent directory −

Exchange of Blocks in Z-80

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

217 Views

In this section we will see how we can use the Zilog Z-80 Microprocessor to Exchange the contents of each element from two different blocks.The number of items in each block are given at location 5000H, and the blocks are at position 5050H and 5070H.So before swapping the items in the memory is looking like thisAddressValue5000H04H...5050H89H5051H7AH5052H2FH5053H56H...5070HAFH5071HA9H5072HFBH5073H21H...Now, we are writing a program at location 8000H to exchange the block contents.ProgramAddressHex CodesLabelsMnemonicsComments800021 00 50LD HL, 5000HLoad the HL pair with 5000H8003DD 21 50 50LD IX, 5050HSet the index register with 5050H8007DD 7E 00LD A, (IX+00H)Load Acc with IX + 00H800ADD 46 20LD ... Read More

Advertisements