- Sliding multi-level menu
https://developer.anscamobile.com/forum/2012/06/08/ios-style-submenu-navigation-using-tableview - Search box
http://developer.anscamobile.com/forum/2012/06/15/ios-style-search-box - Easy to use wrapper for the tab bar widget
https://developer.anscamobile.com/forum/2012/06/07/encapsulated-ios-style-tab-bar - Fading visual scroll bar
https://developer.anscamobile.com/forum/2012/06/06/ios-style-fading-scrollbar - Swipe to reveal delete buttons on menu rows
https://developer.anscamobile.com/forum/2012/05/21/swipe-delete-tableview - Scroll to top when tapping the status bar
https://developer.anscamobile.com/forum/2012/06/07/ios-style-scroll-top - Character index
https://developer.anscamobile.com/forum/2012/06/06/ios-style-alpha-strip - Creating display groups quickly and easily
https://developer.anscamobile.com/forum/2012/06/08/easy-display-group-generation
Friday, June 15, 2012
Building an iOS App in Corona Labs SDK
Tuesday, May 29, 2012
Friday, May 04, 2012
Polygon Triangulation
Monday, April 23, 2012
Monday, March 26, 2012
Tuesday, February 21, 2012
Wednesday, February 01, 2012
Tuesday, January 31, 2012
Angry Birds in 30 Mins or Less
Here is how to code an Angry Birds style game basis in less than 30 minutes using the awesome Corona SDK...
Friday, January 06, 2012
Thursday, January 05, 2012
Interesting And Social API In Corona SDK
Many of these can be found on this root page: http://blog.anscamobile.com/category/tutorials/
Firstly, the social API's:
- Facebook Single Sign On
http://blog.anscamobile.com/2012/01/implementing-facebook-single-sign-on/ - Native email and SMS
http://blog.anscamobile.com/2012/01/composing-email-and-sms-in-corona/ - App URL schemes
http://blog.anscamobile.com/2011/12/using-app-url-schemes-in-ios/ - Push notifications
http://blog.anscamobile.com/2011/12/push-notifications-for-ios-in-corona-sdk/ - Local notifications
http://blog.anscamobile.com/2011/09/local-notifications-now-in-daily-builds/ - Uploading photos to facebook
http://blog.anscamobile.com/2011/12/uploading-photos-to-facebook-in-corona/ - Kindle Fire apps
http://blog.anscamobile.com/2011/11/building-and-publishing-kindle-fire-apps/
- Storyboard API
http://blog.anscamobile.com/2011/11/introducing-the-storyboard-api/
http://blog.anscamobile.com/2011/11/common-storyboard-api-questions/ - JSON
http://blog.anscamobile.com/2011/08/tutorial-exploring-json-usage-in-corona/ - Custom fonts
http://blog.anscamobile.com/2011/07/custom-fonts-corona/ - Web popups
http://blog.anscamobile.com/2011/08/getting-creative-with-web-popups/ - XML files
http://blog.anscamobile.com/2011/07/how-to-use-xml-files-in-corona/ - Content scaling and Dynamic image resolution
http://blog.anscamobile.com/2010/11/content-scaling-made-easy/
http://blog.anscamobile.com/2011/01/dynamic-image-resolution-made-easy/ - Closures
http://blog.anscamobile.com/2011/02/using-closures-in-lua-to-avoid-global-variables-for-callbacks/
Wednesday, January 04, 2012
Tuesday, January 03, 2012
Tuesday, December 13, 2011
Tuesday, December 06, 2011
Calculating Trajectories
Friday, December 02, 2011
Tuesday, November 29, 2011
Wednesday, November 23, 2011
Tuesday, November 22, 2011
Thursday, November 10, 2011
iOS 5 Accessibility Features For Everyone
- General
- Accessibility
- Vision
- Zoom
Allows 3-finger zoom and pan of any screen, including the lock screen. Controls work as expected.
Good for when photo zoom doesn't quite do it for you or you need to check pixel-specific placement on a web page. - Speak Selection
Separate from VoiceOver, this allows any selectable text - web pages and such - to be spoken. The usual popup menu gains a "Speak/Pause" item. Speech speed can also be adjusted.
Good for when you just can't be bothered to read the page. - Hearing
- Custom Vibrations
When editing a contact this adds a 'Vibration' option immediately beneath the 'Ringtone' option. Vibrations come with 5 pre-set patterns and custom patterns can be very easily recorded, named and re-used.
Good for when you need to know who is calling you without taking the phone out your pocket. - LED Flash for Alerts
Simply flashes the camera flash LED when an alert, like an incoming call, occurs.
Good for truly silent but noticeable alerts. - Physical & Motor
- Triple-click Home
Set this to 'Ask' and it will pop up a menu whenever the Home button is triple-pressed - even when locked.
Good for easy access to some of the above options.
From there you've got options to turn On/Off the: - VoiceOver
Not the same as 'Speak Select' - reads anything tapped with a single tap. - Zoom
See above. - White on Black
Inverts the whole screen colour.
Friday, November 04, 2011
Tuesday, November 01, 2011
Doing iOS in CSS3 and HTML5 - iPad Popover Menu
- CSS Popover: https://forrst.com/posts/CSS3_iPad_style_popover_menu-PJv
- CSS tool: http://jsfiddle.net/XYubE/
- Original designs: http://dribbble.com/shots/289926-Free-download-of-my-iOS-style-popover
Wednesday, October 19, 2011
Thursday, October 13, 2011
T-SQL Tree Into XML
- http://stackoverflow.com/questions/2409228/generate-structured-xml-document-from-hierarchical-table-data-t-sql/2425180#2425180
CREATE function [dbo].[SelectCategoryChild](@categoryid as int)
returns xml
begin
return (
select
categoryid as "@id",
parentcategoryid as "@parentcategoryid",
title as "@title",
dbo.SelectCategoryChild(categoryid)
from category
where parentcategoryid = @categoryid
for xml path('category'), type
)
end
GO
SELECT
categoryid AS "@categoryid",
'' AS "@parentcategoryid",
title as "@title",
dbo.SelectCategoryChild(categoryid)
FROM category
WHERE parentcategoryid is null and siteid = 1
FOR XML PATH ('category'), root('categories')
CREATE TABLE [dbo].[Category](
[CategoryID] [int] IDENTITY(1,1) NOT NULL,
[ParentCategoryID] [int] NULL,
[Title] [varchar](150)
)
T-SQL FOR XML EXPLICIT
Monday, September 05, 2011
Thursday, August 25, 2011
Thursday, August 11, 2011
Tuesday, July 12, 2011
Monday, July 04, 2011
My HST Programme
- Wks 1 - 4
- Wks 5-8
- Wks 9-12
Thursday, June 30, 2011
Pumping Iron Links
- http://www.reddit.com/r/Fitness/comments/iynws/are_you_a_beginner_who_wants_to_lose_weight_wants/
- http://www.bodyrecomposition.com/fat-loss/the-fundamentals-of-fat-loss-diets-part-1.html
- http://www.bodyrecomposition.com/fat-loss/the-fundamentals-of-fat-loss-diets-part-2.html
- http://www.reddit.com/r/Fitness/comments/iynws/are_you_a_beginner_who_wants_to_lose_weight_wants/c27s3yx
- Is there a limit to how much protein the body can use in a single meal? | Wannabebig
- The Real Truth about Protein and Weight Loss
- The Leangains Guide | Intermittent fasting diet for fat loss, muscle gain and health
- How To Look Awesome Every Day | Intermittent fasting diet for fat loss, muscle gain and health
- Pre-Workout Protein Boosts Metabolism | Intermittent fasting diet for fat loss, muscle gain and health
- Fasted Training Boosts Muscle Growth? | Intermittent fasting diet for fat loss, muscle gain and health
- http://brandoncharls.com/2009/06/05/the-5-most-overrated-exercises/
- http://www.livestrong.com/article/435124-5-most-overrated-exercises/
- www.t-nation.com/portal_includes/articles/2005/05-132-training.html
- http://www.hypertrophy-specific.com/hst_notes.html
- Setting up a Hypertrophy-Specific Training? Cycle: Part I
- Setting up a Hypertrophy-Specific Training? Cycle: Part II
- Setting up a Hypertrophy-Specific Training? Cycle: Part III
- Setting up a Hypertrophy-Specific Training? Cycle: Part IV
- Setting up a Hypertrophy-Specific Training? Cycle: Part V
- Insulin - Wikipedia, the free encyclopedia
- Anabolism - Wikipedia, the free encyclopedia
- Hypertrophy-specific Training - Wikipedia, the free encyclopedia
- Creatine - Wikipedia, the free encyclopedia
- Adenosine triphosphate - Wikipedia, the free encyclopedia
- Central Nervous System (CNS) Fatigue
Monday, May 16, 2011
Thursday, April 14, 2011
Monday, March 28, 2011
Tiltopolis

Apps at AppStoreHQ
Friday, March 25, 2011
Friday, March 04, 2011
Worth Jailbreaking?
Thursday, February 24, 2011
Monday, February 21, 2011
Thursday, February 17, 2011
Useful AnscaMobile Corona Links
- http://www.youtube.com/user/anscamobile#p/u/8/qgzYk-jvLRU
- http://blog.anscamobile.com/
- http://blog.anscamobile.com/2011/02/app-of-the-week-effect/
- http://blog.anscamobile.com/2011/02/corona-sdk-tutorial-make-a-game-in-40-minutes/
- http://developer.anscamobile.com/code/
- http://developer.anscamobile.com/samples
Tuesday, February 15, 2011
Friday, January 28, 2011
Corona SDK Goes Windows
- Windows SDK:
http://blog.anscamobile.com/2011/01/corona-sdk-is-now-on-windows/ - Masking, In-App Purchase and Asynchronous HTTP:
http://blog.anscamobile.com/2011/01/but-wait-theres-more/
I Hate Windows Server 2008
Monday, January 17, 2011
Tuesday, January 11, 2011
Wednesday, January 05, 2011
Corona Collision Filters
Thursday, December 23, 2010
Friday, November 19, 2010
Finally Developing For iOS
- GameSalad - no-code game builder:
http://gamesalad.com/ - Appcelerator - javascript/HTML based apps for utilities, not games:
http://www.appcelerator.com/ - Corona - 'lua' based 2D development, for 2D games and utilities. My weapon of choice:
http://anscamobile.com/ - Cocos2D - Objective-C games framework for 2D games:
http://www.cocos2d-iphone.org/about - Unity3D - full 3D gaming development system, producing some awesome results:
http://unity3d.com/ - Rhodes - for a mix of things, closest to Corona, I think. Ruby on Rails:
http://rhomobile.com/products/rhodes/ - Sparrow - open source development for those who know a little Objective-C:
http://www.sparrow-framework.org/ - Some very useful links if you're looking for a broad range of programming info:
http://iphonedevdepot.com/tiki-index.php
Friday, October 22, 2010
Javascript Everyone Should Know - Iterating URL Args
It iterates through all the parameters and their arguments passed in the URL...
var url = window.location.toString();
var query_string = url.split('?')[1];
var params = query_string.split("&");
for (var i = 0; i < params.length; i++)
{
var name = params[i].split("=")[0];
var arg = params[i].split("=")[1];
alert(i+': '+name+' = '+unescape(arg));
}
Thursday, October 21, 2010
Simple Category Tree Walking In T-SQL
Tuesday, October 12, 2010
Writing Windows Services
Friday, October 01, 2010
Monday, September 27, 2010
Monday, September 20, 2010
Wednesday, September 15, 2010
DateDiff
Friday, September 10, 2010
DataView, DataTable, Unique, Select And Filters
Wednesday, September 08, 2010
Tuesday, September 07, 2010
The Register: iPad Apps Galore
Monday, September 06, 2010
LINQ2SQL Transaction
Thursday, September 02, 2010
Wednesday, September 01, 2010
Why Not? "Wave-Enabled" Google Email Server
Tuesday, August 31, 2010
ImageButton Without A SRC Value Causes GET Request!
Friday, August 20, 2010
Javascript: Finding All The Properties Of A JScript Object
Wednesday, August 18, 2010
Friday, August 13, 2010
LINQ2SQL Exception: The query contains references to items defined on a different data context
The query contains references to items defined on a different data context.JQuery
- JQuery site:
http://jquery.com/ - JQuery UI building:
http://jqueryui.com/ - 20 Advanced JQuery effects:
http://www.webdesignerdepot.com/2010/07/20-demos-showing-advanced-jquery-effects/ - Setting cookies with JQuery:
http://www.electrictoolbox.com/jquery-cookies/
Wednesday, August 11, 2010
Reset The Primary Key Of A Table
- Insert:
http://msdn.microsoft.com/en-us/library/ms174335.aspx
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=t-sql+insert - Rollback:
http://msdn.microsoft.com/en-us/library/ms181299.aspx
http://www.google.co.uk/search?hl=en&q=t-sql+rollback&aq=f&aqi=g2g-c2g1&aql=&oq=&gs_rfai= - DBCC CHECKIDENT:
http://msdn.microsoft.com/en-us/library/ms176057.aspx
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=DBCC+CHECKIDENT - Data type maximum values:
http://www.tsqltutorials.com/datatypes.php
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=t-sql+int+maximum+value - Pinal Dave:
http://blog.sqlauthority.com/2007/03/15/sql-server-dbcc-reseed-table-identity-value-reset-table-identity/
LINQ: NOT IN / NOT EXISTS
- http://programminglinq.com/blogs/marcorusso/archive/2008/01/14/the-not-in-clause-in-linq-to-sql.aspx
Concept Car Designs
- Interesting gallery of personal designs - http://www.mr-shojaie.com/
- Concept gallery - http://www.carbodydesign.com/gallery/2009/04/30-iran-car-design-exhibition/
- Favourite 1 - http://www.carbodydesign.com/gallery/2009/04/30-iran-car-design-exhibition/14/
- Favourite 2 - http://www.carbodydesign.com/gallery/2009/04/30-iran-car-design-exhibition/16/
Wednesday, July 21, 2010
Elite For The iPhone And iPad
Server Error With Virtual Directory
Server Error in '/TestSubSite' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.Parser Error Message: Could not load file or assembly 'SControls' or one of its dependencies. The system cannot find the file specified. (D:\web\testsite\web.config line 211)
Source Error:
|
Source File: D:\web\testsite\web.config Line: 211
Thursday, July 15, 2010
How To Get DateTime In XSLT
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:my="urn:sample" extension-element-prefixes="msxml">
<msxsl:script language="JScript" implements-prefix="my">
function today()
{
return new Date();
}
</msxsl:script>
<xsl:template match="/">
Today = <xsl:value-of select="my:today()"/>
</xsl:template>
</xsl:stylesheet>
/// Takes a string containing XML to be parsed and a string containing the the XSLT to do the parsing.
/// </summary>
public static string XSLTransformation(string xml, string xsl)
{
// create the readers for the xml and xsl
XmlReader reader = XmlReader.Create(new StringReader(xsl));
XmlReader input = XmlReader.Create(new StringReader(xml));
// create the xsl transformer
XslCompiledTransform t = new XslCompiledTransform(true);
XsltSettings settings = new XsltSettings(false, true);
t.Load(reader, settings, null);
// create the writer which will output the transformed xml
StringBuilder sb = new StringBuilder();
XmlWriterSettings tt = new XmlWriterSettings();
//tt.Encoding = new UTF8Encoding(false);
XmlWriter results = XmlWriter.Create(new StringWriter(sb)); //, tt);
// write the transformed xml out to a stringbuilder
t.Transform(input, null, results);
// return the transformed xml
return sb.ToString();
}
Every Project Fails
Wednesday, July 14, 2010
- How Google works: http://www.ppcblog.com/how-google-works/
- How Google ranks search results: http://www.google.com/technology/pigeonrank.html
Tuesday, July 13, 2010
SQL Knowledge Base
- Getting the last inserted key (identity):
http://blog.sqlauthority.com/2007/03/25/sql-server-identity-vs-scope_identity-vs-ident_current-retrieve-last-inserted-identity-of-record/ - T-SQL FOR XML Basics:
http://blah.winsmarts.com/2007-2-Bak2Basics__Learn_T-SQL_-_FOR_XML.aspx - T-SQL XML Crib-sheet:
http://www.simple-talk.com/sql/learn-sql-server/sql-server-xml-cribsheet/#fourth - Robyn Page's SQL Articles:
http://www.simple-talk.com/author/robyn-page/ - Never do this- Validating a URL in SQL:
http://sqlblog.com/blogs/adam_machanic/archive/2006/07/12/validate-a-url-from-sql-server.aspx - Reading XML files into table fields:
- http://stackoverflow.com/questions/3245301/using-t-sql-to-read-an-xml-feed-directly-into-an-xml-field-in-a-table
- SSIS XML Import tutorial video:
http://msdn.microsoft.com/en-us/library/cc952927(SQL.100).aspx - Processing XSLT in SQL Server:
http://blogs.msdn.com/b/mrorke/archive/2005/06/28/433471.aspx - Numbering Rows:
http://blogs.x2line.com/al/archive/2005/11/18/1323.aspx - Rollbacks:
http://www.geekinterview.com/question_details/33247
http://msdn.microsoft.com/en-us/library/aa175920(SQL.80).aspx
Thursday, July 08, 2010
Parsing XML Into T-SQL Tables
The aim was to make a query which would take any XML and list, in one table, all the elements, their attributes and their element and attribute values of the immediate child nodes of the root node. On top of that, each immediate child of the root had to be enumerated so it could be referenced properly when being inserted into another table/s.
Example input:
<root>
<date>07/07/10</date>
<start>07/02/10</start>
<m code="AL">
<Time>10:22</Time>
<Ask>1943.25</Ask>
<Open>1940.00</Open>
</m>
<m code="AA">
<Time>14:42</Time>
<Ask>143.05</Ask>
<Open>230.50</Open>
</m>
</root>
Example output:
| ElementIndex | ParentElement | FieldName | NodeType | FieldValue |
|---|---|---|---|---|
| 1 | m | Time | element | 10:22 |
| 1 | m | Ask | element | 1943.25 |
| 1 | m | Open | element | 1940.00 |
| 1 | m | code | attribute | AL |
| 2 | m | Time | element | 14:42 |
| 2 | m | Ask | element | 143.05 |
| 2 | m | Open | element | 230.50 |
| 2 | m | code | attribute | AA |
And finally, the SQL...
declare @xml XML
set @xml = 'YOUR XML HERE'
create table #t
(
rownum int,
xmlextract xml
)
-- populate the table with the child nodes of the root, if they have their own sub nodes
insert into #t
SELECT
row_number() over(order by getdate()) as 'RowNum',
pref.query('.') as XmlExtract
FROM
@xml.nodes('/*/*') AS extract(pref)
WHERE
pref.value('./*[1]', 'nvarchar(50)') IS NOT NULL
SELECT distinct rownum 'ElementIndex', ParentName 'ParentElement', FieldName, NodeType, FieldValue FROM
(
-- selects the attributes and their values from the xml
SELECT DISTINCT
rownum,
SubEl.SubElem.value('local-name(..)', 'nvarchar(50)') AS ParentName,
SubEl.SubElem.value('local-name(.)', 'nvarchar(50)') AS FieldName,
'attribute' as NodeType,
SubEl.SubElem.value('.', 'nvarchar(150)') AS FieldValue
FROM
#t
CROSS APPLY
xmlextract.nodes('//@*') AS SubEl(SubElem)
UNION
-- selects the inner element and their values from the xml
SELECT
rownum,
SubEl.SubElem.value('local-name(..)', 'nvarchar(50)') AS ParentName,
SubEl.SubElem.value('local-name(.)', 'nvarchar(50)') AS FieldName,
'element' as NodeType,
SubEl.SubElem.value('.', 'nvarchar(150)') AS FieldValue
FROM
#t
CROSS APPLY
xmlextract.nodes('/*/*') AS SubEl(SubElem)
) as tmp
ORDER BY ElementIndex, ParentElement, FieldName
drop table #t
However, for performance and tidy-up reasons, when using this code in a stored procedure, you may want to use a table variable. Here's the modified version:
declare @xml XML
set @xml = 'YOUR XML HERE'
declare @t table
(
rownum int,
xmlextract xml
)
-- populate the table with the child nodes of the root, if they have their own sub nodes
insert into @t
SELECT
row_number() over(order by getdate()) as 'RowNum',
pref.query('.') as XmlExtract
FROM
@xml.nodes('/*/*') AS extract(pref)
WHERE
pref.value('./*[1]', 'nvarchar(50)') IS NOT NULL
SELECT distinct rownum 'ElementIndex', ParentName 'ParentElement', FieldName, NodeType, FieldValue FROM
(
-- selects the attributes and their values from the xml
SELECT DISTINCT
rownum,
SubEl.SubElem.value('local-name(..)', 'nvarchar(50)') AS ParentName,
SubEl.SubElem.value('local-name(.)', 'nvarchar(50)') AS FieldName,
'attribute' as NodeType,
SubEl.SubElem.value('.', 'nvarchar(150)') AS FieldValue
FROM
@t
CROSS APPLY
xmlextract.nodes('//@*') AS SubEl(SubElem)
UNION
-- selects the inner element and their values from the xml
SELECT
rownum,
SubEl.SubElem.value('local-name(..)', 'nvarchar(50)') AS ParentName,
SubEl.SubElem.value('local-name(.)', 'nvarchar(50)') AS FieldName,
'element' as NodeType,
SubEl.SubElem.value('.', 'nvarchar(150)') AS FieldValue
FROM
@t
CROSS APPLY
xmlextract.nodes('/*/*') AS SubEl(SubElem)
) as tmp
ORDER BY ElementIndex, ParentElement, FieldName
References:

