How to change dashing shortenedNumber suffix - dashing

I am using dashing.
The standard suffix of shortenedNumber is K.
How and where to change this?
I looked for the file dashing.coffee (where i think this could be changed) but did not found this..

Related

Emmet abbreviation for Pug "input" is inserting an unneeded #

I'm working on a Pug template in VS Code and whenever I try to use the emmet abbreviation input:text (or any input for that matter), it resolves to input#(type="text", name="").
It's not the end of the world, but it's driving me crazy, and I can't figure out why it's doing so or how to change it.
I guess my question is: is there any way to change this behavior or any place that I can draw attention to this?
The problem is the treatment of the attributes id and class for indent-based syntaxes (Slim, Pug, etc.).
For some reason it removes the attribute from its current position and pushes to the front the strings # for id and . for class.
This is controlled with 2 regex statements near line 3297 in
C:\Program Files\Microsoft.VS.Code\resources\app\extensions\emmet\node_modules\vscode-emmet-helper\out\expand\expand-full.js
Change
const reId = /^id$/i;
const reClass = /^class$/i;
to
const reId = /^Xid$/i;
const reClass = /^Xclass$/i;
You must also remove the cached version of this file in the directory
C:\Users\__username__\AppData\Roaming\Code\CachedData\__some_hex_value__
Restart VSC and it should work.
For linux systems you have to find the location of these files.
I finally understand why this is happening, and that my confusion was basically a misunderstanding of proper form creation.
All text inputs should have an id associated with them, so Emmet is expecting an ID in the shorthand. So this:
input:text#user
resolves to
input#user(type="text", name="")
Which works great! Too bad it took me months of confusion to I realized how daft I am!

pytesseract doesn't use user-words

Im trying to use a created 'bazaar' config file with this format (I tryed setting T and F):
load_system_dawg F
load_freq_dawg F
user_words_suffix user-words
I'm using as Latin.traineddata language and created a Latin.user-words in same directory /tessdata
with some words, like:
Monotributista,
Monotributista (with and without comma)
tesseract without config paramethers game me this, around other words, is a 5 pages text Nfonotributista,
So I tried with the user-words, maybe it can correct that, using this code:
import pytesseract
pytesseract.pytesseract.tesseract_cmd =r'C:\Program Files\Tesseract-OCR\tesseract'
imagen=Image.open("page-1.png")
text=pytesseract.image_to_string(imagen, lang='Latin', config='bazaar')
No errors, but same result, I cannot find much documentation to know what's happening behind, is it using the config? is it trying the OCRed words against the dictionary?
Is there anything wrong on my code?
I appreciate any help
Thank you!
Edit: added some character with bad recognition:
First one detects LIL or LII
Seccond detects LI

Finding file icon given a MIME type using GTK

Is there a way to find out which icon to use for a given MIME type, using GTK/pygtk?
I know about gio.File(filename).query_info("standard::icon").get_icon(), but I need to find the icon without having to read the file.
Try gio.content_type_get_icon(). E.g.:
>>> gio.content_type_get_icon ('text/python')
<gio.ThemedIcon at 0xb7d0f734: text-python, gnome-mime-text-python, text-x-generic>

Query with toLocalizedTime in Plone

I'm using toLocalizedTime to output a date, as below
<span tal:content="python:here.toLocalisedTime(date.get('start_date'))"/>
This outputs eg. 2007/08/02, I'm just curious as to how one would alter the output so that it reads 02/08/2007
I'm not having much luck finding much info on toLocalizedTime, would someone point me in the right direction?
This depends on whether you have English selected as the site language (Site Setup >> Language). If so, then the default settings are used. You can change the defaults by dropping down into the ZMI, then into 'portal_properties', then 'site_properties'. The fields to change are either 'localTimeFormat' or 'localLongTimeFormat' depending on whether you pass in 'long_format=1' to the toLocalisedTime function.
If on the other hand, you have translations set up, the format may instead be pulled from the translation file for the locale selected. I'm not sure what is the easy way to change the format in this case (other than switching the site back to English). I guess you can register your own translation file but I've never needed to do that so you're going to have to look up the details.
Date string formatting follows the Python rules (http://docs.python.org/library/time.html#time.strftime).
Perhaps even more detail than you need:
here.toLocalizedTime()
is defined in the plone browser view at...
CMFPlone/browser/ploneview.py
which looks up the 'translation_service' utility, to call its 'ulocalized_time' function, defined at...
CMFPlone/TranslationServiceTool.py
which itself calls the 'ulocalized_time' function defined at...
CMFPlone/i18nl10n.py
As always, you can learn interesting things by grepping the source code ;-)
For an up to date answer for Plone 4.3 (after going through the source code)
These fields are now in the registry found at:
http://localhost:8080/yoursite/portal_registry
Then filter on "i18nl10n", which should give you the 4 fields you need to change.

Change attributes of change-set from command line

I tried using aegis -change_attributes to change the brief_description of my current change set but it didn't work.
aegis -change_attributes description="test"
What should I do to make this work?
EDIT: The command I was looking for was
aegis -change_attributes brief_description="$DESC";
Since no answer was given (for quite some time) I'm adding the solution I gave in the comments, as the anser:
The above command is correct if you want to set the extensive description. If one wants to just set the brief description "aegis -change_attributes brief_description="$DESC"" has to be used