4.26.2010

SQL Backup from Command-line

http://stackoverflow.com/questions/880487/sql-server-command-line-backup-statement

@echo off
echo -- BACKUP DATABASE --
set /p DATABASENAME=Enter database name:
set DATESTAMP=%DATE:~-4%.%DATE:~7,2%.%DATE:~4,2%
set BACKUPFILENAME=%CD%\%DATABASENAME%-%DATESTAMP%.bak
set SERVERNAME=your server name here
echo.
sqlcmd -E -S %SERVERNAME% -d master -Q "BACKUP DATABASE
[%DATABASENAME%] TO DISK = N'%BACKUPFILENAME%' WITH INIT , NOUNLOAD ,
NAME = N'%DATABASENAME% backup', NOSKIP , STATS = 10, NOFORMAT"

4.13.2010

Umbraco : Pixlr

 http://our.umbraco.org/projects/pixlr 

2.22.2010

cufon: basic use

http://davidwalsh.name/cufon
http://kilianvalkhof.com/2009/css-xhtml/combining-cufon-and-font-face/

cufon: font render!

http://cufon.shoqolate.com/generate/

Demo: 40 creative uses of Cufon font replacement

http://spyrestudios.com/cufon-font-replacement/

Umbraco : Simple Tweets

http://www.blogfodder.co.uk/post/SimpleTweets-For-Umbraco.aspx

"On having layout": a look at IE/Win rendering issues

http://www.satzansatz.de/cssd/onhavinglayout.html

Security Question List: ASP.NET 2.0

http://msdn.microsoft.com/en-us/library/ms998375.aspx

HTML Forms: Input vs Buttons and styling with CSS

http://www.456bereastreet.com/archive/200701/styling_form_controls_with_css_revisited/
http://trevordavis.net/blog/tutorial/input-vs-button/
http://particletree.com/features/rediscovering-the-button-element/

Working with Umbraco and Visual Studio

http://our.umbraco.org/wiki/codegarden-2009/open-space-minutes/working-in-visual-studio-when-developing-umbraco-solutions
http://blog.leekelleher.com/2008/08/20/setting-up-visual-studio-to-work-with-umbraco/

JavaScript unpacker

http://www.strictly-software.com/unpack-javascript.aspx

2.17.2010

A quick tool for creating HTML tables out of spreadsheet data

While I wish it had more options, this tools has saved quite a bit of time getting data out of Excel and into a table.

http://tableizer.journalistopia.com/

2.16.2010

A better .NET Regular Expression Tester

http://derekslager.com/blog/posts/2007/09/a-better-dotnet-regular-expression-tester.ashx

Hybrid Onboarding

Google has been working with Plaxo and Facebook to improve the registration success rate for Gmail users. We now see success rates as high as 90%, compared to the 50-60% rate that most websites see with traditional registration mechanisms. This result was achieved using a combination of our OpenID, OAuth and Portable Contacts APIs. While those APIs have been available for over a year, we have added a number of refinements based on our experience with Plaxo and Facebook.

http://googlecode.blogspot.com/2009/11/hybrid-onboarding.html


http://www.techradar.com/news/internet/web/what-your-web-apps-will-be-like-in-2014-646680


For any of your readers that are looking to implement OpenID to facilitate registration, login, and rich user profile creation on your websites, check out the OpenID Foundation website at http://openid.net/add-openid/add-getting-started/ There are open source libraries and CMS plugins.

Scott Hanselman's 2007 Ultimate Developer And Power Users ToolList For Windows

http://www.hanselman.com/blog/ScottHanselmans2007UltimateDeveloperAndPowerUsersToolListForWindows.aspx


Umbraco: umbraco.library/FormatDateTime

FROM: http://en.wikibooks.org/wiki/Umbraco/Reference/umbraco.library/FormatDateTime


umbraco.library/FormatDateTime

Purpose:

This function allows you to format a date.

Arguments:

FormatDateTime('String Date', 'String Format')

String Date = The date you want to format
String Format = a coded string that is an example of the format you want to use (see below)

String Format Codes:

Month
MMMM = Full month name spelled out ('August')
MMM = Abbreviated month name ('Aug')
MM = 2 digit month ('08')
M = 1 or 2 digit month ('8')

Day
dddd = Full day of week ('Thursday')
ddd = Abbreviated day of the week ('Thu')
dd = 2 digit day ('06')
d = 1 or 2 digit day ('6')

Year
y or yy = 2 digit year ('99')
yyyy = 4 digit year ('1999')

Hour
h = 1 or 2 digit hour ('9')
hh = 2 digit hour ('09')
H = 24 hour ('21')

Minute
m = 1 or 2 digit minute ('3')
mm = 2 digit minute('03')


RFC-1123 date-time
r = the date-time following the RFC-1123 pattern
For example: Wed, 02 Oct 2002 13:00:00 GMT

Example XSLT Usage:

<xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'MMMM d, yyyy')"/>

<xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'r') "/>

Umbraco: OpenId Package

http://our.umbraco.org/projects/openid-for-umbraco

XSLT: Return a randomly ordered set of nodes [Umbraco]

FROM: http://forum.umbraco.org/yaf_postst5497_Get-x-number-of-uniquely-random-nodes.aspx#30603


We developed a simple solution for getting a randomly ordered set of nodes in the XSLT.

Using a random number seed, we sorted the node-set.

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:lk="http://leekelleher.com"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml msxsl umbraco.library lk">
    <xsl:output method="xml" omit-xml-declaration="yes" />

    <xsl:param name="currentPage" />
    <xsl:variable name="maxItems" select="number(5)" />

    <msxsl:script language="JavaScript" implements-prefix="lk">
        function Random(r) { return Math.ceil(Math.random()*r); }
    </msxsl:script>

    <xsl:template match="/">

        <xsl:for-each select="$currentPage/node[string(data[@alias='umbracoNaviHide']) != '1']">
            <xsl:sort select="lk:Random($maxItems)" order="descending" />
            <xsl:if test="position() &lt;= $maxItems">
                <xsl:value-of select="@nodeName" /><br />
            </xsl:if>
        </xsl:for-each>
     
    </xsl:template>
</xsl:stylesheet>


The output will be unique, as we only randomised the sorting; as opposed to trying to access multiple random nodes.

The "maxItem" variable can be changed to take a macro parameter.