What I'm trying to do is run a program from my Windows/Mac flutter applications. Is there something similar to Process in java or the exec package in Go for Dart/Flutter?
The googling I have done has only led to descriptions of how to use the flutter command, and that is NOT what I am looking for.
In dart:io,
Process.run and Process.start, depending on the purpose of your program.
https://api.dart.dev/stable/2.17.3/dart-io/dart-io-library.html
Related
Just now starting to implement a command line interface utilizing the new System.Commandline package and using the approach of the SCL example project. Which I really like, thanks for that. The client more or less maps the console input to gRPC messages and should provide an interactive service interface utilizing the duplex capabilities gRPC brings. Since I do all the work implementing the gRPC interface for the console I would like to have a non interactive option beeing able to provide an option to automate all these commands within a script. I spend quite a while researching for options like pipe the stdin/out, C# REPL, determining if keyboard is available, overwriting IConsole, dotnet script CLI and finally writing cmdlets. To be honest I am not really happy with these options and I am wondering if I may missed something with System.Commandline? The requirement is simple: to provide a (typed) output/input to realize command chains within a script running in an MS Windows environment.
ros2 run micro_ros_setup create_firmware_ws.sh nuttx olimex-stm32-e407
Can someone please explain me this command line!
where will I get expalantions about the command lines? Documentation?
From above command line, I want to use esp32 or stm32f4 Board instead of olimex-stm32-e407, how to do that in working way?
Explanation
I am following tutorial for micro-ROS enter link description here. I want to use STM32F4 and ESP32 Board instead.
This follows the basic ros2 run format. To break it down ros2 run is simply used to run(not launch) an executable under the ros2 environment. It also takes the format of ros2 run <package> <executable>, so this means micro_ros_setup is the ros2 package it's searching and create_firmware_ws.sh is the executable. The next two arguments, nuttx olimex-stm32-e407, are just passed onto the bash script to be used internally. I'm not familiar with who released this ros2 package, however, using a shell script with ros2 run is not something that should be done and is bad design.
I was wondering if there is a way to get Bazel to list, output, display, etc., all of the commands that can be executed from a command line that are run during a build after a clean. I do not care if the output is to the screen, in a file, etc. I will massage it into a usable form if necessary.
I have captured the screen output during a run of Bazel which gives me an idea of what is being done, however it does not give me a command I can execute on the command line. The command would have to include all of the command options and not display variables.
If this is not possible, since Bazel is open source, where in the code is/are the lines that represent the commands to be run so that I can modify Bazel to output the executable commands.
I am aware of the query command within Bazel, and used it generate the dependency diagram. If this could be done as a query command it would be even better.
TLDR;
My goal is to build TensorFlow using Bazel on Windows. Yes I know of all of the problems and reasons NOT to do it and have successfully installed TensorFlow on Windows via a Virtual Machine or Docker. I did take a shot at building Bazel on Windows starting with Cygwin, but that started to get out of hand as I am use to installing with packages and Cygwin doesn't play nice with packages, so then I started trying to build Bazel by hand and that was turning into a quagmire. So I am now trying to just build TensorFlow by hand on Windows by duplicating what Bazel would do to build TensorFlow on Linux.
You are correct, you can use the -s (--subcommands) option:
bazel build -s //foo
See https://docs.bazel.build/versions/master/user-manual.html#flag--subcommands.
For your use case, you'd probably want to redirect the output to a file and then global replace any library/binary paths to the Windows equivalents.
You might want to track https://github.com/bazelbuild/bazel/issues/276 (Windows support), although it'll probably be a while.
(Disclaimer: This solution does not print the commands that currently get executed but the commands that would get or got executed.)
I'd use aquery (action graph query) (forget about "graph"):
bazel aquery //foo
Advantages:
It's very fast, because it prints the actions without executing the build.
It's a query. It does not have side effects.
You don't have to do a bazel clean before in order to find out the build steps for a library that has already been built.
It prints information about the specific build step that you request. It does not print all the build commands required for the dependencies.
I want to create QR codes for a project I'm working on in applescript the resulting qr will be placed in the indesign document. I have found that there is a plugin for indesign but I suspect that requires user interaction.
So I've been search for how to generate the qr using a shell command. I've found things related to php and rails and even coldfusion but none of those will fit the bill on this. I need to generate them using shell command so image events or perl basically anything I can run from the command line that comes with the mac os
thanks for your help.
antotheer
I wonder if I could call a url using curl or somthing to get one ?
For doing something similar, we use libqrencode.
It's a c library for generating QR codes, but it comes with a command line utility (called qrencode) which lets you generate QR codes from a string, e.g.:
./qrencode -o /tmp/foo.png "This is the input string"
It supports most options you'd probably want (e.g. error correction level, image size, etc.).
We've used it in production for a year or two, with no problems.
I've only run it on linux systems, but there's no reason you shouldn't be able to compile it on Mac OS, assuming you have a compiler and build tools installed (and any libraries it depends on of course).
As Riccardo Cossu mentioned please use homebrew:
brew install qrencode
qrencode -o so.png "http://stackoverflow.com"
I use Eclipse Helios for developing J2ME applications. I wanted to know if there was a way I could see the background/text-line commands that are executed for each click/action on the GUI (eg. Compile, Run, Creating a J2ME package). I am interested in it so I can run through the process using a script.
There is nothing specific that you can do to see all commands run in Eclipse. First, there is no one to one mapping between code being executed in Eclipse and java commands that you might run from the command line. So, even though you might be able to view individual commands in vim or Emacs, you won't be able to do this Eclipse.
However, there are some things that may help. There is a platform tracing facility that will print some trace messages to stdout. However, this is not widely used outside of core Eclipse projects so you won't be able to get full tracing on all commands. Also, this facility is not meant to be a general tracing facility, but really only for a few plugins that you are interested in. You can find more information about it here:
http://wiki.eclipse.org/FAQ_How_do_I_use_the_platform_debug_tracing_facility%3F
So, you will need to create a .options file in your Eclipse install directory with something like the following contents:
org.eclipse.platform/debug=true
org.eclipse.ui/debug=true
org.eclipse.core.runtime/debug=true
org.eclipse.core.resources/debug=true
org.eclipse.core.commands/debug=true
org.eclipse.core.filesystem/debug=true
org.eclipse.core.jobs/debug=true
These are a few of the low-level Eclipse plugins that will very likely contain some tracing information. However, without knowing more about what you are trying to do, it is hard to recommend specific plugins to trace.