2017-09-27
MySQL - Table is "Read Only" error message
(1) Locate MySQL's data folder path (run this query, MySQL must be up and running).
select @@datadir;
(2) Change permissions so "mysql" can access it:
chown -Rf mysql:mysql /PATH_TO_DATA_FOLDER/data
(3) Restart MySQL.
(4) Re-attempt to make table/record changes.
2017-08-25
Collibra - DGC Workflow to export a domain view and save it as an attachment in that domain
import com.collibra.dgc.core.file.FileInfo;
// Define the view to download
// Get this from the "excel" object produced behind the scenes when you manually export the view (use Firefox or Chrome's inspector... Network Resources tab)
def tableViewConfig = '{"TableViewConfig":{"displayLength":-1,... "fieldName":"Asfdb5d2c95585d5af41aed"}}]}}'
// File Name
def fileName = "Your file name here.xlsx"
execution.setVariable( "fileName", fileName )
loggerComponent.info("File Name:" + fileName )
// Produce the file
def fileInfo = outputViewComponent.exportExcelWithoutJob( tableViewConfig, fileName, null, true, true);
// Get the file's Id
def fileId = fileInfo.getUuid()
execution.setVariable( "fileId", fileId )
loggerComponent.info("File Id:" + fileId )
// Define the target URL
outputUrl = applicationComponent.getBaseURL() + "rest/1.0/file/" + fileId
loggerComponent.info( "Output URL: " + outputUrl )
// Add as an attachment to the hosting/calling domain
// This task may need to reside within a separate script task, for synchronous execution
attachmentComponent.addAttachmentToResource( item.id, item.type.name(), fileId, fileName )
// Define the view to download
// Get this from the "excel" object produced behind the scenes when you manually export the view (use Firefox or Chrome's inspector... Network Resources tab)
def tableViewConfig = '{"TableViewConfig":{"displayLength":-1,... "fieldName":"Asfdb5d2c95585d5af41aed"}}]}}'
// File Name
def fileName = "Your file name here.xlsx"
execution.setVariable( "fileName", fileName )
loggerComponent.info("File Name:" + fileName )
// Produce the file
def fileInfo = outputViewComponent.exportExcelWithoutJob( tableViewConfig, fileName, null, true, true);
// Get the file's Id
def fileId = fileInfo.getUuid()
execution.setVariable( "fileId", fileId )
loggerComponent.info("File Id:" + fileId )
// Define the target URL
outputUrl = applicationComponent.getBaseURL() + "rest/1.0/file/" + fileId
loggerComponent.info( "Output URL: " + outputUrl )
// Add as an attachment to the hosting/calling domain
// This task may need to reside within a separate script task, for synchronous execution
attachmentComponent.addAttachmentToResource( item.id, item.type.name(), fileId, fileName )
Collibra - Workaround for groovy string size limitation in Collibra DGC workflows
def VARIABLE_NAME = new TextArea( “LONG_STRING_HERE” )
PS. Tentative, yet to confirm. I assume then you can pass this variable from one workflow to another.
PS. Tentative, yet to confirm. I assume then you can pass this variable from one workflow to another.
Meteor - Production deployment ignores CSS/Stylus
This happens, amongst perhaps other causes, due to a combination of the existence, in your project, of two packages in your project:
(1) Stylus
(2) Standard CSS Minifier
If you are using Stylus, remove the Standard CSS Minifier... that worked for me.
(1) Stylus
(2) Standard CSS Minifier
If you are using Stylus, remove the Standard CSS Minifier... that worked for me.
2017-08-13
MongoDB - Sub-document filtering to return only desired sub-documents
db.COLLECTION_NAME.find(
// Filtering. match
{
"FIELD_TO_FILTER_BY": FILTER_VALUE
}
// Projection
, {
ARRAY_OF_SUBDOCS:{
$elemMatch:{"SUB_DOC_FIELD": FILTER_VALUE }
}
}
);
// Filtering. match
{
"FIELD_TO_FILTER_BY": FILTER_VALUE
}
// Projection
, {
ARRAY_OF_SUBDOCS:{
$elemMatch:{"SUB_DOC_FIELD": FILTER_VALUE }
}
}
);
2017-07-16
RegEx - Repair broken lines of text (paragraphs with cut lines often due to pagination)
Search for: \n(^[a-z])+
Replace with (remove double quotes): " $1"
PS. Use a double "\n" if the paragraph is split apart by two lines... use three if by 3 and so on.
Replace with (remove double quotes): " $1"
PS. Use a double "\n" if the paragraph is split apart by two lines... use three if by 3 and so on.
2017-07-14
TOMCAT - Users setup (tomcat-users.xml), in order to gain access to server status and manager
<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="tomcat"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="PASSWORD_HERE" roles="admin,manager,tomcat,manager-gui,admin-gui"/>
<user username="tomcat" password="PASSWORD_HERE" roles="tomcat,admin,manager"/>
</tomcat-users>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="tomcat"/>
<role rolename="manager"/>
<role rolename="admin"/>
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="PASSWORD_HERE" roles="admin,manager,tomcat,manager-gui,admin-gui"/>
<user username="tomcat" password="PASSWORD_HERE" roles="tomcat,admin,manager"/>
</tomcat-users>
Subscribe to:
Posts (Atom)