HTML
1 2 |
<a id="toggleLink"></a> <img id="toggleImage" alt="" src="plus_grey.gif" /> |
Javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$(document).ready(function (){ // Bind toggle to Link on click $('#toggleLink').bind('click', function() { // toggle Container (hidden / visible) $('#toggleContainer').toggle(); // toggle image of the link if($('img#toggleImage').src() == 'minus_grey.gif'){ $("img#toggleImage").src('plus_grey.gif'); }else{ $('img#toggleImage').src('minus_grey.gif"); } this.blur(); return false; } ); } |
1 |
Function checkCSV(getThisFile)<br><br> Const ForReading = 1<br> counter = 0<br> <br> Dim objFSO , objTextStream , strText , strFileName, output<br> <br> strFileName = Server.MapPath(getThisFile)<br> <br> Set objFSO = Server.CreateObject('Scripting.FileSystemObject')<br> Set objTextStream = objFSO.OpenTextFile(strFileName , ForReading , False)<br> <br> If not objTextStream.AtEndOfStream Then<br> Do While not objTextStream.AtEndOfStream<br> strText = objTextStream.ReadLine<br> arrText = split(strText, ';', 9)<br> <br> if arrText(0) = Request.Form('id') then<br> checkCSV = arrText<br> end if<br> <br> counter = counter + 1<br> Loop<br> End If<br> <br> objTextStream.Close<br> Set objFSO = Nothing<br> Set objTextStream = Nothing<br>end Function |
“XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is tested (on linux) and supported on all of the latest PHP cvs branches such as PHP_4_3 PHP_4_4 PHP_5_0 PHP_5_1 PHP_5_2 HEAD(6.x). ThreadSafe/Windows is also supported. It overcomes a lot of problems that has been with other competing opcachers such as being able to be used with new PHP versions.”
Have been playing with it locally and used it on a customer install. Have been trying most of the opcode cachers over the past months, this one is the only cacher that is actively developed, apart from APC.
Compress javascript easily. Most of the popular libraries already provide compressed versions to minimize their file sizes.
Test your regular expression easily right on the desktop.
Link
Some other nice resources for regular expressions:
http://www.regular-expressions.info/ (Tester)
http://regexlib.com/ (my favorite)
Regular Expressions Cheat Sheet
Javascript Regular Expressions
Mac OSX widget
Safari 3 beta for Mac and Windows has been released on the WWDC yesterday.
The OSX version seems to be stable, but can not say the same about the Windows version yet. Well its just a beta and its on windows :)
Interresting that Apple is also moving into the windows browser market. The html / js benchmarks are really impressive.
I have been doing alot of javascript programming in the past few years and had to do many tasks over and over again.
Since last year javascript libraries have been almost exploding, due to the huge ajax hype. Among those are Prototype, jQuery, MooTools, ext, cssQuery, dojo and alot of other larger frameworks.
When I evaluate libraries, I make sure that what I include mostly consists of things I will actual use within a project. Bloated libraries are out of the question for me. Also important is the way a library integrates into my workflow and other server side enviroments I use. The library must be unobstrusive and easy to extend.
While evaluating options for my php framework, JQuery became the library of my choice.
“jQuery is a fast, concise, JavaScript Library that simplifies how you
traverse HTML documents, handle events, perform animations, and add
Ajax interactions to your web pages.”
It has a lighweight footprint of around 19kb(compressed), is CSS3
compliant and provides cross browser functionality (IE, Firefox,
Safari, Opera). The jQuery community is really active and provides a
huge amount of additonal plugins that extend its functionality. jQuery
allowed me to move many of my snippets into small plugins, that I can
load where ever I need them. I will share some of those in the future
and also write up some tutorials about things I have created with
jQuery in the past months.
jQuery is up to version 1.1.2 and version 1.1.3 is just around the corner.
We all hate tweaking our css to conform for multiple browsers. Even though things got alot better with the latest browser releases, sometimes elements need to be positioned by the pixel in any browser and you have to adjust your css for each of them.
Here is a site covering most of the possiblities to handle css for different browsers, highlighting quirks that work on special versions and browsers.
Lately I had to change permissions for a lot of files at once. When working on the shell this can be quickly done using the linux find command.
If you want to adjust permissions on all php files, you can do :
1 |
find .. -name *.php -type f -exec chmod -R 0640 {} ; |
Some more info for the find command at Linux Manual