Oracle

Posted on 5-Feb-2007 13:00 by Simon

Found an interesting article on ITToolBox. Where by you can configure the Oracle date time to a specific none system related date. Greate for testing. Can be very useful should you need it.
 
If you have ever tried to do testing for applications that was time sensitive and thought you had to change the operating system time to change the date and time, try this method.

Oracle allows you to change the value returned by the call to the SYSDATE function through the use of the dynamic initialization parameter FIXED_DATE.

To change the value of returned by SYSDATE to 10:00am on January 1st, 2003:
ALTER SYSTEM SET fixed_date = '2003-01-01-10:00:00';

If you want to remove the parameter and go back to the operating system date and time, you will need to bounce the database. Here is the trick to get the parameter set in your spfile if you are using one.
ALTER SYSTEM RESET fixed_date SCOPE=SPFILE SID='*';
 
 
 

Comments (1406/On)

Random Number within a range

Posted on 2-Feb-2007 08:23 by Simon

Following VB code is a rough and ready script to specify a random number between 0 and a max value that you specify. Its not big, and its not clever. But it works.

randomize
msgbox("Your Random Number is: " & int(rnd*((inputbox("What is the maximum value?"))+1)))

Comments (103/On)

TRUNCUNATE A STRING WITHOUT CUTTING A WORD IN TWO

Posted on 29-Jan-2007 08:48 by Simon

DESCRIPTION

With this function you can shorten a string to the desired length, but without cutting a word in two. This function shortens the string in a way that it wont cut a word, but just stops after a word is finished.

 

EXPLANATION OF THE INPUTS

Text: this is where you should place the string to be shortened.

Length: here you should define the length you want the string to have.

Trail: These are the signs that will appear at the end of the string when its truncunated.

Function CutString(Text, Length, Trail)
    ''Only start truncunating if the length of the string is longer than
    ''the desired length
 If Len(Text) > Length-Len(Trail) Then
    ''Seperate all the words of the string
  Words = Split(Text, " ")
  
    ''Keep adding words to the new string until the length of the new string
    ''exceeds the desired length
  For each word in Words
   If Len(TextTemp) > Length-Len(Trail) Then
    Exit For
   End If
   TextTemp = TextTemp & word & " "
  Next
    ''Define the output of the function
  CutString = Left(TextTemp, Len(TextTemp)-1) & Trail
 Else
    ''If the length of the string is shorter then the desired length,
    ''just display the entire string
  CutString = Text
 End If
End Function

Comments (32/On)

Apple iPhone

Posted on 28-Jan-2007 01:27 by Simon

Yes. I've given in and joined in on this one!
 
Is the apple I phone as good as we're all hopping?
I have no idea. It appears for intensive purposes a locked (software locked anyway) Smartphone with a very cool interface.
Will it be worth the cash. You decide?

Comments (579/On)

Batmobile for Sale

Posted on 28-Jan-2007 01:19 by Simon

batmobile.jpg

Holy Cr*p Batman, they’re selling our car! Sorry, couldn''t resist.  Pow!

At the end of next month, one of four original Batmobiles built by custom car grandmaster, George Barris, for the 1960s TV series, is set to go under the hammer in the UK.

Pow!

The car was on show recently at the Autosport Show in Birmingham’s NEC no doubt, in part, to help drum up some extra interest.

And interested you will have to be since, in addition to owning your own cape and boots, you’ll want at least £75,000 if you fancy your chances of driving [well, maybe towing] this home from Coys Auctions.-Martin Lynch

Comments (33/On)

Think Security- Microsoft's Japanese Ad!

Posted on 28-Jan-2007 01:05 by Simon

 
I regularly see computers that are compromised in ways that makes this advertisement a reality! Users need to wake up to this as serious organised crime is now exploiting the weaknesses in the technology for their own selfish and criminal gain.
 
Please make sure this isn''''t yours.

Comments (1434/On)

Format Text

Posted on 6-Nov-2006 23:46 by Simon

   someText = "Place some chunk of plain text here"
    Response.Write "Initial Text: " & _
    someText & "


"

    For I = 1 To Len(someText)
    Response.Write I & " from Left: " & _
    LeftW(someText, I) & "

"
    Next


    function LeftW(strToCut, ichr)
    strToCut = Trim(strToCut)
    initCut = Left(strToCut, ichr)
    Set re = New RegExp
    re.Global = True
    re.Pattern = "(\\|\*|\(|\)|\||\?|\[|\]|\$|\+|\{|\})"
    initCutEnc = re.Replace(initCut, "\$1")
    re.Global = False
    re.Pattern = "(" & initCutEnc & ")((\w*|\W*)\b)"
    if re.Test(strToCut) Then
    LeftW = re.Execute(strToCut)(0)
    Else: LeftW = initCut
    End if
    if Not LeftW = strToCut Then
    LeftW = LeftW & " ..."
    End if
    Set re = Nothing
    End function

Comments (29/On)

Kit Cars

Posted on 17-Sep-2006 16:53 by Simon

Recently been to a kit car show... Wow, I hear you all say.
 
Well the selection of trade stands was poor. But I did get some clips for the bonet of my own car. Enclosed is a link to the gallery with a few cars in... See if you can spot mine.
 

Comments (1187/On)

Gallery!

Posted on 11-Sep-2006 22:49 by Simon

Stuck up the first proper set of images into the Gallery today. They appear to be working pretty well.
 
So, guess we'll just have to see how the things come out.
 
The next thing I'd like to add, is a section where you / or an admin person can add text / comments to be displayed on the page.

Comments (43/On)

Gallery

Posted on 3-Sep-2006 23:15 by Simon

I''ve been working on a Gallery page. To list and display images that I''ve found or have interessting mean.
 
If you really feel you want to have a look around and try it out.
 

Comments (0/Off)

Previously on MyAngle News...

PSP! - Posted on 3-Sep-2006 21:25 by Simon - Comments (0/Off)