mount – How to fix USB-connection between Android 11 to Ubuntu 20.04 (to backup phone data – after not properly unmounting)?

I transferred fotos etc from Android 11 (Samsung S10e) to Ubuntu via USB; then, after completion, tried to unmount (I think) which then stalled (if I remember correctly) then pulled the plug and since then I can’t properly mount/connect via USB again as before. – Of the USB connection options presented to me by Android, I can now only connect via “Transferring images” (also known perhaps as “PTP via USB turned on“) instead of “Transferring files” (which worked before).

How to fix / reset the connection so that also the other connection mode (“Transferring files”) will work again as before?

Low cost way to fix keyboard not working on MacBook Pro 2016

I have a 2016 13″ Macbook Pro (A1706). The keyboard has stopped working. Is it possible to replace the keyboard for a reasonable price and not replace the whole system board?

Details:
I spilled a bit of water on the machine. I kept it off for a day. It powers on and everything works including the touchpad, but the keyboard. (Actually, the keyboard worked sporadically at first then completely stopped working.) I can use an external keyboard. I have reset the SMC and the NVRAM. I have run apple diagnostics and it found no issues.

The computer is old, but I don’t want to replace it until the next generation of apple silicon MacBook Pros comes out. But I’d really like to use the built-in keyboard.

Is there a low-cost way to replace the keyboard to get me another six months from the machine? Does anyone know where this fits into Apple’s fixed price list for repairs? Do I need to go to a nonapple shop?

Thanks for your help

Saul

ffmpeg – Fix video file with incorrect duration

I have a web service that operates on uploaded videos, concatenating them (with ffmpeg’s xfade filter).

Some of the uploaded videos have a strange video stream, with what appears to be 1 frame (and frame rate < 1). This seems to cause xfade to hang (I assume because it needs more than 1 frame — but I’m not sure).

Is there a way to add the additional video frames, using ffmpeg, to avoid this issue?

I tried using tpad (e.g. tpad=stop_mode=clone) to repeat the last frame for the duration of the video, but the resulting file still appears corrupt, VLC won’t play it.


Examples

The original video file, note the low video stream frame rate:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '50552EFA-BEBA-4968-A8A3-36FDB5D5BE62.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: isommp41mp42
    creation_time   : 2021-06-01T02:39:26.000000Z
  Duration: 00:00:04.64, start: 0.000000, bitrate: 419 kb/s
  Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
      creation_time   : 2021-06-01T02:39:26.000000Z
      handler_name    : Core Media Audio
      vendor_id       : (0)(0)(0)(0)
  Stream #0:1(und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 828x994, 413 kb/s, 0.22 fps, 0.22 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      creation_time   : 2021-06-01T02:39:26.000000Z
      handler_name    : Core Media Video
      vendor_id       : (0)(0)(0)(0)

Running ffprobe with -show_frames on the above-file yields only 1 video frame, the rest are all audio:

...audio frames...
(FRAME)
media_type=video
stream_index=1
key_frame=1
pkt_pts=0
pkt_pts_time=0.000000
pkt_dts=0
pkt_dts_time=0.000000
best_effort_timestamp=0
best_effort_timestamp_time=0.000000
pkt_duration=2786
pkt_duration_time=4.643333
pkt_pos=602
pkt_size=240203
width=828
height=994
pix_fmt=yuvj420p
sample_aspect_ratio=N/A
pict_type=I
coded_picture_number=0
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=pc
color_space=bt709
color_primaries=bt709
color_transfer=bt709
chroma_location=left
(SIDE_DATA)
side_data_type=H.26(45) User Data Unregistered SEI message
(/SIDE_DATA)
(/FRAME)
... audio frames ...

macos – How can I fix underscan/overscan when the slider isn’t shown in System Preferences?

/var/db/.com.apple.iokit.graphics is the configuration file for displays on macos. The entries are not at all labeled, but in my experience a new monitor will be on the bottom of the list. Each entry is structured as follows:


    <key>IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/IGPU@2/AppleIntelFramebuffer@2/display0/AppleDisplay-6b3-27ae</key>
    <dict>
        <key>cyuv</key>
        <integer>268435456</integer>
        <key>pscn</key>
        <integer>10000</integer>
        <key>startup-timing</key>
        <data>
        AAAAAAAAAIAJMACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAgP4hCgAAAACA/iEKAAAAAID+IQoAAAAAgAcAAGoAAAAIAAAAIAAAADgE
        AAAnAAAAGQAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAA
        AAIAAAAAAAAAAgACAIAAAQAAAAAAAAAAAAAAAAAAAAAA
        </data>
        <key>version</key>
        <integer>2</integer>
    </dict>

The pcsn key and following integer are overscan. My first monitor had some value besides 10000, and changing the value to 10000 fixed it. I tried this with my second monitor and it didn’t work, so I just deleted the last few entries. Either method requires a restart.

8 – How to fix this DateFormatter error upon saving a node?

I am getting an intermittent error upon saving a node.

A google search returns a few similar errors but most relate to contrib modules. This appears to be related to core.

Any suggestions of the cause and how to fix it?

Error: Call to a member function getPattern() on null in DrupalCoreDatetimeDateFormatter->format() (line 135 of /public_html/web/core/lib/Drupal/Core/Datetime/DateFormatter.php)

Drupal 8.9.16

Guaranteed WordPress Website Fix

We are offering a full WordPress Website Fix.
Have a website problem that you need help with right now?
We’ll fix it for $199 or your money back!
Order your fix today at hostirian get-wordpress-help-now/

Thanks,

how to fix ‘int’ object is not iterable error in python?

I have to write a code in python that gets a string as an input from the user and add a dot before each character of the string as an output.
this is the code I wrote, but I faced this error:

for letter in len(vroodi):

TypeError: ‘int’ object is not iterable

Can anyone help me fix the error?

vroodi = str(input("Enter the string"))
def insert_dot(q, harf):
    e= vroodi( :harf) + "." +vroodi(harf: )
    return e
for letter in len(vroodi):
    r = insert_dot(vroodi, letter)
print(r)

api – Should the client silently fix a possible error or should it let the user of the client know about the error?

I’m building a client for an API.

The API takes a query param that looks something like this 2-10, that’s a range and notice that it uses a hyphen (-).

Usually, data comes from another place using en dash (–) instead of hyphen.

If the api is called using an en dash instead of a hyphen, it will return empty, so we need to convert en dashes to hyphens before sending the request.

I see two options for handling this:

  1. On the API client that I’m building I can get the range and silently replace en dashes with hyphens before doing the request to the API.
  2. Throw an error on the client if it is used with en dashes instead of hyphens and let the code that’s going to use the client handle the issue.

Any advice on which way to go is highly appreciate it.

lets encrypt – How to fix SSL_ERROR_NO_CYPHER_OVERLAP for 2 domains on apache with certbot

We have two websites running on one apache:
www-example1-com, www-example2-com

www-example1-com was the first site to exist, got a lets-encrypt certificate and works fine.
www-example2-com is the second site, that also got a lets-encrypt certificate.

www-example1-com works fine. www-example2-com causes an error in Firefox and Chromium
SSL_ERROR_NO_CYPHER_OVERLAP in Firefox
ERR_SSL_VERSION_OR_CIPHER_MISMATCH in Chromium

What I did so far:

  • I generated a certificate for www-example2
  • I expanded the certificate of www-example1 to count for www-example2 too.
  • I expanded the example2.conf in /etc/apache2/sites-available by the code-snippet from
    https://ssl-config.mozilla.org/
  • I deleted the key and the certificate for www.example2 and regathered it.
  • I checked example1-conf, example2-conf, 000-default-le-ssl.conf, apache2.conf
  • https://www.ssllabs.com/ssltest/analyze.html?d=example2.com –> Assessment failed: Failed to communicate with the secure server

Please note: There is a SNI that seems to be correctly configured, but I have no direct access to.

In each case the error message did not change.

000-default-le-ssl.conf:

<IfModule mod_ssl.c>
<VirtualHost *:443>
    Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
    ServerAdmin webmaster@localhost
    Protocols h2 h2c http/1.1
    DocumentRoot /var/www/html/
    ServerName www.example1.com
    ServerAlias example1.com
    Protocols h2 h2c http/1.1

    <Directory /var/www/>
            Options -Indexes +FollowSymLinks
            AllowOverride all
            Order allow,deny
            allow from all
    </Directory>
    
    # added 01.04.2019 END
    
    <Directory /var/www/html/>
      Options -Indexes +FollowSymlinks
      AllowOverride All
      Require all granted
      allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    #SSLEngine off
    #Include /etc/letsencrypt/options-ssl-apache.conf
    #Header always set Content-Security-Policy upgrade-insecure-requests
    Include /etc/letsencrypt/options-ssl-apache.conf
    #SSLCertificateFile /etc/letsencrypt/live/www.example2.com/fullchain.pem
    #SSLCertificateKeyFile /etc/letsencrypt/live/www.example2.com/privkey.pem
    #Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/www.example1.com-0001/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/www.example1.com-0001/privkey.pem
    </VirtualHost>
    </IfModule>

example2.conf

<VirtualHost *:80>
 Protocols h2 http/1.1
 ServerAdmin info@example.de
 DocumentRoot /var/www/html1/example2/
 ServerName www.example2.com
 ServerAlias example2.com
 <Directory /var/www/html1/vifree>
    Options -Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
 </Directory>

 ErrorLog ${APACHE_LOG_DIR}/error.log
 CustomLog ${APACHE_LOG_DIR}/access.log combined
 RewriteEngine on
 RewriteCond %{SERVER_NAME} =www.example2.com (OR)
 RewriteCond %{SERVER_NAME} =example2.com
 RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} (END,NE,R=permanent)
 </VirtualHost>

 <IfModule mod_ssl.c>
 <VirtualHost *:443>
    ServerAdmin info@example.de
    Protocols h2 h2c http/1.1
    DocumentRoot /var/www/html1/example2
    ServerName www.example2.com
    ServerAlias example2.com

    <Directory /var/www/html1>
            Options -Indexes +FollowSymLinks
            AllowOverride all
            Order allow,deny
            allow from all
    </Directory>
    <Directory /var/www/html1/example2>
      Options -Indexes +FollowSymlinks
      AllowOverride All
      Require all granted
     allow from all
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
 #       SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1
 #       SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
 #       SSLHonorCipherOrder     off
 #       SSLSessionTickets       off

 #SSLUseStapling On
 #SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"

 Include /etc/letsencrypt/options-ssl-apache.conf
 SSLCertificateFile /etc/letsencrypt/live/www.example1.com-0001/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/www.example1.com-0001/privkey.pem
 </VirtualHost>
 </IfModule>

Could somebody please help to find the error? Please tell me if you need more information.

Thanks in advance.