tag:blogger.com,1999:blog-27134197013715539532024-03-12T20:57:06.476-06:00How toHere is list of my personnel how to, it's mostly for me to help me remember how I at some point figure out how to do something...
PS: if you like to contribute to my How To blog, let me know and I will give you access to do so.Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-2713419701371553953.post-11068366114782623972011-09-06T08:54:00.003-06:002011-09-06T09:00:07.405-06:00Here some tools that can be useful to performance test your AJAX web application<p style="color: rgb(101, 101, 101); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6em; font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Everything on the internet change so fast, I'm sure the minute I will post this other better tools may show up, but for 9/2011, those tools may help you out finding performance issues on your AJAX web application. </p><p style="color: rgb(101, 101, 101); padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.6em; font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br /></p><ul class="list" style="color: rgb(34, 34, 34); font-family: Arial, sans-serif; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 12px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; list-style-type: none; list-style-position: initial; list-style-image: initial; "><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; color: rgb(101, 101, 101); font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; line-height: 1.6em; "><a href="http://code.google.com/chrome/devtools/docs/overview.html" style="color: rgb(33, 53, 139); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Chrome Developer Tools</a> - Chrome Developer Tools is a Chrome browser plugin that allows inspection of the DOM tree, HTML, CSS, request timeline, JavaScript execution, and has many other fine features.</li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; color: rgb(101, 101, 101); font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; line-height: 1.6em; "><a href="http://getfirebug.com/wiki/index.php/Main_Page" style="color: rgb(33, 53, 139); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Firebug</a> - Firebug is a Firefox browser plugin that provides much of the same functionality as the Chrome Developer Tools.</li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; color: rgb(101, 101, 101); font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; line-height: 1.6em; "><a href="https://addons.mozilla.org/en-US/firefox/addon/firecookie/" style="color: rgb(33, 53, 139); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">FireCookie</a> - FireCookie is a plugin to Firebug that allows detailed inspection of browser cookies.</li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; color: rgb(101, 101, 101); font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; line-height: 1.6em; "><a href="http://code.google.com/speed/page-speed/" style="color: rgb(33, 53, 139); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Page Speed</a> - Page Speed is a plugin for Chrome and Firefox browsers that provides detailed analysis and recommendations around Web 1.0 best practices.</li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; color: rgb(101, 101, 101); font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; line-height: 1.6em; "><a href="http://developer.yahoo.com/yslow/" style="color: rgb(33, 53, 139); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">YSlow</a> - YSlow is a plugin for Chrome and Firefox browsers that provides detailed analysis and recommendations around Web 1.0 best practices. In spite of significant overlap, we tested with Page Speed and YSlow, because they provide different perspectives and, in certain cases, different opinions.</li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; color: rgb(101, 101, 101); font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; line-height: 1.6em; "><a href="http://code.google.com/webtoolkit/speedtracer/" style="color: rgb(33, 53, 139); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Speed Tracer</a> - Speed Tracer is a Chrome browser plugin that analyzes JavaScript execution and AJAX operations.</li><li style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; list-style-type: disc; list-style-position: initial; list-style-image: initial; color: rgb(101, 101, 101); font-family: 'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif; line-height: 1.6em; "><a href="http://www.fiddler2.com/fiddler2/" style="color: rgb(33, 53, 139); text-decoration: none; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-style: none; outline-width: initial; outline-color: initial; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Fiddler</a> - Fiddler is an HTTP sniffer that provides detailed information about every request and response that goes through the network.</li></ul><div><span class="Apple-style-span" style="font-family:'Frutiger Roman', Myriad, 'Segoe UI', Arial, sans-serif;color:#656565;"><span class="Apple-style-span" style="line-height: 25px;">Have fun... </span></span></div>Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com1tag:blogger.com,1999:blog-2713419701371553953.post-31193161813811962472010-06-01T12:20:00.003-06:002010-06-01T12:28:47.737-06:00How to fix a corrupted Outlook meeting reminders<p style="margin: 5.0px 0.0px 5.0px 0.0px; font: 12.0px 'Times New Roman'; color: #3e598f">I had one of my meeting reminders that just would not go away, causing my iPhone to quickly run out of batterie... I tried to go in the webmail server and remove that meeting and no luck, it keep coming back... Here what my IT dep told me to do and it did fix the issue:</p><p style="margin: 5.0px 0.0px 5.0px 0.0px; font: 12.0px 'Times New Roman'; color: #3e598f"><br /></p><p style="margin: 5.0px 0.0px 5.0px 0.0px; font: 12.0px 'Times New Roman'; color: #3e598f"><b>The easiest way to try to get rid of corrupt reminders is by closing Outlook and reopening it using the /cleanreminders switch. To do this, press Windows key + R to open the Run dialog. Then type: outlook /cleanreminders in the field and press Ok. Make sure there is a space between outlook and the /</b></p><div><span class="Apple-style-span" style="font-family:'Times New Roman', serif;font-size:100%;color:#3E598F;"><span class="Apple-style-span" style="font-size:12px;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'Times New Roman', serif;font-size:100%;color:#3E598F;"><span class="Apple-style-span" style="font-size:12px;">I believe our Exchange Server is 2005, and I had this issue with Outlook 2007 & Outlook 2005... </span></span></div><div><span class="Apple-style-span" style="font-family:'Times New Roman', serif;font-size:100%;color:#3E598F;"><span class="Apple-style-span" style="font-size:12px;"><br /></span></span></div><div><span class="Apple-style-span" style="font-family:'Times New Roman', serif;font-size:100%;color:#3E598F;"><span class="Apple-style-span" style="font-size:12px;">Enjoy!!!</span></span></div><div><span class="Apple-style-span" style="font-family:'Times New Roman', serif;font-size:100%;color:#3E598F;"><span class="Apple-style-span" style="font-size:12px;"><br /></span></span></div>Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-60616392990936889362009-05-27T19:56:00.006-06:002009-06-07T10:25:16.156-06:00How to backup your computer online (Mac or Windows)After looking around for a good way to backup my data outside of my house, I found <a href="https://mozy.com/?ref=HW5U9L">Mozy.com</a>, the price if reasonable and it's super easy to use on Mac or Windows. You get 2GB free of charge so you can give it a try without having to spend any money. I setup a free account for my wife computer, backing up all of her Microsoft office documents and few folders. If you like to give it a try click on this link: <a href="https://mozy.com/?ref=HW5U9L">https://mozy.com/?ref=HW5U9L</a> this will give my wife an extra 256MB to her account ;-) Mozy charge 4.95$/month for unlimited data, if you sing up make sure you don't push all of your data on the same month, well assuming you have more data to backup then your bandwidth cap from your internet provider, they pretty much all have one now. I'm with Comcast and my cap is 200GB per months... Regardless of the cap, it may take you few weeks or even months to upload all of this data to mozy... I have a pretty good upload speed of ~250kb/sec and Mozy is telling me it will take me around 5 to 10 days to upload 100GB<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_jRxRZpj91ck/SivjagP4mwI/AAAAAAAAfgQ/_1GN4peVYK0/s1600-h/Picture+1.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 148px;" src="http://4.bp.blogspot.com/_jRxRZpj91ck/SivjagP4mwI/AAAAAAAAfgQ/_1GN4peVYK0/s320/Picture+1.png" alt="" id="BLOGGER_PHOTO_ID_5344615427277888258" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />I also looked at Amazon s3, http://aws.amazon.com/s3/, very cool stuff, I use it for work, but you paid $0.15 per GB / month. 100GB would cost me 15$ per month plus I would have to paid for the Data Transfer $0.17 per GB transferred... so Mozy definitely beat this...<br /><br />The last one I looked at was DropBox (http://www.getdropbox.com/pricing) This is more like a share folder that get sync up on the internet. Could be useful if you have multiple computer, that dropbox folder will get replicated between all of your computers that is setup with your DropBox folder... You can't do this with Mozy... Still more expensive, 10$ per months for 50GB<br /><br />One more thing about Mozy, Mozy charges $4.95 per computer that is running the software, but you are allow to backup mounted drive, so you can mount the drives of all your computers and back them up, the way it work, is if a file is no longer on your computer for over 30 days or if you have not mapped the drive for 30 days, they delete it from the mozy server.<br /><br />If you find something better, please let me knowEric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-33133945075206216152008-10-03T09:39:00.003-06:002009-01-12T20:19:29.535-07:00How to map s3fs drive on an EC2 ubuntu server<h2><span class="mw-headline">Install the appropriate libraries </span></h2> <pre>apt-get update </pre><pre>apt-get -y install libfuse-dev libfuse2 libc6-dev make pkg-config gcc build-essential libcurl3-dev libxml2-dev libfuse-dev</pre> <a name="Download_the_packages"></a><h2><span class="mw-headline">Download the packages<br /></span></h2> <pre>mkdir –p /mnt/work/downloads </pre><pre>cd /mnt/work/downloads </pre><pre>wget http://downloads.sourceforge.net/fuse/fuse-2.8.0-pre1.tar.gz?modtime=1215728006&big_mirror=0 </pre><pre>wget http://s3fs.googlecode.com/files/s3fs-r177-source.tar.gz</pre> <a name="Install_fuse"></a><h2><span class="mw-headline">Install fuse<br /></span></h2> <pre>cd /mnt/work </pre><pre>tar xfz downloads/fuse-2.8.0-pre1.tar.gz </pre><pre>cd /mnt/work/fuse-2.8.0-pre1/ </pre><pre>./configure </pre><pre>make </pre><pre>make install</pre> <a name="Install_s3fs"></a><h2><span class="mw-headline">Install s3fs<br /></span></h2> <pre>cd /mnt/work </pre><pre>tar xfz downloads/s3fs-r177-source.tar.gz<br /></pre><pre>cd /mnt/work/s3fs/ </pre><pre>make </pre><pre>make install</pre> <a name="link_the_fusermount_to_.2Fusr.2Fsbin_.28for_rc.local_purposes.29"></a><h2><span class="mw-headline">Link the fusermount to /usr/sbin (for rc.local purposes)<br /></span></h2> <pre>ln –s /usr/local/bin/fusermount /usr/bin/fusermount</pre> <a name="Mounting_your_s3_folder"></a><h2><span class="mw-headline">Mounting your s3 folder<br /></span></h2> <p>This assume that you have the folder /myfolder in your s3 account. </p> <pre>mkdir -p /mnt/s3buckets/myfolder </pre><pre>s3fs -o allow_other myfolder /mnt/s3buckets/myfolder/ -o use_cache=/tmp/s3fs_cache -o accessKeyId=YOURACCESSKEYID<accesskey> -o secretAccessKey=YOURSECRETACCESSKEY<secret_key><br /></secret_key></accesskey></pre><pre>Note: If you trust your server and the users that has access to your /etc, you can create a file /etc/passwd-s3fs which contains just your Amazon ID and secret key separated by ":", e.g: <span class="Apple-style-span" style="font-size:16;">YOURACCESSKEYID<accesskey><span class="Apple-style-span" style="font-size:13;">:<span class="Apple-style-span" style="font-size:16;">YOURSECRETACCESSKEY<span class="Apple-style-span" style="font-size:13;">). Next you can add the mount cmd into your rc.local file... everytime you boot you will see the mount s3 folder...</span></span><br /></span></accesskey></span></pre><pre><br /></pre>Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com2tag:blogger.com,1999:blog-2713419701371553953.post-85191166718824998522008-03-18T14:45:00.006-06:002008-03-18T15:16:24.337-06:00How to create a Linked Server to hitseft (Microsfoft Server 2005)You can find good information<a href="http://msdn2.microsoft.com/en-us/library/aa259589%28SQL.80%29.aspx"> here (http://msdn2.microsoft.com/en-us/library/aa259589(SQL.80).aspx)</a><br /><br />Under, Object Explorer of (Microsfoft SQL Server Management Studio) go to:<br />Server Objects - Linked Servers<br />Right click on Linked Servers and select - New Linked Server...<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_jRxRZpj91ck/R-AvC3KP28I/AAAAAAAAEF8/pFSPRiDjqYw/s1600-h/mylinkserver-1.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_jRxRZpj91ck/R-AvC3KP28I/AAAAAAAAEF8/pFSPRiDjqYw/s320/mylinkserver-1.jpg" alt="" id="BLOGGER_PHOTO_ID_5179191297689246658" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_jRxRZpj91ck/R-AvY3KP29I/AAAAAAAAEGE/sSSxllh-MOM/s1600-h/mylinkserver-2.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp0.blogger.com/_jRxRZpj91ck/R-AvY3KP29I/AAAAAAAAEGE/sSSxllh-MOM/s320/mylinkserver-2.jpg" alt="" id="BLOGGER_PHOTO_ID_5179191675646368722" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_jRxRZpj91ck/R-AvZHKP2-I/AAAAAAAAEGM/LSYiUAy4bwY/s1600-h/mylinkserver-3.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://bp1.blogger.com/_jRxRZpj91ck/R-AvZHKP2-I/AAAAAAAAEGM/LSYiUAy4bwY/s320/mylinkserver-3.jpg" alt="" id="BLOGGER_PHOTO_ID_5179191679941336034" border="0" /></a><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />My situation is very simple, I have multiple server with 2 databases, some of the database are replicated to the other server. I have a store proc that need to be call the same way on both server, but one of my server host the replicated copy (read only) of my db so the sp need to write to the other one. That need to work the same way on both server<br /><br /><span style=";font-family:Courier New;font-size:100%;" ><span style="font-family:'Courier New';">MYLINKSERVER</span></span><span style=";font-family:Courier New;font-size:100%;" ><span style="font-family:'Courier New';">NAME<span style="color:gray;"><span style="color:gray;">.myDBName</span></span><span style="color:gray;"><span style="color:gray;">.</span></span>dbo<span style="color:gray;"><span style="color:gray;">.my_store_prod_name</span></span> <span style="color:gray;"><span style="color:gray;">NULL,</span></span> <span style="color:red;"><span style="color:red;">'Tester'</span></span><span style="color:gray;"><span style="color:gray;">,</span></span> <span style="color:red;"><span style="color:red;">'<test> HELLO WORLD </test>'</span></span></span></span><br /><div style="text-align: left;"><br /><span style="color: rgb(0, 0, 0);font-family:Courier New;font-size:100%;" ><span style="font-family:'Courier New';">Server_A and </span></span><span style="color: rgb(0, 0, 0);font-family:Courier New;font-size:100%;" ><span style="font-family:'Courier New';">Server_</span></span><span style=";font-family:Courier New;font-size:100%;" ><span style="font-family:'Courier New';"><span style="color:red;"><span style="color:red;"><span style="color: rgb(0, 0, 0);">B both contain the link server name: MYLINKSERVERNAME, and both links, point to Server_A. </span><o:p></o:p></span></span></span></span><br /></div>Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-28775585248969079102008-02-05T08:32:00.000-07:002008-02-05T08:38:53.873-07:00Join SQL UpdateFolks,<br /><br />Don't know about you but I've wondered on occasion whether or not it's possible to do a join update in Oracle and SQL Server as I've seen done in mySQL. For those who've never seen an update join, here's one to illustrate:<br /><br />Old school:<br /><blockquote><span style="font-weight: bold;font-size:85%;" >update invc_item<br />set feed_id =<br />(select max(feed_id)<br />from calls<br />where invc_item_id = invc_item.invc_item_id)<br />where feed_id = 0<br />and exists<br />(select *<br />from calls<br />where invc_item_id = invc_item.invc_item_id<br />and feed_id > 0)</span><br /></blockquote> As you can see in the example, this SQL re-queries calls twice - once for the update and once for the where.<br /><br />Update join:<br /><blockquote><span style="font-weight: bold;font-size:85%;" >update i<br />set i.feed_id = c.feed_id<br />from invc_item i, calls c<br />where i.feed_id = 0<br />and c.invc_item_id = i.invc_item_id<br />and c.feed_id > 0</span><br /></blockquote> Much simpler, far more efficient, and once you get the hang of it - less prone to error when doing these sorts of updates.<br /><br />I'm not sure whether or not you have to use the table aliases as I did. Haven't tested without. This is how it was illustrated in the documentation I found.<br /><br />Now for the bad news... SQL Server (the toy wannabe database) supports it, Oracle does not.<br /><br />Thanks for the help Scott...Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com7tag:blogger.com,1999:blog-2713419701371553953.post-63097732641598394182008-01-24T07:41:00.000-07:002008-01-24T07:57:43.069-07:00How to protect my PC, Free virus scanDesktop support is not what I like to do, too many of my friend would like me to go clean up thier PC. No way I'm not going to be spending hours cleaning somebody else's PC. I usually answer to my friends; sorry I'm a mac/linux guy. We don't really get virus...<br /><br />Anyway I saw an article today: <a href="http://technology.sympatico.msn.ca/How+to+take+better+care+of+your+PC+in+08/How-To/ContentPosting_MS.aspx?isfa=1&newsitemid=bb2d4bdd-36f4-40ea-a923-36bc360ce803&feedname=MARC-SALTZMAN&show=False&number=0&showbyline=True&subtitle=&detect=&abc=abc&date=Fals">How to take better care of your PC in '08</a><br /><br />Here what you need to know:<br /><br />Free options exist, such as AVG Anti-Virus Free Edition (<a href="http://free.grisoft.com/" target="_blank">free.grisoft.com</a>) and Ad-Aware 2007 (<a href="http://www.lavasoftusa.com/" target="_blank">http://www.lavasoftusa.com/</a>), but many users choose more robust pay-for-use programs, like <a href="https://securityservices.sympatico.ca/home.do?lang=en" target="_blank">Sympatico Security Services</a> ($6/month), Norton Anti-Virus 2008 (<a href="http://www.symantec.ca/" target="_blank">http://www.symantec.ca/</a>; $39.99), Windows Live OneCare (<a href="http://www.microsoft.ca/" target="_blank">http://www.microsoft.ca/</a>; $39.99) or McAfee VirusScan Plus(<a href="http://www.mcafee.com/" target="_blank">http://www.mcafee.com/</a>; $39.99).<br /><br />and keep your windows up-to-date with all Microsoft patches.<br /><br />I hope this help, and please don't ask me to fix your PC :-) Imagine if I was asking you to come pick up to 4 weeks of 2 dogs pup in my back yard when it's 8 F outside. (I'm having one of those day today, and it's only 7:30 AM :-(...)Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-76422306320053187012007-04-24T13:30:00.000-06:002007-04-24T13:37:47.276-06:00How to know what table is linking to the row you are trying to deleteYou are trying to delete a row in a table but b/c of the db constraint you can't, here how to find out what table is causing the issue.<br /><br />In oracle you would get an error like this:<br /><span style="color: rgb(153, 0, 0);">ORA-02292: integrity constraint (TESTDB.FK_REF_114571) violated - child record found </span><br /><span style="color: rgb(153, 0, 0);"><br />select * from user_constraints where constraint_name = 'FK_REF_114571'</span><br /><br />In MSSQL<br /><span style="color: rgb(153, 0, 0);">select * from INFORMATION_SCHEMA.constraint_column_usage </span><br /><span style="color: rgb(153, 0, 0);">where constraint_name = 'FK_REF_114571'</span>Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-73960591297320643562007-03-30T09:41:00.000-06:002007-04-12T09:32:15.957-06:00How to copy data between 2 different Oracle or MSSQL databaseWell what if you did not do a backup of your data and you deleted the wrong stuff. Import your backup database on the same server. Login with a user that have access to both DB, system should work.<br /><span style="font-weight: bold;">Oracle to Oracle:</span><br /><pre style="color: rgb(204, 0, 0);">insert into productiondb.bill_detail select * from backupdb.bill_detail<br />where not exists<br />(select *<br />from productiondb.bill_detail<br />where bill_id = backupdb.bill_detail.bill_id)</pre>This query will copy everything that is missing back into the production DB.<br /><br /><span style="font-weight: bold;">MSSQL to MSSQL:</span><br />Here's how I populated nd_loc and it took only 10 or so seconds to copy ~150,000 rows! First connect to the production db and then create the link to the backup server. By running the command "<span style="color: rgb(204, 0, 0);">sp_addlinkedserver sqldev</span>" (where sqldev is the other server name where the backup db is. You don't have to do this if both db are on the same server)<br /><br /><span style="color: rgb(204, 0, 0);">insert into nd_loc select * from sqldev.backupdb.dbo.nd_loc</span><br /><br />Now why can't their damned odbc driver be that fast? (Thanks Scott for the tips)Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com1tag:blogger.com,1999:blog-2713419701371553953.post-21637296893024530932007-03-30T09:38:00.000-06:002007-04-23T15:23:34.076-06:00How to create a table from a select statementReady to make a big update, before you do make a backup of that data into a temp table with a select. This save me few times.<br /><pre><span style="color: rgb(204, 0, 0);">create table tmp_eric as </span><br /><span style="color: rgb(204, 0, 0);">( select * from ... where ... )</span><br /></pre> <p>Each columns returned from the select will become the columns of the new table tmp_eric.<br /></p>For MSSQL, you need to first create the table then you can use the insert<br /><span style="font-family: arial;font-size:85%;" ><span style="color: rgb(204, 0, 0);"></span><br /></span><pre><span style="color: rgb(204, 0, 0);">create table tmp_eric (col1, INTEGER PRIMARY KEY, col2...)<br /><br />insert into tmp_eric (col1, col2,...)<br />select col1, col2,... from eric<br /><span style="font-size:100%;"><br /></span></span><span style="font-family: arial;font-size:100%;" >You can also use:</span><br /><span style="color: rgb(204, 0, 0);"><br />select * into tmp_eric from eric<br /><br /></span></pre><span style="font-family: arial;font-size:85%;" ><span style="color: rgb(204, 0, 0);"></span></span>Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-34749148842118187502007-03-17T11:25:00.000-06:002007-03-19T15:19:31.775-06:00How to make Final Cut work on pre-AGP older MacsI could not get my Final Cut Express v2 working on my iMac G5 until I found this info, and now it's working like a charm. ;-)<br /><br />(from the June 26th, 2003 <a href="http://www2.blogger.com/www.xlr8yourmac.com">www.xlr8yourmac.com</a> news page)<br />A reader sent a note on a link with info/workaround for installing Final Cut Pro 4 on an older Mac:<br />" Mike, Found the hack for FCP 4 on a non-AGP Mac. I'm attaching text file but I'm also sending you the 2-pop link where I got the info from. Please don't attribute this to me. #1) I didn't figure it out. #2) I think Apple doesn't like me sometimes. We're definitely getting a Dual G5, though. This is the Mac we've all been waiting. In the meantime though, this hack works perfectly. ENJOY! Here's the 2-pop link." (Note - that link gets a 404/not found today so here is a copy of the attached info he sent on the patch) "I didn't see this posted anywhere. I have a Blue and White G3 that I upgraded to a G4 500. I didn't realize that FCP4 didn't work with PCI macs until I launched it and was given the message: no AGP card on your machine.<br />I was able to get around this and have been editing happily since.<br /><br /><span style="font-weight: bold;">• Control-Click on the Final Cut Pro application and select show package contents. </span><br /><span style="font-weight: bold;">• Open the contents folder and open info.plist. </span><br /><span style="font-weight: bold;">• Search for AGP replace it with PCI. </span><br /><span style="font-weight: bold;">• Save and close the file. </span><br /><span style="font-weight: bold;">• Open FCP4, and voila it works.<br /><br /></span>I have 684 mb of ram. My playback is smooth, rendering is pretty fast. I have yet to encounter a scenario where it doesn't workEric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-42634455186510869912007-03-17T11:19:00.000-06:002007-03-19T15:19:51.896-06:00How to connect to your Tivo Dvr Serie 2 with your web browser## First figure out the IP of your DVR then just add http<span style="font-weight: bold;">s</span>:// in front (notice the s)<br /><br />https://192.168.1.30/<br /><br />login: tivo<br />password: your Media Access Key<br /><br />The best transfer rate I get is around 600 KB/sec, it take for ever to download those 1-2 GB files...Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-68366250457905905772007-03-17T11:13:00.000-06:002007-03-19T15:20:09.802-06:00How to copy files using tar without a tar file / How to tar and untar without a tar file.# why do this, well tar keep the ownership and permission of the files<br /># where cp -r will make everything own by the user doing the copy.<br /><br />(cd / ; tar cf - home) | (cd /newhome; tar xvf -)Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-23979221448645174902007-03-17T11:08:00.000-06:002007-03-19T15:20:38.980-06:00How to partition/format a disk under linux# first use fdisk to setup your partition, for more info on fdisk, type man fdisk<br />fdisk /dev/hda<br /><br /># Now that you partitioned your disk let's format it (man mke2fs)<br />mke2fs /dev/hda1 <--- you have to do this for each partition you created, just replace 1 for partition #Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-27544584023387872072007-03-17T11:05:00.000-06:002007-03-19T15:21:40.311-06:00How to mount a webdav share with a comand line## Here is the command I use to mount a test webDav share on my Mac OS X / unix<br /><br />/sbin/mount_webdav -o noautomounted -o browse -a15 -vmyfotoz http://localhost:8080/ /Volumes/myfotoz/Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-8333166476150910272007-03-17T10:51:00.000-06:002007-03-19T15:21:54.953-06:00How to rsync data from one UNIX server to an other## Like lots of people I have lots of pictures online, 36 GB... I don't want to lose those preciouses ## memories, so I setup a cron to rsync my data every weeks. The beauty of rsync is that it won't ## copy what's has not change. For more info on rsync just type: man rsync<br /><br />cd /backup/<br />rsync -rlptgov root@thibeault.cc:/path/to/my/photos/on/thibeault/cc/ photos/<br /><br />## here if you like to snoop around my photo Album.<br />http://thibeault.cc/photoAlbum/Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-80197930095210657142007-03-17T10:49:00.000-06:002007-03-19T15:22:07.978-06:00How to mount an iso on Linux<code># First image<br />mount -t iso9660 -o ro,loop=/dev/loop0 FIRST_TRIP.iso /mnt<br /><br /># Second image (make sure mnt2 exist)<br /></code><code>mount -t iso9660 -o ro,loop=/dev/loop1 LAST_TRIP.iso /mnt2</code>Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-84380927193033126642007-03-17T10:42:00.000-06:002007-03-19T15:22:38.050-06:00How to create an iso image on linux (dd/mkisofs)# How to create the content of a directory into an iso image<br />## if you mount an unprotected DVD under /dev/disk2/<br />## Here how you can make an iso file from it.<br /><br />dd if=/dev/disk2 of=FIRST_TRIP.iso bs=256k<br /><br />or<br /><br />cd /dev/disk2<br />mkisofs -r -o ~/FIRST_TRIP.iso .Eric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-74509756879422731852007-03-16T19:03:00.000-06:002007-03-19T15:22:38.050-06:00How to Batch Uppercase/lowercase file/directory## under tcsh shell<br /><br /># make the directory lowercase...<br />foreach f ( `find . -type d -print ` )<br />mv $f `echo $f | tr A-Z a-z`<br />end<br /><br /># make the file lowercase...<br />foreach f ( `find . -type f -print ` )<br />mv $f `echo $f | tr A-Z a-z`<br />endEric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0tag:blogger.com,1999:blog-2713419701371553953.post-82368411862930384332007-03-16T18:57:00.000-06:002007-03-19T15:22:38.051-06:00How to Batch Change file names under tcsh## example: for each file ending by .jpg, replace any spaces with underscores<br /><br />foreach i (*.jpg*)<br /> echo $i > /tmp/nom<br /> set j=`sed -e '1,$s? ?_?g' /tmp/nom`<br /> mv "$i" "$j"<br /> \rm /tmp/nom<br />endEric Thibeaulthttp://www.blogger.com/profile/09404419088873716305noreply@blogger.com0