I'm following this guide :https://www.smartface.io/developer/guides/plugins/hello-world-with-android-plugin/#Generating android plugin
but i'm bit confused at this step:
contains package.json file PluginConfig.JSON data or are in mytest folder two files?
In PluginConfig.JSON file :
{“classes”:[“com.example.mervebicakci.helloworld.HelloNotifier”]} and
in package.json file:
{
"name" : "helloPlugin",
"version" : "1.0.0",
"description" : "Smartface Hello Plugin",
"keywords" : [
"Smartface",
"Hello",
"Plugin"
],
"author" : "Smartface Inc.",
"license" : "ISC",
"OS" : "Android",
"cpu" : ["arm", "x86"]
}
You must have these two separated files in the folder where you will build the apk.
Hope that answers your question, because it's not very clear what you wanna know and what is your problem. :)
Related
I have a composer file that is attempting to grab a zip file from a private github repo like this...
{
"name" : "myproject/project",
"type" : "project",
"authors" : [
{
"name" : "testauthor"
}
],
"repositories": [
{
"type": "package",
"package": {
"name": "tespackages/package1",
"type": "wordpress-plugin",
"version": "2.0",
"dist": {
"url": "https://github.com/myprivaterepo/myfile.zip",
"type": "zip"
}
}
}
],
"require": {
"tespackages/package1" : "2.0"
},
"config": {
"github-oauth": {
"github.com" : "myprivatereposshkey"
}
}
}
The problem is that the zip is returning a 404 error as it is unable to access it. I had assumed that using the github-oauth command would grant it access but not in this case.
Where am I going wrong?
I am not sure that this is an easy task - it took me a while to arrange some code to download from Releases page in private repo...
You could start here: Download a repository archive (zip) and you need to authenticate first Authentication.
If you have some kinda app that could do it - use it but I don't see in your code example where you pass or define Github username or access token, password, SSH key, etc...
Please, help to modify next json. I need add one level and paste part of attributes here.
Input:
{
"Name" : "Some order",
"Status" : "New",
"Project" : "Some project",
"Goal" : "Some goal",
"Urgency" : "",
"URL" : "",
"table_name": "Order"
}
Desired output:
{
"row": {
"Name" : "Some order",
"Status" : "New",
"Project" : "Some project",
"Goal" : "Some goal",
"Urgency" : "",
"URL" : ""
},
"table_name": "Order"
}
If you have some cool sources about JOLT, please, share.
You can use the following shift transformation spec
[
{
"operation": "shift",
"spec": {
"table_name": "&",
"*": "row.&"
}
}
]
where you just need to nest the elements under row key other than the element with table_name key. &(&0) represents the nearest key(without going up any level, eg. in that case you would need to use &1,&2...etc in order to go 1,2,.. levels up)
You can check this site out as a nice reference.
I am wondering what is the right Schema.org use for a review in a product. I see two different suggestions:
Majory of sites I've checked use this structure:
"review": {
"#type": "Review",
"author": "Daniela",
"datePublished": "2016-11-01",
"description": "Fantastic product! It really helped me. I would recommend to all my friends and family.",
"name": "Awesome!",
"reviewRating": {
"#type": "Rating",
"bestRating": "5",
"ratingValue": "5",
"worstRating": "1"
}
}
And it's correctly validated in structured data test tool.
However structured data helper and docs show this format:
"review" : {
"#type" : "Review",
"author" : {
"#type" : "Person",
"name" : "Daniela"
},
"datePublished" : "2017-06-08",
"reviewRating" : {
"#type" : "Rating",
"ratingValue" : "5",
"bestRating" : "5",
"worstRating" : "0"
},
"reviewBody" : "Fantastic product! It really helped me. I would recommend to all my friends and family. "
}
They are similar, the only big difference is description vs. reviewBody.
Which is correct?
They are different properties:
description gives a (typically short) description/summary/teaser of the review
reviewBody gives the full review
There is no reason to choose only one here. If you have the data for both, you can use both properties.
For Google’s Review rich result, simply check the documentation:
for a "Critic review", description is required
for a "Review snippet", reviewBody is recommended
I'm trying to disable the warning message from CoffeLint in visual studio code.
I've changed the coffeelint.json in my user folder to have the following:
"max_line_length": {
"name": "max_line_length",
"level": "ignore"
},
But this has had no effect, the error message is still shown. Anyone can suggest whats wrong?
Solution:
To configure coffeescript once installed there will be a default coffeelint.json in the C:\Users\ [username] \.vscode\extensions folder. This was entirly useless and changing configuration here has no effect (atleast in my case).
To solve this problem create a new coffeelint.json in the root of your project or add a coffeelintConfig section to your package.json. Either way, the configuration is exactly the same. If CoffeeLint doesn't find any configuration for the current project, it will check for a $HOME/coffeelint.json to use.
Following this an example configuration is below:
package.json
{
"name": "your-project",
"version": "0.0.0",
"coffeelintConfig": {
"indentation" : {
"level" : "error",
"value" : 4
},
"line_endings" : {
"value" : "unix",
"level" : "error"
}
}
}
coffeelint.json
{
"indentation" : {
"level" : "error",
"value" : 4
},
"line_endings" : {
"value" : "unix",
"level" : "error"
}
}
Now you can just edit this config to Lint your CoffeeScript :)
Well I'm trying to show the following entity:
{
"contextResponses" : [
{
"contextElement" : {
"type" : "City",
"isPattern" : "false",
"id" : "Miraflores",
"attributes" : [
{
"name" : "position",
"type" : "coords",
"value" : "-12.119816, -77.028916",
"metadatas" : [
{
"name" : "location",
"type" : "string",
"value" : "WSG84"
}
]
}
]
},
"statusCode" : {
"code" : "200",
"reasonPhrase" : "OK"
}
}
]
}
Wiring NGSI Source and NGSI Entity to Poi operatiors with MapViewer widget (Insert/Update PoI), with the following settings:
NGSI Source
NGSI server URL: mydirection:1026
NGSI proxy URL: http://mashup.lab.fi-ware.org:3000/
NGSI entities: City
NGSI Attributes: position
NGSI Entity to Poi
Coordinates attribute: position
But nothing shows up in the map! Can somebody help me figure out what the problem is?
Seems your configuration is correct (I'm assuming mydirection:1026 is a full URL, i.e. includes the protocol), but probably your network is filtering port 3000. Try to use http://ngsiproxy.lab.fi-ware.org as NGSI proxy instead of http://mashup.lab.fi-ware.org:3000/.
Indeed, I recommend you to enable https notifications in your context broker instance and use https://ngsiproxy.lab.fi-ware.org instead, especially if you are creating your WireCloud dashboard in an https web page (e.g. https://mashup.lab.fi-ware.org) as using this NGSI proxy will solve some mixed content problems, see:
Chrome: https://support.google.com/chrome/answer/1342714?hl=en
Firefox: https://blog.mozilla.org/tanvi/2013/04/10/mixed-content-blocking-enabled-in-firefox-23/
Update: FIWARE has move from fi-ware.org to fiware.org. The recommended NGSI proxy server is now ngsiproxy.lab.fiware.org (ngsiproxy.lab.fi-ware.org still works).
Three simple steps to start MapViewer on Fiware:
Update the Orion ContextBroker in your system
You should check if the daemons rush and rdis are installed and running in your system
You should create a correct boot sequence in the init.d: redis, rush and contextBroker
After these steps, you can build your viewing interface in Wirecloud using MapViewer, NGSI source and NGSI entity to POI.
You must use structured JSON messages correctly as in the following example:
{ "contextElements":
[
{
"type": "iotdevice","isPattern": "false","id": "edison1", "attributes":
[
{
"name": "temperature",
"type": "string",
"value": "10"
},
{
"name" : "position",
"type" : "coords",
"value" : "-20, 35",
"metadatas" : [
{
"name" : "location",
"type" : "string",
"value" : "WSG84"
}
]
}
]
}
],
"updateAction": "APPEND"
}