Microsoft Access time formatting - ms-access

Could someone help with the correct time formatting.
I am using Microsoft Access for 365 installed in the PC (64bit version)
The time is comming from a linked server as military format with the exception of middnigh or passed midnight the format comes as 1000 (without the 2 digits at the begining) (instead of 001000 or 241000) (see pics)
So I'm trying to format in a way the is a easier visual as 00:10:00 or 24:10:00
Thank you before hand for any help
Example
Link image
This is the format for time desired
Image link

Use TimeSerial to convert your "numerical" time to true time values:
TrueTime = TimeSerial(NumTime \ 10000, NumTime \ 100 Mod 100, NumTime Mod 100)
Then apply the format to this as you like.

Related

AllenNLP BERT SRL input format ("OntoNotes v. 5.0 formatted")

The goal is to train BERT SRL on another data set. According to configuration, it requires conll-formatted-ontonotes-5.0.
Natively, my data comes in a CoNLL format and I converted it to the conll-formatted-ontonotes-5.0 format of the GitHub edition of OntoNotes v.5.0. Reading the data works and training seems to work, except that precision remains at 0. I suspect that either the encoding of SRL arguments (BOI or phrasal?) or the column structure (other OntoNotes editions in CoNLL format differ here) differ from the expected input. Alternatively, the error may arise because if the role labels are hard-wired in the code. I followed the reference data in using the long form (ARGM-TMP), but you often see the short form (AM-TMP) in other data.
The question is which dataset and format is expected here. I guess it's one of the CoNLL/Skel formats for OntoNotes 5.0 with a restored WORD column, but
The CoNLL edition doesn't seem to be shipped with the LDC edition of OntoNotes
It does not seem to be the format of the "conll-formatted-ontonotes-5.0" edition of OntoNotes v.5.0 on GitHub provided by the OntoNotes creators.
There is at least one other CoNLL/Skel edition of OntoNotes 5.0 data as part of PropBank. This differs from the other one in leaving out 3 columns and in the encoding of predicates. (For parts of my data, this is the native format.)
The SrlReader documentation mentions BIO (IOBES) encoding. This has been used in other CoNLL editions of PropBank data, indeed, but not in the above-mentioned OntoNotes corpora. Other such formats are the CoNLL-2008 and CoNLL-2009 formats, for example, and different variants.
Before I start reverse-engineering the SrlReader, does anyone have a data snippet at hand so that I can prepare my data accordingly?
conll-formatted-ontonotes-5.0 version of my data (sample from EWT corpus):
google/ewt/answers/00/20070404104007AAY1Chs_ans.xml 0 0 where WRB (TOP(S(SBARQ(WHADVP*) - - - - * (ARGM-LOC*) * * -
google/ewt/answers/00/20070404104007AAY1Chs_ans.xml 0 1 can MD (SQ* - - - - * (ARGM-MOD*) * * -
google/ewt/answers/00/20070404104007AAY1Chs_ans.xml 0 2 I PRP (NP*) - - - - * (ARG0*) * * -
google/ewt/answers/00/20070404104007AAY1Chs_ans.xml 0 3 get VB (VP* get 01 - - * (V*) * * -
google/ewt/answers/00/20070404104007AAY1Chs_ans.xml 0 4 morcillas NNS (NP*) - - - - * (ARG1*) * * -
The "native" format is the one under of the CoNLL-2012 edition, see cemantix.org/conll/2012/data.html how to create it.
The Ontonotes class that reads it may, however, encounter difficulties when parsing "native" CoNLL-2012 data, because the CoNLL-2012 preprocessing scripts can lead to invalid parse trees. Parsing with NLTK will naturally lead to a ValueError such as
ValueError: Tree.read(): expected ')' but got 'end-of-string'
at index 1427.
"...LT#.#.) ))"
There is no direct way to solve that at the data level, because the string that is parsed is an intermediate representation, but not the original data. If you want to process CoNLL-2012 data, the ValueError has to be caught, cf. https://github.com/allenai/allennlp/issues/5410.

MediaWiki: Convert seconds to HH:MM:SS

How do I convert seconds to HH.MM:SS via MediaWiki (plus Semantic Media Wiki)?
I tried and tried and just can't find a way.
The duration in seconds comes via filling out a template.
As I can't install more extensions to the Wiki the only ways are via SMW and parser functions.
Thank you very much in advance!
You should be able to do this with the time parser function:
{{#time: H.i.s | #123 }}
It't not strickly treating it as a time duration, but rather a time from the unix epoch, but if you don't go over 24 hours it doesn't really matter.
If you need to go higher, then you can build up a custom expression using the trunc operator, for example to get the number of hours:
{{#expr: trunc (123/60/60) }}

post timestamp in web_submit_data itemdata in loadrunner

In our hyperion application, we have a explore button.
Here is its post:
web_submit_data("explorer", //FIXME: id vlaue parameter
"Action=https://{host_url}/raframework/browse/explorer",
"Method=POST",
"TargetFrame=",
"RecContentType=application/x-json",
"Referer=https://{host_url}/workspace/index.jsp?framed=true",
"Snapshot=t19.inf",
"Mode=HTML",
ITEMDATA,
"Name=class", "Value=com.hyperion.tools.cds.explorer.ExplorerView", ENDITEM,
"Name=id", "Value=EV1390418511260", ENDITEM, //"Name=id", "Value=EV1389926310921", ENDITEM,
LAST);
This EV1390418511260 is from
this._rstExplorerViewId = "EV" + (new Date()).getTime();
from the loaded module.js file I guess, which is Unix time stamp
I tried lr_save_timestamp("timestamp", LAST ); to correlate value of id with Unix time stamp. like Value=EV{timestamp}. The request is being posted but the response body has
Content-Length: 0
X-ORACLE-BPMUI-CSRF: false
I want to try
typedef long time_t;
time_t t;
and correlate something like Value=EV{time(&t)} but here it converts to url encode and takes ascii values of those special chars.
What should I do?
Why are you using C code to replace the functionality of built in capability to LoadRunner?
See web_save_timestamp_param() for the number of milliseconds since Jan 1, 1970.
web_save_timestamp_param("tStamp", LAST );
web_submit_data("explorer",
...
ITEMDATA,
"Name=class", "Value=com.hyperion.tools.cds.explorer.ExplorerView", ENDITEM,
"Name=id", "Value=EV{tStamp}", ENDITEM,
LAST);
if this is your first trip into the Hyperion universe I would heartily suggest you find the most experienced LoadRunner professional available anywhere in the nation to support your efforts. You do not need to be struggling with tool use while at the same time working in one of the more difficult environments for any performance testing tool. Assuming you get someone who has been succesful with Hyperion recently, no matter what your organization spends (even as high as $300 per hour or more) it will be money well spent versus struggling with both tool mechanics and testing of the environment

Highcharts Single Line series JSON date data format

I am trying to implement the Single Line series chart here: http://www.highcharts.com/stock/demo/basic-line
I see the JSON format for the report is as follows:
/* May 2006 */
[1147651200000,67.79],
[1147737600000,64.98],
[1147824000000,65.26],
[1147910400000,63.18],
[1147996800000,64.51],
[1148256000000,63.38],
[1148342400000,63.15],
[1148428800000,63.34],
[1148515200000,64.33],
[1148601600000,63.55],
[1148947200000,61.22],
[1149033600000,59.77],
How do I change my data format of [date, count] into the format above?
eg my format ["2013-01-01", 55],
Thanks for any light you can shed.
There is a javascript function Date.UTC which will do the conversion for you. e.g.
[Date.UTC(2013,0,1),55],
Note, the Javascript months start at 0 (for Jan), not 1.
N.B. Make sure your axis type is 'datetime'.
In PHP do this:
$timestamp = 1000 * strtotime($your_date);

What is such a thing called?

I want to know if there is a name for a function/method/library that converts a given date object with time information into something like:
a few seconds ago
2 minutes ago
about an hour ago
10 hours ago
yesterday
on 12-May-2010
and so on. I don't know what to google for, but I'm guessing that someone must have done this before. I'm specifically looking for an implementation in python (preferably a Django filter) that works on a datetime, but any open source implementation in any language will do really, for inspiration.
Google for "Fuzzy Date Time"
I believe it is called "fuzzy timestamp" (also "timedelta")
ruby and python examples are available in this SO question
git has its own date.c utility source for this kind of refspec date specification.
A ref followed by the suffix # with a date specification enclosed in a brace pair (e.g. {yesterday}, {1 month 2 weeks 3 days 1 hour 1 second ago} or {1979-02-26 18:30:00}) to specify the value of the ref at a prior point in time.
I don't really know the name of the method used, but you can find a Javascript implementation of what you're describing at DateJS.