Samual Sam has Published 2491 Articles

header() function in PHP

Samual Sam

Samual Sam

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

336 Views

The header() function sends a raw HTTP header to a client.Syntaxheader(string, replace, resp_code)Parametersstring − The header string to send.replace − Indicates whether the header should replace previous or add a second header.resp_code − It forces the HTTP response code to the specified valueReturnThe header() function returns nothing.ExampleThe following is an ... Read More

ftp_cdup() function in PHP

Samual Sam

Samual Sam

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

84 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 −

Python Implementation of automatic Tic Tac Toe game using random number

Samual Sam

Samual Sam

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

467 Views

This is very funny game. In this game no player is needed, it is an automatic game. Here we are using two Python modules numpy and random. In this game the mark on the board is put automatically instead of asking the user to put a mark on the board, ... Read More

Draw an ellipse in C#

Samual Sam

Samual Sam

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

2K+ Views

To draw an ellipse, use the drawEllipse() method in C# that belong to the Graphics object. It has a pen object as well as a rectangle object. You need windows form to draw shapes in C#. Set graphics object. Graphics g = this.CreateGraphics(); Now, the pen ... Read More

Python program to find Union of two or more Lists?

Samual Sam

Samual Sam

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

484 Views

Union operation means, we have to take all the elements from List1 and List 2 and all the elements store in another third list. List1::[1, 2, 3] List2::[4, 5, 6] List3::[1, 2, 3, 4, 5, 6] Algorithm Step 1: Input two lists. Step 2: for union operation ... Read More

char vs string keywords in C#

Samual Sam

Samual Sam

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

987 Views

string keyword Use the string keyword to declare a string variable. The string keyword is an alias for the System.String class. For example. string name; name = "Tom Hanks"; Another example. string [] array={ "Hello", "From", "Tutorials", "Point" }; char keyword The char keyword is used ... Read More

Find average of a list in python?

Samual Sam

Samual Sam

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

728 Views

Python provides sum function for calculating n number of element. Here we use this function and then calculate average. Algorithm Step 1: input “size of the list” Step 2: input “Element” Step 3: using sum function calculate summation of all numbers. Step 4: calculate average. Example code ... Read More

Python Program to crawl a web page and get most frequent words

Samual Sam

Samual Sam

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

362 Views

Our task is to crawl a web page and count the frequency of the word. And ultimately retrieving most frequent words. First we are using request and beautiful soup module and with the help of these module creating web-crawler and extract data from web page and store in a list. ... Read More

Instruction type INR R in 8085 Microprocessor

Samual Sam

Samual Sam

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

7K+ Views

In 8085 Instruction set, INR is a mnemonic that stands for ‘INcRement’ and ‘R’ stands for any of the following registers or memory location M pointed by HL pair. R = A, B, C, D, E, H, L, or M This instruction is used to add 1 with ... Read More

Fetching top news using news API in Python

Samual Sam

Samual Sam

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

570 Views

News API is very famous API for searching and fetching news articles from any web site, using this API anyone can fetch top 10 heading line of news from any web site. But using this API, one thing is required which is the API key. Example Code import requests ... Read More

Advertisements