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 win = Titanium.UI.currentWindow; | |
| var ind=Titanium.UI.createProgressBar({ | |
| width:200, | |
| height:50, | |
| min:0, | |
| max:1, | |
| value:0, | |
| style:Titanium.UI.iPhone.ProgressBarStyle.PLAIN, | |
| top:10, |
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
| /* | |
| * The App Properties module is used for storing application-related data in property/value pairs that persist beyond application sessions and device power cycles. | |
| */ | |
| // Set property | |
| Ti.App.Properties.setString('myCustomProperty',JSON.stringify('This value is store')); | |
| // Get property | |
| Ti.App.Properties.getString('myCustomProperty'); |
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
| /*================================================== | |
| = Bootstrap 3 Media Queries = | |
| ==================================================*/ | |
| /*========== Mobile First Method ==========*/ | |
| /* Custom, iPhone Retina */ | |
| @media only screen and (min-width : 320px) { | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Box Shadow</title> | |
| <style> | |
| .box { | |
| height: 150px; | |
| width: 300px; | |
| margin: 20px; |
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 | |
| # Reference http://www.apphp.com/index.php?snippet=php-get-country-by-ip | |
| function getLocationInfoByIp(){ | |
| $client = @$_SERVER['HTTP_CLIENT_IP']; | |
| $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; | |
| $remote = @$_SERVER['REMOTE_ADDR']; | |
| $result = array('country'=>'', 'city'=>''); | |
| if(filter_var($client, FILTER_VALIDATE_IP)){ |
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 win1 = Titanium.UI.createWindow({ | |
| title:'Tab 1', | |
| backgroundColor:'#fff', | |
| layout: 'vertical' | |
| }); | |
| var bt1 = Ti.UI.createButton({title: 'send message (method 1)', top: 200}); | |
| bt1.addEventListener('click', function(e) |
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
| // create tab group | |
| var tabGroup = Titanium.UI.createTabGroup(); | |
| // | |
| // create base UI tab and root window | |
| // | |
| var win1 = Titanium.UI.createWindow({ | |
| title: 'Tab 1', | |
| backgroundColor: '#fff' | |
| }); |
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
| <html> | |
| <head> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
| <script type="text/Javascript"> | |
| $(document).ready(function () { | |
| $(function () { | |
| $('.add').on('click',function(){ | |
| var $qty=$(this).closest('p').find('.qty'); |
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
| <!-- Favicon for old browsers --> | |
| <link rel="shortcut icon" type="image/x-icon" href="img/favicon/16.ico"/> | |
| <!-- Favicons for browser with out support .ico file --> | |
| <link rel="icon" type="image/png" href="img/favicon/16x16.png" sizes="16x16"> | |
| <link rel="icon" type="image/png" href="img/favicon/32x32.png" sizes="32x32"> | |
| <!-- For Google TV --> | |
| <link rel="icon" type="image/png" href="img/favicon/96x96.png" sizes="96x96"> |
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 API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
| var mc_base_url = 'http://us7.api.mailchimp.com/1.3/?method=listSubscribe'; | |
| var mc_list_id = 'xxxxxxxxxx'; | |
| var mc_double_optin = false; | |
| /** | |
| * Uses the MailChimp API to add a subscriber to a list. | |
| */ | |
| function sendToMailChimp_(fn, ln, em, yr){ |