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
<div id="recaptcha_widget" style="display:none"> | |
<div class="form-group"> | |
<label class="control-label col-sm-3">reCAPTCHA</label> | |
<div class="col-sm-8"> | |
<a id="recaptcha_image" href="#" class="thumbnail"></a> | |
<div class="recaptcha_only_if_incorrect_sol" style="color:red">Incorrect please try again</div> | |
</div> | |
</div> | |
<div class="form-group"> |
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
// this file located in /Library/Application Support/Titanium/mobilesdk/osx/{version_number} | |
// add the following methods to GeolocationModule.mm | |
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region | |
{ | |
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:NUMBOOL(YES),@"success",[NSDictionary dictionaryWithObjectsAndKeys:NUMDOUBLE(region.center.latitude),@"lat",NUMDOUBLE(region.center.longitude),@"lng",NUMDOUBLE(region.radius),@"radius",region.identifier,@"identifier",nil],@"region",nil]; | |
if ([self _hasListeners:@"enteredRegion"]) | |
{ | |
[self fireEvent:@"enteredRegion" withObject:event]; |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/4077645/hack.sh | sh | |
# |
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
function RateMe(ios_url, goog_url, usecount) { | |
if(!Ti.App.Properties.hasProperty('RemindToRate')) { | |
Ti.App.Properties.setString('RemindToRate', 0); | |
} | |
var remindCountAsInt = parseInt(Ti.App.Properties.getString('RemindToRate'), 10); | |
var newRemindCount = remindCountAsInt += 1; | |
if(remindCountAsInt === -1) { | |
// the user has either rated the app already, or has opted to never be | |
// reminded again. |
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
// console dump of sample returned object | |
I/TiAPI ( 244): (kroll$4: app://app.js) [797,3312] Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): weatherData => Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): forecastInfo => Object | |
I/TiAPI ( 244): { | |
I/TiAPI ( 244): city => 'Bydgoszcz, Kuyavian-Pomeranian Voivodeship', |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<link href="bootstrap/css/bootstrap.css" rel="stylesheet"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>New Appcelerator Cloud Services Project</title> | |
<script type="text/javascript"> | |
function onBodyLoad() { |
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
// this file located in /Library/Application Support/Titanium/mobilesdk/osx/{version_number} | |
// add the following methods to GeolocationModule.mm | |
- (void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region | |
{ | |
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:NUMBOOL(YES),@"success",[NSDictionary dictionaryWithObjectsAndKeys:NUMDOUBLE(region.center.latitude),@"lat",NUMDOUBLE(region.center.longitude),@"lng",NUMDOUBLE(region.radius),@"radius",region.identifier,@"identifier",nil],@"region",nil]; | |
if ([self _hasListeners:@"enteredRegion"]) | |
{ | |
[self fireEvent:@"enteredRegion" withObject:event]; |
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 UI = {}; | |
var W = {}; | |
var V = {}; | |
var AUTODETECT_NONE = Ti.UI.iOS.AUTODETECT_NONE; | |
var AUTODETECT_ALL = Ti.UI.iOS.AUTODETECT_ALL; | |
var AUTODETECT_PHONE = Ti.UI.iOS.AUTODETECT_PHONE; | |
var AUTODETECT_LINK = Ti.UI.iOS.AUTODETECT_LINK; | |
var AUTODETECT_ADDRESS = Ti.UI.iOS.AUTODETECT_ADDRESS; | |
var AUTODETECT_CALENDAR = Ti.UI.iOS.AUTODETECT_CALENDAR; |
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
// right navigation button | |
var btn = Ti.UI.createButton({ | |
title:'button' | |
}); | |
// window | |
var win = Ti.UI.createWindow({ | |
rightNavButton:btn, | |
backgroundColor:'blue' | |
}); |
NewerOlder