Skip to content

Instantly share code, notes, and snippets.

@Ayyagaries
Ayyagaries / myxml.xml
Created July 10, 2019 15:12
xml file
<View layout="vertical">
<!-- <ScrollView layout="vertical"> -->
<View class="rx_box vw_form" layout="vertical" id="main_box" top="0" height="90%" >
<Label id="lbl_facility_name" class="heading" text="Facility Name" block="no"/>
<Label id="lbl_facility_address" textAlign="center" block="no"/>
<View class="rx_box" id="fn_ln_box" layout="vertical" height="Ti.UI.SIZE" top="3%" block="yes">
<Label text="Who will you be meeting with?" left="0" bottom="2%" class="boldText"/>
<View class="vw_row" id="vw_row_fn" top="2%" bubbleParent="false" left="0" inner_block="yes">
@Ayyagaries
Ayyagaries / jsfile.js
Created July 10, 2019 15:13
Javascript file
function displayUI(_response) {
var buttonView;
var response_keys = _.keys(_response);
if (response_keys.length === 0) {
$.vw_row_fn.add(addText("Contact's first name", "txt_firstname"));
$.vw_row_ln.add(addText("Contact's last name", "txt_lastname"));
$.vw_row_dept.add(addText("Department", "txt_department"));
$.vw_row_purpose.add(addText("Purpose of visit", "txt_purpose"));
} else if (response_keys.length > 0) {
<View layout="vertical">
<!-- <ScrollView layout="vertical"> -->
<View class="rx_box vw_form" layout="vertical" id="main_box" top="0" height="90%" >
<Label id="lbl_facility_name" class="heading" text="Facility Name" block="no"/>
<Label id="lbl_facility_address" textAlign="center" block="no"/>
<View class="rx_box" id="fn_ln_box" layout="vertical" height="Ti.UI.SIZE" top="3%" block="yes">
<Label text="Who will you be meeting with?" left="0" bottom="2%" class="boldText"/>
<View class="vw_row" id="vw_row_fn" top="2%" bubbleParent="false" left="0" inner_block="yes"/>
<View class="vw_row" id="vw_row_ln" bubbleParent="false" left="0" inner_block="yes"/>
function displayUI(_response) {
var buttonView;
var response_keys = _.keys(_response);
if (response_keys.length === 0) {
$.vw_row_fn.add(addText("Contact's first name", "txt_firstname"));
$.vw_row_ln.add(addText("Contact's last name", "txt_lastname"));
$.vw_row_dept.add(addText("Department", "txt_department"));
$.vw_row_purpose.add(addText("Purpose of visit", "txt_purpose"));
} else if (response_keys.length > 0) {
/**
* Location Wrapper
*
* @class location
* @uses core
*/
var App = require('core'),
lastKnownLocation,
showError = false,
function openCheckInScreen() {
if (geolocation.hasPermissions()) {
location.getDeviceLocation({
callback: getDeviceCallback
});
<Alloy>
<View class="rx_container" id="wrapper">
<Require type="widget" src="com.mcongrove.navigationBar" id="NavigationBar" />
<View layout="vertical">
<ScrollView layout="vertical" height="Ti.UI.SIZE" >
<View class="rx_box vw_form" layout="vertical" id="main_box" top="0" height="90%" >
<Label id="lbl_facility_name" class="heading" text="Facility Name" block="no"/>
<Label id="lbl_facility_address" textAlign="center" block="no"/>
@Ayyagaries
Ayyagaries / test.java
Created August 19, 2019 18:21
sample java app
import java.security.MessageDigest;
public class Main
{
public static void main(String[] args) {
System.out.println(hexStringToByteArray(sha256("badge1")));
System.out.println("-------");
System.out.println(byteArrayToHexString(hexStringToByteArray(sha256("badge1"))));
System.out.println(byteArrayToHexString(hexStringToByteArray(sha256("badge1"))));
@Ayyagaries
Ayyagaries / checkout.js
Created November 1, 2019 21:28
checkout.js
function afterCheckOut(didUserCheckinFromMobile) {
var badge_flash_status = false;
console.log("-----I am here in after checkout the vist ID is still ------ " + Alloy.Globals.visitId);
//$.btn_checkin.setTitle('Check In');
if (OS_IOS) {
api.get({
url: 'check_badge_status',
data: {
token: rep_token,
visit_id: Alloy.Globals.visitId
@Ayyagaries
Ayyagaries / location.js
Created November 1, 2019 22:16
Loacation.js
/**
* Location Wrapper
*
* @class location
* @uses core
*/
var App = require('core'),
lastKnownLocation,
showError = false,