How can I open Scilab in my Windows console? - scilab

How can I open Scilab in my Windows console? I have it installed and I see it when I search in the search bar but I don't know how to run it inside my console. I would like to use it inside my integrated Visual Studio Code terminal.

I have no idea what Scilab is, never seen it, never used it. However as for the VScode terminal settings, this is a well-documented thing from Microsoft...
User and Workspace Settings
Integrated Terminal
... and has been covered before on Stackoverflow.
As per the accepted answer shows:
There is a way to make this happens with these steps by installing an
extension:
Find an extension called Shell launcher and install it. Reload VS Code
if you want or after you finished all steps.
Go to Files --> Preferences --> Settings and this will open
settings.json file and you then insert this (you can edit this to your
heart's content):
Code:
"shellLauncher.shells.windows": [
{
"shell": "C:\\Windows\\<sysnative>\\cmd.exe",
"label": "cmd"
},
{
"shell": "C:\\Windows\\<sysnative>\\WindowsPowerShell\\v1.0\\powershell.exe",
"label": "PowerShell"
},
{
"shell": "C:\\Program Files\\Git\\bin\\bash.exe",
"label": "Git bash"
},
{
"shell": "C:\\Windows\\<sysnative>\\bash.exe",
"label": "WSL Bash"
}
]
Update
I just took a look on Youtube for Scilab, and it has it's own completely stand-alone GUI console. You cannot run a GUI console in VScode, only terminal-like consoles, so, if it does have a cmd.exe -like, bash-like console, then the above approach applies.

Related

'flutterfire configure' command not working, I need to set firebase in my flutter project

I followed "https://firebase.flutter.dev/docs/overview" instruction to set firebase in my flutter project.
step i took:
"flutter pub add firebase_core" then dependencies were added, and generated_plugin_registrant.dart was created.
generated_plugin_registrant.dart file
2) "dart pub global activate flutterfire_cli" it showed an warnign message ie "Warning: Pub installs executables into C:\Users\Asus\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated flutterfire_cli 0.1.1+2."
then i added "C:\Users\Asus\AppData\Local\Pub\Cache\bin" in system; "path" environment variable.
"flutterfire configure" now it gives error "bash: flutterfire: command not found".
Step by step commands for getting flutterfire work in Mac:
dart pub global activate flutterfire_cli
export PATH="$PATH":"$HOME/.pub-cache/bin"
curl -sL https://firebase.tools | bash
firebase login
flutterfire configure
More details here
Windows Step-by-Step guide:
Open the Windows Search Bar, type in “env”, and choose “Edit the system environment variables”
Click the “Environment Variables…”
In System Variables box, search for "PATH" and double click on it
Click "New" and then paste the following line, replacing *USERNAME* with your Windows username
C:\Users\*USERNAME*\AppData\Local\Pub\Cache\bin
Click Ok and restart your IDE, then try flutterfire commands
I had the same problem. Following command worked for me (in Windows).
flutterfire.bat configure
I had same problem and I solved this by:
Added C:\Users\<username>\AppData\Local\Pub\Cache\bin to Environment Path.
Restarted IDE
Executed command: dart pub global activate flutterfire_cli
Here's a solution that worked for me:
From your terminal,open your bash profile in your home directory. Example home directory, Users/your-name/. I'm using macOS, so I typed typed the command sudo vim ~/.bash_profile from my home directory folder, followed by E to edit.
Scroll to the bottom of the file or below # Flutter ENV, on your keyboard, hit i to insert, then paste the following line, export PATH="$PATH":"$HOME/.pub-cache/bin". Press ESC, type ":wq!" then press Enter to save the changes and exit vim.
From the command line, reload your bash profile with source ~/.bash_profile. flutterfire configure should now work.
Hrishabh
This worked for me.
Close your IDE.
Restart IDE.
Re-run "flutter pub add firebase_core" in your terminal.
Finally run "dart pub global acttivate flutterfire_cli" in your terminal.
I had the same problem here is the way to solve it:
Warning: Pub installs executables into C:\Users\userName\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
Go the Windows searchbar and write var
Select modify system environment
Click on environment variables
On system variables click on Path
Click on Edit
On the modify the environment variable windows click on New
Copy paste C:\Users\userName\AppData\Local\Pub\Cache\bin
Close all the windows clicking on Ok
Restart Android Studio
Inside Android Studio terminal write this to check if succeed
dart pub global activate flutterfire_cli
You should have the following message:
The package flutterfire_cli is already activated at newest available version.
On windows, from flutter root folder, running 'flutterfire configure' I got the same error message.
The 'problem' was resolved when I removed the following lines from pubspec.yaml.
plugin:
platforms:
ios:
pluginClass: AppDelegate
(I added those lines in an attempt to create a "podfile" that is required in order to create a binary ios file. )
For me it required a little bit more work but this is what worked for me, I'm using Windows:
As mentioned already before I ran these steps:
1). Search for "Edit System Environment Variables"
2). Click on Environment Variables
3). Under System Variables, double click on "path."
4). Click on "New" and add C:\Users\USERNAME\AppData\Local\Pub\Cache\bin
5). Click OK and restart IDE
After restarting IDE I ran the following commands in the terminal and this time it worked
1). Firstly, flutter upgrade firebase_core
2). Then, I ran dart pub global activate flutterfire_cli again and this time when I ran flutterfire commands it worked.
For me it wasn't working in bash. When i switched over to the standard windows comand prompt it worked.

Vscode terminal not loading .zshrc on startup! How can I fix this?

I have code package installed my on Pop!_OS 21.10, and recently after opening the integrated terminal, I noticed that it does not load my .zshrc.
Here are my settings:
"terminal.integrated.defaultProfile.linux": "zsh",
Note: Everything works fine when I run source .zshrc after opening the integrated terminal, but it does not load the profile automatically. Anyone knows why?
The current version of VSCode may ignore your .zshrc in the following situation:
the option Terminal › Integrated › Shell Integration: Enabled (terminal.integrated.shellIntegration.enabled) is checked
the environment variable $ZDOTDIR is empty
Consider the comment and add the following line to your settings.json:
"terminal.integrated.profiles.osx": { "zsh": { "path": "/bin/zsh", "args": ["-l", "-i"] } }
(osx in the setting's name is for MacOS, linux is for Linux)
I have already defined ZDOTDIR variable incorrectly pointing to .cache in my .zshrc, which made code to look over there for my config file.
The problem is solved now by defining ZDOTDIR as my $HOME directory.
Update:
-- $HOME is the default so I just deleted my definition.

Run npm start in Atom Text Editor

In Atom text editor, after saving a file, I'd like to have a hotkey like ctrl-alt-b that will run "npm build" and display the results in an embedded terminal.
I'm also hoping that after seeing the terminal output, I'd be able to click anywhere outside that embedded terminal to make it go away, (instead of having to mouse-travel to some small exit button and click it).
It may be relevant to mention that my OS is Ubuntu 16.04.5.
I did find a really nice tool called the atom build package, but it seems to take over the whole build process, which is something I've already got setup via "npm build".
Setting up a hotkey is the trivial part, but you need some package that provides the actual build command. You can add something like the following to your Atom keymap:
'atom-workspace atom-text-editor:not([mini])':
'ctrl-alt-b': 'package-name:command-name'
Other than that, I recommend using a general purpose package like process-palette. It lets you define a command (or a chain of commands) and run it in your project directory at the press of a custom hotkey.

How to edit jupyter lab theme

As described in a previous question, it is now possible to edit the Jupyter Lab theme. However, this theme has a few issues for me personally. For example, it makes plot axes hard to read, since their default color is black. Other users have had similar problems. Consequently, I would like to fork the existing theme and make plot display cells a light grey colour. How does one do this?
I tried to find the corresponding .css file, but all I could find was /usr/local/share/jupyter/lab/themes/#jupyterlab/theme-dark-extension/. I understand that I could edit the index.css to achieve what I want, but how do I instead fork that theme and edit it? How do I let Jupyter Lab know about my custom theme?
First fork the Jupyter Lab project, then edit and commit your
changes.
Second, go to Jupyter Lab project and ask pull request.
if they like your project they will accept and put your changes on
their master branch
To expand on the answer from #Payam Khaninejad once you've forked the Jupyter Lab project you need to find the variables.css file and make your desired edits.
Then you can join the current (as of posting) issue on Github https://github.com/jupyterlab/jupyterlab/issues/3855 and get help to format your pull request to conform to the style used by the Jupyter Lab project. Info on contributing to the project here.
Here's a reply I wrote another question detailing the steps to make changes to the Jupyter Lab interface:
To edit Jupypter Lab themes you need to make changes to the file variables.css which is located in jupyterlab/packages/[THEME NAME]/style/
You can inspect the element of the Jupyter Lab that you'd like to change to find out its class. I used Chrome DevTools ctrl+shift+i and click on various div classes until I found the one I wanted to alter.
Once you have the name of the div class you'd like to customize, add the changes to the variables.css file. Here's what I changed and the result.
.jp-RenderedImage {
background-color: #A4A4A4
}
You can use this gist (where the code in the first cell comes from) created by one of the JupyterLab contributors to experiment with changes you made to the variables.css file.
we are using version 0.35.x ...
the following steps worked for me ... it will create a clone of the light theme, would install it in jupyter lab and you would be able to select that from settings menu. you can customize this theme, build it and have the effect in jupyter lab
install miniconda from here https://docs.conda.io/en/latest/miniconda.html (chose python3.7 one)
open Anaconda Terminal, [in windows goto search type Anaconda, select the terminal]
then run this conda create -n jupyterlab-ext -c conda-forge --override-channels nodejs jupyterlab cookiecutter git
clone jupyterlab from here https://github.com/jupyterlab/jupyterlab.git
switch branch with git checkout 0.35.x
then jlpm install
jlpm build
npm run create:theme
copy the theme folder to your chosen local theme folder for extension development. Replace tsconfig.json content with the following
{ "compilerOptions":
{ "declaration": true,
"lib": ["es2015", "dom"],
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noUnusedLocals": true,
"outDir": "lib",
"rootDir": "src",
"strict": true,
"strictNullChecks": false,
"target": "es2015",
"types": []
},
"include": ["src/*"]
}
[created by the steps here https://jupyterlab.readthedocs.io/en/stable/developer/xkcd_extension_tutorial.html#xkcd-extension-tutorial]
inside the theme folder ..
run the following commands jlpm install, jlpm run build , jlpm run build:webpack
open another conda terminal, there go to repo folder and run conda activate jupyterlab-ext then jupyter labextension install .
in a conda terminal conda activate jupyterlab-ext then, jupyter lab --watch
For version 1.0 , this cookie cutter could be used ... https://github.com/jupyterlab/theme-cookiecutter

Ionic framework - command 'grunt serve' returns 'multiple addresses available' and freezes

Used Yeoman ionic-generator
https://github.com/diegonetto/generator-ionic
Where I ran it without sass, default plugin list and blank.
And when running grunt serve I get the following:
Multiple addresses available.
Please select which address to use by entering its number from the list below:
1) 192.168.1.69 (en0)
2) localhost
Address Selection:
When I type 2 in terminal and return it just hangs there without going further or launching a browser.
I have tried also typing localhost or 'localhost' and returning, still nothing it just hangs...
I am so confused to why?
Any help on the matter would be most appreciated, thank you.
This morning i ran in the same problem as you did. I look into the Ionic serve code (.\node_modules\ionic\lib\ionic\serve.js) and compared it with another file, i didnt found any difference.
So instead using the "grunt serve" command i tried the "ionic serve" command. This script the didn't hang in the commandline so i could select an address. (in my case i selected 2 (the localhost)).
From this point it remembers the option you selected. so you can run "grunt serve" command again.
If the command "ionic serve" isn't working try to install ionic: "npm install -g ionic"
Edit the file ionic.config in: (Mac) ~/.ionic or (Win) c:/users/username/.ionic
add: "ionicServeAddress": "localhost" to the config file
It will choose local host automatically and then "grunt serve" will not ask you for an address.
I found the solution here: https://stackoverflow.com/a/26330536/2925856
The reason here is that Grunt Watch is running, it will block the terminal from other works so we cannot do anything when Grunt Watch is running. Maybe you can disconnect internet from the wifi and disconnect all Lan cable connect to your computer to make sure you only have one local ip address and run grunt serve. After that you can connect all these things again. Another solution is that it might need to set time out in serve.js in ionic lib to auto assign the selection for us or event remove the step of choosing Multiple IP Selection by auto assign to localhost.

Resources