Tuesday, May 31, 2005

Will Ajax catch on? | PHP Everywhere

15 Seconds : Client Side Validation Using the XMLHTTPRequest Object

My PC file

JavaScript: The World's Most Misunderstood Programming Language

Slashdot | AJAX Buzzword Reinvigorates Javascript

Slashdot | AJAX Buzzword Reinvigorates Javascript:

For me, the crux of the usefulness and eventual adoption and finally complete embracing of AJAX lies in the article's paragraph:

Some of the buzz surrounding AJAX has been generated by Web designers as well as programmers. AJAX?s flexibility is invigorating for Web designers because JavaScript can control any aspect of any images or type on a page. Fonts can grow or shrink. Tables can add or lose lines. Colors can change. Although none of these capabilities are new to programmers accustomed to building client applications -- or, for that matter, Java applets -- they are novelties to Web designers who would otherwise be forced to rely on Macromedia (Profile, Products, Articles) Flash.

I've seen what Google has done with AJAX (e.g., Google suggest), and it's stuff I never imagined could be so repsonsive in a web context. For me it starts to make programming fun again, and web programming an acceptable form of application development.

When browsers and web first emerged I could see the writing on the wall, but I wasn't happy about it. Browser application writing from the programming perspective was probably the single most giant leap backwards in technology for me (not including technologies introduced by Microsoft)....: you mean, all the years I've spent honing skills writing applications no longer apply? You mean I no longer have "state" as a tool for maintaining sanity in my application???? Hwaahhh??? I have to do what to change the web page???

While there have been some technologies (ASP, JSP, etc) to help with these issues, none have addressed the responsiveness issue with the web page round trip message loop. AJAX comes close. Now all I have to do is learn it.

For a great example of the responsive nature of this (I've referenced this before), go to Google Personal Home [google.com], set up your own home page, and play... Configure your modules by dragging them around... open and close your g-mail previews. This all starts looking alot like programs actually running locally on your own machine. (I'm assuming all are familiar with and have played similarly with Google Maps [google.com].)

Additionally, here are some very good resources to learn more about AJAX:

That's it, I'm done.

Monday, May 30, 2005

vbcity.com: icon in system tray

vbCity/DevCity.NET Forums :: FAQ :: Visual Basic :: VB General :: Windows:


Option Explicit

'Declare a user-defined variable
Private Type NOTIFYICONDATA
cbSize As Long
hWnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type

'Declare constants for the API function.
Private Const NIM_ADD = &H0 ' Add an Icon
Private Const NIM_MODIFY = &H1 ' Edit/Change an Icon
Private Const NIM_DELETE = &H2 ' Remove Icon from Tray

'Declare constant for mouse event
Private Const WM_MOUSEMOVE = &H200

'Flags that indicate the members of NOTIFYICONDATA.
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4

' Constants for the mouse clicks on the icon
' These allow you to add actions based on these
' events being raised.
'Left-click
Private Const WM_LBUTTONDBLCLK = &H203 'Double-click
Private Const WM_LBUTTONDOWN = &H201 'Button down

'Right-click
Private Const WM_RBUTTONDBLCLK = &H206 'Double-click
Private Const WM_RBUTTONDOWN = &H204 'Button down

'Declare the API function
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean

'Declare a variable as the UDT NOTIFYICONDATA
Dim nid As NOTIFYICONDATA

Private Sub Form_Load()

'Set the values for the NOTIFYICONDATA data type.
With nid
.cbSize = Len(nid)
.hWnd = Me.hWnd
.uId = vbNull
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = Me.Icon ' <== You can change this to another icon
.szTip = "SysTray ToolTip Goes Here" & vbNullChar ' <== You can change this also.
End With
End Sub

Private Sub Form_Terminate()
'Remove the icon from the taskbar when your program ends.
Shell_NotifyIcon NIM_DELETE, nid
End Sub

Now all you have to decide is what event will be fired in order for the icon to appear in the system tray. There are various scenarios. Here are just a few:

1. You can do it via the click of a CommandButton. Paste this code into your Form:

Code:
Private Sub Command1_Click()
Shell_NotifyIcon NIM_ADD, nid
End Sub

2. Or – more likely the way you might want it to work – you can display the icon whenever the form is minimized. Paste this code into your form as well as, or instead of, the above:

Code:
Private Sub Form_Resize()
' If form minimized then show the icon in systray

If Me.WindowState = 1 Then
Shell_NotifyIcon NIM_ADD, nid
Else ' otherwise don't show it
Shell_NotifyIcon NIM_DELETE, nid ' ç This removes the icon
End If

End Sub

3. Sometimes you will want to hide your app from the user and put the icon in the system tray for when they want to access the app again. Paste this code into your form, run the project and click on the CommandButton(Command1). As you will see, it does just that.

Code:
Private Sub Command1_Click()
' Hide form
Me.Hide
' Show icon
Shell_NotifyIcon NIM_ADD, nid
End Sub

Once the icon is in your systray, you probably need it to do something when the user clicks it. There are loads of things you can do, but for this FAQ we will just stick with restoring the application to normal size when the user double clicks the icon with the left mouse button. This code will work both when your app is minimized and also if you have hidden the form.

Paste this code into your form:

Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, _
X As Single, Y As Single)
Dim lngButtonAction As Long

lngButtonAction = X / Screen.TwipsPerPixelX

Select Case lngButtonAction

Case WM_LBUTTONDBLCLK
' Left mouse button has been double clicked
' If app is currently minimized ….
If Me.WindowState = 1 Then ' … then restore it to normal size
Me.WindowState = 0
Shell_NotifyIcon NIM_DELETE, nid ' and remove the icon
ElseIf Me.Visible = False Then ' Else, if the app is hidden …
Me.Show ' then show the form again
Shell_NotifyIcon NIM_DELETE, nid ' and remove the icon
End If

Case WM_LBUTTONDOWN
' You could put code in here to make something happen when
' left mouse button is single clicked on the icon

Case WM_RBUTTONDOWN
' You could put code in here to make something happen when
' right mouse button is single clicked on the icon

End Select

End Sub

vbcity: vb6 system tray

vbCity/DevCity.NET Forums :: FAQ :: Visual Basic :: VB General :: Windows:

Option Explicit

'User-defined variable to pass to the Shell_NotiyIcon function
Private Type NOTIFYICONDATA
cbSize As Long
hWnd As Long
uId As Long
uFlags As Long
uCallBackMessage As Long
hIcon As Long
szTip As String * 64
End Type

'Constants for the Shell_NotifyIcon function
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2

Private Const WM_MOUSEMOVE = &H200

Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4

Private Const WM_LBUTTONDBLCLK = &H203
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Const WM_RBUTTONDBLCLK = &H206
Private Const WM_RBUTTONDOWN = &H204
Private Const WM_RBUTTONUP = &H205

'Declare the API function call
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" _
(ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean

Dim nid As NOTIFYICONDATA


Step two: Create add icon procedure
In this step, we're creating the add icon procedure as a separate procedure so that we can:


* Specify a tooltip on-the-fly
* Call the add icon procedure from where ever we choose


Important points to note are the hWnd property, the uCallBackMessage property and the hIcon property.
The hWnd property links the icon to a specific form - where this procedure in a module the code would need to be changed to reference an actual form (Me keyword only works in forms as a reference to the form that the code in contained in).
The uCallBackMessage property lets the system know when the mouse moves over the icon start checking for interaction - I never really played with this to see what else could be done, but there are possibly other ways of checkingfor interaction.
The hIcon property provides a means to change the icon on the system tray at runtime, but the previous icon must be removed to show the new one.

Code:
Public Sub AddIcon(ByVal ToolTip As String)

On Error GoTo ErrorHandler

'Add icon to system tray
With nid
.cbSize = Len(nid)
.hWnd = Me.hWnd
.uId = vbNull
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = Me.Icon
.szTip = ToolTip & vbNullChar
End With
Call Shell_NotifyIcon(NIM_ADD, nid)

Exit Sub
ErrorHandler: 'Display error message
Screen.MousePointer = vbDefault
MsgBox Err.Description, vbInformation, App.ProductName & " - " & Me.Caption

End Sub


Step three: Add code to add icon and remove icon from the system tray
Very straight-forward. Because we've created an add icon procedure, it's one line to add the icon (and modify the tooltip) and one line to remove it.

Code:
Private Sub Form_Load()

Call AddIcon("This would be a tooltip...")

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

'Remove icon from system tray
Call Shell_NotifyIcon(NIM_DELETE, nid)

End Sub


Step four: Interact with system tray icon
The real magic begins! Below I've a select case to check what the user does on the icon - here we see that if the user releases the left mouse button over the icon, the form is either minimised and hidden or restored and shown depending on the current windowstate.
Why hide or show the form?
Hiding the form removes the icon on the taskbar (between start button on left and Clock on right) so that only the system tray icon is visible.

Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Dim msg As Long

On Error GoTo ErrorHandler

'Respond to user interaction
msg = X / Screen.TwipsPerPixelX
Select Case msg

Case WM_LBUTTONDBLCLK
'nothing

Case WM_LBUTTONDOWN
'nothing

Case WM_LBUTTONUP
If Me.WindowState = vbMinimized Then
Me.WindowState = vbNormal
Me.Show
Else
Me.WindowState = vbMinimized
Me.Hide
End If

Case WM_RBUTTONDBLCLK
'nothing

Case WM_RBUTTONDOWN
'nothing

Case WM_RBUTTONUP
'nothing

End Select

Exit Sub
ErrorHandler: 'Display error message
Screen.MousePointer = vbDefault
MsgBox Err.Description, vbInformation, App.ProductName & " - " & Me.Caption

End Sub


Step five: Add a popup-menu
Making further use of the system tray icon is usually via a popup-menu - here's how to do that!
After creating a menu with the following structure:

File
-Option1
-Option2
----------
-Exit

I can use the popup-menu function to have the options appear where the mouse is. By adding the following code to the Form_MouseMove event. Doing so means a popup-menu appears when the user right-clicks on the system tray icon.

Code:

Case WM_RBUTTONUP
Call PopupMenu(mnuFile, vbPopupMenuRightAlign)


Step six: Interact with popup-menu
Here, if you've any experience working with menus you'll know that it's very straight-forward: depending on the index of the menu clicked, do a specific bit of code (see below).

Code:
Private Sub mnuFileArray_Click(Index As Integer)

Select Case Index
Case 0 'Option 1
MsgBox "You've clicked on option1 - good for you!", _
vbInformation, App.ProductName & Me.Caption

Case 1 'Option 2
MsgBox "You've clicked on option2 - great!", _
vbInformation, App.ProductName & Me.Caption

Case 4 'Option 1
Unload Me
End

End Select

End Sub

CodeGuru: Using the System Tray

CodeGuru: Using the System Tray:

Option Explicit

' Type passed to Shell_NotifyIcon
Private Type NotifyIconData
Size As Long
Handle As Long
ID As Long
Flags As Long
CallBackMessage As Long
Icon As Long
Tip As String * 64
End Type

' Constants for managing System Tray tasks, foudn in shellapi.h
Private Const AddIcon = &H0
Private Const ModifyIcon = &H1
Private Const DeleteIcon = &H2

Private Const WM_MOUSEMOVE = &H200
Private Const WM_LBUTTONDBLCLK = &H203
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202

Private Const WM_RBUTTONDBLCLK = &H206
Private Const WM_RBUTTONDOWN = &H204
Private Const WM_RBUTTONUP = &H205

Private Const MessageFlag = &H1
Private Const IconFlag = &H2
Private Const TipFlag = &H4

Private Declare Function Shell_NotifyIcon _
Lib "shell32" Alias "Shell_NotifyIconA" ( _
ByVal Message As Long, Data As NotifyIconData) As Boolean

Private Data As NotifyIconData


Private Sub Form_Load()
AddIconToTray
Visible = False
End Sub

Private Sub Form_Terminate()
DeleteIconFromTray
End Sub

Private Sub AddIconToTray()

Data.Size = Len(Data)
Data.Handle = hWnd
Data.ID = vbNull
Data.Flags = IconFlag Or TipFlag Or MessageFlag
Data.CallBackMessage = WM_MOUSEMOVE
Data.Icon = Icon
Data.Tip = "System Tray Demo - codeguru.com" & vbNullChar
Call Shell_NotifyIcon(AddIcon, Data)

End Sub

Private Sub DeleteIconFromTray()
Call Shell_NotifyIcon(DeleteIcon, Data)
End Sub

Private Sub Form_MouseMove(Button As Integer, _
Shift As Integer, X As Single, Y As Single)

Dim Message As Long
Message = X / Screen.TwipsPerPixelX

Select Case Message
Case WM_LBUTTONDBLCLK
Visible = Not Visible
WindowState = Abs(Not Visible)
End Select
End Sub

Sunday, May 29, 2005

"aim high, and then figure out how to get there."

C# Feels Cleaner Than Java:


I have to agree with Daniel with regards Java 3. Having performed a little experiment; define a class with a property and an event notification mechanism in both Java and C#. C# does appear to be a clearer language, mainly due to the event keyword, and the property syntax.

public class SimpleBean implements Serializable {
private String name;
private PropertyChangeSupport pcs;

public SimpleBean() {
super();
pcs=new PropertyChangeSupport(this);
}
public String getName() {
return name;
}
public void setName(String name) {
String oldName = this.name;
this.name = name;
pcs.firePropertyChange('Name',oldName,this.name);
}
public void addPropertyChangeListener(PropertyChangeListener pcl) {
pcs.addPropertyChangeListener(pcl);
}
public void removePropertyChangeListener(PropertyChangeListener pcl) {
pcs.removePropertyChangeListener(pcl);
}
}

[Serializable]
public class SimpleBean
{
private string n=String.Empty;

public event EventHandler Change;

public SimpleBean() {}

public string Name
{
get {return n;}
set {
n=value;
EventHandler changes = Change;
if (changes != null)
{
changes(this, new EventArgs());
}
}
}
}
Note: The example code is not directly comparable with regards to the event data

C# Storing Images- www.funducode.com

image to database

private void insert_Click ( object sender, EventArgs e )
{

FileStream f = new FileStream ( file.Text, FileMode.Open ) ;
byte[ ] buff = new byte [ f.Length ] ;
f.Read ( buff, 0, ( int ) f.Length ) ;
string cmdstr = "Insert into bookinfo values ( @b, @a, @l )" ;
SqlCommand com = new SqlCommand ( cmdstr, con ) ;
com.Parameters.Add ( "@b", book.Text ) ;
com.Parameters.Add ( "@a", author.Text ) ;
com.Parameters.Add ( "@l", buff ) ;
com.ExecuteNonQuery( ) ;
con.Close( ) ;

}



database to image

con.Open( ) ;
r = con.ExecuteReader( ) ;
if ( r.Read( ) )
{

bookl.Text = r [ 0 ].ToString( ) ;
authorl.Text = r [ 1 ].ToString( ) ;
byte[ ] b = ( byte[ ] ) r [ 2 ] ;
MemoryStream st = new MemoryStream( ) ;
st.Write ( b, 0, b.Length ) ;
Image i = Image.FromStream ( st ) ;
img.Image = i ;

}

C# Tutorials: array file

C# Tutorials

vb6: terminate a process immediately

Topica Email List Directory:

VB6 Contents:
1. New HowTo: Terminate a process immediately

Both Contents:
2. New Links
3. Karen Watterson's Weekly Destinations and Diversions (D & D)
==========
++++++++++

++++++++++
==========
1. New HowTo: Terminate a process immediately
http://www.vb-helper.com/howto_terminate_process.html
http://www.vb-helper.com/HowTo/howto_terminate_process.zip

This example's download contains two projects. The Target project is a
simple application that catches its QueryUnload event and refuses to
unload unless it's the program's own idea. In particular, it does not
close if you send it the WM_CLOSE message.

Private m_OkToClose As Boolean
Private Sub cmdClose_Click()
m_OkToClose = True
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Cancel = Not m_OkToClose
If Cancel Then MsgBox "Unload ignored"
End Sub

The second project is the Terminator. If you click the Close button, the
program uses the FindWindow API function to find the target application
and sends it the WM_CLOSE message. A normal program should clean up and
stop when it receives this message but the Target program continues.

Private Sub cmdSendCloseMessage_Click()
Dim target_hwnd As Long

' Get the target's window handle.
target_hwnd = FindWindow(vbNullString, txtTargetTitle.Text)
If target_hwnd = 0 Then
MsgBox "Error finding target window handle"
Exit Sub
End If

' Send the application the WM_CLOSE message.
PostMessage target_hwnd, WM_CLOSE, 0, 0

MsgBox "Sent WM_CLOSE message"
End Sub

If you click the Terminate button, the gloves come off. The program uses
FindWindow to find the target's window handle. It uses
GetWindowThreadProcessId to get the window'sprocess ID, and then uses
OpenProcess to open a connection to the process. It then calls
TerminateProcess to force the target to stop immediately (no saving
throw).

' Terminate the process.
Private Sub cmdTerminate_Click()
Dim target_hwnd As Long
Dim target_process_id As Long
Dim target_process_handle As Long

' Get the target's window handle.
target_hwnd = FindWindow(vbNullString, txtTargetTitle.Text)
If target_hwnd = 0 Then
MsgBox "Error finding target window handle"
Exit Sub
End If

' Get the process ID.
GetWindowThreadProcessId target_hwnd, target_process_id
If target_process_id = 0 Then
MsgBox "Error finding target process ID"
Exit Sub
End If

' Open the process.
target_process_handle = OpenProcess( _
SYNCHRONIZE Or PROCESS_TERMINATE, _
ByVal 0&, target_process_id)
If target_process_handle = 0 Then
MsgBox "Error finding target process handle"
Exit Sub
End If

' Terminate the process.
If TerminateProcess(target_process_handle, 0&) = 0 Then
MsgBox "Error terminating process"
Else
MsgBox "Process terminated"
End If

' Close the process.
CloseHandle target_process_handle
End Sub

vbAccelerator - Show and Hide a Form's Titlebar at run-time:

This tip shows you how to show and hide the title bar of a window at run-time. To make a window's title bar disappear, you have to remove the control box, the maximise box and the minimise box as well as set the caption of the form to blank. Unfortunately, VB's ControlBox, MinButton and MaxButton properties of a form are read-only so you can normally only do this at design time. However, by manipulating the style of the window using API calls, you can get the same thing to happen at run-time.

Start a new project in VB. Add the following code to the project's form:

Private Declare Function SetWindowLong Lib "user32" _
Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" _
Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000 ' WS_BORDER Or WS_DLGFRAME
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_SYSMENU = &H80000

Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal x As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Enum ESetWindowPosStyles
SWP_SHOWWINDOW = &H40
SWP_HIDEWINDOW = &H80
SWP_FRAMECHANGED = &H20 ' The frame changed: send WM_NCCALCSIZE
SWP_NOACTIVATE = &H10
SWP_NOCOPYBITS = &H100
SWP_NOMOVE = &H2
SWP_NOOWNERZORDER = &H200 ' Don't do owner Z ordering
SWP_NOREDRAW = &H8
SWP_NOREPOSITION = SWP_NOOWNERZORDER
SWP_NOSIZE = &H1
SWP_NOZORDER = &H4
SWP_DRAWFRAME = SWP_FRAMECHANGED
HWND_NOTOPMOST = -2
End Enum

Private Declare Function GetWindowRect Lib "user32" ( _
ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Function ShowTitleBar(ByVal bState As Boolean)
Dim lStyle As Long
Dim tR As RECT

' Get the window's position:
GetWindowRect Me.hwnd, tR

' Modify whether title bar will be visible:
lStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
If (not bState) Then
Me.Caption = Me.Tag
If Me.ControlBox Then
lStyle = lStyle Or WS_SYSMENU
End If
If Me.MaxButton Then
lStyle = lStyle Or WS_MAXIMIZEBOX
End If
If Me.MinButton Then
lStyle = lStyle Or WS_MINIMIZEBOX
End If
If Me.Caption <> "" Then
lStyle = lStyle Or WS_CAPTION
End If
Else
Me.Tag = Me.Caption
Me.Caption = ""
lStyle = lStyle And Not WS_SYSMENU
lStyle = lStyle And Not WS_MAXIMIZEBOX
lStyle = lStyle And Not WS_MINIMIZEBOX
lStyle = lStyle And Not WS_CAPTION
End If
SetWindowLong Me.hwnd, GWL_STYLE, lStyle

' Ensure the style takes and make the window the
' same size, regardless that the title bar etc
' is now a different size:
SetWindowPos Me.hwnd, _
0, tR.Left, tR.Top, _
tR.Right - tR.Left, tR.Bottom - tR.Top, _
SWP_NOREPOSITION Or SWP_NOZORDER Or SWP_FRAMECHANGED

Me.Refresh

' Ensure that your resize code is fired, as the client area
' has changed:
Form_Resize

End Function

To try out the hiding and showing the title bar, add a CheckBox to the project's form. Set the check box's Value property to 1 (Checked). Then put the following code under the Check box's click event:

Private Sub Check1_Click()
If (Check1.Value = Checked) Then
ShowTitleBar True
Else
ShowTitleBar False
End If
End Sub

When you click on the check box, the form's titlebar will be alternately hidden and shown.

vbAccelerator - HiWords and LoWords from Long Values

vbAccelerator - HiWords and LoWords from Long Values:

When translating C code to VB, you quite often come across the HiWord and LoWord operators, used to pack two integers into a long value. A simple translation of HiWord code will run into difficulties when unsigned integer arithmetic is being used in the C code and the highest bit of the long value can be set. Since VB doesn't support unsigned arithmetic we have to strip out the high bit and add it back again later to avoid overflows and misleading results.

Start a new project then add a module. Add the following code to the module:

Public Property Get LoWord(ByRef lThis As Long) As Long
LoWord = (lThis And &HFFFF&)
End Property

Public Property Let LoWord(ByRef lThis As Long, ByVal lLoWord As Long)
lThis = lThis And Not &HFFFF& Or lLoWord
End Property

Public Property Get HiWord(ByRef lThis As Long) As Long
If (lThis And &H80000000) = &H80000000 Then
HiWord = ((lThis And &H7FFF0000) \ &H10000) Or &H8000&
Else
HiWord = (lThis And &HFFFF0000) \ &H10000
End If
End Property

Public Property Let HiWord(ByRef lThis As Long, ByVal lHiWord As Long)
If (lHiWord And &H8000&) = &H8000& Then
lThis = lThis And Not &HFFFF0000 Or ((lHiWord And &H7FFF&) * &H10000) Or &H80000000
Else
lThis = lThis And Not &HFFFF0000 Or (lHiWord * &H10000)
End If
End Property


vbAccelerator - System Internet Connection - Determining How and If Connected

vbAccelerator - System Internet Connection - Determining How and If Connected:


If you are designing a project which can use an Internet connection, it can be useful to know whether the system is connected or not. There are various methods of doing this, however the most informative and reliable method is to use the WinInet.DLL InternetGetConnectedStateEx API call. The only problem with this call is it is only implemented for the WinInet.DLL version shipped with Internet Explorer version 4.0 or higher.

To test out this function, start a new project and add the following code:

Public Declare Function InternetGetConnectedStateEx Lib "wininet.dll" _
Alias "InternetGetConnectedStateExA" _
(ByRef lpdwFlags As Long, _
ByVal lpszConnectionName As String, _
ByVal dwNameLen As Long, _
ByVal dwReserved As Long _
) As Long

Public Enum EIGCInternetConnectionState
INTERNET_CONNECTION_MODEM = &H1&
INTERNET_CONNECTION_LAN = &H2&
INTERNET_CONNECTION_PROXY = &H4&
INTERNET_RAS_INSTALLED = &H10&
INTERNET_CONNECTION_OFFLINE = &H20&
INTERNET_CONNECTION_CONFIGURED = &H40&
End Enum

Public Property Get InternetConnected( _
Optional ByRef eConnectionInfo As EIGCInternetConnectionState, _
Optional ByRef sConnectionName As String _
) As Boolean
Dim dwFlags As Long
Dim sNameBuf As String
Dim lR As Long
Dim iPos As Long
sNameBuf = String$(513, 0)
lR = InternetGetConnectedStateEx(dwFlags, sNameBuf, 512, 0&)
eConnectionInfo = dwFlags
iPos = InStr(sNameBuf, vbNullChar)
If iPos > 0 Then
sConnectionName = Left$(sNameBuf, iPos - 1)
ElseIf Not sNameBuf = String$(513, 0) Then
sConnectionName = sNameBuf
End If
InternetConnected = (lR = 1)
End Property

To try out the code, add a CommandButton and a Multi-Line TextBox to your test project's main form. Then add the following code to try the function:

Private Sub Command1_Click()
Dim eR As EIGCInternetConnectionState
Dim sMsg As String
Dim sName As String
Dim bConnected As Boolean

' Determine whether we have a connection:
bConnected = InternetConnected(eR, sName)

' The connection state info parameter provides details
' about how we connect:
If (eR And INTERNET_CONNECTION_MODEM) = INTERNET_CONNECTION_MODEM Then
sMsg = sMsg & "Connection uses a modem." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_LAN) = INTERNET_CONNECTION_LAN Then
sMsg = sMsg & "Connection uses LAN." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_PROXY) = INTERNET_CONNECTION_PROXY Then
sMsg = sMsg & "Connection is via Proxy." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_OFFLINE) = INTERNET_CONNECTION_OFFLINE Then
sMsg = sMsg & "Connection is Off-line." & vbCrLf
End If
If (eR And INTERNET_CONNECTION_CONFIGURED) = INTERNET_CONNECTION_CONFIGURED Then
sMsg = sMsg & "Connection is Configured." & vbCrLf
Else
sMsg = sMsg & "Connection is Not Configured." & vbCrLf
End If
If (eR And INTERNET_RAS_INSTALLED) = INTERNET_RAS_INSTALLED Then
sMsg = sMsg & "System has RAS installed." & vbCrLf
End If

' Display the connection name and info:
If bConnected Then
Text1.Text = "Connected: " & sName & vbCrLf & vbCrLf & sMsg
Else
Text1.Text = "Not Connected: " & sName & vbCrLf & vbCrLf & sMsg
End If

End Sub

Run the project. When you click the command button, the text box will be updated with the status of the current connection, the name of RAS dial-up connection used (if applicable) and also various information about how the connection is being achieved (i.e. by modem or LAN, via a proxy and whether the connection is configured or not).

Register and unregister type libraries

Register and unregister type libraries:


Register and unregister type libraries
All COM-oriented VB developers know how to register and unregister an ActiveX DLL, using the REGSVR32 utility. However, there is no such an utility to register and unregister a type library.

You can quickly build your own TLB Registration utility with a handful of statements, thanks to the undocumented TLBINF32.DLL library that is silently installed with Visual Basic 5 and 6. Just add a reference to the 'TypeLib Information' library in the References dialog, and then invoke one of these two functions:


' Register a type library

Sub RegisterTypeLib(ByVal TypeLibFile As String)
Dim TLI As New TLIApplication
' raises an error if unable to register
' (e.g. file not found or not a TLB)
TLI.TypeLibInfoFromFile(TypeLibFile).Register
End Sub

' Unregister a type library

Sub UnregisterTypeLib(ByVal TypeLibFile As String)
Dim TLI As New TLIApplication
' raises an error if unable to unregister
TLI.TypeLibInfoFromFile(TypeLibFile).UnRegister
End Sub

Registering COM Components (*.dll) and Type Libraries (*.tlb)

Registering COM Components (*.dll) and Type Libraries (*.tlb):

In order to run this tech tip you need following things:
(a) VB5 or VB6
(b) Reference to Type Lib information object component (TLIBINF32.dll).
This function takes in the name of the com component (or dll) or the type library which needs to be registered.


Private Function RegisterTypeLib(ByVal strTypeLibName As String) As Boolean

On Error GoTo ErrorHandler

Dim pTypeLibInfo As TLI.TypeLibInfo ' Pointer to TypeLibrary Info object

If (strTypeLibName = '') Then
MsgBox 'Select a Type library file to register ...', vbInformation +
vbOKOnly, 'File Selection Error'
RegisterTypeLib = False
Exit Function
End If

' Get the pointer to type library information for the specified file
Set pTypeLibInfo = TypeLibInfoFromFile(strTypeLibName)

' Register the Type Library from the system registry
pTypeLibInfo.Register

' Release the reference to this typelib object
Set pTypeLibInfo = Nothing
RegisterTypeLib = True
Exit Function

ErrorHandler:

' Display the complete error message
MsgBox 'Number : ' & Err.Number & vbCrLf & _
'Description : ' & Err.Description & vbCrLf & _
'Source : ' & Err.Source & vbCrLf & _
'Help File : ' & Err.HelpFile & vbCrLf & _
'Last DLL Err: ' & Err.LastDllError & vbCrLf, vbCritical + vbOKOnly,
'Register Type Lib Error'
' Release the reference to this typelib object
Set pTypeLibInfo = Nothing
RegisterTypeLib = False

End Function

Desaware Inc.- Articles: Components and Tools for Microsoft Visual Studio Developers

Desaware Inc.- Articles: Components and Tools for Microsoft Visual Studio Developers

Desaware Inc.- Articles: Components and Tools for Microsoft Visual Studio Developers:

Private Sub cmdWatch_Click()

Dim ProcessId&

Dim hProcess&
Dim ExitCode&
ProcessId = Shell('project1.exe', vbNormalFocus)
hProcess = OpenProcess(PROCESS_QUERY_ INFORMATION, _
False, ProcessId)
cmdWatch.Enabled = False
Do
Call GetExitCodeProcess(hProcess, ExitCode)
DoEvents
Loop While (ExitCode = STILL_ACTIVE)
cmdWatch.Enabled = True
Call CloseHandle(hProcess)
End Sub

Humor: Balls

Humor:

When Blue Collar workers get together, they talk about football...

When Middle Management get together, they talk about tennis...

When Top Management get together, they talk about golf...

Logical Conclusion: The higher up you are in management, the smaller your balls are

sql: null, empty rows

DECLARE @Message VARCHAR(100)

SET @Message = 'Michael'

SELECT TOP 1 @Message = Message FROM BroadcastedPendingMessage ORDER BY DateTimeCreated


PRINT @Message
----------
what will be the output of @Message if the BroadcastedPendingMessage has no rows?

is it NULL or Michael

answer:

Michael

Saturday, May 28, 2005

quote

"If at first you don't succeed, destroy all evidence that you tried."

"If at first you do succeed, try not to look astonished"

Friday, May 27, 2005

A Gentle Introduction to SQL

Handy Dandy Guides - MD5 and passwords

Handy Dandy Guides - MD5 and passwords

algorithm

since nagka-net uli ako d2 s bahay, andami ko gusto pag-aralan. like compression, indexing, language parser. gusto ko unahin yung compression. isang estudyante lng sa ama kilala ko may alam ng compression algorithm, and may ginawan pa sya ng thesis about compression. it's taking me years na, hanggang ngayon di ko maimplement yan, in plain english madali maintindihan yung principle, pero yung implementation ang mahirap. since nagka-net ako d2, halos araw-araw nagbabasa and nagreresearch ako ng algorithm para makagawa ng proof of concept. hindi ko pag-aaralan yan kung tingin ko hindi ko kaya, pero tingin ko kaya ko pag-aralan yan

NG BBS - Why cant MD5 be decoded?

NG BBS - Why cant MD5 be decoded?: "MD5 is impossible to reverse because of the way it is implemented. I suggest you look into the RFCs if you want more info.

It can't be decoded, it can be -cracked- and that's it. Also, breaking a hash is known when you find a way to get collisions a lot sooner than expected. So, that means, you would have to get the MSG Digest of 3.40282367 * 10e38 to find an MD5 collision, if you find a way to get a collision in less hashes, you've broken the hash, not decrypted, broken.

Fact: MD5 uses Hexadecimal, which is a radix 16, fact, MD5 produces a 128-bit hash digest AKA 32-bytes. This means, that you can have a 16^128 MD5 different hashes, and I believe the amount of atoms in the universe is supposedly a googol, which is WAY less, so good luck on working out the algorithm that way.

MD5 first off pads the stuff it's hashing, so you've got a 25meg file, it goes down to 64 bytes, and the rest of it (25536 bytes lost), so if you can find a way to reverse this and regenerate all that lost data, then please, do so.
MD5 also uses Modulus division on it's subject and XORs it, so finding that is also impossible, yes, it is, you can't reverse modulus.

MD5 is otherwise, just padding and a lot of bitwise operations, and for future reference, MD5 was NEVER ment for stuff like passwords, the man who developed it at MIT gave it one purpose: to use it as a checksum algorithm.

MD5 isn't the safest thing out there, I believe SHA1 is much safter."

Wednesday, May 25, 2005

Slashdot | Really Remote Internet Access. Skype speed over satellite

Slashdot | Really Remote Internet Access: "Re:Performance of Skype over Sat? (Score:5, Interesting)
by epiphani (254981) on Tuesday May 24, @08:20PM (#12629479)
I looked at satalite access a few years ago when I was looking at buying a house too far out of town to get broadband.

Geosynchronous Orbit is at 35,786 Kilometers. It takes light 120ms to get from earth to a geosync satalite. (source [uchicago.edu]).
Hence, 240ms round trip. Back and forth, you to your provider. Another 240ms to get a responce.

The only reason I'd consider satalite access would be for bulk downloads. 540ms on an ssh session would quickly drive me insane.

So add that half second to whatever routing overhead there is involved in skype (I usually see about .3 to .6 of a second delay, talking to people within a few hundred kilometers). I'd say, all in all, pretty crappy experience.

But its better than nothing I suppose."

Tuesday, May 24, 2005

pag-uwi sa bahay mag-co-code pa rin

meron pa rin mga business location na hindi available ang broadband internet. so kailangan i-facilitate namin sa isang branch ng starhonda na pwede mag-work offline and i-upload ang data sa hapon

Monday, May 23, 2005

Professor George Dantzig, Stanford Operations Research Dept.

Professor George Dantzig, Stanford Operations Research Dept.: "Linear programming and its offspring (such as nonlinear constrained optimization and integer programming) have come of age and have demonstrably passed this test, and they are fundamentally affecting the economic practice of organizations and management. Computer scientist Laszlo Lovasz said in 1980, 'If one would take statistics about which mathematical problem is using up most of the computer time in the world, then (not including database handling problems like sorting and searching) the answer would probably be linear programming.' That same year, Eugene Lawler of Berkeley offered the following summary: 'It [linear programming] is used to allocate resources, plan production, schedule workers, plan investment portfolios and formulate marketing (and military) strategies. The versatility and economic impact of linear programming in today's industrial world is truly awesome.'"

ang sarap ng feeling na independently makahanap ka ng solution sa problem

Slashdot | George Dantzig, 1914-2005:

"Kids in a second grade class in Brunswick, Germany were asked to sum all integers from 1 to 100. That should have kept them busy for a while but some 8-year old boy - son of a peasant gardener - said in bored voice: 'the result is 5050 of course, 50 times 101 '. His name was Gauss."

1 to 100 = 5050

100 / 2 = 50
100 + 1 = 101
50 * 101 =5050


1 to 10 = 55

10 / 2 = 5
10 + 1 = 11
5 * 11 = 55

my own experience in solving these same problem:

realty surcharging scheme: say 7 months late, they compound
penalty starting from 7 months downto 1 month. that is:

7 + 6 + 5 + 4 + 3 + 2 + 1

so 28 months of penalty

my client in realty did it manually to compute surcharge for delayed payment:

then i independently come with this formula on my own:

= (n * (n + 1)) / 2

= (7 * 8) / 2

= 28

how to regsvr32 through code

Dynamic web pages with ActiveX and VBScript:

Can I register/unregister an ActiveX through a right-click in Windows Explorer?

Tip given here:

REGEDIT4

[HKEY_CLASSES_ROOT\.dll]
"Content Type"="application/x-msdownload"
@="dllfile"

[HKEY_CLASSES_ROOT\dllfile]
@="Application Extension"

[HKEY_CLASSES_ROOT\dllfile\Shell\Register\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\dllfile\Shell\UnRegister\command]
@="regsvr32.exe /u \"%1\""

[HKEY_CLASSES_ROOT\.ocx]
@="ocxfile"

[HKEY_CLASSES_ROOT\ocxfile]
@="OCX"

[HKEY_CLASSES_ROOT\ocxfile\Shell\Register\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\ocxfile\Shell\UnRegister\command]
@="regsvr32.exe /u \"%1\""

Registering an OCX through code

Your DLLs and OCXs have a built in DllRegisterServer function so you can register them thru code as follows:

Declare Function RegMyDll Lib "MyDll.dll" Alias "DllRegisterServer"() as Long
[...]
Dim lResult as Long
lResult = RegMyDll()

To find if an Active X is registered you must look up the Windows registry. The easiest way is to search for a file name: MyOCX.DLL. If it is registred the reference to it will be in the registry under HKEY_CLASSES_ROOT\TypeLib\{ITS GUID} . This is non-trivial. Different types of DLLs register somewhat differently, and the exact entries created are based in part on the OS version.
Loading an OCX through code

Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal _
lpLibFileName As String) As Long

Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As
Long) As Long

Private Sub Form_Click()
If IsDLLAvailable("SHDOCVW.dll") Then
MsgBox "OK"
Else
Beep
' MsgBox ApiErrorText(Err.LastDllError)
' for ApiErrorText, see:
http://www.mvps.org/vb/index2.html?tips/formatmessage.htm
End If
End Sub

Function IsDLLAvailable(ByVal DllFilename As String) As Boolean
Dim hModule As Long
' attempt to load the module
hModule = LoadLibrary(DllFilename)
If hModule > 32 Then
FreeLibrary hModule ' decrement the DLL usage counter
IsDLLAvailable = True
End If
End Function

Checking if an OCX is available

If you know the OCX's CLSID, you can use this code:

Public Type CLSID '// This is the same as a GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type

'// Possible errors
Public Const E_INVALIDARG As Long = &H80070057
Public Const E_UNEXPECTED As Long = &H8000FFFF
Public Const CO_E_CLASSSTRING As Long = &H800401F3
Public Const E_OUTOFMEMORY As Long = &H8007000E
Public Const REGDB_E_WRITEREGDB As Long = &H80040151

Public Declare Function CLSIDFromProgID Lib "OLE32" (ByVal lpszProgID As String, pclsid As CLSID) As Long

Public Function IsProgIDRegistered(ByVal strProgID As String) As Boolean
'// a ProgID goes something like this: "MSComctlLib.Slider". Passing a
'// bogus value or a non-registered class will return FALSE
Dim pclsid As CLSID
Dim hResult As Long

On Error Resume Next

hResult = CLSIDFromProgID(StrConv(strProgID, vbUnicode), pclsid)
IsProgIDRegistered = (hResult = 0)
End Function

Instead of peeking in the Registry, we'll try to load the OCX, and catch an error if it's not available:

Function TestReg (ByVal sProgID As String) As Boolean
On Error GoTo Trap
Dim oMyObject As Object
Set oMyObject = CreateObject(sProgID)
TestReg = True
Trap:
End Function

Dynamic web pages with ActiveX and VBScript

Using Recordset::GetString()

Sunday, May 22, 2005

ADOdb Date Time Library | PHP Everywhere

ADOdb Date Time Library | PHP Everywhere:

This library replaces native functions as follows:

getdate() with adodb_getdate()
date() with adodb_date()
gmdate() with adodb_gmdate()
mktime() with adodb_mktime()
gmmktime() with adodb_gmmktime()
strftime() with adodb_strftime() # added in Feb 2005
gmstrftime() with adodb_gmstrftime() # added in Feb 2005


Y2038 bug may hit Unix, Linux machines

Saturday, May 21, 2005

INFO: Remote Data Services (RDS) Objects Do Not Maintain State

SouthWare: Providing accounting & e-commerce software solutions

SouthWare: Providing accounting & e-commerce software solutions: "Know how average cost is calculated
Average cost for each stock item is calculated as a weighted moving average. The formula is:

(Curr. Avg. Cost x Prev. Quant.) + (New Cost x New Quant.) = Total Cost

Total Cost / (Prev. Quant + New Quant.) = New Avg. Cost

For example, say that an item's current average cost is $50 and that you have 40 on hand. Now you receive in a shipment of 100 @ $52 each. The calculation of the new average cost is:

[(50 x 40) + (52 x 100)] / (40 + 100) = [7200] / 140 = $51.43

This is the most commonly used method of costing because it most accurately reflects the actual cost you paid for the items you are selling."

Sun.Star Davao - The Manila Baywalk

Sun.Star Davao - The Manila Baywalk

IF YOU'RE in Manila and needs a nice, inexpensive place to while away a late afternoon or an early evening and really enjoy it, try The Baywalk.

The Baywalk is actually the promenade along Roxas Boulevard by the Manila Bay, which had been avoided by people for decades for being a blight where bag snatchers, pickpockets, and cheap prostitutes abound--a virtual muggers' paradise, according to columnist Conrado de Quiros

Now for Manila visitors from the provinces who don't have the means to splurge in the giant malls, classy resto bars and posh cafe's of Ortigas, Glorietta, Greenbelt and Rockwell in Makati, and the Eastwood in Libis, Baywalk is the best place to be. You get entertained and fed to your hearts' content at only 20 to 30 percent of the usual prices.

Enjoying The Baywalk was one of the exciting things we did last summer, courtesy of Globe Telecom, which invited us to a virtual junket to Laguna, Tagaytay City and other tourists spots near Manila after covering the Globe's annual stockholders meeting.

The fantastic project rose three years ago as part of Manila Mayor Lito Atienza's multi-billion peso program to reinvigorate the nation's premier city.

Bernie Ang, an undefeated opposition councilor, representing Binondo, thinks that the Baywalk is "one of the best things that have happened to the great effort to halt the urban decay of Manila."

After beautifying the place and making it safe for promenaders, the Baywalk started to teem with humanity--from 30,000 to 40,000 people on week days and three times as many on weekends and holidays--to view the world famous sunset by Manila Bay, savor the local and international cuisine served by about two dozens eateries, actually branches of Manila's big restaurants, and enjoy the music provided by live bands (Each restaurant has one such band).

To give us an idea of the brisk commerce in the area, especially the spot fronting the Rajah Sulayman Park beside the old but still extremely popular Aristocrat restaurant, Councilor Ang said one eatery has an average sale of between P50,000 to P80,000 a day, which starts at 3 p.m. and knocks off at 3 a.m.

On Valentine's Day, the average income of each restaurant was P200,000, according to Councilor Ang, who operates Yakitori, one of the eateries.

The area is very peaceful, although strangely one can't see a single uniformed policeman. Beggars and hookers are banned, but hundreds of manicurists, massagists, shoeshine boys and even street clowns, jugglers, mimes and magicians are allowed to do their acts to the delight of children and adults alike.

Councilor Ang, who is a close friend of Davao City Vice Mayor Louie Bonguyan, estimates that the promenade must be directly employing more than a thousand Manilans as cooks, kitchen attendants, waiters and waitresses, guards, errand boys, janitors and musicians.

AllAPI.net - Your #1 source for using API-functions in Visual Basic!

Thursday, May 19, 2005

Much ADO About Data: Doing the Impossible (Again)

[ph-linux-newbie] postgres database migration

[ph-linux-newbie] postgres database migration: ">

gusto kong i transfer ang postgre database file ko sa >kabilang unit, i know it is possible, kaya lang di ko >pa alam kung paano gagawin. > >can anyone help paano ko ma transfer ang database file >ko. ========================================================= try mo (as postgres user):
1] pg_dump db_name | gzip > filename.dump.gz #dump database
2] scp filename.dump.gz new_server:. #copy file to new_server
3] createdb db_name
4] gunzip -c filename.dump.gz | psql db_name #upload"

Richest, poorest solons known - INQ7.net

Random Whimsy: Uncensored Interview with Dan Lok

Kaushal A. Patel

Kaushal A. Patel: "Simplest way to Create and Deploy Web Services

Introduction

Tools Used: .net SDK
How to use: This article explains how to create and deploy a simple webservice .To use the sample code, one needs to have .net SDK installed.A text editor is enough to build and test the codes.

Creating a Simple Web Service:

1. Create a folder named Webservice under wwwroot
2. Create a File

<%@ WebService Language='c#' Class='AddNumbers'%>

using System;

using System.Web.Services;

public class AddNumbers :

WebService{[WebMethod]

public int Add(int a, int b)

{int sum;sum = a + b;return sum;}

}

3. Save this file as AddService.asmx [asmx-> file extension]

4. Now the webservice is created and ready for the clients to use it.

5. Now we can call this webservice using http://ipddress/Webservice/Addservice.asmx/Add?a=10&b=5

This will return the result in XML format

Deploying the Web Service on the Client Machine:

1.At the command prompt:WSDL http://ip address ofthe site/WebService/MathService.asmx /n:NameSp /out:FileName.cs]

-This will create a file called FileNmame.cs .

WSDL -> WebServices Description Language (This is an application available at C:\Program Files\Microsoft.NET\FrameworkSDK\Bin)

NameSp -> Name of the NameSpace which will be used in client code for deploying the webservice.

2.Compilation

CSC /t:library /r:system.web.dll /r:system.xml.dll CreatedFile.cs

This will create a dll with the name of the public class of the asmx file.(In our case, it is 'AddNumbers.dll')

CSC is an application available at C:\WINNT\Microsoft.NET\Framework\v1.0.2914

3.Put the dll file inside WWWRooT\BIN [Create a BIN Folder in WWWRoot]

Making use of WebService in client asp/aspx page

<%@ import Namespace = 'NameSp' %>"

The Greatest Copywriters includes Psychological Tactics by Dan Lok, Confessions Of A Website Copywriter, The Golden Book of Proof by Brett McFall, 10

The Greatest Copywriters includes Psychological Tactics by Dan Lok, Confessions Of A Website Copywriter, The Golden Book of Proof by Brett McFall, 10 Steps To Killer Web Copy" by Louis Allport and Internet Copycatting.: "You see, Dan Lok is the World's First Quick-Turn Marketer, an unsurpassed success in the competitive world of buying and selling, with a proven track record of selling over $17.3 million dollars of merchandise and services! His skills are so sharply honed that it wouldn't be surprising if he sold ice to the Eskimos…at a premium price!!!"

No-Holds-Barred Conversations with Dan Lok - Part 2

No-Holds-Barred Conversations with Dan Lok - Part 2: "No-Holds-Barred Conversations with Dan Lok - Part 2
by: Dan Lok

Question: How to deal with ultra skeptical offline or be it Internet surfers in order to reassure them and get them to happily open up their wallets?

I like that happily open up their wallets! Your customer should be happy to open his/her wallet. When business is done right, everybody wins and nobody loses. You're happy to make a sale and your customer is happy to be getting a good value for the money.

Herere a small list of things you can do to remove skepticism.

* Use testimonials
* Show a photo of yourself
* Show a photo of your products
* Show a photo of your office
* State your complete address and contact information
* Use testimonials (Again!)
* Use flash audio buttons on your website.
* Do an introduction.
* Speak their language. (This goes back to understanding of your target market. If youre selling to golfer, there are buzzwords and 'in-speak' that is specific to their game. Use those in your sales letter.)
* Understand their hot buttons and push them hard. When you hit them on the right spots, a lot of them will simply ignore the skepticism.
* If youre selling moneymaking staff, see if you can prove your claims by showing bank statements, checks... etc.
* Write down every single possible objection your prospects might have, and address, confront, and annihilate EACH one of the objections in your sales letter. (Common objections include: I dont need your stuff, I dont have money, I dont have to act now, etc)
* Offer a money-back guarantee and HONOR it
* Use testimonials (This is not a joke, you can never have too many testimonials)
* Tell a story in your sales letter. (People may mistrust a sales pitch, but they never doubt a story. )
* Create a killer order form. When they should be pushing hard to close, most copywriters weaken in the order form. You need to sell as hard on your order form as throughout your sales letter."

Tuesday, May 17, 2005

RFID - Radio Frequency Identification

RFID Journal - RFID (Radio Frequency Identification) News & Features

Performance: Fastest string reversing algorithms... (final results)

Performance: Fastest string reversing algorithms... (final results)


private static string ReverseUsingCharArrayCopy(string input) {
char[] reversed = input.ToCharArray();

for(int i = 0, j = reversed.Length - 1; i < j; i++, j--) {
reversed[j] = input[i];
reversed[i] = input[j];
// char temp = reversed[i];
// reversed[i] = reversed[j];
// reversed[j] = temp;
}
return new String(reversed);
}


private static string ReverseUsingCharArrayInline(string input) {
char[] reversed = new char[input.Length];
for(int i = 0, j = reversed.Length - 1; i <= j; i++, j--) {
reversed[i] = input[j];
reversed[j] = input[i];
}
return new String(reversed);

}


private static string ReverseUsingStringBuilderInline(string input) {
StringBuilder sb = new StringBuilder(input);
for(int i = 0, j = input.Length - 1; i <= j; i++, j--) {
sb[i] = input[j];
sb[j] = input[i];
}
return sb.ToString();
}


unsafe static void ReverseString(string source)
{
int y=source.Length-1;
int mid=source.Length/2;
fixed(char* sfixed=source)
{
char* s=sfixed;
char t;
for(int x=0; x{
t=s[x];
s[x]=s[y];
s[y]=t;
} }
}


# re: Performance: Fastest string reversing algorithms... (final results) 6/12/2004 3:54 PM Justin Rogers

for unsafe code:

One of the tenets of the first competition was that thread safety was a must. Your method, for obvious reasons is not thread safe because you overwrite the string in place. If, however, you copied your string, then everything would be fine, so I'll take your algorithm and append a string output = string.Copy(input);, and then work over the copied string. That'll prove it to be thread safe.

Another thing to note is that since we are making a proper copy of the string first, and we are not changing the contents of the string, only the ordering, we can hopefully disregard negative side effects of using the NLS bits...

I'll make a posting later with the methods devised, there are faster versions of the algorithm than what you posted when using unsafe code.

Run a second console app and read its output.

Run a second console app and read its output.: "using System;

using System.Diagnostics;

namespace ConsoleApplication8

{

class Class1

{

static void Main(string[] args)

{

ProcessStartInfo proc = new ProcessStartInfo(); / a process holder */

proc.FileName = 'ping.exe';

proc.RedirectStandardInput = false;

proc.RedirectStandardOutput = true;

proc.Arguments = '127.0.0.1';

proc.UseShellExecute = false; /*do not show console for the process - a must*/

Process p = Process.Start(proc);

string res;

res = p.StandardOutput.ReadToEnd();

System.Console.WriteLine(res);

p.WaitForExit(); /*wait indefinitely for the associated process to exit*/

}

}

}

"

VB Helper: HowTo: Quickly read and write a binary file to and from an array

VB Helper: HowTo: Quickly read and write a binary file to and from an array:


Private Sub cmdWriteValues_Click()
Dim file_name As String
Dim file_length As Long
Dim fnum As Integer
Dim bytes() As Byte
Dim txt As String
Dim i As Integer
Dim values As Variant
Dim num_values As Integer

' Build the values array.
values = Split(txtValues.Text, vbCrLf)
For i = 0 To UBound(values)
If Len(Trim$(values(i))) > 0 Then
num_values = num_values + 1
ReDim Preserve bytes(1 To num_values)
bytes(num_values) = values(i)
End If
Next i

' Delete any existing file.
file_name = txtFile.Text
On Error Resume Next
Kill file_name
On Error GoTo 0

' Save the file.
fnum = FreeFile
Open file_name For Binary As #fnum
Put #fnum, 1, bytes
Close fnum

' Clear the results.
txtValues.Text = ''
End Sub


To read the file, open the file for binary access its length as its record size. Use Get to read the whole array at once.


Private Sub cmdReadValues_Click()
Dim file_name As String
Dim file_length As Long
Dim fnum As Integer
Dim bytes() As Byte
Dim txt As String
Dim i As Integer

file_name = txtFile.Text
file_length = FileLen(file_name)

fnum = FreeFile
ReDim bytes(1 To file_length)

Open file_name For Binary As #fnum
Get #fnum, 1, bytes
Close fnum

' Display the results.
For i = 1 To file_length
txt = txt & Format$(bytes(i)) & vbCrLf
Next i
txtValues.Text = txt
End Sub

Correct usage for binary compatibility settings

Correct usage for binary compatibility settings:

Correct usage for binary compatibility settings
When working on an updated version of a COM component, you should always enforce Binary Compatibility in the Component tab of the Project Properties dialog box. When enforcing binary compatibility there are a number of common mistakes that you should stay clear of:

1. Always use the last EXE or DLL that was distributed with the application as the reference file. Using as the reference file an executable that was created after the last public build of the component typically causes the new executable to contain many interfaces that were the result of ad-interim compilation commands, that are then automatically inserted in the Registry when the component is registered on the customer's machine, but that are never actually used because no client is aware of them.

2. Never compile to the same executable file used as the reference file in the Binary Compatibility dialog box. In same cases Visual Basic will prevent you from doing that anyway, because of a bug in the IDE that leaves that file open between subsequent compilations. You can achieve this by making a first compilation and then renaming the EXE, or by moving it to another directory, e.g. \Release or \Reference.

3. Whenever you distribute a new version of the component, have the Binary Compatibility dialog box point to this new file as the reference file. This is especially important, even if the new version of the component is binary compatible with the old versione. To explain why this is important, imagine this scenario:

(a) You define a first version of your component with 4 methods, and use the resulting EXE file as the reference file in the Binary Compatibility dialog box
(b) You then create a new version 2 of the component, which now uses 5 methods but doesn't alter the first four methods. This new component is considered to be compatible with the first one, and old client will work against the new version.
(c) you create a new version 3 of the component, without making version 2 of the component the reference file in the Binary Compatibility dialog box. This newer version changes the signature of the 5th method: since VB is still using the component's version 1 as its reference for binary compatibility, it accepts the signature change without raising any warning, but the neat result is that clients compiled against version 2 will crash when they execute against version 3.

UPDATE

A VB2TheMax visitor asked some extra advice about when and how the file used as a reference should be replaced by a newer version. Ideally, you should never overwrite the file used for binary compatibilty, because it's the copy of the EXE or DLL file that has been deployed to your customers. In practice, there are a few cases when you need to replace the referenced file with a newer version. You can do the replacement from Windows Explorer, if possible after closing the VB environment. These are the most common cases when this is necessary:

1. You have broken the binary compatibility: in this case you should create another EXE file with all the new classes, methods, interfaces, etc., compile it once and use it as the new reference. In this case, however, the new file should have a different executable name, so you don't really overwrite the old one.
2. You have delivered a new version of the component to your customers. In this case you copy the newest EXE or DLL over the file used for binary compatibility reference, and continue to develop the component.
3. You decide that you don't want or need to support older clients any longer. In this case you manually set binary compatibility to None (so that VB generates a new set of CLSIDs and discard all the IDs from previous, intermediate versions), compile to an executable file, and then reinforce binary compatibility using this latest file as the reference executable.

Monday, May 16, 2005

Postgres FAQ: "insensitive"

Scalabium: software protection's tips

Sunday, May 15, 2005

"Learn from the mistakes of others. You can't make them all yourself." -- USHER

Slashdot | 'Most Important Ever' MySQL Reaches Beta

Slashdot | 'Most Important Ever' MySQL Reaches Beta: "# So, to the educated masses: can anyone speculate about this releases capabilities? The list of requirements would be: 550GB, projected to be 1TB by 2007?
# 2500 tables
# Full-text searching in approximately 1500 tables
# Queries that routinely join 25-150 tables
# ~800 stored procedures
# ~1500 views
# ~1000 triggers
# 500-750 inserts/updates per second average, 20000 inserts per second peak, (approximately 40M new rows per day)
# 1800-2500 queries per second average, 15000 queries per second peak


Is MySQL 5.x the answer to my prayers? Or just a cruel reminder of why MS software costs what it does?"

Sybase Inc - Adaptive Server Enterprise for Linux Download Page

too many eyes, too many ears, too many mind -- the last samurai

instead we must narrow focus, things that will keep you in synch with your goal and objectives. life is so short


another wisdom to ponder:

pwede mo i-filter na yung mga safe lang na endeavors ang i-te-take mo. pero pag may nangyaring unfortunate baka hindi ka prepare, better na you must learn to act fast and conquer the fear, and para kaya mo mag-solve ng problem on the fly

kadalasan kung di ko makita sa sarili ko ang sagot, tumitingin ako sa iba

-- rudy

HOWTO: Subclass a UserControl

ANSI SQL-92 Compatibility

ANSI SQL-92 Compatibility: "ANSI SQL-92 Compatibility

I have been doing some testing of Sybase T-SQL code that could quite easily be migrated to Microsoft SQL Server. Of course, the horrible *=, =* join syntax is still used, among other things.

How can you decide if the code that is there is really appropriate?

One was is to enforce ANSI SQL-92 standards. Well, each DB vendor implements ANSI SQL-92, on their own terms. SQL Server supports functionality that Oracle or Sybase decided to leave out, and visa versa. Fun.

Well, for SQL Server, to test if the code is actually compatible to Microsoft's subset of ANSI SQL-92, there is a SET option to warn you.

SET FIPS_FLAGGER

Great name, but FIPS (Federal Information Processing Standard) 127-2, the standard for computer systems purchased by the United States government, is what Microsoft has decided to enforce. FIPS 127-2 is based on ANSI SQL-92. So we have a Standard, based on a Standard, based on a Standard.

Books online has a bit of information on this SET option, but there is nothing that says exactly was is expected in each level. I guess, if you want to be sure the code will work reasonably well across DB vendors, Full is your only option.

SET FIPS_FLAGGER 'FULL' really takes your code and tells you that it is crap. Don't look at the output if you are having a bad day.

ANSI SQL-99.....well, that is finding it's way into SQL Server 2005 and I am not picking on that yet."

Saturday, May 14, 2005

Dot Net Technologies - SQL Tips

Dot Net Technologies - SQL Tips: "So, you want to get the value of an identity column after an insert so you can update the UI or use it in another procedure. You've been using @@IDENTITY for ages, and it has worked fine. But today, you're getting a new value. What's up?

There are 3 (or more if you want to consider queries or identity tables) methods for getting the identity value from a table after an insert. The methods are @@IDENTITY, SCOPE_IDENTITY() and IDENT_CURRENT(). What's the difference?

@@IDENTITY gets the last inserted identity value. The problem is, in a high-volumn environment or one with triggers, it may not be the value you are expecting.

The SCOPE_IDENTITY() function gets the last identity inserted within the same scope (e.g. inside the procedure you're running). This is useful especially when your table has triggers which might do another insert. You'll only get the identity value of your change, not the trigger's.

The IDENT_CURRENT('table_name') returns the last identity value for the specified table, regardless of scope.

So, for safety in your routines, if you want the value YOU inserted, try the SCOPE_IDENTITY function for safety!"

System Tables

Chapter 1: System Catalog

O'Reilly Radar > Google Web Accelerator considered overzealous

O'Reilly Radar > Google Web Accelerator considered overzealous: "Web-dwelling spiders are typically locked out of a web application's personal view: the view with all those administrative links like 'Delete Entry,' 'Add Item,' and 'Drop Table.' The Google Web Accelerator, on the other hand, sees the web as you do -- administrative warts and all. As an example, take a gander at a sample phpMyAdmin view (a web application for managing your MySQL database) and notice all those red Xs. If you clicked, for instance, 'Drop,' you'd be dropping the entire database table at hand. But not without a popup JavaScript confirmation: 'Do you really want to DROP TABLE...' which would send most people into shock, followed by a quick click of the 'Cancel' button, if they'd not meant to click the 'Drop' button. The Web Accelerator summarily ignores this warning (actually, it most likely doesn't even notice it, nor could it likely be taught to understand such confirmations in any reliable automated fashion). And this spider is doing all this clicking preemptively, prefetching anything within your purview you might actually chance to click on in the near future."

courtship, habits, myself

ang ganda ng advice ni sir mar reyes about courtship. "karibalin ko ang sarili ko."

ang lalim. pero kuha ko agad yung substance ng sinabi nya. sometimes ang best or worst na karibal mo is yung sarili mo talaga hindi kung sino pa man.

and have i thought of it in the first place, baka i better myself with her, how i care for her, how i acted to be more mature.

there's no such thing as innate character, we are just trained, or somewhat plain accustomed to what we usually do, old habits die hard. pero pwede tanggalin, baguhin, or palitan ng bago.

sanay na sanay na ako sa www.yahoo.com. pero alam ko na pwede naman wag na i-type ang www, pero cge pa rin ako minsan i-type iyon www(old habit talaga). pero ni-train ko na sarili ko na yahoo lng i-type then ctrl+enter(oh she taught me about the shortcut). and it feels empowering, na may natututunan ka bago, and kahit gaano ka kasanay sa dating habit, kayang-kaya pa rin pala baguhin. yung QWERTY typing is another example, then pinag-aralan ko yung Dvorak keyboard layout, mas efficient, kayang-kaya mag-aral ng bago, lalo at sawa ka na rin naman sa old habit.

a person can change.


List of habits or routines na dapat tanggalin or iminimize ko:

minimize: pag-visit sa slashdot.org
palitan: visit more programming-oriented stuff sites, an old habit i must restore

tanggalin: seeking truth about divination
palitan: seek more about improving and honing my query skills

minimize: soft drinks, tapat lng kasi ng bahay may tindahan
palitan: syempre water lng

minimize: too much sleep
palitan: schedule sleeping

minimize: rapidly going to sleep when burdened with too much thinking especially programming
palitan: instead, just stay awake a little bit of one hour more, baka maisip na rin naman agad ang solution kesa matulog agad

tanggalin: panonood ng tv
palitan: change with internet habit, syempre meron din time-wasting activities s internet na dapat iwasan

minimize: blogging :D
palitan: not possible, this is my online bookmarks collection and diary na rin. but then of course, blogging is not a substitute with other more interesting and real activities. you just report your activities with blogging, how well you are very much alive, and how wonderful life is, in spite of numerous obstacles and pains in life


blogging is a good habit

Leadership Development - Results focused Leadership thinking and practice from around the Globe

Leadership Development - Results focused Leadership thinking and practice from around the Globe:

"You've got to think about big things while you're doing small things, so that all the small things go in the right direction"
- Alvin Toffler

"You are what you repeatedly do. Excellence is not an event - it is a habit"
- Aristotle

Friday, May 13, 2005

MSFN Forums > Registry Tweaks, Part-1

VBScript - Random NUmber Generator creates duplicates

VBScript - Random NUmber Generator creates duplicates: "> The only way to guarantee uniqueness is to either:
> 1. Store all possible outcomes and remove an outcome from the list
> when it's chosen until the list count reaches zero (or some arbitrary
> limit)
> 2. Store all chosen outcomes and compare each new choice to the list
> before accepting it.

3. Use GUID based ids...

s = ''
for n = 1 to 5
uniqueid = left(createobject('scriptlet.typelib').guid,38)
'uniqueid = createobject('scriptlet.typelib').guid
'msgbox uniqueid
s = s & uniqueid & vbcrlf
next

' these are each 38 chars long...
'
wscript.echo '1st pass - with curly braces and hyphens' & vbcrlf & s

s = ''
for n = 1 to 5
uniqueid = mid(createobject('scriptlet.typelib').guid,2,36)
s = s & uniqueid & vbcrlf
next

' these are each 36 chars long...
'
wscript.echo '2nd pass - without curly braces' & vbcrlf & s

s = ''
for n = 1 to 5
uniqueid =
replace(mid(createobject('scriptlet.typelib').guid,2,36),'-','')
s = s & uniqueid & vbcrlf
next

' these are each 32 chars long...
'
s = replace(s,'-','')
wscript.echo '3rd pass - without curly braces or hyphens' & vbcrlf & s
"

Thursday, May 12, 2005

RAQs

RAQs: "Enthusiasm is contagious, and so is boredom."

RAQs

RAQs: "How can I avoid turning into a pointy-haired boss?

The pointy-haired boss is a manager who doesn't program. So the surest way to avoid becoming him is to stay a programmer. What tempts programmers to become managers are companies with old-fashioned corporate structure, where the only way to advance in salary and prestige is to go into management. So if you want to avoid becoming a PHB, avoid such companies, and work for (or start) startups.

I never had to manage anyone in our startup, even though I was the president. The other hackers were my peers, and would have given me the raspberry if I'd tried to 'manage' them. We operated by consensus. And the rest of the company reported to our experienced COO, who was also more of a peer.

Why be a manager when you could be a founder or early employee at a startup?"

Quotes

Quotes:

'Programs must be written for people to read, and only incidentally for machines to execute.'

- Abelson & Sussman, SICP, preface to the first edition

Quotes

Quotes:

'The less confident you are, the more serious you have to act.'

- Tara Ploughman

Marketing for Geeks:

Great Hacker != Great Hire

Wednesday, May 11, 2005

Slashdot | How Should an Application's Logs Work?

Slashdot | How Should an Application's Logs Work?: "In my experience, logging each request to a database isn't fast enough and eventually it becomes CPU overloaded.

tab separated plain text logging is just fine and dandy. Syslog is great because it has a standard format so any tools you make will just keep on trucking.

If you want a db of it do it in batch mode when you need it i.e.

zcat messages.0.gz | syslogtodb | grep httpd | mysql httpd

Why waste those CPU cycles indexing millions of lines of logging you'll never look at ?"

insertAdjacentHTML() Example

Force Download Of File

Force Download Of File:

'--------------------------------------------
Response.Buffer = True
Dim strFilePath, strFileSize, strFileName

Const adTypeBinary = 1

strFilePath = 'C:\ whatever the path is '
strFileSize = ... the size of file .. optional
strFileName = the file na,e

Response.Clear

'8*******************************8
' Requires MDAC 2.5 to be stable
' I recommend MDAC 2.6 or 2.7
'8*******************************8
Set objStream = Server.CreateObject('ADODB.Stream')
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePath

strFileType = lcase(Right(strFileName, 4))

' Feel Free to Add Your Own Content-Types Here
Select Case strFileType
Case '.asf'
ContentType = 'video/x-ms-asf'
Case '.avi'
ContentType = 'video/avi'
Case '.doc'
ContentType = 'application/msword'
Case '.zip'
ContentType = 'application/zip'
Case '.xls'
ContentType = 'application/vnd.ms-excel'
Case '.gif'
ContentType = 'image/gif'
Case '.jpg', 'jpeg'
ContentType = 'image/jpeg'
Case '.wav'
ContentType = 'audio/wav'
Case '.mp3'
ContentType = 'audio/mpeg3'
Case '.mpg', 'mpeg'
ContentType = 'video/mpeg'
Case '.rtf'
ContentType = 'application/rtf'
Case '.htm', 'html'
ContentType = 'text/html'
Case '.asp'
ContentType = 'text/asp'
Case Else
'Handle All Other Files
ContentType = 'application/octet-stream'
End Select


Response.AddHeader 'Content-Disposition', 'attachment; filename= strFileName
Response.AddHeader 'Content-Length', strFileSize
' In a Perfect World, Your Client would also have UTF-8 as the default
' In Their Browser
Response.Charset = 'UTF-8'
Response.ContentType = ContentType

Response.BinaryWrite objStream.Read
Response.Flush

objStream.Close
Set objStream = Nothing

Nortel: Norstar systems - Extension won't stay up - interference?

prospecting client

mga low-hanging fruits muna iproprospect. wala pa big client. sme muna. building network of contacts

Tuesday, May 10, 2005

How To Become A Hacker

wake up

ang hirap makatulog, pag naalimpungatan sa madaling araw and biglang maiisip ko mga problema ko, wala na, hindi na ako ulit makatulog, tulad ngayon 5:45am ako nagising, tumayo na lng muna ako para magblog. minsan iniisip ko tuloy, unique ba talaga problem ko. o pwedeng i-set aside ko muna ulit. ang hirap maging panganay, walang naiipon.


Some steps towards having a comfortable life

1. Do not plan to save, start saving then plan. not entirely possible, all budget goes to the family, especially my two brothers will start schooling in college next sem

2. Have a passive income, put up a business; possible

3. Plan B(Business). Plan A(Abroad or Accenture). start with plan B, if B still fail this year, go for plan A

4. Relax but don't be complacent. Having a relaxed attitude makes one able to pursue its goals smoothly

5. Narrow-focus, business, business, business and more business

Google - My Search History

Friday, May 06, 2005

love,romance,romantic Quotations, Famous Quotes - Quote Database.

love,romance,romantic Quotations, Famous Quotes - Quote Database.: "There are many ways of breaking a heart. Stories were full of hearts being broken by love, but what really broke a heart was taking away its dream-whatever that dream might be"

adaptive path » ajax: a new approach to web applications

The Buzz Report: Good-bye, computer; hello, world! - CNET.com

CCH Business Owner's Toolkit | Single- or Double-Entry Accounting

CCH Business Owner's Toolkit | Single- or Double-Entry Accounting: "If you use a computer, the good news is that many accounting software programs will allow you to make a single entry for a transaction, and the software will make the second entry for you. The double-entry system is still there, but it exists mostly 'behind the scenes.'"

for vb code search

Google Desktop Search Plug-ins

Studio One Networks: Real Small Business

Studio One Networks: Real Small Business:

"What is cash basis accounting?

Most small businesses use the cash basis method of accounting, which is based on real-time cash flow. In cash method, you report an expense when it is paid, and record income when it is received. So, the day you receive a check, it becomes a cash receipt. And you record your expenses when you pay your bills, not when the bill is received.

By the way, the word 'cash' is not meant literally -- it also covers payments by check, credit card, barter, etc.


What is the accrual method of accounting?

With accrual accounting, you record income when it is earned, not when it is paid. Similarly, you record your expenses when the obligation arises, not when you pay it. The tax code refers to this as recording income and expenses when they are 'fixed' - when all the necessary events have occurred to receive the income or expense the liability. It is not necessary for cash to change hands.

Here's how accrual would work. Say, for example, you're a consultant and you complete a job on December 15, but you haven't been paid for it. You recognize all expenses in relation to that contract when they were incurred, regardless of whether you've been paid yet or not. Both the income and expenses are recorded for the current tax year, even if payment is received and bills are paid the following February.
"

Cash vs Accrual - Accounting Basics

CCH Business Owner's Toolkit | Cash vs. Accrual Accounting

Accrual Method Accounting

Got up. Went to work. Got Home. Went to bed

Thursday, May 05, 2005

Technology - Why Google Scares Bill Gates - FORTUNE

random thoughts for the day

Thinkful Wishing

Wishful Thinking

Wednesday, May 04, 2005

Trademark dispute

The fedora.info site of the complaining fedora project is using a tm symbol next to thier name on the site, but they have not registered it with the US trademark office.

As far as I know, there are basically two ways of getting a trademark: the first is by registering and the second is by using something commercially long enough for it to become clearly associated with a company or a product. The first kind of trademark is denoted by having an R inside a circle whereas the second is denoted with the small tm symbol.

In other words:
(R) = Trademark through registration
tm = Trademark through established use

Using the tm symbol in the press release is consistent with their position because they're saying that they have become associated with the name 'Fedora'. They can have a trademark claim to the word even when they haven't registered it.

Disclaimer: IANAL etc.

Slashdot | Universities Dispute with Red Hat over 'Fedora'

Slashdot | Universities Dispute with Red Hat over 'Fedora': "Trademarks are only valid for a limited set of things - you can't TM a word and claim domain over all uses of it.

That's right. Surely, anyone who successfully gained Access to trademark rights on common terms would have quite a Project ahead of them! They would need lawyers that Excel at trademark law to defend them. I doubt that any litigator could ever have the last Word on this issue; the Outlook would not be good. But a savvy legal Explorer could open a lot of Windows into to what goes on behind such strategies. "

QuickBooks Online Edition - Compare with Basic, Pro, Premier

Tuesday, May 03, 2005

Slashdot | The Future of Databases

top 20 universities

This statistics is a result of the study
conducted by the Professional
Regulation
Commission
(PRC) and the Commission on Higher
Education
(CHED), based on the average passing in
the
BOARD
EXAMINATIONS OF ALL COURSES of
all
universities
and colleges in the Philippines.

This study is concluded every 10 years.
The
following is the result of the first study
from
1992 to 2001. Eleven schools come from
Luzon,
two
from the Visayas and seven from
Mindanao.

1. University of the Philippines (Diliman
Campus /
Luzon)

2. University of the Philippines (Los
Banos Campus
/ Luzon)

3. University of the Philippines (Manila
Campus /
Luzon)

4. Silliman University (Dumaguete City /
Visayas)

5. Ateneo de Davao University (Davao /
Mindanao)

6. Ateneo de Manila University (Manila /
Luzon)

7. University of Sto. Tomas (Manila /
Luzon)

8. Mindanao State University (Iligan
Institute of
Tech/ Mindanao)

9. Pamantasan ng Lungsod ng Maynila
(Manila /
Luzon)

10. Saint Louis University (Baguio City /
Luzon)

11. University of San Carlos (Cebu City /
Visayas)

12. Xavier University (Cagayan de Oro /
Mindanao)

13. Mindanao State University (Main /
Mindanao)

14. Urios College (Butuan City /
Mindanao)

15. Polytechnic University of the
Philippines
(Manila/ Luzon)

16. De La Salle University (Manila /
Luzon)

17. Mapua Institute of Technology
(Manila / Luzon)

18. Adamson University (Manila / Luzon)

19. Central Mindanao University (
Bukidnon/
Mindanao)

20. University of Southern Philippines
(Davao /
Mindanao)

MYMPBand.com - Make Your Momma Proud (M.Y.M.P.)

MYMPBand.com - Make Your Momma Proud (M.Y.M.P.): "A flower that blooms in diversity is the most beautiful of all"

Index of /upload-progress-meter

Monday, May 02, 2005

Force Download Of File using asp

Barcodes in Crystal Reports

Barcodes in Crystal Reports

Fraud Frond.com <-- cellphone towers disguised as trees

Fraud Frond.com

Slashdot | NYT on Cell Phone Tower Controversy

Slashdot | NYT on Cell Phone Tower Controversy: "What people don't like is change in the landscape. Once the change happens and they get used to it, nobody complains anymore. A perfect example of this is the giant Citgo sign on the Boston skyline. When it was first put up (1960s, I think), people complained that the skyline was being altered by some corporate monstrosity. Eventually people quit complaining and got used to it, and it was just another part of the city. Years later, Citgo decided they no longer needed the huge sign and announced it was going to be taken down. Once again, people complained. They said the sign had become part of the Boston skyline that everyone recognized and that taking it down would be causing the area to lose a landmark. Change is what people object to, not the objects themselves."

thought for the day

The journey of a thousand miles... begins with a single step
-- some philosopher

The journey of a thousand miles... is better with a car
-- some pilosopo

Bill Gates : GreatPersonalities.com

Bill Gates : GreatPersonalities.com: "Good that there are no speed limits for software"

Apple Mythology and Desktop Security - Yahoo! News

Apple Mythology and Desktop Security - Yahoo! News: "What's most interesting about this is what it reveals about the respondents: specifically that they're so focused on fighting Microsoft's alligators that they don't see the hardware side of their security problems and are blind to the BSD-based
Mac OS X option for running Microsoft Office without Microsoft Windows"

Torvalds switches to Apple: ZDNet Australia: News

Torvalds switches to Apple: ZDNet Australia: News: "Linux creator Linus Torvalds said this afternoon that he's now running an Apple Macintosh as his main desktop, mainly for work reasons, although partly simply because he's a self-described 'technology whore'"