Here are some tricks to help you get your money's worth:
1. Fill up your car or truck in the morning when the temperature is still cool. Remember that all service stations have their storage tanks buried below ground; and the colder the ground, the denser the gasoline. When it gets warmer gasoline expands, so if you're filling up in the afternoon or in the evening, what should be a gallon is not exactly a gallon. In the petroleum business, the specific gravity and temperature of the fuel (gasoline, diesel, jet fuel, ethanol and other petroleum products) are significant. Every truckload that we load is temperature-compensated so that the indicated gallon gauge is actually the amount pumped. A one-degree rise in temperature is a big deal for businesses, but service stations don't have temperature compensation at their pumps.
2. If a tanker truck is filling the station's tank at the time you want to buy gas, do not fill up; most likely dirt and sludge in the tank is being stirred up when gas is being delivered, and you might be transferring that dirt from the bottom of their tank into your car's tank.
3. Fill up when your gas tank is half-full (or half-empty), because the more gas you have in your tank the less air there is and gasoline evaporates rapidly, especially when it's warm (gasoline storage tanks have an internal floating 'roof' membrane to act as a barrier between the gas and the atmosphere, thereby minimizing evaporation).
4. If you look at the trigger you'll see that it has three delivery settings: slow, medium and high. When you're filling up do not squeeze the trigger of the nozzle to the high setting. You should be pumping at the slow setting, thereby minimizing vapors created while you are pumping. Hoses at the pump are corrugated; the corrugations act as a return path for vapor recovery from gas that already has been metered. If you are pumping at the high setting, the agitated gasoline contains more vapor, which is being sucked back into the underground tank, so you're getting less gas for your money. Hope this will help ease your 'pain at the pump'
Monday, December 17, 2007
Sunday, March 04, 2007
Pull Subscriptions using Exchange 2007 Web Service
Here is the complete code for finding created event and new mail event using webservice
'Create the binding and set the credentials.
Dim esb As New ExchangeServiceBinding()
esb.Url = "http://www.domain.com/EWS/exchange.asmx"
esb.Credentials = New NetworkCredential("administrator", "password", "domain")
' Create a new Subscribe request.
Dim subscribeRequest As New SubscribeType()
Dim pullSubscription As New PullSubscriptionRequestType()
' Identify the folders monitored for events.
Dim folders(2) As BaseFolderIdType
Dim folderId As New DistinguishedFolderIdType
folderId.Id = DistinguishedFolderIdNameType.inbox
folders(0) = folderId
Dim folderId1 As New DistinguishedFolderIdType
folderId1.Id = DistinguishedFolderIdNameType.calendar
folders(1) = folderId1
pullSubscription.FolderIds = folders
' Identify the events monitored for the subscription.
Dim eventTypes(2) As NotificationEventTypeType
eventTypes(0) = NotificationEventTypeType.NewMailEvent
eventTypes(1) = NotificationEventTypeType.CreatedEvent
pullSubscription.EventTypes = eventTypes
' Define the timeout period for the subscription.
pullSubscription.Timeout = 10
subscribeRequest.Item = pullSubscription
' Send the Subscribe request and receive the Subscribe response.
Dim subscribeResponse As SubscribeResponseType = esb.Subscribe(subscribeRequest)
' Check the results.
If (subscribeResponse.ResponseMessages.Items.Length > 0 And subscribeResponse.ResponseMessages.Items(0).ResponseClass = ResponseClassType.Success) Then
Dim subscribeResponseMessage As SubscribeResponseMessageType = subscribeResponse.ResponseMessages.Items(0)
Response.Write("Subscribed for Pull notifications: " & subscribeResponseMessage.SubscriptionId)
' Wait 30 seconds before receiving event notifications.
'Thread.Sleep(30000)
' Create a new GetEvents request.
Dim getEventsRequest As New GetEventsType()
' Identify the subscription identifier and watermark for the subscription
' that will be polled for changes in the Exchange store.
getEventsRequest.SubscriptionId = subscribeResponseMessage.SubscriptionId
getEventsRequest.Watermark = subscribeResponseMessage.Watermark
' Send the GetEvents request and receive the GetEvents response.
Dim eventsResponse As GetEventsResponseType = esb.GetEvents(getEventsRequest)
' Check the results.
If (eventsResponse.ResponseMessages.Items.Length > 0 And eventsResponse.ResponseMessages.Items(0).ResponseClass = ResponseClassType.Success) Then
Dim eventsResponseMessage As GetEventsResponseMessageType = eventsResponse.ResponseMessages.Items(0)
For Each type As ItemsChoiceType In eventsResponseMessage.Notification.ItemsElementName
If type = ItemsChoiceType.NewMailEvent Then
Dim notification As NotificationType
notification = eventsResponseMessage.Notification
Dim eventChangedTye As BaseObjectChangedEventType
eventChangedTye = notification.Items(0)
Dim MailItemIdType As ItemIdType
MailItemIdType = eventChangedTye.Item
Response.Write(MailItemIdType.Id)
End If
Next
End If
' Create an Unsubscribe request.
Dim unsubscribeRequest As New UnsubscribeType()
' Identify the subscription to unsubscribe from.
unsubscribeRequest.SubscriptionId = subscribeResponseMessage.SubscriptionId
' Send the Unsubscribe request and receive the Unsubscribe response.
Dim unsubscribeResponse As UnsubscribeResponseType = esb.Unsubscribe(unsubscribeRequest)
' Check the results
If (unsubscribeResponse.ResponseMessages.Items.Length > 0 And unsubscribeResponse.ResponseMessages.Items(0).ResponseClass = ResponseClassType.Success) Then
Response.Write("Subscribtionunsubscribed successfully: " & unsubscribeRequest.SubscriptionId)
End If
End If
'Create the binding and set the credentials.
Dim esb As New ExchangeServiceBinding()
esb.Url = "http://www.domain.com/EWS/exchange.asmx"
esb.Credentials = New NetworkCredential("administrator", "password", "domain")
' Create a new Subscribe request.
Dim subscribeRequest As New SubscribeType()
Dim pullSubscription As New PullSubscriptionRequestType()
' Identify the folders monitored for events.
Dim folders(2) As BaseFolderIdType
Dim folderId As New DistinguishedFolderIdType
folderId.Id = DistinguishedFolderIdNameType.inbox
folders(0) = folderId
Dim folderId1 As New DistinguishedFolderIdType
folderId1.Id = DistinguishedFolderIdNameType.calendar
folders(1) = folderId1
pullSubscription.FolderIds = folders
' Identify the events monitored for the subscription.
Dim eventTypes(2) As NotificationEventTypeType
eventTypes(0) = NotificationEventTypeType.NewMailEvent
eventTypes(1) = NotificationEventTypeType.CreatedEvent
pullSubscription.EventTypes = eventTypes
' Define the timeout period for the subscription.
pullSubscription.Timeout = 10
subscribeRequest.Item = pullSubscription
' Send the Subscribe request and receive the Subscribe response.
Dim subscribeResponse As SubscribeResponseType = esb.Subscribe(subscribeRequest)
' Check the results.
If (subscribeResponse.ResponseMessages.Items.Length > 0 And subscribeResponse.ResponseMessages.Items(0).ResponseClass = ResponseClassType.Success) Then
Dim subscribeResponseMessage As SubscribeResponseMessageType = subscribeResponse.ResponseMessages.Items(0)
Response.Write("Subscribed for Pull notifications: " & subscribeResponseMessage.SubscriptionId)
' Wait 30 seconds before receiving event notifications.
'Thread.Sleep(30000)
' Create a new GetEvents request.
Dim getEventsRequest As New GetEventsType()
' Identify the subscription identifier and watermark for the subscription
' that will be polled for changes in the Exchange store.
getEventsRequest.SubscriptionId = subscribeResponseMessage.SubscriptionId
getEventsRequest.Watermark = subscribeResponseMessage.Watermark
' Send the GetEvents request and receive the GetEvents response.
Dim eventsResponse As GetEventsResponseType = esb.GetEvents(getEventsRequest)
' Check the results.
If (eventsResponse.ResponseMessages.Items.Length > 0 And eventsResponse.ResponseMessages.Items(0).ResponseClass = ResponseClassType.Success) Then
Dim eventsResponseMessage As GetEventsResponseMessageType = eventsResponse.ResponseMessages.Items(0)
For Each type As ItemsChoiceType In eventsResponseMessage.Notification.ItemsElementName
If type = ItemsChoiceType.NewMailEvent Then
Dim notification As NotificationType
notification = eventsResponseMessage.Notification
Dim eventChangedTye As BaseObjectChangedEventType
eventChangedTye = notification.Items(0)
Dim MailItemIdType As ItemIdType
MailItemIdType = eventChangedTye.Item
Response.Write(MailItemIdType.Id)
End If
Next
End If
' Create an Unsubscribe request.
Dim unsubscribeRequest As New UnsubscribeType()
' Identify the subscription to unsubscribe from.
unsubscribeRequest.SubscriptionId = subscribeResponseMessage.SubscriptionId
' Send the Unsubscribe request and receive the Unsubscribe response.
Dim unsubscribeResponse As UnsubscribeResponseType = esb.Unsubscribe(unsubscribeRequest)
' Check the results
If (unsubscribeResponse.ResponseMessages.Items.Length > 0 And unsubscribeResponse.ResponseMessages.Items(0).ResponseClass = ResponseClassType.Success) Then
Response.Write("Subscribtionunsubscribed successfully: " & unsubscribeRequest.SubscriptionId)
End If
End If
Subscribe to:
Comments (Atom)