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
<?php | |
function getFullLanguageName($languageCode) { | |
// Map two-letter language codes to full language names | |
$languageMap = [ | |
'en' => 'English', | |
'fr' => 'French', | |
'es' => 'Spanish', | |
'de' => 'German', | |
'it' => 'Italian', | |
'pt' => 'Portuguese', |
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
/* port of https://github.com/beautify-web/js-beautify/blob/master/python/jsbeautifier/unpackers/packer.py (MIT) */ | |
var unpacker = { | |
unpack: function (str) { | |
var params = unpacker.filterargs(str); | |
var payload = params[0], symtab = params[1], radix = params[2], count = params[3]; | |
if (count != symtab.length) { | |
throw new Error("Malformed p.a.c.k.e.r. symtab. (" + count + " != " + symtab.length + ")"); | |
} | |
var unbase = unpacker.unbaser(radix); | |
var lookup = (word) => symtab[unbase(word)] || word; |
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
const express = require('express'); | |
const fs = require('fs'); | |
const extract = require('extract-zip') | |
const formidable = require('formidable'); | |
const path = require('path'); | |
const uploadDir = path.join(__dirname, '/uploads/'); | |
const extractDir = path.join(__dirname, '/app/'); | |
if (!fs.existsSync(uploadDir)) { | |
fs.mkdirSync(uploadDir); | |
} |
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
<?php | |
/* Handle CORS */ | |
// Specify domains from which requests are allowed | |
header('Access-Control-Allow-Origin: *'); | |
// Specify which request methods are allowed | |
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS'); |
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
1 | |
00:00:00,000 --> 00:00:00,000 | |
- |