Showing posts with label Classic ASP. Show all posts
Showing posts with label Classic ASP. Show all posts

Saturday, August 23, 2008

Capture video thumbnails with Classic ASP using ffmpeg - Hiveminds Magazine

Capture video thumbnails with Classic ASP - Hiveminds Magazine


option explicit
dim sExecuteable
dim oShell
dim sVideoFilepath
dim sOutputFilepath
dim cmd
sExecuteable = "ffmpeg.exe"
sVideoFilepath = "sphere1.wmv"
sOutputFilepath = "sphere.png"
cmd = server.mappath(sExecuteable) & " -y -i """& _
server.mappath(sVideoFilepath) &""" -vframes 1 -an _
-vcodec png -f rawvideo -s 320x240 """&_
server.mappath(sOutputFilepath) &""""
set oShell = server.createobject("Wscript.Shell")
oShell.run cmd
set oShell = nothing

Monday, July 28, 2008

GCHARTS: encode (vbscript)

encode: text (0..100), simple(62), extended (4096)

Option Explicit

Sub main()
Dim s
s = _
"1492,1596,1474,1611,1589,1749,1630,1619,1632,1685,1691,1637,1703,1627,1672,1611,1710,1645,1640,1570,1599," & _
"1525,1585,1511,1615,1511,1585,1473,2390,1693,1597,1550,1606,1578,1543,1539,1570,1552,1589,1545,1620,1607," & _
"1612,1647,1476,1445,1482,1478,1463,1419,1498,1503,1520,1537,1459,1531,1501,1511,1469,1478,1476,1504,1519," & _
"1499,1435,1422,1420,1303,1367,1340,1380,1374,1342,1308,1373,1415,1426,1399,1426,1420,1347,1421,1459,1459," & _
"1438,1397,1454,1462,1518,1475,1514,1460,1510,1463,1515,1498,1510,1456,1503,1590,1543,1634,1649,2449,1774," & _
"1915,1840,1890,1744,1779,1663,1726,1756,1716,1637,1680,1674,1713,1724,1660,2013,1650,2037,2622,1886,1555," & _
"1466,1535,1452,1482,1537,1387,1412,1381,1407,1252,1671,1284,1377,1264,1266,1342,1376,1323,1108,1234,1261"
s = "100,0,0,100,100"
Debug.Print chd_t1(s)
Debug.Print chd_s1(s)
Debug.Print chd_e1(s)
End Sub

Function chd_t1(s)
'http://chart.apis.google.com/chart?chs=250x200&cht=ls&chco=0077CC&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=t:57,61,56
Dim a, i, a0, a1, b
a = Split(s, ",")
a0 = a(0)
a1 = a(0)
For i = 0 To UBound(a)
If a0 > a(i) Then a0 = a(i)
If a1 < a(i) Then a1 = a(i)
Next
ReDim b(UBound(a))
For i = 0 To UBound(a)
b(i) = Round(100# / a1 * a(i), 0) ' absolute
Next
chd_t1 = Replace(Replace(Join(b, "|"), ",", "."), "|", ",")
End Function

Function chd_s1(s)
'http://chart.apis.google.com/chart?chs=250x200&cht=ls&chco=0077CC&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=s:ililloml
Dim t, a, a0&, a1&, i
t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
a = Split(s, ",")
a0 = a(0)
a1 = a(0)
For i = 0 To UBound(a)
If a0 > a(i) Then a0 = a(i)
If a1 < a(i) Then a1 = a(i)
Next
ReDim b(UBound(a))
For i = 0 To UBound(a)
b(i) = Mid(t, Round(62 * a(i) / a1, 0) + 1, 1)
Next
chd_s1 = Join(b, ".")
End Function



Function chd_e1(s)
'http://chart.apis.google.com/chart?chs=250x200&cht=ls&chco=0077CC&chm=B,E6F2FA,0,0,0&chls=1,0,0&chd=e:jbl9i.mV
Dim t, a, a0, a1, i, x
t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-."
a = Split(s, ",")
a0 = a(0)
a1 = a(0)
For i = 0 To UBound(a)
If a0 > a(i) Then a0 = a(i)
If a1 < a(i) Then a1 = a(i)
Next
ReDim b(UBound(a))
For i = 0 To UBound(a)
x = Round(a(i) / a1 * 4096, 0)
b(i) = _
Mid(t, x \ 64 + 1, 1) & _
Mid(t, x - (x \ 64) * 64 + 1, 1)
Next
chd_e1 = Join(b, "")
End Function


Sunday, June 29, 2008

CodeProject: EzEvents

CodeProject: EzEvents
An ASP event calendar for you website.

Saturday, June 28, 2008

CodeProejct: ASP Code Analyzer

CodeProject: ASP Code Analyzer
A simple tool to find unused subs, functions and variables in your ASP code.

CodeProject: Classic ASP Framework 2.0 - Make your Classic ASP code work like in ASP.NET

Classic ASP Framework 2.0 - Make your Classic ASP code work like in ASP.NET - CodeProject
The Classic ASP Framework (CLASP) will allow you to structure your ASP pages in the same way you do it with ASP.NET



Download source - 605 Kb
Gotdotnet Project Workspace

Sunday, January 13, 2008

Pure ASP File Upload in Classic ASP

ASP 101 - Articles - Pure ASP File Upload in Classic ASP