<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>concat &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/concat/</link>
	<description>Feed of posts on WordPress.com tagged "concat"</description>
	<pubDate>Wed, 23 Dec 2009 14:16:51 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[StringBuilder versus String]]></title>
<link>http://enggtech.wordpress.com/2009/12/17/stringbuilder-versus-string/</link>
<pubDate>Thu, 17 Dec 2009 15:59:44 +0000</pubDate>
<dc:creator>Visitor Blogs</dc:creator>
<guid>http://enggtech.wordpress.com/2009/12/17/stringbuilder-versus-string/</guid>
<description><![CDATA[Both String and StringBuilder can be used to handle strings. If the program uses only a few string o]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Both String and StringBuilder can be used to handle strings. If the program uses only a few string objects, it probably doesn’t matter which class you use. (Actually, using Stringwould be better because the Stringobject initializes faster than StringBuilder). However, if you are creating many String objects, you need to think about it.</p>
<p>Use the Stringclass for strings that do not change; otherwise, use StringBuilder.</p>
<p>Specifically, if you are performing multiple string concatenation operations, definitely use StringBuilder rather than String. If you use String, a new object will be created each time string addition (+) is performed. On the other hand, StringBuliderwill use a single object for concatenation. The following code snippet illustrates the difference. Two label objects, label1and label2, are used to display the elapse times of using Stringand StringBuilder.</p>
<p>This code uses String and StringBuilderfor the same task: concatenating strings 5000 times. Both strings are initialized with the same string literal: “This is a test string”. We measure the elapsed time in both cases. Here is the result of one run on a Smartphone emulator:</p>
<p>❑ String elapse time: 4 milliseconds</p>
<p>❑ StringBuilder elapse time: 2 milliseconds</p>
<p>As you can see, using StringBuilder for a large number of string concatenations is much faster than using String. Using String.Concat() instead of the addition operator of String yields similar results. By turning on performance counters (see below), you can obtain more detailed information about managed string objects. The following example shows the result of using the selected performance counters introduced early in this chapter to compare String and StringBuilder performance.</p>
<p><span style="color:#ff0000;">Using only String for the concatenation: </span></p>
<blockquote><p>Managed String Objects Allocated 5125</p>
<p>Bytes of String Objects Allocated 50232832</p>
<p>Garbage Collections (GC) 53</p></blockquote>
<p><span style="color:#ff0000;">Using only StringBuilderfor the concatenation: </span></p>
<blockquote><p>Managed String Objects Allocated 134</p>
<p>Bytes of String Objects Allocated 35580</p>
<p>Garbage Collections (GC) 0</p></blockquote>
<p>In the first case, there are more than 5000 Stringobjects allocated, and the garbage collector has run 53 times. The overhead of creating and garbage-collecting those String objects is probably the leading cause of poor performance. When using StringBuilder, only 134 String objects are created, and because not too much heap space has been taken, the garbage collection does not even run.</p>
<p>Note that the preceding sample code uses Debug.Writeln() to display text strings in the console. The Debugclass is in the System.Diagnosticsnamespace. In fact, you can build a console project for Windows Mobile Smartphone devices and use Debug.Writeln()to output debug information to standard output. (If you debug the program in Visual Studio, standard output can be viewed in the output window.)</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[MS SqlServer Row Value Concatenation]]></title>
<link>http://devblog.point2.com/2009/11/06/ms-sqlserver-row-value-concatenation/</link>
<pubDate>Fri, 06 Nov 2009 22:55:31 +0000</pubDate>
<dc:creator>Jesse Webb</dc:creator>
<guid>http://devblog.point2.com/2009/11/06/ms-sqlserver-row-value-concatenation/</guid>
<description><![CDATA[Recently, a colleague and I found ourselves in the situation of needing to concatenate values from m]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Recently, a colleague and I found ourselves in the situation of needing to concatenate values from multiple rows of a MS SqlServer database table. We were trying to form a comma-delimited list of phone numbers for every customer in our database. One customer may have many phone numbers. Here is a simplified diagram visualizing the relationship between customer and phone numbers:</p>
<div id="attachment_1038" class="wp-caption aligncenter" style="width: 335px"><img class="size-full wp-image-1038" title="customer_phonenumber" src="http://point2blog.wordpress.com/files/2009/11/customer_phonenumber1.png" alt="customer_phonenumber" width="325" height="105" /><p class="wp-caption-text">Customer - Phone Number Relationship</p></div>
<p>The format of data we were looking for was:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="319" valign="top">CustomerId</td>
<td width="319" valign="top">PhoneNumbers</td>
</tr>
<tr>
<td width="319" valign="top">1</td>
<td width="319" valign="top">“(306) 555-1111”, “555-2222”, “306-555-3333”</td>
</tr>
<tr>
<td width="319" valign="top">2</td>
<td width="319" valign="top">“3065554444”</td>
</tr>
</tbody>
</table>
<p>We tried various queries to perform the concatenation correctly but none of our <em>solutions</em> seemed to do the job perfectly; either the final &#8216;PhoneNumbers&#8217; string would have an additional comma at the end or some other undesired effect. We finally came across an article explaining in great detail of how to use TSQL (the SQL engine behind SqlServer) to perform the operations we needed.</p>
<p>http://www.projectdmx.com/tsql/rowconcatenate.aspx</p>
<p>This article has various examples describing AND explaining how to do multiple row value concatenations such as explicit examples for &#8220;Concatenating values when the number of items is small and known upfront&#8221; and &#8220;Concatenating values when the number of items is not known&#8221;. The author even walks through a recursive solution or two.</p>
<p>We determined that we knew none of our customers had more than five phone numbers based on the fact that they were limited to the PhoneType enumeration which only has five values. This allowed us to use the articles first example to get our job done efficiently. Here is our final solution:</p>
<pre>SELECT CustomertId, REPLACE(
 '"' + MAX( CASE seq WHEN 1 THEN phoneNumber ELSE '' END ) + '",' +
 '"' + MAX( CASE seq WHEN 2 THEN phoneNumber ELSE '' END ) + '",' +
 '"' + MAX( CASE seq WHEN 3 THEN phoneNumber ELSE '' END ) + '",' +
 '"' + MAX( CASE seq WHEN 4 THEN phoneNumber ELSE '' END ) + '",' +
 '"' + MAX( CASE seq WHEN 5 THEN phoneNumber ELSE '' END ) + '"', ',""', '' ) as PhoneNumbers
FROM (
 SELECT pn1.CustomerId, pn1.PhoneNumber, (
 SELECT COUNT(*)
 FROM PhoneNumber pn2
 WHERE pn2.CustomerId = pn1.CustomerId
 AND pn2.phoneNumber &#60;= pn1.phoneNumber)
 FROM PhoneNumber pn1) PhoneNumbersPerParty ( CustomerId, phoneNumber, seq )
GROUP BY CustomerId
By: <a href="http://devblog.point2.com/author/jessewebb/" target="_blank">Jesse Webb</a></pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[c# : Stupid string Concat]]></title>
<link>http://ipans.wordpress.com/2009/10/30/c-stupid-string-concat/</link>
<pubDate>Fri, 30 Oct 2009 12:53:11 +0000</pubDate>
<dc:creator>ipans</dc:creator>
<guid>http://ipans.wordpress.com/2009/10/30/c-stupid-string-concat/</guid>
<description><![CDATA[maksutnya supaya lebih mudah diprogramnya, namun apa daya performansinya jauh mengecewakan. itulah y]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>maksutnya supaya lebih mudah diprogramnya, namun apa daya performansinya jauh mengecewakan. itulah yang terjadi saat saya akan menyimpan sebuah array of double dengan menggunakan c#. simple problem :</p>
<address>int nx;<br />
int ny;<br />
double[,] data = new double[nx,ny];</address>
<address> </address>
<address>saya ingin dump data tersebut menjadi sebuah string lalu mengcompress-nya.</p>
<p>my first simple answer is :</p></address>
<address>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
            string result = &#8220;&#8221;;<br />
            for (int i = 0; i &#60; nx; i++)<br />
            {<br />
                for (int j = 0; j &#60; ny; j++)<br />
                {</address>
<address>//separate row data with space<br />
                    result += data[i, j].ToString() + &#8221; &#8220;;<br />
                }<br />
//separate column data with space<br />
                result += &#8220;-&#8221;;<br />
            }</address>
<address>           result = compress(result);</address>
<address>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</address>
<address>DEBUG &#8211;&#62; RUN &#8230;</address>
<address>1 menit berlalu &#8230;..</address>
<address>5 menit berlalu &#8230;</address>
<address>10 menit berlalu &#8230;.</address>
<address>break the RUN&#8230; </address>
<address>watch i = 651  dan j = 126<br />
</address>
<address>usut punya usut  nx = 931 dan ny=165 &#8230;. wahh h&#8230;. masih 2/3 jalan nih &#8230;</address>
<address> </address>
<address>langsung ganti algoritma baru :</address>
<address></address>
<address>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</address>
<address>         public void dumpdatatofile(string filename)<br />
        {<br />
            StreamWriter sr = File.CreateText(filename);</p>
<p>            for (int i = 0; i &#60; nx; i++)<br />
            {<br />
                for (int j = 0; j &#60; ny; j++)<br />
                {<br />
                    sr.WriteLine(data[i,j].ToString(&#8220;E&#8221;));<br />
                }<br />
            }</p>
<p>            sr.Close();<br />
        }<br />
        public string loadFileToString(string filename)<br />
        {<br />
            StreamReader sr = File.OpenText(filename);<br />
            string result = sr.ReadToEnd();<br />
            sr.Close();<br />
            return result;</p>
<p>        }</p>
<p>        public void main()<br />
        {<br />
            string filename = &#8220;C:\\waveshot.&#8221; + Guid.NewGuid().ToString(&#8220;N&#8221;) + &#8220;.tmp&#8221;;<br />
            dumpdatatofile(filename);<br />
            cVelocities = Utils.Compress(loadFileToString(filename));<br />
//            File.Delete(filename);<br />
        }</p>
</address>
<address></address>
<address>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</address>
<address>DEBUG &#8211;&#62; RUN &#8230;</address>
<address><strong>1 second later &#8230;. done !!!</strong></address>
<address></address>
<p>wow &#8230; dashyattt &#8230;.<br />
string concate c# sucksss &#8230;..</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ConCat]]></title>
<link>http://jardar.wordpress.com/2009/09/10/concat/</link>
<pubDate>Wed, 09 Sep 2009 22:05:36 +0000</pubDate>
<dc:creator>Jardar</dc:creator>
<guid>http://jardar.wordpress.com/2009/09/10/concat/</guid>
<description><![CDATA[Phonoloblog melder at ConCat (Constraint Catalogue) har vorte vaksen: ein wiki med optimalitetsteore]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://camba.ucsd.edu/blog/phonoloblog/2009/09/09/filling-concat/" target="_blank">Phonoloblog</a> melder at <a href="http://concat.wiki.xs4all.nl/" target="_blank">ConCat</a> (Constraint Catalogue) har vorte vaksen: ein wiki med optimalitetsteoretiske… ja, kva skal ein kalle det på norsk? Eg har brukt «føringar», men har vorte meir glad i «krav», somme bruker «betingelser», og på engelsk kallar dei det «constraints», som etter ordboka kan omsetjast med «restriksjonar». I alle fall, ConCat er her.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SQL Injection Vulnerability]]></title>
<link>http://logsmylife.wordpress.com/2009/08/13/sql-injection-vulnerability/</link>
<pubDate>Thu, 13 Aug 2009 07:33:22 +0000</pubDate>
<dc:creator>unamedplayer</dc:creator>
<guid>http://logsmylife.wordpress.com/2009/08/13/sql-injection-vulnerability/</guid>
<description><![CDATA[Baru belajar SQL aja udah blagu nulis SQL Injection, ah bodo amat,, abisnya gak diajarin sih SQL Inj]]></description>
<content:encoded><![CDATA[Baru belajar SQL aja udah blagu nulis SQL Injection, ah bodo amat,, abisnya gak diajarin sih SQL Inj]]></content:encoded>
</item>
<item>
<title><![CDATA[Joining columns/ concatenate strings in Oracle PLSQL/ MySQL]]></title>
<link>http://luckylarry.wordpress.com/2009/08/09/joining-columns-concatenate-strings-in-oracle-plsql-mysql/</link>
<pubDate>Sun, 09 Aug 2009 11:11:16 +0000</pubDate>
<dc:creator>luckylarry</dc:creator>
<guid>http://luckylarry.wordpress.com/2009/08/09/joining-columns-concatenate-strings-in-oracle-plsql-mysql/</guid>
<description><![CDATA[Joining columns and results together is really easy in Oracle or MySQL, in both there is the same fu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;"><strong>Joining columns and results together is really easy in Oracle or MySQL, in both there is the same function – CONCAT().</strong></p>
<p style="text-align:justify;">However you should be aware that there are differences between the databases on how this function works. In MySQL the CONCAT() function works by joining any number of items specified in the function – I don’t think that there is a limit? But with Oracle it seems that you can only join two strings at a time using this function.</p>
<p><a rel="bookmark" href="http://luckylarry.co.uk/2009/08/join-columns-concatenate-strings-in-oracle-plsql-mysql/">Joining columns/ concatenate strings in Oracle PLSQL/ MySQL</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[TIP] Concatenado inverso con tac / cat]]></title>
<link>http://malditonerd.wordpress.com/2009/07/12/tip-concatenado-inverso-con-tac-cat/</link>
<pubDate>Sun, 12 Jul 2009 20:59:34 +0000</pubDate>
<dc:creator>malditonerd</dc:creator>
<guid>http://malditonerd.wordpress.com/2009/07/12/tip-concatenado-inverso-con-tac-cat/</guid>
<description><![CDATA[¿Quién no ha usado cat en la consola de linux para algo alguna vez? Que tire la primera piedra! Este]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h2>¿Quién no ha usado cat en la consola de linux para algo alguna vez? Que tire la primera piedra!</h2>
<p>Este me lo mostró un amigo hace algunos años y lo acabo de recordar por que he tenido que usarlo. Yo ni sabía que existía tal cosa&#8230;</p>
<p>El comando es <strong>tac</strong>, hace exactamente lo inverso a <strong>cat</strong>. Es decir, si mi archivo.txt contiene dos líneas: linea1 y linea2, hacer <strong>cat archivo.txt me devuelve:</strong></p>
<blockquote><p>~ $ cat archivo.txt<br />
linea1<br />
linea2</p></blockquote>
<p><strong>Si por otrto lado, uso tac, el resultado:</strong></p>
<blockquote><p>~ $ tac archivo.txt<br />
linea2<br />
linea1</p></blockquote>
<p>Muy útil en esos casos en que necesitamos solo la cabecera de un archivo, por ejemplo.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Oracle. Función para concatenar resultados de tipo texto en una select]]></title>
<link>http://javierrguez.wordpress.com/2009/05/13/oracle-funcion-para-concatenar-resultados-de-tipo-texto-en-una-select/</link>
<pubDate>Wed, 13 May 2009 11:41:54 +0000</pubDate>
<dc:creator>javierrguez</dc:creator>
<guid>http://javierrguez.wordpress.com/2009/05/13/oracle-funcion-para-concatenar-resultados-de-tipo-texto-en-una-select/</guid>
<description><![CDATA[Oracle pone a disposición del usuario funciones de agrupación como las funciones MAX, MIN, AVG, ]]></description>
<content:encoded><![CDATA[Oracle pone a disposición del usuario funciones de agrupación como las funciones MAX, MIN, AVG, ]]></content:encoded>
</item>
<item>
<title><![CDATA[concat videos with cat and ffmpeg]]></title>
<link>http://blog.srvme.de/2009/03/15/concat-videos/</link>
<pubDate>Sun, 15 Mar 2009 15:50:49 +0000</pubDate>
<dc:creator>nils petersohn</dc:creator>
<guid>http://blog.srvme.de/2009/03/15/concat-videos/</guid>
<description><![CDATA[i tried several methods but this was the best: cat *.MPG | ffmpeg -i - -b 1500k -ar 44100 together.f]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>i tried several methods but this was the best:</p>
<ul style="margin-left:0;border:1px solid #D8D8D8;background-color:#f8f8f8;overflow:auto;width:100%;">
<pre>cat *.MPG &#124; ffmpeg -i - -b 1500k -ar 44100 together.flv</pre>
</ul>
<p>the * goes in ordered state so if you have videos from your camera they are already ordered.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Concatenando strings - C#]]></title>
<link>http://alanrossi.wordpress.com/2009/03/03/concatenando-strings-c/</link>
<pubDate>Tue, 03 Mar 2009 15:54:50 +0000</pubDate>
<dc:creator>Alan Rossi</dc:creator>
<guid>http://alanrossi.wordpress.com/2009/03/03/concatenando-strings-c/</guid>
<description><![CDATA[Hoje deixo uma dica simples, mas muito útil de como concatenar strings em C# usando o método estátic]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Hoje deixo uma dica simples, mas muito útil de como concatenar strings em C# usando o método estático Concat da classe String.<br />
Veja como isso é feito no exemplo abaixo: </p>
<p><em>string frase1 = &#8220;Gosto de &#8220;;<br />
string frase2 = &#8220;programar em C#&#8221;;<br />
string frase3 = String.Concat(frase1, frase2);<br />
Console.WriteLine(frase3);</em></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Flex Tutorials and samples]]></title>
<link>http://newflexworld.wordpress.com/2009/02/01/flex-tutorials-and-samples/</link>
<pubDate>Sun, 01 Feb 2009 10:18:06 +0000</pubDate>
<dc:creator>ursprakash</dc:creator>
<guid>http://newflexworld.wordpress.com/2009/02/01/flex-tutorials-and-samples/</guid>
<description><![CDATA[Flex is a highly productive, free open source framework for building and maintaining expressive web ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Flex is a highly productive, free open source framework for building and maintaining expressive web applications that deploy consistently on all major browsers, desktops, and operating systems -Adobe</p>
<p> </p>
<p><strong><a href="http://gnanz-flexworld.blogspot.com">Adobe Flex</a></strong> is a collection of technologies released by Adobe Systems for the development and deployment of cross platform rich Internet applications based on the proprietary Adobe Flashplatform. The initial release in March 2004 by Macromedia included a software development kit, anIDE, and a J2EE integration application known as Flex Data Services. Since Adobe acquired Macromedia in 2005, subsequent releases of Flex no longer require a license for Flex Data Services, which has become a separate product rebranded as LiveCycle Data Services. -Wikipedia</p>
<p> </p>
<p> </p>
<p>There are many sites providing the tutorials and samples in net.Here is my <a title="Flex Sanples blog" href="http://gnanz-flexworld.blogspot.com" target="_blank">Flex samples blog </a>,</p>
<p> </p>
<p><a title="http://gnanz-flexworld.blogspot.com" href="http://gnanz-flexworld.blogspot.com" target="_blank">http://gnanz-flexworld.blogspot.com</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Prolog: List Operations]]></title>
<link>http://calltopower.wordpress.com/2009/01/29/prolog-list-operations/</link>
<pubDate>Thu, 29 Jan 2009 21:18:46 +0000</pubDate>
<dc:creator>CallToPower</dc:creator>
<guid>http://calltopower.wordpress.com/2009/01/29/prolog-list-operations/</guid>
<description><![CDATA[Here a few Prolog List-Operations I had to write at the University.]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.calltopower.de/media/code/Prolog/list-operations.pl" target="_blank">Here</a> a few Prolog List-Operations I had to write at the University.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[The column name that you entered is already in use or reserved. Choose another name.]]></title>
<link>http://hristopavlov.wordpress.com/2009/01/15/the-column-name-that-you-entered-is-already-in-use-or-reserved-choose-another-name/</link>
<pubDate>Thu, 15 Jan 2009 03:34:54 +0000</pubDate>
<dc:creator>hristopavlov</dc:creator>
<guid>http://hristopavlov.wordpress.com/2009/01/15/the-column-name-that-you-entered-is-already-in-use-or-reserved-choose-another-name/</guid>
<description><![CDATA[This is an annoying one. SharePoint will not allow you to create a site column from the UI (using th]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This is an annoying one. SharePoint will not allow you to create a site column from the UI (using the _layouts/fldnew.aspx page) if the name of the column is one of:</p>
<p><strong>constructor</strong>, <strong>concat</strong>, <strong>join</strong>, <strong>pop</strong>, <strong>push</strong>, <strong>reverse</strong>, <strong>shift</strong>, <strong>slice</strong>, <strong>sort</strong>, <strong>splice</strong> or <strong>unshift</strong></p>
<p>even if these site columns do not exist in the SharePoint site. If you try to create one of these fields you will get an error message saying that:</p>
<p><em>The column name that you entered is already in use or reserved. Choose another name.</em></p>
<p>Hmmm &#8230; Well after investigating this one it turned out to be a genuine bug caused by a JavaScript artifact. The way the fldnew.aspx page checks at the client side if a column already exists is by having all existing columns stored in a JavaScript Array called <em>g_FieldName</em> and then checking if the column that user tries to create is already in the array. This is done by the following code:</p>
<div style="overflow:auto;background-color:silver;">
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:&#34;">&#8230;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;">g_FieldName[<span style="color:#a31515;">"E-Mail"</span>.toLowerCase()] = 1;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"> </span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:&#34;">g_FieldName[<span style="color:#a31515;">"Type"</span>.toLowerCase()] = 1;</span></p>
<p class="MsoNormal" style="margin:0 0 10pt;"><span style="font-size:10pt;line-height:115%;font-family:&#34;">&#8230;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:&#34;">function </span><span style="font-size:10pt;font-family:&#34;">doesFieldNameConflict( strName )</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>      </span><span style="color:blue;">if</span>(g_FieldName[strName.toLowerCase()])</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>            </span><span style="color:blue;">return</span> <span style="color:blue;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>      </span><span style="color:blue;">else</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>            </span><span style="color:blue;">return</span> <span style="color:blue;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
</div>
<p>The problem with this code is that for some unknown to me reason which is probably related to the way the JavaScript VM is implemented, if you create a new Array called <strong>arr</strong> and then try to read <strong>arr["shift"]</strong> for example, this will return the following string:</p>
<p> <img class="alignnone size-full wp-image-227" title="shift" src="http://hristopavlov.wordpress.com/files/2009/01/shift.jpg" alt="shift" width="194" height="139" /></p>
<p>And this happens on both Internet Explorer and Firefox. And this will happen for all strings that are names of methods of the JavaScript Array object and this is case sensitive. Because SharePoint does the check in lower case, then only the methods that are entirely in lower case will be a problem and the list of SharePoint site columns you won&#8217;t be able to create from the UI given at the top is the list of all methods of the Array object that are fully lower case.</p>
<p>So how to get around this. Well first of all this is a bug that should be resolved by Microsoft. They could either store everything in upper case (no JavaScript methods are fully upper case) or can change the function to</p>
<div style="overflow:auto;background-color:silver;">
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;color:blue;font-family:&#34;">function </span><span style="font-size:10pt;font-family:&#34;">doesFieldNameConflict( strName )</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;">{</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>      </span><span style="color:blue;">if</span>(g_FieldName[strName.toLowerCase()] == 1)</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>            </span><span style="color:blue;">return</span> <span style="color:blue;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>      </span><span style="color:blue;">else</span></span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;"><span>            </span><span style="color:blue;">return</span> <span style="color:blue;">true</span>;</span></p>
<p class="MsoNormal" style="line-height:normal;margin:0;"><span style="font-size:10pt;font-family:&#34;">}</span></p>
</div>
<p>The problem with the first function is that <strong>g_FieldName[strName.toLowerCase()] </strong>will be evaluated to true for anything which is not 0, false, null or unknown. In the case of arr["shift"] it will return the string shown on the screen-shot above, which will be evaluated to &#8220;true&#8221;. So explicitly testing for &#8220;1&#8243; will resolve the bug.</p>
<p>In the meantime if you need to create a site column with one of those names you could do it using code or features. And if you wonder how I discovered this issue &#8211; well I wanted to create a site column called &#8220;Shift&#8221; as in work shift which I consider as a totally legitimate use case.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[ Scripts Null Scripts  Web Directory Script 2.0]]></title>
<link>http://nullwarezscript.wordpress.com/2009/01/12/scripts-null-scripts-web-directory-script-20/</link>
<pubDate>Mon, 12 Jan 2009 22:29:00 +0000</pubDate>
<dc:creator>nullwarezscript</dc:creator>
<guid>http://nullwarezscript.wordpress.com/2009/01/12/scripts-null-scripts-web-directory-script-20/</guid>
<description><![CDATA[Web Directory Script is a classifieds listings script, built in PHP. The site owner could configure ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Web Directory Script is a classifieds listings script, built in PHP. The site owner could configure this script in any way he wants. It will bring a lot of money to the site owner, without any spendings.</p>
<p>Web Directory Script may be used for auto, business, employment, personals, real estate and rentals listings.</p>
<p>This classifieds script was developed for a multi use. The site manager may configure it as a car seller site, employment directory or restaurants classifieds.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Gradasi]]></title>
<link>http://pikojogja.wordpress.com/2009/01/02/gradasi/</link>
<pubDate>Fri, 02 Jan 2009 07:00:23 +0000</pubDate>
<dc:creator>pikojogja</dc:creator>
<guid>http://pikojogja.wordpress.com/2009/01/02/gradasi/</guid>
<description><![CDATA[Gradasi Lokasi AMIKOM, Concat, Depok, Sleman Yogyakarta, Indonesia Kamera Kodak CX 7330 Lensa Kodak ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div id="attachment_276" class="wp-caption aligncenter" style="width: 310px"><a href="http://pikojogja.files.wordpress.com/2009/01/gradasi_by_piko_jogja.jpg"><img class="size-medium wp-image-276" title="gradasi_by_piko_jogja" src="http://pikojogja.wordpress.com/files/2009/01/gradasi_by_piko_jogja.jpg?w=300" alt="Gradasi" width="300" height="225" /></a><p class="wp-caption-text">Gradasi</p></div>
<p>Lokasi AMIKOM, Concat, Depok, Sleman Yogyakarta, Indonesia</p>
<p>Kamera Kodak CX 7330<br />
Lensa Kodak Built-In/Standard<br />
Film Digital<br />
Filter &#8212; Tidak Ada &#8211;<br />
Kecepatan 1/1024<br />
Diafragma f/6.7<br />
Focal Length 9 mm</p>
<p>link : <a href="http://piko-jogja.deviantart.com/art/Gradasi-64707431" target="_blank">deviantart.com</a> , <a href="http://www.ayofoto.com/?mod=12&#38;id=83628&#38;t=&#38;ref=bW9kPTkmYW1wO3Q9MiZhbXA7" target="_blank">ayofoto.net</a> , <a href="http://www.fotografer.net/isi/galeri/lihat.php?id=558111" target="_blank">fotografer.net </a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[String sınıfının genel özellikleri ve Kullanımları]]></title>
<link>http://trword.wordpress.com/2008/12/12/string-sinifinin-genel-ozellikleri-ve-kullanimlari/</link>
<pubDate>Fri, 12 Dec 2008 12:06:35 +0000</pubDate>
<dc:creator>mesut cakir</dc:creator>
<guid>http://trword.wordpress.com/2008/12/12/string-sinifinin-genel-ozellikleri-ve-kullanimlari/</guid>
<description><![CDATA[Chars  : Belirlenmiş bir karakterin yerine karakter ekler. Length : Stringdeki karakter sayısını ver]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong><span style="font-weight:normal;font-size:10pt;color:black;font-family:Verdana;">Chars  :</span></strong><span style="font-size:10pt;color:black;font-family:Verdana;"> Belirlenmiş bir karakterin yerine karakter ekler.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Length :</span></strong> Stringdeki karakter sayısını verir.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Compare</span></strong> : Belirlenmiş iki string nesnesini karakter sayılarına göre karşılaştırır.<br />
Sonuç eşit ise “0”, büyükse “+1”, küçükse”-1” değerlerini döndürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">CompareTo :</span></strong>  Belirlenen iki stringi alfabetik sıraya göre karşılaştır. Sonuç eşit ise “0”,<!--more--><br />
eşit değil ise “-1” değeri geri döndürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Concat</span></strong> : Stringi bir veya birden fazla string ile birleştirir. <br />
<strong><span style="font-weight:normal;font-family:Verdana;">Contains</span></strong>  : String içerisinde belirlenmiş başka string nesnelerinin bulunup<br />
bulun madığını kontrol eder.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Copy</span></strong> : Belirlenmiş bir string karakterlerini kullanarak yeni bir örnek string<br />
oluşturur.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">EndsWith :</span></strong>  Stringin sonunda belirli bir string örneğinin olup olmadığına karar verir.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Equals :</span></strong>  İki string nesnesinin aynı değerlere sahip olup olmadığı kontrol eder. True<br />
veya false değerleri geri döndürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Format</span></strong>  : Stringi bilgiyi belli bir biçime dönüştürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">GetEnumerator :</span></strong>  String içerisinde tekrar eden bir nesne bulur.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">GetHashCode</span></strong> : Stringdeki bozuk kodu bulur.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">GetType :</span></strong> Örneğin tipini verir.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">GetTypeCode</span></strong> :  Stringin  Type code (Tür kodunu) çağırır.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">IndexOf</span></strong>  : Stringin içindeki dizenin başlangıç noktasını bulur.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">IndexOfAny</span></strong>  : Stringdeki herhangi bir karakterin başlangıç noktasını bulur.<br />
I<strong><span style="font-weight:normal;font-family:Verdana;">nsert</span></strong>  : String içerisine karakter ekler.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">IsNullOrEmpty</span></strong> : Stringin boş olup olmadığını gösterir.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">LastIndexOf</span></strong>   : Bir karakter veya karakter grubunun stringin içinde bulunduğu pozisyonu<br />
sayısal olarak ifade eder. (Eğer karakter veya karakter grubu string<br />
içerisinde birden fazla ise en sondaki karakter veya karakter grubunun<br />
sayısal olarak bulunduğu yeri belirtir.)<br />
<strong><span style="font-weight:normal;font-family:Verdana;">PadLeft</span></strong> : Stringin solundan başlayarak stringin boyutu verilen değere eşit olana<br />
kadar istenilen karakter eklenir.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">PadRight :</span></strong> Stringin sağından başlayarak stringin boyutu verilen değere eşit olana<br />
kadar istenilen karakter eklenir.<br />
ReferenceEquals Belirlenmiş nesne örneklerinin referans türle aynı olup olmadığına karar<br />
verir.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Remove</span></strong>  : String içerisinde belirli sayıda karakter siler.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Replace</span></strong> :Stringin istediğimiz karakterlerini değiştirmek için kullanılır.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">StartsWith</span></strong> : Belirlenen bir dizenin stringin başlangıcı olup olmadığını bulur. Boolean<br />
tipte bir değer döndürür.<br />
Substring  Stringde belirtilen bir karakterden başlayarak sabit sayıda karakter<br />
döndürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">ToCharArray :</span></strong>  Stringi dizi karakterlerine çevirir.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">ToLower</span></strong>  :Stringdeki harfleri küçük harfe dönüştürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">ToString</span></strong> : Bilgileri string türüne dönüştürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">ToUpper</span></strong>  : Stringdeki harfleri büyük harfe dönüştürür.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">Trim</span></strong>  : Stringin başında ve sonundaki boşlukları veya belirtilen karakterleri<br />
kaldırır.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">TrimEnd</span></strong>  : Stringin sonundaki boşlukları veya belirtilen karakterleri kaldırır.<br />
<strong><span style="font-weight:normal;font-family:Verdana;">TrimStart</span></strong>  : Stringin başındaki boşlukları veya belirtilen karakterleri kaldırır.</span></p>
<p style="text-align:center;"><strong><span style="font-weight:normal;font-size:10pt;color:black;font-family:Verdana;">*—–KULLANIMI—-*</span></strong><span style="font-size:10pt;color:black;font-family:Verdana;"></span></p>
<p style="text-align:left;"><span style="font-size:10pt;color:black;font-family:Verdana;">1.  a.Length = 1. stringin karakter uzunluğunu verir. Uzunluk bulunurken boşluklar<br />
dâhil edilir.<br />
2.  b.Chars(1) = 2  . stringin 1. elemanını ekrana yazdırır. Dikkat edilecek husus<br />
stringin ilk karakteri  0. elemanıdır.<br />
3.  a.CompareTo(b) = 1  . string ile 2. stringi karşılaştırır. İki string eşit -1 değeri<br />
döndürür.<br />
4.  String.Concat(a, b) = 1 . stringin sonuna 2. stringi ekler. 1. stringin sonunda<br />
veya 2. stringin başında boşluk olmadığından stringler birleştirildiğinde arada<br />
boşluk olmaz.<br />
5.  a.Contains(”eslek”) = 1 .  string içerisinde “eslek” kelimesi olduğundan true<br />
değeri döndürür.<br />
6.  String.Copy(a) = 1. stringin kopyasını oluşturur.<br />
7.  a.IndexOf(”düstri”) = “dustri”  stringinin 1. stringin kaçıncı karakterinden<br />
itibaren başladığını gösterir. stringin ilk elemanı 0. karakterdir.<br />
8.  b.Insert(3, “v”) = 2.  stringin 3. karakterine v harfini ekler.<br />
9.  String.IsNullOrEmpty(b) = 2.  Stringin boş olup olmadığını kontrol eder. Boş<br />
olmadığı için False değeri döndürür.<br />
10.  a.LastIndexOf(”d”) = d harfinin 1. stringin kaçıncı karakteri olduğunu bulur.<br />
11.  a.PadLeft(30, “?”) = 1 . stringin sol tarafına toplam uzunluk 30 karakter olana<br />
kadar “?” işareti ekler.<br />
12.  b.PadRight(15, “*”) = 2  .  stringin sağ tarafına toplam uzunluğu 15 karakter<br />
olana kadar “*” işareti ekler.<br />
13.  a.Remove(3, 5) = 1 . stringin 3. karakterinden başlayarak 5 karakter siler.<br />
14.  b.ToUpper = 2 . stringin bütün karakterlerini büyük harfe çevirir.<br />
15.  a.ToLower = 1 . stringin bütün karakterlerini küçük harfe çevirir.<br />
16.  a.Trim(”En”) = 1 . stringin başında veya sonunda En kelimesi varsa bulup siler.<br />
17.  a.Replace(”Meslek”, “Teknik”) = 1  . string içerisinde “Meslek” kelimesini<br />
arayıp bulduğunda “Teknik” kelimesi ile yer değiştirir.</span></p>
<p class="MsoNormal" style="margin:0;"><!-- You can start editing here. --><span style="font-size:10pt;"><span style="font-family:Times New Roman;"> </span></span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[PHP: How To Concatenate Strings]]></title>
<link>http://blog.techsaints.com/2008/08/06/php-how-to-concatenate-strings/</link>
<pubDate>Thu, 07 Aug 2008 05:25:38 +0000</pubDate>
<dc:creator>Bryan</dc:creator>
<guid>http://blog.techsaints.com/2008/08/06/php-how-to-concatenate-strings/</guid>
<description><![CDATA[In PHP, the operator to concatenate or combine strings together is: . (dot) Here are some examples o]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In PHP, the operator to concatenate or combine strings together is: . (dot)</p>
<p>Here are some examples of usage when concatenating strings:</p>
<p>&#60;?php</p>
<p>$string1 = &#8216;tech&#8217;;<br />
$string2 = &#8217;saints&#8217;;<br />
$string3 = &#8216;.com&#8217;;</p>
<p>$full = $string1.$string2.$string3;</p>
<p>echo $full;</p>
<p>?&#62;</p>
<p>Result: techsaints.com</p>
<p>&#60;?php</p>
<p>$string = &#8216;techsai&#8217;;<br />
$string .= &#8216;nts&#8217;;<br />
$string .= &#8216;.com&#8217;;</p>
<p>echo $str;</p>
<p>?&#62;</p>
<p>Result: techsaints.com</p>
<p>&#60;?php</p>
<p>$num = 123;</p>
<p>$string = $num.&#8217; is a number&#8217;;</p>
<p>echo $string;</p>
<p>?&#62;</p>
<p>Result: 123 is a number</p>
<p>When concatenating a number and a string, the string is automatically cast as a string.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Come masterizzare file .mdf .mds in Mac OS X]]></title>
<link>http://coobox.wordpress.com/2008/07/07/come-masterizzare-file-mdf-mds-in-mac-os-x/</link>
<pubDate>Mon, 07 Jul 2008 09:40:01 +0000</pubDate>
<dc:creator>Coobox</dc:creator>
<guid>http://coobox.wordpress.com/2008/07/07/come-masterizzare-file-mdf-mds-in-mac-os-x/</guid>
<description><![CDATA[I file immagine con rispettiva estensione .mdf e .mds sono file del SW per Windows, Alcohol 120%. Pe]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><img src='http://www.xs4all.nl/~loekjehe/Split&#38;Concat/Spliticon.jpg' alt='concat and split' class='alignleft' />I file immagine con rispettiva estensione .mdf e .mds sono file del SW per Windows, Alcohol 120%.<br />
Per poter masterizzare questi file, dobbiamo per prima cosa convertirli in una .iso masticabile senza problemi da Toast 9.<br />
Per far ciò ci servirà un fantastico tool freeware, <a href="http://www.xs4all.nl/~loekjehe/Split&#38;Concat/">Split and Concat</a>.<br />
Questo software è utilizzato anche per riunire i file spezzettati con Hjsplit.<br />
Una volta uniti i due file, dovremo rinominare il file generato in &#8220;esempio<strong>.iso</strong>&#8220;.<br />
Ora siamo pronti a masterizzare la nostra .iso</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Concatenación de cadenas en Java: Optimizaciones realizadas por el compilador]]></title>
<link>http://lefunes.wordpress.com/2008/05/08/concatenacion-de-cadenas-en-java-optimizaciones-realizadas-por-el-compilador/</link>
<pubDate>Thu, 08 May 2008 12:38:23 +0000</pubDate>
<dc:creator>Le Funes</dc:creator>
<guid>http://lefunes.wordpress.com/2008/05/08/concatenacion-de-cadenas-en-java-optimizaciones-realizadas-por-el-compilador/</guid>
<description><![CDATA[La máquina virtual de Java no conoce al operador de concatenación (+) a la hora de ejecutar nuestro ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>La máquina virtual de Java no conoce al <strong>operador de concatenación (+)</strong> a la hora de ejecutar nuestro código.<br />
Por este motivo el compilador se encarga de traducir los lugares donde este operador aparece por el código necesario que permite cumplir con el mismo propósito y de forma óptima.</p>
<p>Veremos cuales son las traducciones realizadas por el compilador y como podemos aprovecharlas a nuestro favor.</p>
<p><!--more--></p>
<h3>Definiciones</h3>
<p>Antes de empezar vamos a definir algunos términos, que aunque no sean definidos de una forma muy formal, permitirán una mejor comprensión del texto:</p>
<ul>
<li> <strong>Cadena</strong>: Una instancia de la clase String. El objeto puede estar asignado a una variable, una constante o no (cadenas anónimas)</li>
</ul>
<ul>
<li><strong>Cadenas Anónimas</strong>: Cadenas no asociadas a ningún objeto que se crean y utilizan en la sentencia que se declaran, y luego son descartadas. Por ejemplo en:</li>
</ul>
<pre class="brush: java;">
System.out.println(&quot;Hola Mundo&quot;);
</pre>
<p>la cadena “Hola Mundo” se crea y utiliza en el System.out.println y luego se descarta.</p>
<h3>Caso 1: Concatenación de cadenas anónimas</h3>
<p>Aunque muchas veces parezca incorrecta o ineficiente la realización de concatenación de dos cadenas anónimas en vez de solo utilizar una, resulta ser lo mismo luego de pasar por el compilador, ya que si tenemos por ejemplo:</p>
<pre class="brush: java;">
//...
String a = &quot;Hola &quot; + &quot;Mundo&quot;;
//...
</pre>
<p>Se convertirá en:</p>
<pre class="brush: java;">
//...
String a = &quot;Hola Mundo&quot;;
//...
</pre>
<p>Viendo la maquina virtual lo mismo que si hubiéramos asignado “Hola Mundo” de primera intención.</p>
<p>Cuál puede ser el beneficio entonces de separar una cadena anónima en dos o más pedazos?</p>
<p>El beneficio que encontramos no es al momento de correr nuestro programa, sino al momento de mantenerlo, ya que en varias ocasiones permitirá una mejor lectura del mismo:</p>
<pre class="brush: java;">
String fragmento = &quot;Por lo tanto, los que no son totalmente conscientes de&quot;
+ &quot; la desventaja de servirse de las armas no pueden ser totalmente conscientes&quot;
+ &quot; de las ventajas de utilizarlas&quot;;
</pre>
<h3>Caso 2: Concatenación de constantes</h3>
<p>Si tenemos definidas constantes y las concatenamos con alguna cadena anónima o entre si, primero que nada el compilador realizará el intercambio de las constantes por la cadena que representan y luego las trata como el caso anterior. Por ejemplo:</p>
<pre class="brush: java;">
//...
public static final String CONSTANTE_A = &quot;AAA&quot;;
private static final String CONSTANTE_B = &quot;BBB&quot;;
public final String CONSTANTE_C = &quot;CCC&quot;;
private final String CONSTANTE_D = &quot;DDD&quot;;
//...
String a = &quot;Mostrar &quot; + CONSTANTE_A;
String b = &quot;Mostrar &quot; + CONSTANTE_B;
String c = &quot;Mostrar &quot; + CONSTANTE_C;
String d = &quot;Mostrar &quot; + CONSTANTE_D;
//...
</pre>
<p>Después de compilar tendremos:</p>
<pre class="brush: java;">
//...
String a = &quot;Mostrar AAA&quot;;
String b = &quot;Mostrar BBB&quot;;
String c = &quot;Mostrar CCC&quot;;
String d = &quot;Mostrar DDD&quot;;
//...
</pre>
<p>Por lo que podemos ver que no importa el modificador de acceso o si es estática o no, mientras el valor de la constante este disponible a la hora de compilar, será reemplazado en la concatenación.</p>
<p>En este caso podemos ver que la ventaja que trae aparejado el uso de constantes, que es permitirnos hacer mas legible nuestro código no va en contraposición a la de la tener una buena eficiencia en la ejecución, ya que no se perderá tiempo realizando concatenaciones porque fueron realizadas al momento de la compilación.</p>
<h3>Caso 3: Concatenación de variables finales</h3>
<p>Al igual que en el caso anterior si tenemos definida un variable declarada dentro de un método como final y esta la concatenamos, el compilador la reemplazara la referencia por el valor que representa la variable final.</p>
<p>Por ejemplo:</p>
<pre class="brush: java;">
//...
final String a = &quot; AAA&quot;;
String b = &quot;Mostrar &quot; + a;
//...
</pre>
<p>Después de compilar obtendremos:</p>
<pre class="brush: java;">
//...
final String a = &quot; AAA&quot;;
String b = &quot;Mostrar AAA&quot;;
//...
</pre>
<p>Otra vez tenemos las mismas ventajas del punto anterior.</p>
<h3>Caso 4: Concatenación de variables</h3>
<p>La concatenación de variables es distinta de los casos anteriores debido a que en ningún caso el compilador puede suponer el valor almacenado en las mismas. Como no sabe con que valores se contará, lo que se realiza a la hora de compilar es armar un StringBuilder e irle agregando las cadenas que queremos visualizar.</p>
<p>Esta vez la sentencia quedará preparada y la concatenación real se realizara durante el momento de ejecución.</p>
<p>Por ejemplo:</p>
<pre class="brush: java;">
//...
String v = &quot;Mundo&quot;;
//...
String resultado = &quot;Hola &quot; + v;
//...
</pre>
<p>Como se puede observar, no se puede asegurar de ninguna manera que el valor de “v” va a seguir siendo “Mundo” al momento de concatenar, por lo que el compilador genera:</p>
<pre class="brush: java;">
//...
String resultado = (new StringBuilder()).append(&quot;Hola &quot;).append(v).toString();
//...
</pre>
<p>Básicamente al ejecutarse realizará lo siguiente:</p>
<p>-  creará una instancia de StringBuilder<br />
-  le agregará la cadena “Hola “<br />
-  le agregará el valor de la variable “v”<br />
-  obtendrá la cadena resultante<br />
-  asignará la cadena resultante a la variable “resultado”</p>
<p>Nuevamente lo que ganamos es expresión a la hora de analizar nuestro código. Veamos un ejemplo ilustrativo de esto, es más difícil entender a simple vista esto:</p>
<pre class="brush: java;">
//...
String res = &quot;Cantidad de tomates: &quot;.concat(Integer.toString(cantidad));
//...
</pre>
<p>A esto:</p>
<pre class="brush: java;">
//...
String res = &quot;Cantidad de tomates: &quot; + cantidad;
//...
</pre>
<h3>Caso 5: Caso especial de concatenación de variables</h3>
<p>Existe un caso especial a la hora de realizar optimizaciones que el compilador no es capaz de darse cuenta, cuando a una variable debemos concatenarle cadenas en varias sentencias, por ejemplo un caso muy simple:</p>
<pre class="brush: java;">
//...
String e = &quot;Hola&quot;;
for (int i = 0; i &lt; 100; i++) {
     e += &quot; mundo&quot;;
}
//...
</pre>
<p>En este caso el código generado será el siguiente:</p>
<pre class="brush: java;">
//...
String e = &quot;Hola&quot;;
for (int i = 0; i &lt; 100; i++){
     e = (new StringBuilder()).append(e).append(&quot; mundo&quot;).toString();
}
//...
</pre>
<p>Por lo tanto cada nueva iteración del bucle lleva aparejado la creación de un StringBuilder para agregarles las cadenas y asignárselo a la variable “e”</p>
<p>Lo que se puede realizar es crear un StringBuilder e irlo asignando en cada iteración, de la forma:</p>
<pre class="brush: java;">
//...
StringBuilder sb = new StringBuilder(&quot;Hola&quot;);
for (int i = 0; i &lt; 100; i++) {
     sb.append(&quot; mundo&quot;);
}
String e = sb.toString();
//...
</pre>
<p>Entonces la ejecución se resume a:</p>
<p>- creará una instancia de StringBuilder con el texto inicial (“Hola”)<br />
- le agregará la cadena “ mundo“ una vez por cada bucle<br />
- obtendrá la cadena resultante<br />
- asignará la cadena resultante a la variable “e”</p>
<p>Como pudimos ver en un post anterior la principal ventaja es la gran cantidad de tiempo ganado durante la ejecución.</p>
<h3>Conclusión</p>
<h2></h2>
<p>Como pudimos ver a lo largo de estos casos es que es importante saber como el compilador hace las cosas para de esa forma poder preocuparnos más en el diseño/mantenimiento de nuestras aplicaciones a estar optimizando código que optimizara el compilador y que visualmente es difícil de comprender.</p>
<p><strong> Si es eficiente y bello, no se puede pedir más.</strong></p>
<h3>Nota Final</h3>
<p>Todo el análisis realizado sobre el funcionamiento del compilador a partir del código generado por el mismo, fue realizado utilizando Jad para descompilar los .class</p>
<p><a title="Integrar Jad a NetBeans mediante NBJAD" href="http://lefunes.wordpress.com/2008/05/06/integrar-jad-a-netbeans-mediante-nbjad/">En el post anterior hablamos como integrar Jad a NetBeans mediante NBJAD.</a></p>
<p>Es muy bueno el ejercicio de generar clases y analizar que optimizaciones realizo el compilador, ayudándonos esto a tener una base más amplia  donde apoyarnos a la hora de desarrollar.</p>
<p>Espero les sirva.<br />
Saludos.</p>
<h3>Más Info</h3>
<ul>
<li><a title="Permanent Link to Optimización al concatenar Strings en Java" rel="bookmark" href="../2008/03/13/optimizacion-al-concatenar-string-en-java/">Optimización al concatenar Strings en Java</a></li>
</ul>
<ul>
<li><a title="Permanent Link to Integrar Jad a NetBeans mediante NBJAD" rel="bookmark" href="../2008/05/06/integrar-jad-a-netbeans-mediante-nbjad/">Integrar Jad a NetBeans mediante NBJAD</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to concatenate split files?]]></title>
<link>http://appleclinic.wordpress.com/2008/04/11/split-concat-files/</link>
<pubDate>Thu, 10 Apr 2008 22:25:12 +0000</pubDate>
<dc:creator>RupertGee</dc:creator>
<guid>http://appleclinic.wordpress.com/2008/04/11/split-concat-files/</guid>
<description><![CDATA[In the PC world, you would use HJSplit to join and recombine them. For Mac OS X, you&#8217;ll use Sp]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://www.macupdate.com/info.php/id/9545"><img src="http://www.macupdate.com/images/icons/9545.png" align="right" alt="" /></a>In the PC world, you would use HJSplit to join and recombine them.</p>
<p>For Mac OS X, you&#8217;ll use <a href="http://www.macupdate.com/info.php/id/9545">Split&#38;Concat</a> to do it instead.  </p>
<p>You can also use Split&#38;Concat to split a large file.  The resulting files are 100% HJSplit compatible.</p>
<p><a href="http://forums.hardwarezone.com.sg/showthread.php?t=1920244" target="_self"><img src="http://appleclinic.files.wordpress.com/2008/04/ihaq.png" alt="" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[String Functions in Oracle/PLSQL]]></title>
<link>http://purna.wordpress.com/2008/04/08/string-functions-in-oracleplsql/</link>
<pubDate>Tue, 08 Apr 2008 07:53:27 +0000</pubDate>
<dc:creator>purna</dc:creator>
<guid>http://purna.wordpress.com/2008/04/08/string-functions-in-oracleplsql/</guid>
<description><![CDATA[Tulisan ini berisi penjelasan disertai contoh mengenai fungsi-fungsi dalam Oracle/PLSQL yang berkait]]></description>
<content:encoded><![CDATA[Tulisan ini berisi penjelasan disertai contoh mengenai fungsi-fungsi dalam Oracle/PLSQL yang berkait]]></content:encoded>
</item>
<item>
<title><![CDATA[Optimización al concatenar Strings en Java]]></title>
<link>http://lefunes.wordpress.com/2008/03/13/optimizacion-al-concatenar-string-en-java/</link>
<pubDate>Thu, 13 Mar 2008 16:32:38 +0000</pubDate>
<dc:creator>Le Funes</dc:creator>
<guid>http://lefunes.wordpress.com/2008/03/13/optimizacion-al-concatenar-string-en-java/</guid>
<description><![CDATA[Al momento de concatenar cadenas, Java ofrece varios métodos de realizar el proceso, pero el rendimi]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Al momento de concatenar cadenas, Java ofrece varios métodos de realizar el proceso, pero el rendimiento obtenido entre cada una de estas formas puede ser totalmente diferente.</p>
<p>Veremos cuales son las formas más optimas de realizar esto según cada circunstancia.</p>
<p><!--more--></p>
<p>Existen 3 maneras de realizar este proceso:</p>
<ol>
<li>Concatenando mediante el operador +</li>
<li>Concatenando mediante la funcion concat() de la clase String</li>
<li>Utilizando la clase StringBuffer</li>
</ol>
<p>Para realizar la comparación de rendimientos de cada método utilizaremos un algoritmo simple donde se utiliza cada una de las técnicas, y para el análisis nos valdremos del análisis del Profiler de NetBeans.</p>
<pre class="brush: java;">
package testcadena;
public class Main {
     private static final int cantidadPrueba = 10000;

     public static void main(String[] args) {
         concatenacionBString();
         concatenacionConcat();
         concatenacionSuma();
     }

     private static void concatenacionSuma() {
         String resultado = &quot;inicio&quot;;
         for (int i = 0; i &lt; cantidadPrueba; i++) {
             resultado += &quot; hola&quot;;
         }
     }

     private static void concatenacionConcat() {
         String resultado = &quot;inicio&quot;;
         for (int i = 0; i &lt; cantidadPrueba; i++) {
             resultado.concat(&quot; hola&quot;);
         }
     }

     private static void concatenacionBString() {
         StringBuffer resultado = new StringBuffer(&quot;inicio&quot;);
         for (int i = 0; i &lt; cantidadPrueba; i++) {
             resultado.append(&quot; hola&quot;);
         }
     }
}</pre>
<p>Mediante la constante cantidadPrueba iremos variando la cantidad de concatenaciones que se realizaran.</p>
<h3>Concatenando 1000 cadenas</p>
<h2></h2>
<p>Realizando la prueba con cantidadPrueba=1000 vemos que el Profiler nos indica:<img src="http://lefunes.wordpress.com/files/2008/03/prof1000.gif" alt="prof1000.gif" /></p>
<p>Podemos apreciar que el método que utiliza StringBuffer es el más rápido, seguido por el que utiliza concat y por último (más de 100 veces más lento que los anteriores) el método utilizando el operador &#8220;+&#8221;.</p>
<h3>Concatenando 100 cadenas</h3>
<p>Bajamos la cantidad de concatenaciones hechas para verificar que pasa:</p>
<p><img src="http://lefunes.wordpress.com/files/2008/03/prof100.gif" alt="prof100.gif" /></p>
<p>Ahora el más rápido es concat seguido de cerca por StringBuffer, pero el operador de concatenación sigue siendo el más lento (aunque ahora la diferencia ya no es tan grande como en la prueba anterior)</p>
<h3>Concatenando 10 cadenas</h3>
<p>Seguimos bajando la cantidad de concatenaciones:</p>
<p><img src="http://lefunes.wordpress.com/files/2008/03/prof10.gif" alt="prof10.gif" /></p>
<p>Ahora se mantiene y acentúa la tendencia de la anterior prueba, siendo concat el más rápido.</p>
<h3>Concatenando 1 cadena</h3>
<p>Realizamos la prueba menor, concatenandole a la cadena inicial solo una cadena.</p>
<p><img src="http://lefunes.wordpress.com/files/2008/03/prof1.gif" alt="prof1.gif" /></p>
<p>Como era de esperar sigue siendo más rápido la solución con concat, pero ahora es más rápido la suma antes que el uso de StringBuffer (esto es debido al costo propio de crear el Buffer para la cantidad de concatenaciones realizadas)</p>
<h3>Conclusión</h3>
<p>De este pequeño análisis podemos obtener las siguientes conclusiones:</p>
<ul>
<li>Nunca es optimo realizar una concatenación de clases mediante el operador de concatenación (+)</li>
<li>Para un pequeño número de concatenaciones es mejor utilizar el método concat() de la clase String</li>
<li>Para gran cantidad de concatenaciones sobre una cadena, lo mejor es utilizar un StringBuffer</li>
</ul>
<h3><strong>StringBuilder vs. StringBuffer</strong></h3>
<h4><span style="color:#99cc00;">Agregado el 18 de Marzo de 2008:</span></h4>
<p>Un cuarto método de concatenar String es usando la clase StringBuilder.</p>
<p>StringBuilder tiene una funcionalidad similar a la de StringBuffer, pero la principal diferencia radica en que StringBuilder no está preparada para acceso concurrente tal como lo hace StringBuffer.</p>
<p>Esto puede parecer una desventaja, si usamos múltiples hilos insertando sobre la misma secuencia de caracteres deberemos utilizar obligadamente StringBuffer. Sin embargo encontraremos que en la mayoría de los casos solo un hilo accede a la secuencia de caracteres, siendo todos los mecanismos de sincronización utilizados por StringBuffer completamente inútiles, siendo en estos casos StringBuilder la solución ideal.</p>
<p>Como vimos en los ejemplos anteriores, el StringBuffer es utilizado y consumido por un mismo hilo (el hilo que ejecuta el método), por lo cual esta es una situación ideal para reemplazar StringBuffer por StringBuilder</p>
<p>Creamos un nuevo método:</p>
<pre class="brush: java;">
...
    private static void concatenacionBBuilder() {
        StringBuilder resultado = new StringBuilder(&quot;inicio&quot;);
        for (int i = 0; i &lt; cantidadPrueba; i++) {
            resultado.append(&quot; hola&quot;);
        }
    }
...</pre>
<p>y comparamos este método con el que utilizaba StringBuffer, obteniendo:<br />
<img src="http://lefunes.wordpress.com/files/2008/03/prof1000b.gif" alt="prof1000b.gif" /><br />
pudiendo de esta forma comprobar que se ha obtenido una pequeña optimizacion, que era nuestro objetivo.<strong></strong></p>
<h3><strong>Ganando más performance</strong></h3>
<h4><span style="color:#99cc00;">Agregado el 07 de Mayo de 2008:</span></h4>
<p>Si sabemos (o sospechamos por lo menos) cuanto crecerá nuestro StringBuilder ó  StringBuffer podemos indicarselo al construirlos.</p>
<p>El problema es que cada vez que hacemos un append() debe crecer antes de copiar la cadena.</p>
<p>Creamos un método nuevo para probar esto:</p>
<pre class="brush: java;">
...
    private static void concatenacionBBuilder2() {
        StringBuilder resultado = new StringBuilder(6*cantidadPrueba);

        resultado.append(&quot;inicio&quot;);
        for (int i = 0; i &lt; cantidadPrueba; i++) {
            resultado.append(&quot; hola&quot;);
        }
    }
...</pre>
<p>y estos son los resultados:</p>
<p><img class="alignleft size-full wp-image-120" src="http://lefunes.wordpress.com/files/2008/05/concat_inicializado.png" alt="Concatenando con StringBuilder" width="544" height="129" /></p>
<p>Por lo que si tenemos alguna forma de predecir cuanto crecerá, esto es importante tenerlo en cuenta.</p>
<h3>Más Info</h3>
<ul>
<li><a href="http://lefunes.wordpress.com/2008/05/08/concatenacion-de-cadenas-en-java-optimizaciones-realizadas-por-el-compilador/">Concatenación de cadenas en Java: Optimizaciones realizadas por el compilador</a></li>
<li><a href="http://java.sun.com/javase/6/docs/api/java/lang/StringBuilder.html">Javadoc StringBuilder</a></li>
<li><a href="http://java.sun.com/javase/6/docs/api/java/lang/StringBuffer.html">Javadoc StringBuffer</a></li>
<li> <a href="http://java.sun.com/docs/books/jls/second_edition/html/expressions.doc.html#40226">Optimization of String Concatenation</a></li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Tips para consultas MySQL]]></title>
<link>http://drwn.wordpress.com/2008/02/08/tips-para-consultas-mysql/</link>
<pubDate>Fri, 08 Feb 2008 16:54:31 +0000</pubDate>
<dc:creator>DaRWin</dc:creator>
<guid>http://drwn.wordpress.com/2008/02/08/tips-para-consultas-mysql/</guid>
<description><![CDATA[En el presente post voy a detallar algunos consultas que me sirvieron en su momento para obtener res]]></description>
<content:encoded><![CDATA[En el presente post voy a detallar algunos consultas que me sirvieron en su momento para obtener res]]></content:encoded>
</item>

</channel>
</rss>
