As I alluded to in my previous blog entry, I had a basic problem - different weather stations giving me different actual temperatures for my local area. Now I get there are local variations within a town, micro weather is a real phenomenon. However sometimes the weather stations were out by more than 8°C. So I decided to take matters in my own hands - how hard can it be?
It started with this component:
What do you do when your home thermostat tells you the outside temperature is 8˚C lower than what your Apple Watch tells you? Who do you believe?
This is how I'd expect a modern millennial to code (you know - the kind of person who considers facts to be particular opinions).
private bool CheckExist(out int id, out bool manageAll, out string orgCode)
{
bool Yes = false;
id = -1;
foreach (DataRow r in dv.Table.Rows)
{
if (r.ItemArray[1].ToString() == TextBoxUsername.Text &&
r.ItemArray[2].ToString() == TextBoxPassword.Text)
{
Yes = true;
id = (int) r.ItemArray[0];
break;
}
}
return Yes;
}
So, so stupid. We now have a pregnant man emoticon. I get the inclusivity thing, but if we want to have equal representation for every possible combination of anything that can happen or can be imagined, then we will run out of resources.
If you have a Unifi CloudKey Gen2+ controller with existing video footage and want to preserve that as well as any configuration settings that might be stored there, but upgrade the capacity of the default HDD from 1TB to something more usable, this article is for you.
dd if=/dev/diskA of=/dev/diskB bs=1m
diskutil list
to find the right drive)