How to set the playback speed in MPV through the command line - mpv

How would you set the playback speed to a specific value in MPV using the builtin command line of MPV?
EDIT: I'm not talking about the --speed argument when launching the program through the terminal.

On the manual it is documented as mpv --speed=1.2
ex: change 1.2 to 1.4
Sorry just saw the edit...

Related

raku REPL appears unresponsive on `cygwin` under WIndows 8

I have cygwin under Windows 8 and I've installed and run raku which I understand to be just Perl6.
I wanted to print some strings and numbers but say doesn't do the job (please see the black snippet below) it just do nothing unlike it is described here:
hynek0#hynek /cygdrive/c/Users/hynek0/Desktop/FU
$ raku --version
This is Rakudo version 2020.05.1 built on MoarVM version 2020.05
implementing Raku 6.d.
EDIT 2
EDIT 3
This is probably the same bug as reported with https://github.com/rakudo/rakudo/issues/4378 . It looks like Raku thinks there's nobody behind the keyboard ($*IN.t returning False) and thus switches to slurping the program to execute from STDIN.
At this point, I can only see a workaround: execute you example code with raku -e.

VLC Windows Command Line

I'm currently trying to make a script that loop over 4 videos, lets say video1.avi to video4.avi.
And when I have an intervention I would like to stop the loop and to play video2.avi, then at the end, take back the loop.
I'd like to know if there is a way to do this with VLC and command line param.
Here is the command line I wrote, but it seem to keep the hand ...
vlc.exe --started-from-file --repeat --playlist-enqueue --fullscreen
video1.avi video2.avi video3.avi video4.avi
Thanks

Emacs shell or terminal escape characters in compilation buffer for rails tests

I have my emacs set up so that colors in shell buffers work great. I also use the compile command to run individual test files in my ruby on rails environment But when I do that, the ror test functionality puts lots of shell/terminal escape characters into my compilation buffer. Is there any way to get that stuff to display in terminal colors?
BTW: I searched around and tried some things, but they didn't work.
Thanks!
Here's what I have in my .emacs file now. It does not work until the end, but that's OK.
;; This stuff is to ansi-colorize the compilation buffer after a rails test so the terminal colors come through.
(define-derived-mode ansi-compilation-mode compilation-mode "ansi compilation"
"Compilation mode that understands ansi colors."
(require 'ansi-color)
(toggle-read-only 0)
(ansi-color-apply-on-region (point-min) (point-max)))
(defun colorize-compilation (one two)
"ansi colorize the compilation buffer."
(ansi-compilation-mode))
(setq compilation-finish-function 'colorize-compilation)
EDIT
I have switched from using the compile mode to using an async shell command. Here's the code:
(defun run-it ()
"Run it on the current file."
(interactive)
(save-buffer)
(shell-command
(format "my_command %s &"
(shell-quote-argument (buffer-name)))))
(global-set-key "\C-ct" 'run-it)
It saves the buffer first. The & makes it actually interactive so I can enter text in the buffer and the command will get that input. And it colors the command output on the fly, which my compile buffer was not doing.
Backing the comment by Alex Vorobiev, which delivered the answer.
Seems you've put a comint-mode aside and with that the ansi-color-process-output filter.
AFAIU fontifying is done on a per-buffer-base, run from an idle-timer resp. triggered by buffer-changes. If enabled in a output-shell, Emacs might hang, as a lot of changes may occur in short time. Therefor fontification is commonly off here. An alternative approach: M-x MY-MODE at the shell-buffer. Which might need some reset to shell environment or re-start then.

Tomcat6 Service Setup; programatically concatenate JvmOptions using Batch File

This may bit a bit of a basic question, but I can't seem to find an answer on the web. I'm trying to automatically set up tomcat as a service through a batch file.
My batch file currently looks like this:
set memSize=512
set jvmOptions="-XX:MaxPermSize=512M"
ECHO Setting up tomcat as a service.
call service.bat install
ECHO Setting the memory allocation to a maximum of %memSize%
ECHO Using JVM options %jvmOptions%
Tomcat6 //US// --JvmMx=%memSize% --Startup="auto" --JvmOptions=%jvmOptions%
The issue I'm facing is that running the --JvmOptions switch overwrites all the current java options that are set in the tomcat6w.exe.
So my question is, does anyone know how to have the --JvmOptions switch concatenate the passed value to the end of the current value?
Thanks in advance
Could it be as simple as this (if I understand your question correctly)
set memSize=512
REM I removed the quotes and reused the variable in its own definition
set jvmOptions=%jvmOptions%-XX:MaxPermSize=512M
ECHO Setting up tomcat as a service.
call service.bat install
ECHO Setting the memory allocation to a maximum of %memSize%
ECHO Using JVM options %jvmOptions%
REM Added the quotes back here
Tomcat6 //US// --JvmMx=%memSize% --Startup="auto" --JvmOptions="%jvmOptions%"
After a long hard search I did manage to find the answer in a code example. But then to make me feel very foolish I noticed that the answer was also here right under my nose on the Tomcat6 Windows Service How To page. By replacing the -- with ++ the option is concatenated rather than replacing the original.
So the batch file became.
set memSize=512
set jvmOptions="-XX:MaxPermSize=512M"
ECHO Setting up tomcat as a service.
call service.bat install
ECHO Setting the memory allocation to a maximum of %memSize%
ECHO Using JVM options %jvmOptions%
Tomcat6 //US// --JvmMx=%memSize% --Startup="auto" ++JvmOptions=%jvmOptions%
Thanks.
A bit of an old post, but I have to do a bunch of Tomcat uninstalls/installs due another application being upgraded (a term I use loosely) and was trying to figure out how to do something similar to avoid using the UI and ensure consistency.
Some scripting tips (based on my experience so far):
REM -- Use variables for the Tomcat install directory & executable:
set TomcatDir=%ProgramFiles%\Tomcat
set TomcatExe=%TomcatDir%\bin\Tomcat7.exe
REM -- If using multiple instances, turn these in to array
set TomcatInstance[1]=Tomcat7
set TomcatInstance[2]=MyAppInstance1
set TomcatInstance[3]=MyAppInstance2
set TomcatInstance[4]=MyAppInstance3
set TomcatInstance[5]=MyAppInstance4
REM -- When updating/adding Java options and you need to use a ";" between
REM -- values, single-quote the semi-colon, ';' so it isn't intepretted as a CrLf
REM -- For example,
call "%TomcatExe%" //US/%TomcatInstance% ++JvmOptions "-Djava.library.path=%TomcatDir%\bin';'%TomcatDir%\endorsed"
REM -- So to ensure all instances have the same settings...
for /L %I in (1,1,5) do (
call "%TomcatExe%" //US/!TomcatInstance[%I]! ++JvmOptions "-Djava.library.path=%TomcatDir%\bin';'%TomcatDir%\endorsed"
)
REM -- Block scripts sections with setlocal/endlocal
REM -- "EnableDelayedExpansion" allows the above delayed variable expansion to occur
::--==--==--==--==--==--==--==--==--==--==
:Routine_Name
::--==--==--==--==--==--==--==--==--==--==
setlocal EnableDelayedExpansion
echo script commands go here
endlocal
goto :EOF
Note: This would be much easier in an actual scripting language (vbs, js or ps), but I need to leave the script "easy" to modify for whomever takes over for me when I leave my current gig.
FWIW, the how to doc for Tomcat7 is http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html.

Using pfccomp or pint to run Pascal-FC programs

I'm using the Pascal FC implementation for Windows Vista found on http://www-users.cs.york.ac.uk/burns/pf.html
I'm trying to run the dining philophers problem found on the link but I don't get how to make the compiler work.
Screenshot
In the screen shot, the program appears to be waiting for you to enter the name of the file to use for the compiler output. Enter a file name.
Better yet, use the pfc.bat command and let it choose the output names for you. The batch file will also run the program automatically after it has been compiled. At the command prompt, run the command like this:
C:\pascalfc-vista> pfc philchan.pas

Resources