This file contains 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
// Kosso imageAsCropped | |
// added to TiBlob.m | |
// requires 4 arguments : x, y, width, height | |
- (id)imageAsCropped:(id)args | |
{ | |
[self ensureImageLoaded]; | |
if (image!=nil) | |
{ | |
ENSURE_ARG_COUNT(args,4); |
This file contains 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 | |
// perfect for using as an upload php script for the dnd-file-upload scripts by pangratz | |
// found at https://github.com/pangratz/dnd-file-upload | |
class File_Streamer{ | |
private $_fileName; | |
private $_contentLength; | |
private $_destination; | |
public function __construct(){ |
This file contains 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
// modified version of https://github.com/pangratz/dnd-file-upload by pangratz | |
// modified by : kosso | |
// date : 06 November 2010 | |
// added some options for: | |
// allowMultiple | |
// allowedExtensions | |
// maximumFileSize | |
// also added dragEnter and dragLeave functions to enable change of appearance of the dropzone |
This file contains 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
/* Kosso : March 12th 2011 | |
This the only way I managed to do this without the app crashing on resume. | |
Done slightly differently to the KS example, since they unregister the service and | |
do not use a setInterval timer. | |
*/ | |
//############ in app.js : | |
// test for iOS 4+ |
This file contains 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
/** | |
* Appcelerator Titanium Mobile | |
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved. | |
* Licensed under the terms of the Apache Public License | |
* Please see the LICENSE included with this distribution for details. | |
*/ | |
#ifdef USE_TI_UIDASHBOARDVIEW | |
#import "TiUIDashboardView.h" | |
#import "TiUtils.h" |
This file contains 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 url_string = null; | |
function findUrl(s){ | |
// Parses the callback url including oauth_token and oauth_verifier from the webView error message. (The url occurs twice in the long message) | |
var hlink = /(ht|f)tp:\/\/([^ \,\;\:\!\)\(\"\'\<\>\f\n\r\t\v])+/g; | |
return (s.replace (hlink, function ($0,$1,$2) { s = $0.substring(0,$0.length); | |
while (s.length>0 && s.charAt(s.length-1)=='.') |
This file contains 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 applicationDataDirectoryPath = Ti.Filesystem.applicationDataDirectory.slice(0,Ti.Filesystem.applicationDataDirectory.length - 1).replace('file://localhost','').replace(/%20/g,' '); | |
// Drops the trailing slash | |
// Removes file://localhost | |
// Replace %20 with a space | |
This file contains 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
// Appcelerator Titanium (JS) code to produce multiple selection type data entry in a single window. | |
// via @CJ_Reed | |
// and Dan Tamas : http://cssgallery.info/making-a-combo-box-in-titanium-appcelerator-code-and-video | |
var win = Titanium.UI.currentWindow; | |
// build custom tableView data/layout |
This file contains 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
Copyright (c) 2011 Jed Schmidt, http://jed.is | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: | |
OlderNewer