probability – Why is the conditional expectation failed case written this way?

This is my first post and I apologize in advance if I’m not using the right formatting/approach.

Problem

A coin, having probability p of landing heads, is continually flipped until at least one head and one tail have been flipped.

Find the expected number of flips needed.

typical examples: “HT”, X = 2; “TTTTH”, X = 5.

Solution Begin

Denote X: # of flips needed. Y: outcome of 1st flip.

$E(X) = E(X|Y = H)P(Y = H) + E(X|Y = T)P(Y = T)$

$E(X|Y = H) = 1 + $E(additionalflips needed)$ = 1 + 1/(1-p)$

Question

This is regarding $$1 + 1/(1-p)$$

I understand that 1 is for the failed trial but why is the 1/(1-p) there? Given the conditional probability/expectation, I thought the denominator would be the P(Y=H) which is p. I just don’t understand the overall reason for 1/(1-p). Could someone help me understand or point me in the right direction?

8 – Imagemagick error convert delegate failed `’cwebp’

i’m following this guide

I’ve installed Imagemagick, run

composer require drupal/imagemagick
drush en -y imagemagick

and all next steps.

After add convert to WEBP to specific image style, receive this error:

ImageMagick error 1: convert: delegate failed `'cwebp' -quiet -q %Q '%i' -o '%o'' @ error/delegate.c/InvokeDelegate/1919. [command: /Applications/MAMP/bin/apache2/bin/convert '/Applications/MAMP/htdocs/mysite/sites/default/files/2020-10/image.png' -resize 406x376! -crop 336x376+35+0! -quality 70 WEBP:'/Applications/MAMP/htdocs/mysite/sites/default/files/styles/image_336x376/public/2020-10/image.png.webp']

But if run this command in my Terminal:

/Applications/MAMP/bin/apache2/bin/convert '/Applications/MAMP/htdocs/mysite/sites/default/files/2020-10/image.png' -resize 406x376! -crop 336x376+35+0! -quality 70 WEBP:'/Applications/MAMP/htdocs/mysite/sites/default/files/styles/image_336x376/public/2020-10/image.png.webp'

convert correctly

My OS is Macos Catalina 10.15.7, i’ve installed yet webp with homebrew

selenium webdriver – ” Failed to find Chrome binary.” in system spec gitlab-ci

Thanks in advance.

Context:

In my gitlab CI, I run a system spec using RSpec and Selenium. The test runs well locally but throw the following error in gitlab CI

Failure/Error: driven_by :selenium, using: :chrome
     Webdrivers::BrowserNotFound:
       Failed to find Chrome binary.
     # ./spec/rails_helper.rb:35:in `block (2 levels) in '

Could anyone kindly advise me how to fix this error ?


Here is my .gitlab-ci.yml

image: "ruby:2.7.1-buster"

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - vendor/bundle
    - .bundle
    - node_modules/
    - .yarn

stages:
  - build
  - test

variables:
  POSTGRES_HOST: xxxx
  POSTGRES_USER: xxxx
  POSTGRES_DB: xxxx
  POSTGRES_PASSWORD: xxxx

before_script:
  - gem install bundler
  - bundle install -j $(nproc) --deployment

job_0_build:
  stage: build
  script:
    - ruby -v

job_3_tests:
  stage: test
  cache:
    paths:
    - node_modules/
    - .yarn
  services:
    - postgres:12.1
  before_script:
    - apt-get update -qq && apt-get install -y -qq nodejs
    - curl -o- -L https://yarnpkg.com/install.sh | bash
    - export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
    - yarn install --cache-folder .yarn
    - yarn --version
    - gem install bundler
    - bundle install -j $(nproc) --deployment
  script:
    - bundle exec rake assets:precompile RAILS_ENV=test
    - bundle exec rspec

Here is an extraction of my Gemfile.lock on (I think) relevant gems, I can provide others if you find useful

    selenium-webdriver (3.142.7)
      childprocess (>= 0.5, < 4.0)
      rubyzip (>= 1.2.2)
    chromedriver-helper (2.1.1)
      archive-zip (~> 0.10)
      nokogiri (~> 1.8)
    capybara (3.33.0)
      addressable
      mini_mime (>= 0.1.3)
      nokogiri (~> 1.8)
      rack (>= 1.6.0)
      rack-test (>= 0.6.3)
      regexp_parser (~> 1.5)
      xpath (~> 3.2)
    webdrivers (4.4.1)
      nokogiri (~> 1.6)
      rubyzip (>= 1.3.0)
      selenium-webdriver (>= 3.0, < 4.0)

ssl – HAPROXY : PR – TLS termination failed

I’m posting here, because I’m trying to setting up HAProxy as reverse-proxy with SSL/TLS termination and I have the following error in logs :

Oct 17 11:57:30 localhost haproxy[2789]: xxx.xxx.xxx.xxx:63697 [17/Oct/2020:11:57:30.497] www-https www-https/<NOSRV> -1/-1/-1/-1/0 400 188 - - PR-- 1/1/0/0/0 0/0 "<BADREQ>"

And I don’t understand why HAProxy is blocking the request .

Could you help me ?

This my haproxy.cfg :

global
        log /dev/log    local0
        log /dev/log    local1 notice
        chroot /var/lib/haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
        stats timeout 5s
        user haproxy
        group haproxy
        daemon

        tune.ssl.default-dh-param 4096

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        option forwardfor
        option http_proxy
        timeout connect 5000
        timeout client  50000
        timeout server  5000 
        stats enable
        stats hide-version
        stats refresh 5s
        stats uri /hastats



frontend www-http
        bind *:80
        reqadd X-Forwarded-Proto: http
        default_backend www-backend

        # Test URI to see if its a letsencrypt request
        acl letsencrypt-acl path_beg /.well-known/acme-challenge/
        use_backend letsencrypt-backend if letsencrypt-acl


frontend www-https
        bind *:8000-9000 crt /etc/haproxy/certs/www.example.com.pem
        bind *:443 crt /etc/haproxy/certs/www.example.com.pem
        reqadd X-Forwarded-Proto: https
        default_backend www-backend


backend www-backend
        mode http
        http-request set-header X-Forwarded-For %[src]
        reqadd X-Forwarded-Proto: https
        option http-server-close
        balance roundrobin
        redirect scheme https if !{ ssl_fc }
        server web1 xxx.xxx.xxx.101:80 check
        server web2 xxx.xxx.xxx.102:80 check

backend letsencrypt-backend
        server letsencrypt 127.0.0.1:8080

Windows 10 Backup Failed: Error code 0x81000019

The error message says,

A shadow copy could not be created. Please check “VSS” and “SPP” application event logs for more information.

Details: the writer experienced a non-transient error. If the backup process is retried, the error is likely to reoccur.

I have written a system image to my external drive once but this process has never completed.

I’m backing up to an 8TB (Windows says 7.28 TB) WD MyBook that currently has 5.98 TB free. (The only thing on it is the system image I wrote to it as soon as I bought it a week ago.) In “Manage Windows Backup disk space,” it reports the following:

Data file backup: 0 bytes
System image: 1.25 TB
Other Files: 50.32 GB
Free space: 5.98 TB
Total size: 7.28 TB

In Event Viewer, there are two seemingly related errors.

Windows Backup
Level: Error
Event ID: 4100
Backup did not complete successfully because a shadow copy could not be created. Free up disk space on the drive that you are backing up by deleting unnecessary files and then try again.
EventData:
A shadow copy could not be created. Please check “VSS” and “SPP” application event logs for more information. (0x81000019)
19000081980500004409000060090000420ED1665C2BEE174B64529CB14610EA71000000

SPP
Level: Error
Event ID: 16387
Writer ASR Writer experienced some error during snapshot creation. More info: System partition (partition marked “active”) is hidden or contains an unrecognized file system. Backup does not support this configuration. (0x80042416).
EventData:
ASR Writer
System partition (partition marked “active”) is hidden or contains an unrecognized file system. Backup does not support this configuration. (0x80042416)
The writer experienced a non-transient error. If the backup process is retried, the error is likely to reoccur. (0x800423F4)
System partition (partition marked “active”) is hidden or contains an unrecognized file system. Backup does not support this configuration. (0x80042416)
01000000C6120000A71200000000000042BEB7C511CAC619E59C92030000000000000000

System details:
OS: Windows 10 Home 64-bit (Version 10.0.18363 Build 18363)
CPU: Intel Core i5 @ 3.20GHz
RAM: 16.0GB
Motherboard: Gigabyte Technology Co. Ltd. H97-D3H-CF (SOCKET 0)
Graphics:
ROG PG248Q (1920×1080@144Hz)
HP 2159 (1920×1080@60Hz)
Intel HD Graphics 4600 (Gigabyte)
XenSource Citrix Indirect Display Adapter
2047MB NVIDIA GeForce GTX 960 (EVGA)
ForceWare version: 456.71
SLI Disabled
Storage:
Samsung 860 EVO 500GB (SATA SSD)
Toshiba HDWE140XZSTA 4TB (SATA HDD)
Samsung SSD 840 EVO 250GB (SATA SSD)
Western Digital WD My Book 25EE 8TB (USB)
Audio: Realtek High Definition Audio

networking – “Activation of network connection failed” Error – Using Netgear A6150 USB Dongle

Switched out my MOBO, CPU and RAM. Using same HD and PS. Inxi below.

Everything boots up as normal. WIFI Adapter (USB in USB 2.0 slot) will find networks (both my iphone, neighbors, etc.). However, it will not connect to any. It gives “Activation of network failed” error.

Tried restarting computer, router, forgetting network, resetting network. None worked so far.

Not an expert. Happy to provide any further data. Thank you for help!

System:
  Kernel: 5.4.0-48-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
  Desktop: Cinnamon 4.6.7 wm: muffin 4.6.3 dm: LightDM 1.30.0
  Distro: Linux Mint 20 Ulyana base: Ubuntu 20.04 focal
Machine:
  Type: Desktop Mobo: Micro-Star model: B450 GAMING PLUS MAX (MS-7B86)
  v: 3.0 serial: <filter> UEFI (Legacy): American Megatrends v: H.60
  date: 04/18/2020
CPU:
  Topology: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen
  L2 cache: 3072 KiB
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  bogomips: 86400
  Speed: 2198 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz):
  1: 2199 2: 2200 3: 2200 4: 2199 5: 2200 6: 2199 7: 2200 8: 2199 9: 2200
  10: 2199 11: 2200 12: 2200
Graphics:
  Device-1: NVIDIA GM107 (GeForce GTX 750 Ti) vendor: ZOTAC driver: nvidia
  v: 450.80.02 bus ID: 26:00.0 chip ID: 10de:1380
  Display: x11 server: X.Org 1.20.8 driver: nvidia
  unloaded: fbdev,modesetting,nouveau,vesa resolution: 1920x1080~60Hz
  OpenGL: renderer: GeForce GTX 750 Ti/PCIe/SSE2 v: 4.6.0 NVIDIA 450.80.02
  direct render: Yes
Audio:
  Device-1: NVIDIA GM107 High Definition Audio (GeForce 940MX) vendor: ZOTAC
  driver: snd_hda_intel v: kernel bus ID: 26:00.1 chip ID: 10de:0fbc
  Device-2: AMD Starship/Matisse HD Audio vendor: Micro-Star MSI
  driver: snd_hda_intel v: kernel bus ID: 28:00.4 chip ID: 1022:1487
  Sound Server: ALSA v: k5.4.0-48-generic
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: Micro-Star MSI driver: r8169 v: kernel port: f000 bus ID: 22:00.0
  chip ID: 10ec:8168
  IF: enp34s0 state: down mac: <filter>
  Device-2: NetGear A6150 type: USB driver: rtl88x2bu bus ID: 1-8:2
  chip ID: 0846:9055 serial: <filter>
  IF: wlx3c3786d4398b state: down mac: <filter>
Drives:
  Local Storage: total: 149.05 GiB used: 105.59 GiB (70.8%)
  ID-1: /dev/sda vendor: Western Digital model: WD1600AAJS-00M0A0
  size: 149.05 GiB speed: 3.0 Gb/s serial: <filter> rev: 3E01 scheme: MBR
Partition:
  ID-1: / size: 145.22 GiB used: 105.59 GiB (72.7%) fs: ext4 dev: /dev/sda5
Sensors:
  System Temperatures: cpu: 39.2 C mobo: N/A gpu: nvidia temp: 28 C
  Fan Speeds (RPM): N/A gpu: nvidia fan: 33%
Repos:
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
  1: deb (arch=amd64) https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list
  1: deb http://packages.linuxmint.com ulyana main upstream import backport #id:linuxmint_main
  2: deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse
  3: deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse
  4: deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse
  5: deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
  6: deb http://archive.canonical.com/ubuntu/ focal partner
Info:
  Processes: 312 Uptime: 14m Memory: 15.65 GiB used: 1.39 GiB (8.9%)
  Init: systemd v: 245 runlevel: 5 Compilers: gcc: 9.3.0 alt: 9 Shell: bash
  v: 5.0.17 running in: gnome-terminal inxi: 3.0.38

printing – Can’t print – ‘Backend’ failed

Using a MBP running Catalina 10.15.6 I am unable to print to a networked Xerox printer. It discovers it just fine with Bonjour, connects, but when I print anything, it instantly pauses the printer, and in the printer job list dialog, it fails saying Ready to Print - 'Backend' failed, 2 pages.

I’ve tried re-adding the printer, Reset the printing system with the right-click in the printer list, rebooting the machine. I have an old iMac also running 10.15.6 which can print to it, so I know the printer works. Any other ideas?

security – Where does an iPhone store the number of failed password entries?

Background:

Recently I changed my password on my iPhone. I opted for an alphanumeric one for security. However thanks to the likes of FaceId I did not have to re-enter it for a while to the point, where I could no longer fully remember it. Eventually FaceId failed me and I was locked out. I tried various combinations of the passphrase that I did remember but to no avail. I searched the internet for an answer but found nothing more than a lot of blogspam articles, a forensic tool designed for governments with a price range in the four digits, and a bunch of shady websites, trying to sell me something.

Frustrated with the lack of useful information I opted for restoring from a backup. However all of this got me thinking:

Thought process:

If I knew where an iPhone stores the number of wrong entries I could use tools like checkra1n to access that particular file and alter it to reset the counter for false entries.

The iPhone cannot store this information with the rest of the user content as that part is encrypted, so it must be stored with information that is available at boot and hence accessible when rooting via checkra1n.

However the lack of public tools implies that accessing the number failed password entries is non-trivial. I could imagine the possibility of storing it in hardware, hence making it impossible to reset via jailbreaking but the existence of tools like GrayKey implies that there is some way to extract information out of the phone that allows you test password entries against it.

Question:

So my question is, is the location in which the number of failed passcode entries is stored known or are there at least hints that allow us to (roughly) deduce its location?

❕NEWS – Telegram Will Pay $18.5 Million Fine For Failed ICO | Proxies123.com

Telegram will pay $18.5 million fine to the United States Securities And Exchange (SEC) for its failed ICO project TON. It has already lost some of its reputations as a result of this and hopes to bounce back. The SEC also urged the Telegram owners to notify the agency if they decided to launch another digital currency in the future. The ICO raised around $1.7 billion in 2018 and hopes to pay back its investors now…

networking – I’m trying to network Mac OSx to Ubuntu. Mac has a failed connection to Ubuntu

My set up:
I am running Mac OSx 10.15.7 (on a local machine) and virtual Ubuntu 20.04 on VMWare ESXi (on a local server). I have set up Ubuntu to gain remote desktop connection (xrdp) to Ubuntu, and it works from Mac. I chose xrdp due to also setting up a virtual Windows 10 on the VMWare server.

My Goal:
I want to set up Ubuntu as a time machine back up for my macs on the local network. I installed netatalk-avahi as an attempt to accomplish this.

Problem:
When on the Mac OSx, I can see the Ubuntu VM on my Network. I can select it, and choose “connect as”. If I type the wrong username or password, the log in box shakes at me. If I type in the correct u and p, it says “connection failed”

Is this an issue with the format/setup of netatalk?

Also keep in mind, I’m a self-taught, enthusiastic noob, trying to do something i think is complex. So, K.I.S.S. for me please.