If you’ve updated your development phones to have the latest OS, 3.0.1, then you won’t be able to load you apps onto the device without first following this apple advisory
2. Copy and paste the following line into Terminal:
But theres a catch, if you copy the text they have from the document into Terminal there is an extra space created before the second “Developer” path, remove that and all should be ok.
When you alter your underlying data model the iPhone simulator will not be able to load your app as the cached version of the database doesn’t match the new one. The easiest way to resolve the problem is to run the simulator, click and hold your app and remove it like you would remove an app from your actual phone.
Once you’ve created your data model within Xcode, you may need to generate the classes so that you can use and reference them in your main project. To do this open the data model, select File/New File… from the Xcode menu system, this will display the following screen…
New File screen with Managed Object Class selected
Choose your location and then select the entities you want created.
Posted: 08-07-2009 | Author: flexicoder | Category: ASP.Net | No comments
If you’ve locked down access to your website but what your login page to pick up a stylesheet from a sub folder then you need to a add a location tag to your web.config to grant access
We’ve had to generate a search facility for books on a site. The user types in any number of values and the results are ranked based on how many of the terms are actually found.
The example below has a hard coded XML data, but obviously this would be passed in as a parameter, and as you build this externally you can include as many terms as you need.
DECLARE @xml XML
SET @xml = '<search>
<term text="and" />
<term text="the" />
<term text="princess" />
<term text="9780719554285" />
</search>';
/* Use a CTE to load the terms into a table for later joining */
With MatchingTerms (Term)
AS ( Select node.value('./@text', 'varchar(2000)') AS Term
FROM @xml.nodes(N'//term') T(node))
SELECT b.id,
b.coverTitle,
b.ISBN13,
shortName as [binding],
'B' as [type],
count(id) as score
FROM Book b,
MatchingTerms x
WHERE
b.coverTitle like '%' + x.Term + '%'
OR
b.ISBN13 = x.Term
GROUP BY
b.id, b.coverTitle, b.ISBN13, shortName
This operator allows you to supply an alternative value if the value being supplied is null. It only works on nullable datatypes but with a bit of googling came accross this article.
public int CurrentPage
{
get
{
return (int)(ViewState["_CurrentPage"] ?? 0);
}
set
{
this.ViewState["_CurrentPage"] = value;
}
}
Following code iterates through each entry in a dictory
For Each keyPair As KeyValuePair(Of String, Int32) In aDepot.PostcodeCounters
builder.Append("<tr><td>")
builder.Append(keyPair.Key)
builder.Append("</td><td align=""right"">")
builder.Append(keyPair.Value)
builder.Append("</td></tr>")
Next