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 Dict(elements) { | |
| this.elements = elements || {}; | |
| this.hasSpecialProto = false; | |
| this.specialProto = undefined; | |
| } | |
| Dict.prototype.has = function (key) { | |
| if (key === "__proto__") { | |
| return this.hasSpecialProto; | |
| } |
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
| var window = Ti.UI.createWindow({ | |
| modal: true, // If this line is deleted, keyboardToolbar is displayed. | |
| title: 'window', | |
| backgroundColor: '#fff' | |
| }); | |
| var trash = Ti.UI.createButton({ | |
| systemButton: Ti.UI.iPhone.SystemButton.TRASH | |
| }); | |
| var textarea = Ti.UI.createTextArea({ | |
| editable: true, |
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
| // ipa2epub.scala | |
| // usage: scala ipa2epub.scala src.ipa [dst.epub] | |
| // TODO: error handling | |
| import java.io.{ File, FileInputStream, FileOutputStream, BufferedInputStream } | |
| import java.util.zip.{ ZipFile, ZipEntry, ZipOutputStream, CRC32 } | |
| import scala.util.matching.Regex | |
| val TopDir = "Payload" | |
| def die(message: String) { |