Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I was given a JSON file and told to read it to get a better understanding of how JavaScript programming works and edit this file to do what I need it to do. It's supposed to be a file to run some cleaning processes on client computers, so I just need to edit it so that they file will run all the processes I want it to run without having to send multiple commands to the computer through my RMM.
When I open the file however in Sublime Text 3 it looks like this. How do I get it to read as JavaScript programming language so I can edit it?
{"os":3,"procedure_type":1,"name":"Clear_PrinterSpool_DNSCache_EventLogs","description":"","version":"2.0","payload":"cX8e1mZa4ffL5OfFuWnR+cqMYnnhpC5Myt22X+nx5dMeS1BYFK5yLlxTPWDPMiw3c0XnZD7Y5zrPIRD9EIxuYLEAa3MYYHZVHhfIUb5MeDifqw3+FHhA/IjFcyL9eSzJ/Nmt2TLu5bPSTQkzqBT9GAdiL0YsDxqn8mpttL0mDCa0g5gJ0vfI41lynD0L8pma6dQ5b3+I+JhSq9irNcHMRrhUkL8dfRUrzIasT/s0q0Ksy0jVu/lcMH+ab0CFlxRMB3aP5dZkBkjTPa4n54pX8yOHejnTbi0qXxVJSBLmFeV4Usw8f/dzbzdR+NN/qSaLP2JU4GXdHjgAIwk0Xb09oFbOhJIu4r7rPku0zLcaq5YXufXXWgzHmBo0AFg1xkGztsfA639dlxZXECxVx4ykMJWnFGl4nowGqsflHSddA4/Q72Nr0ZUm0nM2VAyBhQe8HZ2Z1FwRdBzM8i/YsC6LTGXXjgnn0xin/W2+y+7P+t4n0UFFFAaRT68GuvA/IuwuRjNEIfwhRo5s+qf5D9N1Rbxb/+dvzVVIuwrUIa8HZFHLJM1m4NURNCOTI3aW2o+Qigeah2AOVK4i/mIo94GJ4cnm4odFlli70R8XuKVFzNuKAHfn/TvMorlTdeWaYlLGB67EMtVvGEgSDPCk0mSJkWMzzHm+bxZo+LIAAspBjZuivP68kSm+2FKpMWqlmlKvlx9M+oy+P0koePHx3Ndi4p+Lsm9/mgHyvp3ZdfgmPuMdzOvrMlcibzdAi6e+TohtcQIJpk/yk5OIHgTysbSahwACiwaSLwqLh4SfcQRmmBAn8GoIA+PyD4g3zyErJmaJo6HcpJUcH0g7ytV/rotVvpr+2zW49fPRnCcm8q5pt12qROby42bLUMp/rm03EM+MUKB6I+YzWHENm8tg/O7UDanCyz7DIBbDl4hob8KtL7PA0QDjd9KQ61l/Ld7fNQ9vjNDD+uVaGyDim1ANhwdPMX/nJmvKmVc37XOgEd0AsmicZ8W2FobZpM3yfAdxD3to52N9fwC7T9exYE50RG7+McS+mtd8BRicXe5QfSH5P12GDM9+LaaUVdKzm63FZzhyX/0xpGN97q1VNKPAa6CfO5D/LD21mCrrPeOCeYJ2lHtTo7cW2iu7AXx0WRusz9PX162D+eqeo/ZFmflQv4MpMxnc00pT+QRxX3YZhX/50YU=","payloadChecksum":"d80877609ce0b19f6dcbe3c35d57cd03"}
You can just create a backend call, the URL being pointed to the location of this JSON file.
In the result of that backend call, you will get the contents of the JSON file.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I am trying to execute the code written in a text area (using codemirror js)
<textarea id="editor" cols="100" rows="50"></textarea>
I want to execute this code on my Heroku server but I cannot compile it as it does not have GCC installed on it. Can I install GCC on my (Free tier) Heroku server? Is there a different way to do it? Any possible solution is welcome.
Well, you would need to decide on a backend to use.
You can get the textfields content in a number of ways, like sending it through the use of a html form to any recipient, like a php script
or send it via Javascript calls,
or any other way.
Then you'd probably want to sanitize the users input to make sure it's not malicious
then you need to write the piece of software that feeds the code to an interpreter, and wait for it's result
And then you will need a piece of software that will send those results back to the user.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I need to do some image processing on a browser where I upload images and with my python script, it manipulates the images. In the end, I just want to open an HTML page where I can simply use buttons there to process my python script. Please tell me how can I do it? I don't know much about web development. I don't need to host a website. I just want to do it locally so that if I give my files to anyone they can access it by just opening the HTML document.
If you want to practice and you need to upload an image and processing in your web app you need to use Phyton(with Django should be more fast to create what you want) and MySQL(or another database) to save the data.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
So I have an html file with javascript and a python file. In the javascript file, the user enters a string. In the python, I would like it to search it in an api, and then return the string to be displayed in the html file. How do I do this? I have looked up how to use AJAX and get/post methods, but nothing has worked so far. Also, I should mention I am using flask.
The basic mechanics of having an HTML page communicate directly with another program is web server programming. If you want the web server to execute python, then consider setting up a Django server. Learning how to set up a web server and getting the two programs to talk with each other may take a while if it is your first time.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to create a Twitch.tv app for desktop Pc. I have read that Twitch api use Json for the streams.
Can someone please explain me how I get the streams into a list? I plan to use C# get the list into a listbox but im stuck and cant continue because I dont know how to get what is available
Another way I was thinking is using Javascript but same problem can someone help me?
The github shows how you can get stream from twitch. First you send a request like shown on github "curl -H 'Accept: application/vnd.twitchtv.v2+json' -X GET https://api.twitch.tv/kraken/streams/test_channel" then you will get a JSON file (that contains all the information you need) as a response, you the read the file and use it in your application
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I've been looking for quite some time if it is even possible to do this.
I'd like to make a RESTful POST call with a javascript without the use of a server (node) to send a json object in the request body to update a json file in a github repo triggering a commit/push.
Yes, it's possible to do this using the Github API.
The URL must be something like that:
https://api.github.com/repos/{repositoryName}/contents/{path}
repositoryName is the repository where you want to put your file and path its path within this repository.
Regarding the authentication, you need to follow this link https://developer.github.com/v3/#authentication. I successfully tested with basic auth.
You need then to use an HTTP method PUT with content with the following structure:
{
"message": "a commit message",
"content": "bXkgbmV3IGZpbGUgY29udGVudHM="
}
The field content corresponds to the content of your file encoded with base 64.
Hope it helps.
Thierry