DOCUMENT_TEXT_DETECTION language hints - ocr

I am using Google Cloud Vision's API DOCUMENT_TEXT_DETECTION to extract text of multiple languages. I am trying to use the ImageContext feature to provide language hints as given here. Can anyone tell me how to make use of it?
Thank you!

You can provide a language hint string by specifying one of the languageHints codes from this page: https://cloud.google.com/vision/docs/languages

Related

Looking for dynamic e-signature service for a new web application

I have a application that I am working on rolling out and need to do "onboarding". I need people to sign releases.
I am looking to intergrate a "e-signature" function - not just a simple Accept check box.
I have looked at options like esignlive and adobe esign.
I am not sure if anyone know of a service / tool / JAR/ something that i can incorporate the concept of "signing" an release online.
Thanks in advance.
FYI I did find this js library
https://github.com/szimek/signature_pad

Angular 4 Dynamically Create Component from User Definable input

I'm looking to build an App in Angular 4 that would allow components to be dynamically created from storage (database, url, server stored file). The goal is to allow users to build there own components to create custom dashboards to view data.
I've been looking through google and stackoverflow to see if something like this has been achieved, but I have not seen anything to point me in the right direction.
If this is possible would anyone be willing to explain or link me to a resource to help me get started on this?
Thank you in advance
You can check these out:
https://medium.com/front-end-hacking/dynamically-add-components-to-the-dom-with-angular-71b0cb535286
https://angular.io/guide/dynamic-component-loader
I prefer number 1 because it provides a very detailed & clear guide.

StopForumSpam and mediawiki

I'm looking to integrate the StopForumSpam mediawiki extension: https://www.mediawiki.org/wiki/Extension:StopForumSpam
I'm a little confused if $wgSFSIPListLocation is actually required, or if it can simply rely on the API? Does anyone know?
A quick look at the source tells me you will need to configure that parameter because it just returns if not.
Yes, you need to set it since the default value is just 'false' and it would not work (see https://github.com/wikimedia/mediawiki-extensions-StopForumSpam/blob/master/extension.json#L40)

Is there an example of how to do a XAdES-BES enveloped signature with the XAdES4j library?

I'm trying to use the XAdES4j library to sign xml with an enveloped signature. From everything I've read it looks like it is possible to do exactly what I'd like to do, but I've not been able to find a simple example to help me to understand the workflow better. The library is found here:
https://github.com/luisgoncalves/xades4j
It includes a wiki, but the wiki does not give a clear example. It refers you to the unit tests in the code. However, in the code for the unit tests, there are numerous methods that do not exist in the main code stream. I'm looking for a simple example for a XAdES-BES enveloping signature to be added to xml given these variables:
The path to my xml file: /path/to/xml/myXmlFile.xml
The root element in my xml file: invoice
The path to my cert: /path/to/cert/myCert.p12
Password to my cert: "myPassword"
Can anybody help me out with a clear example?
Thanks so much in advance :)
Here's a full example provided by another user within an issue in GitHub. It illustrates both XAdES-BES and XAdES-T.
On the project's wiki you have detail instructions on which classes need to be used and pointers to more detailed information.
Regarding the unit tests, there are some common/helper methods on the base classes that can be useful in other scenarios, namely on SignatureServicesTestBase and SignerTestBase
Hope this helps.

Uploading a file using TCL

I'm a newbie working on OpenACS architecture and need to upload a .xml file through TCL. I went through the documentation and tried to work around with the code mentioned here: http://wiki.tcl.tk/13675
However, I'm unable to understand the code and the copy-paste won't work. Could someone please suggest a easier working way to upload a file in TCL? A working code would be of great help.
I need to upload a file through a HTTP form(with input type file parameter) and I'm asking for server-side code.
OpenACS already has file uploading built in (assuming you're using the OpenACS form builder aka ad_form, template::form - it has many names!). The specific widget you need to use is template::widget::file
A worked example is in the General Comments package (see file-ae.adp, file-add.tcl and file-add-2.tcl):
http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/general-comments/www/file-ae.adp?r=1.6
http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/general-comments/www/file-add.tcl?r=1.4
http://cvs.openacs.org/browse/OpenACS/openacs-4/packages/general-comments/www/file-add-2.tcl?r=1.6
Specifically, look out for the 2 ad_page_contract parameters, and follow those variables down through the code:
upload_file:notnull
upload_file.tmpfile:tmpfile
Re-inventing network protocols is not so much worth in most cases, so I'd like to recommend using proven community libs. From my personal experience, I'm pretty glad to deal with libcurl (see http://curl.haxx.se/libcurl/tcl)