<?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>(function() { &#187; hack</title>
	<atom:link href="http://maxb.net/blog/tag/hack/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxb.net/blog</link>
	<description>// MAXB.NET LABS</description>
	<lastBuildDate>Mon, 16 May 2011 19:12:58 +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&#8217;n&#039;white 1.0</title>
		<link>http://maxb.net/blog/2008/06/17/blacknwhite/</link>
		<comments>http://maxb.net/blog/2008/06/17/blacknwhite/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 13:41:01 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[firefox]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[blacknwhite]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=77</guid>
		<description><![CDATA[&#8230;because IE sucks. This plugin is a tribute to the &#8220;Firefox Download Day 2008&#8243;. This plugin helps people moving away from Internet Explorer turning the colors of your website to a grayscaled version (using a property of Explorer itself!). It &#8230; <a href="http://maxb.net/blog/2008/06/17/blacknwhite/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>&#8230;because IE sucks.</strong></p>
<p>This plugin is a tribute to the &#8220;Firefox Download Day 2008&#8243;.</p>
<p>This plugin helps people moving away from Internet Explorer turning the colors of your website to a grayscaled version (using a property of Explorer itself!).</p>
<p>It was written from an idea of <strong><a href="http://www.stuffandnonsense.co.uk/" target="_blank">Andy Clarke</a></strong> and a suggest of <strong><a href="http://www.eightballed.net" target="_blank">Simone Parato</a></strong></p>
<p><a href="/scripts/blacknwhite/blacknwhite.js" target="_blank">DOWNLOAD</a></p>
<pre class="brush: jscript; title: ; notranslate">
/*
 *
 * Black'n'White plugin 1.0
 * $Date: 2008-06-17 15:38:15 +0200 (mar, 17 giu 2008) $
 * $Rev: 177 $
 * @requires jQuery v1.2.6
 *
 * Copyright (c) 2008 Massimiliano Balestrieri
 * Examples and docs at: http://maxb.net/blog/
 * Licensed GPL licenses:
 * http://www.gnu.org/licenses/gpl.html
 *
 */

if(!window.BlacknWhite)
    var BlacknWhite = {};

BlacknWhite = {
    init     : function(options)
    {
        options = jQuery.extend({minor : 7}, options);

       	if(jQuery.browser.msie &amp;&amp; jQuery.browser.version &lt; options.minor)
        	jQuery("html").css("filter","gray");
    }
};

jQuery(document).ready(function(){
    BlacknWhite.init();
    //BlacknWhite.init({minor : 8});
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2008/06/17/blacknwhite/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Proxy php vs Websense</title>
		<link>http://maxb.net/blog/2008/06/10/proxy-php-vs-websense/</link>
		<comments>http://maxb.net/blog/2008/06/10/proxy-php-vs-websense/#comments</comments>
		<pubDate>Tue, 10 Jun 2008 15:09:32 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[dilbert]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[websense]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=65</guid>
		<description><![CDATA[Se siete in una intranet e avete un proxy aziendale malefico tipo websense potreste avere problemi di cache oltre che di contenuto proibito! Ecco come nel mio wiki aziendale riesco a prendere il feed di dilbert (la mia vignetta quotidiana &#8230; <a href="http://maxb.net/blog/2008/06/10/proxy-php-vs-websense/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Se siete in una intranet e avete un proxy aziendale malefico tipo websense potreste avere problemi di cache oltre che di contenuto proibito!</p>
<p>Ecco come nel mio wiki aziendale riesco a prendere il feed di dilbert (la mia vignetta quotidiana di dilbert era ferma al 10 Maggio!):</p>
<p>* chiaramente questo proxy è implementato per trasmettere feed xml. non altro.</p>
<pre class="brush: php; title: ; notranslate">
header('Pragma: public');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                  // Date in the past
header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');     // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0');    // HTTP/1.1

header ("content-type: text/xml");

$params = array (
    'http' =&gt; array (
        'proxy' =&gt; 'tcp://proxy.azienda.it:80', // This needs to be the server and the port of the NTLM Authentication Proxy Server.
        'request_fulluri' =&gt; true,
        'header' =&gt; 'Cache-Control: no-store, no-cache, must-revalidate',
    )
);

$ctx = stream_context_create($params);
if(isset($_REQUEST['url'])){
    $url = $_REQUEST['url'];
    echo file_get_contents($url, false, $ctx);
}else{
    echo '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;nodata&gt;1&lt;/nodata&gt;';
}

exit ();
</pre>
<p><a href="http://maxb.net/blog/wp-content/uploads/2008/06/8713stripprint.gif"><img class="size-full wp-image-66" title="8713stripprint" src="http://maxb.net/blog/wp-content/uploads/2008/06/8713stripprint.gif" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2008/06/10/proxy-php-vs-websense/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UiTableEdit – save data</title>
		<link>http://maxb.net/blog/2008/05/08/uitableedit-save-data/</link>
		<comments>http://maxb.net/blog/2008/05/08/uitableedit-save-data/#comments</comments>
		<pubDate>Thu, 08 May 2008 09:07:31 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=17</guid>
		<description><![CDATA[Ho provato un plugin ancora poco documentato ma che promette bene&#8230; anche perchè fa poco. quello che serve. Ho appena scritto all&#8217;autore per capire se il mio &#8220;workaround&#8221; per salvare il dato modificato è inutile. Non ho trovato metodi nativi &#8230; <a href="http://maxb.net/blog/2008/05/08/uitableedit-save-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ho provato un plugin ancora poco documentato ma che promette bene&#8230; anche perchè fa poco. quello che serve.</p>
<p>Ho appena scritto all&#8217;autore per capire se il mio &#8220;workaround&#8221; per salvare il dato modificato è inutile.<br />
Non ho trovato metodi nativi per farlo. </p>
<p>Il plugin è reperibile qui: </p>
<p><a href="http://gregweber.info/projects/uitableedit.html">http://gregweber.info/projects/uitableedit.html</a></p>
<p>Ho modificato giusto questo (riga 57). </p>
<p>Da</p>
<blockquote><p>
 if( options.editDone ) options.editDone(val,orig_text, this)
</p></blockquote>
<p>A</p>
<blockquote><p>
 if( options.editDone ) options.editDone(val,orig_text)
</p></blockquote>
<p>Per salvare la riga ho scritto questo:</p>
<pre class="brush: jscript; title: ; notranslate">
jQuery(document).ready(function(){
    jQuery(&quot;.tablesorter&quot;).tablesorter();
    var t = jQuery('#tablesorter-demo');
    jQuery.uiTableEdit( t ,
        {
            editDone : function(val,orig_text,el){
                //console.log(val);
                //console.log(orig_text);
                //console.log(jQuery(el).parent().find(&quot;.key&quot;).text());
                var thead = jQuery(&quot;thead&gt;tr&gt;&quot;,t);
                //console.log(thead);
                var row = jQuery(el).parent().children();
                var data = [];

                //console.log(row);

                row.each(
                    function(nr){
                        var key = thead.eq(nr).text().replace(&quot; &quot;,&quot;_&quot;);
                        data.push(key + &quot;=&quot; + escape(jQuery(this).text()));
                    }
                );
                //console.log(data);
                jQuery.ajax({
                        type: &quot;POST&quot;,
                        url: &quot;./include/server.php&quot;,
                        data: data.join(&quot;&amp;&quot;),
                        success: function(msg){
                            console.log(msg);
                        }
                });

            }
        }
    ); // returns t

});
 </pre>
<p>Ecco la <a href="/scripts/uitableedit/">Demo</a>. <strong>Aprire con firebug attivo.</strong> </p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2008/05/08/uitableedit-save-data/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>jQuery Tablesorter thead fixed</title>
		<link>http://maxb.net/blog/2008/04/23/jquery-tablesorter-thead-fixed/</link>
		<comments>http://maxb.net/blog/2008/04/23/jquery-tablesorter-thead-fixed/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 16:59:57 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[hack]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=12</guid>
		<description><![CDATA[This is a draft&#8230; (IE6-7 css). jQuery è pazzesco! DEMO]]></description>
			<content:encoded><![CDATA[<p>This is a draft&#8230; (IE6-7 css). jQuery è pazzesco!</p>
<p><a href="/scripts/tablesorter-thfixed/1.html">DEMO</a></p>
<pre class="brush: jscript; title: ; notranslate">
jQuery(function() {
		var height_table = '150px';
        var table_id = &quot;tablesorter-demo&quot;;
		var box_id = table_id + '-thfixed';
		var clone_id = table_id + '-clone';
		var target = table_id + '-target';

        var wrapper = '&lt;div class=&quot;thfixed&quot; id=&quot;'+ box_id +'&quot;&gt;&lt;div class=&quot;thfixed-head&quot;&gt;&lt;div class=&quot;thfixed-head-box&quot; id=&quot;'+target+'&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;thfixed-body&quot;&gt;&lt;/div&gt;&lt;/div&gt;';
        var table = $(&quot;#&quot; + table_id);
        var table_parent = table.parent()
        table_parent.empty();
        table_parent.append(wrapper);
        $(&quot;#&quot; + box_id + &quot;&gt;.thfixed-body&quot;).append(table);

        $(&quot;#&quot; + table_id).tablesorter();
        var myclone = $(&quot;#&quot; + table_id).clone();

        myclone.attr('id',clone_id);
        //console.log(myclone.attr('id')); 

        $(&quot;#&quot; + target).append(myclone);

        //stili wrapper
        $(&quot;.thfixed, .thfixed-head&quot;).css({&quot;overflow&quot; : &quot;hidden&quot;,&quot;position&quot;:&quot;relative&quot;});
        $(&quot;.thfixed-body&quot;).css({&quot;overflow&quot; : &quot;auto&quot;,&quot;position&quot;:&quot;relative&quot;, &quot;height&quot; : height_table});
        $(&quot;#&quot; + clone_id).css({&quot;margin&quot;:&quot;0&quot;});
        $(&quot;#&quot; + table_id).css({&quot;margin-top&quot;:&quot;0&quot;});
        //#console.log($(&quot;#&quot; + clone_id));

        //.append('&lt;div class=&quot;thfixed-head&quot;&gt;&lt;div class=&quot;thfixed-head-box&quot;&gt;');

        var myhandlers_source = $(&quot;#&quot; + table_id + &quot;&gt;thead&gt;tr&gt;th&quot;);
        var thead_tr_source = $(&quot;#&quot; + table_id + &quot;&gt;thead&gt;tr&quot;);
        var td_source = $(&quot;#&quot; + table_id + &quot;&gt;tbody&gt;tr&gt;&quot;);
        //console.log(td_source);
        var myhandlers_clone = $(&quot;#&quot; + clone_id + &quot;&gt;thead&gt;tr&gt;th&quot;);
        //console.log(myhandlers_source);
        //console.log(myhandlers_clone);
        myhandlers_clone.each(
            function(nr){
                    //console.log($(this).click);
                    //console.log($(this).css('width'));
                    var width = parseInt($(this).css('width'));
                    $(this).attr('style' , 'width:'+ width + 'px');

                    if(nr == (myhandlers_clone.length - 1))
                        width -= 10;

                    $(td_source.get(nr)).attr('style' , 'width:'+ width + 'px');
                    thead_tr_source.css('display','none');

                    $(this).click(
                        function(){
                            myhandlers_clone.each(function(nr2){
                                if(nr !== nr2){
                                    $(this).removeClass('headerSortDown');
                                    $(this).removeClass('headerSortUp');
                                }
                            });

                            $(myhandlers_source.get(nr)).trigger('click');
                            var classes = $(this).attr('class').split(&quot; &quot;);

                            if(classes[1]){
                                if(classes[1] == 'headerSortDown'){
                                    $(this).removeClass('headerSortDown');
                                    $(this).addClass('headerSortUp');
                                }else if (classes[1] == 'headerSortUp'){
                                    $(this).removeClass('headerSortUp');
                                    $(this).addClass('headerSortDown');
                                }else{
                                    $(this).addClass('headerSortDown');
                                }
                            }
                            //$(this).removeClass('headerSortDown');
                            //$(this).removeClass('headerSortUp');

                            //$(this).css();
                        }
                    );

            }
        );

        $(&quot;tbody&quot;, myclone).empty();

});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2008/04/23/jquery-tablesorter-thead-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

