Monday, November 28, 2011

Before suing / getting sued for libel...

Know this: the day is drawing near when bullies can no longer get away with intimidating scientifically minded truth seekers and skeptical speakers. If you're gonna try to use the courts to push us around, be sure you have the truth on your side, or you're gonna get your ass handed to you in the public forum by a calm, assiduous, and intellectually honest high school kid, rightfully and righteously so.

Tuesday, April 26, 2011

How to find broken 2-way relationships

This is not advice on how to interact with people. I'm not the best person to ask for that.
===
I have a table to represent friendships. In this table there must be two rows for each friendship: one for User A->User B, and one for User B->User A.

There are some friendships where the second row is missing.
How do I find them?

Here are the pertinent tables and columns:
Table: User
Columns: userID

Table: UserFriend
Columns: fromUserID, toUserID
===
Solution:

select UF.*
from UserFriend UF with (nolock)
left outer join UserFriend UF2 with (nolock) on
UF.fromUserID = UF2.toUserID and
UF.toUserID = UF2.fromUserID
where UF2.fromUserID is null

Friday, March 11, 2011

ERROR[3332]: Connection to SMTP server test failed.

Going to the web UI for a Sharp3100N printer, Network Settings, Connection test, got this error:
ERROR[3332]: Connection to SMTP server test failed.

Solution:
Change the SMTP server address to
smtp.google.com
Port: 587
SSL: On
Authentication: put in your gmail username and password.

Assuming your printer can find the internet, that should do it.