MPV player time format HH:MM:SS or HH:MM:SS:mmm - milliseconds

does anybody know, if it is possible to set default displayed time format including milliseconds in mpv.conf ?
Now I need click on time to switch to millisecnds, because option ,,timems'' from manual https://mpv.io/manual/master/ doesn't work.
Thanks for help
Peter

from window:
click the LEFT timestamp
from command:
mpv .. --script-opts=osc-timems=yes ..
or add in lua-settings/osc.conf:
timems=yes

mpv --osd-fractions --osd-level=2
or add to config
To toggle show - hide with keyboard, append to to input.conf:
o cycle-values osd-level 2 1
#^-- or any other key

yes, add the line osd-fractions to mpv.config. this will show milliseconds in the OSD (which will appear in mpv's terminal display).
if you want to see milliseconds in the OSC (in the video window), also add the line osd-level=2 to mpv.conf. this will add a status message with the OSD time display (which is now in milliseconds) to the top of the window.
Or you can click the time display on the video each time you load a video.

Related

Protractor sendKeys issue with scripted input fields

I'm automating e2e tests with Protractor on an angular app.
However, I have an issue when sending keys on input fields.
The sendKeys would miss few characters everytime so I found a workaround :
static sendKeys(value, element){
value.split('').forEach((c) => element.sendKeys(c));
}
This works well but it takes more than 3 times the time the original sendKeys function would.
Well no problem my tests are still functionnal right ?
My app now has new fields with scripts behind them.
One of them is a datepicker input, you can either choose from the datePicker or type it manually. However, for today's date you would type 09022018 and the slashes are automatically appended at the right place (like so 09/02/2018). If you were to enter a wrong date the field is cleared.
Now back to the problem : it seems that both my implementation of sendKeys and the original one loose focus after each submitted key. This means that I can't enter a valid date in the input field as it's cleared after each simulated keypress.
I could use browser.executeScript to fix it but I wouldn't be able to test the functionnality adding slashes. Also, as you type, the datepicker is still open and refreshes after each keypress, you can select a date from it at any time and that is also a feature I want to test.
Thanks in advance
Use executeScript to set the date in backgrond, then use sendKeys to enter a space or Tab at the end to trigger the Keyborad event which will check the input and format the input with slash
function enterDate(date) {
var script = 'arguments[0].value=arguments[1]';
// input box for date
var dateBox = element(by.xxx(yyy));
browser.executeScript(script, dateBox, date);
dateBox.sendKeys(" ");
// or try send Tab
dateBox.sendKeys(protractor.Key.TAB);
}
enterDate('09022018');
You can try this solution on other fields you fixed but take 3 more time.

Navigate to sql position

IntelliJ pro comes with an embedded SQL editor.
Sometimes, I type a wrong request and the database returns an error and the corresponding SQL position.
Example :
[2017-01-02 16:32:35] [42P01] ERROR: missing FROM-clause entry for table "customer"
Position : 516
Problem : for readability reasons, the request is written on multiple lines, making it harder to find the position 516.
Up to now, the only solution I got is to delete the \n characters in order to have the request on only one line then navigate to the 516th column.
But I guess there is a better way, like a fancy keyboard shortcut?
It's been a while you asked but I'll answer anyway to help others:
Download "Character Position" plug-in from here:
https://plugins.jetbrains.com/plugin/10334-character-position
Install plugin & Restart IntelliJ
Character position will be shown in the bottom-left corner of the editor.
In my case I press F2 and cursor go there.
The current caret position (line number and offset) is displayed in the Status Bar. You can click it to open the Go To Line dialog box.
Change the second number to the needed position of your character and will be navigated directly.

Calabash-android: How do I read text which comes from an API?

I want to read the text which comes from API end, When I query (query("*")) it does not appear on the calabash-android console.
wait_for_text(text, timeout: 10) does not work either.
query "all * marked'Email field can not be empty'"
Calabash doesn't return results that are not visible by default. So if the error message is on the screen but just invisible, using the all operator should do the trick.
In android two different message can show in edit text field by using hint text and error text
if its hint text use this:
query("* id:'edit_text_id'", :hint)
if its error message use this:
query("* id:'edit_text_id'", :error)
Normally these kind of text messages won't show by querying -> query("*")

UIDatePicker appears disabled when setting time programmatically

I have a UIDatePicker set for UIDatePickerModeTime. I am using the following code to set the time in my datePicker:
[self.oTimePicker setDate:dateFromString(self.oStartTime.text, #"HH:mm")];
[self.oTimePicker reloadInputViews];
which works but then the datePicker appears gray in color (see image below; it appears the datePicker is disabled), and sets the time to 06:00, no matter what is selected. Here is an image of the results; notice that I have picked 1:30 PM, but the text box shows 06:00; in addition, no matter what I select, nothing changes (the time displays what I pick (here 1:30 PM), but the value in the datePicker remains at 14:00 (but doesn't show 14:00 verified with NSLog), no matter what I select. Any ideas of what could be causing this?
It looks like you are having a time-zone issue with UIDatePicker. That is why it is showing one time in a UIDatePicker and another in your label (Washington has -7 time difference). There are lot of questions and answers about this topic (one example: iphone UIDatePicker showing wrong date in Central Timezone).
Another problem you are having is that UIDatePicker becomes disabled. This issue can be caused if you are setting datePicker.minimumDate to current date and using UIDatePickerModeTime.

Selenium waitForPopup with dynamic windowId?

When using Selenium how can I wait for a popup window if its id is dynamically generated?
For example:
selenium.click("link=mylink");
selenium.waitForPopUp("popup072815372337691199");
Obviously I cannot hardcode the window id in my source code. Any hints?
It would obviously be best to have a consistent or fully predictable window name, however if this is not possible you could try using the getAllWindowNames command to wait until the number of windows increments. If the name of the window is somewhat predictable (like a consistent prefix) you could then find out the full name of the new window before using waitForPopup or selectWindow.
do it this way....
'String href = selenium.getAttribute("link=myLink#herf");
selenium.openWindow(href, "myWindow");
selenium.selectWindow("myWindow");
selenium.click(...);
// do whatever
selenium.selectWindow(null); // go back to the previous window'