I regret not practicing C++

Kurtis

Active Member
If you start with "if-then" statements, then you should probably be able to better understand coding.

That's the basic idea. It's also used in other maths.

I don't know what if-then statements are either... :(
I guess Google will be my best friend if I ever try to learn coding.
 

StTheo

Well-Known Member
If-then is basically cause and effect. If a condition is met, then a reaction occurs.

Also, NoDoz I took SIX FREAKIN HOURS AGO: I regret you.
 

mikeymagic

Well-Known Member
I wish I understood computer code but it honestly mind fucks me whenever I try to read it. Where did you guys learn how to do it?
It's really easy, but it depends what direction you want to go initially.

You can start with web programming and not even programming but using simple markup languages and stylesheets (HTML, XML, CSS, etc)

This will at least get you understanding how to apply syntax/code and make you a whole lot more ready to try scripting js/php where you will learn all the important parts to programming that will eventually lead to a solid understanding of stuff.

after you've learnt one, you can learn them all.


else you can go the desktop/mobile software programming side and start with java or python, or even basic scripting.

again, learn how to apply/use syntax in code, etc.


Once you understand how to use syntax and basic programming principles, you can really go at relatively any programming language you like. :)
 

Skryter

Well-Known Member
Learning HtMl for IST (Information Software Technology) and I'm finding it really fun to practice and put into use. I keep running to a snag with how to embed a video in a html notepad document. When I use <e>Link</e> a hyper link to the video or absolutely nothing shows up, not an actual embedded video...image....thing...

I'm assuming I'm doing the code wrong so can anyone help me out with this?
 

mikeymagic

Well-Known Member
Learning HtMl for IST (Information Software Technology) and I'm finding it really fun to practice and put into use. I keep running to a snag with how to embed a video in a html notepad document. When I use <e>Link</e> a hyper link to the video or absolutely nothing shows up, not an actual embedded video...image....thing...

I'm assuming I'm doing the code wrong so can anyone help me out with this?

Depends what the video is?

is it from youtube or hosted on the server/a local path?

if so, html5 does this super easily nowadays

I don't think i need to explain the code haha

Code:
<video width="320" height="240" controls="controls">
  <source src="/pathtomymovie/movie.mp4" type="video" />
<object width="320" height="240" src="movie.mp4">
</object>
</video>
 

Wooty

Well-Known Member
Staff member
When I use <e>Link</e> a hyper link to the video or absolutely nothing shows up, not an actual embedded video...image....thing...

That's not the actual code for embedding videos. The <e> tag is something proprietary to Team9000, which automagically detects the video site, scans it for info about the video ID and such, and expands it out into the full code for the embed. This is what our youtube embeds actually look like:

Code:
<div class="bbCodeEmbed">
<div style="display: inline-block; text-align: center; width: 640px;">
<div style="width: 640px; height: 390px; overflow: hidden; position: relative;">
<div class="nke_inner" style="position: absolute; top: 0; left: 0; display: none; width: 100%; height: 100%;">
LEFTBRACKETiframe
 style="width:100%;height:100%;"
 src="https://www.youtube.com/embed/xSVJbzt0IUE?&amp;loop=0&amp;wmode=Opaque&amp;html5=1&amp;autoplay=1&amp;fs=1&amp;border=0&amp;color1=0x000000&amp;color2=0x333333&amp;rel=0&amp;showinfo=1&amp;showsearch=0&amp;iv_load_policy=1&amp;hd=1&amp;autohide=2&amp;enablejsapi=1&amp;playerapiid=nke_1108917575&amp;modestbranding=0"
 frameborder="0"
 webkitallowfullscreen="true"
 allowfullscreen="true"
 mozallowfullscreen="true"
 allowtransparency="true"
RIGHTBRACKET
LEFTBRACKET/iframeRIGHTBRACKET
</div>
<div style="cursor: pointer; position: absolute; top: 0; left: 0; width: 100%; height: 100%;" class="nke_cover">
<img src="https://img.youtube.com/vi/xSVJbzt0IUE/hqdefault.jpg" style="width: 100%; margin: -45px 0; position: absolute; top: 0; left: 0;">
<img class="nke_ytplay" src="https://static.team9000.net/styles/default/team9000/youtube_play.png" style="position: absolute; top: 0; left: 0; margin-top: 164px; margin-left: 275px; text-align: center; width: 90px; height: 62px;">
</div>
</div>
</div>
</div>
 

Wooty

Well-Known Member
Staff member
Depends what the video is?

is it from youtube or hosted on the server/a local path?

if so, html5 does this super easily nowadays

I don't think i need to explain the code haha

Code:
<video width="320" height="240" controls="controls">
  <source src="/pathtomymovie/movie.mp4" type="video" />
<object width="320" height="240" src="movie.mp4">
</object>
</video>

Will definitely not work for youtube. Not really sure where you got that syntax from -- "type" should never be "video." Type is a field used to indicate the mime-type of the file, so the browser can quickly determine if it has a codec available to play it or not, without having to put through a HEAD request to the server first.
 

mikeymagic

Well-Known Member
Will definitely not work for youtube. Not really sure where you got that syntax from -- "type" should never be "video." Type is a field used to indicate the mime-type of the file, so the browser can quickly determine if it has a codec available to play it or not, without having to put through a HEAD request to the server first.
the if so was relating to wether it was a path to a video rather than youtube/etc
and I was just using example data haha relax, plus most browsers autodetect even if there isn't a type these days
 

Wooty

Well-Known Member
Staff member

Actually, the LEFTBRACKET and RIGHTBRACKET is literally just text. It prevents the iframe from loading before I want it to, as the <iframe> tag doesn't respect the display:none style (it used to). When you click on the thumbnail for a video, it fades in the nke_inner div, and replaces all the LEFTBRACKETs and RIGHTBRACKETs with actual brackets, causing the video to load.
 

Wooty

Well-Known Member
Staff member
the if so was relating to wether it was a path to a video rather than youtube/etc
and I was just using example data haha relax

Browsers support a very limited number of codecs regardless. If you haven't encoded it "specifically" for web, it's almost certain it won't play in all browsers. Especially Internet Explorer.
 

mikeymagic

Well-Known Member
Actually, the LEFTBRACKET and RIGHTBRACKET is literally just text. It prevents the iframe from loading before I want it to, as the <iframe> tag doesn't respect the display:none style (it used to). When you click on the thumbnail for a video, it fades in the nke_inner div, and replaces all the LEFTBRACKETs and RIGHTBRACKETs with actual brackets, causing the video to load.
Yeah I realised and then deleted ;)

that is fancy

edit: why wouldn't you just ajax it in with a pretty function instead? less times it has to write out that code
 

mikeymagic

Well-Known Member
Browsers support a very limited number of codecs regardless. If you haven't encoded it "specifically" for web, it's almost certain it won't play in all browsers. Especially Internet Explorer.
nothing works for ie though, it's almost redundant to bother writing code for ie.

but I get what you mean, I don't think he's going to be using anything too weird in terms of codecs though haha
 

Wooty

Well-Known Member
Staff member
Yeah I realised and then deleted ;)

that is fancy

edit: why wouldn't you just ajax it in with a pretty function instead? less times it has to write out that code

The NKE system supports almost 45 video and audio sites (although many of them are disabled now, because they don't play nice with HTTPS). Rather than maintain a giant javascript file that knows how to produce them all (and worry about the client needing to get a fresh copy whenever I update it), I just produce the embed code in php. It has the side benefit that I can include NKE from almost any project easily (thus -- embeds work on the Team9000 Wiki as well).
 

mikeymagic

Well-Known Member
The NKE system supports almost 45 video and audio sites (although many of them are disabled now, because they don't play nice with HTTPS). Rather than maintain a giant javascript file that knows how to produce them all (and worry about the client needing to get a fresh copy whenever I update it), I just produce the embed code in php. It has the side benefit that I can include NKE from almost any project easily (thus -- embeds work on the Team9000 Wiki as well).
oh wow, is it open source?
 
Top