A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
Showing posts with label case. Show all posts
Showing posts with label case. Show all posts
Lowercasing in XSL
translate(field_to_change, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz').
Labels:
case,
characters,
function,
xsl
Case sensitive MySQL column
Make a case sensitive varchar column:
CREATE TABLE `page_dm` (
`url` varchar(500) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html
http://dev.mysql.com/doc/refman/5.0/en/create-table.html
CREATE TABLE `page_dm` (
`url` varchar(500) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html
http://dev.mysql.com/doc/refman/5.0/en/create-table.html
Labels:
case,
characters,
comparisons,
mysql
Upper and lowercase in vi
Select the text you want using visual mode, then type U for uppercase or u for lowercase.
Labels:
case,
text editor,
vi
XSL de-duping
example:
<xsl:choose> <xsl:when test="/session/dataset = 'news'"> <xsl:for-each-group select="item" by="lower-case(title)"> <xsl:apply-templates select="current-group()[1]"> </xsl:apply-templates></xsl:for-each-group> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="item[title != '']"> </xsl:apply-templates></xsl:otherwise>
</xsl:choose>
<xsl:choose> <xsl:when test="/session/dataset = 'news'"> <xsl:for-each-group select="item" by="lower-case(title)"> <xsl:apply-templates select="current-group()[1]"> </xsl:apply-templates></xsl:for-each-group> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="item[title != '']"> </xsl:apply-templates></xsl:otherwise>
</xsl:choose>
Labels:
case,
duplicates,
unique,
xml,
xsl
Subscribe to:
Posts (Atom)