Skip to content

Instantly share code, notes, and snippets.

View SeanPONeil's full-sized avatar

Sean O'Neil SeanPONeil

  • LogicGate
  • Ann Arbor, Michigan
View GitHub Profile
@SeanPONeil
SeanPONeil / SimpleCursorLoader.java
Created February 23, 2012 20:58 — forked from casidiablo/SimpleCursorLoader.java
Used to write apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this implementation is still used; it does not try to switch to the framework's implementation. See the framework SDK documentation for a class overview
import android.content.Context;
import android.database.Cursor;
import android.support.v4.content.AsyncTaskLoader;
/**
* Used to write apps that run on platforms prior to Android 3.0. When running
* on Android 3.0 or above, this implementation is still used; it does not try
* to switch to the framework's implementation. See the framework SDK
* documentation for a class overview.
*
@SeanPONeil
SeanPONeil / innodb.php
Created February 3, 2012 18:54
PHP Script for converting all tables in database to InnoDB engine
<?php
$link = db_connect();
$query = "SHOW tables";
$result = mysql_query($query);
while($row = mysql_fetch_array($result))
{
$tbl = $row[0];
@SeanPONeil
SeanPONeil / MGoBlog.css
Created January 20, 2012 19:28
CSS for MGoBlog on Android
img {
max-width: 100%
}
blockquote {
background-color:#F8FFA4;
border-bottom-color:black;
border-bottom-style:solid;
border-bottom-width:1px;
border-image:initial;
@SeanPONeil
SeanPONeil / node.html
Created January 20, 2012 17:27
Sample Node body
<p style="line-height: normal" class="content"><span>NOTRE DAME IS BRIAN BOITANO TIME</span></p> <p style="line-height: normal" class="content"><span><object width="560" height="315"><param name="movie" value="http://www.youtube.com/v/ZwgiGRmdFZ0?version=3&amp;hl=en_US&amp;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZwgiGRmdFZ0?version=3&amp;hl=en_US&amp;rel=0" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object></span></p> <h3><span>The Essentials&#160; <a href="http://mgoblog.com/sites/mgoblog.com/files/images/Puck-Preview-Notre-Dame_925/5576114507_117f9ef3d41.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="5576114507_117f9ef3d4[1]" border="0" alt="5576114507
@SeanPONeil
SeanPONeil / nodeBody.txt
Created January 11, 2012 20:08
Sample Node body HTML
<p>
<object height="315" width="560"><param name="movie" value="http://www.youtube.com/v/L3qnJdSVmSc?version=3&amp;hl=en_US" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed allowfullscreen="true" allowscriptaccess="always" height="315" src="http://www.youtube.com/v/L3qnJdSVmSc?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="560"></embed></object></p>
<p>
As <a href="http://mgoblog.com/mgoboard/ace-michigan-offers-13-ol-logan-tuley-tillman" style="text-align: -webkit-auto; " target="_blank">reported here</a> earlier today, Michigan offered 2013 Peoria (IL) Manual OL Logan Tuley-Tillman today. He now holds offers from Michigan, Mizzou, Illinois, and Indiana, and the <a href="http://mgoblog.com/diaries/introducing-logan-tuley-tillman" style="text-align: -webkit-auto; " target="_blank">last time I talked to him</a> he said that a Michigan offer would put the Wolverines at the top of his list. What did he have to say today? We talked over
@SeanPONeil
SeanPONeil / JP.java
Created October 23, 2011 20:49
Method to detect duplicates in array of integers in Java
boolean detectDuplicates( int [] x){
Set <Integer> intSet = new HashSet<Integer>();
for( int i: x){
if(intSet.contains(i)){
return true;
}
intSet.add(i);
}
return false;
}