Recently one person asked me to check following code:
1. if (s.Length > 1)
3. string numberString = s.Substring(0, 1);
4. result.Text = s.Substring(pos + 1, s.Length - pos);
When that person runs this code, it throws ArgumentOutOfRangeException exception on line #3. But as you can see, first line checks that string is not empty and s.Substring(0, 1) should never throw any exception. And looks like that person was correct.
Then I found that this code compiled for .NET Core 3.1. I tried to increase version to .NET 5 and problem is still there. I put breakpoint to line 3 and run application. When application stopped on that line, I
Recently I got strange situation in our application. We have two different classes in .NET that exposed to managed code via COM interfaces. Both classes look very similar but one class by some reason supports IDispatch while another class does not. We have piece of code that work quite differently depending on IDispatch support. And was asked to investigate what is going on and why these two classes behave different.
Here is some data. First class looks like this:
public class Foo : BaseClass1, IDisposable
Second class looks like this:
public class Bar : BaseClass2, IMyInterface
IMyInterface declared like this:
I am happy owner of iPhone from iPhone 4. I never had any issue with them. All issues were some kind of my fault. But one thing is really annoying me modern iPhones – charge cables. I do not remember what year it started, but at one moment I did realize that plastic that protect lightning cable started to crack. I did not pay attention and thought that I misused it. So, I just used tape to isolate that place. But then it cracked in different place and in another place. I went I bought another cable. And year later perfectly working cable started to crack again. Cable was still working fine, just looks ugly and all wires are stripped.
Probably everyone who wants to follow recent trends in hardware is usually watching some news over that subject and views some reviews for new hardware. For most hardware reviews I usually watching Hardware Unboxed channel. While many other youtubers provide the same content, but I really like their style, they way of presenting, data they provided etc. Plus following them for quite some time I never seen any leaning towards any side. They are always on the truth side.
And today I seen this video: Nvidia Bans Hardware Unboxed, Then Backpedals: Our Thoughts - YouTube
. Basically, if you do not have time to watch, NVIDIA sent email to Hardware Unboxed saying that do not pay enough attention (and do
I would like to buy NVIDIA 1600 Ti video card. Normally it did const around $260, and I was expecting that on Black Friday there will be good discounts. To be honest I was wrong. Most sites like New Egg had Black Friday week and they guarantee that if prices will be lower ever in November than they will automatically credit difference.
Anyway, today I did check and pretty much everything is sold out. And then I found idepothome.com where this video card cost $160.00. It immediately raised my suspicion. This video card normally cost around $300. Why would anyone make discount at least $140 when your competitors are simply out of stock? It is way simpler to drop $50
I have to admin that. I forgot password to my router. It is very shameful. When I updated router to latest version of OpenWrt I decided to change password. And I was carefully preparing this update and as result, I did not login to my router after that because everything working just fine. And today, more than month from setting it up I decided to check something. And I realized that I simply forgot password. It was new password that I never used before and I forgot it.
It is my main router, and I can reset router to factory default, but it will be pain to setup it again. As last resort I decided to search internet
Few days ago, AMD released new Ryzen 5000 series CPUs. They promised us 15-20% improvement and they kept their promise. Here are few reviews:
New CPU is simply better than Intel in every single workload. It is faster; it consumes less energy, and you can use relatively cheap motherboards with it. For example, I can use my $125 motherboard that I bought 2 years ago to run new Ryzen 5000 CPU. For like $200 I can get around 30-40% performance increase just by replacing CPU.
And there are even cheaper motherboards that can run even top Ryzen 5000 just fine, assuming there will be no overclocking. Good example is B450 Tomahawk Max.
For last 2-3 years I am constantly hearing about 5G. Like it is a messiah that come and save all of us from misery of 4G and LTE. Then about year ago, just before release of new iPhone I started to hear something like that: “There is no 5G in new iPhone, I will definitely will not buy it”. And I heard that a lot. And about 9 month ago I seen video on Linus YouTube channel about testing 5G. To be honest, “huge disappointment” is what I felt. There were so much talking and at the end we got this? Let me explain why I felt this way.
Reason number 1. There should be pretty much nothing between your
I am was using a lot of browsers thru my life and all of them have exactly the same issue that really annoys me every single day. Let me explain it.
Very often in the morning I am drinking coffee and read something from my phone. I am using quite old iPhone 6 S Plus and a have a lot of tabs opened. As result pretty much all the time, Safari must reload this tab because it is unloaded due to memory constraints. So, I do switch to tab and Safari doing a lot of work, showing progress bar and so on. At the end, after few seconds, page finally renders. Everything is good, except it is yesterdays page. So,