Why am I not able to type anything on Arduino Ide 1.8.13 - arduino-ide

Hi, I am using the Arduino 1.8.13 ide, and I am unable to type anything into the sketch. The whole program is highlighted in blue, and I am unable to type anything. I have no idea what happened, and I really need help. I've tried downloading the app and redownloading, I tried changing the settings, nothing worked. Please help me.
Here's what works:
-Serial Monitor
-All the Settings Above
-Opening the Menus
-Uploading Code
-Saving
-Compressing
Basically, everything in the Arduino IDE works fine except being able to edit the code.
Thanks.

You likely have "Use external editor" enabled, which puts the Ardunio IDE's text-editor in read-only mode.
Go File > Preferences > Settings > [ ] Use external editor
Ensure it is unchecked.

Related

How to run c++ in vscode

I cannot for the life of me figure out how to run and debug a c++ file in vscode. There are always at least one or two things wrong.
I've already used the basic tutorials, but they don't seem to work for me.
Can someone explain it to me like I am 5 years old? Or point me in the direction of a place that will? I am totally burnt out and feel like a total dunce. I can't get a hello world program running and it is driving me crazy. Any help would be appreciated.
Is it on Windows or Linux ?
If on windows, first download and install the mingw setup. You can find it here :
https://sourceforge.net/projects/mingw/
After installation, add the location of th bin of g++ to PATH so that you can access it via the command line.
You can also add some extensions to your VS Code to make debugging C++ code easier, then in VS Code, open the terminal, and , while in the directory where you have your cpp file, simply do a g++ filename.cpp to compile, then run the executable, a.exe, unless otherwise specified in the previous command .
Hope this helps
Make sure that you have c++ compiler I prefer mingw.
Open vscode and go to Extensions or by keyboard shortcut ctrl + shift + x.
Search for .run and install
Search for C/C++ and install.
Go to settings ctrl + ,
By GUI
In the search bar, search for code runner and Code-runner: Run In Terminal will be unticked by default. You tick it and close settings tab. Refer the pic for better understanding.
Finally create a C++ file and save. Go to Terminal and select Run Build Task then click ctrl + alt + n to run the code. Again refer image for better understanding.
This should work, but if still didn't work let me know. Else refer any youtube video , you might have committed small mistake.
Let me know if this didn't work my dear 5 years old guy ;)

Lyx reconfiguration error on Mac and how to use .cls and .bst files on Lyx

Recently, the forward search on Lyx all of sudden stop working and the customized layout also stop working...
So, I try to reconfigure by clicking Tools - Reconfigure, but it says "The system reconfiguration has failed. Default textclass is used but LyX may not be able to work properly. Please reconfigure again if needed."
If I select customized document class then it says "Due to some error in it, the layout file: artticletheorem could not loaded. A default textclass with default layouts will be used. Lyx will not be able to produce correct output." I don't know what happened... It used to work well with no issue.
In addition, I would be very much appreciated if someone let me know how to use .cls file in lyx. It looks like I need .layout file, but how can I convert it? Also, I have .bst file for the reference style, but I have no idea how to use it in Lyx...

Prevent opening Visual Studio Code when click Show In Folder in Chrome

I've been googling and fighting this for a half a day already.
When I download something in Google Chrome I want to go to the folder with a file. But when I press 'Show in folder' a Visual Studio Code starts instead of my Thunar. How can I fix this?
Firefox opens folders ok but Chromium, Google-Chrome and Opera kicks of Visual Studio Code.
My system is Linux Mint Tara. I've already tried some things. Like added
[Default Applications]
inode/directory=Thunar.desktop
to /home/[user]/.config/mimeapps.list
Completely removed code.desktop from /usr/share/applications/mimeinfo.cache
Ran xdg-mime default Thunar.desktop inode/directory and the output of xdg-mime query default inode/directory is Thunar.desktop!!!
Even fully removed code.desktop from filesystem. Nothing worked!
Please help, this annoys me so much.
This is caused by MimeType=text/plain;inode/directory; which can be found in /usr/share/applications/code.desktop for what I can find.
What fixed it for me is changing this line to MimeType=text/plain; and removing code.desktop from /usr/share/applications/mimelist.cache
EDIT
A more permanent solution i've found is the following.
add inode/directory=org.gnome.Nautilus.desktop to the ~/.local/share/applications/mimeapps.list file.
After doing this make sure to the inode/directory entry is the same or not present at all in ~/.local/share/applications/mimelist.cache' and /usr/share/applications/mimelist.cache
org.gnome.Nautilus.desktop can be replaced by your preferred file explorer if you don't use Nautilus.
You might need to restart your desktop environment for the changes to apply.
The solution is simpler,
What happens is that the system orders the directory opening preferences.
Just go to the file manager > select a folder > right click > open with another application > select the file manager.
This will update the opening preferences for the directories.
Finally found! it. I had to delete
inode/directory; /usr/share/code/code --new-window %s; test=test -n "$DISPLAY"
line in the /etc/mailcap file. Bingo!
Chromium related browsers seems to not respect xdg settings on not full-fledged Desktop environments like i3wm which I use. Because the problem was not reproducible when I logged in with xfce4 session.

How do I solve 'Web Compiler found an error in compilerconfig.json'?

On trying to re-compile all files in a solution, using Visual Studio 2017, I get this uninformative error message:
Web Compiler found an error in compilerconfig.json
To begin with, there is more than one compilerconfig.json file in the solution.
Secondly, there is no indication whatsoever of what the error is, where it occurs (line number, for instance).
Any ideas how I can go about solving this?
In Visual Studio's Solution Explorer, right-click the compilerconfig.json file and click "Task Runner Explorer". In the left pane you will see "compilerconfig.json/all files", right-click on it and then click on "Run". You will see the details of the execution which, in my case, included the useful information about how to correct the error.
I was able to solve this issue for myself by using individual file compiling, instead of "All files".
I was getting a "Compiling successful!" message, but that didn't seem true because my compile file didn't contain my change. So here's what I did:
Open Window > Task Runner Explorer. In your left column, there is a task for "All Files". That's fine. Ignore it.
Compile your SCSS files individually. Do this by right clicking on each SCSS file in that list, and then Bindings > After Build. (Or add the task to whatever event you prefer. I chose After Build.)
Open any SCSS file in your project and add a test. I added something like #TEST2 {color: hotpink;} to my SCSS file.
Now when you save, your compiling takes a few seconds longer. Now open main.css and see if your change (#TEST2) exists in the file.
I just went through this and didn't find an easy way but I got past it.
My issue turns out to be a missing input file that was supposed to be compiled.
Method of attack:
Try to compile each compilerconfig.json file (right-click -> Web Compiler -> re-compile all files)
repeat until you find the file in question
Remove all data from this file and add entries in one at a time (or scan it to make sure your files are there, which ever fits your situation)
The root problem is that the Web Compiler didn't install successfully. I had the same problem as described in the other answers and went down a rabbit hole to figure out why I couldn't compile. Turns out I had to help the tool install itself. See this comment for details:
https://github.com/madskristensen/WebCompiler/issues/390#issuecomment-475427735
Once I did the steps listed in that comment, I able to both compile files again and was explicitly told by the tool which line of my SCSS had an error.
For an information:
I got the same error in VS2019 webcompiler. And I found a solution ie;
Project should be open as a "Web Site".
Do not open as a folder. This simple thing is solved my issue.

How to stop opening files in browser upon save

I'm using Sublime Text 2 (which I love). I have it set to auto-save upon lost focus, to it automatically saves. Somehow, however, I've done something such that when it saves, it opens in a browser. This must be some build function that's getting triggered, but I don't know where to look for it. I looked for a BuildOnSave package in the installed packages, but I didn't see anything remotely related to 'Save' or 'Build', etc.
Does anyone have any ideas of where to look? I don't really want to have to revert to pristine state and then have to re-install my plugins as this us pretty darn annoying.
My currently installed packages are below, if it helps.
"installed_packages":
[
"AMD Module Editor",
"CoffeeScript",
"Dayle Rees Color Schemes",
"Emmet",
"Emmet Css Snippets",
"Git",
"Gitignore",
"JSLint",
"LESS",
"Markdown Preview",
"Package Control",
"SublimeLinter"
],
Thanks,
Scott
Try disabling Markdown Preview, as it looks like it could be the culprit. It has some built-in build systems, and you likely somehow activated a "build on save" feature. None of the other packages (that I'm aware of) have similar functionality that would give the symptoms you're seeing.
To deactivate, select Preferences -> Browse Packages... to open a file browser window of the Sublime Text 2 Packages directory. Move (don't copy) the Packages/Markdown Preview directory to someplace else, like your Desktop, for now. Quit and restart ST2, and see if the issue persists. If not, this plugin was at fault, and you can start poking around in its settings (after moving it back to the Packages folder) to see where the error is. One place to look is in Tools -> Build System and deselect Markdown.
Good luck!