I have no idea what I am doing but my programmer is sleeping and have phone turned off.
I have a json config file for important server going
the text is like this
"36": {
"link": "http://www.dpbolvw.net/click-7950848-12234805-1461061905000",
"name": "Cedok.cz"
},
"37": {
"link": "http://www.vivantis.cz/?d=72815",
"name": "Vivantis.cz"
},
"38": {
"link": "http://www.tkqlhce.com/click-7950848-12197703-1461744724000",
"name": "Parfums.cz"
},
"99": {
"link": "http://89.221.208.56/test",
"name": "Test"
}
I have no idea where exactly I broke the code that my website doesnt function but I did broke it. U just copied one full number and tried to get for a fresh new config setupp..it didnt work..so I deleted the number..and it still does not work.
The code seems perfectly okay to me visually. I messed up the end somehow.
You might just need another } (closing bracket) at the end of your file. That's just a guess, because it's hard to know without more information.
Related
So I've been spending a lot of time trying to get a couple specific settings working for my language extension in VS Code, and while the documentation and the few articles online seem to make it sound as simple as adding a "configuration" point in my package.json and a "getConfiguration()" call in the extension.ts file, it seems that there is more needed to get them working. This is my first extension I've made so I'm a bit unfamiliar with some of these things.
I am working on this project for work, so I will paste some of my code below with certain edits. The main issue I am getting right now is that it recognizes that I have added the configuration points to the package json, but I get this error when trying to debug the extension:
Cannot register '<configuration_name>'. This property is already registered
I have read as much as I can online about this and it seems that maybe the issue is that VS Code is seeing these settings as already defined and therefore is confused because it may be expecting custom configurations. I'm not sure. I feel though the issue must lie in my extension.ts file since when I look at the configuration example on the VS Code Examples repository on Github, they are doing quite a lot more than just the simple "getConfiguration()" function I am using. But I really have no idea what I would do. I am not very familiar with typescript as of yet, so any help would be greatly appreciated on this. Anyone have any insight as to why it would be doing this?
Here is my package.json:
{
"name": "ex-lang",
"displayName": "Example",
"description": "Example language support",
"version": "0.0.1",
"engines": {
"vscode": "^1.64.2"
},
"categories": [
"Programming Languages",
"Snippets"
],
"contributes": {
"languages": [
{
"id": "ex",
"aliases": [
"EX",
"ex",
"Example"
],
"extensions": [
".ex"
],
"configuration": "./language-configuration.json",
"icon": {
"light": "./icons/icon.png",
"dark": "./icons/icon.png"
}
}
],
"grammars": [
{
"language": "ex",
"scopeName": "source.ex",
"path": "./syntaxes/ex.tmLanguage.json"
}
],
"snippets": [
{
"language": "ex",
"path": "./snippets.json"
}
],
"configuration": [
{
"id": "ex-config",
"title": "Example Custom Settings",
"properties": {
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment.block.documentation.ex"
],
"settings": {
"foreground": "#efc752"
}
}
]
},
"editor.bracketPairColorization.enabled": true,
"workbench.colorCustomizations": {
"editorBracketHighlight.foreground1": "#2b85d5",
"editorBracketHighlight.foreground2": "#559ddd",
"editorBracketHighlight.foreground3": "#80b6e6",
"editorBracketHighlight.foreground4": "#aaceee",
"editorBracketHighlight.foreground5": "#d5e7f7",
"editorBracketHighlight.foreground6": "#c6cad4",
"editorBracketHighlight.unexpectedBracket.foreground": "#db6165"
}
}
}
]
},
"dependencies": {
"vsce": "^2.9.2"
},
"devDependencies": {
"#types/node": "^16.11.7",
"#types/vscode": "^1.40.0",
"#typescript-eslint/eslint-plugin": "^5.19.0",
"#typescript-eslint/parser": "^5.19.0",
"eslint": "^8.13.0",
"typescript": "^4.7.2"
}
}
I have tried messing a bit with Activation Events, but I was getting more issues with it as I suppose I don't understand them as well as I might like. I have also fiddled with different scopes for the configuration points and such but to no avail. And lastly, I did have a "main" contribution point, but I was having very strange pathing issues when I had it (it kept saying the file was not found), so I removed it. Not sure if any of these things are also contributing to my problem or not.
Here is my extension.ts file for reference:
import * as vscode from 'vscode';
export function activate(context: vscode.ExtensionContext) {
vscode.workspace.getConfiguration('ex-config');
}
I would like to know weither the LanguageMap functionnality is supported (or will be supported) in the Orion-LD implementation.
The languageMap is presented on the folowing video : https://www.youtube.com/watch?v=ll-t8Vi9i50
The idea is to be able to request an attribute in a specific language. Exemple with the following JSON :
"pitch": {
"type": "Property",
"value": [
{
"language ": "fr",
"article": "Mariage"
},
{
"language": "en",
"article": "Wedding"
},
{
"language": "ru",
"article": "Выставка!"
},
{
"language": "zh",
"article": "展览"
},
{
"language": "ja",
"article": "展覧会"
}
]
},
How to query a specific language article?
Many thanks in advance for your feedback.
Rgds
LC
Yes, it will most definitely be supported.
Not the very first item on our Backlog, but yeah, it's quite prioritized. Third item in a list of hundreds of items ... (right now - the list is somewhat volatile).
It will not be exactly as in your example, please check the latest published ETSI NGSI-LD spec to get it right. It's something like this:
"pitch": {
"type": "LanguageProperty",
"languageMap": {
"en": "marriage",
"fr": "mariage",
"es": "matrimonio",
...
}
}
If you create an issue on Orion-LD's github, you will be informed as soon as the work begins on this, and I can even send a hint every now and then, before the work actually begins. Hopefully, work will commence on this interesting feature before summer, but I can't really promise anything.
About queries, if I remember correctly, the query will be done simply with
?q=pitch==matrimonio&lang=es
(please check the API spec to verify what I just said)
i created a json file with all the data required for my app, it was working fine but one image was showing error saying that it is from another domain, so i changed the image address to another image, and now it says
crbug/1173575, non-JS module files deprecated
i tried changing it back to the previous image and restarted the application it still shows the error.
{
"id": 1,
"name": "92.7",
"tagline": "on the ground by Rose",
"color": "blue",
"url": "https://upload.wikimedia.org/wikipedia/en/5/51/Google_Chrome_on_Windows_10_screenshot.png" ,
"icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Google_Chrome_icon_%28September_2014%29.svg/96px-Google_Chrome_icon_%28September_2014%29.svg.png" ,
"img": "https://preview.redd.it/ls2yuc4501l61.jpg?width=512&auto=webp&s=be785e98bf288f69c0b0105fb2bce6ab807b20f4",
"category": "blackpink",
"disliked": false,
"order": 1
},
{
"id": 2,
"name": "92.7",
"tagline": "blood sweat and tears by BTS",
"color": "blue",
"url":"https://upload.wikimedia.org/wikipedia/en/5/51/Google_Chrome_on_Windows_10_screenshot.png" ,
"icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Google_Chrome_icon_%28September_2014%29.svg/96px-Google_Chrome_icon_%28September_2014%29.svg.png",
"img":"https://m.media-amazon.com/images/M/MV5BZTQ3YmU4MjAtYzQ0NC00NjRjLThmMzYtMTE4MzgzMWJkNjliXkEyXkFqcGdeQXVyNDY5MjMyNTg#._V1_.jpg",
"category": "BTS",
"disliked": false,
"order": 2
}
Error was in the first pic, the second was showing fine but after changing it , now it doesnt start the application and shows the error i mentioned above. I'm using google chrome to run the application.
Delete your launch.json file as it is causing your app to not launch with the default configuration of flutter
I encounter the same error in one of my flutter web projects. you have to delete the launch.json file.
Here is path of file
.vscode -> launch.json
just delete launch.json and your project will run.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"request": "launch",
"name": "Launch Chrome against localhost",
"type": "dart"
}
]
}
Working on JSON file in VS Code that is feeding big app with multiple layers that all have "ID" tag that needs to be unique or the app is broken. Multiple people are working on it and with large number of layers it is hard to keep track. Is there a way to make it appear as error or a warning to a user if there are 2 identical IDs or to make some script that will check it.
Sample code:
"layers":[
{
"id": "firstID",
"name": "name1"
},
{
"id": "secondID",
"name": "name2"
},
{
"id": "thirdID",
"name": "name3"
},
{
"id": "firstID",
"name": "name4"
}]
As seen in this code, is it possible for VS code to mark or make and error for last object as it have same "id" as first?
Thanks in advance
I have an article.json file (named as such) below that I want to connect to Apple News and test:
{
"version": "1.4",
"identifier": "TestArticle",
"title": "My First Article",
"language": "en",
"layout": { "columns": 1},
"components": [
{
"role": "title",
"text": "My First Article"
},
{
"role": "body",
"text": "This is just over the minimum amount of JSON required to create a valid article in Apple News Format. If you were to delete the dictionary enclosing this text, you'd be there."
}
],
"componentTextStyles": {
"fontName": "Lato",
"textColor": "#000",
"linkStyle": {
"highlight": {
"color": "#358fd4"
}
}
}
I downloaded XCode and the necessary Ruby gems, to enter relevant command lines. As specified in the documentation, my .papi file is formatted correctly as it fetched my channel information successfully. According to Apple's ReadMe, this is the command I have to enter to publish an article:
papi-client article publish <Article Directory>
The problem is, I'm not sure exactly what this article directory is, or how to locate it. As far as I knew, I would create something like the above "article.json" file and potentially use that as the directory. I've even tried using the file path for said file, with no success. What could be my next steps to get this off the ground?
Place the article along with any locally linked, i.e. bundle://, content in a folder then use this folder as the article directory.