Thursday, June 24, 2010

php random_float

function random_float ($min,$max) {
   return ($min+lcg_value()*(abs($max-$min)));
}
that's easy but can't figure out

Sunday, April 25, 2010

Disable your site from Greasemonkey !!!

I've found this by an accident!!!

 document._createElement = document.createElement;
 document.createElement = function(tagName, password) {
    if (tagName != "SCRIPT" || password == "My scripts are OK!") {
        return document._createElement(tagName);
    }
 };
just that and your site will be protected

Thursday, October 01, 2009

Importing Multiple Files to a Single Workbook

press alt+F8 in excel
or Tools -> Macro -> Macros
Macro name : CombineTextFiles
Create

then save and goto excel and insert button from form for macro
then choose CombineTextFiles
after press button you can select files to import to excel refer: http://excel.tips.net
http://support.microsoft.com/kb/141689

Tuesday, June 23, 2009

stuck at runonce with IE7

easily and simple direction
file:disable runonce.reg and just run it OR
file:disable runonce.bat

Tuesday, March 24, 2009

javascript to show and hide element

for html you need to define ID name of an element

<input type="button" name="clickme1" id="clickme1" value="Click me !!" onclick="JavaScript:showbutton('clickme2')"><BR>
<input type="button" name="clickme2" id="clickme2" value="Click me !!" onclick="JavaScript:showbutton('clickme1')" style="visibility:hidden">
For javascript need this code
function showbutton(idName){
 Element = document.getElementById('clickme2');
 Element.disabled=true;
 Element.style.visibility = "hidden";
 Element = document.getElementById('clickme1');
 Element.disabled=true;
 Element.style.visibility = "hidden";
 clickme1Element = document.getElementById(idName);
 clickme1Element.disabled=false;
 clickme1Element.style.visibility = "visible";
}