find . -maxdepth 1 -name "*STRING_BEING_SOUGHT*" -print
2017-06-19
JIRA - Remove or alter cloned sub-tasks prefix
JIRA Administration
> System
> Advanced Settings (top right button)
> jira.clone.prefix
> System
> Advanced Settings (top right button)
> jira.clone.prefix
2017-06-14
EXCEL - Macro/sub to delete partially selected rows
Sub sDeleteRows()
rngStart = Selection.Cells(1, 1).Address
rngEnd = Selection.Cells(Selection.Rows.Count, Selection.Columns.Count).Address
firstRowNumber = getRow(rngStart)
lastRowNumber = getRow(rngEnd)
Rows(firstRowNumber & ":" & lastRowNumber).EntireRow.Delete
End Sub
rngStart = Selection.Cells(1, 1).Address
rngEnd = Selection.Cells(Selection.Rows.Count, Selection.Columns.Count).Address
firstRowNumber = getRow(rngStart)
lastRowNumber = getRow(rngEnd)
Rows(firstRowNumber & ":" & lastRowNumber).EntireRow.Delete
End Sub
EXCEL - Macro/sub to join text cells
Sub sJoinCells()
temp = ""
rngStart = Selection.Cells(1, 1).Address
rngEnd = Selection.Cells(Selection.Rows.Count, Selection.Columns.Count).Address
firstRowNumber = getRow(rngStart)
lastRowNumber = getRow(rngEnd)
rowCount = lastRowNumber - firstRowNumber
Debug.Print firstRowNumber & " to " & lastRowNumber & " (rowCount: " & rowCount & ")"
' Validation: exit if only one cell selected
If rowCount < 1 Then
Debug.Print "sJoinCells: Single cell selected, nothing to do."
Exit Sub
End If
' Accumulate the values
For i = 1 To Selection.Rows.Count
' Cell value cleanup
v = Trim(Selection.Rows(i).Value)
' If the cum value does not end with a period, then make sure
' the first letter of this cell is NOT capitalized
If Left(temp, 1) <> "." Then
v = lower(Left(v, 1)) & Right(v, Len(v) - 1)
End If
' Accumulate
temp = temp & v & " "
Next i
' Set concatenated values on first row
Debug.Print "temp: " & temp
'Selection.Rows(1).Value = temp
' Delete rows
'Debug.Print (firstRowNumber + 1) & ":" & lastRowNumber
'Rows((firstRowNumber + 1) & ":" & lastRowNumber).EntireRow.Delete
End Sub
temp = ""
rngStart = Selection.Cells(1, 1).Address
rngEnd = Selection.Cells(Selection.Rows.Count, Selection.Columns.Count).Address
firstRowNumber = getRow(rngStart)
lastRowNumber = getRow(rngEnd)
rowCount = lastRowNumber - firstRowNumber
Debug.Print firstRowNumber & " to " & lastRowNumber & " (rowCount: " & rowCount & ")"
' Validation: exit if only one cell selected
If rowCount < 1 Then
Debug.Print "sJoinCells: Single cell selected, nothing to do."
Exit Sub
End If
' Accumulate the values
For i = 1 To Selection.Rows.Count
' Cell value cleanup
v = Trim(Selection.Rows(i).Value)
' If the cum value does not end with a period, then make sure
' the first letter of this cell is NOT capitalized
If Left(temp, 1) <> "." Then
v = lower(Left(v, 1)) & Right(v, Len(v) - 1)
End If
' Accumulate
temp = temp & v & " "
Next i
' Set concatenated values on first row
Debug.Print "temp: " & temp
'Selection.Rows(1).Value = temp
' Delete rows
'Debug.Print (firstRowNumber + 1) & ":" & lastRowNumber
'Rows((firstRowNumber + 1) & ":" & lastRowNumber).EntireRow.Delete
End Sub
Python - How to split a string into paragraphs
data = 'paragraph number one\n number two'
p = 0
for l in data.split('\n'):
p+=1
if l != '':
print p, '\t', l
PS. Assuming paragraphs are delineated by a carriage return (\n).
p = 0
for l in data.split('\n'):
p+=1
if l != '':
print p, '\t', l
PS. Assuming paragraphs are delineated by a carriage return (\n).
2017-06-09
MySQL - How to delete the MySQL Windows Service
Windows terminal command (MD-DOS prompt):
sc delete MySQL
2017-06-08
MySQL - How to change root user's password
(1) Create a custom initialization file containing this (e.g. named custom-init.txt):
ALTER USER 'root'@'localhost' IDENTIFIED BY 'YOUR_NEW_PASSWORD';
(2) Start MySQL using this command:
mysqld --init-file=C:\\mysql\custom-init.txt
PS. Variants of the alter user statement may be necessary for MySQL versions earlier than 5.7
Subscribe to:
Posts (Atom)