How to use url section in index map - source-maps

I am working on a Python to JavaScript compiler and I try to implement V3 sourcemaps.
The following format works fine:
{
"version": 3,
"file": "D:/activ_tosh/geatec/transcrypt/transcrypt/demos/pong/__javascript__/pong.mod.js",
"sources": [
"D'!activ_tosh!geatec!transcrypt!transcrypt!demos!pong!pong.py"
],
"mappings": "AAAA;AAIA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AAEA;AAAA;AACA;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AAGA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AAOA;AACA;AAEA;AAAA;AACA;AAMA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AAEA;AAAA;AAEA;AAGA;AAQA;AACA;AACA;AAAA;AAAA;AAAA;AA/CA;AACA;AACA;AACA;AA8CA;AAAA;AAKA;AAEA;AAAA;AACA;AAMA;AAMA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAvCA;AACA;AAwCA;AAAA;AAKA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAHA;AAAA;AAAA;AAAA;AAKA;AAKA;AAOA;AAAA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AACA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAHA;AAAA;AAAA;AAAA;AAKA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAvCA;AACA;AAwCA;AAAA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AAAA;AAEA;AACA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA"
}
but the so called 'index map' format gives an error in Chrome:
Failed to parse SourceMap
I've looked everywhere for examples, but could find none. Can anyone spot what could be the trouble, my indexmap is:
{
"version": 3,
"file": "D:/activ_tosh/geatec/transcrypt/transcrypt/demos/pong/__javascript__/pong.js",
"sections": [
{
"offset": {
"line": 15928,
"column": 0
},
"url": "file:///D:/activ_tosh/geatec/transcrypt/transcrypt/demos/pong/__javascript__/extra/sourcemap/pong.mod.js.map"
}
]
}
I've tried with and without 'file:///' and also relative paths, but this (very uninformative) error remains. I've also tried Firefox devtools, but they give no error info at all.

Related

Microsoft Graph API UnableToDeserializePostBody 400 error

I'm trying to create recurring events under my outlook calendar and for that, I'm following instructions from here.
My payload looks like this:
{
"Subject": "Blocked By DEV",
"Body": {},
"Start": {
"DateTime": "2022-08-30T23:30:00",
"TimeZone": "Asia/Calcutta"
},
"End": {
"DateTime": "2022-08-30T23:45:00",
"TimeZone": "Asia/Calcutta"
},
"Recurrence": {
"pattern": {
"type": "WEEKLY",
"interval": 1,
"daysOfWeek": [
"Monday",
"Tuesday"
]
},
"range": {
"type": "numbered",
"startDate": "2022-08-30",
"numberOfOccurences": 3
}
}
}
I'm trying to hit the endpoint /me/events from Graph Explorer and getting this 400 error.
{
"error": {
"code": "UnableToDeserializePostBody",
"message": "were unable to deserialize "
}
}
Is there anything wrong with my payload? Is there any way to have more details about the failure?
Just spotted the culprit, numberOfOccurences was supposed to be numberOfOccurrences.
And if someone asks why I ended up doing that mistake, I just referred docs, and seems like official documentation has that typo.

Objects in array is not well supported error observed for ELK docker image

I'm using the latest elk image for kibana dashboard and I have json file which is having list of array[] and I'm not able to show those as field in kibana and It's showing that the object in array is not well supported error message.
As per the document in kibana I just went through the below link but I didn't find anything useful for elk docker image.
https://github.com/istresearch/kibana-object-format
I just tried to run the command
Run bin/kibana-plugin install <package.zip>
but it returned as run is unknown command removed run and ran remaining command but It says that's invalid.
I'm using linux box and Kibana 7.3 version.
Is it possible to overcome this issue? how to deploy that plugin for elk image else is there any other way to make those arrays object as fields in kibana.
I'm not sure how can I proceed. Please help me.
Sample Data:
{
"expand": "schema,names",
"startAt": 0,
"maxResults": 50,
"total": 4,
"issues": [{
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
"id": "1999875",
"self": "https://amazon.kindle.com/jira/rest/api/2/issue/1999875",
"key": "KINDLEAMZ-67578",
"fields": {
"summary": "contingency is displaying for confirmed card.",
"priority": {
"name": "P1",
"id": "1"
},
"created": "2019-09-23T11:25:21.000+0000"
}
},
{
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
"id": "2019428",
"self": "https://amazon.kindle.com/jira/rest/api/2/issue/2019428",
"key": "KINDLEAMZ-68661",
"fields": {
"summary": "card",
"priority": {
"name": "P1",
"id": "1"
},
"created": "2019-09-23T11:25:21.000+0000"
}
},
{
"expand": "operations,versionedRepresentations,editmeta,changelog,renderedFields",
"id": "2010958",
"self": "https://amazon.kindle.com/jira/rest/api/2/issue/2010958",
"key": "KINDLEAMZ-68167",
"fields": {
"summary": "Test Card",
"priority": {
"name": "P1",
"id": "1"
},
"created": "2019-09-23T11:25:21.000+0000"
}
}
]
}
I just want to fetch KEY, Summary, Priority from each of the above array. But its not working as expected when I tried to make a field its showing as array in kibana. If this is not working with 7.3.0 should I downgrade to lower version? the steps are missing for docker user in that document. Is there any way to get those details?
Checking here: https://github.com/istresearch/kibana-object-format/releases it looks like the plugin latest release was for Elasticsearch 6.3. I guess that is the reason for your error.
I'm not sure there's a fix for this in kibana. There are many issues on this subject, open for a long time, like: https://github.com/elastic/kibana/issues/3333.

Missing elements for a Google Cloud Video Annotation request

I am trying to run annotation on a video using the Google Cloud Video Intelligence API. Annotation requests with just one feature request (i.e., one of "LABEL_DETECTION", "SHOT_CHANGE_DETECTION" or "EXPLICIT_CONTENT_DETECTION"), things work fine. However, when I request an annotation with two or more features at the same time, the response does not always return all the request feature fields. For example, here is a request I ran recently using the API explorer:
{
"features": [
"EXPLICIT_CONTENT_DETECTION",
"LABEL_DETECTION",
"SHOT_CHANGE_DETECTION"
],
"inputUri": "gs://gccl_dd_01/Video1"
}
The operation Id I got back is this: "us-east1.11264560501473964275". When I run a GET with this Id, I have the following response:
200
{
"name": "us-east1.11264560501473964275",
"metadata": {
"#type": "type.googleapis.com/google.cloud.videointelligence.v1.AnnotateVideoProgress",
"annotationProgress": [
{
"inputUri": "/gccl_dd_01/Video1",
"progressPercent": 100,
"startTime": "2018-08-06T17:13:58.129978Z",
"updateTime": "2018-08-06T17:18:01.274877Z"
},
{
"inputUri": "/gccl_dd_01/Video1",
"progressPercent": 100,
"startTime": "2018-08-06T17:13:58.129978Z",
"updateTime": "2018-08-06T17:14:39.074505Z"
},
{
"inputUri": "/gccl_dd_01/Video1",
"progressPercent": 100,
"startTime": "2018-08-06T17:13:58.129978Z",
"updateTime": "2018-08-06T17:16:23.230536Z"
}
]
},
"done": true,
"response": {
"#type": "type.googleapis.com/google.cloud.videointelligence.v1.AnnotateVideoResponse",
"annotationResults": [
{
"inputUri": "/gccl_dd_01/Video1",
"segmentLabelAnnotations": [
...
],
"shotLabelAnnotations": [
...
],
"shotAnnotations": [
...
]
}
]
}
}
The done parameter for the response is set to true, but it does not have any field containing the annotations for Explicit Content.
This issue seems to be occurring at random to my novice eyes. The APIs will return a response with all parameters on some occasions and be missing one on others. I am wondering if there is anything I am missing here or something on my end that is causing this?
I did some tests using just LABEL_DETECTION, just EXPLICIT_CONTENT_DETECTION and using the three of them.
As I am not using videos with explicit content, I don't see any specific field when adding just EXPLICIT_CONTENT_DETECTION:
{
"name": "europe-west1.462458490043912485",
"metadata": {
"#type": "type.googleapis.com/google.cloud.videointelligence.v1.AnnotateVideoProgress",
"annotationProgress": [
{
"inputUri": "/cloud-ml-sandbox/video/chicago.mp4",
"startTime": "2018-08-07T14:18:40.086713Z",
"updateTime": "2018-08-07T14:18:40.230351Z"
}
]
}
}
Can you share a specific video sample, the request.json used and two different outputs, please?

Can't get FHIR message to decode

I am trying to integrate with a service that provides FHIR ImageStudy messages in JSON format. Once I have the JSON message I need to convert the message to XML.
I am using the FHIR-net-api found here, https://github.com/ewoutkramer/fhir-net-api I posted earlier and got help using this library to parse standard image study messages. Here is a link to my earlier post, FHIR JSON to XML decoding in BizTalk
The service I am connecting to has added some extensions to the image study message and when I attempt to parse it I get an error that the parser failed line 1 character 1.
My understanding is that if the extension are done correctly the FHIR-net-api library should be able to parse the JSON to XML. Is this correct?
Can anyone identify if the test message below is compliant to the FHIR standard, if not what is wrong with it? I have shortened the message to only contain a single image study but the service returns multiple in a bundle. I have also removed identifying information.
{
"resourceType": "Bundle",
"total": 15,
"entry": [
{"resource": {
"resourceType": "ImagingStudy",
"id": "LALA.e1e6683d-f6d9-e311-ae0e-0050568f64",
"contained": [
{
"resourceType": "Organization",
"text": {"div": "LALA"},
"name": "LALA"
},
{
"resourceType": "Procedure",
"id": "Procedure1",
"code": {"coding": [ {
"code": "RAD-HANB",
"display": "HANDS BIL"
}]}
}
],
"extension": [ {
"url": "https://someplace.org/fhir/extensions/imagingstudy-examstatus",
"valueString": "Finalized"
}],
"started": "2013-12-03T12:30:00-08:00",
"accession": {"value": "A12345BH"},
"procedure": [{"reference": "#Procedure1"}],
"series": [ {
"modality": {
"system": "http://www.dicomlibrary.com/dicom/modality/",
"code": "CR"
},
"bodySite": {"code": "UEX"},
"instance": [
{"title": "DiagnosticReport"},
{
"title": "DiagnosticImage",
"content": [
{
"url": "/fhir/Patient/91111/ImagingStudy?_query=imageUrl&_id=6683d-f6d9-e311-ae0e-0050568f6477&-mrn=12345T&-organization=lala&accession=tester&-status=F",
"title": "Something"
},
{
"url": "/fhir/Patient/9111111/ImagingStudy?_query=html5Url&_id=e1e6683d-f6d9-e311-ae0e-0050568f6&-mrn=123345&-organization=lala&accession=testing&-status=F",
"title": "HTML5"
}
]
}
]
}]
}}
]
}
I suspect that you got a message like this: Error parsing XHTML: Incorrect document syntax. at line 1 row 1. source = " at line 8 col 13
That's what I get once I clean up the instance a little bit to include only the resource and not the wrapper from the Bundle and check it against http://fhir2.healthintersections.com.au/open/.
The first issue is that the narrative inside your div tag is not valid. It needs to look like this:
"div": "<div>LALA</div>"
However there are a bunch of others. The narrative is missing status. Narrative isn't actually allowed on contained resources, you're missing a bunch of mandatory elements, etc. Just go to the link above and paste your JSON into the "upload" box at the bottom of the page and select "validate". That will give you a full report of the issues. (Not all of those will necessarily impact your ability to convert between JSON and XML, but presumably you'll want to fix them regardless.)

Pebble app not recognizing Resource Images

I have added the resources via the 'add new' button next to resources and then in my code I am executing
image_logo = gbitmap_create_with_resource(RESOURCE_ID_IMAGE_APP_LOGO_LONG);
but I am getting the following compilation error:
../src/main.c: In function 'main':
../src/main.c:120:44: error: 'RESOURCE_ID_IMAGE_APP_LOGO_LONG' undeclared (first use in this function)
../src/main.c:120:44: note: each undeclared identifier is reported only once for each function it appears in
Waf: Leaving directory `/tmp/tmpGhVqKn/build'
Build failed
Here is what my appinfo.json file contains, I downloaded this from the settings section for the app. You can see that the images have been added with the same identifier.
{
"appKeys": {
"agency": 0,
"cleanStops": 11,
"error": 10,
"eta": 8,
"getEta": 9,
"getRoutes": 5,
"index": 1,
"refresh": 4,
"routeId": 6,
"routeName": 7,
"stopId": 2,
"stopName": 3
},
"capabilities": [
"location",
"configurable"
],
"companyName": "joshua103us#yahoo.com",
"longName": "DoublePebble",
"projectType": "native",
"resources": {
"media": [
{
"file": "images/doublemap_menu_icon.png",
"menuIcon": true,
"name": "IMAGE_DOUBLEMAP_MENU_ICON",
"type": "png"
},
{
"file": "images/spoon_long_med-2.png",
"name": "RESOURCE_ID_IMAGE_APP_LOGO_LONG",
"type": "png"
}
]
},
"sdkVersion": "3",
"shortName": "DoublePebble",
"targetPlatforms": [
"aplite",
"basalt"
],
"uuid": "409b7111-c0bf-43bd-a90c-8a44c33d1eb3",
"versionLabel": "1.0",
"watchapp": {
"watchface": false
}
}
The RESOURCE_ID_ part of the resource identifier is added by the system to the name you specify in appinfo.json
For example:
{
"file": "images/doublemap_menu_icon.png",
"menuIcon": true,
"name": "IMAGE_DOUBLEMAP_MENU_ICON",
"type": "png"
},
You would then use RESOURCE_ID_DOUBLEMAP_MENU_ICON.
In my case I experienced the same problem in the Cloudpebble environment, apparently even after formatting the image with http://www.watchface-generator.de/converter/ and saving the resource following Pebble tutorials it was like if CloudPebble still wouldn't recognize. It only did after i clicked on "Run Build" in the compile section of CloudPebble environment...just trying to save other some precious time :)
Another useful note when working in the Cloudpebble environment is you can hover over the name of the resource file and it will say the name of the identifiers.
For whatever reason mine showed up as different names than what I thought I had saved them as in the settings. Going in and editing the name (even if you just delete something and save the same name after editing it) and saving it should fix the issue. But in my case, just deleting the resource and then uploading it again seemed to resolve my issue. I suspect I might have had set them up as multiple identifiers. There is an "Another Identifier" button at the bottom of the page and I think that what was my issue. You can see this when you hover over the file and it has multiple names as identifiers (even if they are the same name).

Resources