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
| #include <stdio.h> | |
| void f(void) { | |
| puts("f"); | |
| return; | |
| } | |
| void g(void) __attribute__ ((weak, alias("f"))); | |
| int main(void) { | |
| g(); | |
| return 0; |
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
| #define ZERO 0 | |
| int main(void) { | |
| return ZERO; | |
| } |
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
| > echo %PATHEXT% | |
| .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY | |
| > type a.bat | |
| echo a.bat | |
| > type a.cmd | |
| echo a.cmd | |
| > a | |
| a.bat |
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
| import time | |
| import winsound | |
| dur = 60000 // 80 | |
| def main(): | |
| winsound.Beep(523, dur) | |
| winsound.Beep(523, dur) | |
| winsound.Beep(784, dur) | |
| winsound.Beep(784, dur) |
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
| import time | |
| import winsound | |
| _table = { 'c': 523, 'd': 587, 'e': 659, 'f': 698, 'g': 784, 'a': 880, 'b': 988 } | |
| _dur = 60000 // 80 | |
| def play(s): | |
| s = s.lower() | |
| for c in s: | |
| if c not in 'cdefgabr': |
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
| from ctypes import windll | |
| windll.user32.MessageBoxW(0, u'めっせーじ', u'たいとる', 0x40) |
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
| {p} # => {p: p} | |
| {p} = obj # => var p; p = obj.p; | |
| {p: p} = obj # => var p; p = obj.p; |
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
| p = (s) -> | |
| m = s.match /[0-7]+/ | |
| if m is null | |
| return NaN | |
| r = 0 | |
| for c, i in (m[0].split '').reverse() | |
| n = parseInt c, 10 | |
| r += n * Math.pow 8, i | |
| if s[0] is '-' then -r else r |
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
| function f(s) { | |
| return s.replace(/[A-~]/g, function (c) { | |
| return String.fromCharCode(c.charCodeAt(0) + 0xfee0); | |
| }); | |
| } | |
| function g(s) { | |
| return s.replace(/[\uff01-\uff5e]/g, function (c) { | |
| return String.fromCharCode(c.charCodeAt(0) - 0xfee0); | |
| }); | |
| } |
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
| function f(s) { | |
| return s.split('').map(function (a) { | |
| return ('00' + a.charCodeAt(0).toString(16)).slice(-2); | |
| }).join(' '); | |
| } | |
| process.stdin.setEncoding('utf8'); | |
| process.stdin.on('readable', function () { | |
| var a = process.stdin.read(); | |
| if (a !== null) { | |
| console.log('> ', a.replace(/\n/, '')); |