<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://xmlpipedb.lmucs.io/biodb/fall2015/index.php?action=history&amp;feed=atom&amp;title=Blitvak_Week_6</id>
		<title>Blitvak Week 6 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://xmlpipedb.lmucs.io/biodb/fall2015/index.php?action=history&amp;feed=atom&amp;title=Blitvak_Week_6"/>
		<link rel="alternate" type="text/html" href="https://xmlpipedb.lmucs.io/biodb/fall2015/index.php?title=Blitvak_Week_6&amp;action=history"/>
		<updated>2026-06-07T20:11:53Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://xmlpipedb.lmucs.io/biodb/fall2015/index.php?title=Blitvak_Week_6&amp;diff=2609&amp;oldid=prev</id>
		<title>Blitvak: forgot to add template!</title>
		<link rel="alternate" type="text/html" href="https://xmlpipedb.lmucs.io/biodb/fall2015/index.php?title=Blitvak_Week_6&amp;diff=2609&amp;oldid=prev"/>
				<updated>2015-10-15T18:06:43Z</updated>
		
		<summary type="html">&lt;p&gt;forgot to add template!&lt;/p&gt;
&lt;table class=&#039;diff diff-contentalign-left&#039;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 18:06, 15 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L134&quot; &gt;Line 134:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 134:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#*Command: &amp;lt;code&amp;gt;select SponsorApplicant from applications inner join products on (applications.ApplNo = products.ApplNo) where SponsorApplicant like &amp;#039;%LABS%&amp;#039; and activeingred like &amp;#039;%ASPIRIN%&amp;#039; and activeingred like &amp;#039;%CAFFEINE%&amp;#039; group by SponsorApplicant&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#*Command: &amp;lt;code&amp;gt;select SponsorApplicant from applications inner join products on (applications.ApplNo = products.ApplNo) where SponsorApplicant like &amp;#039;%LABS%&amp;#039; and activeingred like &amp;#039;%ASPIRIN%&amp;#039; and activeingred like &amp;#039;%CAFFEINE%&amp;#039; group by SponsorApplicant&amp;lt;/code&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#*ACTAVIS LABS UT INC and WATSON LABS&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;#*ACTAVIS LABS UT INC and WATSON LABS&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;----&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Template:blitvak}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Blitvak</name></author>	</entry>

<tr><td colspan="2" class="diff-lineno" id="L80" ><!--LINE 80--></td>
<td colspan="2" class="diff-lineno"><!--LINE 80--></td></tr>
<tr><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*I removed the first row (column labels) and replaced all of the &#039;&#039;tabs&#039;&#039; with commas; I also turned the extra commas into null values: &lt;code&gt;cat Product.txt | sed &quot;1D&quot; | sed &quot;s/\t/,/g&quot; | sed &quot;s/,,/,null,/g&quot;&lt;/code&gt;</div></td><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*I removed the first row (column labels) and replaced all of the &#039;&#039;tabs&#039;&#039; with commas; I also turned the extra commas into null values: &lt;code&gt;cat Product.txt | sed &quot;1D&quot; | sed &quot;s/\t/,/g&quot; | sed &quot;s/,,/,null,/g&quot;&lt;/code&gt;</div></td></tr>
<tr><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*I began placing the apostrophes around the &#039;&#039;varchar&#039;&#039; data with the &#039;&#039;Form&#039;&#039;, &#039;&#039;Dosage&#039;&#039;, and &#039;&#039;TECode&#039;&#039; data. I placed apostrophes around this data by adding several &lt;code&gt;sed&lt;/code&gt; replacements to the pipeline made earlier: &lt;code&gt;sed &quot;s/,/&amp;&#039;/2&quot; | sed &quot;s/,/&#039;&amp;/3&quot; | sed &quot;s/,/&amp;&#039;/3&quot; | sed &quot;s/,/&#039;&amp;/4&quot; | sed &quot;s/,/&amp;&#039;/5&quot; | sed &quot;s/,/&#039;&amp;/6&quot;&lt;/code&gt;</div></td><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*I began placing the apostrophes around the &#039;&#039;varchar&#039;&#039; data with the &#039;&#039;Form&#039;&#039;, &#039;&#039;Dosage&#039;&#039;, and &#039;&#039;TECode&#039;&#039; data. I placed apostrophes around this data by adding several &lt;code&gt;sed&lt;/code&gt; replacements to the pipeline made earlier: &lt;code&gt;sed &quot;s/,/&amp;&#039;/2&quot; | sed &quot;s/,/&#039;&amp;/3&quot; | sed &quot;s/,/&amp;&#039;/3&quot; | sed &quot;s/,/&#039;&amp;/4&quot; | sed &quot;s/,/&amp;&#039;/5&quot; | sed &quot;s/,/&#039;&amp;/6&quot;&lt;/code&gt;</div></td></tr>
<tr><td class='diff-marker'>−</td><td class='diff-deletedline'><div>*I noticed that there are a few commas and apostrophes in the raw data, I decided to initially replace the commas with characters that are not present elsewhere in the raw data (such as&#039;&#039;~&#039;&#039;); &lt;code&gt;sed &quot;s/,/~/g&quot;&lt;/code&gt; was added to the beginning of the command chain to initially replace them, and &lt;code&gt;sed &quot;s/~/,/g&quot;&lt;/code&gt; was added to the end of chain in order to restore them. The presence of apostrophes in the data was fixed by through adding &lt;code&gt;sed &quot;s/&#039;/&#039;&#039;/g&quot;&lt;/code&gt; to the beginning of the pipe (this addition allows pgSQL to understand that these apostrophes are a part of the actual data.</div></td><td class='diff-marker'>+</td><td class='diff-addedline'><div>*I noticed that there are a few commas and apostrophes in the raw data, I decided to initially replace the commas with characters that are not present elsewhere in the raw data (such as&#039;&#039;~&#039;&#039;); &lt;code&gt;sed &quot;s/,/~/g&quot;&lt;/code&gt; was added to the beginning of the command chain to initially replace them, and &lt;code&gt;sed &quot;s/~/,/g&quot;&lt;/code&gt; was added to the end of chain in order to restore them. The presence of apostrophes in the data was fixed by through adding &lt;code<ins class="diffchange diffchange-inline">&gt;&lt;nowiki</ins>&gt;sed &quot;s/&#039;/&#039;&#039;/g&quot;<ins class="diffchange diffchange-inline">&lt;/nowiki&gt;</ins>&lt;/code&gt; to the beginning of the pipe (this addition allows pgSQL to understand that these apostrophes are a part of the actual data.</div></td></tr>
<tr><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*I placed apostrophes around all remaining &#039;&#039;varchar&#039;&#039; data by adding &lt;code&gt;sed &quot;s/,/&amp;&#039;/7&quot; | sed &quot;s/,/&#039;&amp;/8&quot; | sed &quot;s/,/&amp;&#039;/8&quot; | sed &quot;s/\r$/&#039;/g&quot;&lt;/code&gt; to the pipeline</div></td><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*I placed apostrophes around all remaining &#039;&#039;varchar&#039;&#039; data by adding &lt;code&gt;sed &quot;s/,/&amp;&#039;/7&quot; | sed &quot;s/,/&#039;&amp;/8&quot; | sed &quot;s/,/&amp;&#039;/8&quot; | sed &quot;s/\r$/&#039;/g&quot;&lt;/code&gt; to the pipeline</div></td></tr>
<tr><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*To the end of the current pipeline, I added &lt;code&gt;sed &quot;s/^/insert into products(ApplNo,ProductNo,Form,Dosage,ProductMktStatus,TECode,ReferenceDrug,drugname,activeingred) values(/g&quot; | sed &quot;s/$/);/g&quot;&lt;/code&gt; to wrap up the formatting of the raw data (should now be usable as sequences of SQL &lt;code&gt;insert&lt;/code&gt; statements)</div></td><td class='diff-marker'>&#160;</td><td class='diff-context'><div>*To the end of the current pipeline, I added &lt;code&gt;sed &quot;s/^/insert into products(ApplNo,ProductNo,Form,Dosage,ProductMktStatus,TECode,ReferenceDrug,drugname,activeingred) values(/g&quot; | sed &quot;s/$/);/g&quot;&lt;/code&gt; to wrap up the formatting of the raw data (should now be usable as sequences of SQL &lt;code&gt;insert&lt;/code&gt; statements)</div></td></tr>
Exception encountered, of type &quot;Error&quot;<br />
[703e74a2] /biodb/fall2015/index.php?action=history&amp;feed=atom&amp;title=Blitvak_Week_6   Error from line 434 of /apps/xmlpipedb/biodb/fall2015/includes/diff/DairikiDiff.php: Call to undefined function each()<br />
Backtrace:<br />
#0 /apps/xmlpipedb/biodb/fall2015/includes/diff/DairikiDiff.php(544): DiffEngine-&gt;diag()<br />
#1 /apps/xmlpipedb/biodb/fall2015/includes/diff/DairikiDiff.php(344): DiffEngine-&gt;compareSeq()<br />
#2 /apps/xmlpipedb/biodb/fall2015/includes/diff/DairikiDiff.php(227): DiffEngine-&gt;diffLocal()<br />
#3 /apps/xmlpipedb/biodb/fall2015/includes/diff/DairikiDiff.php(721): DiffEngine-&gt;diff()<br />
#4 /apps/xmlpipedb/biodb/fall2015/includes/diff/DairikiDiff.php(859): Diff-&gt;__construct()<br />
#5 /apps/xmlpipedb/biodb/fall2015/includes/diff/DairikiDiff.php(980): MappedDiff-&gt;__construct()<br />
#6 /apps/xmlpipedb/biodb/fall2015/includes/diff/TableDiffFormatter.php(194): WordLevelDiff-&gt;__construct()<br />
#7 /apps/xmlpipedb/biodb/fall2015/includes/diff/DiffFormatter.php(140): TableDiffFormatter-&gt;changed()<br />
#8 /apps/xmlpipedb/biodb/fall2015/includes/diff/DiffFormatter.php(82): DiffFormatter-&gt;block()<br />
#9 /apps/xmlpipedb/biodb/fall2015/includes/diff/DifferenceEngine.php(888): DiffFormatter-&gt;format()<br />
#10 /apps/xmlpipedb/biodb/fall2015/includes/diff/DifferenceEngine.php(802): DifferenceEngine-&gt;generateTextDiffBody()<br />
#11 /apps/xmlpipedb/biodb/fall2015/includes/diff/DifferenceEngine.php(733): DifferenceEngine-&gt;generateContentDiffBody()<br />
#12 /apps/xmlpipedb/biodb/fall2015/includes/diff/DifferenceEngine.php(662): DifferenceEngine-&gt;getDiffBody()<br />
#13 /apps/xmlpipedb/biodb/fall2015/includes/FeedUtils.php(155): DifferenceEngine-&gt;getDiff()<br />
#14 /apps/xmlpipedb/biodb/fall2015/includes/actions/HistoryAction.php(325): FeedUtils::formatDiffRow()<br />
#15 /apps/xmlpipedb/biodb/fall2015/includes/actions/HistoryAction.php(290): HistoryAction-&gt;feedItem()<br />
#16 /apps/xmlpipedb/biodb/fall2015/includes/actions/HistoryAction.php(130): HistoryAction-&gt;feed()<br />
#17 /apps/xmlpipedb/biodb/fall2015/includes/actions/FormlessAction.php(43): HistoryAction-&gt;onView()<br />
#18 /apps/xmlpipedb/biodb/fall2015/includes/MediaWiki.php(395): FormlessAction-&gt;show()<br />
#19 /apps/xmlpipedb/biodb/fall2015/includes/MediaWiki.php(273): MediaWiki-&gt;performAction()<br />
#20 /apps/xmlpipedb/biodb/fall2015/includes/MediaWiki.php(566): MediaWiki-&gt;performRequest()<br />
#21 /apps/xmlpipedb/biodb/fall2015/includes/MediaWiki.php(414): MediaWiki-&gt;main()<br />
#22 /apps/xmlpipedb/biodb/fall2015/index.php(44): MediaWiki-&gt;run()<br />
#23 {main}<br />

