Skip to content

Instantly share code, notes, and snippets.

C:\Windows\system32>appc ti sdk install latest
Appcelerator Command-Line Interface, version 6.3.0
Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved.
You're up-to-date. Version 6.3.0.GA is currently the newest version available.
Run 'appc ti sdk install 6.3.0.GA --force' to re-install.
$ appc info
Appcelerator Command-Line Interface, version 6.3.0
Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved.
Operating System
Name = Microsoft Windows 8.1 Pro with Media Center
Version = 6.3.9600
Architecture = 64bit
# CPUs = 4
Memory = 5.9GB
@milon120203
milon120203 / DatetimePicker.js
Created December 4, 2017 20:22
Titanium.UI.Picker for Date with Time
var textfields_width = 300;
var textfields_height = 80;
var textfields_top = 80;
// Boolean flag in case you want to prevent
// any of the pickers to show immediately
var initialLoad = true;
var main_container = Titanium.UI.createWindow({});
@milon120203
milon120203 / code.txt
Created March 3, 2018 15:49
Facebook apps code for Appcelerator ti.facebook module in iOS
var fb = require('facebook');
fb.appid=137966330358106;
var win = Titanium.UI.createWindow({
title:'Facebook Test',
backgroundColor: 'white'
});
fb.permissions = ['public_profile', 'email', 'user_friends','user_location', 'user_posts','user_photos'];
fb.authorize();
var button = fb.createLoginButton({
top: '30dp',
@milon120203
milon120203 / app.js
Last active April 9, 2018 16:55
Auto ScrollView
//Tested with Ti-SDK 7.02.GA
//Works fine
var win=Titanium.UI.createWindow({
backgroundColor:"green"
});
var view= Ti.UI.createView({
height:Ti.UI.SIZE,
width: Ti.UI.SIZE,
top: "50%",
});
@milon120203
milon120203 / LevelWrapping.js
Created April 19, 2018 18:35
Level Wrapping
var win = Ti.UI.createWindow({
backgroundColor : 'white',
exitOnClose : true,
fullscreen : false,
layout : 'vertical',
title : 'Label Demo'
});
var label2 = Ti.UI.createLabel({
color : 'blue',
text : 'A long label with a few line breaks and unicode (UTF8) symbols such as a white chess piece \u2655 and the euro symbol \u20ac looks like this! ',
@milon120203
milon120203 / FileRenaming.js
Created June 25, 2018 17:35
File name changing with the content which will be changed two times.
var window = Ti.UI.createWindow({
layout:'vertical',
});
window.open();
var dir = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory);
var f = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'file_A.txt');
f.write('first value ');
@milon120203
milon120203 / index.js
Created July 17, 2018 16:46
Portrait Mode Working
//controllers/index.js
function doClick(e) {
alert($.label.text);
}
$.index.open();
@milon120203
milon120203 / index.js
Created September 10, 2018 17:53 — forked from MotiurRahman/index.js
Push Notification
var Cloud = require("ti.cloud");
var deviceToken = null;
// Places your already created user id credential
if (Ti.Platform.osname === "android") {
var CloudPush = require('ti.cloudpush');
// Initialize the module
CloudPush.retrieveDeviceToken({
@milon120203
milon120203 / c_palindrome.cpp
Created October 5, 2018 23:29
Palindrome test in C
/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
#include<string.h>