- Open the original bitmap using the following options
- Image import type: Link
- Image DPI: From file
- Image Rendering Mode: Smoot (optimizeQuality)
- Select the bitmap.
- Choose the "Trace bitmap" command from the "Path" menu.
- Choose the following settings (typical for great quality):
- Color: True
- Scans: 5
- Smooth: False
- Stack scans: True
- Remove background: True
- The new trace will be automatically placed over the original bitmap, so click on the image and move it. Then delete the image on the bottom, which represents the original.
- Save. Done.
2018-07-24
Inkscape - How to convert a bitmap (PNG, JPG) into an svg
2018-07-10
MacOS - How to uninstall Google Software Update
sudo /Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/Resources/install.py --nuke
2018-06-05
Bootstrap - How to remove modal's pesky backdrop (gray overlay)
$('#exampleModal2').modal('toggle');
$('#exampleModal2').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
$('#exampleModal2').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
2018-05-30
MongoDB - Multiple fields/keys distinct list
db.COLLECTION_NAME.aggregate([
// Filter
{"$match":{
FIELD1 : VALUE1
, FIELD2 : VALUE2
}}
// Distinct fields list
, {"$group": {
"_id": {
FIELD3_ALIAS : "$field3"
, FIELD4_ALIAS :"$field4"
}
}}
// Replace root, so the documents are not nested inside an _id sub-doc
,{ $replaceRoot: {
newRoot: "$_id"
}}
]);//aggregate
// Filter
{"$match":{
FIELD1 : VALUE1
, FIELD2 : VALUE2
}}
// Distinct fields list
, {"$group": {
"_id": {
FIELD3_ALIAS : "$field3"
, FIELD4_ALIAS :"$field4"
}
}}
// Replace root, so the documents are not nested inside an _id sub-doc
,{ $replaceRoot: {
newRoot: "$_id"
}}
]);//aggregate
2018-05-22
2018-05-15
PYTHON - Determine if ANY of the words in a list are found in a given string
wordsList = [ "two", "long" ]
string = "this is a not very long phrase, two would be too many"
if any( word in string for word in wordsList ):
print "yes, all given words are found in the given string"
else:
string = "this is a not very long phrase, two would be too many"
if any( word in string for word in wordsList ):
print "yes, all given words are found in the given string"
else:
print "no, not all given words exist in the given string"
PYTHON - Determine if ALL words in a list are found in a given string
wordsList = [ "two", "long" ]
string = "this is a not very long phrase, two would be too many"
if all( word in string for word in wordsList ):
print "yes, all given words are found in the given string"
else:
print "no, not all given words exist in the given string"
string = "this is a not very long phrase, two would be too many"
if all( word in string for word in wordsList ):
print "yes, all given words are found in the given string"
else:
print "no, not all given words exist in the given string"
Subscribe to:
Comments (Atom)