Skip to content

Instantly share code, notes, and snippets.

View joshualambert's full-sized avatar
🎧

Josh Lambert joshualambert

🎧
View GitHub Profile
@joshualambert
joshualambert / gist:ba5d6bbe98bc9b8124e8a04648df9d20
Created October 20, 2017 13:33
Titanium Navigation Function
// Used to prompt a user for how to open an address, or open automatically, based on the platform.
function openAddress(destAddr, startAddr) {
var destParam = '';
var startParam = '';
if (typeof destAddr !== 'undefined') {
destParam = '&daddr=' + encodeURIComponent(destAddr);
}
if (typeof startAddr !== 'undefined') {
startParam = '&saddr=' + encodeURIComponent(startAddr);
}
@joshualambert
joshualambert / bitly.js
Last active September 29, 2017 21:51
Titanium BitLy CommonJS Library
/*
* Used to interact with the Bit.LY API.
* Written by: Josh Lambert
* Twitter: @zettageek
* Email: [email protected]
* Version: 1.0
*/
var apiKey,
apiVersion = 'v3',
Verifying I am +joshlambert on my passcard. https://onename.com/joshlambert
http://ftp.bmshelp.com/downloads/BMSRuntimes.exe
http://ftp.bmshelp.com/downloads/Foxreg.zip
http://ftp.bmshelp.com/downloads/SMB2_d.bat
http://ftp.bmshelp.com/downloads/Msxml.msi
http://link.bmshelp.com/
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]+)/([^/]*)$ resize.php?size=$1&file=$2
LOVs.
——————————
There are two types of LOVs:
1) Static - A set list of options in APEX.
- Static = Entries are automatically alphabetized
- Static2 = Entries are displayed in the order that they’re entered.
2) Dynamic - Based on SQL against the database.
LOVs can be defined as either:
a) A shared component.
<activity android:name=".MyAppActivity" android:label="@string/app_name" android:theme="@style/Theme.Titanium" android:configChanges="keyboardHidden|orientation" android:alwaysRetainTaskState="true" android:launchMode="singleInstance">
<intent-filter>
<data android:scheme="myapp" android:host="app"/>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
- [ ] Reviewed
- [ ] Tested
- [ ] Approved
@joshualambert
joshualambert / hintTextShim
Created January 2, 2014 16:44
hintText shim for Appcelerator's Titanium allowing hintText to be colored. Simply call this function after creating each textfield, and pass the option isPswd boolean if you're dealing with a password field.
// Used to fake hintText coloring to the font color.
// Requires hintText to be defined on the object being passed.
function hintTextShim(uiObject, isPswd) {
uiObject.objectFocus = function () {
if (uiObject.value === uiObject.hintText) {
if (typeof isPswd !== 'undefined' && isPswd === true) {
uiObject.passwordMask = true;
}
uiObject.value = '';
}
$query = mysqli_query($connection,"INSERT INTO `child_menu_details` (`id`, `parent_id`, `child_id`, `date`, `lunch`, `side1`, `side2`, `side3`, `side4`, `size`, `smoothie`, `orderDate`)
VALUES (NULL, '".$parentid."', '".$childid."', '".$date."' ,'".$lunch."', '".$side1."', '".$side2."', '".$side3."', '".$side4."', '".$size."', '".$smoothie."', '".$orderDate."')");