• We're currently having issues with our e-mail system. Anything requiring e-mail validation (2FA, forgotten passwords, etc.) requires to be changed manually at the moment. Please reach out via the Contact Us form if you require any assistance.

Programming

maple

russian translator
Apr 18, 2018
69
Russia
Yesterday I installed "Windows 95 OSR2 (russian version)" on computer "Celeron 333".
Today I made settings for it I like and installed language "Visual Basic 5.0".
 

maple

russian translator
Apr 18, 2018
69
Russia
My program "Shift time". It shifts time in subtitles *.srt. It works ve-e-ery slow.
Program language Visual Basic 5.0, OS Windows 95 OSR2, computer Celeron 333 MHz.

Code:
Rem Shift time
Rem Язык Visual Basic 5.0
Rem Смещение тайминга субтитров *.srt
Option Explicit

Private Sub C1_Click()
Dim a As String: Rem - Буферный массив хранения символов
Dim b, c, d, e As String

Dim g As Long: Rem - Указатель на считываемый символ
Dim h As Long: Rem - Время смещения в миллисекундах
Dim i As Long: Rem - Смещаемое время в миллисекундах
Dim j, k, l, m As Long

Rem - Инициализация
g = 1
h = Val(T2) * 1000
T3 = ""

10 Rem - Цикл обработки данных блока T1
a = Mid(T1, g, 12)
If Mid(a, 3, 1) = ":" And Mid(a, 6, 1) = ":" And Mid(a, 9, 1) = "," Then
Rem - Собираем из строки число
b = Mid(a, 1, 2)
c = Mid(a, 4, 2)
d = Mid(a, 7, 2)
e = Mid(a, 10, 3)

i = ((b * 60 + c) * 60 + d) * 1000 + e
i = i + h
If i < 0 Then i = 0

Rem - Разбираем число на строку
m = i
l = m \ 1000: m = m - l * 1000
k = l \ 60: l = l - k * 60
j = k \ 60: k = k - j * 60

If j < 10 Then T3 = T3 & "0"
T3 = T3 & j & ":"
If k < 10 Then T3 = T3 & "0"
T3 = T3 & k & ":"
If l < 10 Then T3 = T3 & "0"
T3 = T3 & l & ","
If m < 100 Then T3 = T3 & "0"
If m < 10 Then T3 = T3 & "0"
T3 = T3 & m

g = g + 12
Else
T3 = T3 + Mid(a, 1, 1)
g = g + 1
End If

Rem - Если блок T1 не закончился, то повторение цикла
If Len(a) > 11 Then GoTo 10
T3 = T3 + Mid(a, 2, 10)
End Sub


Image a.png

Image2 a.png
 

Attachments

Last edited:

Kona

Avanna's #1 Fan
Apr 8, 2018
813
USA
I just started AP Computer Science this school year with Java. It’s been going okay, aside I have a,,, teacher that is rarely eeven here. But I’ve kinda been able to figurevit out with the textbook and Google.il

I also used to mess around learning HTML, but I haven’t done it in forever and probably forgot everything
 

Gralydig

Just a chill dude, doing his thing.
Oct 8, 2018
40
23
Chicago
I just started AP Computer Science this school year with Java. It’s been going okay, aside I have a,,, teacher that is rarely eeven here. But I’ve kinda been able to figurevit out with the textbook and Google.il

I also used to mess around learning HTML, but I haven’t done it in forever and probably forgot everything
Damn your school is lucky I wish my school had that....
 

DefiantKitsune

Lonely kanon fan
Apr 11, 2018
621
I majored in computer science for a year before realizing that while i love using computers, i hate hate HATE coding them.
 

Kona

Avanna's #1 Fan
Apr 8, 2018
813
USA
Or, on some days, that you even had a teacher, right? ;)
Good point haha. She’s missed at least two months of school alrrady and doesn’t even leave work...at least it’s an easy class but man when the AP test comes around in spring...
 

mobius017

Aspiring ∞ Creator
Apr 8, 2018
1,982
Good point haha. She’s missed at least two months of school alrrady and doesn’t even leave work...at least it’s an easy class but man when the AP test comes around in spring...
Er...for a teacher, going to class and teaching IS your work, right? Is she just holed up in her office somewhere?

Oh, wait, you probably mean she doesn't leave assignments ("work" for the class to do). Gotcha. ;) So, when you go to class, what do you guys do? I'd think the sub (I just assume there must be one.) would at least try to take you guys through the textbook, even if they don't know how to program themselves. Though trying to teach yourself programming out of a book would be far from ideal....
 

Kona

Avanna's #1 Fan
Apr 8, 2018
813
USA
Er...for a teacher, going to class and teaching IS your work, right? Is she just holed up in her office somewhere?

Oh, wait, you probably mean she doesn't leave assignments ("work" for the class to do). Gotcha. ;) So, when you go to class, what do you guys do? I'd think the sub (I just assume there must be one.) would at least try to take you guys through the textbook, even if they don't know how to program themselves. Though trying to teach yourself programming out of a book would be far from ideal....
Not even. Subs tell us to do whatever or work on other classes. I’ve kinda tried working through the textbook myself, with the help of Google too, of course, but it’s an experience alright.

And the few days we have the teacher here, she has us copy code and execute it then takes at least three days to go to everyone’s computer and grade...and we aren’t a relatively big class (~19 students I think), so I try and do a lot myself and just play around to find what does and doesn’t work , learning code, and figuring out how to fix my errors.
 

mobius017

Aspiring ∞ Creator
Apr 8, 2018
1,982
Not even. Subs tell us to do whatever or work on other classes. I’ve kinda tried working through the textbook myself, with the help of Google too, of course, but it’s an experience alright.

And the few days we have the teacher here, she has us copy code and execute it then takes at least three days to go to everyone’s computer and grade...and we aren’t a relatively big class (~19 students I think), so I try and do a lot myself and just play around to find what does and doesn’t work , learning code, and figuring out how to fix my errors.
Sheesh, that's a mess alright. I guess I can sort of see the lag when grading depending on how she's doing it (If she's actually trying to figure out what's broken, that could take awhile.), but it doesn't seem like the class will get anywhere fast, whatever she's doing....

Ideally, the book "should" be enough to teach you the basics of how to use the language. But if it's not doing the job and you want something more structured than Googling for stuff to supplement that, I found a free course that might help: https://www.udemy.com/java-tutorial/. Not that it'd be ideal to have to take two courses, but maybe it could be a resource for you. If you do finish it at some point, it looks like there's a certificate.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)