Skip to content

Instantly share code, notes, and snippets.

jmngpt

Block or report user

Report or block jmngpt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jmngpt
jmngpt / MySqlDateDim
Last active Aug 29, 2015
Script to build a Date dimension for OLAP reporting on MySQL
View MySqlDateDim
DROP TABLE IF EXISTS DimDate;
CREATE TABLE IF NOT EXISTS DimDate (
date_id INT UNSIGNED NOT NULL,
fulldate date,
dayofmonth tinyint UNSIGNED,
dayofyear smallint UNSIGNED,
dayofweek tinyint UNSIGNED,
dayname varchar(10),
monthnumber tinyint UNSIGNED,
monthname varchar(10),
View Android check if contact Has Custom Ringtone
/**
* Check if an incoming call is from a contact with a custom ringtone set
* @return null if the incoming number doesn't have a custom ringtone, the ringtone's Uri if it does
*/
private Uri contactHasCustomRingtone(String callerNumber)
{
String customRingtoneUri = null;
Uri queryUri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(callerNumber));
String[] columns = new String[]
You can’t perform that action at this time.