Your problem are our challenges

INTERFACE TYPE CANNOT BE STATICALLY ALLOCATED

August 15, 2011 — Anonymous
Filed under:

If you’ve tried doing something like this:

NSDictionary myDictionary = …

then you’ll run into this error code:
error: Semantic Issue: Interface type cannot be statically allocated

You need to declare a pointer to the instance variable. The correct code is:

NSDictionary *myDictionary = …

Send an HTML email with attachment from php

August 3, 2011 — Anonymous

PHP script to send email

<?php

$htmlbody = "This is an html message";
$textmessage = "This is a plain text message";

//Set Recipient Address
$to = "recipient@domain.com";

//Set Email Subject
$subject = "HTML email with attachment";

//define the from \ reply to headers
$headers = "From: yourname@domain.com\r\nReply-To: yourname@domain.com";

//create a unique boundary string to delimit different parts of the email (plain text, html, file attachment)
$random_hash = md5(date('r', time()));

//add boundary string and mime type specification

iOS How to Load a plist

July 31, 2011 — Anonymous
Filed under:

Property Lists – plists – are a standard way of storing data in iPhone and MacOS programs. Here’s how you use them on the iPhone.

NSString* plistPath = [[NSBundle mainBundle] pathForResource:@"dwarves" ofType:@"plist"];
NSDictionary *plistDict = [[NSDictionary alloc] initWithContentsOfFile:plistPath];

// use plistDict

[plistPath release];
[plistDict release];