June 26, 2014

Some old XP Stuff

??? what's it called ?? generic parameter pass ...
... TEST ::
Option Explicit
Option Base 0

Public Function Sqr(u As Variant) As Variant: Dim t
'vbEmpty 0 Empty (uninitialized)
'vbNull 1 Null (no valid data)
'vbInteger 2 Integer
'vbLong 3 Long integer
'vbSingle 4 Single-precision floating-point number
'vbDouble 5 Double-precision floating-point number
'vbCurrency 6 Currency value
'vbDate 7 Date value
'vbString 8 String
'vbObject 9 Object
'vbError 10 Error value
'vbBoolean 11 Boolean value
'vbVariant 12 Variant (used only with arrays of variants)
'vbDataObject 13 A data access object
'vbDecimal 14 Decimal value
'vbByte 17 Byte value
'vbUserDefinedType 36 Variants that contain user-defined types
'vbArray 8192 Array
t = VarType(u)
Select Case t
Case 2: Dim r2 As Integer: r2 = CInt(u * u): Sqr = r2
Case 3: Dim r3 As Long: r3 = CLng(u * u): Sqr = r3
Case 4: Dim r4 As Single: r4 = CSng(u * u): Sqr = r4
Case 5: Dim r5 As Double: r5 = CDbl(u * u): Sqr = r5
Case 6: Dim r6 As Currency: r6 = CCur(u * u): Sqr = r6
Case 11: Dim r11 As Boolean: r11 = CBool(u And u): Sqr = r11
Case 14: Dim r14 As Variant: r14 = CDec(u * u): Sqr = r14
Case 17: Dim r17 As Byte: r17 = CByte(u * u): Sqr = r17
Case Else: Dim r0 As String: r0 = "Error!": Sqr = r0
End Select
End Function

Private Sub INC(ByRef n0 As Variant, Optional n1 As Variant)
'MsgBox VarType(n1)
'MsgBox VarType(n1) & "=[" & n1 & "]"
Dim TpsT
TpsT = VarType(n1)
If TpsT = 10 Then n1 = 1
n0 = n0 + n1
End Sub

Private Sub DEC(ByRef n0 As Variant, Optional n1 As Variant)
Dim TpsT
TpsT = VarType(n1)
If TpsT = 10 Then n1 = 1
n0 = n0 - n1
End Sub

Public Sub TESTTEST()
Dim b0 As Byte, i0 As Integer, l0 As Long
b0 = b0 - b0: i0 = i0 - i0: l0 = l0 - l0: INC b0: INC i0, 2: INC l0, 3
MsgBox "inc(byte) " & b0 & " of " & TypeName(b0) & vbLf & _
       "inc(integer,2) " & i0 & " of " & TypeName(i0) & vbLf & _
       "inc(longint,3) " & l0 & " of " & TypeName(l0)
End Sub
TESTTEST() 's invoked by following code in ThisWorkbook.Workbook
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
If Sh.Name = "Sheet1" Then
If Target.SubAddress = "Sheet1!N32" Then
Call Module1.TESTTEST
End If
End If
End Sub

[EOF]

May 27, 2014

Starting from the end

Since the LT Spice is not the best digital analyzer nor ss-DC simulator and i don't want to trash my 'puter with random software then i trash my 'puter with random software ... yep!

... as i ytd found my 4-4 D-trigger (see fig.1) malfunctioned and was discarded and reinvented due "LT-Digital" ?bug? (see note.1) - anyways - the MSO-X-cell has the VBA extension - that is enough for most (not so CPU demanding) tasks - with quite powerful debugging capabilities and enough OOP capabilities enabled

note.1 -- i likely reached some specific-situation-range by node-wide-analyzing the signal progression - so there might be design-bug - but @ 1-st glance it should work and it does _s_i_m_u_l_a_t_e_ in Spice - also @ the time designed i considered this more reliable than the russian RSD-trigger 'TM2 ... donno

and in VBA-XL

although it does not seem to like the timesteps larger than 100ns -- may have to do with the specific DTL source for this Excel-simulator - ?greater timesteps won't hit the transition range properly?

//// i always wondered about the 3/10 7/10 treshold point of logic chips -- it seems to have to do with TTL physiology and with noise immunity - there might be more ...

[continued on next]

February 24, 2014

about: CLS color model

Checking dimensions ::
 

The RGB color-cube ::


Transfer to C(olor)L(ightness)S(aturation) ::
note: S:L:C=94:238:749 - nearest proportional multiple
(whatever that means -- ok it's the 3 x 256 RGB fits best to SLC as shown above)


/!\ tt's not exactly the HSL color model . . .

Transfer from CLS (back to RGB) ::


[EOF]

February 23, 2014

Gradient Color Text

Draft

USER_SCRIPT_STARTS

USER_SCRIPT_ENDS

February 16, 2014

couple of things i forgot

? animated gifs' support

? the <pre>-tag
          EOL
01234567890

? the <textarea>-tag

Just curious ...

the <hr> tag is actually modifiable ::

the above is rendered from :: <hr align="left" color="red" size="1" width="300" />

the above is rendered from :: <hr align="right" border="0" color="cyan" size="8" width="500" />

the above is rendered from :: <hr align="center" border="0" color="transparent" size="3" style="background: url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilehyUZnxakgFxrV51kLahYUCAo05S3sz-JxT0_E8NOd0rVETIkQ0qYc0pumJSlcO1YyOlPWR8pVkBMlrDdaLJixESCHRRj-LZVWm6530jZ2czdQSqoU7Nm4M4JzyX9ayyVWglMVjpeJs/s1600/temp0.gif') repeat;" width="75%" />

the above is rendered from :: <hr align="left" border="0" color="transparent" size="7" style="background-size: 100%; background: #00ffff url('https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilehyUZnxakgFxrV51kLahYUCAo05S3sz-JxT0_E8NOd0rVETIkQ0qYc0pumJSlcO1YyOlPWR8pVkBMlrDdaLJixESCHRRj-LZVWm6530jZ2czdQSqoU7Nm4M4JzyX9ayyVWglMVjpeJs/s1600/temp0.gif') no-repeat;" width="71%" />
which neatly shows that there's some inadequacies in stretching the background images -- there's something what seems to be a working example for FF in www but i don't want to go through it's source now ...

site - initial tune up

TEST TEST ...

checking text formatting options ::

Heading


Subheading


Minor heading


Normal :: default bold italic underscore strike through default

SO FAR SO GOOD ...


Default Font Smallest Small Normal Large Largest
Arial Smallest Small Normal Large Largest
Courier Smallest Small Normal Large Largest
Georgia Smallest Small Normal Large Largest
Helvetica Smallest Small Normal Large Largest
Times(Default Font) Smallest Small Normal Large Largest
Trebuchet Smallest Small Normal Large Largest
Verdana Smallest Small Normal Large Largest

Default Font (to keep off the possible/unwanted formatting's automatic forward population)

BASIC HTML TAGS TEST ::
  1. <hr>

  2. <p>
    it seems the <p>-tag in ordered list is not supported - the major achievement of soon 40y IT developement Xi yaik
  3. <table>(with basic attributes)
    Row spanning TESTColumn spanning TEST
    Top-LeftTop-CenterTop-Right
    Center-LeftCenter-CenterCenter-Right
    Bottom-LeftBottom-CenterBottom-Right
    the bordercolordark & bordercolorlight attributes not showing as they shouldn't in Mz-FF (won't commit a multi-browser check up at this time)
    attributes that seem to be working :: bgcolor , border* , cellpadding , cellspacing , rowspan , colspan
    border* -- should be inherited by cells - in FF such won't happen ?
  4. <a> embedded <img>
    <img> - TEST -- everything's OK - it ponts to erroneous image source (should display as it does) -- must be re-verified after publishing ...
    it looks that the <a><img></a> has to be scripted to display right at 1-ce coz bloggers HTML-cleanup cleans up all what you intended it to be ((i love idiots - i love the republic ...))
  5. <dir>






    test ofin commonnot supportedby 'smart'-editorsa <dir> - tag ??? -- seems working ... (for now)
  6. <sup>&<sub>
    +1(1)+1(2)-1(1)-1(2) +1(1)-1(2)-1(1)+1(2)
    ? -- looks OK
  7. <marquee>
    using the <marquee> - tag slows down the performance of your website -- although i guess there was not such issue before IE7/2009CE
    -- must be re-verified after publishing ...