running Python 3 in chrome on Windows 8 computer - windows

I have seen other programmers running their code in chrome and I want to do the same with my python 3 programs, but when I follow tutorials I always get an error message.

By default, browsers (chrome or most others) only run javascript code, but not Python code. Python code runs in an interpreter. There are some third party websites that lets you type in some code, but I don't think any of them are great. If you tried one of them, please provide the website and the code you used and the error you got.
'an error message' is never useful. Please detail the particular error you are getting, and any traceback when available..

Related

VS Codespaces bash shell failed to initiate

I'm using VS codespaces to complete the current CS50X course.
I've been getting on very well with it but have hit a snag where the Terminal doesn't seem to be loading correctly. I think i'm missing a couple of options at the top of the Terminal section - Debug and Port. I'm trying to complete the Finance section of the course which involves connecting to a development server but when i try i get the following erroe message:
{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.4","title":"Not Found","status":404,"traceId":"00-76b8a3e0c4eaccf805373ec05e5ec917-dccabf0efd4cf681-00"}
I've tried to Google what might be going on but i'm very new to programming and don't understand a lot of what i'm reading!!
I did notice that the shell has failed to initiate, but again, i don't really know what that means.
I've tried re-loading the window repeatedly but still get the same situation.
Any ideas would be much appreciated!!

Ruby/Watir - segfault on browser.close

My PC has been randomly locking up lately, and while debugging I found an issue with my Ruby/Watir project. Each time the browser.close function is called, the following occurs in dmesg (slightly different each time):
[12614.684243] Chrome_~dThread[29941]: segfault at 0 ip 00007f17889b3992 sp 00007f1786aa0b00 error 6 in libxul.so[7f1787b6a000+519c000]
I'm not sure if this is causing my PC to lock up, however it still needs resolving. I've done some searching but I can't find anyone else with this issue. The issue also appears if I ctrl + c the script.
Error 6 is: The cause was a user-mode write resulting in no page being found., which makes sense if I've closed the browser.
I've read the answer on this page, but as libxul.so is a library it didn't help much (although offered me a better understanding of debugging segfaults!).
For those looking due to the linux/segfault tag rather than ruby/watir, browser.close is a builtin function in the Watir package.
Edit:
Although it says 'Chrome', the issue actually comes from FireFox
I don't get the issue in any other browser
libxul.so is found in /usr/lib/firefox/
This was actually the result of a PC hardware issue that wasn't apparent till much later.

Installing Z-Wave Device Applications

I am curious about the Lab of Things and i've just started to learn it.
I am studying it in the network lab of my university. We have a z-wave controller stick, 2 on/off switch, 1 dimmer receiver and 1 sensor.
To set and run the platform, i followed the instructions in this link below:
http://www.lab-of-things.com/GettingStartedLoT_Beta1.pdf
While running the source code and adding a z-wave device, I faced an annoying problem here.
After adding the z-wave driver and running the code i saw 4 different device on the dashboard, it looks like below:
I tried to install these nodes and applications but apps are not installed. I think that's why i get an error message like below when i run the platform:
I searched on the internet for this error and i found a discussion like this error but i couldn't apply the solution. In this discussion they say that the applications (alerts, sensor, lights etc.) should be compiled seperately. I tried to do it but Visual Studio still gives the same error.
Here is the link of discussion that i found on the internet:
https://labofthings.codeplex.com/discussions/476781
All answers will be appreciated.
Thank you in advance.
I solved this problem by following these instructions which are written in this link:
https://labofthings.codeplex.com/discussions/476781
" For starters, it looks from the screenshot posted on stackoverflow that you have broken configuration at this point—the access control rules (in output\configs\config\rules.xml) have a reference to module Alerts but that module is not listed in output\configs\config\modules.xml
To fix the config, 1) run reset.bat, which will reset your configuration to default; or 2) fix it manually if you think you understand the semantics.
Then, make sure that the apps you want to use are compiled. Their binaries should show up in output\binaries\pipeline\addin\homeos.hub.apps.alerts.
Then, go through the setup process again, and things should work at this point in time.
A little more on this: we have confirmed that broken configuration will occur when app binaries are not found. We will post a bug fix soon, but for now, the remedy in my original response (reset, compile, then install device) should work. Let us know if you are still seeing issues. "
I hope this would be helpful for someone.

view layout rebol 3 not working

I've copied Rebol3 to my computer under windows. I am running it from the download not a full install, and it and seemed ok.
I tried using some very simple sample code for the GUI in the console and it fails with various error messages.
If I put in view [ and type enter it tells me its a syntax error (this works in reb/view 2).
Its a win 7 machine.
Version of Rebol3 is 2014-03-04 04:54
When I used help and typed the command what, view wasn't listed as a command.
Note the runtime support for the Rebol3 GUI dialect is not available in the "core" builds available at http://rebolsource.net.
Currently the GUI dialect is available in Linux/Android and Windows builds from Atronix Engineering:
http://atronixengineering.com/downloads.html
Or from Saphirion AG:
http://development.saphirion.com/rebol/saphir/
Note that the GUI behaviors in Rebol3 are similar to Rebol2's VID but has some differences, and is called R3-GUI. For a tutorial you might try Cross Platform App Development with Rebol 3 Saphir
Also notice that before invoking VIEW you will have to LOAD-GUI.
If I put in view [ and type enter it tells me its a syntax error (this works in reb/view 2).
The Rebol3 console is more basic than the Rebol2 console, and unfortunately doesn't support multi-line input at this time. You can only enter complete expressions before hitting enter, not partial ones. So hitting enter while there is still an unclosed bracket will give you an error. However if the code you're putting in is coming from the clipboard you can use do clipboard:// (via #GrahamChiu)
While Rebol3 currently lacks the behavior, it's encouraging that the Red console handles multi-line input in the Rebol2 way.
I am running it from the download not a full install
And the good thing is that you can run it from the download with no install. Because there is no install. :-)

Applescript "mixed credentials" error

I asked this question over on the Apple Communities and got a grand total of ZERO responses. You guys seem a whole lot smarter, so thought I would ask here to see what you think.
An error has started occuring when I attempt to trigger an Applescript via an external process. The console error is as follows:
12/09/2012 11:01:39.205 osascript[269]: Scripting addition loading restricted to system domains because this process has mixed credentials (issetugid=0 r/e uid=501/0 gid=20/20)
When I run the script locally on the Mac(Mini - Mountain Lion 10.8.1) it works perfectly.
What is happening is as follows.
I have a MacMini as a music server in a home automation environment powered by a Crestron processor. The MacMini is connected to two zones, one via the Optical output and another to a DAC from one of the USB ports. When I selected "Listen to iTunes" in one of the two zones the controller sends a command via UDP to a program running on the MacMini which triggers the scripts to change to the appropriate audio out.
All was working well until yesterday when all of a sudden the program triggering the script, whilst reporting that it has executed the correct script correctly, isn't switching the output and the above message is appearing on the console.
I have read what I can on here and as such have reset the PRAM and SMC (all three dongs...) and deleted the script triggering program, run Clean My Mac and rebooted, all to no avail.
Can anyone help me with this, it has to be something simple given that it was working...surely? I haven't run an update or changed anything else that I can think of.....
Any and all thoughts and input would be greatly appreciated.
Thanks
Marc
From the error it seems that you have an add-on to applescript called a "Scripting addition" installed, and that's causing the error. Most likely you do not need this add-on to perform your applescript code. So I would remove all scripting additions from my system and see if the applescript still works.
Search your system for scripting additions... ~/Library/ScriptingAdditions and /Library/ScriptingAdditions.
If you do need to do something that the scripting addition is doing for you, then there's probably other ways to perform the same task without the add-on.

Resources