command-line-interface

How can I start octave from the command line and not the GUI?

北慕城南 提交于 2020-04-07 17:14:10
问题 I recently installed GNU Octave on my Mac using Homebrew and as soon as I typed octave into bash, it opened up the octave-gui window. The Octave GUI looks quite unappealing (on a mac, at least) so I wanted to use the command line interface. My fix was to create a permanent alias in ~/.bash_profile which was alias octave='octave --no-gui' . Is there a more permanent fix to this? That is, how can I start using octave without invoking the GUI instead of the CLI? Is there a solution where I don't

Alsa cannot set sample format[FFMPEG]

百般思念 提交于 2020-04-06 03:34:58
问题 I am trying to capture a pcm stream from a Roland USB device with ffmpeg and wrap it with wav. The command line I am using is the following: ffmpeg -f alsa -acodec pcm_s32le -ac 2 -ar 48000 -i hw:2,0 out.wav Which comply with the settings of the hardware. I can also capture the stream with Audacity. The problem is that FFMPEG throws "cannot set sample format error" . Any idea of what may be happening and how I can fix this? Thanks in advance. FFMPEG OUTPUT user@user:~$ ffmpeg -f alsa -acodec

Alsa cannot set sample format[FFMPEG]

女生的网名这么多〃 提交于 2020-04-06 03:34:05
问题 I am trying to capture a pcm stream from a Roland USB device with ffmpeg and wrap it with wav. The command line I am using is the following: ffmpeg -f alsa -acodec pcm_s32le -ac 2 -ar 48000 -i hw:2,0 out.wav Which comply with the settings of the hardware. I can also capture the stream with Audacity. The problem is that FFMPEG throws "cannot set sample format error" . Any idea of what may be happening and how I can fix this? Thanks in advance. FFMPEG OUTPUT user@user:~$ ffmpeg -f alsa -acodec

coreapi action, No current document

ⅰ亾dé卋堺 提交于 2020-03-24 05:35:13
问题 I'm trying to post using coreapi and Django Rest Framework. I'm following this tutorial, which is based on the official one. Coreapi download the schema in a folder (PATH) which is not the current one, instead of logging some info as in the tutorial. $ coreapi get http://127.0.0.1:8000/schema/ <DownloadedFile 'PATH', open 'rb'> Then: $ coreapi action snippets list No current document. Use `coreapi get` to fetch a document first. And similarly I'm not able to post: $ coreapi credentials add

How to use GitLab function “Create Merge Request” from the bash shell? [duplicate]

只谈情不闲聊 提交于 2020-03-23 08:23:13
问题 This question already has answers here : How to create a GitLab merge request via command line (8 answers) Closed 2 years ago . I need to create a merge request from a forked GitLab repository into the original repository, while running a bash script. 回答1: Use the API An example merge request would look like this: curl --header "PRIVATE-TOKEN: " -X POST https://gitlab.example.com/api/v3/projects/project_id/merge_requests/?target_project_id=id_of_parent_project 来源: https://stackoverflow.com

How to launch command line Java code inside a JFrame?

本秂侑毒 提交于 2020-03-22 07:37:11
问题 I have a Java program which is executed through the basic command line interface. I am wondering about put it in a window JFrame. Is it possible? How can I do? Thank you. 回答1: If you want command line inside a jFrame I think it is not a good idea. If the JFrame is started that means the program is already started. You have to start the program using command line or running a executable jar file.So there is no meaning in what you are going to do. If you want to see your output inside a JFrame

Linux - change the hostname in the CLI

偶尔善良 提交于 2020-03-18 11:32:51
问题 I don't know how to search for this and that is why I asked for it (all my searches did not reveal any relevant information). I have a Fedora 18 server that looks like this: [root@dhcp-192-168-5-100 ~]# I want to change that to: [root@server1 ~]# Currently, this machine is set to get IP through DHCP, but that is not the IP address of the machine and that is why I need to change the CLI to something more relevant. Thank you 回答1: you can type "hostname HOSTNAME" where HOSTNAME is the new name

Linux - change the hostname in the CLI

夙愿已清 提交于 2020-03-18 11:32:05
问题 I don't know how to search for this and that is why I asked for it (all my searches did not reveal any relevant information). I have a Fedora 18 server that looks like this: [root@dhcp-192-168-5-100 ~]# I want to change that to: [root@server1 ~]# Currently, this machine is set to get IP through DHCP, but that is not the IP address of the machine and that is why I need to change the CLI to something more relevant. Thank you 回答1: you can type "hostname HOSTNAME" where HOSTNAME is the new name

How do I know the data type of the value of a given key?

大兔子大兔子 提交于 2020-03-17 09:51:46
问题 I can't seem to find useful information about Redis commands. I want to know the data type of the value of a given key. For instance to list all the keys of my database I run the following command: keys * In my setup, I get the following result: 1) "username:testuser:uid" 2) "uid:1:first" 3) "uid:1:email" 4) "uid:1:hash" 5) "global:next_uid" 6) "members:email" 7) "uid:1:username" 8) "uid:1:last" 9) "uid:1:salt" 10) "uid:1:access" 11) "uid:1:company" 12) "email:testuser@gmail.com:uid" 13) "uid

Python Click: NoSuchOption exception when manually attaching Option objects to Command instance using

。_饼干妹妹 提交于 2020-03-04 05:03:48
问题 My code sample: import click def std_cb(ctx, param, standardize): if standardize: opt = click.Option(param_decls=['-a'], help='this option only exists when -S is set') else: opt = click.Option(param_decls=['-b'], help='this option only exists when -S is not set') ctx.command.params.append(opt) return standardize @click.command() @click.option('-S', '--standardize/--no-standardize', is_eager=True, is_flag=True, default=False, callback=std_cb) def get_options(standardize, **extra_opts): print