How to connect redis in php

Installation Before we start using Redis in our Php programs, we need to make sure that we have Redis php Driver and Php set up on the machine. You can check Php tutorial for Php installation on your machine. Now, let us check how to set up Redis php driver. You need to download the 

Continue Reading…

Beautiful Soup findAll

Find all element by class or other parameters in Beautiful Soup Here are a couple of ways to search the soup for certain tags, or tags with certain properties: titleTag = soup.html.head.title titleTag # Page title titleTag.string # u’Page title’ len(soup(‘p’)) # 2 soup.findAll(‘p’, align=”center”) # [This is paragraph one. ] soup.find(‘p’, align=”center”) # This 

Continue Reading…

Replace in Python

Python String replace()   Description The method replace() returns a copy of the string in which the occurrences ofold have been replaced with new, optionally restricting the number of replacements to max. Syntax Following is the syntax for replace() method − str.replace(old, new[, max]) Parameters old — This is old substring to be replaced. new 

Continue Reading…

split() in Python

Split String in Python | Python String Split   Description The method split() returns a list of all the words in the string, using str as the separator (splits on all whitespace if left unspecified), optionally limiting the number of splits to num. Syntax Following is the syntax for split() method − str.split(str=””, num=string.count(str)). Parameters 

Continue Reading…