I'm using GNU gdb (GDB) 7.10.1 with the -tui mode. I would like to add a key combination for the commands up and down. Something like Ctrl+u for up and Ctrl+d for down.
I've seen only comments about readline but not an example explaining how to integrate the combination in the gdb init file. Any idea?
I am not a TUI user, but my understanding is that the TUI has two modes.
In its initial (normal) mode, it uses readline like the ordinary gdb CLI. Readline provides a way to rebind keys via ~/.inputrc. The main thing you need to know here is that gdb is, sensibly enough, called "gdb" for readline's purposes. So a binding might look like:
$if gdb
"\C-u": "up\n"
$endif
The TUI also has a "single key" mode. As far as I know, this mode doesn't use readline and there is no way to rebind keys. However, in this mode, "u" and "d" are already bound the way you'd like.
Related
I have a customized in version of wish 8.6 shell with own environment loaded.
The issue is in native wish shell, short command work.
eg. packa r xxx for package require or stri e $str1 $str2 for string comparison.
But the same thing when i run in my customized shell, it says
invalid command name "packa"
But it works for the options for the command, as package re works for requiring the package.
What could be the possible cause, that wish is unable to resolve command name?
I know it it's bit difficult to answer for a customized shell but if someone could share probable causes based of logics, that would be of great help.
It sounds like you're not setting the global tcl_interactive to 1. That enables expansion of abbreviated command names as well as calling external programs without an explicit exec and a few other things (all of which is done in the unknown command handler procedure, or things it calls; if you want to customise things instead of working like tclsh does, look there).
Handling of unique prefixes of subcommand names is entirely separate.
I need to use the navigator.getUserMedia() function to use the webcam to take pictures on a windows application made with HTML5, and compiled on brackets-shell w/ cef3 (version 3.2171.1902).
Is this possible, or cef3 does not support webrtc at all?
I read online something about passing CEF command line arguments (--enable-media-stream) but I don't know where to put those commands...
Update:
I tried using nwjs instead of brackets-shell and it worked without any trouble.
http://nwjs.io/
There are two overrides available that allow you to manipulate the command lines of the child processes, they are CefBrowserProcessHandler::OnBeforeChildProcessLaunch and CefApp::OnBeforeCommandLineProcessing
There is a nice short discussion here: "How to pass additional command line arguments to subprocess".
We use OnBeforeCommandLineProcessing to set command line options that could have been set on the args in main(), but weren't. We use OnBeforeChildProcessLaunch to set arguments for child processes, such as command line arguments we did get in the arglist that we want propagated to our child processes. One of these should do what you want.
I have downloaded the MySQL Connector/C driver from the official website, the version that I believe is supposed to be released next to 5.6.
I then obviously wanted to use the library so I wrote a small application. During linkage, I however got a strange linker errors saying it cannot find the functions mysql_library_init() and mysql_library_end().
When I use a command to check for the functions inside the library, nm /usr/lib64/mysql/libmysqlclient.a > ~/Desktop/symbols, I indeed cannot find the functions the linker mentioned.
The functions I do find however are mysql_server_init and mysql_server_end, which are according to the documentation, marked as deprecated. (There are more functions in there too)
What am I doing wrong? I am using version 6.1.2 of the driver.
It seems like the problem is that the documentation is ahead of the code.
I am a DBA, not a C programmer, though I dabble in server internals. If the file include/mysql.h in the MySQL Server source files is any indication, the mysql_server_* functions are the ones you're looking for.
/*
mysql_server_init/end need to be called when using libmysqld or
libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
you don't need to call it explicitely; but you need to call
mysql_server_end() to free memory). The names are a bit misleading
(mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
names which suit well whether you're using libmysqld or libmysqlclient. We
intend to promote these aliases over the mysql_server* ones.
*/
#define mysql_library_init mysql_server_init
#define mysql_library_end mysql_server_end
"We intend to promote these aliases over the mysql_server* ones."
They promoted them in the documentation, apparently.
It looks like Bug #65887 was a report of the same problem, that they never really got around to doing anything with.
You might also find MariaDB's implementation of the C API "for MariaDB and MySQL" to be a viable and perhaps more agreeably-licensed alternative.
Imagine a 3-dim putty - a polyhedron which every facet is a putty shell.
A few Qs:
1. Is there already such a thing?
2. How can I easily implement a cube/polyhedron that rotates freely, so that on each facet - I can decide what to show (for example, a putty shell). I really don't want to dwell on the graphics part, unless I have to. So any easily prepared graphic would be nice, as long as it supports my requirement. Can openGL help me? JOGL? HTML5? (I don't mind it being in a browser)
Really weird question, not even sure it belongs here, but seems fun anyway...
Have a look here : http://www.jukie.net/bart/blog/popenRWE
So I'd say : start a bash instance with this variant of popen which handles both writes and reads, use the pipes for input and output, forward keyboard strokes to input, and render the output in OpenGL, probably in a rendertexture.
Repeat for each side...
Not html5 or jogl, though. Plain old C or C++.
Compiz's Desktop Cube and six fullscreen Xterms.
In the mysql client, \# rebuilds the completion hash for autocompleting your command, while \e opens editor $EDITOR to edit your command.
Is there any way of making use of the completion hash in the invoked editor (Vim in my case)?
Thanks.
You could try vim-addon-sql. I've never used it myself, but it seems like the kind of thing that you're looking for.