Tuesday, September 20, 2011

Hiding MSN to tray in Windows 7

1. go to icon for messenger, right click -> properties
2. go to compatability-> run in compatible mode for Windows Vista.
3. restart msn, and click "cross" after signing in

Friday, September 02, 2011

Yet another learning tip (MSSQL)

select * from ju_test_1 j1, ju_test_2 j2 where
j1.id *= j2.id

is equivalent to:

select * from ju_test_1 j1 left outer join ju_test_2 j2 on
j1.id = j2.id

Thing to note is that non-ANSI is available only for 80 compatibility or lower. *Strongly recommended to rewrite using ANSI outer join operators.

*****
Msg 4147, Level 15, State 1, Line 3

The query uses non-ANSI outer join operators ("*=" or "=*"). To run this query without modification, please set the compatibility level for current database to 80 or lower, using stored procedure sp_dbcmptlevel. It is strongly recommended to rewrite the query using ANSI outer join operators (LEFT OUTER JOIN, RIGHT OUTER JOIN). In the future versions of SQL Server, non-ANSI join operators will not be supported even in backward-compatibility modes.



Wednesday, August 24, 2011

To check for numeric strings

in VB, I think isNumeric should do the trick.

for C#, one way is to:

try
{
val = Convert.ToInt32(textBox2.Text.ToString().Trim());
}
catch (Exception e)
{
//not a valid number
}

another method, slightly more troublesome, but still does the trick.

double res;
string a;
a = "#$%^&";
if (double.TryParse(a, out res)) { } else { MessageBox.Show("a is not a number"); }
a = "12345678";
if (double.TryParse(a, out res)) { MessageBox.Show("a is a number!!!"); }
a = "1234a5678";
if (double.TryParse(a, out res)) { } else { MessageBox.Show("a is not a number....."); }

Tuesday, August 23, 2011

Tips of the day

C# & operator: Logical AND (And equivalent of VB)
C# && operator: Conditional AND (AndAlso equivalent of VB)

Wednesday, August 17, 2011

useful email tips

from http://www.softflare.com/index.php?id=76

E-mail Set Up: My Server Requires Authentication


Mozilla Thunderbird

  • Go to Tools, then Account Settings, then Outgoing Server (SMTP) (normally the bottom item of the left-hand menu)
  • Select the server (if there is more than one account listed) that you wish to use to send e-mail and press the Edit... button.
  • Check the Use name and password option.
  • Add your User Name (which will be your full email address)
  • Click OK

Thunderbird will ask you for your password the first time you send e-mail and you can optionally save it at that time so that it will not ask you again.

Microsoft Outlook 2007:

  • Click Tools then Account Settings
  • Ensure you are on the E-mail tab at the top of the windows
  • Click on the relevant email account and click Change... at the top of the window
  • Click More Settings
  • Click Outgoing Server
  • Check My Server Uses Authentication
  • Select Use same settings as my incoming mail server - in certain cases where this doesn’t work you may need to click on log on using and:
    • Type Account Name (which will be your full e-mail address)
    • Type Password (which will be your email address password)
  • Click OK
  • Click Next
  • Click Finish
  • Click Close

This should fix Outlook to send email. Close Outlook and reopen it to start sending mail.

Microsoft Outlook 2002/2003:

  • Click Tools then Email Accounts (Accounts and Services on older versions of Outlook)
  • Click View and Change and Click Next (skip if it opens up to the account screen)
  • Click Change or Properties of your Email Account
  • Click More Settings
  • Click Outgoing Server
  • Check My Server Uses Authentication
  • Select Use same settings as my incoming mail server - in certain cases where this doesn’t work you may need to click on log on using and:
    • Type Account Name (which will be your full e-mail address)
    • Type Password (which will be your email address password)
  • Click OK
  • Click Next
  • Click Finish

This should fix Outlook to send email. Close Outlook and reopen it to start sending mail.

Microsoft Outlook Express:

  • Click Tools then Accounts
  • Click Mail
  • Click Properties (for your domain name if there is more than one mail account listed)
  • Click Servers
  • In the Account or User Name field (which will be your full e-mail address)
  • Put a checkmark by My Server Requires Authentication at the bottom of the page.
  • Click Settings
  • Make sure Use same settings as Incoming server is selected
  • Click Apply
  • Click OK
  • Click Close

Thursday, March 31, 2011

Organization in the sea of disorganization

If things do not fall in place quick enough, send chasers. And keep spamming once every 2 days until you get what you want.

Wednesday, March 23, 2011

Rubbish posts

parameter sniffing

*sniffle sniffle*

Tuesday, January 18, 2011

Agony of EMS Teacher....

P3 Teacher: "Class, repeat after me. Good, better, best!"

P3 Student:"(raises hand) Teacher, shouldn't it be better, betterer, betterest?"

P3 Teacher: "This is bad english! Who taught you that?"

P3 Student:"On TV got a Zorro say that.... teacher so you mean he wrong, is it?"

P3 Teacher: *dumbfounded* "Ok class, let us learn a new word...."

Monday, November 08, 2010

random number generator

it's not that random after all.... IF the value must be unique, append an additional unique value to it...


basics. yet i've forgetten it. hopefully i do not need to grow this list.



FUCKING BASIC CONCEPTS TO REMEMBER

DO NOT DELETE ANY TABLE IN THE PRODUCTION DATABASE ( 1 YEAR AGO)

APPEND A UNIQUE VALUE TO ANY RANDOM GENERATOR TO MAKE IT REALLY UNIQUE.

ALWAYS CLEAR ALL DATA (SESSION) UPON ENTERING THE LANDING PAGE


Wednesday, March 17, 2010

PDF generation using .net

iTextSharp looks fun. Real fun -.-