Luciano Evaristo Guerche
A brazilian geek interested in .NET technologies
-
Bin, Oct and Hex
Visual Basic 6 has the Hex function, but no Bin or Oct, so I wrote the silly functions bellow, just to have a bit of fun.
Option Explicit Public Function Bin(ByVal lngNumber As Long) As String Do While lngNumber > 0 Bin = (lngNumber Mod 2) & Bin lngNumber = lngNumber \ 2 Loop If (Len(Bin) Mod 8) <> 0 Then Bin = String$(8 - (Len(Bin) Mod 8), "0") & Bin End If End Function Public Function Oct(ByVal lngNumber As Long) As String Do While lngNumber > 0 Oct = (lngNumber Mod 8) & Oct lngNumber = lngNumber \ 8 Loop If (Len(Oct) Mod 4) <> 0 Then Oct = String$(4 - (Len(Oct) Mod 4), "0") & Oct End If End Function
-
LogMeIn.com
I am behind a NAT at office and at home and needed a way of remote controlling my machine at home from office. I knew of GotoMyPC, but opted by a FREE similar one called LogMeIn.com. With LogMeIn.com I got the functionality I needed and for FREE.
-
Cool GUI for editing parameters in visual studio - vote for it!
Mitch Denny proposes a very cool idea for popping up in-place GUI when you need to edit a formatted string or other parameter in source code. He has posted his idea up on the Ladybug site; I’ve voted for it, and you should too!
-
Help Make Blogs More Visible!
There are by some estimates more than a million weblogs. But most of them get no visibility in search engines. Only a few "A-List" blogs get into the top search engine results for a given topic, while the majority of blogs just don't get noticed. The reason is that the smaller blogs don't have enough links pointing to them. But this posting could solve that. Let's help the smaller blogs get more visibility!
-
FWD: Localization in Whidbey
Localization in Whidbey is an interesting post by Raghavendra Prabhu
-
Microsoft Brazilian bloggers? Where? Where?
Following Paschal Leloup footsteps I also raise the question here: Where are the Microsoft Brazilian employees blogging? Is that big building on Avenida Luis Carlos Berrini only occupied by senile accountants or leprechauns?
-
Learn to Use the New XML Encryption Class in .NET 2.0
Haven't blogged for some time due to project(s) delivery timetable, but wouldn't forgive me for not mentioning the interesting article I've just read at Learn to Use the New XML Encryption Class in .NET 2.0
-
New blogs
Wintellect's Jeff Prosise, Jeffrey Richter, and John Robbins are now blogging. And so is Matt Pietrek.
[Via Yorai Aminov, from Israel]
Sidebar updated. -
ASP.NET 2.0 Security Features
ASP.NET 2.0 contains a new set of security-related controls, known collectively as the Login controls.
[Via Ohad Israeli, Israel]
By taking advantage of the Login controls, you can create standard registration, login, and password recovery pages without writing any code. -
That's why I love Textpad and regular expressions
Suppose you have a lot of ALTER TABLE statements, like the one below (I actually had 30+) and you find out you must delete inconsistent data on child table before procceeding on constraint creation.
ALTER TABLE dbo.ChildTable ADD CONSTRAINT FK_ChildTable_ParentTable FOREIGN KEY (ChildField) REFERENCES dbo.ParentTable (ParentField) GO
What would you do? Manually add a DELETE statement before each ALTER table statement? No, in my case, I used Textpad and regular expressions. You can check just below
Find: ALTER TABLE[ ]+\(.+\)\n[ ]+ADD CONSTRAINT[ ]+\(.+\)\n[ ]+FOREIGN KEY[ ]+(\(.+\))\n[ ]+REFERENCES[ ]+\(.+\)[ ]+(\(.+\))\nGO\n
Replace with: DELETE \1\nFROM \1\n LEFT JOIN\n \4 ON \1.\3 = \4.\5\nWHERE \1.\3 IS NOT NULL AND \4.\5 IS NULL\nGO\n\n&\n
and then I got a pair of SQL statements for each ALTER TABLE, like the one belowDELETE dbo.ChildTable FROM dbo.ChildTable LEFT JOIN dbo.ParentTable ON dbo.ChildTable.ChildField = dbo.ParentTable.ParentField WHERE dbo.ChildTable.ChildField IS NOT NULL AND dbo.ParentTable.ParentField IS NULL GO ALTER TABLE dbo.ChildTable ADD CONSTRAINT FK_ChildTable_ParentTable FOREIGN KEY (ChildField) REFERENCES dbo.ParentTable (ParentField) GO