This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onVideoStalled = () -> | |
| this.pause() | |
| this.play() | |
| videos = document.querySelectorAll( "video") | |
| for video in videos | |
| video.addEventListener( "stalled", onVideoStalled, false ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onVideoCanplay = () -> | |
| this.play() | |
| onVideoLoaded = () -> | |
| # I had 2 video layers: foreground video which is playing and background video which is loading data and waiting to be displayed | |
| if isVideoOnTop( this ) | |
| this.play() | |
| else | |
| this.pause() | |
| # some foreground and background videos change logick here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| main() => print("hello"); | |
| void main() => print("hello"); | |
| int main() => print("hello"); | |
| ololo main() => print("hello"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int a = 1; | |
| num b = 1; | |
| Integer c = 1; | |
| print( a === b ); // => true | |
| print( a == b ); // => true | |
| print ( a === c ) // => true | |
| print ( b === c ) // => true | |
| double a = 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| main() { | |
| var a = 1 | |
| var b = null | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| main() { | |
| void a() { | |
| void b() { | |
| print( "b" ); | |
| } | |
| b(); | |
| } | |
| a(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void a( Integer b ) => print( "hello integer $b" ); | |
| void a( String b ) => print( "hello string $b" ); // fatal error: `a` is already defined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Integer a = "asdf"; | |
| a += 1; | |
| print( a ); // => asdf1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print( null + 1 ); // raises NullPointerException | |
| print( "asdasd" + 123 ); // => asdasd123 | |
| print( "asdasd" - 123 ); // raises NoSuchMethodException "-" | |
| print( 0 / 0 ); // => NaN | |
| print( "asd" * 3 ); // raises NoSuchMethodException "*" | |
| print( "asd" / 3 ); // same | |
| print( 3 * "asd" ); // raises NoSuchMethodException: method not found: 'mulFromInteger' | |
| Static a () => 1; | |
| print( a ); // => Closure | |
| print( [ 123, 456 ] + [ 1 ] ); // raises NoSuchMethodException |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Integer a = "asdf"; | |
| print( a is Integer ); | |
| a += 1; | |
| print( a is Integer ); | |
| print( a / 10 ); // NoSuchMethodException |