Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Thursday, October 30, 2014

Coming up...

Inner view of a Seagate 3.5 inches hard disk d...
Inner view of a Seagate 3.5 inches hard disk drive Medalist ST33232A model manufactured in Malaysia in 1998. Parallel ATA interface, ultra DMA mode 2, I/O data-transfer rate 33.3 MB/s max, 3,227 MB, 3 platters, 6 physical read/write heads, spindle speed 4,500 RPM, cache buffer 128 kB, MTBF 300,000 hours, dimensions 146.8 x 102.4 x 26.2 mm, weight 540 grams. (Photo credit: Wikipedia)
30-October-2014


I saved all my scripts and command files in a portable HDD, and the disk is not in very good condition after some years of heavy use. At any rate, I was able to still copy over 99.99% of my files, so coming up... the actual scripts I used.

Hope they help somebody, as it did me.

Till then!

Thursday, October 23, 2014

New work, new focus

JavaFX Mobile
JavaFX Mobile (Photo credit: Wikipedia)
23-October-2014


For about 5 months now, I have taken on a new job, and my focus now is more on engineering. Still, my experience as an IT practitioner is recognized, and capitalized on, from time to time.

Before I forget PROMIS, and the things that I did for the past 18 years or so, I would be documenting what I practiced, so I will have something to go back to.

Forget? Maybe not.

But it is actually the problem of forgetting the small, small things, not the major things, that causes the problem, especially as the years go by.

And, I am advancing in the years, and still learning a lot of new things: AutoCAD, Java SE 7 and 8, ASP.NET MVC, Entity Framework, C# in depth, and JavaFX. I may pick up F# soon.

Thanks to PROMIS, I learned a lot. I was forced to learn SQL, VB.NET, C#.NET and ASP.NET. So I picked up CSS and HTML in the process, and also XML. I made it good, simply because there was opportunity to learn and practice what I learned.

And what I am learning big in my new job is 'to get disturbed.'

I had to learn to stop and answer questions, or do other things, and resume what I was previously doing - seamlessly. This is one thing that I hated, and kept myself from until now.

It is, however, already a requirement of my new job, so again, given the opportunity and guidance to learn and practice this work method - I would make good at it.

New venture, and very exciting!

Till then...

Thursday, February 11, 2010

DMQVB (dmqvb.bas)

The first of two sample files, copied from the examples provided with Bea Message Q installation...


----------
'
' Global Variables
'
Global PutMsg As DmqMsgT
Global GetMsg As DmqMsgT
Global MyQueue As QAddress

Global DmqAttached As Integer

'
' DmqAttachQ
'
' Attach to the DMQ message bus using a temporary queue
'
'
'
Function DmqAttachQ() As Long
Dim status As Long
Dim attach_mode As Long
Dim q_type As Long
Dim q_name As String * 10
Dim q_name_len As Long
Dim name_space_list(2) As Long
Dim nsl_len As Long
Dim timeout As Long
'
' Set attach parameters
'
attach_mode = PSYM_ATTACH_TEMPORARY
q_type = PSYM_ATTACH_PQ
q_name = ""
q_name_len = 0
nsl_len = 0
timeout = 0

MyQueue.Group = 0
MyQueue.Queue = 0

status = pams_attach_q(attach_mode, MyQueue, q_type, q_name, q_name_len, name_space_list(0), nsl_len, timeout, ByVal 0&, ByVal 0&)

DmqAttachQ = status

End Function


'
' DmqExit
'
' Exit from the DMQ bus
'
Function DmqExit()
DmqExit = pams_exit()
End Function

'
' DmqGetMsg
'
' Receive a DmqMsgT message if one is available
'
'
Function DmqGetMsg(Msg As DmqMsgT, MsgArea As String) As Long
Dim status As Long
Static show_buffer As ShowBuffer
Dim show_bufflen As Long
Dim large_area_len As Long
Dim large_size As Long


show_bufflen = SHOW_BUFFER_LEN
large_area_len = 0

status = pams_get_msg(ByVal MsgArea, Msg.Priority, Msg.SrcTarget, Msg.Class, Msg.Type, Msg.MsgAreaSize, Msg.MsgLen, Msg.SelFilter, Msg.PSB, show_buffer, show_bufflen, large_area_len, large_size, ByVal 0&)

DmqGetMsg = status

End Function

'
' DmqGetMsgW
'
' Receive a DmqMsgT message if one is available
'
'
Function DmqGetMsgW(Msg As DmqMsgT, MsgArea As String) As Long
Dim status As Long
Static show_buffer As ShowBuffer
Dim show_bufflen As Long
Dim large_area_len As Long
Dim large_size As Long

show_bufflen = SHOW_BUFFER_LEN
large_area_len = 0

status = pams_get_msgw(ByVal MsgArea, Msg.Priority, Msg.SrcTarget, Msg.Class, Msg.Type, Msg.MsgAreaSize, Msg.MsgLen, Msg.timeout, Msg.SelFilter, Msg.PSB, show_buffer, show_bufflen, large_area_len, large_size, ByVal 0&)

DmqGetMsgW = status

End Function

'
' DmqPutMsg
'
' Send a DmqMsgT to the target queue
'
'
Function DmqPutMsg(Msg As DmqMsgT, MsgArea As String) As Long
Dim status As Long
Dim large_size As Long

large_size = 0

status = pams_put_msg(ByVal MsgArea, Msg.Priority, Msg.SrcTarget, Msg.Class, Msg.Type, Msg.Delivery, Msg.MsgAreaSize, Msg.timeout, Msg.PSB, Msg.UMA, Msg.RespQ, large_size, ByVal 0&, ByVal 0&)

DmqPutMsg = status

End Function

'
' DmqStatusText
'
' Converts a DmQ status code into a descriptive string
'
Function DmqStatusText(Code As Long) As String
Dim status As Long
Dim severity As Long ' Receives severity code
Dim msg_text As String * 4096 ' Receives message text (original = 256, changed to 512)
Dim buflen As Long ' Size of string for message
Dim retlen As Long ' Length of returned message

buflen = Len(msg_text)
status = pams_status_text(Code, severity, msg_text, buflen, retlen)

If Not status = PAMS__FAILED Then
DmqStatusText = msg_text
Else
DmqStatusText = "DmqStatusText failed!"
End If

End Function

----------
Reblog this post [with Zemanta]