One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| package main | |
| import ( | |
| "net/http" | |
| "os" | |
| "bytes" | |
| "path" | |
| "path/filepath" | |
| "mime/multipart" | |
| "io" |
| // These window.navigator contain language information | |
| // 1. languages -> Array of preferred languages (eg ["en-US", "zh-CN", "ja-JP"]) Firefox^32, Chrome^32 | |
| // 2. language -> Preferred language as String (eg "en-US") Firefox^5, IE^11, Safari, | |
| // Chrome sends Browser UI language | |
| // 3. browserLanguage -> UI Language of IE | |
| // 4. userLanguage -> Language of Windows Regional Options | |
| // 5. systemLanguage -> UI Language of Windows | |
| var browserLanguagePropertyKeys = ['languages', 'language', 'browserLanguage', 'userLanguage', 'systemLanguage']; |
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888, | |
| mimeTypes = { | |
| "html": "text/html", | |
| "jpeg": "image/jpeg", | |
| "jpg": "image/jpeg", | |
| "png": "image/png", |
| <?php | |
| /** | |
| * ブラウザをゆるく判別 | |
| * | |
| * @version 1.2.2 | |
| */ | |
| class CheckBrowser | |
| { |
| // gecko and webkit | |
| // details here https://developer.mozilla.org/en-US/docs/DOM/event.initKeyEvent | |
| var keyboardEvent = document.createEvent("KeyboardEvent"); | |
| var initMethod = typeof keyboardEvent.initKeyboardEvent !== 'undefined' ? "initKeyboardEvent" : "initKeyEvent"; | |
| keyboardEvent[initMethod]( | |
| "keydown", // event type : keydown, keyup, keypress | |
| true, // bubbles |
| /* ---------------------------------------------------------- */ | |
| /* */ | |
| /* A media query that captures: */ | |
| /* */ | |
| /* - Retina iOS devices */ | |
| /* - Retina Macs running Safari */ | |
| /* - High DPI Windows PCs running IE 8 and above */ | |
| /* - Low DPI Windows PCs running IE, zoomed in */ | |
| /* - Low DPI Windows PCs and Macs running Firefox, zoomed in */ | |
| /* - Android hdpi devices and above */ |