<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Aknosis.com - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-c439f160" type="application/json"/><link>http://aknosis.disqus.com/</link><description></description><atom:link href="http://aknosis.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 09 Apr 2012 14:04:36 -0000</lastBuildDate><item><title>Re: Quicktip: Random string in unix</title><link>http://aknosis.com/2011/07/12/quicktip-random-string-in-unix/#comment-492329744</link><description>&lt;p&gt;Or you can apparently use $RANDOM in bash. &lt;br&gt;&lt;a href="http://tldp.org/LDP/abs/html/randomvar.html" rel="nofollow"&gt;http://tldp.org/LDP/abs/html/r...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Mon, 09 Apr 2012 14:04:36 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-355929465</link><description>&lt;p&gt;This should work:&lt;br&gt;$('img').not('[src^="http"],[src^="https"],[href^="data:"]').each(function() {&lt;br&gt;            $(this).attr('src', function(index, value) {&lt;br&gt;                if (value.substr(0,1) !== "/") {&lt;br&gt;                    value = window.location.pathname + value;&lt;br&gt;                }&lt;br&gt;                return "&lt;a href="http://mynewurl.com" rel="nofollow"&gt;http://mynewurl.com&lt;/a&gt;" + value;&lt;br&gt;            });&lt;br&gt;        });&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Fri, 04 Nov 2011 15:02:39 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-355921788</link><description>&lt;p&gt;Why  this doesnt work for img ? I think problem is not selector with more then one condition in filter. How to do it for img src ?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nemi</dc:creator><pubDate>Fri, 04 Nov 2011 14:53:59 -0000</pubDate></item><item><title>Re: Quicktip: Check if a class constant exists in PHP</title><link>http://aknosis.com/2011/06/29/check-if-a-class-constant-exists-in-php/#comment-331928806</link><description>&lt;p&gt;Glad you found it useful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Tue, 11 Oct 2011 15:38:39 -0000</pubDate></item><item><title>Re: Quicktip: Check if a class constant exists in PHP</title><link>http://aknosis.com/2011/06/29/check-if-a-class-constant-exists-in-php/#comment-331897148</link><description>&lt;p&gt;Thanks for this!&lt;/p&gt;

&lt;p&gt;I used this as part of a regex function within a validation class, allowing me to pass a pattern or the name of a constant containing a pattern to validate a string.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex</dc:creator><pubDate>Tue, 11 Oct 2011 14:57:27 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-265872399</link><description>&lt;p&gt;If all you want to do is remove the href before the hash that isn't too tough, but you would need to update the selector based on the context of its use. See: &lt;a href="http://jsfiddle.net/aknosis/c2yaw/" rel="nofollow"&gt;http://jsfiddle.net/aknosis/c2...&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may also have to tweak the regex for replacing the href but that code works for the example you have.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Tue, 26 Jul 2011 17:56:41 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-265810215</link><description>&lt;p&gt;Thanks for the post! I'd like to do something similar, but just take out the absolute URL from the href attribute. That is take href="/name1/name2#name3" and make it href="/#name3". Any advice?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Josh</dc:creator><pubDate>Tue, 26 Jul 2011 16:12:06 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-265809123</link><description>&lt;p&gt;Thanks for the post! I'd like to do something similar, but just take out the absolute URL from the href attribute. That is take &lt;a href="/name1/name2#name3" rel="nofollow"&gt; and make it  &lt;/a&gt;&lt;a href="/#name3" rel="nofollow"&gt;. Any advice? &lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Josh</dc:creator><pubDate>Tue, 26 Jul 2011 16:10:23 -0000</pubDate></item><item><title>Re: Automating MySQL Database Backups on the Command Line via mysqldump</title><link>http://aknosis.com/2009/10/25/automating-mysql-database-backups-on-the-command-line-via-mysqldump/#comment-192884211</link><description>&lt;p&gt;Good to hear.&lt;/p&gt;

&lt;p&gt;Sorry about the syntax highlighting, could not get it to work on this post!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Fri, 18 Dec 2009 00:10:39 -0000</pubDate></item><item><title>Re: Automating MySQL Database Backups on the Command Line via mysqldump</title><link>http://aknosis.com/2009/10/25/automating-mysql-database-backups-on-the-command-line-via-mysqldump/#comment-192884210</link><description>&lt;p&gt;Thanks! Short, sweet, and helpful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">brittany</dc:creator><pubDate>Thu, 17 Dec 2009 13:52:26 -0000</pubDate></item><item><title>Re: More jQuery Fun &amp;#8211; Auto Populating a Select Box</title><link>http://aknosis.com/2009/10/15/more-jquery-fun-auto-populating-a-select-box/#comment-192884222</link><description>&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;It wouldn't be to difficult to do. &lt;/p&gt;

&lt;p&gt;1. Setup your function that adds the options&lt;br&gt;2. Set the interval to call that function every 3 seconds&lt;/p&gt;

&lt;p&gt;There is no real way to save the options other than a cookie, you could also look into some sort of hash magic but that becomes difficult to work cross browser (see jquery history plugin). &lt;/p&gt;

&lt;p&gt;I also can't seemt to find an easy way to serialize the options into text for storage in a cookie, so you probably would want to append to your cookie as you add each item. You will want to use common functions to turn your Objects in JSON and vice versca, (search for toJson).&lt;/p&gt;

&lt;p&gt;So you really want something like this:&lt;br&gt;&lt;/p&gt;&lt;pre class="brush: jscript;"&gt;function updateOptions(){&lt;br&gt;   //This would be your dynamic call, probably ajax request&lt;br&gt;   var newOption = new Option('name', 'value');&lt;br&gt;   var s = $('#select')[0];&lt;br&gt;   var l = s.length;&lt;br&gt;   s[l] = newOption;&lt;br&gt;   //some predefined method to get the cookie&lt;br&gt;   //and convert it back into an object&lt;br&gt;   var cookie = eval('('+getCookie('optionSvr')+')');&lt;br&gt;  //add new option&lt;br&gt;   cookie.push(newOption);&lt;br&gt;   setCookie('optionSvr',toJSON(cookie));&lt;br&gt;}&lt;br&gt;//Run every 3 seconds&lt;br&gt;setInterval('updateOptions()',3000);&lt;br&gt;&lt;/pre&gt;&lt;br&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br&gt;function updateOptions(){&lt;br&gt;   var x = new Date().getTime();&lt;br&gt;   var newOption = new Option(x, x);&lt;br&gt;   var s = $('#selectCmt')[0];&lt;br&gt;   var l = s.length;&lt;br&gt;   s[l] = newOption;&lt;br&gt;   }&lt;br&gt;&amp;lt;/script&amp;gt;&lt;br&gt;Example (minus the cookie stuff)&lt;br&gt;&amp;lt;input class="button" onclick="setInterval('updateOptions()',3000);" type="button" value="test"&amp;gt;&lt;br&gt;&amp;lt;select id="selectCmt"&amp;gt;&amp;lt;/select&amp;gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Wed, 16 Dec 2009 02:13:23 -0000</pubDate></item><item><title>Re: More jQuery Fun &amp;#8211; Auto Populating a Select Box</title><link>http://aknosis.com/2009/10/15/more-jquery-fun-auto-populating-a-select-box/#comment-192884219</link><description>&lt;p&gt;Hi! &lt;br&gt;Nice website. Im trying to create a dynamically select form that adds options from different variables automatically every 3 second. This will constantly go in a loop.&lt;/p&gt;

&lt;p&gt;Is this something i can use to do that?&lt;br&gt;Do you know if there is any way to save the options so it doesn't go blank on reload of the page?&lt;/p&gt;

&lt;p&gt;Thank you any answer.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">zkilz</dc:creator><pubDate>Tue, 15 Dec 2009 10:52:52 -0000</pubDate></item><item><title>Re: More jQuery Fun &amp;#8211; Auto Populating a Select Box</title><link>http://aknosis.com/2009/10/15/more-jquery-fun-auto-populating-a-select-box/#comment-192884218</link><description>&lt;p&gt;To sidestep my $(selector)[0].length = 0 to empty the select you can also do $(selector).empty();&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Sat, 31 Oct 2009 02:58:49 -0000</pubDate></item><item><title>Re: Testing Plugin Syntax Highlter Evolved</title><link>http://aknosis.com/2009/08/12/testing-plugin-syntax-highlter-evolved/#comment-192884185</link><description>&lt;p&gt;I like it!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Thu, 13 Aug 2009 01:07:08 -0000</pubDate></item><item><title>Re: Zero user interaction CAPTCHA &amp;#8211; (lamecaptcha)</title><link>http://aknosis.com/2009/04/17/zero-user-interaction-captcha/#comment-192884194</link><description>&lt;p&gt;Here is an example of what gets submit, (I log all failures of the form and a make a note if the lamecaptcha was the cause)&lt;/p&gt;

&lt;p&gt;[24-Apr-2009 14:02:19] Lame captcha failed [ac1]  != '' || [ac2] dpDlxhbCPs != ''&lt;br&gt;[24-Apr-2009 14:02:19] array(16) {&lt;br&gt;  ["email"]=&amp;gt;&lt;br&gt;  string(17) "cldcwz@hhaahk.com"&lt;br&gt;  ["cEmail"]=&amp;gt;&lt;br&gt;  string(17) "cldcwz@hhaahk.com"&lt;br&gt;  ["serviceNeeds"]=&amp;gt;&lt;br&gt;  string(209) "h4nOVk  &amp;lt;a href="&lt;a href="http://pijyaseimmas.com/" rel="nofollow"&gt;http://pijyaseimmas.com/&lt;/a&gt;"&amp;gt;pijyaseimmas&amp;lt;/a&amp;gt;, [url=&lt;a href="http://mkpzbdhititq.com/" rel="nofollow"&gt;http://mkpzbdhititq.com/&lt;/a&gt;]mkpzbdhititq[/url], [link=&lt;a href="http://vzgqzvmoddqh.com/" rel="nofollow"&gt;http://vzgqzvmoddqh.com/&lt;/a&gt;]vzgqzvmoddqh[/link], &lt;a href="http://hhttrqzagfzq.com/" rel="nofollow"&gt;http://hhttrqzagfzq.com/&lt;/a&gt;"&lt;br&gt;  ["ac1"]=&amp;gt;&lt;br&gt;  string(0) ""&lt;br&gt;  ["ac2"]=&amp;gt;&lt;br&gt;  string(10) "dpDlxhbCPs"&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;What is worse is those links are all bad, they don't go to anywhere.. What I suspect is happening is that the email address is real and they are testing to see if they can send emails via this form with those links, this way they know they can put real emails and start spamming with my form... Not today bitches.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Sun, 26 Apr 2009 01:01:21 -0000</pubDate></item><item><title>Re: Domain Name Search Engine Registration Mail Scam</title><link>http://aknosis.com/2009/01/27/domain-name-search-engine-registration-mail-scam/#comment-192884186</link><description>&lt;p&gt;As soon as I opened this I was suspicious.  And after reading through it I could tell it was not legit.  It's nice to have someone else confirm my thoughts...this is most definitely a SCAM!!!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">AJ</dc:creator><pubDate>Thu, 05 Mar 2009 16:32:46 -0000</pubDate></item><item><title>Re: Creating JSON as a select result in a MySQL Query</title><link>http://aknosis.com/2009/01/12/json-as-a-select-result-mysql-query/#comment-192884173</link><description>&lt;p&gt;Don't forget that group_concat() has a limit of 1024 chars&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Sat, 28 Feb 2009 04:25:19 -0000</pubDate></item></channel></rss>
