Intellisense not working for packages with Ionide in VSCode - f#

I am just beginning with FSharp and am trying to work in VSCode on my mac. I've followed all the install instructions here https://github.com/dotnet/netcorecli-fsc/wiki/.NET-Core-SDK-1.0.1
However Inoide can't seem to pick up any of the packages I've added. Here is an example:
As you can see the plugin is running ok as I get type info but it won't pick up the package. Hovering on the red squiggly shows the error The namespace of module 'FsUnit' is not defined
I'm running dotnetcore 1.0.3 and inoide-fsharp 2.25.10

Related

VS Code-'dart' is not recognized as an internal or external command, operable program or batch file

I am trying to install flutter and run the basic flutter example on visual studio code . I used flutter doctor in the command line and installed all the missing requirements , now i try to run a basic program in flutter ,but in visual studio code output i get the following error
[Running] dart "c:\fluttercode\mobile_test1\lib\main.dart"
'dart' is not recognized as an internal or external command,
operable program or batch file.
[Done] exited with code=1 in 64.965 seconds
I could find only one question similar to this in stack overflow ,
Visual Studio Code: dart not found
they told to change environment variables ,i added the environment variables (however the name of the environment variables was not mentioned in the answer )
I checked the dart site in case they mentioned it ,but i couldn't find anything related to the name of the environment variable
This is what i got from dart site
Windows:
In Windows, setting your PATH and environment variables can be done by opening Control Panel and typing “Environment” and then clicking the “Edit the system environment variables” option. You’ll be presented with a list of environment variables including PATH where you can edit or add new ones.
Note: You should reboot your computer after making changes to PATH to ensure all processes (including explorer) are updated.
So i just did a guess and added an environment variable with the name FLUTTER_ROOT(cause i remember reading somewhere in one of the settings in VS Code for dart ,this name was used) and pointed it to my flutter bin directory
I restarted my PC and opened vs code and changed in VS Settings >user settings>dart and flutter>Dart:Env and updated my path
{
"files.autoSave": "afterDelay",
"dart.flutterSdkPath": "C:\\src\\flutter\\bin"
}
But i get the same error
this is how my flutter bin folder looks like
Environment variables in PATH after installing Dart
You don't have to install the dart SDK if you already have the flutter SDK installed. When you specify the path of flutter, VSCode only recognizes the flutter commands and not the dart commands. What you should do is change the system environment variables (type env in the windows search bar) and add the dart sdk inside the PATH variable. The dart sdk is usually found inside /bin/cache/dart/bin. This worked for me, so give it a try
Try to add the flutter\bin sdk path and also the windows\system32 path to the user variables and/or system variables.
I had the same problem. Here is how I resolved it.
Download and extract dart sdk (I used the stable release)
https://v1-dartlang-org.firebaseapp.com/install/archive
add the dart sdk bin folder to your path
after you have added it to your path run
flutter pub global activate webdev
now i can run
webdev serve
without error.
I'm using windows so I used choco install dart-sdk -<version> to install dart through the powershell in admin mode. That got rid of my error
Installing flutter is not enough. You need to install the dart sdk.
Pre-req: Make sure you have Chocolatey installed on your machine.
Run "choco install dart-sdk" from an elevated prompt.
Restart vscode.
That did it for me.
I went to the dart website and searched for the dart sdk.
i then chose the option to install dart using setup wizard.
After running the executable file on my laptop it took some time to download all the files but once the setup was complete the error no longer occurred and i was able to run the code successfully.
Downloading dart setup from dart website
Installing using setup wizard

How to install libraries/packages of Lua on Zerobrane Studio IDE

i have been using lua for torch in command like. where i used luarocks to install packages but now i have a need to debug some code. As suggested by the community "Zerobrane Studio" is a lightweight IDE for that purpose. i have installed it on ubuntu 14.04.
Now i want to install the same packages as the IDE has its own installation of lua. Packages are i.e "dp, dpnn, nn" but after some search i found out ZeroBranes Studio uses luadist package manager. i went onto luadist.org. and tried one of the ways which lets you download the package using lua. i ran this code in the IDE. but it didn't work.
Use LuaDist functionality from Lua.
$ ./lua
> local ld = require "dist"
> ld.install("luaexpat")
Please help!
It should be sufficient in most cases to set the package.path and package.cpath paths in your script to provide access to those modules you are using (whether those modules are from LuaDist, Luarocks or manually installed next to your application scripts).
ZeroBrane Studio provides luadist plugin that simplifies the integration with modules installed from LuaDist and allows management of those modules directly from the Local console in the IDE. This plugin will also set the paths for the script (when running/debugging from the IDE), so you don't need to make any changes to the script itself, but it's likely to work only for the modules installed into that instance of LuaDist.
You may also want to check this post on Lua package managers and their integration with ZeroBrane Studio.

How to reinstall Dart Editor

I've been trying Dart x64 for a month (under Windows 8).
Unfortunately, I've removed the "\Users\$user\AppData\Roaming\Pub\" folder. After that any Dart/Polymer project (including shipped samples like sunflower) stops showing anything in a browser without any error or exception.
I deleted the \dart folder, and some other dart folders that I'd found (\Users\$user\Application Data\Pub\, \Users\$user\.dartium\, \Users\$user\DartEditor\).
Then I'd reinstalled the Dart x64 (unpack zip-file), but problem still remains.
Then I'd removed Dart x64 and installed Dart ia32. In this case projects build with errors (can't find files from standard package), but work well in the Dartium browser.
I'd like to completely remove Dart and reinstall the new one. Can anyone help me start from scratch with Dart?
UPDATE:
I've deleted following Dart artifacts:
C:\Users\$user\dart\
C:\Users\$user\DartEditor\
"C:\Users\$user\Application Data.stagehand"
"C:\Users\$user\Application Data\Pub\"
C:\Users\$user.dartium\
C:\Users\$user\AppData\Local.dartServer\
But got the problem, described in the How to make Dart Editor find referenced packages thread.
So question still actual.

Install lejos eclipse windows 8.1 new project has errors

I was trying to install lejos on my laptop which has windows 8.1.
I downloaded eclipse 32bit.
I installed lejos plug in in eclipse.
I installed leJOS_EV3_0.9.0-beta_win32_setup.
Now i went to eclipse and created lejos nxt project. The problem that the project has red (!) and when i create a class it has error:
Description Resource Path Location Type
Unbound classpath container: 'org.lejos.nxt.ldt.LEJOS_LIBRARY_CONTAINER/nxt' in project 'test' test Build path Build Path Problem
What did i do wrong?
Ok after some more research I found a good video which explain how to install lejos on pc correct way. So after combining this video and eclipse install tutorial i was able to create class and run my first program.
Video: https://www.youtube.com/watch?v=hEFA0DdFhm8.
Tutorial: http://www.lejos.org/nxt/nxj/tutorial/Preliminaries/UsingEclipse.htm

OpenCV Install for Pydev in Eclipse using Macports on OsX Mavericks

I used the following tutorial to install macports and opencv:
http://www.jeffreythompson.org/blog/2012/09/21/installing-opencv-for-python-on-mac-lion/
It works in that after typing "python" I can call "import cv" without errors.
My first question: how do I get this to work with IDLE. I think the issue is via the terminal I'm using Python 2.7.5. IDLE is using Python 2.7.3. If this is the problem, what is the easiest way to fix this.
My second question: how do I get opencv to work in eclipse with pydev? I can't really find much helpful information. I have installed opencv via macports. But I can't get Eclipse to recognize that opencv has been installed. "Import cv" command says no module named cv exists.
I was struggling with this problem today. Here are the steps I followed using macports
Install macports and xcode
Follow Sam Khans post listed here to install python, relink it in your terminal and then install OpenCV:
http://samkhan13.wordpress.com/2012/06/18/using-opencv-with-python-on-your-mac-os-x/
NOTE: At this point you should be able to enter a terminal session and type "python" and then "import cv2" successfully.
Open eclipse and click on "eclipse" then "preferences" in the bar menu at the top of the program.
In the pop-up that appears click the arrow next to "pydev" to expand the menu then click "Interpreter - Python"
Press the "new" button on the right of the window
In the pop-up type in the name for this interpreter (I did python27 for my python2.7 version)
Next link the python executable for the desired version under the macports install tree "/opt/local/bin/pythonX.X" where X.X is your version (i.e. 2.7) and click ok.
A list of the available python libraries should populate. Select only those under the macport install tree (so we don't confuse our interpreter and cross list with another python build)
Finally click OK (which should automatically apply the changes).
The window will compile the interpreter and VOILA Python, Numpy and OpenCV working together through pydev in eclipse.

Resources