graphics – Parts of screen darker/image overlayed when watching youtube fullscreen, can be captured in screenshot

Here is a picture

Hi. Sometimes when watching videos, my screen will be darker in certain parts of it than others.
It often seems to pull in a dimmed copy of another program, tab (sometimes a different browser’s tabs, even), or it’ll just make up some random pattern if it can’t find anything. I don’t know what causes this, or what circumstances make it happen.

I do know that if I scroll down even a millimeter while fullscreen (when did youtube start letting you do that?) the pattern immediately goes away. When not fullscreen, sometimes the video will also have the dimming pattern but it will rapidly appear and disappear in a strobing effect, though this is much less common. After googling, I have tried turning hardware acceleration on and off with no change, though maybe there’s a specific setting related to hardware acceleration that I’m missing.

I am on Ubuntu 16.04.

EDIT: An example of someone else with my problem back in 2015. https://support.mozilla.org/en-US/questions/1057022

Sadly, they said it fixed itself, and I’m pretty sure I’ve seen it on both firefox and chrome.

api – Woocommerce custom script ajax post form data fails to be captured in backend

I am using woocommerce and I wanna customize admin page’s coupon section.

So I use the following code snippet such that I can write my own codes in my_script.js.

add_action('admin_enqueue_scripts', 'add_custom_js_file_to_admin');
function add_custom_js_file_to_admin($hook)
{
    $screen = get_current_screen();
    if ( 'shop_coupon' === $screen->id ) {
        wp_enqueue_script('my_script', plugin_dir_url(__FILE__) . 'js/my_script.js');
    }
}

I am successful to create a new custom field: Taxonomy as shown in the pic below. And ajax post request’s header indicates that the data should be sent correctly (the red box in the pic).
I am

However, my backend code snippet below fails to retrieve the data from the post request ( eg: $tax below is null):

add_action('woocommerce_coupon_options_save', 'save_coupon_text_field', 10, 2);
function save_coupon_text_field($post_id, $coupon)
    {
      $tax = $_POST('wc_sc_taxonomy_restrictions(0)(tax)');
      $coupon->update_meta_data('taxonomy_tax', $_POST('wc_sc_taxonomy_restrictions(0)(tax)'));
      $coupon->update_meta_data('taxonomy_op', $_POST('wc_sc_taxonomy_restrictions(0)(op)'));
      $coupon->save();
    }

I got 2 questions:

(1) Can someone kindly share any idea on what’s wrong with my codes above?

(2) In the custom script my_script.js, I wanna call an api which serves to retrieve data from my database; the data will then be used as the options available for the taxonomy’s drop-down select box. Can anyone tell me how I can do so in my_script.js?
Normally in my BE php file, I wrote sth like below, yet I don’t know how I can perform sth similar in my custom script:

 global $wpdb;
 $result = $wpdb->get_results('some sql here');

hacking – How can I trick programs to believe that a recorded video is what is captured from my mac book pro camera in realtime?

I would suggest installing OBS (Open Broadcaster Software) from this web site:

https://obsproject.com/

It allows you to create content in a variety of ways, including green screens, etc. In your case it is just a simply video you want playing.

Then install the OBS Virtual Cam device from here:

https://github.com/johnboiles/obs-mac-virtualcam

When installed you’ll have a VirtualCam option in the Tools menu in OBS, where you can start a virtual camera.

Finally in Google Meet select the virtual camera as your camera. Now the output from OBS is transmitted to meeting partners in Google Meet – and from OBS you can control whether the video is a pre-recorded file, your actual web camera, or something entirely else (like a still photo or similar).

portrait – autofocus shown in viewfinder and captured on actual pic is different

Focus (both auto and manual) can be surprisingly complex and errors are more noticeable at short distances and narrow depth of fields.

In addition to possible user error, there are a number of mechanical factors to be aware of. The one I want to concentrate on is Calibration.

Focusing is performed on a sensor that is not the same as the main image sensor that actually captures the picture. (Note that mirrorless cameras may differ). What this means, among other things, is that the focal distance used to focus may differ from that of the actual picture, resulting in a positive or negative offset from intended focus.

Your camera has an Auto Focus Fine Tuning adjustment that will allow you to add a small focus offset per lens to your camera. Your camera will remember by lens serial number as well as a possible general offset for all lenses if desired. There are many articles on do it yourself fine tuning such as Auto Focus Fine Tuning.

Alas, while useful, nothing is ever as simple as we wish. Ideally a single general calibration would correct the difference between the focus sensor and the image sensor, but the reason a per lens setting is provided is because of the mechanical errors added by the lens. Even worse is that the ideal lens offset value varies with lens settings and you can only enter a single value.

As an aside, Canon has supported 2 fine tuning values per lens for a couple of years now and Nikon just provided that capability in the new D750.

To give you an idea, here is a calibration run of a Nikon 18-55 kit lens at both 18mm and 55mm on a D7200.

18-55 at 18mm
18-55 at 18

18-55 at 55mm
18-55 at 55mm

As for the noise you see, ISO 1000 is probably a lot higher than you need with flash.

My general advice would be:

  • Focus on the eyes
  • Get the flash off of the camera

C++ unknown escape sequences on regex + groups captured by half

I’m trying to use the following regex

(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((?)(^s#)+)?)?((#)S*)?

on C++ like this:

#include <iostream>
#include <string>
#include <regex>

int main() {
    std::string str("rtsp://3333:1232@hellowebsite.com:2222");
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((?)(^s#)+)?)?((#)S*)?");
    std::smatch m;
    std::regex_search(str, m, r);
    std::cout << str << std::endl;
    for(auto v: m) std::cout << v << std::endl;
  }

To match rtsp or http URLs, but this is the output of compilation + running:

main.cpp:7:33: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                ^~
main.cpp:7:35: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                  ^~
main.cpp:7:43: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                          ^~
main.cpp:7:46: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                             ^~
main.cpp:7:60: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                                           ^~
main.cpp:7:62: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
    std::regex r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?...
                                                             ^~
main.cpp:7:88: warning: unknown escape sequence '/' (-Wunknown-escape-sequence)
  ...r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((...
                                                                             ^~
main.cpp:7:92: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
  ...r("(https?|rtsp)://(?:((^s@/)+?)(@))?((^s/:)+)(?:(:)((0-9)+))?(?:(/(^s?#)+)((...
                                                                                 ^~
main.cpp:7:105: warning: unknown escape sequence 's' (-Wunknown-escape-sequence)
  ...s#)+)?)?((#)S*)?");
     ^~
main.cpp:7:118: warning: unknown escape sequence 'S' (-Wunknown-escape-sequence)
  ...S*)?");
     ^~
10 warnings generated.
 ./main
rtsp://3333:1232@hellowebsite.com:2222
rtsp://3333:1232@helloweb
rtsp
3333:1232
helloweb

check here..

First of all, why I’m getting unknown escape sequences? \, s and etc are pretty known.

Most importantly, why do I get these unfinished groups? It works fine on regex online testers.

Modern Honeypot Network not captured my attacks

I have installed modern honeypot network (MHN) by pwnlandia successfully in ubuntu 16. On the attack report, it show an attack that come from others but not from mine. I’m using nmap to scan the opened port also tried to brute force ssh login using nmap too. However the attack report don’t show any data of my attacks.

Here is the picture of attack report:

enter image description here

Here is my port scanning using nmap which I expect to be shown in attack report:

enter image description here

Here is my brute force attempt to ssh which I expect to be shown in attack report too:

enter image description here