Thursday, May 11, 2023

Android FragmentStateManager.createView IllegalArgumentException: No view found for id

I had this exception when replacing a fragment inside another fragment in a transaction where getParentFragmentManager() was called.

The solution was calling getChildFragmentManager():

Return a private FragmentManager for placing and managing Fragments inside of this Fragment.

Thanks to flodaniel here and Malachiasz here.

Saturday, February 25, 2023

Disable "Do you want to open this file?"

 It's really annoying that Windows 10/11? always asks this question when you try to open a file you created.

To disable for new files (old ones are not affected unfortunately):

Open the "Local Group Policy Editor" (search for it).

Go to "User Configuration" -> "Administrative Templates" -> "Windows Components" -> "Attachment Manager".

Double click on "Do not preserve zone information in file attachments" and set it to Enabled.

Trying to open all new files will not result in the dreaded pop up disturbing your work.

Thanks to this forum answer.


Friday, December 02, 2022

Show More Options by Default in Windows 11

 To enable:

Go to Search and type Run to add the following to the registry entry:

reg add HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /ve /d "" /f

Then restart the file explorer to see the change.

To disable:

reg delete “HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}” /f
References: allthings.how

Thursday, September 29, 2022

Windows 11: Edit the All Apps Start Menu

Right-click Windows and select Run.
Now execute the following:

# Open the Startup Folder of All Users

%ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp

That's it!

Thanks to appuals.com

Monday, November 15, 2021

Add Shortcuts to Create Files on the Windows 10 Context Menu

Use the Registry Editor. 

LibreOffice Writer (.odt)
Go to: Computer\HKEY_CLASSES_ROOT\.odt\LibreOffice.WriterDocument.1\ShellNew
(Default) REG_SZ (value not set)
FileName RED_DZ C:\Program Files\LibreOffice\share\template\shellnew\soffice.odt

Thursday, October 28, 2021

Win10: Frequent Folders and Recent Files Are Not Grouped Separately in Quick Access

 Open File Explorer so that you are in the Quick Access view.

Right-click on Quick Access and choose Options.

Go to View -> Reset Folders

That should fix it.

Reference

Wednesday, October 13, 2021

Resize Thunderbird Columns

If the double arrow icon to resize the width of the columns in the email list does not appear, try doing this, it worked for me.

Click on the "Select Icons to Display" in the top right corner of the column title row and choose "Restore Column Order".


 

Then try again to position the mouse on the border of two columns and the double arrow should appear.

Thursday, July 08, 2021

Manage Entries from the "New" Context Menu in Windows 10

Sometimes when you install a program, you need to have it under the right-click menu New submenu. If it's not there you can easily add it using the Registry Editor.

  1. Open the Registry Editor: run regedit
  2. Under Computer\HKEY_CLASSES_ROOT, find the file extension you want to add.
  3. Select it, right-click and select New -> Key
  4. Name it ShellNew
  5. On the left panel, select New -> String Value
  6. Name it NullFile and change the value to 1 if you want to enable it. Actually setting the value is not necessary. The mere existence of the key makes it appear in the menu.
  7. If you want to disable an existing one, just remove the ShellNew entry. Setting the key to zero seems not to work for me.

That's all folks! 

References

  1. https://www.thewindowsclub.com/remove-items-from-new-context-menu

Monday, April 20, 2020

Friday, April 03, 2020

Safely Remove Device Icon Not Showing in Windows 10

No matter what I do, it does not show up.

To remove a device:
  1. Go to Start Menu -> Settings
  2. Devices -> Other Devices.
  3. Select and click: Remove device.
How to make the icon reappear? Work in progress...

Tuesday, March 31, 2020

Record Sound from Internal Source (Windows 10)

Recording software: Audacity

WASAPI loopback has an advantage over stereo mix or similar inputs provided by the soundcard that the capture is entirely digital (rather than converting to analog for playback, then back to digital when Audacity receives it). System sounds playing through the device selected for WASAPI loopback are still captured, however.

1st Method: Stereo Mix

If it's included in the drivers' list, it's usually disabled. Enable it and select it in Audacity as the Recording Device.
Open the Sound Settings -> Sound Control Panel. Right-click and enable Show Disabled Devices. Enable the Stereo Mix.

2nd Method: WASAPI Loopback

In Audacity, choose the Windows WASAPI audio host, and then choose an appropriate loopback device, such as Speakers (loopback) or Headphones (loopback).

Note! If this doesn’t work, you may also need to select the correct number of recording channels to match your device using the dropdown box to the right of device selection box. For example, If you have a 7.1 channel headset, select 8.

References

  1. Audacity Tutorial: Recording Computer Playback on Windows, https://manual.audacityteam.org/man/tutorial_recording_computer_playback_on_windows.html
  2. https://www.howtogeek.com/217348/how-to-record-the-sound-coming-from-your-pc-even-without-stereo-mix/

Thursday, March 19, 2020

Windows 10 Network Subsystem

# Show network interfaces
> netsh interface ipv4 show subinterfaces

# Restart an interface
> Restart-NetAdapter -Name "WLAN"

Tuesday, March 17, 2020

Slow Wireless Connection on Windows 10

Those below are all nice tips but the problem on my Lenovo ThinkPad T490 with the SonicWall VPN software was that the DNE LightWeight filter was enabled (by the SonicWall VPN client).
This was limiting the wireless speed to 2Mb instead of 50Mb.
When I disabled it, the speed went back to 50Mb.
This prevents the SonicWall VPN client from working and you need to use an alternative one like a SSLVPN connection with the SonicWall NetExtender.

References

  • https://forums.lenovo.com/t5/ThinkPad-P-and-W-Series-Mobile-Workstations/P51-Very-slow-wifi/m-p/4374392 

The other tips...

Drivers

Update the Wi-Fi drivers.

Updates

Windows Update -> Advance Options -> Delivery Optimization:
Disable: Allow downloads from other PCs.

Reserved Bandwidth

By default, Windows reserves 20% of your bandwidth for Windows Update, system apps and other purposes, leaving you with 80% bandwidth of Internet connection. If you don’t use Windows Update on a daily basis and the reservation limit slows your Internet down, then you can remove the limit by setting the value to 0.

Task Manager -> File -> Run new task: gpedit.msc (ad Administrator)
Under Computer Configuration, double-click on Administrative Templates > Network > QoS Packet Scheduler. Then double-click on Limit reservable bandwidth.
Click the Enabled option and set Bandwidth limit (%) value to 0. Then click Apply > OK.

Window Auto-Tuning

It's a feature in our Windows 10 to allow for more efficient data transfers. But it can also interfere with the network and cause loss of connectivity.
 
From the Power Shell (Admin):
> netsh interface tcp show global
> netsh int tcp set global autotuninglevel=disabled

Disable Large Send Offload

Large Send Offload(LSO) is another feature in Windows designated for better network performance. Well-intended, but then the whole thing of allowing background apps to consume large amounts of network bandwidth is the reason why our Internet speed takes a hit. To disable LSO:

Double-click on Network adapters > your_network_adapter.
Click the Advanced tab, then click Large Send Offload V2 (IPv4) and set the value to Disabled.

Specific to Lenovo ThinkPad T490:

Device Manager -> Network Adapters:
Uninstall Intel Proset Driver.

Monday, February 03, 2020

Stop Automatic Redirect From HTTP to HTTPS

[Updated on June 4, 2020]

Chrome

  1. Go to chrome://net-internals/#hsts. Enter the domain under Delete domain security policies and press the Delete button.
  2. Go to chrome://settings/clearBrowserData, tick the box Cached images and files and press click the button Clear data.

Firefox

Go to Options -> Privacy and Security -> Cookies and Site Data and Clear data (Cookies and Site Data).

or

Go to Library -> History -> Show all history.
Right-click on an entry for the site and choose: Forget about this site.

References

  • https://superuser.com/questions/565409/how-to-stop-an-automatic-redirect-from-http-to-https-in-chrome
  • https://stackoverflow.com/questions/30532471/firefox-redirects-to-https

Thursday, October 10, 2019

Automatically Mount Partition on Fedora

Make sure you can run a graphical application as root (please refer to the previous post) or you logged in as root on a graphical session.

Run gnome-disks:
> gnome-disks --gapplication-service

Select the partition and click on the Settings button.

Right-click and select: "Edit Mount Options..."

Configure at will. Remember to choose a "Display Name".

Reference
  1. How To Auto-mount Partitions On Startup Using Gnome Disks

Running a Graphical Application as root on Fedora

If you, as a regular user, want to run a graphical application with root privileges, you can do the following from your account:

First check you belong to the wheel group (you can invoke sudo).

Create a file with the following script in a file named, for example, wsudo:

#!/bin/bash
# -*- ENCODING: UTF-8 -*-
#small script to enable root access to x-windows system 
xhost +SI:localuser:root
notify-send "ALERT: Enable root user on xhost"
beesu $1
#disable root access after application terminates
xhost -SI:localuser:root
#print access status
notify-send "Disable root user on xhost"

Export the display:
> export DISPLAY=:0.0

then run the graphical application like this:
> ~/bin/wsudo appname

You will be prompted for your password and you're done!

Friday, July 12, 2019

Windows 10: You Don't Have Permission to Access

You mount an external drive while sitting at your home desk and now you don't have access to some directories anymore.
What I did to solve this is:
  • Select the drive and open the Properties -> Security tab.
  • Go to Advanced.
  • Change ownership to "Everyone"
  • Absolutely remember to check: "Replace all child object permissions entries with inheritable permission entries from this object."
That's it.

Monday, December 31, 2018

Thunderbird Displaying Weird Characters Instead of UTF

If you see something like "fᅵr" instead of "für" in Thunderbird, then try this:
Go to Options -> Advanced -> Config Editor (Accept Risk!).
Then search for "mail.strictly_mine" and double click on it to change from false to true.
That worked for me on newly received messages. The old ones still do not display correctly.

Saturday, September 01, 2018

Disable Automatic Adaptative Brightness Control on Windows 10

The only thing that worked on my Dell Latitude to disable this quite annoying "feature" was going to Settings -> Power and Sleep Settings -> Additional Power Settings and choose the Balanced  plan.
You should also check that in the Advanced Power Settings -> Display -> Enable Adaptative Brightness is disabled.
Choosing a Power Plan kept this option enabled even with Enable Adaptative Brightness disabled.

Update. Sometimes this doesn't work. I found an additional setting to try:
Run regedit and go to:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Intel\Display\igfxcui\profiles\Media\Brighten Movie and Darken Movie.
Then set ProcAmpBrithness to 0 (mine was respectively 30.00 and -30.00).
I'll let you know if it works...

Tuesday, June 12, 2018

Eclipse XML file Syntax colors

If you have an XML files that opens with unreadable colors but the XML colors are different, the reason could be that the file is not associated to the XML editor but some other (default) editor, like Ivy.
Either open the file with (Open with...) the XML editor or change the color scheme for the default editor.