Powered By Blogger

Tuesday, 12 March 2019

Convert Columns And Rows Into Single Column in Excel

  Transpose/Convert Columns And Rows Into Single Column With VBA Code

With the following VBA code, you can also join the multiple columns and rows into a single column.
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module window.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Sub ConvertRangeToColumn()
'Updateby20131126
Dim Range1 As Range, Range2 As Range, Rng As Range
Dim rowIndex As Integer
xTitleId = "KutoolsforExcel"
Set Range1 = Application.Selection
Set Range1 = Application.InputBox("Source Ranges:", xTitleId, Range1.Address, Type:=8)
Set Range2 = Application.InputBox("Convert to (single cell):", xTitleId, Type:=8)
rowIndex = 0
Application.ScreenUpdating = False
For Each Rng In Range1.Rows
    Rng.Copy
    Range2.Offset(rowIndex, 0).PasteSpecial Paste:=xlPasteAll, Transpose:=True
    rowIndex = rowIndex + Rng.Columns.Count
Next
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
3. Press F5 key to run the code, and a dialog is displayed for you to select a range to convert. See screenshot:
4. Then click Ok, and another dialog is displayed to select a singel cell to put out the result, see screenshot:
5. And click Ok, then the cell contents of the range are converted to a list of a column, see screenshot:
doc-convert-range-to-column11

Tuesday, 26 February 2019

Image crop editor is not working in WordPress theme

 Issue:
In WordPress admin, where the images are not cropping in WP "edit image" .

Solution 1:

1,Check your functions.php file. See, if you have the closing tag at the every end of the file.
?>
function.php location: wp directory > /wp-content/themes/<theme name>/functions.php
Solution 2:
The problem may be missing the GD library
Install php-gd library.
sudo apt-get update
sudo apt-get install php-gd
sudo service apache2 restart

Sunday, 13 May 2018

Error loading MySQLdb module: No module named 'MySQLdb' while using mysql with python 3

MySQL with Django

To configure Django to access a MySQL database on Python, you need to do this in your settings file:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': '<your_username>$<your_database_name>',
        'USER': '<your_username>',
        'PASSWORD': '<your_mysql_password>',
        'HOST': '<your_mysql_hostname>',
    }
}

But on python 3 you will get following error.

Error loading MySQLdb module: No module named MySQLdb.


For Python 3, you have to install "MySQL-for-Python-3":

MySQL-for-Python-3   can be  installed from below repository.
pip3 install --user https://github.com/davispuh/MySQL-for-Python-3/archive/1.0.tar.gz

Thursday, 3 April 2014

Openstack-Keystone failing to start

If openstack-Keystone is not starting:
for eg:
 [root@* keystone]# service openstack-keystone restart
Stopping keystone:                                         [FAILED]
Starting keystone:                                         [  OK  ]
[root@* keystone]# service openstack-keystone restart
Stopping keystone:                                         [FAILED]
Starting keystone:                                         [  OK  ]

Try running keystone manually instead of as a service:
$ sudo -u keystone bash
$ HOME=/var/lib/keystone keystone-all --debug