<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Talkwards &#187; howto</title>
	<atom:link href="http://www.talkwards.com/tag/howto/feed" rel="self" type="application/rss+xml" />
	<link>http://www.talkwards.com</link>
	<description>Advancing Talkwards...</description>
	<lastBuildDate>Sat, 03 Sep 2011 16:33:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Black pointer: Never lose track of your mouse pointer again</title>
		<link>http://www.talkwards.com/2009/07/black-pointer-never-lose-track-of-your-mouse-pointer-again</link>
		<comments>http://www.talkwards.com/2009/07/black-pointer-never-lose-track-of-your-mouse-pointer-again#comments</comments>
		<pubDate>Fri, 10 Jul 2009 23:00:12 +0000</pubDate>
		<dc:creator>Hoakz</dc:creator>
				<category><![CDATA[Computer Operating Systems]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://www.talkwards.com/?p=553</guid>
		<description><![CDATA[I&#8217;ve tried several ways to keep track of my mouse pointer.  It&#8217;s kind of hard from time to time.  Adding more than one monitor does not help at all! Recently a colleague gave me the tip to make the mouse pointer black&#8230; and larger. I tried this and found that the mouse pointer was much [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried several ways to keep track of my mouse pointer.  It&#8217;s kind of hard from time to time.  Adding more than one monitor does not help at all!</p>
<p>Recently a colleague gave me the tip to make the mouse pointer black&#8230; and larger. I tried this and found that the mouse pointer was much easier to spot.  No surprise there, really.  After all, white on white tends to become a bit hard to keep track of, tiny silhouette outline or not.</p>
<p>I was told how to do this in Windows (Control Panel &gt; Mouse &gt; Pointer, but that&#8217;s another story).</p>
<p>In Gnome (I&#8217;m running Ubuntu 8.10) you do it in the System &gt; Preferences &gt; Appearance dialog (see below).  In my version of Window&#8217;s there&#8217;s no settings under Appearance &gt; Mouse.</p>
<p><img class="alignnone size-medium wp-image-555" title="Appearance Preferences" src="http://www.talkwards.com/wp-content/uploads/2009/07/appearance-preferences-300x267.png" alt="Appearance Preferences" width="300" height="267" /></p>
<p>Next you click the &#8220;Customize&#8221; button:</p>
<p><img class="alignnone size-medium wp-image-556" title="Customize Theme" src="http://www.talkwards.com/wp-content/uploads/2009/07/customize-theme-225x300.png" alt="Customize Theme" width="225" height="300" /></p>
<p>In the new dialog select the &#8220;Pointer&#8221;-tab and select the color of pointer you want.  In order to resize it, see the &#8220;size slider&#8221; below the list of pointers (there seems to be three distinct sizes to choose from).</p>
<p>Click &#8220;Close&#8221; once you&#8217;re done, and voila, you have a new and much easier to spot mouse pointer!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.talkwards.com%2F2009%2F07%2Fblack-pointer-never-lose-track-of-your-mouse-pointer-again&amp;title=Black%20pointer%3A%20Never%20lose%20track%20of%20your%20mouse%20pointer%20again" id="wpa2a_2"><img src="http://www.talkwards.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.talkwards.com/2009/07/black-pointer-never-lose-track-of-your-mouse-pointer-again/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and Replace in MySQL</title>
		<link>http://www.talkwards.com/2008/11/search-and-replace-in-mysql</link>
		<comments>http://www.talkwards.com/2008/11/search-and-replace-in-mysql#comments</comments>
		<pubDate>Fri, 07 Nov 2008 22:00:24 +0000</pubDate>
		<dc:creator>Hoakz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[DBMS]]></category>
		<category><![CDATA[DML]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.talkwards.com/?p=417</guid>
		<description><![CDATA[I&#8217;ve come across a problem in one of my projects at work. It consists of searching and replacing data in a MySQL server. The data to be replaced is an old URL used in lots of text fields all over the place, it is the customers own site URL but since they moved, they now [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve come across a problem in one of my projects at work.  It consists of searching and replacing data in a MySQL server.  The data to be replaced is an old URL used in lots of text fields all over the place, it is the customers own site URL but since they moved, they now want all URLs to point to their new location.</p>
<p>Searching the web and checking up the <a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_replace" target="_blank">MySQL function database</a> returns the following useful command:</p>
<blockquote>
<pre>REPLACE(str, from_str, to_str)</pre>
</blockquote>
<p>It would in my case be used like this:</p>
<blockquote>
<pre>UPDATE myTable SET theTextField =
REPLACE(theTextField, 'http://the.old.site', 'http://the.new.site');</pre>
</blockquote>
<p><code>myTable</code> is the table containing the data I want to replace, <code>theTextField</code> is the exact field in which this data is located.  Obviously &#8220;http://the.old.site&#8221; is the existing information, that I want to replace, and &#8220;http://the.new.site&#8221; is the information this string should be replaced with.</p>
<p>Very simple, very elegant.  Now all I have to do is try it out as well.  (Expect more reports on the progress of this work!)</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.talkwards.com%2F2008%2F11%2Fsearch-and-replace-in-mysql&amp;title=Search%20and%20Replace%20in%20MySQL" id="wpa2a_4"><img src="http://www.talkwards.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.talkwards.com/2008/11/search-and-replace-in-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change a lost MS SQL Server password</title>
		<link>http://www.talkwards.com/2008/11/how-to-retrieve-a-lost-ms-sql-server-password</link>
		<comments>http://www.talkwards.com/2008/11/how-to-retrieve-a-lost-ms-sql-server-password#comments</comments>
		<pubDate>Fri, 31 Oct 2008 22:00:55 +0000</pubDate>
		<dc:creator>Hoakz</dc:creator>
				<category><![CDATA[Computer Applications and Programs]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>

		<guid isPermaLink="false">http://www.talkwards.com/?p=409</guid>
		<description><![CDATA[I recently lost the password to the MS SQL Server installed on my local machine. A search on possible solutions returned the usual business B$ about paying for software to do the job. However, browsing a little deeper and asking a colleague gave me the following handy solution: Log in to the machine where the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently lost the password to the MS SQL Server installed on my local machine.  A search on possible solutions returned the usual business B$ about paying for software to do the job.  However, browsing a little deeper and asking a colleague gave me the following handy solution:</p>
<ol>
<li>Log in to the machine where the SQL Server is installed via Remote Desktop (not needed in my case, since it was my local machine).</li>
<li>Start SQL Server client (Microsoft SQL Managment Studio) and log in to the local machine using Windows Authentication.</li>
<li>You&#8217;re in.</li>
<li>(Optionally) With your admin account you can now change the password to something you&#8217;ll remember this time! ;o)</li>
</ol>
<p>1) You find Remote Desktop on the Start Menu in &#8220;All Programs &gt; Accessories &gt; Remote Desktop Connection&#8221;.  Most windows servers will have Remote Desktop installed from the start.  If, however you are refused a connection because too many people are logged in, <a href="?p=282" target="_self">see my previous post about how to solve that problem</a>.</p>
<div id="attachment_410" class="wp-caption alignright" style="width: 310px"><a href="http://www.talkwards.com/wp-content/uploads/2008/10/sql-server-login.png"><img class="size-medium wp-image-410" title="SQL Server login dialog" src="http://www.talkwards.com/wp-content/uploads/2008/10/sql-server-login-300x222.png" alt="Logging in to the local database using Windows authentication in SQL Server Management Studio." width="300" height="222" /></a><p class="wp-caption-text">Logging in to the local database using Windows authentication in SQL Server Management Studio.</p></div>
<p>2) To log in on the local database first open SQL Management Studio (All Programs &gt; Microsoft SQL Server 2005 &gt; SQL Server Management Studio), select the name of the local computer in the &#8220;Server name&#8221;-text field and select &#8220;Windows Authentication&#8221; in the &#8220;Authentication&#8221;-text field.  Your user name (the one you used to log in via Remote Desktop) will be displayed in the &#8220;User name&#8221;-text field and this field and the &#8220;Password&#8221;-text field will both be disabled.  Click connect and you should be logged in as an administrator.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.talkwards.com%2F2008%2F11%2Fhow-to-retrieve-a-lost-ms-sql-server-password&amp;title=How%20to%20change%20a%20lost%20MS%20SQL%20Server%20password" id="wpa2a_6"><img src="http://www.talkwards.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.talkwards.com/2008/11/how-to-retrieve-a-lost-ms-sql-server-password/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking Windows Remote Connection (MSTSC.EXE)</title>
		<link>http://www.talkwards.com/2008/09/hacking-windows-remote-connection-mstscexe</link>
		<comments>http://www.talkwards.com/2008/09/hacking-windows-remote-connection-mstscexe#comments</comments>
		<pubDate>Tue, 09 Sep 2008 11:28:25 +0000</pubDate>
		<dc:creator>Hoakz</dc:creator>
				<category><![CDATA[Computer Applications and Programs]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.hoakz.com/blog/?p=130</guid>
		<description><![CDATA[Ever been turned down by a Windows machine over Remote Desktop because it already had too many connections? Even though there are no way to connect using the standard remote desktop program you can still &#8220;hack&#8221; a connection. Sure the limitation exists, probably to sell more licenses or to protect the host server from getting [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.hoakz.com/blog/wp-content/uploads/2008/09/max-connections.jpg"><img class="size-full wp-image-133 aligncenter" title="The terminal server has exceeded the maximum number of allowed connections" src="http://www.hoakz.com/blog/wp-content/uploads/2008/09/max-connections.jpg" alt="" width="459" height="119" /></a></p>
<p style="text-align: left;">Ever been turned down by a Windows machine over Remote Desktop because it already had too many connections?</p>
<p>Even though there are no way to connect using the standard remote desktop program you can still &#8220;hack&#8221; a connection.  Sure the limitation exists, probably to sell more licenses or to protect the host server from getting too many connections, but to get past it you do the following:</p>
<blockquote><p>mstsc /v:myhost.com /F /console</p></blockquote>
<p>Where myhost.com is the name or ipnumber of the server you are trying to remote to.  /F means a full screen connection, /console means to connect to the &#8220;console session of the server&#8221; (whatever that means, it anyhow results in you getting in although the server would otherwise refuse you).</p>
<p>The full format of the MSTSC command call are:</p>
<blockquote><p>MSTSC [&lt;Connection File&gt;] [/v:&lt;server[:port]&gt;] [/console] [/f[ullscreen]]<br />
[/w:&lt;width&gt; /h:&lt;height&gt;]</p></blockquote>
<p>&lt;Connection File&gt; refers to an rdp file to be used with the connection (good if you need to make local drivers or other resources available or set up the connection otherwise).</p>
<p>You can also call MSTSC with the &#8220;/edit&#8221; switch if you wish to edit a connection file:</p>
<blockquote><p>MSTSC /edit &lt;Connection File&gt;</p></blockquote>
<p>Finally you may also migrate files by using the &#8220;/migrate&#8221; switch (not 100% sure how this is done though since I don&#8217;t have an older version file to test with).</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.talkwards.com%2F2008%2F09%2Fhacking-windows-remote-connection-mstscexe&amp;title=Hacking%20Windows%20Remote%20Connection%20%28MSTSC.EXE%29" id="wpa2a_8"><img src="http://www.talkwards.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.talkwards.com/2008/09/hacking-windows-remote-connection-mstscexe/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Badblocks</title>
		<link>http://www.talkwards.com/2007/12/badblocks</link>
		<comments>http://www.talkwards.com/2007/12/badblocks#comments</comments>
		<pubDate>Mon, 24 Dec 2007 01:43:32 +0000</pubDate>
		<dc:creator>Hoakz</dc:creator>
				<category><![CDATA[Computer Applications and Programs]]></category>
		<category><![CDATA[configuration management]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[hard disks]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.hoakz.com/blog/?p=10</guid>
		<description><![CDATA[It took me some time to find out the equivalent of Window&#8217;s checkdisk/scandisk/chkdisk on Linux, but trust me, there are several. For starters I am going to take a look at badblocks, a command that as the name implies, looks for bad blocks. The basic format of badblocks are: badblocks [options] device If you have [...]]]></description>
			<content:encoded><![CDATA[<p>It took me some time to find out the equivalent of Window&#8217;s checkdisk/scandisk/chkdisk on Linux, but trust me, there are several.</p>
<p>For starters I am going to take a look at badblocks, a command that as the name implies, looks for bad blocks.</p>
<p>The basic format of badblocks are:</p>
<blockquote><p>badblocks [options] device</p></blockquote>
<p>If you have a fresh drive with <strong>no data or data that can be deleted on it</strong> you can do:</p>
<blockquote><p>badblocks -s -w /dev/sdb</p></blockquote>
<p>Note however, the -w command will <strong>erase all existing data on the drive</strong> so do not use it for drives with existing file systems on them.  You cannot use -w on a mounted drive, unmount it first.  The -s flag makes the command show a progress bar. This could come in handy when you are testing larger drives since even the fastest systems will take at least an hour to test an average sized drive (my 400GB took about 2 hours on a SATAII system).</p>
<p>If you want to test the drive without deleting data you can use the -n switch which will use non-destructive write-read mode, however, this switch can, for obvious reasons, not be combined with the -w switch.</p>
<blockquote><p>badblocks -s -n /dev/sdb</p></blockquote>
<h3>Links:</h3>
<ul>
<li><a title="Another manpage for badblocks" href="http://linux.about.com/library/cmd/blcmdl8_badblocks.htm" target="_blank">http://linux.die.net/man/8/badblocks</a></li>
<li><a title="Badblocks HowTo" href="http://smartmontools.sourceforge.net/BadBlockHowTo.txt" target="_blank">http://linux.about.com/library/cmd/blcmdl8_badblocks.htm</a></li>
<li><a title="Badblocks HowTo" href="http://smartmontools.sourceforge.net/BadBlockHowTo.txt" target="_blank">http://smartmontools.sourceforge.net/BadBlockHowTo.txt</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.talkwards.com%2F2007%2F12%2Fbadblocks&amp;title=Badblocks" id="wpa2a_10"><img src="http://www.talkwards.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.talkwards.com/2007/12/badblocks/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add a body on load function with Javascript</title>
		<link>http://www.talkwards.com/2007/07/how-to-add-a-body-on-load-function-with-javascript</link>
		<comments>http://www.talkwards.com/2007/07/how-to-add-a-body-on-load-function-with-javascript#comments</comments>
		<pubDate>Sun, 29 Jul 2007 02:21:34 +0000</pubDate>
		<dc:creator>Hoakz</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.hoakz.com/blog/?p=97</guid>
		<description><![CDATA[This is an article on how to add a javascript function that will be run when a webpage has loaded. We begin by defining a function for running after a page (or actually window) has been loaded: function bodyOnLoad() { .. .. } And then we&#8217;ll do: window.onload = bodyOnLoad; However, we also want to [...]]]></description>
			<content:encoded><![CDATA[<p>This is an article on how to add a javascript function that will be run when a webpage has loaded.  We begin by defining a function for running after a page (or actually window) has been loaded:</p>
<pre style="padding-left: 30px;">function bodyOnLoad() {
  ..
  ..
}</pre>
<p>And then we&#8217;ll do:</p>
<pre style="padding-left: 30px;">window.onload = bodyOnLoad;</pre>
<p>However, we also want to make sure our setting of the load event doesn&#8217;t remove some other setting. This is done by also keeping any older events.</p>
<p>We store the previous on load even by doing;</p>
<pre style="padding-left: 30px;">var prevOnLoad = window.onload;</pre>
<p>And we redefine our bodyOnLoad function:</p>
<pre style="padding-left: 30px;">function bodyOnLoad() {
  prevOnLoad();
  ..
  ..
}</pre>
<p>However we can make the creation of the function and the setting of the event a little bit more effective by doing:</p>
<pre style="padding-left: 30px;">window.onload = function() {
  prevOnLoad();

  ..
  ..
}</pre>
<p><em>You still need to get prevonload before you do that</em></p>
<p>This becomes even more obvious once we create a function for adding new load events:</p>
<pre style="padding-left: 30px;">function addLoadEvent(func) {
  var prevOnLoad = window.onload;
  window.onload = function() {
    prevOnLoad();
    func();
  }
}</pre>
<p>In this way we can concentrate on creating the new load event outside of the function for adding it to the window.onload.</p>
<pre style="padding-left: 30px;">function myEvent(){
  ..
  ..
}
addLoadEvent(myEvent);</pre>
<p>We might even do:</p>
<pre style="padding-left: 30px;">addLoadEvent(
  function (){
    ..
    ..
  }
);</pre>
<p><em>Notice the difference between curly braces &#8220;{}&#8221; and parenthesis &#8220;()&#8221;</em></p>
<p>Finally, we have to make sure there is a load event set for the window before calling it from the new event, so we need to check for this:</p>
<pre style="padding-left: 30px;">function addLoadEvent(func) {
  var prevOnLoad = window.onload;
  if (typeof prevOnLoad != 'function') {
    window.onload = func;
  }
  else {
    window.onload = function() {
      prevOnLoad();
      func();
    }
  }
}</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.talkwards.com%2F2007%2F07%2Fhow-to-add-a-body-on-load-function-with-javascript&amp;title=How%20to%20add%20a%20body%20on%20load%20function%20with%20Javascript" id="wpa2a_12"><img src="http://www.talkwards.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.talkwards.com/2007/07/how-to-add-a-body-on-load-function-with-javascript/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

