I am trying to write on image with multiple language. I am using npm package 'gm' .
gm(inputFilePath)
.font(fontFilePath) // .ttf format
.writeText(x,y,TextToBeWritten)
.write(outputFile , callBackFunction())
Here I want to write in Multiple languages. And there is no single font which includes all of them. How can I pass multiple fonts to writeText function ?
Let's say I want to write in Chinese , English , Russian , Japanese and Hindi . How can Pass something like
.font(font1.ttf , font2.ttf , font3.ttf)
.writeText(x , y , TextToBeWritten)
If I can't do this, then I will no other choice, but to merge multiple fonts. and generate single .ttf file.
I would like to do it if it's possible. If it's not possible with current version of 'gm', then I would like to contribute to 'gm'. If anyone can guide me, I might be able to pull it off.
Related
I have the same button in two different application , so i want to write the same code for them , but the pb is that there's a difference between the xpaths in the text , one starts with an uppercase letter and the second all in lower case :
xpath1: //span[contains(#class,'text')][contains(text(),'Test')]
xpath2: //span[contains(#class,'text')][contains(text(),'test')]
so i want to use the same function: Click Element ${element}
for both apps , how to do that ?
THANKS
I'm using below format, it works perfect. So you can have multiple xpath using this union operator "|". There are also multiple options, but this works and easy to use.
//span[contains(#class,'text')][contains(text(),'Test')] | //span[contains(#class,'text')][contains(text(),'test')]
or
you can also use below format, but this looks little dirty.
//span[contains(#class,'text')][contains(text(),'Test') or contains(text(),"test")]
I am trying to create a report in BI. I have created a data model using a sql script and the data type is string. I then created a report using this data model and the sample data is showing as 06185 as shown below.
But when i run the report the output is showing as 6185.0 with decimal places.
I have tried to change the format by double clicking the value. But I cant choose any format except none in the report designer. What I need is the values to be displayed same as the sample data.
06185 is not a number - it's a string. As a number you will never have leading 0s. 6185 is a number.
So first of all you need to find out what your data is really supposed to be. "06185" = string. 6185 = integer. 6185.0 = double.
To be quick simply add ' character next to the number character... Else excel will make your life difficult specially if you have bank account numbers...
SELECT payees.supplier_site_id csupplier_site_id,
payees.org_id c_org_id,
payees.payee_party_id ,
cbbv.bank_name,
max(''''||to_char(ieb.bank_account_num)) as bank_account_num
FROM apps.iby_pmt_instr_uses_all instrument,
apps.iby_account_owners owners,
apps.iby_external_payees_all payees,
apps.iby_ext_bank_accounts ieb,
apps.ap_supplier_sites_all asa,
apps.ap_suppliers asp,
apps.ce_bank_branches_v cbbv
WHERE owners.primary_flag = 'Y'
AND owners.ext_bank_account_id = ieb.ext_bank_account_id
AND owners.ext_bank_account_id = instrument.instrument_id
AND payees.ext_payee_id = instrument.ext_pmt_party_id
AND payees.payee_party_id = owners.account_owner_party_id
AND payees.supplier_site_id = asa.vendor_site_id
AND asa.vendor_id = asp.vendor_id
and bank_party_id(+) = ieb.bank_id
--AND cbbv.branch_party_id(+) = ieb.branch_id
AND (
(INSTRUMENT.END_DATE IS NULL)
OR
( INSTRUMENT.END_DATE >= TO_DATE(SYSDATE) )
)
AND (
(IEB.END_DATE IS NULL)
OR
(IEB.END_DATE >= TO_DATE(SYSDATE))
)
group by payees.supplier_site_id ,
payees.org_id ,
payees.payee_party_id ,
cbbv.bank_name
You may have to edit this with the desktop Microsoft Word add-in. There's limited capabilities with the Oracle BI Publisher Stand-alone running on the server.
You have 100% control if you're editing the template in Word. Unfortunately, there's limited export capability to export your existing template. Oracle BI publisher stand-alone will export an XML file, which to my knowledge is not visually editable in Word. There is an ability to import an RTF file which you created in Word, though. So Install the BI Publisher desktop/Word add-in. Make a new file, save as .rtf format, use the tool to import an example XML file, add a table, and continue editing as you need to. If you need help with this, there's plenty of documentation out there to get you started. Also, there's a Template Viewer application that's also installed that will let you process the XML sample/data file and rtf file into Excel, PDF, or whichever you prefer.
I'm working with Tensorflow/Keras. I have two text files (train_{modality_name}.txt and val_{modality_name}.txt). They contain the split I want to use for the images I'm processing.
The format of these files is the following:
example_0_path category_id
example_1_path category_id
...
example_N_path category_id
and my folder structure is like this:
/labels
train_X.txt
val_X.txt
/data
/modality_1
...
/modality_M
(e.g. data/sketch/abbey/id)
How can I make use of the files?
'flow_from_dataframe' did the job, additionally it was necessary to preprocess the txt with pandas. This tutorial was very helpful: https://medium.com/#vijayabhaskar96/tutorial-on-keras-imagedatagenerator-with-flow-from-dataframe-8bd5776e45c1
Still having problems with matching target size of the arrays (labels seem to have the wrong format)
I want to print a Code 128 barcode with a Zebra printer. But I just can't get exactly where I want because the barcode is either too small or too big for the label size of 40x20 mm. Is there anything else I can try besides using the ^BY (Bar Code Field Default) module width and ratio?
^XA^PQ2^LH0,0^FS
^MUM
^GB40,20,0.1,B^FS
^FO1.5,4
^BY0.2
^BCN,10,N,N
^FD*030493LEJCG002999*^FS
^FO8,15
^A0N,3,3
^FD*030493LEJCG002830*^FS
^MUD
^XZ
Above script gives me a label that looks like this:
But when I just decrease the module width to 0.1 (which is the lowest) the barcode becomes too small and may be problematic to scan with a hand scanner:
Code-128 is a fixed-ratio code, so you would appear to have the choice of two sizes. You may be able to solve the problem by using a 300dpi printer in place of a 200.
If you can change the format (and I'm intrigued by the barcode and readable being different values) then you could save a little by printing one number-sequence and one alpha-sequence, as an even count of numerics will be encoded as alphabet C so you'd save one change-alphabet element.
Do you really need the * on each end?
Otherwise, perhaps code 39 (which prints the * if you use the print-interpretation-line option) would suit your purposes better.
Another Possibility is to do on the fly code-set changes, Try something like
^XA^PQ2^LH0,0^FS
^MUM
^GB60,20,0.1,B^FS
^FO1.5,4
^BY0.2
^BCN,10,N,N
^FD>:*>5030493>6LEJCG>5002830>6*^FS
^FO8,15
^A0N,3,3
^FD*030493LEJCG002830*^FS
^MUD
^XZ
This will allow less symbols to encode your data
If you can structure content to have all the alpha chars a one end or the other.
or (Depending on your firmware) you could use auto ^BCN,10,N,N,N,A
I am converting a character variable to a numeric variable. I am using a bestw.d format. I also tried just best. as the format in the input statement and this worked fine. I cant find any mention of just using best. instead of bestw. in SAS help, though I know from SAS help that the d can be omitted. I have been playing around with using just the best.and I am wondering if there is a default w assigned when just using best..
All formats have a default w. It is not generally good practice to use best. (or <format>.) in most cases, as you should know and plan for the specific width needed, but it always exists.
Also, informat and format have different defaults in many cases where there are identically named informat and format.
In the case of bestw., the default length is 12. See this documentation page for details.
I always find it's worth using a worked example, this shows the different outcomes when using lengths on the BEST. format:
data _NULL_;
a=1031564321300.302;
put '==================================';
put 'Different "BEST" formats';
put '==================================';
put 'BEST8. - ' a best8.;
put 'BEST12. - ' a best12.;
put 'BEST13. - ' a best13.;
put '==================================';
put 'BEST. - ' a best.;
put '==================================';
run;
You can run this in your environment and check the outcome. On my machine it looks like this:
==================================
Different "BEST" formats
==================================
BEST8. - 1.032E12
BEST12. - 1.0315643E12
BEST13. - 1031564321300
==================================
BEST. - 1.0315643E12
==================================
i.e. It looks like BEST12. is the matching format when no width is specified.