How to customize the format for a field that is a duration? - jspresso

In my model.groovy, i have an entity with a lot of fields that are of type duration.
For a particular field, I would be able to customize the format for either enter or display the data.
Example : instead of entering "90 minutes" that is the default format, I would be able to enter 1h30.

Unfortunately, as of Jspresso 4.3, this is not possible. Feel free to open a RFE on GitHub for it.

Related

How do I programatically download bank of America transactions?

I use quicken, which can automatically download bank of America transactions. However, it truncates all the payees so I lose data. I'd like to work around this and I'm thinking of downloading the transaction data and generating my own QFX file with the full payee info.
Is there a way that I can download transactions programmatically, or download something like a .qif (available on their website) programmatically? For the latter, I could convert the gif to a QFX myself.
If anyone has other ideas to download all of the transaction information without losing the payee info, I would welcome those ideas as well.
Do they provide an api for this? but most probably not for 3p without a contract. since its bank , there must be check for browser etc along with standard sign in so it'll hard for curl. you can have a browser plugin to read all the data from the page and do auto scroll to get new transactions if not fitting in page. it's a hacky solution but good to get what we need as you told that data is available on the page and have to revisit with updates but changes in basic structure is rare.
A quick search for bank of america api yielded this BofA API. They even have many options for types of payment information you could query here as well as lots of individual account types that you can access it as.
It looks pretty comprehensive. If you don't see what you are looking for there I put another option below, just in case.
I don't use BofA. So I can't speak to what they have natively available. But you could always use a bot to scrape it if they present it anywhere in the User Interface.
I would agree with Meena that you should not be able to use curl. But selenium uses a browser to programmatically do just about anything that you would want to do with any website. They also have bindings for many languages. So you could just pick your favorite and go to town...
It seems the API will return a JSON so you may need to find a tool to convert that to a qif or qfx if that part is important. After digging further, I can't test this without having a CashPro account but it seems what you need to do is...
Step 1:
Get an access token from here. You'll need to send this in the header of any requests
Step 2:
Send an http request with a header in the following format:
{
"accounts": [
{
"accountNumber": "xxxxxxx",
"bankId": "xxxxxxx"
}
],
"fromDate": "yyyy-mm-dd",
"toDate": "yyyy-mm-dd"
}
to https://developer.bankofamerica.com/cashpro/reporting/v1/transaction-inquiries/previous-day
Step 3:
You should get a JSON as a response
As mentioned, I can't test this but here's the documentation of the specific API endpoint you need

How to Scan and Extract data from IDs and Passports

I want scan and extract data from IDs and Passports, Which free plugins I use? Or how do I do it, To read the data and add this data to form.
You can check this question on how to read text from images.
Having said text, since each field always has a fixed text before identifying what it is, if you know the id formats you want to support, you can implement that fairly easily (The text between "Name:" and "Surname:" is the person's name, and so on).
To get the images, you should use something like react-native-camera, or, if you are using Expo, its Camera API.
There are few OCR SDKs that enable you to do that. Check out https://github.com/Anyline/anyline-ocr-react-native-module or
https://github.com/jonathanpalma/react-native-tesseract-ocr#readme which supports only Android for now.
You divide the job into multiple steps
Take a photo
Load the image
Image analyze find an OCR npm package
Pass the text into your fields via props (or use the Context API)

Value Suggestion for SAP Dynpro input field

I need to show suggestions when someone types something into my input field.
It's a field for a transport request. So if someone starts to type something in it shows at the moment last entered entries but it should make suggestions what to type in (like it happens for example in transaciton VA02 ). I want a dropdown of a selection of the table E070 where I can see the request and the short text.
I did use google but i just found this, but i've got a normal dynpro and no WebDynpro.
The keyword you are looking for is Enhanced Search. You can provide your own enhanced search implementation by creating a search help and activating the proposal search feature. Note that the enhanced search can be turned off in the GUI Settings, though - and many users and organizations do so because it tends to be irritating for long-time experienced users.

Display most recent image from folder

I want to show the most recent image from a folder (Windows) and have the page (.html) automatically refresh, say, every 5 seconds. What's the easiest way to do this? I prefer not to install any software for this and do it in (for example) the browser.
It is not possible to get the creation date of an image using only JS.
You need to either try an AJAX solution, or use a specific name for the last saved file (f.e: "lastimg.png")
For the 5second refresh mechanism You can use setInterval.
Using this solution, this topic might also be useful for You.
For a more specific answer, try to ask a more specific question.

Rails 3: Support form that auto Find Users OS and Browser info

I'm building a support form for my application. I'd like the user to include their Operating System and Browser they are using, catch is the general users either don't care to look this stuff up or don't know how. I'd like to add a text-input that automatically grabs this information for the user and displays it in the text field. Not sure how to go about doing this as I'm new to rails. I'm assuming I'd have to tie this in with javascript or a model that is attached to the form.
Any ideas would be appreciated.
you can read it on the server side so there is no need to bother the users.
request.env['HTTP_USER_AGENT'] should do the trick. You can also read some more information like the accept language or accept encoding. Just look at the keys like this: request.env.keys and check what could be of use to you.