Syntax of Python Function
-
zendnwar
-
April 19, 2016
-
Python
-
0 Comments
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!”)
Continue Reading
Star triangle with python for loop
-
zendnwar
-
April 16, 2016
-
Python
-
0 Comments
>>> 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– * ** *** **** ***** ****** ******* ******** ********* **********
Continue Reading
Multiplication table in python
-
zendnwar
-
April 16, 2016
-
Uncategorized
-
2 Comments
>>> 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 Multiplication table 5 * 6 …
Continue Reading
Python continue
-
zendnwar
-
April 16, 2016
-
Python
-
0 Comments
>>> for var in “zend-anwar”: if var == “-“: continue print (var) output– z e n d a n w a r
Continue Reading
Python break
-
zendnwar
-
April 16, 2016
-
Python
-
0 Comments
>>> for var in “zend-anwar”: if var == “-“: break print (var) output— z e n d
Continue Reading
Enabling clean URLs Drupal
-
zendnwar
-
April 16, 2016
-
Drupal
-
0 Comments
Open your .htaccess file in your project root. Uncomment RewriteBase /drupal and change it to your project name like RewriteBase /projectname . Comment RewriteBase / Goto /admin/config/search/clean-urls There will be an option to Enable clean URLs .
Continue Reading
How to show hostname & IP address with python programming
-
zendnwar
-
April 13, 2016
-
Python
-
0 Comments
The Internet Protocol assigns a 4-byte address to every computer connected to the network. Such addresses are usually written as four decimal numbers, separated by periods, which each represent a single byte of the address. Each number can therefore range from 0 to 255. So an IP address looks like this: 202.168.3.180 Because purely numeric addresses can be difficult for …
Continue Reading
Magento admin panel gives 404 when trying to enter CMS pages
-
zendnwar
-
April 9, 2016
-
Magento
-
227 Comments
You are getting a 404 on CMS pages because of the remains of old store views still hanging around in the database after deleting store views from Magento admin, to clean up ( delete ) old unused CMS pages for store views you have deleted run this MySQL query. DELETE FROM cms_page_store WHERE store_id NOT IN (SELECT store_id FROM core_store)
Continue Reading
What is Shell Script ?
The shell is the utility that processes your requests. Shell Script is series of command written in plain text file. Shell script is just like batch file is MS-DOS but have more power than the MS-DOS batch file.
Continue Reading
Magento2 admin menu panel doesn’t work
-
zendnwar
-
March 18, 2016
-
Magento
-
214 Comments
It’s very simple solution : line 574 in Magento2.2 remove <item name=”view_preprocessed” xsi:type=”object”>Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item> refresh, hope it will work.
Continue Reading