Skip to content

Instantly share code, notes, and snippets.

@projectxcappe
projectxcappe / gist:1419147
Created December 1, 2011 19:22
Why does this crash
+ (TLAdView *)adViewForTopLevelTab:(NSDictionary *)topLevelTab
frame:(CGRect)frame
parentViewController:(UIViewController *)parentViewController
{
TLLog( @"BCWebAdView:adViewForTopLevelTab:frame:%@", NSStringFromRect(frame) );
NSString *adViewClassName = @"BCWebAdView";
TLAdView *adView = nil;
- (void)methodOne{
//This is the button created for the subview Ad
adView = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[adView setFrame:frame];
adView.backgroundColor = [UIColor greenColor];
adView.opaque = YES;
[adView setUserInteractionEnabled:YES];
[adView addTarget:self action:@selector(_adButtonTappedTLAdView:event:) forControlEvents:UIControlEventAllTouchEvents];
@projectxcappe
projectxcappe / file.php
Created November 28, 2011 21:39
php jquery html css
<h3>A Snippet of Current TapLynx Users</h3>
<div class="thumb">
<?php
$images = glob("images/logos/*.*");
$objDOM = new DOMDocument();
$objDOM->load('includes/logo_names_links.xml');
$logos = $objDOM->getElementsByTagName("logo");
echo '<ul>';
foreach( $logos as $logo ){
echo '<li class="image-block"><a href="' .$logo->getAttribute('url'). '"><img src="images/logos/'.$logo->getAttribute('imagename').'" title="' .$logo->getAttribute('name'). '" class="table-image" /></a></li>';
@projectxcappe
projectxcappe / xml
Created November 28, 2011 18:01
php images
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#image-info').hide();
// class="table-image"
$('.table-image').mouseover(function(){ // the . references a class
var thisisthesrcyouwanted=$(this).attr('src');
$('#image-info').html(thisisthesrcyouwanted); //the # means an id name
$('#image-info').show();
}).mouseout(function(){
@projectxcappe
projectxcappe / gist:1323022
Created October 28, 2011 18:38
analytics...
- (void)_runSearchWithSearchString:(NSString *)searchString {
//10-28-2011 cass: omniture notification: "search called" event10
NSLog(@"search %@",searchString);
NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:searchString, @"query", nil];
[[NSNotificationCenter defaultCenter] postNotificationName:BCSearchNotification object:nil userInfo:userInfo];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if ([self _isWebServiceSearch]) {
self.searchString = searchString;
filename = "libTapLynx.a"
if [ $filename -e 1]
then
echo "file found."
exit 1
fi
<head>
<title>Horizontally Align Divs with CSS</title>
<style type="text/css">
html,body{
height: 100%;
width: 100%;
margin:0;
padding:0;
}
@projectxcappe
projectxcappe / fromfolder.php
Created September 15, 2011 23:22
Display Images From A Folder with PHP
//Display Images From A Folder with PHP
<?php
$files = glob("images/*.*");
for ($i=1; $i<count($files); $i++)
{
$num = $files[$i];
echo '<img src="'.$num.'" alt="random image">'."&nbsp;&nbsp;";
}
?>
@projectxcappe
projectxcappe / index.html
Created September 6, 2011 17:50
Android App using PhoneGap (in work)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Android v1.1</title>
<script type="text/javascript" src="js/jquery-1.6.min.js"></script>
<link rel="stylesheet" href="includes/styles.css" type="text/css" media="screen">
<link rel="stylesheet" href="includes/demo_table_jui.css" type="text/css" media="screen">
<script>
@projectxcappe
projectxcappe / rachel.html
Created September 6, 2011 17:48
Rachel's Creations HTML/js/css/jquery
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Rachel's Creations</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">