The life of a computer/sci-fy/teccie-nerd :-) Interested in lots of stuff like: Net, C#, Software Architecture, IoT, building stuff (like sensors based on RPI Pico W), Cars, Books, meeting people, learning new stuff, Cyber Security
Monday, November 06, 2023
Saturday, October 28, 2023
Beware of the short circuit
One of my Pico W sensors stops working from time to time. I've enabled the watchdog for auto-magic reboots, but even so, sometimes it just dies.
The sensor cable is about 50cm, at the end I have a DHT20 Temp and Humidity sensor (Köp DHT20 (AHT20) Temperatur- och Luftfuktighetssensor | sizable.se). I have pull-up resistors mounted at the sensor end of the cable.
I'm measuring the outside temperature with this sensor, so I'm mounting it on the underside of our master bedrooms windowsill. For mounting I'm using a blob of adhesive glue. When I "made it stick" to the underside of the windowsill I also bent the connectors on the sensor, so the middle data wire was shorted to ground - intermittently!
Saturday, July 01, 2023
Looking for a cheap box to house your sensor / IoT-stuff
Here in Sweden I found this awesome cheap box that suited my IoT projects perfectly - Köp Apparatlåda PC002 med håltagning – grå till rätt pris @ Electrokit, Swedish price about 15 SEK ( 1.5 USD )
Tuesday, January 03, 2012
VLC player, file cache settings
However, there is an easy fix! Start VLC player and go to tools -> preferences. Select "view all" instead of simple mode.
Then go to Input/Codecs -> Access Modules -> Files
I changed the default caching value(ms) from 300 to 3000 and Extra networking caching from 900 to 9000.
Now, all VLC players will read a larger portion of the media file and cache it locally, thus being more robust for network problems!
Happy viewing!
// Lazze
Thursday, September 15, 2011
Want to learn more? Riding the edge of wisdom
If you, like me, want to watch all tutorials it will just set you back 29 USD / month!
So, what are you waiting for! Head over to Plural Sights and get sharper!
// Lazze
Win 8 in the virtual flesh
Want to take Windows 8 for a test spin? Don't want to wipe your main computer doing it? Running it virtual is for you :-)
First things first, here is the URL for downloading Win 8 Developer Preview:
I tried to install Win 8 x64/x86 on VM Workstation 7 and the Virtual PC under Win 7 x64 - alas, no luck! VM Ware reported "unhandled core error" and Virtual PC reported "HAL init error". As a last resort, I tried to install it under Parallels 7 on my MBP(OSX Lion) - and behold, it worked!
Fueled by success, I updated my VM Workstation to version 8 - now it works like a charm! I haven't tried VM Player yet. But if you run into problems, I guess that you can use the trial for Workstation 8 to create the virtual Win 8 machine. Then load it up in the player.
Last, don't forget to install the VM Ware tools!
Some good links:
VM Ware player
Securable(util for checking that you have VT-d and other good stuff)
MS HAV detection tool
Good luck!
// Lazze
I just got confirmation that Win 8 Dev Pre will also run on virtual box.
Thursday, June 05, 2008
DivX register-app won't start under 64 bit OS
C:\Windows\Syswow64\rundll32.exe C:\Windows\System32\dtu100.dll,dtuSerialRunDll 7B63B2922B174135AFC0E1377DD81EC2
To start the DivX-regApp
// Lazze
Friday, April 18, 2008
Vista network slowdown when using media apps
To disable the "feature"
Regedit:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AudioSrv
Key "DependOnServices" - edit the list, remove "MMCSS"
Quit regedit, start MSCONFIG -> Services -> Disable "Multimedia Scheduler"
Reboot and Njoy networkspeed even when listening to a MP3
// Lazze
Tuesday, February 26, 2008
Resolved networking issues in Vista
Reset TCP/IP stack to installation defaults.
netsh int ip reset reset.log
Reset WINSOCK entries to installation defaults:
netsh winsock reset catalog
Reboot! Finished!
Monday, October 08, 2007
Virtual PC 2007 Console window won' t show
Evidently, the options.xml file has been damaged, or at least there are faulty values in it.
You have to view hidden systemfiles to find:
C:\Users\UserName\AppData\Roaming\Microsoft\Virtual PC\Options.Xml
find the console section and you will find that the layout parameters are way off, like max(int). Change the left/right etc to 10 or something similar and the window will pop back to the desktop. You must close all VPC:s and console to be able to save the options file.
All creds go to the following blogger,
SJ's Blog
// Lazze
Tuesday, September 25, 2007
Data controls ASP NET 2
There are two major reasons for using templated fields:
1. You get predictable names, like CTL_MyView_TemplatefieldName - which is good if you need to access them via Javascript.
2. From code behind you can get your fields like this:
TextBox t = (TextBox) ((DetailsView)sender).FindControl("tbStatusDetailTemplate");
// Lazze
Monday, September 10, 2007
Sunday, September 09, 2007
Application Wide(Windows Forms) - capture Keys(like functions keys)
const int WM_KEYDOWN = 0x100;
const int WM_KEYUP = 0x101;
2) Add interface, IMessageFilter
public partial class Form1 : Form, IMessageFilter
3) Make message interceptor
public bool PreFilterMessage(ref Message m)
{
Keys keyCode = (Keys)(int)m.WParam & Keys.KeyCode;
if (m.Msg == WM_KEYDOWN && keyCode == Keys.F8) // We'll just handle F8 here
{
MessageBox.Show("Key: " keyCode.ToString());
return true;
}
return false;
}
4) Add message interceptor to forms message handling(in Forms constructor)
Application.AddMessageFilter(this);
Enjoy!
//Lazze
Sunday, June 17, 2007
Need a hotfix tonight?
Here you can download Hotfixes that aren't public available...
//Lazze
Wednesday, June 13, 2007
Loop through splitcontainer in Winforms
while (ctl != null)
{
//Do something with ctl
ctl = splitContainer1.GetNextControl(ctl, true); }
}
Tuesday, June 12, 2007
ICO PNG
This nifty program converts PNG -> ICO or ICO -> PNG
100% free!
Get it here!
Sunday, June 03, 2007
WCF
netsh http add urlacl url=http://+:8000/ServiceModelSamples/service/ user=lsiden
You have to run the above command(Vista) to grant HTTP on URL xxx for user XXX before you can start a WCF-server.
If you use DualHTTP you have to open the firewall for the incoming requests from the client.
Read more:
Here
and here
Sunday, May 13, 2007
Directory.GetDirectories without getting Unauthorized errors
{
DirectoryInfo di = new DirectoryInfo(dir);
if ((di.Attributes & FileAttributes.System) == 0)
dirList.Add(dir);
}
DirectoryInfo.Attributes is a Flag enum list so you can't just check for equality. Using the above code makes it more or less safe :-)
Tuesday, June 27, 2006
Lazzes Smart Home - 2023
Here is an overview of the components in the Smart Home as of now. More stuff than I tought :-)
-
If you, like me - use VLC mediaplayer to view all your media, you may have run into the same problem as I. That is, when we watch multiple m...
-
1) Define constants const int WM_KEYDOWN = 0x100; const int WM_KEYUP = 0x101; 2) Add interface, IMessageFilter public partial class Form1 : ...
-
The DivX register app is hardcoded to use the System32 folder as path for Rundll32, which of course doesn't exist on a 64bit system. So ...



