<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 - Discussions by PaintedBlue</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 - Discussions by PaintedBlue</title>
		<link>http://channel9.msdn.com/Niners/PaintedBlue/Discussions</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Niners/PaintedBlue/Discussions</link>
	<language>en</language>
	<pubDate>Wed, 22 May 2013 10:47:48 GMT</pubDate>
	<lastBuildDate>Wed, 22 May 2013 10:47:48 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>0</c9:totalResults>
	<c9:pageCount>0</c9:pageCount>
	<c9:pageSize>0</c9:pageSize>
	<item>
		<title>Coffeehouse - Simulations using Excel</title>
		<description><![CDATA[<p>The student's approach looks good to me. It is a very clean approach to&nbsp;initializing the test conditions and running the simulation.<br>
<br>
The largest difference between the student's version and my code is that I actually write the test cases out to the worksheet as records, but that is not necessary for generating the histogram. I definitely misinterpreted the requirements in this respect.<br>
<br>
With respect to the student's code, adding a DoEvents call in TestRun's For loop&nbsp;will keep Excel from locking up while the tests are running (see my code as an example -- you only need to call it periodically, not for every iteration of the loop). This might
 be useful in case you wanted to watch the histogram Chart evolve over the course of the simulation in realtime (assuming that a Chart is predefined within the workbook), which is actually pretty neat to see.<br>
<br>
For the AllocateFrequencyToTotalTravelTimeClassBins method, I wanted to point out that all of the If statements&nbsp;are currently being executed for each test iteration, but this does not have to be the case.&nbsp;For example, the following:<br>
<br>
If Cells(29, 5) &gt;= 1840 And Cells(29, 5) &lt; 1890 Then<br>
&nbsp;&nbsp;&nbsp;Cells(3, 7) = Cells(3, 7) &#43; 1<br>
End If</p>
<p>If Cells(29, 5) &gt;= 1900 And Cells(29, 5) &lt; 1950 Then<br>
&nbsp;&nbsp;&nbsp;Cells(4, 7) = Cells(4, 7) &#43; 1<br>
End If<br>
<br>
If Cells(29, 5) &gt;= 1960 And Cells(29, 5) &lt; 2010 Then<br>
&nbsp;&nbsp;&nbsp; Cells(5, 7) = Cells(5, 7) &#43; 1<br>
End If<br>
<br>
can be changed to:<br>
<br>
If Cells(29, 5) &gt;= 1840 And Cells(29, 5) &lt; 1890 Then<br>
&nbsp;&nbsp;&nbsp; Cells(3, 7) = Cells(3, 7) &#43; 1<br>
ElseIf Cells(29, 5) &gt;= 1900 And Cells(29, 5) &lt; 1950 Then<br>
&nbsp;&nbsp;&nbsp; Cells(4, 7) = Cells(4, 7) &#43; 1<br>
ElseIf Cells(29, 5) &gt;= 1960 And Cells(29, 5) &lt; 2010 Then<br>
&nbsp;&nbsp;&nbsp; Cells(5, 7) = Cells(5, 7) &#43; 1<br>
End If</p>
<p>This would result in less work being done on each iteration, and it might allow for the simulation to run slightly faster. In general, it is ideal to minimize the amount of work being performed within a loop when possible.<br>
<br>
Finally, I see that the student is writing a constant value to a cell to induce the worksheet to recalculate, thus allowing RANDBETWEEN to generate new values:<br>
<br>
Cells(2, 3) = 10<br>
<br>
The more explicit way to recalculate the worksheet through code is to fire the worksheet's Calculate() event:<br>
<br>
Call Worksheets(&quot;Sheet1&quot;).Calculate<br>
<br>
Certainly, this causes the same result to occur in the end, but it is easier to interpret what the code is doing --&nbsp;the method is named to allow the code to be&nbsp;self-documenting in nature.<br>
<br>
Thanks, and let me know if you have any other questions.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/194104-Simulations-using-Excel/efd2897878fc4b3ba7ba9deb0168ceb2#efd2897878fc4b3ba7ba9deb0168ceb2</link>
		<pubDate>Thu, 08 Jun 2006 00:10:23 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/194104-Simulations-using-Excel/efd2897878fc4b3ba7ba9deb0168ceb2#efd2897878fc4b3ba7ba9deb0168ceb2</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Simulations using Excel</title>
		<description><![CDATA[<p>I made an attempt at writing VBA code for this problem, available here:</p>
<p><a href="http://paintedblue.panicnow.net/Code/BUS_TEST_SIMULATOR.xls">http://paintedblue.panicnow.net/Code/BUS_TEST_SIMULATOR.xls</a><br>
<br>
Since it uses VBA, you will need to set Excel's security to allow macros to&nbsp;run (in Tools | Options | Security | Macro Security -- setting this value to Medium will prompt you regarding the execution of macros, however you should reset it back to High security
 if you are concerned about the potential for computer virii executing within Excel's context).<br>
<br>
Basically, I have provided a set of cells to configure the test. These cells are currently located in Range J1:N2. You can specify the number of tests to run in addition to the value of the constants.<br>
<br>
To the left of the configuration cells is a command button. Clicking the button will run the test. The data will populate in Columns A through F, although this is configurable in the code.<br>
<br>
To view the VBA code, select Tools | Macro | Visual Basic Editor. The majority of the code resides on the Sheet1 object.<br>
<br>
Finally, it is worth mentioning that I am currently populating the random number of passengers value using a simple VBA random number generator algorithm. However, if you want to use the RANDBETWEEN function, you can uncomment line 55 and comment line 56. I
 chose not to use RANDBETWEEN because it appears to recalculate all cells each time that it is executed, which results in very slow performance. The VBA approach will generate 1000 rows of data in less than one second on my workstation.<br>
<br>
Please let me know if you have any questions!</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/194104-Simulations-using-Excel/6c98f42c23b742d3950c9deb0168cda2#6c98f42c23b742d3950c9deb0168cda2</link>
		<pubDate>Thu, 01 Jun 2006 21:29:33 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/194104-Simulations-using-Excel/6c98f42c23b742d3950c9deb0168cda2#6c98f42c23b742d3950c9deb0168cda2</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>16</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - More ECMAScript fun!</title>
		<description><![CDATA[<p><blockquote>
<div>W3bbo wrote:</div>
<div>Behold:<br>
<br>
<br>
The referenced ECMAScript file:<br>
<pre><br>	<br>	btnHeightInc.onclick = HeightIncrease();<br>	btnHeightDec.onclick = HeightDescrease();<br>	btnWidthInc.onclick  = WidthIncrease();<br>	btnWidthDec.onclick  = WidthDecrease();<br>	</pre>
</div>
</blockquote>
<br>
<br>
Are you sure that you want to call these methods here? You should remove the () from these if you want to assign the functions&nbsp;as the onclick event handlers.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/142409-More-ECMAScript-fun/fb080cb2979b43298ac99dea01322280#fb080cb2979b43298ac99dea01322280</link>
		<pubDate>Thu, 15 Dec 2005 05:48:10 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/142409-More-ECMAScript-fun/fb080cb2979b43298ac99dea01322280#fb080cb2979b43298ac99dea01322280</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>18</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - missing ) after argument list</title>
		<description><![CDATA[<p><blockquote>
<div>W3bbo wrote:</div>
<div>
<blockquote>
<table>
<tbody>
<tr>
<td><img src="/Themes/AlmostGlass/images/icon-quote.gif"></td>
<td><strong>candseeme wrote:</strong> <i>Remove those two and belive me<br>
Try it </i></td>
</tr>
</tbody>
</table>
</blockquote>
<br>
<br>
That wouldn't work.<br>
<br>
The ECMAScipt (colloquially known as &quot;Javascript&quot;) specification requires all method calls to have parenthesis (like C#, this is to make it easy to differentiate between object Properties and Methods)<br>
<br>
Also the script interpreter error is specifically calling the line with the error.<br>
</div>
</blockquote>
<br>
<br>
In this case, it is not a method call. setTimeout's first argument should be a reference to a function,&nbsp;so the () should not be included.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/142246-missing--after-argument-list/e754227fa01940458b8e9dea0131fced#e754227fa01940458b8e9dea0131fced</link>
		<pubDate>Thu, 15 Dec 2005 05:41:00 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/142246-missing--after-argument-list/e754227fa01940458b8e9dea0131fced#e754227fa01940458b8e9dea0131fced</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>15</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - No way to do VideoCapture for 2003 based smartphones?...</title>
		<description><![CDATA[<p>I have a commercial PPC application (SOTI Pocket Controller Professional) that does video capture, but the device must be connected to a PC using ActiveSync.</p>
<p>Accordingly, this might not be very helpful for you, but you might want to take a look at&nbsp;the product&nbsp;and see if the developer is willing to give you some suggestions:</p>
<p><a href="http://www.soti.net/default.asp?Cmd=Products&amp;SubCmd=PCPro">http://www.soti.net/default.asp?Cmd=Products&amp;SubCmd=PCPro</a></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/125498-No-way-to-do-VideoCapture-for-2003-based-smartphones/ed4b5884836943c6af539dea012df3cf#ed4b5884836943c6af539dea012df3cf</link>
		<pubDate>Tue, 25 Oct 2005 05:56:47 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/125498-No-way-to-do-VideoCapture-for-2003-based-smartphones/ed4b5884836943c6af539dea012df3cf#ed4b5884836943c6af539dea012df3cf</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>6</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - New Audio stack.</title>
		<description><![CDATA[<p>I am interested in hearing what Vista will offer professional musicians who use Windows to accomplish much of their work (e.g., using Cakewalk SONAR or similar applications).</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/112371-New-Audio-stack/f8b36fca5c3745e2906c9deb00df6a69#f8b36fca5c3745e2906c9deb00df6a69</link>
		<pubDate>Thu, 15 Sep 2005 16:16:11 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/112371-New-Audio-stack/f8b36fca5c3745e2906c9deb00df6a69#f8b36fca5c3745e2906c9deb00df6a69</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>24</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Too many Videos!!</title>
		<description><![CDATA[<p>I love the Channel 9 videos as-is, although I wish that the audio faded out at the end of the clips. Specifically, I am worried that the buzzing sound might harm my speakers and/or ears.<br>
<br>
Other than that, please keep up the great work!</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/109874-Too-many-Videos/e2b88d0727854cfb91bf9deb00d90f28#e2b88d0727854cfb91bf9deb00d90f28</link>
		<pubDate>Sun, 11 Sep 2005 00:56:28 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/109874-Too-many-Videos/e2b88d0727854cfb91bf9deb00d90f28#e2b88d0727854cfb91bf9deb00d90f28</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>15</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Photostory 3: requests / enhancements</title>
		<description><![CDATA[<p>I haven't used&nbsp;PhotoStory since v1, but one thing that could have been improved was the timing of each photo's duration with respect to the length of an audio file.<br>
<br>
In v1,&nbsp;photo durations did not have a high precision (and they might even have been limited to integers only), so it was impossible to precisely sync
<em>n</em> number of photos to a song of known duration.<br>
<br>
While support for higher-precision data entry would be nice, an option to &quot;fit to audio file&quot; would be much easier (i.e., have PhotoStory automatically compute a fixed duration for each photo such that the video ends in time with the song's ending).<br>
<br>
Again, I haven't used the product recently, so these may have already been implemented in later releases.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/96617-Photostory-3-requests--enhancements/c49a6b71153e4253b09e9dec0069bb90#c49a6b71153e4253b09e9dec0069bb90</link>
		<pubDate>Thu, 11 Aug 2005 02:57:45 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/96617-Photostory-3-requests--enhancements/c49a6b71153e4253b09e9dec0069bb90#c49a6b71153e4253b09e9dec0069bb90</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>6</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Tech Off - Value of Excel cell into VB label</title>
		<description><![CDATA[<p>Have you worked with VSTO yet?<br>
<br>
<a href="http://msdn.microsoft.com/office/understanding/vsto/">http://msdn.microsoft.com/office/understanding/vsto/</a></p>]]></description>
		<link>http://channel9.msdn.com/Forums/TechOff/92471-Value-of-Excel-cell-into-VB-label/1a61a66fe250469a8cde9dea012729a8#1a61a66fe250469a8cde9dea012729a8</link>
		<pubDate>Sat, 30 Jul 2005 23:21:18 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/TechOff/92471-Value-of-Excel-cell-into-VB-label/1a61a66fe250469a8cde9dea012729a8#1a61a66fe250469a8cde9dea012729a8</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>3</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Midi Keyboard -- Software?</title>
		<description><![CDATA[<p><blockquote>
<div>Manip wrote:</div>
<div>You have misunderstood. I do <strong>not </strong>want a sequencer. I want a software backend for the audio keyboard.
</div>
</blockquote>
<br>
<br>
You must have missed it in my post. MiniHost is a lightweight, standalone host for virtual instruments (i.e., it is not a sequencer). You would also need to download a virtual instrument to load into MiniHost, and that is why I recommended the KvR Audio site.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/89391-Midi-Keyboard-Software/491fce48e16d44cbb0ad9dec006115f7#491fce48e16d44cbb0ad9dec006115f7</link>
		<pubDate>Sat, 30 Jul 2005 05:29:01 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/89391-Midi-Keyboard-Software/491fce48e16d44cbb0ad9dec006115f7#491fce48e16d44cbb0ad9dec006115f7</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>13</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Midi Keyboard -- Software?</title>
		<description><![CDATA[<p>There is an overwhelming amount of MIDI software available for Windows, as the virtualization of the music production industry has really been rapidly progressing over the past few years.<br>
<br>
A MIDI sequencer is typically what is used to sequence notes into a song. The biggest and best include: Cakewalk SONAR, Steinberg Nuendo and Cubase SX, Ableton Live, and Magix Samplitude. There are many variations of these applications based on your level of
 need, and the prices range between less than $100 and over $1000. For example, Cakewalk's Kinetic retails at around $100 or less, but it offers only a tiny fraction of SONAR's capabilities.<br>
<br>
Recently, powerful &quot;budget&quot; sequencers have been popping up as well, such as Mackie's Tracktion.<br>
<br>
Free, basic MIDI sequencer or host applications also exist, and you could probably write your own if you studied the audio and MIDI portions of DirectX.<br>
<br>
All of this said, MIDI by itself is just data, and you need a synthesizer to turn the data into audio that you can hear. Of course, Windows comes with a very generic MIDI synthesizer, but the trend in audio software is to use so-called &quot;soft synths&quot;, or virtual
 instruments, to produce audio from incoming MIDI messages.<br>
<br>
These virtual instruments come in the form of plug-ins for the aforementioned sequencer host applications, and the sheer number available on the market today is mind-boggling. Many of these plug-ins are extremely high-quality, making your simple MIDI keyboard
 sound like a real Boesendorfer piano, for example.<br>
<br>
The definitive site for learning about soft synths and downloading free or trial versions is:<br>
&nbsp;<br>
<a href="http://www.kvraudio.com">http://www.kvraudio.com</a>.<br>
<br>
A free host to start you off with working with soft synths (from KvR Audio) is available here:<br>
<br>
<a href="http://www.tobybear.de/p_minihost.html">http://www.tobybear.de/p_minihost.html</a><br>
<br>
However, I highly recommend checking out the demo versions of the other MIDI sequencers mentioned earlier. The Cakewalk applications are all very good and play well with Windows (in particular, Project5 v2 is very easy to use and comes with great sound libraries)
 and have&nbsp;very helpful&nbsp;support forums, although you might also want to demo Tracktion since it is aimed at making things easy for beginners.<br>
<br>
Just a word of caution, though: once you get into computer-based music production, you'll soon&nbsp;discover that there is so much to learn, and it could end up stealing away your time&nbsp;from coding. Consider yourself warned!</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/89391-Midi-Keyboard-Software/d76bcfa33e3f40188cd49dec006114be#d76bcfa33e3f40188cd49dec006114be</link>
		<pubDate>Sat, 23 Jul 2005 04:29:04 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/89391-Midi-Keyboard-Software/d76bcfa33e3f40188cd49dec006114be#d76bcfa33e3f40188cd49dec006114be</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>13</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - Have you watched the .NET Show lately?</title>
		<description><![CDATA[<p><blockquote>
<div>Robert Hess wrote:</div>
<div>We are approaching our 50th episode (we've been at this for over 5 years now!). We will probably be filming it sometime in mid-March, and we're&nbsp;working on a few little surprises for this episode :-&gt;</div>
</blockquote>
<br>
<br>
Perhaps another cocktail demonstration from you, Robert? That was a really interesting someone@microsoft segment. Which episode was that, anyway?<br></p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/35551-Have-you-watched-the-NET-Show-lately/c1823d6985a0433988d99dea013d309a#c1823d6985a0433988d99dea013d309a</link>
		<pubDate>Fri, 21 Jan 2005 08:21:34 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/35551-Have-you-watched-the-NET-Show-lately/c1823d6985a0433988d99dea013d309a#c1823d6985a0433988d99dea013d309a</guid>
		<dc:creator>PaintedBlue</dc:creator>
		<slash:comments>7</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/PaintedBlue/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>