Numeric facts on fractions, that few are aware of.

Assume a fraction k/m, with 0≤k≤m and look at its digits written out

  1. The fraction has a finite number of digits (less m) OR is a repeated sequence with at the most m-1 digits per group
  2. A repeated sequence will have at the most n-1 zeroes next to each other, if the number is below 10ⁿ
  3. Interesting digit-structure of the sequence times m, with many 9’s (base minus 1) .

Continue reading “Numeric facts on fractions, that few are aware of.”

Xiaomi Smart Band 7 Pro vs Huawei Band 7(/6)

Xiaomi Smart Band Pro 7 has a larger display in roughly same size case and is MUCH more expensive than Huawei Band 7. Adds a few extra features, and has bad band attachment.


(updated on the inferior software and DST a week later – and again a week later after a factory reset…)

Continue reading “Xiaomi Smart Band 7 Pro vs Huawei Band 7(/6)”

Automower 435X AWD, Husqvarna, review.

This Automower 435X AWD is an upgrade from my 330X, See review here.

Overall: 9/10. Hardware: Fine. Software: Improved, still unpolished!

This is both a continuation of the previous Automowers and a fundamentally different approach

Initial review 2019-08-06.

Review updates:
2020-04-29
, Some stuff are fixed with newer firmware.

2020-08-05 This review has evolved over time from an early review, with several updates, so bare with me, that things are not in a straight chronological line…

2020-09-05 Updated with new stuck-bug

2020-11-01 Updated with more elegant stop-protector

2021-04-28 Updated on serious bug during winter-storage.

2021-05-17 Updated after change of rear motors.

2022-05-01 Updated after new software.
(added lawn sketch)

2022-06-10 Updated after new mapping finally finished.

2022-06-28 Workaround to ignore the uselessly incorrect  GPS-map!!!

2022-07-16 Reset and dirt under jog-wheel

2022-10-14 Finally got it back, after long repair of trifle.

 

Continue reading “Automower 435X AWD, Husqvarna, review.”

Partition backup, unlocked Android phones, through Recovery.

Have you ever wanted to backup entire partitions of your Android phone?
Well it actually is quite easy for an unlocked device – Does NOT need to be rooted.
ADD: This requires the presence of a recovery boot option! E.g. from LineageOS

(The above image is ‘borrowed’ from here)

Continue reading “Partition backup, unlocked Android phones, through Recovery.”

Diagonal to width, simple fractions. Different aspect ratios

Obviously it is easy to calculate the diagonal of e.g. a sensor from the width and height with Pythagoras.
And a bit more tedious the other way round using the aspect ratio. [*]
But for common aspect ratios it is even simpler, 1+1/n fractions within less than 0.4%

Continue reading “Diagonal to width, simple fractions. Different aspect ratios”

The EASY way to make a C# Windows.forms app really per monitor DPI aware

As posted in another post, many apps have problems with windows scaling.

See these screen-dumps from Windows lengthy guide that was found here

UPDATE 2020. After Windows “Creators update”, they made things slightly more complicated, sorry…

Here is a reasonably minimalistic approach. You will often just need code like this:

    public partial class Form1 : Form {
         public Form1() {
             InitializeComponent();
             DPI_Per_Monitor.TryEnableDPIAware(this, SetUserFonts);
         }
         void SetUserFonts(float scaleFactorX, float scaleFactorY) {
            var OldFont = Font;
            Font = new Font(OldFont.FontFamily, 11f * scaleFactorX, OldFont.Style, GraphicsUnit.Pixel); 
            OldFont.Dispose();
         }
         protected override void DefWndProc(ref Message m) {
             DPI_Per_Monitor.Check_WM_DPICHANGED(SetUserFonts,m, this.Handle);
             base.DefWndProc(ref m);
         }
     }

You will need to obey a few rules, but often it can be implemented in existing code in minutes!

Continue reading “The EASY way to make a C# Windows.forms app really per monitor DPI aware”

Cases/shells for the Pro1, DIY experiments

There are no official case(s) for the FxTec Pro1, so I have ordered over a score of cases/shells for various phones of dimensions close the keyboard part…

Ten have arrived, nine Nov 13., and here are the preliminary results, and a flip case fitted

Add Nov 21, two more have arrived, for Huawei P20  Pro and Note 7

Add Dec 28, two more have arrived a week ago, Flip cases for Huawei P20  Pro and they are better (the above image)

Add Jan 23, a little more on a P20 Pro flip, reverting the inner part

Add Apr 1, a better shell case with strengthened corners.

Add Aug 6, a protector for the top half – disabling edge interaction

(Will update if any of the remaining ones proves a better fit)

Continue reading “Cases/shells for the Pro1, DIY experiments”

Save and restore positions of windows, WindowsPosSaveNRestore

WindowsPosSaveNRestore is a tool to save the position of windows for later restore

This is primarily useful if you frequently change display configuration, say add/remove external monitor(s) e.g. by docking, or turning a device with autorotate active.

Windows also has the bug that it sometimes cram all open windows (and icons [+]) on the primary screen on sleep.

Continue reading “Save and restore positions of windows, WindowsPosSaveNRestore”

A little post on keyboard phones, and the few alternatives available

Since BlackBerry-phones are now seeming to come to a complete end (not even licensed devices), the options for keyboard phones are even more sparse.

I guess no one reading the blog is unaware that I go for the Pro1.

But in all fairness there are alternatives.

2020-04-12 Updated with the Astroslide announced for spring 2021.

Continue reading “A little post on keyboard phones, and the few alternatives available”

Easy inexpensive chemical free fix for smelly microfibre cloths

Microfibre cloths are nice, but get sour and smelly, even after a machine wash. (same goes for or any other plastic cloths)

They usually smell fine directly from the machine, but soon after they get wet they stink again…

This is easily fixed by a microwave oven!

Continue reading “Easy inexpensive chemical free fix for smelly microfibre cloths”

Disqus-comments, formatting

Here Is a small guide in Disqus-formatting, that I have ‘published’ several times on the old GSMArena.com blog (with tiny variation).

UPDATE: Should in 2019 finally be more or less obsolete for wide enough windows!

Continue reading “Disqus-comments, formatting”

Windows, Oddity with Schtasks.exe, and falsely reported error.

If you run a command like this it works fine to any remote machine

    schtasks.exe /query /s SomePC /U MyAccount /P XXXXX

If you try to let it point back to your own machine you get an error-message

    ERROR: User credentials are not allowed on the local machine.

BUT this is actually FALSE!!!

Continue reading “Windows, Oddity with Schtasks.exe, and falsely reported error.”

BlackBerry Priv, Almost EIGHT days stamina, no tricks, though light usage.

I have previously contradicted the claim that the BB Priv has a poor stamina, but here an even longer run.

This is a collage to contain the almost eight days  (7d 20h), as the 3C Battery Monitor app can only show five days.

Continue reading “BlackBerry Priv, Almost EIGHT days stamina, no tricks, though light usage.”

C# Set volume example

It took me quite some digging to find a clean way to set the standard default volume without external libs. So here the result.

If you do not want the console output, remove the writeline, and change the project from Console to Windows App.

I suggest using it as a Scheduled Task triggered by connect to user session and/or similar.

It is composed of a couple of bits and pieces combined/reduced primarily from these three.

https://stackoverflow.com/questions/31928429

https://stackoverflow.com/questions/36625576

https://social.msdn.microsoft.com/Forums/expression/en-US/90c6405d-44f6-48ce-82aa-c48a9b09dfb4

using System;
using System.Runtime.InteropServices;

namespace SetAudioLevel {
    class Program {

        [ComImport]
        [Guid("A95664D2-9614-4F35-A746-DE8DB63617E6"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        private interface IMMDeviceEnumerator {
            void _VtblGap1_1();
            int GetDefaultAudioEndpoint(int dataFlow, int role, out IMMDevice ppDevice);
        }
        private static class MMDeviceEnumeratorFactory {
            public static IMMDeviceEnumerator CreateInstance() {
                return (IMMDeviceEnumerator)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("BCDE0395-E52F-467C-8E3D-C4579291692E"))); // a MMDeviceEnumerator
            }
        }
        [Guid("D666063F-1587-4E43-81F1-B948E807363F"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        private interface IMMDevice {
            int Activate([MarshalAs(UnmanagedType.LPStruct)] Guid iid, int dwClsCtx, IntPtr pActivationParams, [MarshalAs(UnmanagedType.IUnknown)] out object ppInterface);
        }

        [Guid("5CDF2C82-841E-4546-9722-0CF74078229A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        public interface IAudioEndpointVolume
        {
            //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RegisterControlChangeNotify(/* [in] */__in IAudioEndpointVolumeCallback *pNotify) = 0;
            int RegisterControlChangeNotify(IntPtr pNotify);
            //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE UnregisterControlChangeNotify(/* [in] */ __in IAudioEndpointVolumeCallback *pNotify) = 0;
            int UnregisterControlChangeNotify(IntPtr pNotify);
            //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetChannelCount(/* [out] */ __out UINT *pnChannelCount) = 0;
            int GetChannelCount(ref uint pnChannelCount);
            //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevel( /* [in] */ __in float fLevelDB,/* [unique][in] */ LPCGUID pguidEventContext) = 0;
            int SetMasterVolumeLevel(float fLevelDB, Guid pguidEventContext);
            //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMasterVolumeLevelScalar( /* [in] */ __in float fLevel,/* [unique][in] */ LPCGUID pguidEventContext) = 0;
            int SetMasterVolumeLevelScalar(float fLevel, Guid pguidEventContext);
            //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevel(/* [out] */ __out float *pfLevelDB) = 0;
            int GetMasterVolumeLevel(ref float pfLevelDB);
            //virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMasterVolumeLevelScalar( /* [out] */ __out float *pfLevel) = 0;
            int GetMasterVolumeLevelScalar(ref float pfLevel);
        }

        static void Main(string[] args) {
            int Level = 20;
            if (args.Length == 1) { int.TryParse(args[0], out Level); }

            try {
                IMMDeviceEnumerator deviceEnumerator = MMDeviceEnumeratorFactory.CreateInstance();
                IMMDevice speakers;
                const int eRender = 0;
                const int eMultimedia = 1;
                deviceEnumerator.GetDefaultAudioEndpoint(eRender, eMultimedia, out speakers);

                object aepv_obj;
                speakers.Activate(typeof(IAudioEndpointVolume).GUID, 0, IntPtr.Zero, out aepv_obj);
                IAudioEndpointVolume aepv = (IAudioEndpointVolume)aepv_obj;
                Guid ZeroGuid = new Guid();
                int res = aepv.SetMasterVolumeLevelScalar(Level / 100f, ZeroGuid);

                Console.WriteLine($"Audio set for {Level}%");
                //Console.Beep();
            } catch (Exception ex) { Console.WriteLine($"**Could not set audio level** {ex.Message}"); }
        }
    }
}

.

BlackBerry Priv, 5¼days stamina, no tricks. Display on 50m/day

The BB Priv has a pretty nice stamina, if it is not too infested with bloat (mine is debloated).

Though some complains that a 3410 mAh battery is too small for a phablet with a 5.4″ QFHD display, it is enough for me.

5¼ days on 96% battery

This is with no trickery of radios off or similar. 4G, WiFi, NFC all turned on. GPS off though. ADD: BT off too.

Continue reading “BlackBerry Priv, 5¼days stamina, no tricks. Display on 50m/day”

Get new/changed files from WPD-device, e.g. Android. Enhanced version of Christophe Geers’ PortableDevices

I stumbled upon this nice project by Christophe Geers.

And edited and enhanced it to a tool that works a bit like an advanced REPLACE /UPDATE  to a tree on the PC based on the name of the device and the drives it exposes.

It is an efficient way to get changed & new files from a device to a PC.

Update: Now supports Exclude also.

It works with a WPD connected device, e.g. an Android device USB-connected in MTP or PTP mode.

Here an example of some of the tree generated

Most backup tools does NOT allow you to do an incremental backup, but they DO allow you to deselect e.g. images. So use this tool to do the incremental backup of the huge WPD-exposed stuff like the images/videos/music, and let your backup tool do backups of all the rest – and in more finite time than a total backup of everything every time – thus making it a bliss to take backups much more often….

Continue reading “Get new/changed files from WPD-device, e.g. Android. Enhanced version of Christophe Geers’ PortableDevices”

Displaying images. Colour management, sRGB and ICC. And when something fails.

Update This post started as description of a problem with displaying some files in FireFox and Chrome, but has been transformed to a more general post about sRGB, ICC, CMS and what happens if the browser gets it wrong…

It all started when I detected that most colours in some web-files got severely distorted when displayed in FireFox and Chrome on my system. Both JPG and PNG files were affected

colourchart_1_2_cmp

If you see the first one of these two squares blue_1 and blue_1_removed_srgb substantially different from the second clear blue, your CMS system have similar issues…
The first one is supposed to be a standard blue, the second is blue LEDs on your monitor only.

Continue reading “Displaying images. Colour management, sRGB and ICC. And when something fails.”

Blackberry Priv – Bought one after all… (post is likely to become a sort of review)

blackberry-priv-overview[1]

Well I bought one after all, as it was available including customs and delivery for roughly $400 to Denmark.

The keys ARE tiny, and the device HUGE but I think I might end up finding it a lesser bad compromise that an Iphone+keyboard-case.

Continue reading “Blackberry Priv – Bought one after all… (post is likely to become a sort of review)”

Working with numbers in Q with large nominator/denominator in C#

A nerdy idea:

A C# class that quicly can supply a lot of primes (here limited to about the largest prime about 50G – as arrays with over 2G entries are not currently supported without splitting the arrays)

A struct that supports basic arithmetic for large accurately represented numbers in Q,  by factorization into primes.

A test program that tries to find solutions for a!b!=c! with 1<a<b<c

Continue reading “Working with numbers in Q with large nominator/denominator in C#”

Ios Calendar, Various odd observations.

A couple of strange observations on the calendar in Ios

  1. Search only works within +/- one year from current date
  2. It is not only year 10000 safe, you can actually scroll way beyond year 100000 🙂
  3. You can scroll back in time even to BC, though strange bugs appears much before that
  4. Moving an appointment has some (academic) issues in the date selector

IMG_1331

Continue reading “Ios Calendar, Various odd observations.”

Ios 9 – 9.3.1 (+A lot on battery info) First impressions: Same shit with added bugs…

clIos9

For me the most vital app is the Messaging app for handling SMS/MMS. There is a new version, but ALL the basic flaws are still there (see this) and new have been added, along with new features.

ADD: There are bug fix versions too, see below.

Continue reading “Ios 9 – 9.3.1 (+A lot on battery info) First impressions: Same shit with added bugs…”

PhotoView with Delete&Transfer of matched files, e.g. RAW

This is a plain PhotoViewer with just TWO special function:

The ability to show more EXIF info than most and to delete or transfer matching partner files on request also, according to user defined masks.

E.g. Also handle RAW or cropped variant of a file named with predefined syntax.

PhotoView_Dump

Settings for position, size, splitter positions, last used folders… can be saved in users registry.

Download zip: PhotoView.Zip

This is a ‘work in progress’, so expect bugs might be present, and that things can still change quite a bit. (Last modified 2018-09-30)

Continue reading “PhotoView with Delete&Transfer of matched files, e.g. RAW”

Length of round (carpet) roll

Carpet

For some reason, surprisingly few know this extremely simple formula, please share it.

I have actually seen in a carpet store an employee unrolling the carpet to measure the length!!

[The formula is simple to prove too… r=kφ, L=∫r dφ=∫kφ dφ=½k(φ2²-φ1²)=½k(φ21)×(φ21)=½(r2+r1) ×n2π=(r2+r1) × nπ , q.e.d.]

Eye resolution test

I have made a simple test image to test the resolution of your eyes on a phone, phablet, tablet, laptop or PC!

The most common result is it is pointless to go beyond around 1/12000 of the viewing distance

Be SURE it is shown in the screens native resolution. e.g. 960 pixels should fill half a FullHD display. (or use one of the added ones with your screens resolution)

Be SURE that your browser or your windows settings doesn’t do any scaling/zooming/smoothing, i.e. one pixel in the image is one pixel on the display. (If in doubt take a magnifying glass -or macro camera- and look closely on the screen, it should be like the mock-up later in this post)

ResolutionTestText_qFHD

 

It is the point where the single line pair is indistinguishable from the double line we are looking for (that is: where it looks like one continuous thick line)

You will most likely find the finest resolution using the red or green figure.

Use any prescribed glasses that you normally would for the distance – we are testing resolution, not focusing ability.

NOTE: If you got a PenTile display, usually the green will do fine! Have a look at this on different subpixel arrangements. Several pixel arrangement exists out there, that could have similar issues…

Continue reading “Eye resolution test”

Digital camera sensor sizes – selling elastic bands by the metre

When a sensor is advertised/sold as 1/2.3″ most people would think that is the diagonal of the sensor. Well it is NOT! It might even vary drastically between manufacturers.

For historical reasons the diameter of a fictitious Vidicon tube with the same active area is what is advertised!!

ccdsizes[1]
From  http://www.dpreview.com/news/0210/02100402sensorsizes.asp

Unfortunately, it is even more confusing than that…

Continue reading “Digital camera sensor sizes – selling elastic bands by the metre”

Megapixel-craze and tiny sensors & lenses. Myths & Facts

This is an attempt to replace some of the common myths, urban legends and misunderstandings with some facts.
(last updated 20181103)

There are at least three physical issues and one biological that are interesting:

1) Rayleigh’s criterion and sensor width.

F * √N < W , (N number of sensors in Mpixels, W in mm, red light F numerical aperture)

AR-principles[1] Airy_disk_spacing_near_Rayleigh_criterion[1]

2) The eye’s real life resolution

Resolution beyond 1/12000 of viewing distance is pointless for most

3) Thermal noise.

Relative noise increases by 1/d, (+)almost √n and √T, (N number of sensors in Mpixels, d sensor diameter, T in kelvin, i.e. °C+273.15)

4) Effective pixel count

The effective pixel count falls with the amount of light, the less the pixel size the worse.

5) Stacking images

Stacking can compensate, but can not perform miracles.

 

6) Thickness of device versus sensor size

The angle of light to the sensor edges binds max sensor size to thickness.

Continue reading “Megapixel-craze and tiny sensors & lenses. Myths & Facts”

Panasonic TZ70, Review

Panasonic Lumix TZ70 (ZS50 in the US)

Upgrade of TZ60 with larger/fewer pixels, RAW and better viewfinder, but removed GPS.

This post is likely to be enhanced/edited over the next days and weeks

Eske Rahn 2015-04-25

Overall: Really satisfied. 10/10

1426237696653[1] 1420186774799
The only real competition today is the upcoming HX90V from Sony, that haven’t got RAW, and have pixels as small as the TZ60

Overview

The TZ60 took much beating due to the small pixels, And Panasonic answered that by increasing the pixelsize by a factor 150%, and thus reducing the pixelcount by the same to 12MP.
This is an obvious upgrade from Fujifilm F900EXR, that are beaten or on par in all areas, less triffles.
See my review of the F900EXR here. On which this review to some extend will be based.
Practically the whole plus-list could be repeated, and most of the cons are not there!!
Continue reading “Panasonic TZ70, Review”

FujiFilm F900EXR, Review

Review, Fujifilm F900EXR.
Official images etc see FujiFilms own page here
Official user guide can be found here

Originally posted 2013-05-23

 

Overall: Quite satisfied. 8/10

F900EXR_Black_Up_ffbfa0522f[1] F900EXR_Black_Front_Left_76975fa68b[1]

Minor firmware improvements could easily make it even better. You are left with no way to override the AF even when it fails(!), you can not even request focus at infinity!!
Continue reading “FujiFilm F900EXR, Review”

How to obtain good stamina on an Android phone

Summary

  1. This thread is general in nature, but based on my Xperia neo Pro.
  2. Xperia phones DO have good stamina if set up and used correctly
    I can get 4½ days of stamina WITH 3G+WiFi+Virus Scanner ON
  3. Set Brightness to 100%, and use widget “Brightness On/Off“,
    Use On in direct sunlight only.
  4. Set Screen time out to 30 sec.
  5. Use the app AdBlocker to block specific apps from data connection.
  6. Use the app WapDroid to only allow WiFi at specific geographical ‘points’. (By Cell-ID NOT gps)
  7. Have the phone at optimal position.
    Place on the desk not in the pocket while working.
  8. Exit apps if possible when you are finished.
  9. “Ads within Android apps found to consume 75% of the app’s power.”
  10. Avoid task-killers on the bloatware.
    (The repeated killing and resurrection eats a lot of battery)
  11. Avoid ‘clever’ battery-apps in the background doing more harm than good.
  12. Note that the percentages in Battery Use are based on estimates.
  13. Consider if you need background data traffic or not.
  14. The “Android System”-drainage bug!
  15. Finally I have a few tests , if the above did not do the trick.

screenshot_2012-03-21_0127

General

On general battery info and hints see this

Continue reading “How to obtain good stamina on an Android phone”