Is it possible to execute arbitrary javascript in IE Devtools? - ie11-developer-tools

Trying to troubleshoot something that of course only happens in IE, but I can't seem to get it to allow me to execute any code in the JS console. Is there some magic keypress that turns that function on?

If it is a single line of code, hitting [Enter] should execute the command.
If you paste in multiple lines of code, your editor will get set to Multi-line mode. In order to execute script you will then have to press [Ctrl]+[Enter]
You could also always click the green arrow to the right of the text field to execute the script.

Related

Sublime Text 3 toggle on/of side bar shortcut

I want to have a shortcut for showing/hiding the side menu, because I mainly use sublime on a flipped monitor.
I tried this but it doesn't work...
[
{"keys": ["ctrl+alt+q"], "command": "show_side_bar"}
]
t
The command is actually toggle_side_bar.
This can be discovered for any command or action by opening the console (Ctrl`) and running
sublime.log_commands(True)
Run whichever commands you wish, and the command names along with any runtime parameters will show up in the console. When you're done, it's usually a good idea to run
sublime.log_commands(False)
to avoid your console filling up with nonsense, such as every single key you press.
By the way, there already is a keyboard shortcut for showing and hiding the side bar: CtrlK,CtrlB. That means hit CtrlK, release them, then hit CtrlB.

Open a command in a new window

Im trying to execute :YcmComplete GoToDefinition in a new window, but I can't figure out how to execute a vim command in a new window, any pointers?
When I use split that doesn't work because that is for splitting a window and opening a document, not executing the output of a jump command etc. to a new window.
essentially im binding it to a key so that when i do it, it opens in a new window, so i dont have to jump back and forth, then when i see it and get it, i can just c and be exactly where i was.
I'm not sure to understand what you mean because you discarded the possibility of using :split... I would simply do like this:
:split|YcmComplete GoToDefinition
Then you can type Ctrl-WCtrl-W to go back to the window where you were (or Ctrl-WC to close the new window).

Recall previous command in the RubyMine console

In the RubyMine consoles, like the one that appears in RubyMine 7 while debugging, how do you recall the previous command or line you typed? Something similar to pressing the up arrow in a conventional terminal or console.
The history of commands can be accessed similar to any conventional terminal or console :- using the up and down arrows to scroll through the history.
The commands history size limit can be specified in : File|Settings|Editor - "Console commands history size"
Scrolling through console history with the up key in any command line environment can be pretty tedious. option-command-E, can show you your entire commands history.
Looking into RubyMine 7.0 Doc
https://www.jetbrains.com/ruby/webhelp/using-consoles.html
In an interactive console, you can:
Type commands in the lower pane of the console, and press Enter to
execute them.
Results are displayed in the upper pane. Use basic code completion
Ctrl+Space.
Use Up and Down arrow keys to scroll through the history of
commands, and execute the required ones.
Load source code fom the editor into console.
Use context menu of the upper pane to copy all output to the
clipboard, compare with the current contents of the clipboard, or
remove all output from the console.
Use the toolbar buttons to control your session in the console.
Configure color scheme of the console to meet your preferences.
Refer to the section Configuring Color Scheme for Consoles for
details.

Run Selection in MATLAB from Linux Command Line

I am running an SSH into a linux computer. The MATLAB GUI can be very slow and unresponsive. Is there a way I can use MATLAB in command line mode so that I can highlight part of my code and run that section? In GUI, it is possible to do this in the Editor window by right clicking and choosing 'Run Selection' or by pressing F9. In command line mode, I only know how to run the entire script.
In a similar vein, can I run a section of the code (the 'Run and Advance' button in the GUI) using command line?
Also, is it possible to see the workspace (like the Workspace window in the GUI version) from the command line?
AFAIK there is a no-desktop mode in MATLAB, which you can access by running it with -nodesktop parameter, this should provide you with what you need. You can find more info on official MATLAB pages
As Niemand said you can start MATLAB with the flag -nodesktop.
You won't be able to select and run a potion of code with -nodesktop. You could just put that chunk of code in a separate function or script and call that.
If you're doing a lot of work without the GUI I would recommend looking at http://matlab-emacs.sourceforge.net. This is a MATLAB mode for Emacs that provides many of the same functionalities as the MATLAB desktop.
Lastly check out who and whos to see the workspace variables.

Ocaml Graphics.open_graph won't work in script mode

I'm trying to use the ocaml graphics module.
The line:
#Graphics.open_graph "";;
works fine in the interactive module, i.e. a small window pop up in X11 with white background.
However, when I try to use the script mode -- put this line in a file then compile it:
ocamlc -o a.out graphics.cma code.ml
only X11 starts but with no window popup.
Am using a mac. Anyone knows why? Thanks.
Followup:
It seems under script mode the popup window will closeup immediately after code execution. Because if I compile using XTerminal, I can see a small window popup but then closes.
I managed to keep the window open by adding an infinit loop at the bottom:
while true do () done;;
But still don't understand how things really work. Please help. Thanks.
All ressources are freed when the script terminates: memory, file descriptors, including the X window.
If you add an infinite loop, the script does not terminates, and the windows stays open.
Likewise, under the toplevel, the window stays open as long as you don't close the toplevel.
I would suggest to add two lines add the end of your script:
print "press enter to exit"
read one line from keyboard input
This way the script will not terminate until the user presses enter.
Indeed, as jrouquie explains you need to delay the termination of your program. The way I personally do that is by waiting on user input. At the end of the interactive program (or function being studied that opens the graphic mode), I put:
ignore (Graphics.read_key ())
This will wait until a key has been hit on the keyboard, and ignore the key value before returning.

Resources