Zend Anwar

Full stack web developer

How to Increase PHP memory limit

PHP memory limit sometimes makes it problem to upload. please check way to increase your memory limit. Way 1:  Modify php.ini Search “memory_limit” in your php.ini, and change the value of it. If no “memory_limit” found, add the following line at the end of php.ini memory_limit = 2568M ; Save file. And restart Apache. Way […]

Read More

Magento: Automatic Related Products Extension free download

Automatic Related Products Extension free download

Read More

Changes to login.phtml or register.phtml don’t reflect

Please  to edit template/persistent/customer/form/register.phtml. Use the template hints. Also, with any phtml changes you make, make sure that you have caching disabled, and flush all caches (System -> Cache Management).

Read More

How big is a Petabyte, Exabyte, Zettabyte, or a Yottabyte?

8 bit is equal to 1 byte 1024 byte is equal to 1 kilobytes 1024 kilobyte is equal to 1 megabytes 1024 megabyte is equal to 1 gigabytes 1,024 gigabytes is equal to 1 terabyte 1,024 terabytes is equal to 1 petabyte 1,024 petabytes is equal to 1 exabyte 1,024 exabytes is equal to 1 […]

Read More

Python String Operations

Concatenation >>>’Zend’ + ‘Anwar’ Zendanwar >>>’Zend’ *3 ZendZendZend Iterating Through String >> count = 0 >>> for str in ‘Zend Anwar’: if(str == ‘n’): count += 1 >>> print(count, “String Found”) 2 String Found  

Read More

Syntax of Python Function

def functionname(parameters): “””docstring””” statement(s) return [expression] Example: #!/usr/bin/python # Function definition is here def ima( lovestr ): “This prints a passed string into this function” print lovestr return; # Now you can call ima function ima(“I’m fall in love!”)

Read More

Star triangle with python for loop

>>> star =  input(“Enter the star to draw: “) Enter the star to draw: * >>> limit = int(input(“Enter the limit: “)) Enter the limit: 10 >>> for i in range(1, limit+1): print (star*i) Output–    * ** *** **** ***** ****** ******* ******** ********* **********

Read More

Multiplication table in python

>>> var = 5 >>> for i in range(1,11): multiply = var * i print (“Multiplication table”, var,”*”, i,”=”,multiply)  Output– Multiplication table 5 * 1 = 5 Multiplication table 5 * 2 = 10 Multiplication table 5 * 3 = 15 Multiplication table 5 * 4 = 20 Multiplication table 5 * 5 = 25 […]

Read More

Python continue

>>> for var in “zend-anwar”: if var == “-“: continue print (var) output– z e n d a n w a r

Read More

Python break

>>> for var in “zend-anwar”: if var == “-“: break print (var) output—    z e n d

Read More